xref: /freebsd/contrib/dialog/configure (revision 18054d0220cfc8df9c9568c437bd6fbb59d53c3c)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20210105.
4#
5# Copyright 2003-2020,2021	Thomas E. Dickey
6# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7# Free Software Foundation, Inc.
8# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
10
11# Avoid depending upon Character Ranges.
12as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15as_cr_digits='0123456789'
16as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18# Sed expression to map a string onto a valid variable name.
19as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21# Sed expression to map a string onto a valid CPP name.
22as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24# Be Bourne compatible
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26  emulate sh
27  NULLCMD=:
28elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29  set -o posix
30fi
31
32# Name of the executable.
33as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35if expr a : '\(a\)' >/dev/null 2>&1; then
36  as_expr=expr
37else
38  as_expr=false
39fi
40
41rm -f conf$$ conf$$.exe conf$$.file
42echo >conf$$.file
43if ln -s conf$$.file conf$$ 2>/dev/null; then
44  # We could just check for DJGPP; but this test a) works b) is more generic
45  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46  if test -f conf$$.exe; then
47    # Don't use ln at all; we don't have any links
48    as_ln_s='cp -p'
49  else
50    as_ln_s='ln -s'
51  fi
52elif ln conf$$.file conf$$ 2>/dev/null; then
53  as_ln_s=ln
54else
55  as_ln_s='cp -p'
56fi
57rm -f conf$$ conf$$.exe conf$$.file
58
59as_executable_p="test -f"
60
61# Support unset when possible.
62if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63  as_unset="unset"
64else
65  as_unset="false"
66fi
67
68# NLS nuisances.
69$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78# IFS
79# We need space, tab and new line, in precisely that order.
80as_nl='
81'
82IFS=" 	$as_nl"
83
84# CDPATH.
85$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87# Name of the host.
88# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89# so uname gets run too.
90ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92exec 6>&1
93
94#
95# Initializations.
96#
97ac_default_prefix=/usr/local
98cross_compiling=no
99subdirs=
100MFLAGS=
101MAKEFLAGS=
102SHELL=${CONFIG_SHELL-/bin/sh}
103
104# Maximum number of lines to put in a shell here document.
105# This variable seems obsolete.  It should probably be removed, and
106# only ac_max_sed_lines should be used.
107: "${ac_max_here_lines=38}"
108
109ac_unique_file="dialog.h"
110# Factoring default headers for most tests.
111ac_includes_default="\
112#include <stdio.h>
113#if HAVE_SYS_TYPES_H
114# include <sys/types.h>
115#endif
116#if HAVE_SYS_STAT_H
117# include <sys/stat.h>
118#endif
119#if STDC_HEADERS
120# include <stdlib.h>
121# include <stddef.h>
122#else
123# if HAVE_STDLIB_H
124#  include <stdlib.h>
125# endif
126#endif
127#if HAVE_STRING_H
128# if !STDC_HEADERS && HAVE_MEMORY_H
129#  include <memory.h>
130# endif
131# include <string.h>
132#endif
133#if HAVE_STRINGS_H
134# include <strings.h>
135#endif
136#if HAVE_INTTYPES_H
137# include <inttypes.h>
138#else
139# if HAVE_STDINT_H
140#  include <stdint.h>
141# endif
142#endif
143#if HAVE_UNISTD_H
144# include <unistd.h>
145#endif"
146
147# Initialize some variables set by options.
148ac_init_help=
149ac_init_version=false
150# The variables have the same names as the options, with
151# dashes changed to underlines.
152cache_file=/dev/null
153exec_prefix=NONE
154no_create=
155no_recursion=
156prefix=NONE
157program_prefix=NONE
158program_suffix=NONE
159program_transform_name=s,x,x,
160silent=
161site=
162srcdir=
163verbose=
164x_includes=NONE
165x_libraries=NONE
166
167# Installation directory options.
168# These are left unexpanded so users can "make install exec_prefix=/foo"
169# and all the variables that are supposed to be based on exec_prefix
170# by default will actually change.
171# Use braces instead of parens because sh, perl, etc. also accept them.
172bindir='${exec_prefix}/bin'
173sbindir='${exec_prefix}/sbin'
174libexecdir='${exec_prefix}/libexec'
175datarootdir='${prefix}/share'
176datadir='${datarootdir}'
177sysconfdir='${prefix}/etc'
178sharedstatedir='${prefix}/com'
179localstatedir='${prefix}/var'
180runstatedir='${localstatedir}/run'
181libdir='${exec_prefix}/lib'
182includedir='${prefix}/include'
183oldincludedir='/usr/include'
184infodir='${datarootdir}/info'
185mandir='${datarootdir}/man'
186
187# Identity of this package.
188PACKAGE_NAME=
189PACKAGE_TARNAME=
190PACKAGE_VERSION=
191PACKAGE_STRING=
192PACKAGE_BUGREPORT=
193
194ac_prev=
195for ac_option
196do
197  # If the previous option needs an argument, assign it.
198  if test -n "$ac_prev"; then
199    eval "$ac_prev=\$ac_option"
200    ac_prev=
201    continue
202  fi
203
204  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
205
206  # Accept the important Cygnus configure options, so we can diagnose typos.
207
208  case "$ac_option" in
209
210  -bindir | --bindir | --bindi | --bind | --bin | --bi)
211    ac_prev=bindir ;;
212  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
213    bindir=$ac_optarg ;;
214
215  -build | --build | --buil | --bui | --bu)
216    ac_prev=build_alias ;;
217  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
218    build_alias=$ac_optarg ;;
219
220  -cache-file | --cache-file | --cache-fil | --cache-fi \
221  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
222    ac_prev=cache_file ;;
223  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
224  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
225    cache_file=$ac_optarg ;;
226
227  --config-cache | -C)
228    cache_file=config.cache ;;
229
230  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
231    ac_prev=datadir ;;
232  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
233  | --da=*)
234    datadir=$ac_optarg ;;
235
236  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
237  | --dataroo | --dataro | --datar)
238    ac_prev=datarootdir ;;
239  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
240  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
241    datarootdir=$ac_optarg ;;
242
243  -disable-* | --disable-*)
244    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
245    # Reject names that are not valid shell variable names.
246    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
247      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
248   { (exit 1); exit 1; }; }
249    ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
250    eval "enable_$ac_feature=no" ;;
251
252  -enable-* | --enable-*)
253    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
254    # Reject names that are not valid shell variable names.
255    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
256      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
257   { (exit 1); exit 1; }; }
258    ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
259    case "$ac_option" in
260      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
261      *) ac_optarg=yes ;;
262    esac
263    eval "enable_$ac_feature='$ac_optarg'" ;;
264
265  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
266  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
267  | --exec | --exe | --ex)
268    ac_prev=exec_prefix ;;
269  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
270  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
271  | --exec=* | --exe=* | --ex=*)
272    exec_prefix=$ac_optarg ;;
273
274  -gas | --gas | --ga | --g)
275    # Obsolete; use --with-gas.
276    with_gas=yes ;;
277
278  -help | --help | --hel | --he | -h)
279    ac_init_help=long ;;
280  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
281    ac_init_help=recursive ;;
282  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
283    ac_init_help=short ;;
284
285  -host | --host | --hos | --ho)
286    ac_prev=host_alias ;;
287  -host=* | --host=* | --hos=* | --ho=*)
288    host_alias=$ac_optarg ;;
289
290  -includedir | --includedir | --includedi | --included | --include \
291  | --includ | --inclu | --incl | --inc)
292    ac_prev=includedir ;;
293  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
294  | --includ=* | --inclu=* | --incl=* | --inc=*)
295    includedir=$ac_optarg ;;
296
297  -infodir | --infodir | --infodi | --infod | --info | --inf)
298    ac_prev=infodir ;;
299  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
300    infodir=$ac_optarg ;;
301
302  -libdir | --libdir | --libdi | --libd)
303    ac_prev=libdir ;;
304  -libdir=* | --libdir=* | --libdi=* | --libd=*)
305    libdir=$ac_optarg ;;
306
307  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
308  | --libexe | --libex | --libe)
309    ac_prev=libexecdir ;;
310  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
311  | --libexe=* | --libex=* | --libe=*)
312    libexecdir=$ac_optarg ;;
313
314  -localstatedir | --localstatedir | --localstatedi | --localstated \
315  | --localstate | --localstat | --localsta | --localst \
316  | --locals | --local | --loca | --loc | --lo)
317    ac_prev=localstatedir ;;
318  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
319  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
320  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
321    localstatedir=$ac_optarg ;;
322
323  -runstatedir | --runstatedir | --runstatedi | --runstated \
324  | --runstate | --runstat | --runsta | --runst \
325  | --runs | --run | --ru)
326    ac_prev=runstatedir ;;
327  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
328  | --runstate=* | --runstat=* | --runsta=* | --runst=* \
329  | --runs=* | --run=* | --ru=*)
330    runstatedir=$ac_optarg ;;
331
332  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
333    ac_prev=mandir ;;
334  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
335    mandir=$ac_optarg ;;
336
337  -nfp | --nfp | --nf)
338    # Obsolete; use --without-fp.
339    with_fp=no ;;
340
341  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
342  | --no-cr | --no-c)
343    no_create=yes ;;
344
345  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
346  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
347    no_recursion=yes ;;
348
349  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
350  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
351  | --oldin | --oldi | --old | --ol | --o)
352    ac_prev=oldincludedir ;;
353  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
354  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
355  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
356    oldincludedir=$ac_optarg ;;
357
358  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
359    ac_prev=prefix ;;
360  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
361    prefix=$ac_optarg ;;
362
363  -program-prefix | --program-prefix | --program-prefi | --program-pref \
364  | --program-pre | --program-pr | --program-p)
365    ac_prev=program_prefix ;;
366  -program-prefix=* | --program-prefix=* | --program-prefi=* \
367  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
368    program_prefix=$ac_optarg ;;
369
370  -program-suffix | --program-suffix | --program-suffi | --program-suff \
371  | --program-suf | --program-su | --program-s)
372    ac_prev=program_suffix ;;
373  -program-suffix=* | --program-suffix=* | --program-suffi=* \
374  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
375    program_suffix=$ac_optarg ;;
376
377  -program-transform-name | --program-transform-name \
378  | --program-transform-nam | --program-transform-na \
379  | --program-transform-n | --program-transform- \
380  | --program-transform | --program-transfor \
381  | --program-transfo | --program-transf \
382  | --program-trans | --program-tran \
383  | --progr-tra | --program-tr | --program-t)
384    ac_prev=program_transform_name ;;
385  -program-transform-name=* | --program-transform-name=* \
386  | --program-transform-nam=* | --program-transform-na=* \
387  | --program-transform-n=* | --program-transform-=* \
388  | --program-transform=* | --program-transfor=* \
389  | --program-transfo=* | --program-transf=* \
390  | --program-trans=* | --program-tran=* \
391  | --progr-tra=* | --program-tr=* | --program-t=*)
392    program_transform_name=$ac_optarg ;;
393
394  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
395  | -silent | --silent | --silen | --sile | --sil)
396    silent=yes ;;
397
398  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
399    ac_prev=sbindir ;;
400  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
401  | --sbi=* | --sb=*)
402    sbindir=$ac_optarg ;;
403
404  -sharedstatedir | --sharedstatedir | --sharedstatedi \
405  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
406  | --sharedst | --shareds | --shared | --share | --shar \
407  | --sha | --sh)
408    ac_prev=sharedstatedir ;;
409  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
410  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
411  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
412  | --sha=* | --sh=*)
413    sharedstatedir=$ac_optarg ;;
414
415  -site | --site | --sit)
416    ac_prev=site ;;
417  -site=* | --site=* | --sit=*)
418    site=$ac_optarg ;;
419
420  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
421    ac_prev=srcdir ;;
422  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
423    srcdir=$ac_optarg ;;
424
425  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
426  | --syscon | --sysco | --sysc | --sys | --sy)
427    ac_prev=sysconfdir ;;
428  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
429  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
430    sysconfdir=$ac_optarg ;;
431
432  -target | --target | --targe | --targ | --tar | --ta | --t)
433    ac_prev=target_alias ;;
434  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
435    target_alias=$ac_optarg ;;
436
437  -v | -verbose | --verbose | --verbos | --verbo | --verb)
438    verbose=yes ;;
439
440  -version | --version | --versio | --versi | --vers | -V)
441    ac_init_version=: ;;
442
443  -with-* | --with-*)
444    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
445    # Reject names that are not valid shell variable names.
446    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
447      { echo "$as_me: error: invalid package name: $ac_package" >&2
448   { (exit 1); exit 1; }; }
449    ac_package=`echo "$ac_package" | sed 's/-/_/g'`
450    case "$ac_option" in
451      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
452      *) ac_optarg=yes ;;
453    esac
454    eval "with_$ac_package='$ac_optarg'" ;;
455
456  -without-* | --without-*)
457    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
458    # Reject names that are not valid shell variable names.
459    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
460      { echo "$as_me: error: invalid package name: $ac_package" >&2
461   { (exit 1); exit 1; }; }
462    ac_package=`echo "$ac_package" | sed 's/-/_/g'`
463    eval "with_$ac_package=no" ;;
464
465  --x)
466    # Obsolete; use --with-x.
467    with_x=yes ;;
468
469  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
470  | --x-incl | --x-inc | --x-in | --x-i)
471    ac_prev=x_includes ;;
472  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
473  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
474    x_includes=$ac_optarg ;;
475
476  -x-libraries | --x-libraries | --x-librarie | --x-librari \
477  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
478    ac_prev=x_libraries ;;
479  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
480  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
481    x_libraries=$ac_optarg ;;
482
483  -*) { echo "$as_me: error: unrecognized option: $ac_option
484Try \`$0 --help' for more information." >&2
485   { (exit 1); exit 1; }; }
486    ;;
487
488  *=*)
489    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
490    # Reject names that are not valid shell variable names.
491    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
492      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
493   { (exit 1); exit 1; }; }
494    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
495    eval "$ac_envvar='$ac_optarg'"
496    export "$ac_envvar" ;;
497
498  *)
499    # FIXME: should be removed in autoconf 3.0.
500    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
501    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
502      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
503    : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
504    ;;
505
506  esac
507done
508
509if test -n "$ac_prev"; then
510  ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
511  { echo "$as_me: error: missing argument to $ac_option" >&2
512   { (exit 1); exit 1; }; }
513fi
514
515# Be sure to have absolute paths.
516for ac_var in exec_prefix prefix
517do
518  eval ac_val=$`echo "$ac_var"`
519  case "$ac_val" in
520    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
521    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
522   { (exit 1); exit 1; }; };;
523  esac
524done
525
526# Be sure to have absolute paths.
527for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
528              localstatedir libdir includedir oldincludedir infodir mandir
529do
530  eval ac_val=$`echo "$ac_var"`
531  case "$ac_val" in
532    [\\/$]* | ?:[\\/]* ) ;;
533    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
534   { (exit 1); exit 1; }; };;
535  esac
536done
537
538# There might be people who depend on the old broken behavior: `$host'
539# used to hold the argument of --host etc.
540build=$build_alias
541host=$host_alias
542target=$target_alias
543
544# FIXME: should be removed in autoconf 3.0.
545if test "x$host_alias" != x; then
546  if test "x$build_alias" = x; then
547    cross_compiling=maybe
548    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
549    If a cross compiler is detected then cross compile mode will be used." >&2
550  elif test "x$build_alias" != "x$host_alias"; then
551    cross_compiling=yes
552  fi
553fi
554
555ac_tool_prefix=
556test -n "$host_alias" && ac_tool_prefix=$host_alias-
557
558test "$silent" = yes && exec 6>/dev/null
559
560# Find the source files, if location was not specified.
561if test -z "$srcdir"; then
562  ac_srcdir_defaulted=yes
563  # Try the directory containing this script, then its parent.
564  ac_prog=$0
565  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
566  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
567  srcdir=$ac_confdir
568  if test ! -r "$srcdir/$ac_unique_file"; then
569    srcdir=..
570  fi
571else
572  ac_srcdir_defaulted=no
573fi
574if test ! -r "$srcdir/$ac_unique_file"; then
575  if test "$ac_srcdir_defaulted" = yes; then
576    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
577   { (exit 1); exit 1; }; }
578  else
579    { echo "$as_me: error: cannot find sources in $srcdir" >&2
580   { (exit 1); exit 1; }; }
581  fi
582fi
583srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
584ac_env_build_alias_set=${build_alias+set}
585ac_env_build_alias_value=$build_alias
586ac_cv_env_build_alias_set=${build_alias+set}
587ac_cv_env_build_alias_value=$build_alias
588ac_env_host_alias_set=${host_alias+set}
589ac_env_host_alias_value=$host_alias
590ac_cv_env_host_alias_set=${host_alias+set}
591ac_cv_env_host_alias_value=$host_alias
592ac_env_target_alias_set=${target_alias+set}
593ac_env_target_alias_value=$target_alias
594ac_cv_env_target_alias_set=${target_alias+set}
595ac_cv_env_target_alias_value=$target_alias
596ac_env_CC_set=${CC+set}
597ac_env_CC_value=$CC
598ac_cv_env_CC_set=${CC+set}
599ac_cv_env_CC_value=$CC
600ac_env_CFLAGS_set=${CFLAGS+set}
601ac_env_CFLAGS_value=$CFLAGS
602ac_cv_env_CFLAGS_set=${CFLAGS+set}
603ac_cv_env_CFLAGS_value=$CFLAGS
604ac_env_LDFLAGS_set=${LDFLAGS+set}
605ac_env_LDFLAGS_value=$LDFLAGS
606ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
607ac_cv_env_LDFLAGS_value=$LDFLAGS
608ac_env_CPPFLAGS_set=${CPPFLAGS+set}
609ac_env_CPPFLAGS_value=$CPPFLAGS
610ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
611ac_cv_env_CPPFLAGS_value=$CPPFLAGS
612ac_env_CPP_set=${CPP+set}
613ac_env_CPP_value=$CPP
614ac_cv_env_CPP_set=${CPP+set}
615ac_cv_env_CPP_value=$CPP
616
617#
618# Report the --help message.
619#
620if test "$ac_init_help" = "long"; then
621  # Omit some internal or obsolete options to make the list less imposing.
622  # This message is too long to be a string in the A/UX 3.1 sh.
623  cat <<EOF
624\`configure' configures this package to adapt to many kinds of systems.
625
626Usage: $0 [OPTION]... [VAR=VALUE]...
627
628To assign environment variables (e.g., CC, CFLAGS...), specify them as
629VAR=VALUE.  See below for descriptions of some of the useful variables.
630
631Defaults for the options are specified in brackets.
632
633Configuration:
634  -h, --help              display this help and exit
635      --help=short        display options specific to this package
636      --help=recursive    display the short help of all the included packages
637  -V, --version           display version information and exit
638  -q, --quiet, --silent   do not print \`checking...' messages
639      --cache-file=FILE   cache test results in FILE [disabled]
640  -C, --config-cache      alias for \`--cache-file=config.cache'
641  -n, --no-create         do not create output files
642      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
643
644EOF
645
646  cat <<EOF
647Installation directories:
648  --prefix=PREFIX         install architecture-independent files in PREFIX
649                          [$ac_default_prefix]
650  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
651                          [PREFIX]
652
653By default, \`make install' will install all the files in
654\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
655an installation prefix other than \`$ac_default_prefix' using \`--prefix',
656for instance \`--prefix=\$HOME'.
657
658For better control, use the options below.
659
660Fine tuning of the installation directories:
661  --bindir=DIR            user executables [EPREFIX/bin]
662  --sbindir=DIR           system admin executables [EPREFIX/sbin]
663  --libexecdir=DIR        program executables [EPREFIX/libexec]
664  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
665  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
666  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
667  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
668  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
669  --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
670  --libdir=DIR            object code libraries [EPREFIX/lib]
671  --includedir=DIR        C header files [PREFIX/include]
672  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673  --infodir=DIR           info documentation [DATAROOTDIR/info]
674  --mandir=DIR            man documentation [DATAROOTDIR/man]
675EOF
676
677  cat <<\EOF
678
679Program names:
680  --program-prefix=PREFIX            prepend PREFIX to installed program names
681  --program-suffix=SUFFIX            append SUFFIX to installed program names
682  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684X features:
685  --x-includes=DIR    X include files are in DIR
686  --x-libraries=DIR   X library files are in DIR
687
688System types:
689  --build=BUILD           configure for building on BUILD [guessed]
690  --host=HOST       build programs to run on HOST [BUILD]
691EOF
692fi
693
694if test -n "$ac_init_help"; then
695
696  cat <<\EOF
697
698Optional Features:
699  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
700  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
701
702Optional Packages:
703  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
704  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
705
706  --disable-echo          do not display "compiling" commands
707  --disable-largefile     omit support for large files
708  --with-install-prefix=XXX sets DESTDIR, useful for packaging
709  --with-x                use the X Window System
710  --enable-warnings       test: turn on gcc compiler warnings
711  --with-pkg-config{=path} enable/disable use of pkg-config
712  --with-package=XXX      rename dialog to XXX, library to libXXX.a, etc
713  --enable-header-subdir  install dlg_XXX headers to subdirectory
714  --with-man2html=XXX     use XXX rather than groff
715  --with-libiconv-prefix=DIR
716                          search for libiconv in DIR/include and DIR/lib
717  --enable-nls            use Native Language Support
718  --with-included-gettext use the GNU gettext library included here
719  --with-textdomain=PKG   NLS text-domain (default is package name)
720  --disable-included-msgs use included messages, for i18n support
721  --with-dmalloc          test: use Gray Watson's dmalloc library
722  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
723  --with-purify           test: use Purify
724  --with-valgrind         test: use valgrind
725  --with-no-leaks         test: free permanent memory, analyze leaks
726  --disable-trace         do not support --trace option
727  --enable-rpath          use rpath option when generating shared libraries
728  --with-rel-version=XXX  override derived release version
729  --with-abi-version=XXX  override derived ABI version
730  --disable-libtool-version  enable to use libtool's incompatible naming scheme
731  --with-libtool          generate libraries with libtool
732  --with-libtool-opts=XXX specify additional libtool options
733  --with-export-syms=XXX  limit exported symbols using libtool
734  --with-shared           generate shared-libraries
735  --with-shlib-version=X  Specify rel or abi version for shared libs
736  --with-versioned-syms=X markup versioned symbols using ld
737  --with-curses-dir=DIR   directory in which (n)curses is installed
738  --with-screen=XXX       use specified curses-libraries
739  --with-ncursesw         use wide ncurses-libraries
740  --with-ncurses          use ncurses-libraries
741  --with-pdcurses         compile/link with pdcurses X11 library
742  --with-curses-colr      compile/link with HPUX 10.x color-curses
743  --with-curses-5lib      compile/link with SunOS 5lib curses
744  --with-Xaw3d            link with Xaw 3d library
745  --with-Xaw3dxft         link with Xaw 3d xft library
746  --with-neXtaw           link with neXT Athena library
747  --with-XawPlus          link with Athena-Plus library
748  --disable-extras        do not include extra dialogs
749  --disable-rc-file       do not include config-file support
750  --disable-rc-file2      do not use extra attributes in config-file
751  --disable-Xdialog       do not include Xdialog-style dialogs (1.1)
752  --disable-Xdialog2      do not include extra Xdialog-style dialogs (1.2)
753  --disable-whiptail      do not map extra whiptail options
754  --disable-form          do not include the form dialog
755  --disable-gauge         do not include the gauge dialogs
756  --disable-tailbox       do not include the tailbox dialog
757  --disable-mixedform     do not include the mixedform dialog
758  --disable-mixedgauge    do not include the mixedgauge dialog
759  --enable-widec          enable wide-curses features
760  --disable-rpath-hack    don't add rpath options for additional libraries
761
762Some influential environment variables:
763  CC          C compiler command
764  CFLAGS      C compiler flags
765  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
766              nonstandard directory <lib dir>
767  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
768              headers in a nonstandard directory <include dir>
769  CPP         C preprocessor
770
771Use these variables to override the choices made by `configure' or to help
772it to find libraries and programs with nonstandard names/locations.
773
774EOF
775fi
776
777if test "$ac_init_help" = "recursive"; then
778  # If there are subdirs, report their specific --help.
779  ac_popdir=`pwd`
780  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
781    cd "$ac_subdir"
782    # A "../" for each directory in /$ac_subdir.
783    ac_dots=`echo "$ac_subdir" |
784             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
785
786    case "$srcdir" in
787    .) # No --srcdir option.  We are building in place.
788      ac_sub_srcdir="$srcdir" ;;
789    [\\/]* | ?:[\\/]* ) # Absolute path.
790      ac_sub_srcdir="$srcdir/$ac_subdir" ;;
791    *) # Relative path.
792      ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
793    esac
794
795    # Check for guested configure; otherwise get Cygnus style configure.
796    if test -f "$ac_sub_srcdir/configure.gnu"; then
797      echo
798      $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
799    elif test -f "$ac_sub_srcdir/configure"; then
800      echo
801      $SHELL "$ac_sub_srcdir/configure" --help=recursive
802    elif test -f "$ac_sub_srcdir/configure.ac" ||
803           test -f "$ac_sub_srcdir/configure.in"; then
804      echo
805      "$ac_configure" --help
806    else
807      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
808    fi
809    cd "$ac_popdir"
810  done
811fi
812
813test -n "$ac_init_help" && exit 0
814if "$ac_init_version"; then
815  cat <<\EOF
816
817Copyright 2003-2020,2021	Thomas E. Dickey
818Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
819Free Software Foundation, Inc.
820This configure script is free software; the Free Software Foundation
821gives unlimited permission to copy, distribute and modify it.
822EOF
823  exit 0
824fi
825exec 5>config.log
826cat >&5 <<EOF
827This file contains any messages produced by compilers while
828running configure, to aid debugging if configure makes a mistake.
829
830It was created by $as_me, which was
831generated by GNU Autoconf 2.52.20210105.  Invocation command line was
832
833  $ $0 $@
834
835EOF
836{
837cat <<_ASUNAME
838## ---------- ##
839## Platform.  ##
840## ---------- ##
841
842hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
843uname -m = `(uname -m) 2>/dev/null || echo unknown`
844uname -r = `(uname -r) 2>/dev/null || echo unknown`
845uname -s = `(uname -s) 2>/dev/null || echo unknown`
846uname -v = `(uname -v) 2>/dev/null || echo unknown`
847
848/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
849/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
850
851/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
852/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
853/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
854hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
855/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
856/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
857/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
858
859PATH = $PATH
860
861_ASUNAME
862} >&5
863
864cat >&5 <<EOF
865## ------------ ##
866## Core tests.  ##
867## ------------ ##
868
869EOF
870
871# Keep a trace of the command line.
872# Strip out --no-create and --no-recursion so they do not pile up.
873# Also quote any args containing shell meta-characters.
874ac_configure_args=
875ac_sep=
876for ac_arg
877do
878  case "$ac_arg" in
879  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
880  | --no-cr | --no-c) ;;
881  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
882  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
883  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
884    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
885    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
886    ac_sep=" " ;;
887  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
888     ac_sep=" " ;;
889  esac
890  # Get rid of the leading space.
891done
892
893# When interrupted or exit'd, cleanup temporary files, and complete
894# config.log.  We remove comments because anyway the quotes in there
895# would cause problems or look ugly.
896trap 'exit_status=$?
897  # Save into config.log some information that might help in debugging.
898  echo >&5
899  echo "## ----------------- ##" >&5
900  echo "## Cache variables.  ##" >&5
901  echo "## ----------------- ##" >&5
902  echo >&5
903  # The following way of writing the cache mishandles newlines in values,
904{
905  (set) 2>&1 |
906    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
907    *ac_space=\ *)
908      sed -n \
909        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
910    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
911      ;;
912    *)
913      sed -n \
914        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
915      ;;
916    esac;
917} >&5
918  sed "/^$/d" confdefs.h >conftest.log
919  if test -s conftest.log; then
920    echo >&5
921    echo "## ------------ ##" >&5
922    echo "## confdefs.h.  ##" >&5
923    echo "## ------------ ##" >&5
924    echo >&5
925    cat conftest.log >&5
926  fi
927  (echo; echo) >&5
928  test "$ac_signal" != 0 &&
929    echo "$as_me: caught signal $ac_signal" >&5
930  echo "$as_me: exit $exit_status" >&5
931  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
932    exit $exit_status
933     ' 0
934for ac_signal in 1 2 13 15; do
935  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
936done
937ac_signal=0
938
939# confdefs.h avoids OS command line length limits that DEFS can exceed.
940rm -rf conftest* confdefs.h
941# AIX cpp loses on an empty file, so make sure it contains at least a newline.
942echo >confdefs.h
943
944# Let the site file select an alternate cache file if it wants to.
945# Prefer explicitly selected file to automatically selected ones.
946if test -z "$CONFIG_SITE"; then
947  if test "x$prefix" != xNONE; then
948    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
949  else
950    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
951  fi
952fi
953for ac_site_file in $CONFIG_SITE; do
954  if test -r "$ac_site_file"; then
955    { echo "$as_me:955: loading site script $ac_site_file" >&5
956echo "$as_me: loading site script $ac_site_file" >&6;}
957    cat "$ac_site_file" >&5
958    . "$ac_site_file"
959  fi
960done
961
962if test -r "$cache_file"; then
963  # Some versions of bash will fail to source /dev/null (special
964  # files actually), so we avoid doing that.
965  if test -f "$cache_file"; then
966    { echo "$as_me:966: loading cache $cache_file" >&5
967echo "$as_me: loading cache $cache_file" >&6;}
968    case $cache_file in
969      [\\/]* | ?:[\\/]* ) . $cache_file;;
970      *)                      . ./$cache_file;;
971    esac
972  fi
973else
974  { echo "$as_me:974: creating cache $cache_file" >&5
975echo "$as_me: creating cache $cache_file" >&6;}
976  >$cache_file
977fi
978
979# Check that the precious variables saved in the cache have kept the same
980# value.
981ac_cache_corrupted=false
982for ac_var in `(set) 2>&1 |
983               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
984  eval ac_old_set=\$ac_cv_env_${ac_var}_set
985  eval ac_new_set=\$ac_env_${ac_var}_set
986  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
987  eval ac_new_val="\$ac_env_${ac_var}_value"
988  case "$ac_old_set,$ac_new_set" in
989    set,)
990      { echo "$as_me:990: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
991echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
992      ac_cache_corrupted=: ;;
993    ,set)
994      { echo "$as_me:994: error: \`$ac_var' was not set in the previous run" >&5
995echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
996      ac_cache_corrupted=: ;;
997    ,);;
998    *)
999      if test "x$ac_old_val" != "x$ac_new_val"; then
1000        { echo "$as_me:1000: error: \`$ac_var' has changed since the previous run:" >&5
1001echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1002        { echo "$as_me:1002:   former value:  $ac_old_val" >&5
1003echo "$as_me:   former value:  $ac_old_val" >&2;}
1004        { echo "$as_me:1004:   current value: $ac_new_val" >&5
1005echo "$as_me:   current value: $ac_new_val" >&2;}
1006        ac_cache_corrupted=:
1007      fi;;
1008  esac
1009  # Pass precious variables to config.status.  It doesn't matter if
1010  # we pass some twice (in addition to the command line arguments).
1011  if test "$ac_new_set" = set; then
1012    case "$ac_new_val" in
1013    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1014      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1015      ac_configure_args="$ac_configure_args '$ac_arg'"
1016      ;;
1017    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1018       ;;
1019    esac
1020  fi
1021done
1022if "$ac_cache_corrupted"; then
1023  { echo "$as_me:1023: error: changes in the environment can compromise the build" >&5
1024echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1025  { { echo "$as_me:1025: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1026echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1027   { (exit 1); exit 1; }; }
1028fi
1029
1030ac_ext=c
1031ac_cpp='$CPP $CPPFLAGS'
1032ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1033ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1034ac_compiler_gnu=$ac_cv_c_compiler_gnu
1035ac_main_return="return"
1036
1037case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1038  *c*,-n*) ECHO_N=
1039           ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1040           ECHO_T='	'
1041           ;;
1042  *c*,*  ) ECHO_N=-n
1043           ECHO_C=
1044           ECHO_T=
1045           ;;
1046  *)       ECHO_N=
1047           ECHO_C='\c'
1048           ECHO_T=
1049           ;;
1050esac
1051echo "#! $SHELL" >conftest.sh
1052echo  "exit 0"   >>conftest.sh
1053chmod +x conftest.sh
1054if { (echo "$as_me:1054: PATH=\".;.\"; conftest.sh") >&5
1055  (PATH=".;."; conftest.sh) 2>&5
1056  ac_status=$?
1057  echo "$as_me:1057: \$? = $ac_status" >&5
1058  (exit "$ac_status"); }; then
1059  ac_path_separator=';'
1060else
1061  ac_path_separator=:
1062fi
1063PATH_SEPARATOR="$ac_path_separator"
1064rm -f conftest.sh
1065
1066ac_config_headers="$ac_config_headers dlg_config.h:config.hin"
1067
1068test "$program_prefix" != NONE &&
1069  program_transform_name="s,^,$program_prefix,;$program_transform_name"
1070# Use a double $ so make ignores it.
1071test "$program_suffix" != NONE &&
1072  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1073# Double any \ or $.  echo might interpret backslashes.
1074# By default was `s,x,x', remove it if useless.
1075cat <<\_ACEOF >conftest.sed
1076s/[\\$]/&&/g;s/;s,x,x,$//
1077_ACEOF
1078program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1079rm conftest.sed
1080
1081DESTDIR=
1082
1083ac_aux_dir=
1084for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1085  if test -f "$ac_dir/install-sh"; then
1086    ac_aux_dir=$ac_dir
1087    ac_install_sh="$ac_aux_dir/install-sh -c"
1088    break
1089  elif test -f "$ac_dir/install.sh"; then
1090    ac_aux_dir=$ac_dir
1091    ac_install_sh="$ac_aux_dir/install.sh -c"
1092    break
1093  elif test -f "$ac_dir/shtool"; then
1094    ac_aux_dir=$ac_dir
1095    ac_install_sh="$ac_aux_dir/shtool install -c"
1096    break
1097  fi
1098done
1099if test -z "$ac_aux_dir"; then
1100  { { echo "$as_me:1100: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1101echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1102   { (exit 1); exit 1; }; }
1103fi
1104ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1105ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1106ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1107
1108# Make sure we can run config.sub.
1109$ac_config_sub sun4 >/dev/null 2>&1 ||
1110  { { echo "$as_me:1110: error: cannot run $ac_config_sub" >&5
1111echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1112   { (exit 1); exit 1; }; }
1113
1114echo "$as_me:1114: checking build system type" >&5
1115echo $ECHO_N "checking build system type... $ECHO_C" >&6
1116if test "${ac_cv_build+set}" = set; then
1117  echo $ECHO_N "(cached) $ECHO_C" >&6
1118else
1119  ac_cv_build_alias=$build_alias
1120test -z "$ac_cv_build_alias" &&
1121  ac_cv_build_alias=`$ac_config_guess`
1122test -z "$ac_cv_build_alias" &&
1123  { { echo "$as_me:1123: error: cannot guess build type; you must specify one" >&5
1124echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1125   { (exit 1); exit 1; }; }
1126ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1127  { { echo "$as_me:1127: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1128echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1129   { (exit 1); exit 1; }; }
1130
1131fi
1132echo "$as_me:1132: result: $ac_cv_build" >&5
1133echo "${ECHO_T}$ac_cv_build" >&6
1134build=$ac_cv_build
1135build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1136build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1137build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1138
1139echo "$as_me:1139: checking host system type" >&5
1140echo $ECHO_N "checking host system type... $ECHO_C" >&6
1141if test "${ac_cv_host+set}" = set; then
1142  echo $ECHO_N "(cached) $ECHO_C" >&6
1143else
1144  ac_cv_host_alias=$host_alias
1145test -z "$ac_cv_host_alias" &&
1146  ac_cv_host_alias=$ac_cv_build_alias
1147ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1148  { { echo "$as_me:1148: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1149echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1150   { (exit 1); exit 1; }; }
1151
1152fi
1153echo "$as_me:1153: result: $ac_cv_host" >&5
1154echo "${ECHO_T}$ac_cv_host" >&6
1155host=$ac_cv_host
1156host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1157host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1158host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1159
1160ac_ext=c
1161ac_cpp='$CPP $CPPFLAGS'
1162ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1163ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1164ac_compiler_gnu=$ac_cv_c_compiler_gnu
1165ac_main_return="return"
1166if test -n "$ac_tool_prefix"; then
1167  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1168set dummy ${ac_tool_prefix}gcc; ac_word=$2
1169echo "$as_me:1169: checking for $ac_word" >&5
1170echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1171if test "${ac_cv_prog_CC+set}" = set; then
1172  echo $ECHO_N "(cached) $ECHO_C" >&6
1173else
1174  if test -n "$CC"; then
1175  ac_cv_prog_CC="$CC" # Let the user override the test.
1176else
1177  ac_save_IFS=$IFS; IFS=$ac_path_separator
1178ac_dummy="$PATH"
1179for ac_dir in $ac_dummy; do
1180  IFS=$ac_save_IFS
1181  test -z "$ac_dir" && ac_dir=.
1182  $as_executable_p "$ac_dir/$ac_word" || continue
1183ac_cv_prog_CC="${ac_tool_prefix}gcc"
1184echo "$as_me:1184: found $ac_dir/$ac_word" >&5
1185break
1186done
1187
1188fi
1189fi
1190CC=$ac_cv_prog_CC
1191if test -n "$CC"; then
1192  echo "$as_me:1192: result: $CC" >&5
1193echo "${ECHO_T}$CC" >&6
1194else
1195  echo "$as_me:1195: result: no" >&5
1196echo "${ECHO_T}no" >&6
1197fi
1198
1199fi
1200if test -z "$ac_cv_prog_CC"; then
1201  ac_ct_CC=$CC
1202  # Extract the first word of "gcc", so it can be a program name with args.
1203set dummy gcc; ac_word=$2
1204echo "$as_me:1204: checking for $ac_word" >&5
1205echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1206if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1207  echo $ECHO_N "(cached) $ECHO_C" >&6
1208else
1209  if test -n "$ac_ct_CC"; then
1210  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1211else
1212  ac_save_IFS=$IFS; IFS=$ac_path_separator
1213ac_dummy="$PATH"
1214for ac_dir in $ac_dummy; do
1215  IFS=$ac_save_IFS
1216  test -z "$ac_dir" && ac_dir=.
1217  $as_executable_p "$ac_dir/$ac_word" || continue
1218ac_cv_prog_ac_ct_CC="gcc"
1219echo "$as_me:1219: found $ac_dir/$ac_word" >&5
1220break
1221done
1222
1223fi
1224fi
1225ac_ct_CC=$ac_cv_prog_ac_ct_CC
1226if test -n "$ac_ct_CC"; then
1227  echo "$as_me:1227: result: $ac_ct_CC" >&5
1228echo "${ECHO_T}$ac_ct_CC" >&6
1229else
1230  echo "$as_me:1230: result: no" >&5
1231echo "${ECHO_T}no" >&6
1232fi
1233
1234  CC=$ac_ct_CC
1235else
1236  CC="$ac_cv_prog_CC"
1237fi
1238
1239if test -z "$CC"; then
1240  if test -n "$ac_tool_prefix"; then
1241  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1242set dummy ${ac_tool_prefix}cc; ac_word=$2
1243echo "$as_me:1243: checking for $ac_word" >&5
1244echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1245if test "${ac_cv_prog_CC+set}" = set; then
1246  echo $ECHO_N "(cached) $ECHO_C" >&6
1247else
1248  if test -n "$CC"; then
1249  ac_cv_prog_CC="$CC" # Let the user override the test.
1250else
1251  ac_save_IFS=$IFS; IFS=$ac_path_separator
1252ac_dummy="$PATH"
1253for ac_dir in $ac_dummy; do
1254  IFS=$ac_save_IFS
1255  test -z "$ac_dir" && ac_dir=.
1256  $as_executable_p "$ac_dir/$ac_word" || continue
1257ac_cv_prog_CC="${ac_tool_prefix}cc"
1258echo "$as_me:1258: found $ac_dir/$ac_word" >&5
1259break
1260done
1261
1262fi
1263fi
1264CC=$ac_cv_prog_CC
1265if test -n "$CC"; then
1266  echo "$as_me:1266: result: $CC" >&5
1267echo "${ECHO_T}$CC" >&6
1268else
1269  echo "$as_me:1269: result: no" >&5
1270echo "${ECHO_T}no" >&6
1271fi
1272
1273fi
1274if test -z "$ac_cv_prog_CC"; then
1275  ac_ct_CC=$CC
1276  # Extract the first word of "cc", so it can be a program name with args.
1277set dummy cc; ac_word=$2
1278echo "$as_me:1278: checking for $ac_word" >&5
1279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1280if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1281  echo $ECHO_N "(cached) $ECHO_C" >&6
1282else
1283  if test -n "$ac_ct_CC"; then
1284  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1285else
1286  ac_save_IFS=$IFS; IFS=$ac_path_separator
1287ac_dummy="$PATH"
1288for ac_dir in $ac_dummy; do
1289  IFS=$ac_save_IFS
1290  test -z "$ac_dir" && ac_dir=.
1291  $as_executable_p "$ac_dir/$ac_word" || continue
1292ac_cv_prog_ac_ct_CC="cc"
1293echo "$as_me:1293: found $ac_dir/$ac_word" >&5
1294break
1295done
1296
1297fi
1298fi
1299ac_ct_CC=$ac_cv_prog_ac_ct_CC
1300if test -n "$ac_ct_CC"; then
1301  echo "$as_me:1301: result: $ac_ct_CC" >&5
1302echo "${ECHO_T}$ac_ct_CC" >&6
1303else
1304  echo "$as_me:1304: result: no" >&5
1305echo "${ECHO_T}no" >&6
1306fi
1307
1308  CC=$ac_ct_CC
1309else
1310  CC="$ac_cv_prog_CC"
1311fi
1312
1313fi
1314if test -z "$CC"; then
1315  # Extract the first word of "cc", so it can be a program name with args.
1316set dummy cc; ac_word=$2
1317echo "$as_me:1317: checking for $ac_word" >&5
1318echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1319if test "${ac_cv_prog_CC+set}" = set; then
1320  echo $ECHO_N "(cached) $ECHO_C" >&6
1321else
1322  if test -n "$CC"; then
1323  ac_cv_prog_CC="$CC" # Let the user override the test.
1324else
1325  ac_prog_rejected=no
1326  ac_save_IFS=$IFS; IFS=$ac_path_separator
1327ac_dummy="$PATH"
1328for ac_dir in $ac_dummy; do
1329  IFS=$ac_save_IFS
1330  test -z "$ac_dir" && ac_dir=.
1331  $as_executable_p "$ac_dir/$ac_word" || continue
1332if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1333  ac_prog_rejected=yes
1334  continue
1335fi
1336ac_cv_prog_CC="cc"
1337echo "$as_me:1337: found $ac_dir/$ac_word" >&5
1338break
1339done
1340
1341if test "$ac_prog_rejected" = yes; then
1342  # We found a bogon in the path, so make sure we never use it.
1343  set dummy $ac_cv_prog_CC
1344  shift
1345  if test $# != 0; then
1346    # We chose a different compiler from the bogus one.
1347    # However, it has the same basename, so the bogon will be chosen
1348    # first if we set CC to just the basename; use the full file name.
1349    shift
1350    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1351    shift
1352    ac_cv_prog_CC="$@"
1353  fi
1354fi
1355fi
1356fi
1357CC=$ac_cv_prog_CC
1358if test -n "$CC"; then
1359  echo "$as_me:1359: result: $CC" >&5
1360echo "${ECHO_T}$CC" >&6
1361else
1362  echo "$as_me:1362: result: no" >&5
1363echo "${ECHO_T}no" >&6
1364fi
1365
1366fi
1367if test -z "$CC"; then
1368  if test -n "$ac_tool_prefix"; then
1369  for ac_prog in cl
1370  do
1371    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1372set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1373echo "$as_me:1373: checking for $ac_word" >&5
1374echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1375if test "${ac_cv_prog_CC+set}" = set; then
1376  echo $ECHO_N "(cached) $ECHO_C" >&6
1377else
1378  if test -n "$CC"; then
1379  ac_cv_prog_CC="$CC" # Let the user override the test.
1380else
1381  ac_save_IFS=$IFS; IFS=$ac_path_separator
1382ac_dummy="$PATH"
1383for ac_dir in $ac_dummy; do
1384  IFS=$ac_save_IFS
1385  test -z "$ac_dir" && ac_dir=.
1386  $as_executable_p "$ac_dir/$ac_word" || continue
1387ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1388echo "$as_me:1388: found $ac_dir/$ac_word" >&5
1389break
1390done
1391
1392fi
1393fi
1394CC=$ac_cv_prog_CC
1395if test -n "$CC"; then
1396  echo "$as_me:1396: result: $CC" >&5
1397echo "${ECHO_T}$CC" >&6
1398else
1399  echo "$as_me:1399: result: no" >&5
1400echo "${ECHO_T}no" >&6
1401fi
1402
1403    test -n "$CC" && break
1404  done
1405fi
1406if test -z "$CC"; then
1407  ac_ct_CC=$CC
1408  for ac_prog in cl
1409do
1410  # Extract the first word of "$ac_prog", so it can be a program name with args.
1411set dummy $ac_prog; ac_word=$2
1412echo "$as_me:1412: checking for $ac_word" >&5
1413echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1414if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1415  echo $ECHO_N "(cached) $ECHO_C" >&6
1416else
1417  if test -n "$ac_ct_CC"; then
1418  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1419else
1420  ac_save_IFS=$IFS; IFS=$ac_path_separator
1421ac_dummy="$PATH"
1422for ac_dir in $ac_dummy; do
1423  IFS=$ac_save_IFS
1424  test -z "$ac_dir" && ac_dir=.
1425  $as_executable_p "$ac_dir/$ac_word" || continue
1426ac_cv_prog_ac_ct_CC="$ac_prog"
1427echo "$as_me:1427: found $ac_dir/$ac_word" >&5
1428break
1429done
1430
1431fi
1432fi
1433ac_ct_CC=$ac_cv_prog_ac_ct_CC
1434if test -n "$ac_ct_CC"; then
1435  echo "$as_me:1435: result: $ac_ct_CC" >&5
1436echo "${ECHO_T}$ac_ct_CC" >&6
1437else
1438  echo "$as_me:1438: result: no" >&5
1439echo "${ECHO_T}no" >&6
1440fi
1441
1442  test -n "$ac_ct_CC" && break
1443done
1444
1445  CC=$ac_ct_CC
1446fi
1447
1448fi
1449
1450test -z "$CC" && { { echo "$as_me:1450: error: no acceptable cc found in \$PATH" >&5
1451echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1452   { (exit 1); exit 1; }; }
1453
1454# Provide some information about the compiler.
1455echo "$as_me:1455:" \
1456     "checking for C compiler version" >&5
1457ac_compiler=`set X $ac_compile; echo "$2"`
1458{ (eval echo "$as_me:1458: \"$ac_compiler --version </dev/null >&5\"") >&5
1459  (eval $ac_compiler --version </dev/null >&5) 2>&5
1460  ac_status=$?
1461  echo "$as_me:1461: \$? = $ac_status" >&5
1462  (exit "$ac_status"); }
1463{ (eval echo "$as_me:1463: \"$ac_compiler -v </dev/null >&5\"") >&5
1464  (eval $ac_compiler -v </dev/null >&5) 2>&5
1465  ac_status=$?
1466  echo "$as_me:1466: \$? = $ac_status" >&5
1467  (exit "$ac_status"); }
1468{ (eval echo "$as_me:1468: \"$ac_compiler -V </dev/null >&5\"") >&5
1469  (eval $ac_compiler -V </dev/null >&5) 2>&5
1470  ac_status=$?
1471  echo "$as_me:1471: \$? = $ac_status" >&5
1472  (exit "$ac_status"); }
1473
1474cat >"conftest.$ac_ext" <<_ACEOF
1475#line 1475 "configure"
1476#include "confdefs.h"
1477
1478int
1479main (void)
1480{
1481
1482  ;
1483  return 0;
1484}
1485_ACEOF
1486ac_clean_files_save=$ac_clean_files
1487ac_clean_files="$ac_clean_files a.out a.exe"
1488# Try to create an executable without -o first, disregard a.out.
1489# It will help us diagnose broken compilers, and finding out an intuition
1490# of exeext.
1491echo "$as_me:1491: checking for C compiler default output" >&5
1492echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1493ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1494if { (eval echo "$as_me:1494: \"$ac_link_default\"") >&5
1495  (eval $ac_link_default) 2>&5
1496  ac_status=$?
1497  echo "$as_me:1497: \$? = $ac_status" >&5
1498  (exit "$ac_status"); }; then
1499  # Find the output, starting from the most likely.  This scheme is
1500# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1501# resort.
1502for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1503                ls a.out conftest 2>/dev/null;
1504                ls a.* conftest.* 2>/dev/null`; do
1505  case $ac_file in
1506    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1507    a.out ) # We found the default executable, but exeext='' is most
1508            # certainly right.
1509            break;;
1510    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1511          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1512          export ac_cv_exeext
1513          break;;
1514    * ) break;;
1515  esac
1516done
1517else
1518  echo "$as_me: failed program was:" >&5
1519cat "conftest.$ac_ext" >&5
1520{ { echo "$as_me:1520: error: C compiler cannot create executables" >&5
1521echo "$as_me: error: C compiler cannot create executables" >&2;}
1522   { (exit 77); exit 77; }; }
1523fi
1524
1525ac_exeext=$ac_cv_exeext
1526echo "$as_me:1526: result: $ac_file" >&5
1527echo "${ECHO_T}$ac_file" >&6
1528
1529# Check the compiler produces executables we can run.  If not, either
1530# the compiler is broken, or we cross compile.
1531echo "$as_me:1531: checking whether the C compiler works" >&5
1532echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1533# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1534# If not cross compiling, check that we can run a simple program.
1535if test "$cross_compiling" != yes; then
1536  if { ac_try='./$ac_file'
1537  { (eval echo "$as_me:1537: \"$ac_try\"") >&5
1538  (eval $ac_try) 2>&5
1539  ac_status=$?
1540  echo "$as_me:1540: \$? = $ac_status" >&5
1541  (exit "$ac_status"); }; }; then
1542    cross_compiling=no
1543  else
1544    if test "$cross_compiling" = maybe; then
1545	cross_compiling=yes
1546    else
1547	{ { echo "$as_me:1547: error: cannot run C compiled programs.
1548If you meant to cross compile, use \`--host'." >&5
1549echo "$as_me: error: cannot run C compiled programs.
1550If you meant to cross compile, use \`--host'." >&2;}
1551   { (exit 1); exit 1; }; }
1552    fi
1553  fi
1554fi
1555echo "$as_me:1555: result: yes" >&5
1556echo "${ECHO_T}yes" >&6
1557
1558rm -f a.out a.exe "conftest$ac_cv_exeext"
1559ac_clean_files=$ac_clean_files_save
1560# Check the compiler produces executables we can run.  If not, either
1561# the compiler is broken, or we cross compile.
1562echo "$as_me:1562: checking whether we are cross compiling" >&5
1563echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1564echo "$as_me:1564: result: $cross_compiling" >&5
1565echo "${ECHO_T}$cross_compiling" >&6
1566
1567echo "$as_me:1567: checking for executable suffix" >&5
1568echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1569if { (eval echo "$as_me:1569: \"$ac_link\"") >&5
1570  (eval $ac_link) 2>&5
1571  ac_status=$?
1572  echo "$as_me:1572: \$? = $ac_status" >&5
1573  (exit "$ac_status"); }; then
1574  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1575# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1576# work properly (i.e., refer to `conftest.exe'), while it won't with
1577# `rm'.
1578for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1579  case $ac_file in
1580    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1581    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1582          export ac_cv_exeext
1583          break;;
1584    * ) break;;
1585  esac
1586done
1587else
1588  { { echo "$as_me:1588: error: cannot compute EXEEXT: cannot compile and link" >&5
1589echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1590   { (exit 1); exit 1; }; }
1591fi
1592
1593rm -f "conftest$ac_cv_exeext"
1594echo "$as_me:1594: result: $ac_cv_exeext" >&5
1595echo "${ECHO_T}$ac_cv_exeext" >&6
1596
1597rm -f "conftest.$ac_ext"
1598EXEEXT=$ac_cv_exeext
1599ac_exeext=$EXEEXT
1600echo "$as_me:1600: checking for object suffix" >&5
1601echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1602if test "${ac_cv_objext+set}" = set; then
1603  echo $ECHO_N "(cached) $ECHO_C" >&6
1604else
1605  cat >"conftest.$ac_ext" <<_ACEOF
1606#line 1606 "configure"
1607#include "confdefs.h"
1608
1609int
1610main (void)
1611{
1612
1613  ;
1614  return 0;
1615}
1616_ACEOF
1617rm -f conftest.o conftest.obj
1618if { (eval echo "$as_me:1618: \"$ac_compile\"") >&5
1619  (eval $ac_compile) 2>&5
1620  ac_status=$?
1621  echo "$as_me:1621: \$? = $ac_status" >&5
1622  (exit "$ac_status"); }; then
1623  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1624  case $ac_file in
1625    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1626    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1627       break;;
1628  esac
1629done
1630else
1631  echo "$as_me: failed program was:" >&5
1632cat "conftest.$ac_ext" >&5
1633{ { echo "$as_me:1633: error: cannot compute OBJEXT: cannot compile" >&5
1634echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1635   { (exit 1); exit 1; }; }
1636fi
1637
1638rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1639fi
1640echo "$as_me:1640: result: $ac_cv_objext" >&5
1641echo "${ECHO_T}$ac_cv_objext" >&6
1642OBJEXT=$ac_cv_objext
1643ac_objext=$OBJEXT
1644echo "$as_me:1644: checking whether we are using the GNU C compiler" >&5
1645echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1646if test "${ac_cv_c_compiler_gnu+set}" = set; then
1647  echo $ECHO_N "(cached) $ECHO_C" >&6
1648else
1649  cat >"conftest.$ac_ext" <<_ACEOF
1650#line 1650 "configure"
1651#include "confdefs.h"
1652
1653int
1654main (void)
1655{
1656#ifndef __GNUC__
1657       choke me
1658#endif
1659
1660  ;
1661  return 0;
1662}
1663_ACEOF
1664rm -f "conftest.$ac_objext"
1665if { (eval echo "$as_me:1665: \"$ac_compile\"") >&5
1666  (eval $ac_compile) 2>&5
1667  ac_status=$?
1668  echo "$as_me:1668: \$? = $ac_status" >&5
1669  (exit "$ac_status"); } &&
1670         { ac_try='test -s "conftest.$ac_objext"'
1671  { (eval echo "$as_me:1671: \"$ac_try\"") >&5
1672  (eval $ac_try) 2>&5
1673  ac_status=$?
1674  echo "$as_me:1674: \$? = $ac_status" >&5
1675  (exit "$ac_status"); }; }; then
1676  ac_compiler_gnu=yes
1677else
1678  echo "$as_me: failed program was:" >&5
1679cat "conftest.$ac_ext" >&5
1680ac_compiler_gnu=no
1681fi
1682rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1683ac_cv_c_compiler_gnu=$ac_compiler_gnu
1684
1685fi
1686echo "$as_me:1686: result: $ac_cv_c_compiler_gnu" >&5
1687echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1688GCC=`test $ac_compiler_gnu = yes && echo yes`
1689ac_test_CFLAGS=${CFLAGS+set}
1690ac_save_CFLAGS=$CFLAGS
1691CFLAGS="-g"
1692echo "$as_me:1692: checking whether $CC accepts -g" >&5
1693echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1694if test "${ac_cv_prog_cc_g+set}" = set; then
1695  echo $ECHO_N "(cached) $ECHO_C" >&6
1696else
1697  cat >"conftest.$ac_ext" <<_ACEOF
1698#line 1698 "configure"
1699#include "confdefs.h"
1700
1701int
1702main (void)
1703{
1704
1705  ;
1706  return 0;
1707}
1708_ACEOF
1709rm -f "conftest.$ac_objext"
1710if { (eval echo "$as_me:1710: \"$ac_compile\"") >&5
1711  (eval $ac_compile) 2>&5
1712  ac_status=$?
1713  echo "$as_me:1713: \$? = $ac_status" >&5
1714  (exit "$ac_status"); } &&
1715         { ac_try='test -s "conftest.$ac_objext"'
1716  { (eval echo "$as_me:1716: \"$ac_try\"") >&5
1717  (eval $ac_try) 2>&5
1718  ac_status=$?
1719  echo "$as_me:1719: \$? = $ac_status" >&5
1720  (exit "$ac_status"); }; }; then
1721  ac_cv_prog_cc_g=yes
1722else
1723  echo "$as_me: failed program was:" >&5
1724cat "conftest.$ac_ext" >&5
1725ac_cv_prog_cc_g=no
1726fi
1727rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1728fi
1729echo "$as_me:1729: result: $ac_cv_prog_cc_g" >&5
1730echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1731if test "$ac_test_CFLAGS" = set; then
1732  CFLAGS=$ac_save_CFLAGS
1733elif test $ac_cv_prog_cc_g = yes; then
1734  if test "$GCC" = yes; then
1735    CFLAGS="-g -O2"
1736  else
1737    CFLAGS="-g"
1738  fi
1739else
1740  if test "$GCC" = yes; then
1741    CFLAGS="-O2"
1742  else
1743    CFLAGS=
1744  fi
1745fi
1746# Some people use a C++ compiler to compile C.  Since we use `exit',
1747# in C++ we need to declare it.  In case someone uses the same compiler
1748# for both compiling C and C++ we need to have the C++ compiler decide
1749# the declaration of exit, since it's the most demanding environment.
1750cat >"conftest.$ac_ext" <<_ACEOF
1751#ifndef __cplusplus
1752  choke me
1753#endif
1754_ACEOF
1755rm -f "conftest.$ac_objext"
1756if { (eval echo "$as_me:1756: \"$ac_compile\"") >&5
1757  (eval $ac_compile) 2>&5
1758  ac_status=$?
1759  echo "$as_me:1759: \$? = $ac_status" >&5
1760  (exit "$ac_status"); } &&
1761         { ac_try='test -s "conftest.$ac_objext"'
1762  { (eval echo "$as_me:1762: \"$ac_try\"") >&5
1763  (eval $ac_try) 2>&5
1764  ac_status=$?
1765  echo "$as_me:1765: \$? = $ac_status" >&5
1766  (exit "$ac_status"); }; }; then
1767  for ac_declaration in \
1768   ''\
1769   '#include <stdlib.h>' \
1770   'extern "C" void std::exit (int) throw (); using std::exit;' \
1771   'extern "C" void std::exit (int); using std::exit;' \
1772   'extern "C" void exit (int) throw ();' \
1773   'extern "C" void exit (int);' \
1774   'void exit (int);'
1775do
1776  cat >"conftest.$ac_ext" <<_ACEOF
1777#line 1777 "configure"
1778#include "confdefs.h"
1779#include <stdlib.h>
1780$ac_declaration
1781int
1782main (void)
1783{
1784exit (42);
1785  ;
1786  return 0;
1787}
1788_ACEOF
1789rm -f "conftest.$ac_objext"
1790if { (eval echo "$as_me:1790: \"$ac_compile\"") >&5
1791  (eval $ac_compile) 2>&5
1792  ac_status=$?
1793  echo "$as_me:1793: \$? = $ac_status" >&5
1794  (exit "$ac_status"); } &&
1795         { ac_try='test -s "conftest.$ac_objext"'
1796  { (eval echo "$as_me:1796: \"$ac_try\"") >&5
1797  (eval $ac_try) 2>&5
1798  ac_status=$?
1799  echo "$as_me:1799: \$? = $ac_status" >&5
1800  (exit "$ac_status"); }; }; then
1801  :
1802else
1803  echo "$as_me: failed program was:" >&5
1804cat "conftest.$ac_ext" >&5
1805continue
1806fi
1807rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1808  cat >"conftest.$ac_ext" <<_ACEOF
1809#line 1809 "configure"
1810#include "confdefs.h"
1811$ac_declaration
1812int
1813main (void)
1814{
1815exit (42);
1816  ;
1817  return 0;
1818}
1819_ACEOF
1820rm -f "conftest.$ac_objext"
1821if { (eval echo "$as_me:1821: \"$ac_compile\"") >&5
1822  (eval $ac_compile) 2>&5
1823  ac_status=$?
1824  echo "$as_me:1824: \$? = $ac_status" >&5
1825  (exit "$ac_status"); } &&
1826         { ac_try='test -s "conftest.$ac_objext"'
1827  { (eval echo "$as_me:1827: \"$ac_try\"") >&5
1828  (eval $ac_try) 2>&5
1829  ac_status=$?
1830  echo "$as_me:1830: \$? = $ac_status" >&5
1831  (exit "$ac_status"); }; }; then
1832  break
1833else
1834  echo "$as_me: failed program was:" >&5
1835cat "conftest.$ac_ext" >&5
1836fi
1837rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1838done
1839rm -rf conftest*
1840if test -n "$ac_declaration"; then
1841  echo '#ifdef __cplusplus' >>confdefs.h
1842  echo "$ac_declaration"    >>confdefs.h
1843  echo '#endif'             >>confdefs.h
1844fi
1845
1846else
1847  echo "$as_me: failed program was:" >&5
1848cat "conftest.$ac_ext" >&5
1849fi
1850rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1851ac_ext=c
1852ac_cpp='$CPP $CPPFLAGS'
1853ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1854ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1855ac_compiler_gnu=$ac_cv_c_compiler_gnu
1856ac_main_return="return"
1857
1858GCC_VERSION=none
1859if test "$GCC" = yes ; then
1860	echo "$as_me:1860: checking version of $CC" >&5
1861echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1862	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.].*//'`"
1863	test -z "$GCC_VERSION" && GCC_VERSION=unknown
1864	echo "$as_me:1864: result: $GCC_VERSION" >&5
1865echo "${ECHO_T}$GCC_VERSION" >&6
1866fi
1867
1868INTEL_COMPILER=no
1869
1870if test "$GCC" = yes ; then
1871	case "$host_os" in
1872	(linux*|gnu*)
1873		echo "$as_me:1873: checking if this is really Intel C compiler" >&5
1874echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1875		cf_save_CFLAGS="$CFLAGS"
1876		CFLAGS="$CFLAGS -no-gcc"
1877		cat >"conftest.$ac_ext" <<_ACEOF
1878#line 1878 "configure"
1879#include "confdefs.h"
1880
1881int
1882main (void)
1883{
1884
1885#ifdef __INTEL_COMPILER
1886#else
1887make an error
1888#endif
1889
1890  ;
1891  return 0;
1892}
1893_ACEOF
1894rm -f "conftest.$ac_objext"
1895if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
1896  (eval $ac_compile) 2>&5
1897  ac_status=$?
1898  echo "$as_me:1898: \$? = $ac_status" >&5
1899  (exit "$ac_status"); } &&
1900         { ac_try='test -s "conftest.$ac_objext"'
1901  { (eval echo "$as_me:1901: \"$ac_try\"") >&5
1902  (eval $ac_try) 2>&5
1903  ac_status=$?
1904  echo "$as_me:1904: \$? = $ac_status" >&5
1905  (exit "$ac_status"); }; }; then
1906  INTEL_COMPILER=yes
1907cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1908
1909else
1910  echo "$as_me: failed program was:" >&5
1911cat "conftest.$ac_ext" >&5
1912fi
1913rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1914		CFLAGS="$cf_save_CFLAGS"
1915		echo "$as_me:1915: result: $INTEL_COMPILER" >&5
1916echo "${ECHO_T}$INTEL_COMPILER" >&6
1917		;;
1918	esac
1919fi
1920
1921CLANG_COMPILER=no
1922
1923if test "$GCC" = yes ; then
1924	echo "$as_me:1924: checking if this is really Clang C compiler" >&5
1925echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1926	cf_save_CFLAGS="$CFLAGS"
1927	cat >"conftest.$ac_ext" <<_ACEOF
1928#line 1928 "configure"
1929#include "confdefs.h"
1930
1931int
1932main (void)
1933{
1934
1935#ifdef __clang__
1936#else
1937make an error
1938#endif
1939
1940  ;
1941  return 0;
1942}
1943_ACEOF
1944rm -f "conftest.$ac_objext"
1945if { (eval echo "$as_me:1945: \"$ac_compile\"") >&5
1946  (eval $ac_compile) 2>&5
1947  ac_status=$?
1948  echo "$as_me:1948: \$? = $ac_status" >&5
1949  (exit "$ac_status"); } &&
1950         { ac_try='test -s "conftest.$ac_objext"'
1951  { (eval echo "$as_me:1951: \"$ac_try\"") >&5
1952  (eval $ac_try) 2>&5
1953  ac_status=$?
1954  echo "$as_me:1954: \$? = $ac_status" >&5
1955  (exit "$ac_status"); }; }; then
1956  CLANG_COMPILER=yes
1957
1958else
1959  echo "$as_me: failed program was:" >&5
1960cat "conftest.$ac_ext" >&5
1961fi
1962rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1963	CFLAGS="$cf_save_CFLAGS"
1964	echo "$as_me:1964: result: $CLANG_COMPILER" >&5
1965echo "${ECHO_T}$CLANG_COMPILER" >&6
1966fi
1967
1968CLANG_VERSION=none
1969
1970if test "x$CLANG_COMPILER" = "xyes" ; then
1971	case "$CC" in
1972	(c[1-9][0-9]|*/c[1-9][0-9])
1973		{ echo "$as_me:1973: WARNING: replacing broken compiler alias $CC" >&5
1974echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1975		CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1976		CC=clang
1977		;;
1978	esac
1979
1980	echo "$as_me:1980: checking version of $CC" >&5
1981echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1982	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.].*//'`"
1983	test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1984	echo "$as_me:1984: result: $CLANG_VERSION" >&5
1985echo "${ECHO_T}$CLANG_VERSION" >&6
1986
1987	for cf_clang_opt in \
1988		-Qunused-arguments \
1989		-Wno-error=implicit-function-declaration
1990	do
1991		echo "$as_me:1991: checking if option $cf_clang_opt works" >&5
1992echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1993		cf_save_CFLAGS="$CFLAGS"
1994		CFLAGS="$CFLAGS $cf_clang_opt"
1995		cat >"conftest.$ac_ext" <<_ACEOF
1996#line 1996 "configure"
1997#include "confdefs.h"
1998
1999			#include <stdio.h>
2000int
2001main (void)
2002{
2003
2004			printf("hello!\\n");
2005  ;
2006  return 0;
2007}
2008_ACEOF
2009rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2010if { (eval echo "$as_me:2010: \"$ac_link\"") >&5
2011  (eval $ac_link) 2>&5
2012  ac_status=$?
2013  echo "$as_me:2013: \$? = $ac_status" >&5
2014  (exit "$ac_status"); } &&
2015         { ac_try='test -s "conftest$ac_exeext"'
2016  { (eval echo "$as_me:2016: \"$ac_try\"") >&5
2017  (eval $ac_try) 2>&5
2018  ac_status=$?
2019  echo "$as_me:2019: \$? = $ac_status" >&5
2020  (exit "$ac_status"); }; }; then
2021
2022			cf_clang_optok=yes
2023else
2024  echo "$as_me: failed program was:" >&5
2025cat "conftest.$ac_ext" >&5
2026
2027			cf_clang_optok=no
2028fi
2029rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2030		echo "$as_me:2030: result: $cf_clang_optok" >&5
2031echo "${ECHO_T}$cf_clang_optok" >&6
2032		CFLAGS="$cf_save_CFLAGS"
2033		if test "$cf_clang_optok" = yes; then
2034			test -n "$verbose" && echo "	adding option $cf_clang_opt" 1>&6
2035
2036echo "${as_me:-configure}:2036: testing adding option $cf_clang_opt ..." 1>&5
2037
2038	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2039	CFLAGS="${CFLAGS}$cf_clang_opt"
2040
2041		fi
2042	done
2043fi
2044
2045echo "$as_me:2045: checking for $CC option to accept ANSI C" >&5
2046echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2047if test "${ac_cv_prog_cc_stdc+set}" = set; then
2048  echo $ECHO_N "(cached) $ECHO_C" >&6
2049else
2050  ac_cv_prog_cc_stdc=no
2051ac_save_CC=$CC
2052cat >"conftest.$ac_ext" <<_ACEOF
2053#line 2053 "configure"
2054#include "confdefs.h"
2055#include <stdarg.h>
2056#include <stdio.h>
2057#include <sys/types.h>
2058#include <sys/stat.h>
2059/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2060struct buf { int x; };
2061FILE * (*rcsopen) (struct buf *, struct stat *, int);
2062static char *e (p, i)
2063     char **p;
2064     int i;
2065{
2066  return p[i];
2067}
2068static char *f (char * (*g) (char **, int), char **p, ...)
2069{
2070  char *s;
2071  va_list v;
2072  va_start (v,p);
2073  s = g (p, va_arg (v,int));
2074  va_end (v);
2075  return s;
2076}
2077int test (int i, double x);
2078struct s1 {int (*f) (int a);};
2079struct s2 {int (*f) (double a);};
2080int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2081int argc;
2082char **argv;
2083int
2084main (void)
2085{
2086return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2087  ;
2088  return 0;
2089}
2090_ACEOF
2091# Don't try gcc -ansi; that turns off useful extensions and
2092# breaks some systems' header files.
2093# AIX			-qlanglvl=ansi
2094# Ultrix and OSF/1	-std1
2095# HP-UX 10.20 and later	-Ae
2096# HP-UX older versions	-Aa -D_HPUX_SOURCE
2097# SVR4			-Xc -D__EXTENSIONS__
2098for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2099do
2100  CC="$ac_save_CC $ac_arg"
2101  rm -f "conftest.$ac_objext"
2102if { (eval echo "$as_me:2102: \"$ac_compile\"") >&5
2103  (eval $ac_compile) 2>&5
2104  ac_status=$?
2105  echo "$as_me:2105: \$? = $ac_status" >&5
2106  (exit "$ac_status"); } &&
2107         { ac_try='test -s "conftest.$ac_objext"'
2108  { (eval echo "$as_me:2108: \"$ac_try\"") >&5
2109  (eval $ac_try) 2>&5
2110  ac_status=$?
2111  echo "$as_me:2111: \$? = $ac_status" >&5
2112  (exit "$ac_status"); }; }; then
2113  ac_cv_prog_cc_stdc=$ac_arg
2114break
2115else
2116  echo "$as_me: failed program was:" >&5
2117cat "conftest.$ac_ext" >&5
2118fi
2119rm -f "conftest.$ac_objext"
2120done
2121rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2122CC=$ac_save_CC
2123
2124fi
2125
2126case "x$ac_cv_prog_cc_stdc" in
2127  x|xno)
2128    echo "$as_me:2128: result: none needed" >&5
2129echo "${ECHO_T}none needed" >&6 ;;
2130  *)
2131    echo "$as_me:2131: result: $ac_cv_prog_cc_stdc" >&5
2132echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2133    CC="$CC $ac_cv_prog_cc_stdc" ;;
2134esac
2135
2136# This should have been defined by AC_PROG_CC
2137: "${CC:=cc}"
2138
2139echo "$as_me:2139: checking \$CFLAGS variable" >&5
2140echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2141case "x$CFLAGS" in
2142(*-[IUD]*)
2143	echo "$as_me:2143: result: broken" >&5
2144echo "${ECHO_T}broken" >&6
2145	{ echo "$as_me:2145: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2146echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2147	cf_flags="$CFLAGS"
2148	CFLAGS=
2149	for cf_arg in $cf_flags
2150	do
2151
2152cf_fix_cppflags=no
2153cf_new_cflags=
2154cf_new_cppflags=
2155cf_new_extra_cppflags=
2156
2157for cf_add_cflags in $cf_arg
2158do
2159case "$cf_fix_cppflags" in
2160(no)
2161	case "$cf_add_cflags" in
2162	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2163		case "$cf_add_cflags" in
2164		(-D*)
2165			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2166
2167			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2168				&& test -z "${cf_tst_cflags}" \
2169				&& cf_fix_cppflags=yes
2170
2171			if test "$cf_fix_cppflags" = yes ; then
2172
2173	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2174	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2175
2176				continue
2177			elif test "${cf_tst_cflags}" = "\"'" ; then
2178
2179	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2180	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2181
2182				continue
2183			fi
2184			;;
2185		esac
2186		case "$CPPFLAGS" in
2187		(*$cf_add_cflags)
2188			;;
2189		(*)
2190			case "$cf_add_cflags" in
2191			(-D*)
2192				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2193
2194CPPFLAGS=`echo "$CPPFLAGS" | \
2195	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2196		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2197
2198				;;
2199			esac
2200
2201	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2202	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2203
2204			;;
2205		esac
2206		;;
2207	(*)
2208
2209	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2210	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2211
2212		;;
2213	esac
2214	;;
2215(yes)
2216
2217	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2218	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2219
2220	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2221
2222	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2223		&& test -z "${cf_tst_cflags}" \
2224		&& cf_fix_cppflags=no
2225	;;
2226esac
2227done
2228
2229if test -n "$cf_new_cflags" ; then
2230
2231	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2232	CFLAGS="${CFLAGS}$cf_new_cflags"
2233
2234fi
2235
2236if test -n "$cf_new_cppflags" ; then
2237
2238	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2239	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2240
2241fi
2242
2243if test -n "$cf_new_extra_cppflags" ; then
2244
2245	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2246	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2247
2248fi
2249
2250	done
2251	;;
2252(*)
2253	echo "$as_me:2253: result: ok" >&5
2254echo "${ECHO_T}ok" >&6
2255	;;
2256esac
2257
2258echo "$as_me:2258: checking \$CC variable" >&5
2259echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2260case "$CC" in
2261(*[\ \	]-*)
2262	echo "$as_me:2262: result: broken" >&5
2263echo "${ECHO_T}broken" >&6
2264	{ echo "$as_me:2264: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2265echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2266	# humor him...
2267	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2268	cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2269	CC="$cf_prog"
2270	for cf_arg in $cf_flags
2271	do
2272		case "x$cf_arg" in
2273		(x-[IUDfgOW]*)
2274
2275cf_fix_cppflags=no
2276cf_new_cflags=
2277cf_new_cppflags=
2278cf_new_extra_cppflags=
2279
2280for cf_add_cflags in $cf_arg
2281do
2282case "$cf_fix_cppflags" in
2283(no)
2284	case "$cf_add_cflags" in
2285	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2286		case "$cf_add_cflags" in
2287		(-D*)
2288			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2289
2290			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2291				&& test -z "${cf_tst_cflags}" \
2292				&& cf_fix_cppflags=yes
2293
2294			if test "$cf_fix_cppflags" = yes ; then
2295
2296	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2297	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2298
2299				continue
2300			elif test "${cf_tst_cflags}" = "\"'" ; then
2301
2302	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2303	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2304
2305				continue
2306			fi
2307			;;
2308		esac
2309		case "$CPPFLAGS" in
2310		(*$cf_add_cflags)
2311			;;
2312		(*)
2313			case "$cf_add_cflags" in
2314			(-D*)
2315				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2316
2317CPPFLAGS=`echo "$CPPFLAGS" | \
2318	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2319		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2320
2321				;;
2322			esac
2323
2324	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2325	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2326
2327			;;
2328		esac
2329		;;
2330	(*)
2331
2332	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2333	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2334
2335		;;
2336	esac
2337	;;
2338(yes)
2339
2340	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2341	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2342
2343	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2344
2345	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2346		&& test -z "${cf_tst_cflags}" \
2347		&& cf_fix_cppflags=no
2348	;;
2349esac
2350done
2351
2352if test -n "$cf_new_cflags" ; then
2353
2354	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2355	CFLAGS="${CFLAGS}$cf_new_cflags"
2356
2357fi
2358
2359if test -n "$cf_new_cppflags" ; then
2360
2361	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2362	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2363
2364fi
2365
2366if test -n "$cf_new_extra_cppflags" ; then
2367
2368	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2369	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2370
2371fi
2372
2373			;;
2374		(*)
2375			CC="$CC $cf_arg"
2376			;;
2377		esac
2378	done
2379	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
2380
2381echo "${as_me:-configure}:2381: testing resulting CC: '$CC' ..." 1>&5
2382
2383	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
2384
2385echo "${as_me:-configure}:2385: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2386
2387	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2388
2389echo "${as_me:-configure}:2389: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2390
2391	;;
2392(*)
2393	echo "$as_me:2393: result: ok" >&5
2394echo "${ECHO_T}ok" >&6
2395	;;
2396esac
2397
2398for ac_prog in ggrep grep
2399do
2400  # Extract the first word of "$ac_prog", so it can be a program name with args.
2401set dummy $ac_prog; ac_word=$2
2402echo "$as_me:2402: checking for $ac_word" >&5
2403echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404if test "${ac_cv_prog_GREP+set}" = set; then
2405  echo $ECHO_N "(cached) $ECHO_C" >&6
2406else
2407  if test -n "$GREP"; then
2408  ac_cv_prog_GREP="$GREP" # Let the user override the test.
2409else
2410  ac_save_IFS=$IFS; IFS=$ac_path_separator
2411ac_dummy="$PATH"
2412for ac_dir in $ac_dummy; do
2413  IFS=$ac_save_IFS
2414  test -z "$ac_dir" && ac_dir=.
2415  $as_executable_p "$ac_dir/$ac_word" || continue
2416ac_cv_prog_GREP="$ac_prog"
2417echo "$as_me:2417: found $ac_dir/$ac_word" >&5
2418break
2419done
2420
2421fi
2422fi
2423GREP=$ac_cv_prog_GREP
2424if test -n "$GREP"; then
2425  echo "$as_me:2425: result: $GREP" >&5
2426echo "${ECHO_T}$GREP" >&6
2427else
2428  echo "$as_me:2428: result: no" >&5
2429echo "${ECHO_T}no" >&6
2430fi
2431
2432  test -n "$GREP" && break
2433done
2434test -n "$GREP" || GREP=": "
2435
2436echo "$as_me:2436: checking for egrep" >&5
2437echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2438if test "${ac_cv_path_EGREP+set}" = set; then
2439  echo $ECHO_N "(cached) $ECHO_C" >&6
2440else
2441  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2442   then ac_cv_path_EGREP="$GREP -E"
2443   else
2444     for ac_prog in gegrep egrep
2445do
2446  # Extract the first word of "$ac_prog", so it can be a program name with args.
2447set dummy $ac_prog; ac_word=$2
2448echo "$as_me:2448: checking for $ac_word" >&5
2449echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2450if test "${ac_cv_path_EGREP+set}" = set; then
2451  echo $ECHO_N "(cached) $ECHO_C" >&6
2452else
2453  case $EGREP in
2454  [\\/]* | ?:[\\/]*)
2455  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2456  ;;
2457  *)
2458  ac_save_IFS=$IFS; IFS=$ac_path_separator
2459ac_dummy="$PATH"
2460for ac_dir in $ac_dummy; do
2461  IFS=$ac_save_IFS
2462  test -z "$ac_dir" && ac_dir=.
2463  if $as_executable_p "$ac_dir/$ac_word"; then
2464   ac_cv_path_EGREP="$ac_dir/$ac_word"
2465   echo "$as_me:2465: found $ac_dir/$ac_word" >&5
2466   break
2467fi
2468done
2469
2470  ;;
2471esac
2472fi
2473EGREP=$ac_cv_path_EGREP
2474
2475if test -n "$EGREP"; then
2476  echo "$as_me:2476: result: $EGREP" >&5
2477echo "${ECHO_T}$EGREP" >&6
2478else
2479  echo "$as_me:2479: result: no" >&5
2480echo "${ECHO_T}no" >&6
2481fi
2482
2483  test -n "$EGREP" && break
2484done
2485test -n "$EGREP" || EGREP=": "
2486
2487     test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2487: error: cannot find workable egrep" >&5
2488echo "$as_me: error: cannot find workable egrep" >&2;}
2489   { (exit 1); exit 1; }; }
2490   fi
2491fi
2492echo "$as_me:2492: result: $ac_cv_path_EGREP" >&5
2493echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2494 EGREP="$ac_cv_path_EGREP"
2495
2496ac_ext=c
2497ac_cpp='$CPP $CPPFLAGS'
2498ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2499ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2500ac_compiler_gnu=$ac_cv_c_compiler_gnu
2501ac_main_return="return"
2502echo "$as_me:2502: checking how to run the C preprocessor" >&5
2503echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2504# On Suns, sometimes $CPP names a directory.
2505if test -n "$CPP" && test -d "$CPP"; then
2506  CPP=
2507fi
2508if test -z "$CPP"; then
2509  if test "${ac_cv_prog_CPP+set}" = set; then
2510  echo $ECHO_N "(cached) $ECHO_C" >&6
2511else
2512      # Double quotes because CPP needs to be expanded
2513    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2514    do
2515      ac_preproc_ok=false
2516for ac_c_preproc_warn_flag in '' yes
2517do
2518  # Use a header file that comes with gcc, so configuring glibc
2519  # with a fresh cross-compiler works.
2520  # On the NeXT, cc -E runs the code through the compiler's parser,
2521  # not just through cpp. "Syntax error" is here to catch this case.
2522  cat >"conftest.$ac_ext" <<_ACEOF
2523#line 2523 "configure"
2524#include "confdefs.h"
2525#include <assert.h>
2526                     Syntax error
2527_ACEOF
2528if { (eval echo "$as_me:2528: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2529  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2530  ac_status=$?
2531  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2532  rm -f conftest.er1
2533  cat conftest.err >&5
2534  echo "$as_me:2534: \$? = $ac_status" >&5
2535  (exit "$ac_status"); } >/dev/null; then
2536  if test -s conftest.err; then
2537    ac_cpp_err=$ac_c_preproc_warn_flag
2538  else
2539    ac_cpp_err=
2540  fi
2541else
2542  ac_cpp_err=yes
2543fi
2544if test -z "$ac_cpp_err"; then
2545  :
2546else
2547  echo "$as_me: failed program was:" >&5
2548  cat "conftest.$ac_ext" >&5
2549  # Broken: fails on valid input.
2550continue
2551fi
2552rm -f conftest.err "conftest.$ac_ext"
2553
2554  # OK, works on sane cases.  Now check whether non-existent headers
2555  # can be detected and how.
2556  cat >"conftest.$ac_ext" <<_ACEOF
2557#line 2557 "configure"
2558#include "confdefs.h"
2559#include <ac_nonexistent.h>
2560_ACEOF
2561if { (eval echo "$as_me:2561: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2562  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2563  ac_status=$?
2564  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2565  rm -f conftest.er1
2566  cat conftest.err >&5
2567  echo "$as_me:2567: \$? = $ac_status" >&5
2568  (exit "$ac_status"); } >/dev/null; then
2569  if test -s conftest.err; then
2570    ac_cpp_err=$ac_c_preproc_warn_flag
2571  else
2572    ac_cpp_err=
2573  fi
2574else
2575  ac_cpp_err=yes
2576fi
2577if test -z "$ac_cpp_err"; then
2578  # Broken: success on invalid input.
2579continue
2580else
2581  echo "$as_me: failed program was:" >&5
2582  cat "conftest.$ac_ext" >&5
2583  # Passes both tests.
2584ac_preproc_ok=:
2585break
2586fi
2587rm -f conftest.err "conftest.$ac_ext"
2588
2589done
2590# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2591rm -f conftest.err "conftest.$ac_ext"
2592if $ac_preproc_ok; then
2593  break
2594fi
2595
2596    done
2597    ac_cv_prog_CPP=$CPP
2598
2599fi
2600  CPP=$ac_cv_prog_CPP
2601else
2602  ac_cv_prog_CPP=$CPP
2603fi
2604echo "$as_me:2604: result: $CPP" >&5
2605echo "${ECHO_T}$CPP" >&6
2606ac_preproc_ok=false
2607for ac_c_preproc_warn_flag in '' yes
2608do
2609  # Use a header file that comes with gcc, so configuring glibc
2610  # with a fresh cross-compiler works.
2611  # On the NeXT, cc -E runs the code through the compiler's parser,
2612  # not just through cpp. "Syntax error" is here to catch this case.
2613  cat >"conftest.$ac_ext" <<_ACEOF
2614#line 2614 "configure"
2615#include "confdefs.h"
2616#include <assert.h>
2617                     Syntax error
2618_ACEOF
2619if { (eval echo "$as_me:2619: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2620  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2621  ac_status=$?
2622  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2623  rm -f conftest.er1
2624  cat conftest.err >&5
2625  echo "$as_me:2625: \$? = $ac_status" >&5
2626  (exit "$ac_status"); } >/dev/null; then
2627  if test -s conftest.err; then
2628    ac_cpp_err=$ac_c_preproc_warn_flag
2629  else
2630    ac_cpp_err=
2631  fi
2632else
2633  ac_cpp_err=yes
2634fi
2635if test -z "$ac_cpp_err"; then
2636  :
2637else
2638  echo "$as_me: failed program was:" >&5
2639  cat "conftest.$ac_ext" >&5
2640  # Broken: fails on valid input.
2641continue
2642fi
2643rm -f conftest.err "conftest.$ac_ext"
2644
2645  # OK, works on sane cases.  Now check whether non-existent headers
2646  # can be detected and how.
2647  cat >"conftest.$ac_ext" <<_ACEOF
2648#line 2648 "configure"
2649#include "confdefs.h"
2650#include <ac_nonexistent.h>
2651_ACEOF
2652if { (eval echo "$as_me:2652: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2653  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2654  ac_status=$?
2655  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2656  rm -f conftest.er1
2657  cat conftest.err >&5
2658  echo "$as_me:2658: \$? = $ac_status" >&5
2659  (exit "$ac_status"); } >/dev/null; then
2660  if test -s conftest.err; then
2661    ac_cpp_err=$ac_c_preproc_warn_flag
2662  else
2663    ac_cpp_err=
2664  fi
2665else
2666  ac_cpp_err=yes
2667fi
2668if test -z "$ac_cpp_err"; then
2669  # Broken: success on invalid input.
2670continue
2671else
2672  echo "$as_me: failed program was:" >&5
2673  cat "conftest.$ac_ext" >&5
2674  # Passes both tests.
2675ac_preproc_ok=:
2676break
2677fi
2678rm -f conftest.err "conftest.$ac_ext"
2679
2680done
2681# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2682rm -f conftest.err "conftest.$ac_ext"
2683if $ac_preproc_ok; then
2684  :
2685else
2686  { { echo "$as_me:2686: error: C preprocessor \"$CPP\" fails sanity check" >&5
2687echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2688   { (exit 1); exit 1; }; }
2689fi
2690
2691ac_ext=c
2692ac_cpp='$CPP $CPPFLAGS'
2693ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2694ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2695ac_compiler_gnu=$ac_cv_c_compiler_gnu
2696ac_main_return="return"
2697
2698echo "$as_me:2698: checking whether ${MAKE-make} sets \${MAKE}" >&5
2699echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2700set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2701if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2702  echo $ECHO_N "(cached) $ECHO_C" >&6
2703else
2704  cat >conftest.make <<\EOF
2705all:
2706	@echo 'ac_maketemp="${MAKE}"'
2707EOF
2708# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2709eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2710if test -n "$ac_maketemp"; then
2711  eval ac_cv_prog_make_${ac_make}_set=yes
2712else
2713  eval ac_cv_prog_make_${ac_make}_set=no
2714fi
2715rm -f conftest.make
2716fi
2717if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2718  echo "$as_me:2718: result: yes" >&5
2719echo "${ECHO_T}yes" >&6
2720  SET_MAKE=
2721else
2722  echo "$as_me:2722: result: no" >&5
2723echo "${ECHO_T}no" >&6
2724  SET_MAKE="MAKE=${MAKE-make}"
2725fi
2726
2727if test -n "$ac_tool_prefix"; then
2728  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2729set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2730echo "$as_me:2730: checking for $ac_word" >&5
2731echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2732if test "${ac_cv_prog_RANLIB+set}" = set; then
2733  echo $ECHO_N "(cached) $ECHO_C" >&6
2734else
2735  if test -n "$RANLIB"; then
2736  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2737else
2738  ac_save_IFS=$IFS; IFS=$ac_path_separator
2739ac_dummy="$PATH"
2740for ac_dir in $ac_dummy; do
2741  IFS=$ac_save_IFS
2742  test -z "$ac_dir" && ac_dir=.
2743  $as_executable_p "$ac_dir/$ac_word" || continue
2744ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2745echo "$as_me:2745: found $ac_dir/$ac_word" >&5
2746break
2747done
2748
2749fi
2750fi
2751RANLIB=$ac_cv_prog_RANLIB
2752if test -n "$RANLIB"; then
2753  echo "$as_me:2753: result: $RANLIB" >&5
2754echo "${ECHO_T}$RANLIB" >&6
2755else
2756  echo "$as_me:2756: result: no" >&5
2757echo "${ECHO_T}no" >&6
2758fi
2759
2760fi
2761if test -z "$ac_cv_prog_RANLIB"; then
2762  ac_ct_RANLIB=$RANLIB
2763  # Extract the first word of "ranlib", so it can be a program name with args.
2764set dummy ranlib; ac_word=$2
2765echo "$as_me:2765: checking for $ac_word" >&5
2766echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2767if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2768  echo $ECHO_N "(cached) $ECHO_C" >&6
2769else
2770  if test -n "$ac_ct_RANLIB"; then
2771  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2772else
2773  ac_save_IFS=$IFS; IFS=$ac_path_separator
2774ac_dummy="$PATH"
2775for ac_dir in $ac_dummy; do
2776  IFS=$ac_save_IFS
2777  test -z "$ac_dir" && ac_dir=.
2778  $as_executable_p "$ac_dir/$ac_word" || continue
2779ac_cv_prog_ac_ct_RANLIB="ranlib"
2780echo "$as_me:2780: found $ac_dir/$ac_word" >&5
2781break
2782done
2783
2784  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2785fi
2786fi
2787ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2788if test -n "$ac_ct_RANLIB"; then
2789  echo "$as_me:2789: result: $ac_ct_RANLIB" >&5
2790echo "${ECHO_T}$ac_ct_RANLIB" >&6
2791else
2792  echo "$as_me:2792: result: no" >&5
2793echo "${ECHO_T}no" >&6
2794fi
2795
2796  RANLIB=$ac_ct_RANLIB
2797else
2798  RANLIB="$ac_cv_prog_RANLIB"
2799fi
2800
2801# Find a good install program.  We prefer a C program (faster),
2802# so one script is as good as another.  But avoid the broken or
2803# incompatible versions:
2804# SysV /etc/install, /usr/sbin/install
2805# SunOS /usr/etc/install
2806# IRIX /sbin/install
2807# AIX /bin/install
2808# AmigaOS /C/install, which installs bootblocks on floppy discs
2809# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2810# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2811# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2812# ./install, which can be erroneously created by make from ./install.sh.
2813echo "$as_me:2813: checking for a BSD compatible install" >&5
2814echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2815if test -z "$INSTALL"; then
2816if test "${ac_cv_path_install+set}" = set; then
2817  echo $ECHO_N "(cached) $ECHO_C" >&6
2818else
2819    ac_save_IFS=$IFS; IFS=$ac_path_separator
2820  for ac_dir in $PATH; do
2821    IFS=$ac_save_IFS
2822    # Account for people who put trailing slashes in PATH elements.
2823    case $ac_dir/ in
2824    / | ./ | .// | /cC/* \
2825    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2826    | /usr/ucb/* ) ;;
2827    *)
2828      # OSF1 and SCO ODT 3.0 have their own names for install.
2829      # Don't use installbsd from OSF since it installs stuff as root
2830      # by default.
2831      for ac_prog in ginstall scoinst install; do
2832        if $as_executable_p "$ac_dir/$ac_prog"; then
2833	  if test $ac_prog = install &&
2834            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2835	    # AIX install.  It has an incompatible calling convention.
2836	    :
2837	  elif test $ac_prog = install &&
2838	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2839	    # program-specific install script used by HP pwplus--don't use.
2840	    :
2841	  else
2842	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2843	    break 2
2844	  fi
2845	fi
2846      done
2847      ;;
2848    esac
2849  done
2850
2851fi
2852  if test "${ac_cv_path_install+set}" = set; then
2853    INSTALL=$ac_cv_path_install
2854  else
2855    # As a last resort, use the slow shell script.  We don't cache a
2856    # path for INSTALL within a source directory, because that will
2857    # break other packages using the cache if that directory is
2858    # removed, or if the path is relative.
2859    INSTALL=$ac_install_sh
2860  fi
2861fi
2862echo "$as_me:2862: result: $INSTALL" >&5
2863echo "${ECHO_T}$INSTALL" >&6
2864
2865# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2866# It thinks the first close brace ends the variable substitution.
2867test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2868
2869test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2870
2871test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2872
2873echo "$as_me:2873: checking whether ln -s works" >&5
2874echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2875LN_S=$as_ln_s
2876if test "$LN_S" = "ln -s"; then
2877  echo "$as_me:2877: result: yes" >&5
2878echo "${ECHO_T}yes" >&6
2879else
2880  echo "$as_me:2880: result: no, using $LN_S" >&5
2881echo "${ECHO_T}no, using $LN_S" >&6
2882fi
2883
2884echo "$as_me:2884: checking if $LN_S -f options work" >&5
2885echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2886
2887rm -f conf$$.src conf$$dst
2888echo >conf$$.dst
2889echo first >conf$$.src
2890if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2891	cf_prog_ln_sf=yes
2892else
2893	cf_prog_ln_sf=no
2894fi
2895rm -f conf$$.dst conf$$src
2896echo "$as_me:2896: result: $cf_prog_ln_sf" >&5
2897echo "${ECHO_T}$cf_prog_ln_sf" >&6
2898
2899test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2900
2901for ac_prog in lint cppcheck splint
2902do
2903  # Extract the first word of "$ac_prog", so it can be a program name with args.
2904set dummy $ac_prog; ac_word=$2
2905echo "$as_me:2905: checking for $ac_word" >&5
2906echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2907if test "${ac_cv_prog_LINT+set}" = set; then
2908  echo $ECHO_N "(cached) $ECHO_C" >&6
2909else
2910  if test -n "$LINT"; then
2911  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2912else
2913  ac_save_IFS=$IFS; IFS=$ac_path_separator
2914ac_dummy="$PATH"
2915for ac_dir in $ac_dummy; do
2916  IFS=$ac_save_IFS
2917  test -z "$ac_dir" && ac_dir=.
2918  $as_executable_p "$ac_dir/$ac_word" || continue
2919ac_cv_prog_LINT="$ac_prog"
2920echo "$as_me:2920: found $ac_dir/$ac_word" >&5
2921break
2922done
2923
2924fi
2925fi
2926LINT=$ac_cv_prog_LINT
2927if test -n "$LINT"; then
2928  echo "$as_me:2928: result: $LINT" >&5
2929echo "${ECHO_T}$LINT" >&6
2930else
2931  echo "$as_me:2931: result: no" >&5
2932echo "${ECHO_T}no" >&6
2933fi
2934
2935  test -n "$LINT" && break
2936done
2937
2938case "x$LINT" in
2939(xcppcheck|x*/cppcheck)
2940	test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2941	;;
2942esac
2943
2944# Extract the first word of "groff", so it can be a program name with args.
2945set dummy groff; ac_word=$2
2946echo "$as_me:2946: checking for $ac_word" >&5
2947echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2948if test "${ac_cv_path_GROFF_PATH+set}" = set; then
2949  echo $ECHO_N "(cached) $ECHO_C" >&6
2950else
2951  case $GROFF_PATH in
2952  [\\/]* | ?:[\\/]*)
2953  ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
2954  ;;
2955  *)
2956  ac_save_IFS=$IFS; IFS=$ac_path_separator
2957ac_dummy="$PATH"
2958for ac_dir in $ac_dummy; do
2959  IFS=$ac_save_IFS
2960  test -z "$ac_dir" && ac_dir=.
2961  if $as_executable_p "$ac_dir/$ac_word"; then
2962   ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
2963   echo "$as_me:2963: found $ac_dir/$ac_word" >&5
2964   break
2965fi
2966done
2967
2968  test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
2969  ;;
2970esac
2971fi
2972GROFF_PATH=$ac_cv_path_GROFF_PATH
2973
2974if test -n "$GROFF_PATH"; then
2975  echo "$as_me:2975: result: $GROFF_PATH" >&5
2976echo "${ECHO_T}$GROFF_PATH" >&6
2977else
2978  echo "$as_me:2978: result: no" >&5
2979echo "${ECHO_T}no" >&6
2980fi
2981
2982for ac_prog in nroff mandoc
2983do
2984  # Extract the first word of "$ac_prog", so it can be a program name with args.
2985set dummy $ac_prog; ac_word=$2
2986echo "$as_me:2986: checking for $ac_word" >&5
2987echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2988if test "${ac_cv_path_NROFF_PATH+set}" = set; then
2989  echo $ECHO_N "(cached) $ECHO_C" >&6
2990else
2991  case $NROFF_PATH in
2992  [\\/]* | ?:[\\/]*)
2993  ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
2994  ;;
2995  *)
2996  ac_save_IFS=$IFS; IFS=$ac_path_separator
2997ac_dummy="$PATH"
2998for ac_dir in $ac_dummy; do
2999  IFS=$ac_save_IFS
3000  test -z "$ac_dir" && ac_dir=.
3001  if $as_executable_p "$ac_dir/$ac_word"; then
3002   ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
3003   echo "$as_me:3003: found $ac_dir/$ac_word" >&5
3004   break
3005fi
3006done
3007
3008  ;;
3009esac
3010fi
3011NROFF_PATH=$ac_cv_path_NROFF_PATH
3012
3013if test -n "$NROFF_PATH"; then
3014  echo "$as_me:3014: result: $NROFF_PATH" >&5
3015echo "${ECHO_T}$NROFF_PATH" >&6
3016else
3017  echo "$as_me:3017: result: no" >&5
3018echo "${ECHO_T}no" >&6
3019fi
3020
3021  test -n "$NROFF_PATH" && break
3022done
3023test -n "$NROFF_PATH" || NROFF_PATH="no"
3024
3025# Extract the first word of "tbl", so it can be a program name with args.
3026set dummy tbl; ac_word=$2
3027echo "$as_me:3027: checking for $ac_word" >&5
3028echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3029if test "${ac_cv_path_TBL_PATH+set}" = set; then
3030  echo $ECHO_N "(cached) $ECHO_C" >&6
3031else
3032  case $TBL_PATH in
3033  [\\/]* | ?:[\\/]*)
3034  ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
3035  ;;
3036  *)
3037  ac_save_IFS=$IFS; IFS=$ac_path_separator
3038ac_dummy="$PATH"
3039for ac_dir in $ac_dummy; do
3040  IFS=$ac_save_IFS
3041  test -z "$ac_dir" && ac_dir=.
3042  if $as_executable_p "$ac_dir/$ac_word"; then
3043   ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
3044   echo "$as_me:3044: found $ac_dir/$ac_word" >&5
3045   break
3046fi
3047done
3048
3049  test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
3050  ;;
3051esac
3052fi
3053TBL_PATH=$ac_cv_path_TBL_PATH
3054
3055if test -n "$TBL_PATH"; then
3056  echo "$as_me:3056: result: $TBL_PATH" >&5
3057echo "${ECHO_T}$TBL_PATH" >&6
3058else
3059  echo "$as_me:3059: result: no" >&5
3060echo "${ECHO_T}no" >&6
3061fi
3062
3063if test "x$GROFF_PATH" = xno
3064then
3065	NROFF_NOTE=
3066	GROFF_NOTE="#"
3067else
3068	NROFF_NOTE="#"
3069	GROFF_NOTE=
3070fi
3071
3072test -z "$GROFF_NOTE" && NROFF_NOTE=
3073
3074if test -n "$ac_tool_prefix"; then
3075  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3076set dummy ${ac_tool_prefix}ar; ac_word=$2
3077echo "$as_me:3077: checking for $ac_word" >&5
3078echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3079if test "${ac_cv_prog_AR+set}" = set; then
3080  echo $ECHO_N "(cached) $ECHO_C" >&6
3081else
3082  if test -n "$AR"; then
3083  ac_cv_prog_AR="$AR" # Let the user override the test.
3084else
3085  ac_save_IFS=$IFS; IFS=$ac_path_separator
3086ac_dummy="$PATH"
3087for ac_dir in $ac_dummy; do
3088  IFS=$ac_save_IFS
3089  test -z "$ac_dir" && ac_dir=.
3090  $as_executable_p "$ac_dir/$ac_word" || continue
3091ac_cv_prog_AR="${ac_tool_prefix}ar"
3092echo "$as_me:3092: found $ac_dir/$ac_word" >&5
3093break
3094done
3095
3096fi
3097fi
3098AR=$ac_cv_prog_AR
3099if test -n "$AR"; then
3100  echo "$as_me:3100: result: $AR" >&5
3101echo "${ECHO_T}$AR" >&6
3102else
3103  echo "$as_me:3103: result: no" >&5
3104echo "${ECHO_T}no" >&6
3105fi
3106
3107fi
3108if test -z "$ac_cv_prog_AR"; then
3109  ac_ct_AR=$AR
3110  # Extract the first word of "ar", so it can be a program name with args.
3111set dummy ar; ac_word=$2
3112echo "$as_me:3112: checking for $ac_word" >&5
3113echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3114if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3115  echo $ECHO_N "(cached) $ECHO_C" >&6
3116else
3117  if test -n "$ac_ct_AR"; then
3118  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3119else
3120  ac_save_IFS=$IFS; IFS=$ac_path_separator
3121ac_dummy="$PATH"
3122for ac_dir in $ac_dummy; do
3123  IFS=$ac_save_IFS
3124  test -z "$ac_dir" && ac_dir=.
3125  $as_executable_p "$ac_dir/$ac_word" || continue
3126ac_cv_prog_ac_ct_AR="ar"
3127echo "$as_me:3127: found $ac_dir/$ac_word" >&5
3128break
3129done
3130
3131  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3132fi
3133fi
3134ac_ct_AR=$ac_cv_prog_ac_ct_AR
3135if test -n "$ac_ct_AR"; then
3136  echo "$as_me:3136: result: $ac_ct_AR" >&5
3137echo "${ECHO_T}$ac_ct_AR" >&6
3138else
3139  echo "$as_me:3139: result: no" >&5
3140echo "${ECHO_T}no" >&6
3141fi
3142
3143  AR=$ac_ct_AR
3144else
3145  AR="$ac_cv_prog_AR"
3146fi
3147
3148echo "$as_me:3148: checking for options to update archives" >&5
3149echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3150if test "${cf_cv_ar_flags+set}" = set; then
3151  echo $ECHO_N "(cached) $ECHO_C" >&6
3152else
3153
3154	case "$cf_cv_system_name" in
3155	(*-msvc*)
3156		cf_cv_ar_flags=''
3157		cat >mk_static_lib.sh <<-EOF
3158		#!$SHELL
3159		MSVC_BIN="$AR"
3160		out="\$1"
3161		shift
3162		exec \$MSVC_BIN -out:"\$out" \$@
3163		EOF
3164		chmod +x mk_static_lib.sh
3165		AR=`pwd`/mk_static_lib.sh
3166		;;
3167	(*)
3168		cf_cv_ar_flags=unknown
3169		for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3170		do
3171
3172			# check if $ARFLAGS already contains this choice
3173			if test "x$ARFLAGS" != "x" ; then
3174				cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3175				if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3176					cf_cv_ar_flags=
3177					break
3178				fi
3179			fi
3180
3181			rm -f "conftest.$ac_cv_objext"
3182			rm -f conftest.a
3183
3184			cat >"conftest.$ac_ext" <<EOF
3185#line 3185 "configure"
3186int	testdata[3] = { 123, 456, 789 };
3187EOF
3188			if { (eval echo "$as_me:3188: \"$ac_compile\"") >&5
3189  (eval $ac_compile) 2>&5
3190  ac_status=$?
3191  echo "$as_me:3191: \$? = $ac_status" >&5
3192  (exit "$ac_status"); } ; then
3193				echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3194				$AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
3195				if test -f conftest.a ; then
3196					cf_cv_ar_flags="$cf_ar_flags"
3197					break
3198				fi
3199			else
3200				test -n "$verbose" && echo "	cannot compile test-program" 1>&6
3201
3202echo "${as_me:-configure}:3202: testing cannot compile test-program ..." 1>&5
3203
3204				break
3205			fi
3206		done
3207		rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
3208		;;
3209	esac
3210
3211fi
3212echo "$as_me:3212: result: $cf_cv_ar_flags" >&5
3213echo "${ECHO_T}$cf_cv_ar_flags" >&6
3214
3215if test -n "$ARFLAGS" ; then
3216	if test -n "$cf_cv_ar_flags" ; then
3217		ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3218	fi
3219else
3220	ARFLAGS=$cf_cv_ar_flags
3221fi
3222
3223echo "$as_me:3223: checking for fgrep" >&5
3224echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3225if test "${ac_cv_path_FGREP+set}" = set; then
3226  echo $ECHO_N "(cached) $ECHO_C" >&6
3227else
3228  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3229   then ac_cv_path_FGREP="$GREP -F"
3230   else
3231     for ac_prog in gfgrep fgrep
3232do
3233  # Extract the first word of "$ac_prog", so it can be a program name with args.
3234set dummy $ac_prog; ac_word=$2
3235echo "$as_me:3235: checking for $ac_word" >&5
3236echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3237if test "${ac_cv_path_FGREP+set}" = set; then
3238  echo $ECHO_N "(cached) $ECHO_C" >&6
3239else
3240  case $FGREP in
3241  [\\/]* | ?:[\\/]*)
3242  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3243  ;;
3244  *)
3245  ac_save_IFS=$IFS; IFS=$ac_path_separator
3246ac_dummy="$PATH"
3247for ac_dir in $ac_dummy; do
3248  IFS=$ac_save_IFS
3249  test -z "$ac_dir" && ac_dir=.
3250  if $as_executable_p "$ac_dir/$ac_word"; then
3251   ac_cv_path_FGREP="$ac_dir/$ac_word"
3252   echo "$as_me:3252: found $ac_dir/$ac_word" >&5
3253   break
3254fi
3255done
3256
3257  ;;
3258esac
3259fi
3260FGREP=$ac_cv_path_FGREP
3261
3262if test -n "$FGREP"; then
3263  echo "$as_me:3263: result: $FGREP" >&5
3264echo "${ECHO_T}$FGREP" >&6
3265else
3266  echo "$as_me:3266: result: no" >&5
3267echo "${ECHO_T}no" >&6
3268fi
3269
3270  test -n "$FGREP" && break
3271done
3272test -n "$FGREP" || FGREP=": "
3273
3274     test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3274: error: cannot find workable fgrep" >&5
3275echo "$as_me: error: cannot find workable fgrep" >&2;}
3276   { (exit 1); exit 1; }; }
3277   fi
3278fi
3279echo "$as_me:3279: result: $ac_cv_path_FGREP" >&5
3280echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3281 FGREP="$ac_cv_path_FGREP"
3282
3283echo "$as_me:3283: checking for makeflags variable" >&5
3284echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3285if test "${cf_cv_makeflags+set}" = set; then
3286  echo $ECHO_N "(cached) $ECHO_C" >&6
3287else
3288
3289	cf_cv_makeflags=''
3290	for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3291	do
3292		cat >cf_makeflags.tmp <<CF_EOF
3293SHELL = $SHELL
3294all :
3295	@ echo '.$cf_option'
3296CF_EOF
3297		cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ 	]*$,,'`
3298		case "$cf_result" in
3299		(.*k|.*kw)
3300			cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3301			case "$cf_result" in
3302			(.*CC=*)	cf_cv_makeflags=
3303				;;
3304			(*)	cf_cv_makeflags=$cf_option
3305				;;
3306			esac
3307			break
3308			;;
3309		(.-)
3310			;;
3311		(*)
3312
3313echo "${as_me:-configure}:3313: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3314
3315			;;
3316		esac
3317	done
3318	rm -f cf_makeflags.tmp
3319
3320fi
3321echo "$as_me:3321: result: $cf_cv_makeflags" >&5
3322echo "${ECHO_T}$cf_cv_makeflags" >&6
3323
3324echo "$as_me:3324: checking if filesystem supports mixed-case filenames" >&5
3325echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3326if test "${cf_cv_mixedcase+set}" = set; then
3327  echo $ECHO_N "(cached) $ECHO_C" >&6
3328else
3329
3330if test "$cross_compiling" = yes ; then
3331	case "$target_alias" in
3332	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3333		cf_cv_mixedcase=no
3334		;;
3335	(*)
3336		cf_cv_mixedcase=yes
3337		;;
3338	esac
3339else
3340	rm -f conftest CONFTEST
3341	echo test >conftest
3342	if test -f CONFTEST ; then
3343		cf_cv_mixedcase=no
3344	else
3345		cf_cv_mixedcase=yes
3346	fi
3347	rm -f conftest CONFTEST
3348fi
3349
3350fi
3351echo "$as_me:3351: result: $cf_cv_mixedcase" >&5
3352echo "${ECHO_T}$cf_cv_mixedcase" >&6
3353test "$cf_cv_mixedcase" = yes &&
3354cat >>confdefs.h <<\EOF
3355#define MIXEDCASE_FILENAMES 1
3356EOF
3357
3358for ac_prog in exctags ctags
3359do
3360  # Extract the first word of "$ac_prog", so it can be a program name with args.
3361set dummy $ac_prog; ac_word=$2
3362echo "$as_me:3362: checking for $ac_word" >&5
3363echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3364if test "${ac_cv_prog_CTAGS+set}" = set; then
3365  echo $ECHO_N "(cached) $ECHO_C" >&6
3366else
3367  if test -n "$CTAGS"; then
3368  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3369else
3370  ac_save_IFS=$IFS; IFS=$ac_path_separator
3371ac_dummy="$PATH"
3372for ac_dir in $ac_dummy; do
3373  IFS=$ac_save_IFS
3374  test -z "$ac_dir" && ac_dir=.
3375  $as_executable_p "$ac_dir/$ac_word" || continue
3376ac_cv_prog_CTAGS="$ac_prog"
3377echo "$as_me:3377: found $ac_dir/$ac_word" >&5
3378break
3379done
3380
3381fi
3382fi
3383CTAGS=$ac_cv_prog_CTAGS
3384if test -n "$CTAGS"; then
3385  echo "$as_me:3385: result: $CTAGS" >&5
3386echo "${ECHO_T}$CTAGS" >&6
3387else
3388  echo "$as_me:3388: result: no" >&5
3389echo "${ECHO_T}no" >&6
3390fi
3391
3392  test -n "$CTAGS" && break
3393done
3394
3395for ac_prog in exetags etags
3396do
3397  # Extract the first word of "$ac_prog", so it can be a program name with args.
3398set dummy $ac_prog; ac_word=$2
3399echo "$as_me:3399: checking for $ac_word" >&5
3400echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3401if test "${ac_cv_prog_ETAGS+set}" = set; then
3402  echo $ECHO_N "(cached) $ECHO_C" >&6
3403else
3404  if test -n "$ETAGS"; then
3405  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3406else
3407  ac_save_IFS=$IFS; IFS=$ac_path_separator
3408ac_dummy="$PATH"
3409for ac_dir in $ac_dummy; do
3410  IFS=$ac_save_IFS
3411  test -z "$ac_dir" && ac_dir=.
3412  $as_executable_p "$ac_dir/$ac_word" || continue
3413ac_cv_prog_ETAGS="$ac_prog"
3414echo "$as_me:3414: found $ac_dir/$ac_word" >&5
3415break
3416done
3417
3418fi
3419fi
3420ETAGS=$ac_cv_prog_ETAGS
3421if test -n "$ETAGS"; then
3422  echo "$as_me:3422: result: $ETAGS" >&5
3423echo "${ECHO_T}$ETAGS" >&6
3424else
3425  echo "$as_me:3425: result: no" >&5
3426echo "${ECHO_T}no" >&6
3427fi
3428
3429  test -n "$ETAGS" && break
3430done
3431
3432# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3433set dummy ${CTAGS:-ctags}; ac_word=$2
3434echo "$as_me:3434: checking for $ac_word" >&5
3435echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3436if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3437  echo $ECHO_N "(cached) $ECHO_C" >&6
3438else
3439  if test -n "$MAKE_LOWER_TAGS"; then
3440  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3441else
3442  ac_save_IFS=$IFS; IFS=$ac_path_separator
3443ac_dummy="$PATH"
3444for ac_dir in $ac_dummy; do
3445  IFS=$ac_save_IFS
3446  test -z "$ac_dir" && ac_dir=.
3447  $as_executable_p "$ac_dir/$ac_word" || continue
3448ac_cv_prog_MAKE_LOWER_TAGS="yes"
3449echo "$as_me:3449: found $ac_dir/$ac_word" >&5
3450break
3451done
3452
3453  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3454fi
3455fi
3456MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3457if test -n "$MAKE_LOWER_TAGS"; then
3458  echo "$as_me:3458: result: $MAKE_LOWER_TAGS" >&5
3459echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3460else
3461  echo "$as_me:3461: result: no" >&5
3462echo "${ECHO_T}no" >&6
3463fi
3464
3465if test "$cf_cv_mixedcase" = yes ; then
3466	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3467set dummy ${ETAGS:-etags}; ac_word=$2
3468echo "$as_me:3468: checking for $ac_word" >&5
3469echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3470if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3471  echo $ECHO_N "(cached) $ECHO_C" >&6
3472else
3473  if test -n "$MAKE_UPPER_TAGS"; then
3474  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3475else
3476  ac_save_IFS=$IFS; IFS=$ac_path_separator
3477ac_dummy="$PATH"
3478for ac_dir in $ac_dummy; do
3479  IFS=$ac_save_IFS
3480  test -z "$ac_dir" && ac_dir=.
3481  $as_executable_p "$ac_dir/$ac_word" || continue
3482ac_cv_prog_MAKE_UPPER_TAGS="yes"
3483echo "$as_me:3483: found $ac_dir/$ac_word" >&5
3484break
3485done
3486
3487  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3488fi
3489fi
3490MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3491if test -n "$MAKE_UPPER_TAGS"; then
3492  echo "$as_me:3492: result: $MAKE_UPPER_TAGS" >&5
3493echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3494else
3495  echo "$as_me:3495: result: no" >&5
3496echo "${ECHO_T}no" >&6
3497fi
3498
3499else
3500	MAKE_UPPER_TAGS=no
3501fi
3502
3503if test "$MAKE_UPPER_TAGS" = yes ; then
3504	MAKE_UPPER_TAGS=
3505else
3506	MAKE_UPPER_TAGS="#"
3507fi
3508
3509if test "$MAKE_LOWER_TAGS" = yes ; then
3510	MAKE_LOWER_TAGS=
3511else
3512	MAKE_LOWER_TAGS="#"
3513fi
3514
3515echo "$as_me:3515: checking if you want to see long compiling messages" >&5
3516echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
3517
3518# Check whether --enable-echo or --disable-echo was given.
3519if test "${enable_echo+set}" = set; then
3520  enableval="$enable_echo"
3521  test "$enableval" != no && enableval=yes
3522	if test "$enableval" != "yes" ; then
3523
3524	ECHO_LT='--silent'
3525	ECHO_LD='@echo linking $@;'
3526	RULE_CC='@echo compiling $<'
3527	SHOW_CC='@echo compiling $@'
3528	ECHO_CC='@'
3529
3530	else
3531
3532	ECHO_LT=''
3533	ECHO_LD=''
3534	RULE_CC=''
3535	SHOW_CC=''
3536	ECHO_CC=''
3537
3538	fi
3539else
3540  enableval=yes
3541
3542	ECHO_LT=''
3543	ECHO_LD=''
3544	RULE_CC=''
3545	SHOW_CC=''
3546	ECHO_CC=''
3547
3548fi;
3549echo "$as_me:3549: result: $enableval" >&5
3550echo "${ECHO_T}$enableval" >&6
3551
3552if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
3553
3554	system_name="$host_os"
3555else
3556	system_name="`(uname -s -r) 2>/dev/null`"
3557	if test -z "$system_name" ; then
3558		system_name="`(hostname) 2>/dev/null`"
3559	fi
3560fi
3561test -n "$system_name" &&
3562cat >>confdefs.h <<EOF
3563#define SYSTEM_NAME "$system_name"
3564EOF
3565
3566if test "${cf_cv_system_name+set}" = set; then
3567  echo $ECHO_N "(cached) $ECHO_C" >&6
3568else
3569  cf_cv_system_name="$system_name"
3570fi
3571
3572test -z "$system_name" && system_name="$cf_cv_system_name"
3573test -n "$cf_cv_system_name" && echo "$as_me:3573: result: Configuring for $cf_cv_system_name" >&5
3574echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
3575
3576if test ".$system_name" != ".$cf_cv_system_name" ; then
3577	echo "$as_me:3577: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
3578echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
3579	{ { echo "$as_me:3579: error: \"Please remove config.cache and try again.\"" >&5
3580echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
3581   { (exit 1); exit 1; }; }
3582fi
3583
3584case "$cf_cv_system_name" in
3585(os2*)
3586	CFLAGS="$CFLAGS -Zmt"
3587
3588	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3589	CPPFLAGS="${CPPFLAGS}-D__ST_MT_ERRNO__"
3590
3591	CXXFLAGS="$CXXFLAGS -Zmt"
3592	# autoconf's macro sets -Zexe and suffix both, which conflict:w
3593	LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
3594	ac_cv_exeext=.exe
3595	;;
3596esac
3597
3598PROG_EXT="$EXEEXT"
3599
3600test -n "$PROG_EXT" &&
3601cat >>confdefs.h <<EOF
3602#define PROG_EXT "$PROG_EXT"
3603EOF
3604
3605	echo "$as_me:3605: checking for PATH separator" >&5
3606echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3607	case "$cf_cv_system_name" in
3608	(os2*)	PATH_SEPARATOR=';'  ;;
3609	(*)	${PATH_SEPARATOR:=':'}  ;;
3610	esac
3611
3612	echo "$as_me:3612: result: $PATH_SEPARATOR" >&5
3613echo "${ECHO_T}$PATH_SEPARATOR" >&6
3614
3615	case "$cf_cv_system_name" in
3616	(OS/2*|os2*)
3617		if test "$DFT_LWR_MODEL" = libtool; then
3618			LIB_PREFIX='lib'
3619		else
3620			LIB_PREFIX=''
3621		fi
3622		;;
3623	(*-msvc*)
3624		LIB_PREFIX=''
3625		;;
3626	(*)	LIB_PREFIX='lib'
3627		;;
3628	esac
3629
3630echo "$as_me:3630: checking if the POSIX test-macros are already defined" >&5
3631echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3632if test "${cf_cv_posix_visible+set}" = set; then
3633  echo $ECHO_N "(cached) $ECHO_C" >&6
3634else
3635
3636cat >"conftest.$ac_ext" <<_ACEOF
3637#line 3637 "configure"
3638#include "confdefs.h"
3639#include <stdio.h>
3640int
3641main (void)
3642{
3643
3644#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3645	&& defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3646	&& defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3647	&& defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3648#error conflicting symbols found
3649#endif
3650
3651  ;
3652  return 0;
3653}
3654_ACEOF
3655rm -f "conftest.$ac_objext"
3656if { (eval echo "$as_me:3656: \"$ac_compile\"") >&5
3657  (eval $ac_compile) 2>&5
3658  ac_status=$?
3659  echo "$as_me:3659: \$? = $ac_status" >&5
3660  (exit "$ac_status"); } &&
3661         { ac_try='test -s "conftest.$ac_objext"'
3662  { (eval echo "$as_me:3662: \"$ac_try\"") >&5
3663  (eval $ac_try) 2>&5
3664  ac_status=$?
3665  echo "$as_me:3665: \$? = $ac_status" >&5
3666  (exit "$ac_status"); }; }; then
3667  cf_cv_posix_visible=no
3668else
3669  echo "$as_me: failed program was:" >&5
3670cat "conftest.$ac_ext" >&5
3671cf_cv_posix_visible=yes
3672fi
3673rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3674
3675fi
3676echo "$as_me:3676: result: $cf_cv_posix_visible" >&5
3677echo "${ECHO_T}$cf_cv_posix_visible" >&6
3678
3679if test "$cf_cv_posix_visible" = no; then
3680
3681cf_XOPEN_SOURCE=500
3682cf_POSIX_C_SOURCE=199506L
3683cf_xopen_source=
3684
3685case "$host_os" in
3686(aix[4-7]*)
3687	cf_xopen_source="-D_ALL_SOURCE"
3688	;;
3689(msys)
3690	cf_XOPEN_SOURCE=600
3691	;;
3692(darwin[0-8].*)
3693	cf_xopen_source="-D_APPLE_C_SOURCE"
3694	;;
3695(darwin*)
3696	cf_xopen_source="-D_DARWIN_C_SOURCE"
3697	cf_XOPEN_SOURCE=
3698	;;
3699(freebsd*|dragonfly*|midnightbsd*)
3700	# 5.x headers associate
3701	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3702	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3703	cf_POSIX_C_SOURCE=200112L
3704	cf_XOPEN_SOURCE=600
3705	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3706	;;
3707(hpux11*)
3708	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3709	;;
3710(hpux*)
3711	cf_xopen_source="-D_HPUX_SOURCE"
3712	;;
3713(irix[56].*)
3714	cf_xopen_source="-D_SGI_SOURCE"
3715	cf_XOPEN_SOURCE=
3716	;;
3717(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3718
3719cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3720
3721echo "$as_me:3721: checking if this is the GNU C library" >&5
3722echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3723if test "${cf_cv_gnu_library+set}" = set; then
3724  echo $ECHO_N "(cached) $ECHO_C" >&6
3725else
3726
3727cat >"conftest.$ac_ext" <<_ACEOF
3728#line 3728 "configure"
3729#include "confdefs.h"
3730#include <sys/types.h>
3731int
3732main (void)
3733{
3734
3735	#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3736		return 0;
3737	#elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3738		return 0;
3739	#else
3740	#	error not GNU C library
3741	#endif
3742  ;
3743  return 0;
3744}
3745_ACEOF
3746rm -f "conftest.$ac_objext"
3747if { (eval echo "$as_me:3747: \"$ac_compile\"") >&5
3748  (eval $ac_compile) 2>&5
3749  ac_status=$?
3750  echo "$as_me:3750: \$? = $ac_status" >&5
3751  (exit "$ac_status"); } &&
3752         { ac_try='test -s "conftest.$ac_objext"'
3753  { (eval echo "$as_me:3753: \"$ac_try\"") >&5
3754  (eval $ac_try) 2>&5
3755  ac_status=$?
3756  echo "$as_me:3756: \$? = $ac_status" >&5
3757  (exit "$ac_status"); }; }; then
3758  cf_cv_gnu_library=yes
3759else
3760  echo "$as_me: failed program was:" >&5
3761cat "conftest.$ac_ext" >&5
3762cf_cv_gnu_library=no
3763fi
3764rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3765
3766fi
3767echo "$as_me:3767: result: $cf_cv_gnu_library" >&5
3768echo "${ECHO_T}$cf_cv_gnu_library" >&6
3769
3770if test x$cf_cv_gnu_library = xyes; then
3771
3772	# With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3773	# was changed to help a little.  newlib incorporated the change about 4
3774	# years later.
3775	echo "$as_me:3775: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3776echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3777if test "${cf_cv_gnu_library_219+set}" = set; then
3778  echo $ECHO_N "(cached) $ECHO_C" >&6
3779else
3780
3781		cf_save="$CPPFLAGS"
3782
3783	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3784	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3785
3786		cat >"conftest.$ac_ext" <<_ACEOF
3787#line 3787 "configure"
3788#include "confdefs.h"
3789#include <sys/types.h>
3790int
3791main (void)
3792{
3793
3794			#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3795				return 0;
3796			#elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3797				return 0;
3798			#else
3799			#	error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3800			#endif
3801  ;
3802  return 0;
3803}
3804_ACEOF
3805rm -f "conftest.$ac_objext"
3806if { (eval echo "$as_me:3806: \"$ac_compile\"") >&5
3807  (eval $ac_compile) 2>&5
3808  ac_status=$?
3809  echo "$as_me:3809: \$? = $ac_status" >&5
3810  (exit "$ac_status"); } &&
3811         { ac_try='test -s "conftest.$ac_objext"'
3812  { (eval echo "$as_me:3812: \"$ac_try\"") >&5
3813  (eval $ac_try) 2>&5
3814  ac_status=$?
3815  echo "$as_me:3815: \$? = $ac_status" >&5
3816  (exit "$ac_status"); }; }; then
3817  cf_cv_gnu_library_219=yes
3818else
3819  echo "$as_me: failed program was:" >&5
3820cat "conftest.$ac_ext" >&5
3821cf_cv_gnu_library_219=no
3822fi
3823rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3824		CPPFLAGS="$cf_save"
3825
3826fi
3827echo "$as_me:3827: result: $cf_cv_gnu_library_219" >&5
3828echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3829
3830	if test "x$cf_cv_gnu_library_219" = xyes; then
3831		cf_save="$CPPFLAGS"
3832		echo "$as_me:3832: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3833echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3834if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3835  echo $ECHO_N "(cached) $ECHO_C" >&6
3836else
3837
3838cf_fix_cppflags=no
3839cf_new_cflags=
3840cf_new_cppflags=
3841cf_new_extra_cppflags=
3842
3843for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3844do
3845case "$cf_fix_cppflags" in
3846(no)
3847	case "$cf_add_cflags" in
3848	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3849		case "$cf_add_cflags" in
3850		(-D*)
3851			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3852
3853			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3854				&& test -z "${cf_tst_cflags}" \
3855				&& cf_fix_cppflags=yes
3856
3857			if test "$cf_fix_cppflags" = yes ; then
3858
3859	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3860	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3861
3862				continue
3863			elif test "${cf_tst_cflags}" = "\"'" ; then
3864
3865	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3866	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3867
3868				continue
3869			fi
3870			;;
3871		esac
3872		case "$CPPFLAGS" in
3873		(*$cf_add_cflags)
3874			;;
3875		(*)
3876			case "$cf_add_cflags" in
3877			(-D*)
3878				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3879
3880CPPFLAGS=`echo "$CPPFLAGS" | \
3881	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3882		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3883
3884				;;
3885			esac
3886
3887	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3888	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3889
3890			;;
3891		esac
3892		;;
3893	(*)
3894
3895	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3896	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3897
3898		;;
3899	esac
3900	;;
3901(yes)
3902
3903	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3904	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3905
3906	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3907
3908	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3909		&& test -z "${cf_tst_cflags}" \
3910		&& cf_fix_cppflags=no
3911	;;
3912esac
3913done
3914
3915if test -n "$cf_new_cflags" ; then
3916
3917	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3918	CFLAGS="${CFLAGS}$cf_new_cflags"
3919
3920fi
3921
3922if test -n "$cf_new_cppflags" ; then
3923
3924	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3925	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3926
3927fi
3928
3929if test -n "$cf_new_extra_cppflags" ; then
3930
3931	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3932	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3933
3934fi
3935
3936			cat >"conftest.$ac_ext" <<_ACEOF
3937#line 3937 "configure"
3938#include "confdefs.h"
3939
3940				#include <limits.h>
3941				#include <sys/types.h>
3942
3943int
3944main (void)
3945{
3946
3947				#if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3948					return 0;
3949				#else
3950				#	error GNU C library is too old
3951				#endif
3952  ;
3953  return 0;
3954}
3955_ACEOF
3956rm -f "conftest.$ac_objext"
3957if { (eval echo "$as_me:3957: \"$ac_compile\"") >&5
3958  (eval $ac_compile) 2>&5
3959  ac_status=$?
3960  echo "$as_me:3960: \$? = $ac_status" >&5
3961  (exit "$ac_status"); } &&
3962         { ac_try='test -s "conftest.$ac_objext"'
3963  { (eval echo "$as_me:3963: \"$ac_try\"") >&5
3964  (eval $ac_try) 2>&5
3965  ac_status=$?
3966  echo "$as_me:3966: \$? = $ac_status" >&5
3967  (exit "$ac_status"); }; }; then
3968  cf_cv_gnu_dftsrc_219=yes
3969else
3970  echo "$as_me: failed program was:" >&5
3971cat "conftest.$ac_ext" >&5
3972cf_cv_gnu_dftsrc_219=no
3973fi
3974rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3975
3976fi
3977echo "$as_me:3977: result: $cf_cv_gnu_dftsrc_219" >&5
3978echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3979		test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3980	else
3981		cf_cv_gnu_dftsrc_219=maybe
3982	fi
3983
3984	if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3985
3986		echo "$as_me:3986: checking if we must define _GNU_SOURCE" >&5
3987echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3988if test "${cf_cv_gnu_source+set}" = set; then
3989  echo $ECHO_N "(cached) $ECHO_C" >&6
3990else
3991
3992		cat >"conftest.$ac_ext" <<_ACEOF
3993#line 3993 "configure"
3994#include "confdefs.h"
3995#include <sys/types.h>
3996int
3997main (void)
3998{
3999
4000			#ifndef _XOPEN_SOURCE
4001			#error	expected _XOPEN_SOURCE to be defined
4002			#endif
4003  ;
4004  return 0;
4005}
4006_ACEOF
4007rm -f "conftest.$ac_objext"
4008if { (eval echo "$as_me:4008: \"$ac_compile\"") >&5
4009  (eval $ac_compile) 2>&5
4010  ac_status=$?
4011  echo "$as_me:4011: \$? = $ac_status" >&5
4012  (exit "$ac_status"); } &&
4013         { ac_try='test -s "conftest.$ac_objext"'
4014  { (eval echo "$as_me:4014: \"$ac_try\"") >&5
4015  (eval $ac_try) 2>&5
4016  ac_status=$?
4017  echo "$as_me:4017: \$? = $ac_status" >&5
4018  (exit "$ac_status"); }; }; then
4019  cf_cv_gnu_source=no
4020else
4021  echo "$as_me: failed program was:" >&5
4022cat "conftest.$ac_ext" >&5
4023cf_save="$CPPFLAGS"
4024
4025cf_fix_cppflags=no
4026cf_new_cflags=
4027cf_new_cppflags=
4028cf_new_extra_cppflags=
4029
4030for cf_add_cflags in -D_GNU_SOURCE
4031do
4032case "$cf_fix_cppflags" in
4033(no)
4034	case "$cf_add_cflags" in
4035	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4036		case "$cf_add_cflags" in
4037		(-D*)
4038			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4039
4040			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4041				&& test -z "${cf_tst_cflags}" \
4042				&& cf_fix_cppflags=yes
4043
4044			if test "$cf_fix_cppflags" = yes ; then
4045
4046	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4047	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4048
4049				continue
4050			elif test "${cf_tst_cflags}" = "\"'" ; then
4051
4052	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4053	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4054
4055				continue
4056			fi
4057			;;
4058		esac
4059		case "$CPPFLAGS" in
4060		(*$cf_add_cflags)
4061			;;
4062		(*)
4063			case "$cf_add_cflags" in
4064			(-D*)
4065				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4066
4067CPPFLAGS=`echo "$CPPFLAGS" | \
4068	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4069		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4070
4071				;;
4072			esac
4073
4074	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4075	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4076
4077			;;
4078		esac
4079		;;
4080	(*)
4081
4082	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4083	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4084
4085		;;
4086	esac
4087	;;
4088(yes)
4089
4090	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4091	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4092
4093	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4094
4095	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4096		&& test -z "${cf_tst_cflags}" \
4097		&& cf_fix_cppflags=no
4098	;;
4099esac
4100done
4101
4102if test -n "$cf_new_cflags" ; then
4103
4104	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4105	CFLAGS="${CFLAGS}$cf_new_cflags"
4106
4107fi
4108
4109if test -n "$cf_new_cppflags" ; then
4110
4111	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4112	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4113
4114fi
4115
4116if test -n "$cf_new_extra_cppflags" ; then
4117
4118	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4119	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4120
4121fi
4122
4123			 cat >"conftest.$ac_ext" <<_ACEOF
4124#line 4124 "configure"
4125#include "confdefs.h"
4126#include <sys/types.h>
4127int
4128main (void)
4129{
4130
4131				#ifdef _XOPEN_SOURCE
4132				#error	expected _XOPEN_SOURCE to be undefined
4133				#endif
4134  ;
4135  return 0;
4136}
4137_ACEOF
4138rm -f "conftest.$ac_objext"
4139if { (eval echo "$as_me:4139: \"$ac_compile\"") >&5
4140  (eval $ac_compile) 2>&5
4141  ac_status=$?
4142  echo "$as_me:4142: \$? = $ac_status" >&5
4143  (exit "$ac_status"); } &&
4144         { ac_try='test -s "conftest.$ac_objext"'
4145  { (eval echo "$as_me:4145: \"$ac_try\"") >&5
4146  (eval $ac_try) 2>&5
4147  ac_status=$?
4148  echo "$as_me:4148: \$? = $ac_status" >&5
4149  (exit "$ac_status"); }; }; then
4150  cf_cv_gnu_source=no
4151else
4152  echo "$as_me: failed program was:" >&5
4153cat "conftest.$ac_ext" >&5
4154cf_cv_gnu_source=yes
4155fi
4156rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4157			CPPFLAGS="$cf_save"
4158
4159fi
4160rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4161
4162fi
4163echo "$as_me:4163: result: $cf_cv_gnu_source" >&5
4164echo "${ECHO_T}$cf_cv_gnu_source" >&6
4165
4166		if test "$cf_cv_gnu_source" = yes
4167		then
4168		echo "$as_me:4168: checking if we should also define _DEFAULT_SOURCE" >&5
4169echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4170if test "${cf_cv_default_source+set}" = set; then
4171  echo $ECHO_N "(cached) $ECHO_C" >&6
4172else
4173
4174	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4175	CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4176
4177			cat >"conftest.$ac_ext" <<_ACEOF
4178#line 4178 "configure"
4179#include "confdefs.h"
4180#include <sys/types.h>
4181int
4182main (void)
4183{
4184
4185				#ifdef _DEFAULT_SOURCE
4186				#error	expected _DEFAULT_SOURCE to be undefined
4187				#endif
4188  ;
4189  return 0;
4190}
4191_ACEOF
4192rm -f "conftest.$ac_objext"
4193if { (eval echo "$as_me:4193: \"$ac_compile\"") >&5
4194  (eval $ac_compile) 2>&5
4195  ac_status=$?
4196  echo "$as_me:4196: \$? = $ac_status" >&5
4197  (exit "$ac_status"); } &&
4198         { ac_try='test -s "conftest.$ac_objext"'
4199  { (eval echo "$as_me:4199: \"$ac_try\"") >&5
4200  (eval $ac_try) 2>&5
4201  ac_status=$?
4202  echo "$as_me:4202: \$? = $ac_status" >&5
4203  (exit "$ac_status"); }; }; then
4204  cf_cv_default_source=no
4205else
4206  echo "$as_me: failed program was:" >&5
4207cat "conftest.$ac_ext" >&5
4208cf_cv_default_source=yes
4209fi
4210rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4211
4212fi
4213echo "$as_me:4213: result: $cf_cv_default_source" >&5
4214echo "${ECHO_T}$cf_cv_default_source" >&6
4215			if test "$cf_cv_default_source" = yes
4216			then
4217
4218	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4219	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4220
4221			fi
4222		fi
4223	fi
4224
4225fi
4226
4227	;;
4228(minix*)
4229	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4230	;;
4231(mirbsd*)
4232	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4233	cf_XOPEN_SOURCE=
4234
4235if test "$cf_cv_posix_visible" = no; then
4236
4237cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4238
4239cf_save_CFLAGS="$CFLAGS"
4240cf_save_CPPFLAGS="$CPPFLAGS"
4241
4242cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4243	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4244		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4245
4246cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4247	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4248		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4249
4250echo "$as_me:4250: checking if we should define _POSIX_C_SOURCE" >&5
4251echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4252if test "${cf_cv_posix_c_source+set}" = set; then
4253  echo $ECHO_N "(cached) $ECHO_C" >&6
4254else
4255
4256echo "${as_me:-configure}:4256: testing if the symbol is already defined go no further ..." 1>&5
4257
4258	cat >"conftest.$ac_ext" <<_ACEOF
4259#line 4259 "configure"
4260#include "confdefs.h"
4261#include <sys/types.h>
4262int
4263main (void)
4264{
4265
4266#ifndef _POSIX_C_SOURCE
4267make an error
4268#endif
4269  ;
4270  return 0;
4271}
4272_ACEOF
4273rm -f "conftest.$ac_objext"
4274if { (eval echo "$as_me:4274: \"$ac_compile\"") >&5
4275  (eval $ac_compile) 2>&5
4276  ac_status=$?
4277  echo "$as_me:4277: \$? = $ac_status" >&5
4278  (exit "$ac_status"); } &&
4279         { ac_try='test -s "conftest.$ac_objext"'
4280  { (eval echo "$as_me:4280: \"$ac_try\"") >&5
4281  (eval $ac_try) 2>&5
4282  ac_status=$?
4283  echo "$as_me:4283: \$? = $ac_status" >&5
4284  (exit "$ac_status"); }; }; then
4285  cf_cv_posix_c_source=no
4286else
4287  echo "$as_me: failed program was:" >&5
4288cat "conftest.$ac_ext" >&5
4289cf_want_posix_source=no
4290	 case .$cf_POSIX_C_SOURCE in
4291	 (.[12]??*)
4292		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4293		;;
4294	 (.2)
4295		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4296		cf_want_posix_source=yes
4297		;;
4298	 (.*)
4299		cf_want_posix_source=yes
4300		;;
4301	 esac
4302	 if test "$cf_want_posix_source" = yes ; then
4303		cat >"conftest.$ac_ext" <<_ACEOF
4304#line 4304 "configure"
4305#include "confdefs.h"
4306#include <sys/types.h>
4307int
4308main (void)
4309{
4310
4311#ifdef _POSIX_SOURCE
4312make an error
4313#endif
4314  ;
4315  return 0;
4316}
4317_ACEOF
4318rm -f "conftest.$ac_objext"
4319if { (eval echo "$as_me:4319: \"$ac_compile\"") >&5
4320  (eval $ac_compile) 2>&5
4321  ac_status=$?
4322  echo "$as_me:4322: \$? = $ac_status" >&5
4323  (exit "$ac_status"); } &&
4324         { ac_try='test -s "conftest.$ac_objext"'
4325  { (eval echo "$as_me:4325: \"$ac_try\"") >&5
4326  (eval $ac_try) 2>&5
4327  ac_status=$?
4328  echo "$as_me:4328: \$? = $ac_status" >&5
4329  (exit "$ac_status"); }; }; then
4330  :
4331else
4332  echo "$as_me: failed program was:" >&5
4333cat "conftest.$ac_ext" >&5
4334cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4335fi
4336rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4337	 fi
4338
4339echo "${as_me:-configure}:4339: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4340
4341	 CFLAGS="$cf_trim_CFLAGS"
4342	 CPPFLAGS="$cf_trim_CPPFLAGS"
4343
4344	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4345	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4346
4347echo "${as_me:-configure}:4347: testing if the second compile does not leave our definition intact error ..." 1>&5
4348
4349	 cat >"conftest.$ac_ext" <<_ACEOF
4350#line 4350 "configure"
4351#include "confdefs.h"
4352#include <sys/types.h>
4353int
4354main (void)
4355{
4356
4357#ifndef _POSIX_C_SOURCE
4358make an error
4359#endif
4360  ;
4361  return 0;
4362}
4363_ACEOF
4364rm -f "conftest.$ac_objext"
4365if { (eval echo "$as_me:4365: \"$ac_compile\"") >&5
4366  (eval $ac_compile) 2>&5
4367  ac_status=$?
4368  echo "$as_me:4368: \$? = $ac_status" >&5
4369  (exit "$ac_status"); } &&
4370         { ac_try='test -s "conftest.$ac_objext"'
4371  { (eval echo "$as_me:4371: \"$ac_try\"") >&5
4372  (eval $ac_try) 2>&5
4373  ac_status=$?
4374  echo "$as_me:4374: \$? = $ac_status" >&5
4375  (exit "$ac_status"); }; }; then
4376  :
4377else
4378  echo "$as_me: failed program was:" >&5
4379cat "conftest.$ac_ext" >&5
4380cf_cv_posix_c_source=no
4381fi
4382rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4383	 CFLAGS="$cf_save_CFLAGS"
4384	 CPPFLAGS="$cf_save_CPPFLAGS"
4385
4386fi
4387rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4388
4389fi
4390echo "$as_me:4390: result: $cf_cv_posix_c_source" >&5
4391echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4392
4393if test "$cf_cv_posix_c_source" != no ; then
4394	CFLAGS="$cf_trim_CFLAGS"
4395	CPPFLAGS="$cf_trim_CPPFLAGS"
4396
4397cf_fix_cppflags=no
4398cf_new_cflags=
4399cf_new_cppflags=
4400cf_new_extra_cppflags=
4401
4402for cf_add_cflags in $cf_cv_posix_c_source
4403do
4404case "$cf_fix_cppflags" in
4405(no)
4406	case "$cf_add_cflags" in
4407	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4408		case "$cf_add_cflags" in
4409		(-D*)
4410			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4411
4412			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4413				&& test -z "${cf_tst_cflags}" \
4414				&& cf_fix_cppflags=yes
4415
4416			if test "$cf_fix_cppflags" = yes ; then
4417
4418	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4419	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4420
4421				continue
4422			elif test "${cf_tst_cflags}" = "\"'" ; then
4423
4424	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4425	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4426
4427				continue
4428			fi
4429			;;
4430		esac
4431		case "$CPPFLAGS" in
4432		(*$cf_add_cflags)
4433			;;
4434		(*)
4435			case "$cf_add_cflags" in
4436			(-D*)
4437				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4438
4439CPPFLAGS=`echo "$CPPFLAGS" | \
4440	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4441		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4442
4443				;;
4444			esac
4445
4446	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4447	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4448
4449			;;
4450		esac
4451		;;
4452	(*)
4453
4454	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4455	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4456
4457		;;
4458	esac
4459	;;
4460(yes)
4461
4462	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4463	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4464
4465	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4466
4467	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4468		&& test -z "${cf_tst_cflags}" \
4469		&& cf_fix_cppflags=no
4470	;;
4471esac
4472done
4473
4474if test -n "$cf_new_cflags" ; then
4475
4476	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4477	CFLAGS="${CFLAGS}$cf_new_cflags"
4478
4479fi
4480
4481if test -n "$cf_new_cppflags" ; then
4482
4483	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4484	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4485
4486fi
4487
4488if test -n "$cf_new_extra_cppflags" ; then
4489
4490	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4491	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4492
4493fi
4494
4495fi
4496
4497fi # cf_cv_posix_visible
4498
4499	;;
4500(netbsd*)
4501	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4502	;;
4503(openbsd[4-9]*)
4504	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4505	cf_xopen_source="-D_BSD_SOURCE"
4506	cf_XOPEN_SOURCE=600
4507	;;
4508(openbsd*)
4509	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4510	;;
4511(osf[45]*)
4512	cf_xopen_source="-D_OSF_SOURCE"
4513	;;
4514(nto-qnx*)
4515	cf_xopen_source="-D_QNX_SOURCE"
4516	;;
4517(sco*)
4518	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4519	;;
4520(solaris2.*)
4521	cf_xopen_source="-D__EXTENSIONS__"
4522	cf_cv_xopen_source=broken
4523	;;
4524(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4525	cf_XOPEN_SOURCE=
4526	cf_POSIX_C_SOURCE=
4527	;;
4528(*)
4529
4530echo "$as_me:4530: checking if we should define _XOPEN_SOURCE" >&5
4531echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4532if test "${cf_cv_xopen_source+set}" = set; then
4533  echo $ECHO_N "(cached) $ECHO_C" >&6
4534else
4535
4536	cat >"conftest.$ac_ext" <<_ACEOF
4537#line 4537 "configure"
4538#include "confdefs.h"
4539
4540#include <stdlib.h>
4541#include <string.h>
4542#include <sys/types.h>
4543
4544int
4545main (void)
4546{
4547
4548#ifndef _XOPEN_SOURCE
4549make an error
4550#endif
4551  ;
4552  return 0;
4553}
4554_ACEOF
4555rm -f "conftest.$ac_objext"
4556if { (eval echo "$as_me:4556: \"$ac_compile\"") >&5
4557  (eval $ac_compile) 2>&5
4558  ac_status=$?
4559  echo "$as_me:4559: \$? = $ac_status" >&5
4560  (exit "$ac_status"); } &&
4561         { ac_try='test -s "conftest.$ac_objext"'
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  cf_cv_xopen_source=no
4568else
4569  echo "$as_me: failed program was:" >&5
4570cat "conftest.$ac_ext" >&5
4571cf_save="$CPPFLAGS"
4572
4573	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4574	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4575
4576	 cat >"conftest.$ac_ext" <<_ACEOF
4577#line 4577 "configure"
4578#include "confdefs.h"
4579
4580#include <stdlib.h>
4581#include <string.h>
4582#include <sys/types.h>
4583
4584int
4585main (void)
4586{
4587
4588#ifdef _XOPEN_SOURCE
4589make an error
4590#endif
4591  ;
4592  return 0;
4593}
4594_ACEOF
4595rm -f "conftest.$ac_objext"
4596if { (eval echo "$as_me:4596: \"$ac_compile\"") >&5
4597  (eval $ac_compile) 2>&5
4598  ac_status=$?
4599  echo "$as_me:4599: \$? = $ac_status" >&5
4600  (exit "$ac_status"); } &&
4601         { ac_try='test -s "conftest.$ac_objext"'
4602  { (eval echo "$as_me:4602: \"$ac_try\"") >&5
4603  (eval $ac_try) 2>&5
4604  ac_status=$?
4605  echo "$as_me:4605: \$? = $ac_status" >&5
4606  (exit "$ac_status"); }; }; then
4607  cf_cv_xopen_source=no
4608else
4609  echo "$as_me: failed program was:" >&5
4610cat "conftest.$ac_ext" >&5
4611cf_cv_xopen_source=$cf_XOPEN_SOURCE
4612fi
4613rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4614	CPPFLAGS="$cf_save"
4615
4616fi
4617rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4618
4619fi
4620echo "$as_me:4620: result: $cf_cv_xopen_source" >&5
4621echo "${ECHO_T}$cf_cv_xopen_source" >&6
4622
4623if test "$cf_cv_xopen_source" != no ; then
4624
4625CFLAGS=`echo "$CFLAGS" | \
4626	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4627		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4628
4629CPPFLAGS=`echo "$CPPFLAGS" | \
4630	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4631		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4632
4633	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4634
4635cf_fix_cppflags=no
4636cf_new_cflags=
4637cf_new_cppflags=
4638cf_new_extra_cppflags=
4639
4640for cf_add_cflags in $cf_temp_xopen_source
4641do
4642case "$cf_fix_cppflags" in
4643(no)
4644	case "$cf_add_cflags" in
4645	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4646		case "$cf_add_cflags" in
4647		(-D*)
4648			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4649
4650			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4651				&& test -z "${cf_tst_cflags}" \
4652				&& cf_fix_cppflags=yes
4653
4654			if test "$cf_fix_cppflags" = yes ; then
4655
4656	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4657	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4658
4659				continue
4660			elif test "${cf_tst_cflags}" = "\"'" ; then
4661
4662	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4663	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4664
4665				continue
4666			fi
4667			;;
4668		esac
4669		case "$CPPFLAGS" in
4670		(*$cf_add_cflags)
4671			;;
4672		(*)
4673			case "$cf_add_cflags" in
4674			(-D*)
4675				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4676
4677CPPFLAGS=`echo "$CPPFLAGS" | \
4678	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4679		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4680
4681				;;
4682			esac
4683
4684	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4685	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4686
4687			;;
4688		esac
4689		;;
4690	(*)
4691
4692	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4693	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4694
4695		;;
4696	esac
4697	;;
4698(yes)
4699
4700	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4701	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4702
4703	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4704
4705	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4706		&& test -z "${cf_tst_cflags}" \
4707		&& cf_fix_cppflags=no
4708	;;
4709esac
4710done
4711
4712if test -n "$cf_new_cflags" ; then
4713
4714	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4715	CFLAGS="${CFLAGS}$cf_new_cflags"
4716
4717fi
4718
4719if test -n "$cf_new_cppflags" ; then
4720
4721	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4722	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4723
4724fi
4725
4726if test -n "$cf_new_extra_cppflags" ; then
4727
4728	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4729	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4730
4731fi
4732
4733fi
4734
4735if test "$cf_cv_posix_visible" = no; then
4736
4737cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4738
4739cf_save_CFLAGS="$CFLAGS"
4740cf_save_CPPFLAGS="$CPPFLAGS"
4741
4742cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4743	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4744		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4745
4746cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4747	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4748		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4749
4750echo "$as_me:4750: checking if we should define _POSIX_C_SOURCE" >&5
4751echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4752if test "${cf_cv_posix_c_source+set}" = set; then
4753  echo $ECHO_N "(cached) $ECHO_C" >&6
4754else
4755
4756echo "${as_me:-configure}:4756: testing if the symbol is already defined go no further ..." 1>&5
4757
4758	cat >"conftest.$ac_ext" <<_ACEOF
4759#line 4759 "configure"
4760#include "confdefs.h"
4761#include <sys/types.h>
4762int
4763main (void)
4764{
4765
4766#ifndef _POSIX_C_SOURCE
4767make an error
4768#endif
4769  ;
4770  return 0;
4771}
4772_ACEOF
4773rm -f "conftest.$ac_objext"
4774if { (eval echo "$as_me:4774: \"$ac_compile\"") >&5
4775  (eval $ac_compile) 2>&5
4776  ac_status=$?
4777  echo "$as_me:4777: \$? = $ac_status" >&5
4778  (exit "$ac_status"); } &&
4779         { ac_try='test -s "conftest.$ac_objext"'
4780  { (eval echo "$as_me:4780: \"$ac_try\"") >&5
4781  (eval $ac_try) 2>&5
4782  ac_status=$?
4783  echo "$as_me:4783: \$? = $ac_status" >&5
4784  (exit "$ac_status"); }; }; then
4785  cf_cv_posix_c_source=no
4786else
4787  echo "$as_me: failed program was:" >&5
4788cat "conftest.$ac_ext" >&5
4789cf_want_posix_source=no
4790	 case .$cf_POSIX_C_SOURCE in
4791	 (.[12]??*)
4792		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4793		;;
4794	 (.2)
4795		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4796		cf_want_posix_source=yes
4797		;;
4798	 (.*)
4799		cf_want_posix_source=yes
4800		;;
4801	 esac
4802	 if test "$cf_want_posix_source" = yes ; then
4803		cat >"conftest.$ac_ext" <<_ACEOF
4804#line 4804 "configure"
4805#include "confdefs.h"
4806#include <sys/types.h>
4807int
4808main (void)
4809{
4810
4811#ifdef _POSIX_SOURCE
4812make an error
4813#endif
4814  ;
4815  return 0;
4816}
4817_ACEOF
4818rm -f "conftest.$ac_objext"
4819if { (eval echo "$as_me:4819: \"$ac_compile\"") >&5
4820  (eval $ac_compile) 2>&5
4821  ac_status=$?
4822  echo "$as_me:4822: \$? = $ac_status" >&5
4823  (exit "$ac_status"); } &&
4824         { ac_try='test -s "conftest.$ac_objext"'
4825  { (eval echo "$as_me:4825: \"$ac_try\"") >&5
4826  (eval $ac_try) 2>&5
4827  ac_status=$?
4828  echo "$as_me:4828: \$? = $ac_status" >&5
4829  (exit "$ac_status"); }; }; then
4830  :
4831else
4832  echo "$as_me: failed program was:" >&5
4833cat "conftest.$ac_ext" >&5
4834cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4835fi
4836rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4837	 fi
4838
4839echo "${as_me:-configure}:4839: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4840
4841	 CFLAGS="$cf_trim_CFLAGS"
4842	 CPPFLAGS="$cf_trim_CPPFLAGS"
4843
4844	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4845	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4846
4847echo "${as_me:-configure}:4847: testing if the second compile does not leave our definition intact error ..." 1>&5
4848
4849	 cat >"conftest.$ac_ext" <<_ACEOF
4850#line 4850 "configure"
4851#include "confdefs.h"
4852#include <sys/types.h>
4853int
4854main (void)
4855{
4856
4857#ifndef _POSIX_C_SOURCE
4858make an error
4859#endif
4860  ;
4861  return 0;
4862}
4863_ACEOF
4864rm -f "conftest.$ac_objext"
4865if { (eval echo "$as_me:4865: \"$ac_compile\"") >&5
4866  (eval $ac_compile) 2>&5
4867  ac_status=$?
4868  echo "$as_me:4868: \$? = $ac_status" >&5
4869  (exit "$ac_status"); } &&
4870         { ac_try='test -s "conftest.$ac_objext"'
4871  { (eval echo "$as_me:4871: \"$ac_try\"") >&5
4872  (eval $ac_try) 2>&5
4873  ac_status=$?
4874  echo "$as_me:4874: \$? = $ac_status" >&5
4875  (exit "$ac_status"); }; }; then
4876  :
4877else
4878  echo "$as_me: failed program was:" >&5
4879cat "conftest.$ac_ext" >&5
4880cf_cv_posix_c_source=no
4881fi
4882rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4883	 CFLAGS="$cf_save_CFLAGS"
4884	 CPPFLAGS="$cf_save_CPPFLAGS"
4885
4886fi
4887rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4888
4889fi
4890echo "$as_me:4890: result: $cf_cv_posix_c_source" >&5
4891echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4892
4893if test "$cf_cv_posix_c_source" != no ; then
4894	CFLAGS="$cf_trim_CFLAGS"
4895	CPPFLAGS="$cf_trim_CPPFLAGS"
4896
4897cf_fix_cppflags=no
4898cf_new_cflags=
4899cf_new_cppflags=
4900cf_new_extra_cppflags=
4901
4902for cf_add_cflags in $cf_cv_posix_c_source
4903do
4904case "$cf_fix_cppflags" in
4905(no)
4906	case "$cf_add_cflags" in
4907	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4908		case "$cf_add_cflags" in
4909		(-D*)
4910			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4911
4912			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4913				&& test -z "${cf_tst_cflags}" \
4914				&& cf_fix_cppflags=yes
4915
4916			if test "$cf_fix_cppflags" = yes ; then
4917
4918	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4919	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4920
4921				continue
4922			elif test "${cf_tst_cflags}" = "\"'" ; then
4923
4924	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4925	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4926
4927				continue
4928			fi
4929			;;
4930		esac
4931		case "$CPPFLAGS" in
4932		(*$cf_add_cflags)
4933			;;
4934		(*)
4935			case "$cf_add_cflags" in
4936			(-D*)
4937				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4938
4939CPPFLAGS=`echo "$CPPFLAGS" | \
4940	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4941		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4942
4943				;;
4944			esac
4945
4946	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4947	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4948
4949			;;
4950		esac
4951		;;
4952	(*)
4953
4954	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4955	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4956
4957		;;
4958	esac
4959	;;
4960(yes)
4961
4962	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4963	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4964
4965	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4966
4967	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4968		&& test -z "${cf_tst_cflags}" \
4969		&& cf_fix_cppflags=no
4970	;;
4971esac
4972done
4973
4974if test -n "$cf_new_cflags" ; then
4975
4976	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4977	CFLAGS="${CFLAGS}$cf_new_cflags"
4978
4979fi
4980
4981if test -n "$cf_new_cppflags" ; then
4982
4983	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4984	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4985
4986fi
4987
4988if test -n "$cf_new_extra_cppflags" ; then
4989
4990	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4991	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4992
4993fi
4994
4995fi
4996
4997fi # cf_cv_posix_visible
4998
4999	;;
5000esac
5001
5002if test -n "$cf_xopen_source" ; then
5003
5004cf_fix_cppflags=no
5005cf_new_cflags=
5006cf_new_cppflags=
5007cf_new_extra_cppflags=
5008
5009for cf_add_cflags in $cf_xopen_source
5010do
5011case "$cf_fix_cppflags" in
5012(no)
5013	case "$cf_add_cflags" in
5014	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5015		case "$cf_add_cflags" in
5016		(-D*)
5017			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5018
5019			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5020				&& test -z "${cf_tst_cflags}" \
5021				&& cf_fix_cppflags=yes
5022
5023			if test "$cf_fix_cppflags" = yes ; then
5024
5025	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5026	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5027
5028				continue
5029			elif test "${cf_tst_cflags}" = "\"'" ; then
5030
5031	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5032	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5033
5034				continue
5035			fi
5036			;;
5037		esac
5038		case "$CPPFLAGS" in
5039		(*$cf_add_cflags)
5040			;;
5041		(*)
5042			case "$cf_add_cflags" in
5043			(-D*)
5044				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5045
5046CPPFLAGS=`echo "$CPPFLAGS" | \
5047	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
5048		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
5049
5050				;;
5051			esac
5052
5053	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5054	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5055
5056			;;
5057		esac
5058		;;
5059	(*)
5060
5061	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5062	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5063
5064		;;
5065	esac
5066	;;
5067(yes)
5068
5069	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5070	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5071
5072	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5073
5074	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5075		&& test -z "${cf_tst_cflags}" \
5076		&& cf_fix_cppflags=no
5077	;;
5078esac
5079done
5080
5081if test -n "$cf_new_cflags" ; then
5082	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
5083
5084echo "${as_me:-configure}:5084: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5085
5086	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5087	CFLAGS="${CFLAGS}$cf_new_cflags"
5088
5089fi
5090
5091if test -n "$cf_new_cppflags" ; then
5092	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5093
5094echo "${as_me:-configure}:5094: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5095
5096	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5097	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5098
5099fi
5100
5101if test -n "$cf_new_extra_cppflags" ; then
5102	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5103
5104echo "${as_me:-configure}:5104: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5105
5106	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5107	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5108
5109fi
5110
5111fi
5112
5113if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5114	echo "$as_me:5114: checking if _XOPEN_SOURCE really is set" >&5
5115echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5116	cat >"conftest.$ac_ext" <<_ACEOF
5117#line 5117 "configure"
5118#include "confdefs.h"
5119#include <stdlib.h>
5120int
5121main (void)
5122{
5123
5124#ifndef _XOPEN_SOURCE
5125make an error
5126#endif
5127  ;
5128  return 0;
5129}
5130_ACEOF
5131rm -f "conftest.$ac_objext"
5132if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
5133  (eval $ac_compile) 2>&5
5134  ac_status=$?
5135  echo "$as_me:5135: \$? = $ac_status" >&5
5136  (exit "$ac_status"); } &&
5137         { ac_try='test -s "conftest.$ac_objext"'
5138  { (eval echo "$as_me:5138: \"$ac_try\"") >&5
5139  (eval $ac_try) 2>&5
5140  ac_status=$?
5141  echo "$as_me:5141: \$? = $ac_status" >&5
5142  (exit "$ac_status"); }; }; then
5143  cf_XOPEN_SOURCE_set=yes
5144else
5145  echo "$as_me: failed program was:" >&5
5146cat "conftest.$ac_ext" >&5
5147cf_XOPEN_SOURCE_set=no
5148fi
5149rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5150	echo "$as_me:5150: result: $cf_XOPEN_SOURCE_set" >&5
5151echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5152	if test "$cf_XOPEN_SOURCE_set" = yes
5153	then
5154		cat >"conftest.$ac_ext" <<_ACEOF
5155#line 5155 "configure"
5156#include "confdefs.h"
5157#include <stdlib.h>
5158int
5159main (void)
5160{
5161
5162#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5163make an error
5164#endif
5165  ;
5166  return 0;
5167}
5168_ACEOF
5169rm -f "conftest.$ac_objext"
5170if { (eval echo "$as_me:5170: \"$ac_compile\"") >&5
5171  (eval $ac_compile) 2>&5
5172  ac_status=$?
5173  echo "$as_me:5173: \$? = $ac_status" >&5
5174  (exit "$ac_status"); } &&
5175         { ac_try='test -s "conftest.$ac_objext"'
5176  { (eval echo "$as_me:5176: \"$ac_try\"") >&5
5177  (eval $ac_try) 2>&5
5178  ac_status=$?
5179  echo "$as_me:5179: \$? = $ac_status" >&5
5180  (exit "$ac_status"); }; }; then
5181  cf_XOPEN_SOURCE_set_ok=yes
5182else
5183  echo "$as_me: failed program was:" >&5
5184cat "conftest.$ac_ext" >&5
5185cf_XOPEN_SOURCE_set_ok=no
5186fi
5187rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5188		if test "$cf_XOPEN_SOURCE_set_ok" = no
5189		then
5190			{ echo "$as_me:5190: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5191echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5192		fi
5193	else
5194
5195echo "$as_me:5195: checking if we should define _XOPEN_SOURCE" >&5
5196echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5197if test "${cf_cv_xopen_source+set}" = set; then
5198  echo $ECHO_N "(cached) $ECHO_C" >&6
5199else
5200
5201	cat >"conftest.$ac_ext" <<_ACEOF
5202#line 5202 "configure"
5203#include "confdefs.h"
5204
5205#include <stdlib.h>
5206#include <string.h>
5207#include <sys/types.h>
5208
5209int
5210main (void)
5211{
5212
5213#ifndef _XOPEN_SOURCE
5214make an error
5215#endif
5216  ;
5217  return 0;
5218}
5219_ACEOF
5220rm -f "conftest.$ac_objext"
5221if { (eval echo "$as_me:5221: \"$ac_compile\"") >&5
5222  (eval $ac_compile) 2>&5
5223  ac_status=$?
5224  echo "$as_me:5224: \$? = $ac_status" >&5
5225  (exit "$ac_status"); } &&
5226         { ac_try='test -s "conftest.$ac_objext"'
5227  { (eval echo "$as_me:5227: \"$ac_try\"") >&5
5228  (eval $ac_try) 2>&5
5229  ac_status=$?
5230  echo "$as_me:5230: \$? = $ac_status" >&5
5231  (exit "$ac_status"); }; }; then
5232  cf_cv_xopen_source=no
5233else
5234  echo "$as_me: failed program was:" >&5
5235cat "conftest.$ac_ext" >&5
5236cf_save="$CPPFLAGS"
5237
5238	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5239	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5240
5241	 cat >"conftest.$ac_ext" <<_ACEOF
5242#line 5242 "configure"
5243#include "confdefs.h"
5244
5245#include <stdlib.h>
5246#include <string.h>
5247#include <sys/types.h>
5248
5249int
5250main (void)
5251{
5252
5253#ifdef _XOPEN_SOURCE
5254make an error
5255#endif
5256  ;
5257  return 0;
5258}
5259_ACEOF
5260rm -f "conftest.$ac_objext"
5261if { (eval echo "$as_me:5261: \"$ac_compile\"") >&5
5262  (eval $ac_compile) 2>&5
5263  ac_status=$?
5264  echo "$as_me:5264: \$? = $ac_status" >&5
5265  (exit "$ac_status"); } &&
5266         { ac_try='test -s "conftest.$ac_objext"'
5267  { (eval echo "$as_me:5267: \"$ac_try\"") >&5
5268  (eval $ac_try) 2>&5
5269  ac_status=$?
5270  echo "$as_me:5270: \$? = $ac_status" >&5
5271  (exit "$ac_status"); }; }; then
5272  cf_cv_xopen_source=no
5273else
5274  echo "$as_me: failed program was:" >&5
5275cat "conftest.$ac_ext" >&5
5276cf_cv_xopen_source=$cf_XOPEN_SOURCE
5277fi
5278rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5279	CPPFLAGS="$cf_save"
5280
5281fi
5282rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5283
5284fi
5285echo "$as_me:5285: result: $cf_cv_xopen_source" >&5
5286echo "${ECHO_T}$cf_cv_xopen_source" >&6
5287
5288if test "$cf_cv_xopen_source" != no ; then
5289
5290CFLAGS=`echo "$CFLAGS" | \
5291	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
5292		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
5293
5294CPPFLAGS=`echo "$CPPFLAGS" | \
5295	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
5296		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
5297
5298	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5299
5300cf_fix_cppflags=no
5301cf_new_cflags=
5302cf_new_cppflags=
5303cf_new_extra_cppflags=
5304
5305for cf_add_cflags in $cf_temp_xopen_source
5306do
5307case "$cf_fix_cppflags" in
5308(no)
5309	case "$cf_add_cflags" in
5310	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5311		case "$cf_add_cflags" in
5312		(-D*)
5313			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5314
5315			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5316				&& test -z "${cf_tst_cflags}" \
5317				&& cf_fix_cppflags=yes
5318
5319			if test "$cf_fix_cppflags" = yes ; then
5320
5321	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5322	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5323
5324				continue
5325			elif test "${cf_tst_cflags}" = "\"'" ; then
5326
5327	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5328	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5329
5330				continue
5331			fi
5332			;;
5333		esac
5334		case "$CPPFLAGS" in
5335		(*$cf_add_cflags)
5336			;;
5337		(*)
5338			case "$cf_add_cflags" in
5339			(-D*)
5340				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5341
5342CPPFLAGS=`echo "$CPPFLAGS" | \
5343	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
5344		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
5345
5346				;;
5347			esac
5348
5349	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5350	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5351
5352			;;
5353		esac
5354		;;
5355	(*)
5356
5357	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5358	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5359
5360		;;
5361	esac
5362	;;
5363(yes)
5364
5365	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5366	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5367
5368	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5369
5370	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5371		&& test -z "${cf_tst_cflags}" \
5372		&& cf_fix_cppflags=no
5373	;;
5374esac
5375done
5376
5377if test -n "$cf_new_cflags" ; then
5378
5379	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5380	CFLAGS="${CFLAGS}$cf_new_cflags"
5381
5382fi
5383
5384if test -n "$cf_new_cppflags" ; then
5385
5386	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5387	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5388
5389fi
5390
5391if test -n "$cf_new_extra_cppflags" ; then
5392
5393	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5394	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5395
5396fi
5397
5398fi
5399
5400	fi
5401fi
5402fi # cf_cv_posix_visible
5403
5404# Check whether --enable-largefile or --disable-largefile was given.
5405if test "${enable_largefile+set}" = set; then
5406  enableval="$enable_largefile"
5407
5408fi;
5409if test "$enable_largefile" != no; then
5410
5411  echo "$as_me:5411: checking for special C compiler options needed for large files" >&5
5412echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
5413if test "${ac_cv_sys_largefile_CC+set}" = set; then
5414  echo $ECHO_N "(cached) $ECHO_C" >&6
5415else
5416  ac_cv_sys_largefile_CC=no
5417     if test "$GCC" != yes; then
5418       ac_save_CC=$CC
5419       while :; do
5420     	 # IRIX 6.2 and later do not support large files by default,
5421     	 # so use the C compiler's -n32 option if that helps.
5422         cat >"conftest.$ac_ext" <<_ACEOF
5423#line 5423 "configure"
5424#include "confdefs.h"
5425#include <sys/types.h>
5426 /* Check that off_t can represent 2**63 - 1 correctly.
5427    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5428    since some C++ compilers masquerading as C compilers
5429    incorrectly reject 9223372036854775807.  */
5430#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5431  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5432		       && LARGE_OFF_T % 2147483647 == 1)
5433		      ? 1 : -1];
5434int
5435main (void)
5436{
5437
5438  ;
5439  return 0;
5440}
5441_ACEOF
5442     	 rm -f "conftest.$ac_objext"
5443if { (eval echo "$as_me:5443: \"$ac_compile\"") >&5
5444  (eval $ac_compile) 2>&5
5445  ac_status=$?
5446  echo "$as_me:5446: \$? = $ac_status" >&5
5447  (exit "$ac_status"); } &&
5448         { ac_try='test -s "conftest.$ac_objext"'
5449  { (eval echo "$as_me:5449: \"$ac_try\"") >&5
5450  (eval $ac_try) 2>&5
5451  ac_status=$?
5452  echo "$as_me:5452: \$? = $ac_status" >&5
5453  (exit "$ac_status"); }; }; then
5454  break
5455else
5456  echo "$as_me: failed program was:" >&5
5457cat "conftest.$ac_ext" >&5
5458fi
5459rm -f "conftest.$ac_objext"
5460     	 CC="$CC -n32"
5461     	 rm -f "conftest.$ac_objext"
5462if { (eval echo "$as_me:5462: \"$ac_compile\"") >&5
5463  (eval $ac_compile) 2>&5
5464  ac_status=$?
5465  echo "$as_me:5465: \$? = $ac_status" >&5
5466  (exit "$ac_status"); } &&
5467         { ac_try='test -s "conftest.$ac_objext"'
5468  { (eval echo "$as_me:5468: \"$ac_try\"") >&5
5469  (eval $ac_try) 2>&5
5470  ac_status=$?
5471  echo "$as_me:5471: \$? = $ac_status" >&5
5472  (exit "$ac_status"); }; }; then
5473  ac_cv_sys_largefile_CC=' -n32'; break
5474else
5475  echo "$as_me: failed program was:" >&5
5476cat "conftest.$ac_ext" >&5
5477fi
5478rm -f "conftest.$ac_objext"
5479         break
5480       done
5481       CC=$ac_save_CC
5482       rm -f "conftest.$ac_ext"
5483    fi
5484fi
5485echo "$as_me:5485: result: $ac_cv_sys_largefile_CC" >&5
5486echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
5487  if test "$ac_cv_sys_largefile_CC" != no; then
5488    CC=$CC$ac_cv_sys_largefile_CC
5489  fi
5490
5491  echo "$as_me:5491: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5492echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
5493if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5494  echo $ECHO_N "(cached) $ECHO_C" >&6
5495else
5496  while :; do
5497  ac_cv_sys_file_offset_bits=no
5498  cat >"conftest.$ac_ext" <<_ACEOF
5499#line 5499 "configure"
5500#include "confdefs.h"
5501#include <sys/types.h>
5502 /* Check that off_t can represent 2**63 - 1 correctly.
5503    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5504    since some C++ compilers masquerading as C compilers
5505    incorrectly reject 9223372036854775807.  */
5506#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5507  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5508		       && LARGE_OFF_T % 2147483647 == 1)
5509		      ? 1 : -1];
5510int
5511main (void)
5512{
5513
5514  ;
5515  return 0;
5516}
5517_ACEOF
5518rm -f "conftest.$ac_objext"
5519if { (eval echo "$as_me:5519: \"$ac_compile\"") >&5
5520  (eval $ac_compile) 2>&5
5521  ac_status=$?
5522  echo "$as_me:5522: \$? = $ac_status" >&5
5523  (exit "$ac_status"); } &&
5524         { ac_try='test -s "conftest.$ac_objext"'
5525  { (eval echo "$as_me:5525: \"$ac_try\"") >&5
5526  (eval $ac_try) 2>&5
5527  ac_status=$?
5528  echo "$as_me:5528: \$? = $ac_status" >&5
5529  (exit "$ac_status"); }; }; then
5530  break
5531else
5532  echo "$as_me: failed program was:" >&5
5533cat "conftest.$ac_ext" >&5
5534fi
5535rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5536  cat >"conftest.$ac_ext" <<_ACEOF
5537#line 5537 "configure"
5538#include "confdefs.h"
5539#define _FILE_OFFSET_BITS 64
5540#include <sys/types.h>
5541 /* Check that off_t can represent 2**63 - 1 correctly.
5542    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5543    since some C++ compilers masquerading as C compilers
5544    incorrectly reject 9223372036854775807.  */
5545#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5546  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5547		       && LARGE_OFF_T % 2147483647 == 1)
5548		      ? 1 : -1];
5549int
5550main (void)
5551{
5552
5553  ;
5554  return 0;
5555}
5556_ACEOF
5557rm -f "conftest.$ac_objext"
5558if { (eval echo "$as_me:5558: \"$ac_compile\"") >&5
5559  (eval $ac_compile) 2>&5
5560  ac_status=$?
5561  echo "$as_me:5561: \$? = $ac_status" >&5
5562  (exit "$ac_status"); } &&
5563         { ac_try='test -s "conftest.$ac_objext"'
5564  { (eval echo "$as_me:5564: \"$ac_try\"") >&5
5565  (eval $ac_try) 2>&5
5566  ac_status=$?
5567  echo "$as_me:5567: \$? = $ac_status" >&5
5568  (exit "$ac_status"); }; }; then
5569  ac_cv_sys_file_offset_bits=64; break
5570else
5571  echo "$as_me: failed program was:" >&5
5572cat "conftest.$ac_ext" >&5
5573fi
5574rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5575  break
5576done
5577fi
5578echo "$as_me:5578: result: $ac_cv_sys_file_offset_bits" >&5
5579echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
5580if test "$ac_cv_sys_file_offset_bits" != no; then
5581
5582cat >>confdefs.h <<EOF
5583#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5584EOF
5585
5586fi
5587rm -rf conftest*
5588  echo "$as_me:5588: checking for _LARGE_FILES value needed for large files" >&5
5589echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
5590if test "${ac_cv_sys_large_files+set}" = set; then
5591  echo $ECHO_N "(cached) $ECHO_C" >&6
5592else
5593  while :; do
5594  ac_cv_sys_large_files=no
5595  cat >"conftest.$ac_ext" <<_ACEOF
5596#line 5596 "configure"
5597#include "confdefs.h"
5598#include <sys/types.h>
5599 /* Check that off_t can represent 2**63 - 1 correctly.
5600    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5601    since some C++ compilers masquerading as C compilers
5602    incorrectly reject 9223372036854775807.  */
5603#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5604  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5605		       && LARGE_OFF_T % 2147483647 == 1)
5606		      ? 1 : -1];
5607int
5608main (void)
5609{
5610
5611  ;
5612  return 0;
5613}
5614_ACEOF
5615rm -f "conftest.$ac_objext"
5616if { (eval echo "$as_me:5616: \"$ac_compile\"") >&5
5617  (eval $ac_compile) 2>&5
5618  ac_status=$?
5619  echo "$as_me:5619: \$? = $ac_status" >&5
5620  (exit "$ac_status"); } &&
5621         { ac_try='test -s "conftest.$ac_objext"'
5622  { (eval echo "$as_me:5622: \"$ac_try\"") >&5
5623  (eval $ac_try) 2>&5
5624  ac_status=$?
5625  echo "$as_me:5625: \$? = $ac_status" >&5
5626  (exit "$ac_status"); }; }; then
5627  break
5628else
5629  echo "$as_me: failed program was:" >&5
5630cat "conftest.$ac_ext" >&5
5631fi
5632rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5633  cat >"conftest.$ac_ext" <<_ACEOF
5634#line 5634 "configure"
5635#include "confdefs.h"
5636#define _LARGE_FILES 1
5637#include <sys/types.h>
5638 /* Check that off_t can represent 2**63 - 1 correctly.
5639    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5640    since some C++ compilers masquerading as C compilers
5641    incorrectly reject 9223372036854775807.  */
5642#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5643  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5644		       && LARGE_OFF_T % 2147483647 == 1)
5645		      ? 1 : -1];
5646int
5647main (void)
5648{
5649
5650  ;
5651  return 0;
5652}
5653_ACEOF
5654rm -f "conftest.$ac_objext"
5655if { (eval echo "$as_me:5655: \"$ac_compile\"") >&5
5656  (eval $ac_compile) 2>&5
5657  ac_status=$?
5658  echo "$as_me:5658: \$? = $ac_status" >&5
5659  (exit "$ac_status"); } &&
5660         { ac_try='test -s "conftest.$ac_objext"'
5661  { (eval echo "$as_me:5661: \"$ac_try\"") >&5
5662  (eval $ac_try) 2>&5
5663  ac_status=$?
5664  echo "$as_me:5664: \$? = $ac_status" >&5
5665  (exit "$ac_status"); }; }; then
5666  ac_cv_sys_large_files=1; break
5667else
5668  echo "$as_me: failed program was:" >&5
5669cat "conftest.$ac_ext" >&5
5670fi
5671rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5672  break
5673done
5674fi
5675echo "$as_me:5675: result: $ac_cv_sys_large_files" >&5
5676echo "${ECHO_T}$ac_cv_sys_large_files" >&6
5677if test "$ac_cv_sys_large_files" != no; then
5678
5679cat >>confdefs.h <<EOF
5680#define _LARGE_FILES $ac_cv_sys_large_files
5681EOF
5682
5683fi
5684rm -rf conftest*
5685fi
5686
5687	if test "$enable_largefile" != no ; then
5688	echo "$as_me:5688: checking for _LARGEFILE_SOURCE value needed for large files" >&5
5689echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
5690if test "${ac_cv_sys_largefile_source+set}" = set; then
5691  echo $ECHO_N "(cached) $ECHO_C" >&6
5692else
5693  while :; do
5694  ac_cv_sys_largefile_source=no
5695  cat >"conftest.$ac_ext" <<_ACEOF
5696#line 5696 "configure"
5697#include "confdefs.h"
5698#include <stdio.h>
5699int
5700main (void)
5701{
5702return !fseeko;
5703  ;
5704  return 0;
5705}
5706_ACEOF
5707rm -f "conftest.$ac_objext"
5708if { (eval echo "$as_me:5708: \"$ac_compile\"") >&5
5709  (eval $ac_compile) 2>&5
5710  ac_status=$?
5711  echo "$as_me:5711: \$? = $ac_status" >&5
5712  (exit "$ac_status"); } &&
5713         { ac_try='test -s "conftest.$ac_objext"'
5714  { (eval echo "$as_me:5714: \"$ac_try\"") >&5
5715  (eval $ac_try) 2>&5
5716  ac_status=$?
5717  echo "$as_me:5717: \$? = $ac_status" >&5
5718  (exit "$ac_status"); }; }; then
5719  break
5720else
5721  echo "$as_me: failed program was:" >&5
5722cat "conftest.$ac_ext" >&5
5723fi
5724rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5725  cat >"conftest.$ac_ext" <<_ACEOF
5726#line 5726 "configure"
5727#include "confdefs.h"
5728#define _LARGEFILE_SOURCE 1
5729#include <stdio.h>
5730int
5731main (void)
5732{
5733return !fseeko;
5734  ;
5735  return 0;
5736}
5737_ACEOF
5738rm -f "conftest.$ac_objext"
5739if { (eval echo "$as_me:5739: \"$ac_compile\"") >&5
5740  (eval $ac_compile) 2>&5
5741  ac_status=$?
5742  echo "$as_me:5742: \$? = $ac_status" >&5
5743  (exit "$ac_status"); } &&
5744         { ac_try='test -s "conftest.$ac_objext"'
5745  { (eval echo "$as_me:5745: \"$ac_try\"") >&5
5746  (eval $ac_try) 2>&5
5747  ac_status=$?
5748  echo "$as_me:5748: \$? = $ac_status" >&5
5749  (exit "$ac_status"); }; }; then
5750  ac_cv_sys_largefile_source=1; break
5751else
5752  echo "$as_me: failed program was:" >&5
5753cat "conftest.$ac_ext" >&5
5754fi
5755rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5756  break
5757done
5758fi
5759echo "$as_me:5759: result: $ac_cv_sys_largefile_source" >&5
5760echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
5761if test "$ac_cv_sys_largefile_source" != no; then
5762
5763cat >>confdefs.h <<EOF
5764#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
5765EOF
5766
5767fi
5768rm -rf conftest*
5769
5770# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
5771# in glibc 2.1.3, but that breaks too many other things.
5772# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
5773echo "$as_me:5773: checking for fseeko" >&5
5774echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
5775if test "${ac_cv_func_fseeko+set}" = set; then
5776  echo $ECHO_N "(cached) $ECHO_C" >&6
5777else
5778  cat >"conftest.$ac_ext" <<_ACEOF
5779#line 5779 "configure"
5780#include "confdefs.h"
5781#include <stdio.h>
5782int
5783main (void)
5784{
5785return fseeko && fseeko (stdin, 0, 0);
5786  ;
5787  return 0;
5788}
5789_ACEOF
5790rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5791if { (eval echo "$as_me:5791: \"$ac_link\"") >&5
5792  (eval $ac_link) 2>&5
5793  ac_status=$?
5794  echo "$as_me:5794: \$? = $ac_status" >&5
5795  (exit "$ac_status"); } &&
5796         { ac_try='test -s "conftest$ac_exeext"'
5797  { (eval echo "$as_me:5797: \"$ac_try\"") >&5
5798  (eval $ac_try) 2>&5
5799  ac_status=$?
5800  echo "$as_me:5800: \$? = $ac_status" >&5
5801  (exit "$ac_status"); }; }; then
5802  ac_cv_func_fseeko=yes
5803else
5804  echo "$as_me: failed program was:" >&5
5805cat "conftest.$ac_ext" >&5
5806ac_cv_func_fseeko=no
5807fi
5808rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5809fi
5810echo "$as_me:5810: result: $ac_cv_func_fseeko" >&5
5811echo "${ECHO_T}$ac_cv_func_fseeko" >&6
5812if test $ac_cv_func_fseeko = yes; then
5813
5814cat >>confdefs.h <<\EOF
5815#define HAVE_FSEEKO 1
5816EOF
5817
5818fi
5819
5820	# Normally we would collect these definitions in the config.h,
5821	# but (like _XOPEN_SOURCE), some environments rely on having these
5822	# defined before any of the system headers are included.  Another
5823	# case comes up with C++, e.g., on AIX the compiler compiles the
5824	# header files by themselves before looking at the body files it is
5825	# told to compile.  For ncurses, those header files do not include
5826	# the config.h
5827	if test "$ac_cv_sys_large_files" != no
5828	then
5829
5830	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5831	CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
5832
5833	fi
5834	if test "$ac_cv_sys_largefile_source" != no
5835	then
5836
5837	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5838	CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
5839
5840	fi
5841	if test "$ac_cv_sys_file_offset_bits" != no
5842	then
5843
5844	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5845	CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5846
5847	fi
5848
5849	echo "$as_me:5849: checking whether to use struct dirent64" >&5
5850echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
5851if test "${cf_cv_struct_dirent64+set}" = set; then
5852  echo $ECHO_N "(cached) $ECHO_C" >&6
5853else
5854
5855		cat >"conftest.$ac_ext" <<_ACEOF
5856#line 5856 "configure"
5857#include "confdefs.h"
5858
5859#pragma GCC diagnostic error "-Wincompatible-pointer-types"
5860#include <sys/types.h>
5861#include <dirent.h>
5862
5863int
5864main (void)
5865{
5866
5867		/* if transitional largefile support is setup, this is true */
5868		extern struct dirent64 * readdir(DIR *);
5869		struct dirent64 *x = readdir((DIR *)0);
5870		struct dirent *y = readdir((DIR *)0);
5871		int z = x - y;
5872		(void)z;
5873
5874  ;
5875  return 0;
5876}
5877_ACEOF
5878rm -f "conftest.$ac_objext"
5879if { (eval echo "$as_me:5879: \"$ac_compile\"") >&5
5880  (eval $ac_compile) 2>&5
5881  ac_status=$?
5882  echo "$as_me:5882: \$? = $ac_status" >&5
5883  (exit "$ac_status"); } &&
5884         { ac_try='test -s "conftest.$ac_objext"'
5885  { (eval echo "$as_me:5885: \"$ac_try\"") >&5
5886  (eval $ac_try) 2>&5
5887  ac_status=$?
5888  echo "$as_me:5888: \$? = $ac_status" >&5
5889  (exit "$ac_status"); }; }; then
5890  cf_cv_struct_dirent64=yes
5891else
5892  echo "$as_me: failed program was:" >&5
5893cat "conftest.$ac_ext" >&5
5894cf_cv_struct_dirent64=no
5895fi
5896rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5897
5898fi
5899echo "$as_me:5899: result: $cf_cv_struct_dirent64" >&5
5900echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
5901	test "$cf_cv_struct_dirent64" = yes &&
5902cat >>confdefs.h <<\EOF
5903#define HAVE_STRUCT_DIRENT64 1
5904EOF
5905
5906	fi
5907
5908echo "$as_me:5908: checking for install-prefix" >&5
5909echo $ECHO_N "checking for install-prefix... $ECHO_C" >&6
5910
5911# Check whether --with-install-prefix or --without-install-prefix was given.
5912if test "${with_install_prefix+set}" = set; then
5913  withval="$with_install_prefix"
5914  cf_opt_with_install_prefix=$withval
5915else
5916  cf_opt_with_install_prefix=${DESTDIR:-no}
5917fi;
5918echo "$as_me:5918: result: $cf_opt_with_install_prefix" >&5
5919echo "${ECHO_T}$cf_opt_with_install_prefix" >&6
5920if test "$cf_opt_with_install_prefix" != no ; then
5921
5922if test "x$prefix" != xNONE; then
5923	cf_path_syntax="$prefix"
5924else
5925	cf_path_syntax="$ac_default_prefix"
5926fi
5927
5928case ".$cf_opt_with_install_prefix" in
5929(.\$\(*\)*|.\'*\'*)
5930	;;
5931(..|./*|.\\*)
5932	;;
5933(.[a-zA-Z]:[\\/]*) # OS/2 EMX
5934	;;
5935(.\$\{*prefix\}*|.\$\{*dir\}*)
5936	eval cf_opt_with_install_prefix="$cf_opt_with_install_prefix"
5937	case ".$cf_opt_with_install_prefix" in
5938	(.NONE/*)
5939		cf_opt_with_install_prefix=`echo "$cf_opt_with_install_prefix" | sed -e s%NONE%$cf_path_syntax%`
5940		;;
5941	esac
5942	;;
5943(.no|.NONE/*)
5944	cf_opt_with_install_prefix=`echo "$cf_opt_with_install_prefix" | sed -e s%NONE%$cf_path_syntax%`
5945	;;
5946(*)
5947	{ { echo "$as_me:5947: error: expected a pathname, not \"$cf_opt_with_install_prefix\"" >&5
5948echo "$as_me: error: expected a pathname, not \"$cf_opt_with_install_prefix\"" >&2;}
5949   { (exit 1); exit 1; }; }
5950	;;
5951esac
5952
5953	DESTDIR=$cf_opt_with_install_prefix
5954fi
5955
5956if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
5957then
5958	echo "$as_me:5958: checking for X" >&5
5959echo $ECHO_N "checking for X... $ECHO_C" >&6
5960
5961# Check whether --with-x or --without-x was given.
5962if test "${with_x+set}" = set; then
5963  withval="$with_x"
5964
5965fi;
5966# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5967if test "x$with_x" = xno; then
5968  # The user explicitly disabled X.
5969  have_x=disabled
5970else
5971  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5972    # Both variables are already set.
5973    have_x=yes
5974  else
5975    if test "${ac_cv_have_x+set}" = set; then
5976  echo $ECHO_N "(cached) $ECHO_C" >&6
5977else
5978  # One or both of the vars are not set, and there is no cached value.
5979ac_x_includes=no ac_x_libraries=no
5980rm -fr conftest.dir
5981if mkdir conftest.dir; then
5982  cd conftest.dir
5983  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5984  cat >Imakefile <<'EOF'
5985acfindx:
5986	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5987EOF
5988  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5989    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5990    eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
5991    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5992    for ac_extension in a so sl dylib dll; do
5993      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
5994         test -f "$ac_im_libdir/libX11.$ac_extension"; then
5995        ac_im_usrlibdir=$ac_im_libdir; break
5996      fi
5997    done
5998    # Screen out bogus values from the imake configuration.  They are
5999    # bogus both because they are the default anyway, and because
6000    # using them would break gcc on systems where it needs fixed includes.
6001    case $ac_im_incroot in
6002	/usr/include) ;;
6003	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6004    esac
6005    case $ac_im_usrlibdir in
6006	/usr/lib | /lib) ;;
6007	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6008    esac
6009  fi
6010  cd ..
6011  rm -fr conftest.dir
6012fi
6013
6014# Standard set of common directories for X headers.
6015# Check X11 before X11Rn because it is often a symlink to the current release.
6016ac_x_header_dirs='
6017/usr/X11/include
6018/usr/X11R7/include
6019/usr/X11R6/include
6020/usr/X11R5/include
6021/usr/X11R4/include
6022
6023/opt/local/include
6024/opt/X11/include
6025
6026/usr/include/X11
6027/usr/include/X11R7
6028/usr/include/X11R6
6029/usr/include/X11R5
6030/usr/include/X11R4
6031
6032/usr/local/X11/include
6033/usr/local/X11R7/include
6034/usr/local/X11R6/include
6035/usr/local/X11R5/include
6036/usr/local/X11R4/include
6037
6038/usr/local/include/X11
6039/usr/local/include/X11R7
6040/usr/local/include/X11R6
6041/usr/local/include/X11R5
6042/usr/local/include/X11R4
6043
6044/usr/X386/include
6045/usr/x386/include
6046/usr/XFree86/include/X11
6047
6048/usr/include
6049/usr/local/include
6050/usr/unsupported/include
6051/usr/athena/include
6052/usr/local/x11r5/include
6053/usr/lpp/Xamples/include
6054
6055/usr/openwin/include
6056/usr/openwin/share/include'
6057
6058if test "$ac_x_includes" = no; then
6059  # Guess where to find include files, by looking for Intrinsic.h.
6060  # First, try using that file with no special directory specified.
6061  cat >"conftest.$ac_ext" <<_ACEOF
6062#line 6062 "configure"
6063#include "confdefs.h"
6064#include <X11/Intrinsic.h>
6065_ACEOF
6066if { (eval echo "$as_me:6066: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6067  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6068  ac_status=$?
6069  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6070  rm -f conftest.er1
6071  cat conftest.err >&5
6072  echo "$as_me:6072: \$? = $ac_status" >&5
6073  (exit "$ac_status"); } >/dev/null; then
6074  if test -s conftest.err; then
6075    ac_cpp_err=$ac_c_preproc_warn_flag
6076  else
6077    ac_cpp_err=
6078  fi
6079else
6080  ac_cpp_err=yes
6081fi
6082if test -z "$ac_cpp_err"; then
6083  # We can compile using X headers with no special include directory.
6084ac_x_includes=
6085else
6086  echo "$as_me: failed program was:" >&5
6087  cat "conftest.$ac_ext" >&5
6088  for ac_dir in $ac_x_header_dirs; do
6089  if test -r "$ac_dir/X11/Intrinsic.h"; then
6090    ac_x_includes=$ac_dir
6091    break
6092  fi
6093done
6094fi
6095rm -f conftest.err "conftest.$ac_ext"
6096fi # $ac_x_includes = no
6097
6098if test "$ac_x_libraries" = no; then
6099  # Check for the libraries.
6100  # See if we find them without any special options.
6101  # Don't add to $LIBS permanently.
6102  ac_save_LIBS=$LIBS
6103  LIBS="-lXt $LIBS"
6104  cat >"conftest.$ac_ext" <<_ACEOF
6105#line 6105 "configure"
6106#include "confdefs.h"
6107#include <X11/Intrinsic.h>
6108int
6109main (void)
6110{
6111XtMalloc (0)
6112  ;
6113  return 0;
6114}
6115_ACEOF
6116rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6117if { (eval echo "$as_me:6117: \"$ac_link\"") >&5
6118  (eval $ac_link) 2>&5
6119  ac_status=$?
6120  echo "$as_me:6120: \$? = $ac_status" >&5
6121  (exit "$ac_status"); } &&
6122         { ac_try='test -s "conftest$ac_exeext"'
6123  { (eval echo "$as_me:6123: \"$ac_try\"") >&5
6124  (eval $ac_try) 2>&5
6125  ac_status=$?
6126  echo "$as_me:6126: \$? = $ac_status" >&5
6127  (exit "$ac_status"); }; }; then
6128  LIBS=$ac_save_LIBS
6129# We can link X programs with no special library path.
6130ac_x_libraries=
6131else
6132  echo "$as_me: failed program was:" >&5
6133cat "conftest.$ac_ext" >&5
6134LIBS=$ac_save_LIBS
6135for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6136do
6137  # Don't even attempt the hair of trying to link an X program!
6138  for ac_extension in a so sl dylib dll; do
6139    if test -r "$ac_dir/libXt.$ac_extension"; then
6140      ac_x_libraries=$ac_dir
6141      break 2
6142    fi
6143  done
6144done
6145fi
6146rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6147fi # $ac_x_libraries = no
6148
6149if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
6150  # Didn't find X anywhere.  Cache the known absence of X.
6151  ac_cv_have_x="have_x=no"
6152else
6153  # Record where we found X for the cache.
6154  ac_cv_have_x="have_x=yes \
6155	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6156fi
6157fi
6158
6159  fi
6160  eval "$ac_cv_have_x"
6161fi # $with_x != no
6162
6163if test "$have_x" != yes; then
6164  echo "$as_me:6164: result: $have_x" >&5
6165echo "${ECHO_T}$have_x" >&6
6166  no_x=yes
6167else
6168  # If each of the values was on the command line, it overrides each guess.
6169  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6170  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6171  # Update the cache value to reflect the command line values.
6172  ac_cv_have_x="have_x=yes \
6173		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6174  echo "$as_me:6174: result: libraries $x_libraries, headers $x_includes" >&5
6175echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
6176fi
6177
6178	if test "$no_x" = yes; then
6179  # Not all programs may use this symbol, but it does not hurt to define it.
6180
6181cat >>confdefs.h <<\EOF
6182#define X_DISPLAY_MISSING 1
6183EOF
6184
6185  X_CFLAGS=
6186  X_PRE_LIBS=
6187  X_LIBS=
6188  X_EXTRA_LIBS=
6189else
6190  if test -n "$x_includes"; then
6191    X_CFLAGS="$X_CFLAGS -I$x_includes"
6192  fi
6193
6194  # It would also be nice to do this for all -L options, not just this one.
6195  if test -n "$x_libraries"; then
6196    X_LIBS="$X_LIBS -L$x_libraries"
6197    # For Solaris; some versions of Sun CC require a space after -R and
6198    # others require no space.  Words are not sufficient . . . .
6199    case `(uname -sr) 2>/dev/null` in
6200    "SunOS 5"*)
6201      echo "$as_me:6201: checking whether -R must be followed by a space" >&5
6202echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
6203      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6204      cat >"conftest.$ac_ext" <<_ACEOF
6205#line 6205 "configure"
6206#include "confdefs.h"
6207
6208int
6209main (void)
6210{
6211
6212  ;
6213  return 0;
6214}
6215_ACEOF
6216rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6217if { (eval echo "$as_me:6217: \"$ac_link\"") >&5
6218  (eval $ac_link) 2>&5
6219  ac_status=$?
6220  echo "$as_me:6220: \$? = $ac_status" >&5
6221  (exit "$ac_status"); } &&
6222         { ac_try='test -s "conftest$ac_exeext"'
6223  { (eval echo "$as_me:6223: \"$ac_try\"") >&5
6224  (eval $ac_try) 2>&5
6225  ac_status=$?
6226  echo "$as_me:6226: \$? = $ac_status" >&5
6227  (exit "$ac_status"); }; }; then
6228  ac_R_nospace=yes
6229else
6230  echo "$as_me: failed program was:" >&5
6231cat "conftest.$ac_ext" >&5
6232ac_R_nospace=no
6233fi
6234rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6235      if test $ac_R_nospace = yes; then
6236	echo "$as_me:6236: result: no" >&5
6237echo "${ECHO_T}no" >&6
6238	X_LIBS="$X_LIBS -R$x_libraries"
6239      else
6240	LIBS="$ac_xsave_LIBS -R $x_libraries"
6241	cat >"conftest.$ac_ext" <<_ACEOF
6242#line 6242 "configure"
6243#include "confdefs.h"
6244
6245int
6246main (void)
6247{
6248
6249  ;
6250  return 0;
6251}
6252_ACEOF
6253rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6254if { (eval echo "$as_me:6254: \"$ac_link\"") >&5
6255  (eval $ac_link) 2>&5
6256  ac_status=$?
6257  echo "$as_me:6257: \$? = $ac_status" >&5
6258  (exit "$ac_status"); } &&
6259         { ac_try='test -s "conftest$ac_exeext"'
6260  { (eval echo "$as_me:6260: \"$ac_try\"") >&5
6261  (eval $ac_try) 2>&5
6262  ac_status=$?
6263  echo "$as_me:6263: \$? = $ac_status" >&5
6264  (exit "$ac_status"); }; }; then
6265  ac_R_space=yes
6266else
6267  echo "$as_me: failed program was:" >&5
6268cat "conftest.$ac_ext" >&5
6269ac_R_space=no
6270fi
6271rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6272	if test $ac_R_space = yes; then
6273	  echo "$as_me:6273: result: yes" >&5
6274echo "${ECHO_T}yes" >&6
6275	  X_LIBS="$X_LIBS -R $x_libraries"
6276	else
6277	  echo "$as_me:6277: result: neither works" >&5
6278echo "${ECHO_T}neither works" >&6
6279	fi
6280      fi
6281      LIBS=$ac_xsave_LIBS
6282    esac
6283  fi
6284
6285  # Check for system-dependent libraries X programs must link with.
6286  # Do this before checking for the system-independent R6 libraries
6287  # (-lICE), since we may need -lsocket or whatever for X linking.
6288
6289  if test "$ISC" = yes; then
6290    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6291  else
6292    # Martyn Johnson says this is needed for Ultrix, if the X
6293    # libraries were built with DECnet support.  And Karl Berry says
6294    # the Alpha needs dnet_stub (dnet does not exist).
6295    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6296    cat >"conftest.$ac_ext" <<_ACEOF
6297#line 6297 "configure"
6298#include "confdefs.h"
6299
6300/* Override any gcc2 internal prototype to avoid an error.  */
6301#ifdef __cplusplus
6302extern "C"
6303#endif
6304/* We use char because int might match the return type of a gcc2
6305   builtin and then its argument prototype would still apply.  */
6306char XOpenDisplay ();
6307int
6308main (void)
6309{
6310XOpenDisplay ();
6311  ;
6312  return 0;
6313}
6314_ACEOF
6315rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6316if { (eval echo "$as_me:6316: \"$ac_link\"") >&5
6317  (eval $ac_link) 2>&5
6318  ac_status=$?
6319  echo "$as_me:6319: \$? = $ac_status" >&5
6320  (exit "$ac_status"); } &&
6321         { ac_try='test -s "conftest$ac_exeext"'
6322  { (eval echo "$as_me:6322: \"$ac_try\"") >&5
6323  (eval $ac_try) 2>&5
6324  ac_status=$?
6325  echo "$as_me:6325: \$? = $ac_status" >&5
6326  (exit "$ac_status"); }; }; then
6327  :
6328else
6329  echo "$as_me: failed program was:" >&5
6330cat "conftest.$ac_ext" >&5
6331echo "$as_me:6331: checking for dnet_ntoa in -ldnet" >&5
6332echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
6333if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6334  echo $ECHO_N "(cached) $ECHO_C" >&6
6335else
6336  ac_check_lib_save_LIBS=$LIBS
6337LIBS="-ldnet  $LIBS"
6338cat >"conftest.$ac_ext" <<_ACEOF
6339#line 6339 "configure"
6340#include "confdefs.h"
6341
6342/* Override any gcc2 internal prototype to avoid an error.  */
6343#ifdef __cplusplus
6344extern "C"
6345#endif
6346/* We use char because int might match the return type of a gcc2
6347   builtin and then its argument prototype would still apply.  */
6348char dnet_ntoa ();
6349int
6350main (void)
6351{
6352dnet_ntoa ();
6353  ;
6354  return 0;
6355}
6356_ACEOF
6357rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6358if { (eval echo "$as_me:6358: \"$ac_link\"") >&5
6359  (eval $ac_link) 2>&5
6360  ac_status=$?
6361  echo "$as_me:6361: \$? = $ac_status" >&5
6362  (exit "$ac_status"); } &&
6363         { ac_try='test -s "conftest$ac_exeext"'
6364  { (eval echo "$as_me:6364: \"$ac_try\"") >&5
6365  (eval $ac_try) 2>&5
6366  ac_status=$?
6367  echo "$as_me:6367: \$? = $ac_status" >&5
6368  (exit "$ac_status"); }; }; then
6369  ac_cv_lib_dnet_dnet_ntoa=yes
6370else
6371  echo "$as_me: failed program was:" >&5
6372cat "conftest.$ac_ext" >&5
6373ac_cv_lib_dnet_dnet_ntoa=no
6374fi
6375rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6376LIBS=$ac_check_lib_save_LIBS
6377fi
6378echo "$as_me:6378: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6379echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
6380if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
6381  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6382fi
6383
6384    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6385      echo "$as_me:6385: checking for dnet_ntoa in -ldnet_stub" >&5
6386echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
6387if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6388  echo $ECHO_N "(cached) $ECHO_C" >&6
6389else
6390  ac_check_lib_save_LIBS=$LIBS
6391LIBS="-ldnet_stub  $LIBS"
6392cat >"conftest.$ac_ext" <<_ACEOF
6393#line 6393 "configure"
6394#include "confdefs.h"
6395
6396/* Override any gcc2 internal prototype to avoid an error.  */
6397#ifdef __cplusplus
6398extern "C"
6399#endif
6400/* We use char because int might match the return type of a gcc2
6401   builtin and then its argument prototype would still apply.  */
6402char dnet_ntoa ();
6403int
6404main (void)
6405{
6406dnet_ntoa ();
6407  ;
6408  return 0;
6409}
6410_ACEOF
6411rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6412if { (eval echo "$as_me:6412: \"$ac_link\"") >&5
6413  (eval $ac_link) 2>&5
6414  ac_status=$?
6415  echo "$as_me:6415: \$? = $ac_status" >&5
6416  (exit "$ac_status"); } &&
6417         { ac_try='test -s "conftest$ac_exeext"'
6418  { (eval echo "$as_me:6418: \"$ac_try\"") >&5
6419  (eval $ac_try) 2>&5
6420  ac_status=$?
6421  echo "$as_me:6421: \$? = $ac_status" >&5
6422  (exit "$ac_status"); }; }; then
6423  ac_cv_lib_dnet_stub_dnet_ntoa=yes
6424else
6425  echo "$as_me: failed program was:" >&5
6426cat "conftest.$ac_ext" >&5
6427ac_cv_lib_dnet_stub_dnet_ntoa=no
6428fi
6429rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6430LIBS=$ac_check_lib_save_LIBS
6431fi
6432echo "$as_me:6432: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6433echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
6434if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
6435  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6436fi
6437
6438    fi
6439fi
6440rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6441    LIBS="$ac_xsave_LIBS"
6442
6443    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6444    # to get the SysV transport functions.
6445    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6446    # needs -lnsl.
6447    # The nsl library prevents programs from opening the X display
6448    # on Irix 5.2, according to T.E. Dickey.
6449    # The functions gethostbyname, getservbyname, and inet_addr are
6450    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6451    echo "$as_me:6451: checking for gethostbyname" >&5
6452echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
6453if test "${ac_cv_func_gethostbyname+set}" = set; then
6454  echo $ECHO_N "(cached) $ECHO_C" >&6
6455else
6456  cat >"conftest.$ac_ext" <<_ACEOF
6457#line 6457 "configure"
6458#include "confdefs.h"
6459#define gethostbyname autoconf_temporary
6460#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
6461#undef gethostbyname
6462
6463#ifdef __cplusplus
6464extern "C"
6465#endif
6466
6467/* We use char because int might match the return type of a gcc2
6468   builtin and then its argument prototype would still apply.  */
6469char gethostbyname (void);
6470
6471int
6472main (void)
6473{
6474
6475/* The GNU C library defines stubs for functions which it implements
6476    to always fail with ENOSYS.  Some functions are actually named
6477    something starting with __ and the normal name is an alias.  */
6478#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6479#error found stub for gethostbyname
6480#endif
6481
6482	return gethostbyname ();
6483  ;
6484  return 0;
6485}
6486_ACEOF
6487rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6488if { (eval echo "$as_me:6488: \"$ac_link\"") >&5
6489  (eval $ac_link) 2>&5
6490  ac_status=$?
6491  echo "$as_me:6491: \$? = $ac_status" >&5
6492  (exit "$ac_status"); } &&
6493         { ac_try='test -s "conftest$ac_exeext"'
6494  { (eval echo "$as_me:6494: \"$ac_try\"") >&5
6495  (eval $ac_try) 2>&5
6496  ac_status=$?
6497  echo "$as_me:6497: \$? = $ac_status" >&5
6498  (exit "$ac_status"); }; }; then
6499  ac_cv_func_gethostbyname=yes
6500else
6501  echo "$as_me: failed program was:" >&5
6502cat "conftest.$ac_ext" >&5
6503ac_cv_func_gethostbyname=no
6504fi
6505rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6506fi
6507echo "$as_me:6507: result: $ac_cv_func_gethostbyname" >&5
6508echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
6509
6510    if test $ac_cv_func_gethostbyname = no; then
6511      echo "$as_me:6511: checking for gethostbyname in -lnsl" >&5
6512echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
6513if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6514  echo $ECHO_N "(cached) $ECHO_C" >&6
6515else
6516  ac_check_lib_save_LIBS=$LIBS
6517LIBS="-lnsl  $LIBS"
6518cat >"conftest.$ac_ext" <<_ACEOF
6519#line 6519 "configure"
6520#include "confdefs.h"
6521
6522/* Override any gcc2 internal prototype to avoid an error.  */
6523#ifdef __cplusplus
6524extern "C"
6525#endif
6526/* We use char because int might match the return type of a gcc2
6527   builtin and then its argument prototype would still apply.  */
6528char gethostbyname ();
6529int
6530main (void)
6531{
6532gethostbyname ();
6533  ;
6534  return 0;
6535}
6536_ACEOF
6537rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6538if { (eval echo "$as_me:6538: \"$ac_link\"") >&5
6539  (eval $ac_link) 2>&5
6540  ac_status=$?
6541  echo "$as_me:6541: \$? = $ac_status" >&5
6542  (exit "$ac_status"); } &&
6543         { ac_try='test -s "conftest$ac_exeext"'
6544  { (eval echo "$as_me:6544: \"$ac_try\"") >&5
6545  (eval $ac_try) 2>&5
6546  ac_status=$?
6547  echo "$as_me:6547: \$? = $ac_status" >&5
6548  (exit "$ac_status"); }; }; then
6549  ac_cv_lib_nsl_gethostbyname=yes
6550else
6551  echo "$as_me: failed program was:" >&5
6552cat "conftest.$ac_ext" >&5
6553ac_cv_lib_nsl_gethostbyname=no
6554fi
6555rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6556LIBS=$ac_check_lib_save_LIBS
6557fi
6558echo "$as_me:6558: result: $ac_cv_lib_nsl_gethostbyname" >&5
6559echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
6560if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
6561  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6562fi
6563
6564      if test $ac_cv_lib_nsl_gethostbyname = no; then
6565        echo "$as_me:6565: checking for gethostbyname in -lbsd" >&5
6566echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
6567if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6568  echo $ECHO_N "(cached) $ECHO_C" >&6
6569else
6570  ac_check_lib_save_LIBS=$LIBS
6571LIBS="-lbsd  $LIBS"
6572cat >"conftest.$ac_ext" <<_ACEOF
6573#line 6573 "configure"
6574#include "confdefs.h"
6575
6576/* Override any gcc2 internal prototype to avoid an error.  */
6577#ifdef __cplusplus
6578extern "C"
6579#endif
6580/* We use char because int might match the return type of a gcc2
6581   builtin and then its argument prototype would still apply.  */
6582char gethostbyname ();
6583int
6584main (void)
6585{
6586gethostbyname ();
6587  ;
6588  return 0;
6589}
6590_ACEOF
6591rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6592if { (eval echo "$as_me:6592: \"$ac_link\"") >&5
6593  (eval $ac_link) 2>&5
6594  ac_status=$?
6595  echo "$as_me:6595: \$? = $ac_status" >&5
6596  (exit "$ac_status"); } &&
6597         { ac_try='test -s "conftest$ac_exeext"'
6598  { (eval echo "$as_me:6598: \"$ac_try\"") >&5
6599  (eval $ac_try) 2>&5
6600  ac_status=$?
6601  echo "$as_me:6601: \$? = $ac_status" >&5
6602  (exit "$ac_status"); }; }; then
6603  ac_cv_lib_bsd_gethostbyname=yes
6604else
6605  echo "$as_me: failed program was:" >&5
6606cat "conftest.$ac_ext" >&5
6607ac_cv_lib_bsd_gethostbyname=no
6608fi
6609rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6610LIBS=$ac_check_lib_save_LIBS
6611fi
6612echo "$as_me:6612: result: $ac_cv_lib_bsd_gethostbyname" >&5
6613echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
6614if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
6615  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6616fi
6617
6618      fi
6619    fi
6620
6621    # lieder@skyler.mavd.honeywell.com says without -lsocket,
6622    # socket/setsockopt and other routines are undefined under SCO ODT
6623    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6624    # on later versions), says Simon Leinen: it contains gethostby*
6625    # variants that don't use the nameserver (or something).  -lsocket
6626    # must be given before -lnsl if both are needed.  We assume that
6627    # if connect needs -lnsl, so does gethostbyname.
6628    echo "$as_me:6628: checking for connect" >&5
6629echo $ECHO_N "checking for connect... $ECHO_C" >&6
6630if test "${ac_cv_func_connect+set}" = set; then
6631  echo $ECHO_N "(cached) $ECHO_C" >&6
6632else
6633  cat >"conftest.$ac_ext" <<_ACEOF
6634#line 6634 "configure"
6635#include "confdefs.h"
6636#define connect autoconf_temporary
6637#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
6638#undef connect
6639
6640#ifdef __cplusplus
6641extern "C"
6642#endif
6643
6644/* We use char because int might match the return type of a gcc2
6645   builtin and then its argument prototype would still apply.  */
6646char connect (void);
6647
6648int
6649main (void)
6650{
6651
6652/* The GNU C library defines stubs for functions which it implements
6653    to always fail with ENOSYS.  Some functions are actually named
6654    something starting with __ and the normal name is an alias.  */
6655#if defined (__stub_connect) || defined (__stub___connect)
6656#error found stub for connect
6657#endif
6658
6659	return connect ();
6660  ;
6661  return 0;
6662}
6663_ACEOF
6664rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6665if { (eval echo "$as_me:6665: \"$ac_link\"") >&5
6666  (eval $ac_link) 2>&5
6667  ac_status=$?
6668  echo "$as_me:6668: \$? = $ac_status" >&5
6669  (exit "$ac_status"); } &&
6670         { ac_try='test -s "conftest$ac_exeext"'
6671  { (eval echo "$as_me:6671: \"$ac_try\"") >&5
6672  (eval $ac_try) 2>&5
6673  ac_status=$?
6674  echo "$as_me:6674: \$? = $ac_status" >&5
6675  (exit "$ac_status"); }; }; then
6676  ac_cv_func_connect=yes
6677else
6678  echo "$as_me: failed program was:" >&5
6679cat "conftest.$ac_ext" >&5
6680ac_cv_func_connect=no
6681fi
6682rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6683fi
6684echo "$as_me:6684: result: $ac_cv_func_connect" >&5
6685echo "${ECHO_T}$ac_cv_func_connect" >&6
6686
6687    if test $ac_cv_func_connect = no; then
6688      echo "$as_me:6688: checking for connect in -lsocket" >&5
6689echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
6690if test "${ac_cv_lib_socket_connect+set}" = set; then
6691  echo $ECHO_N "(cached) $ECHO_C" >&6
6692else
6693  ac_check_lib_save_LIBS=$LIBS
6694LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6695cat >"conftest.$ac_ext" <<_ACEOF
6696#line 6696 "configure"
6697#include "confdefs.h"
6698
6699/* Override any gcc2 internal prototype to avoid an error.  */
6700#ifdef __cplusplus
6701extern "C"
6702#endif
6703/* We use char because int might match the return type of a gcc2
6704   builtin and then its argument prototype would still apply.  */
6705char connect ();
6706int
6707main (void)
6708{
6709connect ();
6710  ;
6711  return 0;
6712}
6713_ACEOF
6714rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6715if { (eval echo "$as_me:6715: \"$ac_link\"") >&5
6716  (eval $ac_link) 2>&5
6717  ac_status=$?
6718  echo "$as_me:6718: \$? = $ac_status" >&5
6719  (exit "$ac_status"); } &&
6720         { ac_try='test -s "conftest$ac_exeext"'
6721  { (eval echo "$as_me:6721: \"$ac_try\"") >&5
6722  (eval $ac_try) 2>&5
6723  ac_status=$?
6724  echo "$as_me:6724: \$? = $ac_status" >&5
6725  (exit "$ac_status"); }; }; then
6726  ac_cv_lib_socket_connect=yes
6727else
6728  echo "$as_me: failed program was:" >&5
6729cat "conftest.$ac_ext" >&5
6730ac_cv_lib_socket_connect=no
6731fi
6732rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6733LIBS=$ac_check_lib_save_LIBS
6734fi
6735echo "$as_me:6735: result: $ac_cv_lib_socket_connect" >&5
6736echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
6737if test "$ac_cv_lib_socket_connect" = yes; then
6738  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6739fi
6740
6741    fi
6742
6743    # Guillermo Gomez says -lposix is necessary on A/UX.
6744    echo "$as_me:6744: checking for remove" >&5
6745echo $ECHO_N "checking for remove... $ECHO_C" >&6
6746if test "${ac_cv_func_remove+set}" = set; then
6747  echo $ECHO_N "(cached) $ECHO_C" >&6
6748else
6749  cat >"conftest.$ac_ext" <<_ACEOF
6750#line 6750 "configure"
6751#include "confdefs.h"
6752#define remove autoconf_temporary
6753#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
6754#undef remove
6755
6756#ifdef __cplusplus
6757extern "C"
6758#endif
6759
6760/* We use char because int might match the return type of a gcc2
6761   builtin and then its argument prototype would still apply.  */
6762char remove (void);
6763
6764int
6765main (void)
6766{
6767
6768/* The GNU C library defines stubs for functions which it implements
6769    to always fail with ENOSYS.  Some functions are actually named
6770    something starting with __ and the normal name is an alias.  */
6771#if defined (__stub_remove) || defined (__stub___remove)
6772#error found stub for remove
6773#endif
6774
6775	return remove ();
6776  ;
6777  return 0;
6778}
6779_ACEOF
6780rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6781if { (eval echo "$as_me:6781: \"$ac_link\"") >&5
6782  (eval $ac_link) 2>&5
6783  ac_status=$?
6784  echo "$as_me:6784: \$? = $ac_status" >&5
6785  (exit "$ac_status"); } &&
6786         { ac_try='test -s "conftest$ac_exeext"'
6787  { (eval echo "$as_me:6787: \"$ac_try\"") >&5
6788  (eval $ac_try) 2>&5
6789  ac_status=$?
6790  echo "$as_me:6790: \$? = $ac_status" >&5
6791  (exit "$ac_status"); }; }; then
6792  ac_cv_func_remove=yes
6793else
6794  echo "$as_me: failed program was:" >&5
6795cat "conftest.$ac_ext" >&5
6796ac_cv_func_remove=no
6797fi
6798rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6799fi
6800echo "$as_me:6800: result: $ac_cv_func_remove" >&5
6801echo "${ECHO_T}$ac_cv_func_remove" >&6
6802
6803    if test $ac_cv_func_remove = no; then
6804      echo "$as_me:6804: checking for remove in -lposix" >&5
6805echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
6806if test "${ac_cv_lib_posix_remove+set}" = set; then
6807  echo $ECHO_N "(cached) $ECHO_C" >&6
6808else
6809  ac_check_lib_save_LIBS=$LIBS
6810LIBS="-lposix  $LIBS"
6811cat >"conftest.$ac_ext" <<_ACEOF
6812#line 6812 "configure"
6813#include "confdefs.h"
6814
6815/* Override any gcc2 internal prototype to avoid an error.  */
6816#ifdef __cplusplus
6817extern "C"
6818#endif
6819/* We use char because int might match the return type of a gcc2
6820   builtin and then its argument prototype would still apply.  */
6821char remove ();
6822int
6823main (void)
6824{
6825remove ();
6826  ;
6827  return 0;
6828}
6829_ACEOF
6830rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6831if { (eval echo "$as_me:6831: \"$ac_link\"") >&5
6832  (eval $ac_link) 2>&5
6833  ac_status=$?
6834  echo "$as_me:6834: \$? = $ac_status" >&5
6835  (exit "$ac_status"); } &&
6836         { ac_try='test -s "conftest$ac_exeext"'
6837  { (eval echo "$as_me:6837: \"$ac_try\"") >&5
6838  (eval $ac_try) 2>&5
6839  ac_status=$?
6840  echo "$as_me:6840: \$? = $ac_status" >&5
6841  (exit "$ac_status"); }; }; then
6842  ac_cv_lib_posix_remove=yes
6843else
6844  echo "$as_me: failed program was:" >&5
6845cat "conftest.$ac_ext" >&5
6846ac_cv_lib_posix_remove=no
6847fi
6848rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6849LIBS=$ac_check_lib_save_LIBS
6850fi
6851echo "$as_me:6851: result: $ac_cv_lib_posix_remove" >&5
6852echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
6853if test "$ac_cv_lib_posix_remove" = yes; then
6854  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6855fi
6856
6857    fi
6858
6859    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6860    echo "$as_me:6860: checking for shmat" >&5
6861echo $ECHO_N "checking for shmat... $ECHO_C" >&6
6862if test "${ac_cv_func_shmat+set}" = set; then
6863  echo $ECHO_N "(cached) $ECHO_C" >&6
6864else
6865  cat >"conftest.$ac_ext" <<_ACEOF
6866#line 6866 "configure"
6867#include "confdefs.h"
6868#define shmat autoconf_temporary
6869#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
6870#undef shmat
6871
6872#ifdef __cplusplus
6873extern "C"
6874#endif
6875
6876/* We use char because int might match the return type of a gcc2
6877   builtin and then its argument prototype would still apply.  */
6878char shmat (void);
6879
6880int
6881main (void)
6882{
6883
6884/* The GNU C library defines stubs for functions which it implements
6885    to always fail with ENOSYS.  Some functions are actually named
6886    something starting with __ and the normal name is an alias.  */
6887#if defined (__stub_shmat) || defined (__stub___shmat)
6888#error found stub for shmat
6889#endif
6890
6891	return shmat ();
6892  ;
6893  return 0;
6894}
6895_ACEOF
6896rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6897if { (eval echo "$as_me:6897: \"$ac_link\"") >&5
6898  (eval $ac_link) 2>&5
6899  ac_status=$?
6900  echo "$as_me:6900: \$? = $ac_status" >&5
6901  (exit "$ac_status"); } &&
6902         { ac_try='test -s "conftest$ac_exeext"'
6903  { (eval echo "$as_me:6903: \"$ac_try\"") >&5
6904  (eval $ac_try) 2>&5
6905  ac_status=$?
6906  echo "$as_me:6906: \$? = $ac_status" >&5
6907  (exit "$ac_status"); }; }; then
6908  ac_cv_func_shmat=yes
6909else
6910  echo "$as_me: failed program was:" >&5
6911cat "conftest.$ac_ext" >&5
6912ac_cv_func_shmat=no
6913fi
6914rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6915fi
6916echo "$as_me:6916: result: $ac_cv_func_shmat" >&5
6917echo "${ECHO_T}$ac_cv_func_shmat" >&6
6918
6919    if test $ac_cv_func_shmat = no; then
6920      echo "$as_me:6920: checking for shmat in -lipc" >&5
6921echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
6922if test "${ac_cv_lib_ipc_shmat+set}" = set; then
6923  echo $ECHO_N "(cached) $ECHO_C" >&6
6924else
6925  ac_check_lib_save_LIBS=$LIBS
6926LIBS="-lipc  $LIBS"
6927cat >"conftest.$ac_ext" <<_ACEOF
6928#line 6928 "configure"
6929#include "confdefs.h"
6930
6931/* Override any gcc2 internal prototype to avoid an error.  */
6932#ifdef __cplusplus
6933extern "C"
6934#endif
6935/* We use char because int might match the return type of a gcc2
6936   builtin and then its argument prototype would still apply.  */
6937char shmat ();
6938int
6939main (void)
6940{
6941shmat ();
6942  ;
6943  return 0;
6944}
6945_ACEOF
6946rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6947if { (eval echo "$as_me:6947: \"$ac_link\"") >&5
6948  (eval $ac_link) 2>&5
6949  ac_status=$?
6950  echo "$as_me:6950: \$? = $ac_status" >&5
6951  (exit "$ac_status"); } &&
6952         { ac_try='test -s "conftest$ac_exeext"'
6953  { (eval echo "$as_me:6953: \"$ac_try\"") >&5
6954  (eval $ac_try) 2>&5
6955  ac_status=$?
6956  echo "$as_me:6956: \$? = $ac_status" >&5
6957  (exit "$ac_status"); }; }; then
6958  ac_cv_lib_ipc_shmat=yes
6959else
6960  echo "$as_me: failed program was:" >&5
6961cat "conftest.$ac_ext" >&5
6962ac_cv_lib_ipc_shmat=no
6963fi
6964rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6965LIBS=$ac_check_lib_save_LIBS
6966fi
6967echo "$as_me:6967: result: $ac_cv_lib_ipc_shmat" >&5
6968echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6969if test "$ac_cv_lib_ipc_shmat" = yes; then
6970  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6971fi
6972
6973    fi
6974  fi
6975
6976  # Check for libraries that X11R6 Xt/Xaw programs need.
6977  ac_save_LDFLAGS=$LDFLAGS
6978  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6979  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6980  # check for ICE first), but we must link in the order -lSM -lICE or
6981  # we get undefined symbols.  So assume we have SM if we have ICE.
6982  # These have to be linked with before -lX11, unlike the other
6983  # libraries we check for below, so use a different variable.
6984  # John Interrante, Karl Berry
6985  echo "$as_me:6985: checking for IceConnectionNumber in -lICE" >&5
6986echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6987if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6988  echo $ECHO_N "(cached) $ECHO_C" >&6
6989else
6990  ac_check_lib_save_LIBS=$LIBS
6991LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6992cat >"conftest.$ac_ext" <<_ACEOF
6993#line 6993 "configure"
6994#include "confdefs.h"
6995
6996/* Override any gcc2 internal prototype to avoid an error.  */
6997#ifdef __cplusplus
6998extern "C"
6999#endif
7000/* We use char because int might match the return type of a gcc2
7001   builtin and then its argument prototype would still apply.  */
7002char IceConnectionNumber ();
7003int
7004main (void)
7005{
7006IceConnectionNumber ();
7007  ;
7008  return 0;
7009}
7010_ACEOF
7011rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7012if { (eval echo "$as_me:7012: \"$ac_link\"") >&5
7013  (eval $ac_link) 2>&5
7014  ac_status=$?
7015  echo "$as_me:7015: \$? = $ac_status" >&5
7016  (exit "$ac_status"); } &&
7017         { ac_try='test -s "conftest$ac_exeext"'
7018  { (eval echo "$as_me:7018: \"$ac_try\"") >&5
7019  (eval $ac_try) 2>&5
7020  ac_status=$?
7021  echo "$as_me:7021: \$? = $ac_status" >&5
7022  (exit "$ac_status"); }; }; then
7023  ac_cv_lib_ICE_IceConnectionNumber=yes
7024else
7025  echo "$as_me: failed program was:" >&5
7026cat "conftest.$ac_ext" >&5
7027ac_cv_lib_ICE_IceConnectionNumber=no
7028fi
7029rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7030LIBS=$ac_check_lib_save_LIBS
7031fi
7032echo "$as_me:7032: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7033echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
7034if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
7035  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7036fi
7037
7038  LDFLAGS=$ac_save_LDFLAGS
7039
7040fi
7041
7042fi
7043
7044if test "$GCC" = yes || test "$GXX" = yes
7045then
7046
7047if test "$GCC" = yes || test "$GXX" = yes
7048then
7049	case $CFLAGS in
7050	(*-Werror=*)
7051		test -n "$verbose" && echo "	repairing CFLAGS: $CFLAGS" 1>&6
7052
7053echo "${as_me:-configure}:7053: testing repairing CFLAGS: $CFLAGS ..." 1>&5
7054
7055		cf_temp_flags=
7056		for cf_temp_scan in $CFLAGS
7057		do
7058			case "x$cf_temp_scan" in
7059			(x-Werror=*)
7060
7061	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
7062	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
7063
7064				;;
7065			(*)
7066
7067	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
7068	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
7069
7070				;;
7071			esac
7072		done
7073		CFLAGS="$cf_temp_flags"
7074		test -n "$verbose" && echo "	... fixed $CFLAGS" 1>&6
7075
7076echo "${as_me:-configure}:7076: testing ... fixed $CFLAGS ..." 1>&5
7077
7078		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
7079
7080echo "${as_me:-configure}:7080: testing ... extra $EXTRA_CFLAGS ..." 1>&5
7081
7082		;;
7083	esac
7084fi
7085
7086if test "$GCC" = yes || test "$GXX" = yes
7087then
7088	case $CPPFLAGS in
7089	(*-Werror=*)
7090		test -n "$verbose" && echo "	repairing CPPFLAGS: $CPPFLAGS" 1>&6
7091
7092echo "${as_me:-configure}:7092: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
7093
7094		cf_temp_flags=
7095		for cf_temp_scan in $CPPFLAGS
7096		do
7097			case "x$cf_temp_scan" in
7098			(x-Werror=*)
7099
7100	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
7101	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
7102
7103				;;
7104			(*)
7105
7106	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
7107	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
7108
7109				;;
7110			esac
7111		done
7112		CPPFLAGS="$cf_temp_flags"
7113		test -n "$verbose" && echo "	... fixed $CPPFLAGS" 1>&6
7114
7115echo "${as_me:-configure}:7115: testing ... fixed $CPPFLAGS ..." 1>&5
7116
7117		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
7118
7119echo "${as_me:-configure}:7119: testing ... extra $EXTRA_CFLAGS ..." 1>&5
7120
7121		;;
7122	esac
7123fi
7124
7125if test "$GCC" = yes || test "$GXX" = yes
7126then
7127	case $LDFLAGS in
7128	(*-Werror=*)
7129		test -n "$verbose" && echo "	repairing LDFLAGS: $LDFLAGS" 1>&6
7130
7131echo "${as_me:-configure}:7131: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
7132
7133		cf_temp_flags=
7134		for cf_temp_scan in $LDFLAGS
7135		do
7136			case "x$cf_temp_scan" in
7137			(x-Werror=*)
7138
7139	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
7140	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
7141
7142				;;
7143			(*)
7144
7145	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
7146	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
7147
7148				;;
7149			esac
7150		done
7151		LDFLAGS="$cf_temp_flags"
7152		test -n "$verbose" && echo "	... fixed $LDFLAGS" 1>&6
7153
7154echo "${as_me:-configure}:7154: testing ... fixed $LDFLAGS ..." 1>&5
7155
7156		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
7157
7158echo "${as_me:-configure}:7158: testing ... extra $EXTRA_CFLAGS ..." 1>&5
7159
7160		;;
7161	esac
7162fi
7163
7164echo "$as_me:7164: checking if you want to turn on gcc warnings" >&5
7165echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
7166
7167# Check whether --enable-warnings or --disable-warnings was given.
7168if test "${enable_warnings+set}" = set; then
7169  enableval="$enable_warnings"
7170  test "$enableval" != yes && enableval=no
7171	if test "$enableval" != "no" ; then
7172    enable_warnings=yes
7173	else
7174		enable_warnings=no
7175	fi
7176else
7177  enableval=no
7178	enable_warnings=no
7179
7180fi;
7181echo "$as_me:7181: result: $enable_warnings" >&5
7182echo "${ECHO_T}$enable_warnings" >&6
7183if test "$enable_warnings" = "yes"
7184then
7185
7186if test "x$have_x" = xyes; then
7187
7188cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
7189cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
7190cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
7191LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
7192for cf_X_CFLAGS in $X_CFLAGS
7193do
7194	case "x$cf_X_CFLAGS" in
7195	x-[IUD]*)
7196		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
7197		;;
7198	*)
7199		CFLAGS="$CFLAGS $cf_X_CFLAGS"
7200		;;
7201	esac
7202done
7203
7204cat >"conftest.$ac_ext" <<_ACEOF
7205#line 7205 "configure"
7206#include "confdefs.h"
7207
7208#include <stdlib.h>
7209#include <X11/Intrinsic.h>
7210
7211int
7212main (void)
7213{
7214String foo = malloc(1); (void)foo
7215  ;
7216  return 0;
7217}
7218_ACEOF
7219rm -f "conftest.$ac_objext"
7220if { (eval echo "$as_me:7220: \"$ac_compile\"") >&5
7221  (eval $ac_compile) 2>&5
7222  ac_status=$?
7223  echo "$as_me:7223: \$? = $ac_status" >&5
7224  (exit "$ac_status"); } &&
7225         { ac_try='test -s "conftest.$ac_objext"'
7226  { (eval echo "$as_me:7226: \"$ac_try\"") >&5
7227  (eval $ac_try) 2>&5
7228  ac_status=$?
7229  echo "$as_me:7229: \$? = $ac_status" >&5
7230  (exit "$ac_status"); }; }; then
7231
7232echo "$as_me:7232: checking for X11/Xt const-feature" >&5
7233echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
7234if test "${cf_cv_const_x_string+set}" = set; then
7235  echo $ECHO_N "(cached) $ECHO_C" >&6
7236else
7237
7238	cat >"conftest.$ac_ext" <<_ACEOF
7239#line 7239 "configure"
7240#include "confdefs.h"
7241
7242#define _CONST_X_STRING	/* X11R7.8 (perhaps) */
7243#undef  XTSTRINGDEFINES	/* X11R5 and later */
7244#include <stdlib.h>
7245#include <X11/Intrinsic.h>
7246
7247int
7248main (void)
7249{
7250String foo = malloc(1); *foo = 0
7251  ;
7252  return 0;
7253}
7254_ACEOF
7255rm -f "conftest.$ac_objext"
7256if { (eval echo "$as_me:7256: \"$ac_compile\"") >&5
7257  (eval $ac_compile) 2>&5
7258  ac_status=$?
7259  echo "$as_me:7259: \$? = $ac_status" >&5
7260  (exit "$ac_status"); } &&
7261         { ac_try='test -s "conftest.$ac_objext"'
7262  { (eval echo "$as_me:7262: \"$ac_try\"") >&5
7263  (eval $ac_try) 2>&5
7264  ac_status=$?
7265  echo "$as_me:7265: \$? = $ac_status" >&5
7266  (exit "$ac_status"); }; }; then
7267
7268			cf_cv_const_x_string=no
7269
7270else
7271  echo "$as_me: failed program was:" >&5
7272cat "conftest.$ac_ext" >&5
7273
7274			cf_cv_const_x_string=yes
7275
7276fi
7277rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7278
7279fi
7280echo "$as_me:7280: result: $cf_cv_const_x_string" >&5
7281echo "${ECHO_T}$cf_cv_const_x_string" >&6
7282
7283LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
7284CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
7285CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
7286
7287case "$cf_cv_const_x_string" in
7288(no)
7289
7290	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7291	CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
7292
7293	;;
7294(*)
7295
7296	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7297	CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
7298
7299	;;
7300esac
7301
7302else
7303  echo "$as_me: failed program was:" >&5
7304cat "conftest.$ac_ext" >&5
7305fi
7306rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7307 fi
7308cat > "conftest.$ac_ext" <<EOF
7309#line 7309 "${as_me:-configure}"
7310int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
7311EOF
7312if test "$INTEL_COMPILER" = yes
7313then
7314# The "-wdXXX" options suppress warnings:
7315# remark #1419: external declaration in primary source file
7316# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
7317# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
7318# remark #193: zero used for undefined preprocessing identifier
7319# remark #593: variable "curs_sb_left_arrow" was set but never used
7320# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
7321# remark #869: parameter "tw" was never referenced
7322# remark #981: operands are evaluated in unspecified order
7323# warning #279: controlling expression is constant
7324
7325	{ echo "$as_me:7325: checking for $CC warning options..." >&5
7326echo "$as_me: checking for $CC warning options..." >&6;}
7327	cf_save_CFLAGS="$CFLAGS"
7328	EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
7329	for cf_opt in \
7330		wd1419 \
7331		wd1683 \
7332		wd1684 \
7333		wd193 \
7334		wd593 \
7335		wd279 \
7336		wd810 \
7337		wd869 \
7338		wd981
7339	do
7340		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
7341		if { (eval echo "$as_me:7341: \"$ac_compile\"") >&5
7342  (eval $ac_compile) 2>&5
7343  ac_status=$?
7344  echo "$as_me:7344: \$? = $ac_status" >&5
7345  (exit "$ac_status"); }; then
7346			test -n "$verbose" && echo "$as_me:7346: result: ... -$cf_opt" >&5
7347echo "${ECHO_T}... -$cf_opt" >&6
7348			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
7349		fi
7350	done
7351	CFLAGS="$cf_save_CFLAGS"
7352elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
7353then
7354	{ echo "$as_me:7354: checking for $CC warning options..." >&5
7355echo "$as_me: checking for $CC warning options..." >&6;}
7356	cf_save_CFLAGS="$CFLAGS"
7357	cf_warn_CONST=""
7358	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
7359	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
7360	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
7361	for cf_opt in W Wall \
7362		Wbad-function-cast \
7363		Wcast-align \
7364		Wcast-qual \
7365		Wdeclaration-after-statement \
7366		Wextra \
7367		Winline \
7368		Wmissing-declarations \
7369		Wmissing-prototypes \
7370		Wnested-externs \
7371		Wpointer-arith \
7372		Wshadow \
7373		Wstrict-prototypes \
7374		Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST
7375	do
7376		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
7377		if { (eval echo "$as_me:7377: \"$ac_compile\"") >&5
7378  (eval $ac_compile) 2>&5
7379  ac_status=$?
7380  echo "$as_me:7380: \$? = $ac_status" >&5
7381  (exit "$ac_status"); }; then
7382			test -n "$verbose" && echo "$as_me:7382: result: ... -$cf_opt" >&5
7383echo "${ECHO_T}... -$cf_opt" >&6
7384			case "$cf_opt" in
7385			(Winline)
7386				case "$GCC_VERSION" in
7387				([34].*)
7388					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
7389
7390echo "${as_me:-configure}:7390: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
7391
7392					continue;;
7393				esac
7394				;;
7395			(Wpointer-arith)
7396				case "$GCC_VERSION" in
7397				([12].*)
7398					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
7399
7400echo "${as_me:-configure}:7400: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
7401
7402					continue;;
7403				esac
7404				;;
7405			esac
7406			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
7407		fi
7408	done
7409	CFLAGS="$cf_save_CFLAGS"
7410fi
7411rm -rf ./conftest*
7412
7413fi
7414
7415if test "$GCC" = yes || test "$GXX" = yes
7416then
7417cat > conftest.i <<EOF
7418#ifndef GCC_PRINTF
7419#define GCC_PRINTF 0
7420#endif
7421#ifndef GCC_SCANF
7422#define GCC_SCANF 0
7423#endif
7424#ifndef GCC_NORETURN
7425#define GCC_NORETURN /* nothing */
7426#endif
7427#ifndef GCC_UNUSED
7428#define GCC_UNUSED /* nothing */
7429#endif
7430EOF
7431if test "$GCC" = yes
7432then
7433	{ echo "$as_me:7433: checking for $CC __attribute__ directives..." >&5
7434echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
7435cat > "conftest.$ac_ext" <<EOF
7436#line 7436 "${as_me:-configure}"
7437#include "confdefs.h"
7438#include "conftest.h"
7439#include "conftest.i"
7440#if	GCC_PRINTF
7441#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
7442#else
7443#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
7444#endif
7445#if	GCC_SCANF
7446#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
7447#else
7448#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
7449#endif
7450extern void wow(char *,...) GCC_SCANFLIKE(1,2);
7451extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
7452extern void foo(void) GCC_NORETURN;
7453int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
7454EOF
7455	cf_printf_attribute=no
7456	cf_scanf_attribute=no
7457	for cf_attribute in scanf printf unused noreturn
7458	do
7459
7460cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7461
7462		cf_directive="__attribute__(($cf_attribute))"
7463		echo "checking for $CC $cf_directive" 1>&5
7464
7465		case "$cf_attribute" in
7466		(printf)
7467			cf_printf_attribute=yes
7468			cat >conftest.h <<EOF
7469#define GCC_$cf_ATTRIBUTE 1
7470EOF
7471			;;
7472		(scanf)
7473			cf_scanf_attribute=yes
7474			cat >conftest.h <<EOF
7475#define GCC_$cf_ATTRIBUTE 1
7476EOF
7477			;;
7478		(*)
7479			cat >conftest.h <<EOF
7480#define GCC_$cf_ATTRIBUTE $cf_directive
7481EOF
7482			;;
7483		esac
7484
7485		if { (eval echo "$as_me:7485: \"$ac_compile\"") >&5
7486  (eval $ac_compile) 2>&5
7487  ac_status=$?
7488  echo "$as_me:7488: \$? = $ac_status" >&5
7489  (exit "$ac_status"); }; then
7490			test -n "$verbose" && echo "$as_me:7490: result: ... $cf_attribute" >&5
7491echo "${ECHO_T}... $cf_attribute" >&6
7492			cat conftest.h >>confdefs.h
7493			case "$cf_attribute" in
7494			(noreturn)
7495
7496cat >>confdefs.h <<EOF
7497#define GCC_NORETURN $cf_directive
7498EOF
7499
7500				;;
7501			(printf)
7502				cf_value='/* nothing */'
7503				if test "$cf_printf_attribute" != no ; then
7504					cf_value='__attribute__((format(printf,fmt,var)))'
7505
7506cat >>confdefs.h <<\EOF
7507#define GCC_PRINTF 1
7508EOF
7509
7510				fi
7511
7512cat >>confdefs.h <<EOF
7513#define GCC_PRINTFLIKE(fmt,var) $cf_value
7514EOF
7515
7516				;;
7517			(scanf)
7518				cf_value='/* nothing */'
7519				if test "$cf_scanf_attribute" != no ; then
7520					cf_value='__attribute__((format(scanf,fmt,var)))'
7521
7522cat >>confdefs.h <<\EOF
7523#define GCC_SCANF 1
7524EOF
7525
7526				fi
7527
7528cat >>confdefs.h <<EOF
7529#define GCC_SCANFLIKE(fmt,var) $cf_value
7530EOF
7531
7532				;;
7533			(unused)
7534
7535cat >>confdefs.h <<EOF
7536#define GCC_UNUSED $cf_directive
7537EOF
7538
7539				;;
7540			esac
7541		fi
7542	done
7543else
7544	${FGREP-fgrep} define conftest.i >>confdefs.h
7545fi
7546rm -rf ./conftest*
7547fi
7548
7549fi
7550
7551echo "$as_me:7551: checking if you want to use pkg-config" >&5
7552echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
7553
7554# Check whether --with-pkg-config or --without-pkg-config was given.
7555if test "${with_pkg_config+set}" = set; then
7556  withval="$with_pkg_config"
7557  cf_pkg_config=$withval
7558else
7559  cf_pkg_config=yes
7560fi;
7561echo "$as_me:7561: result: $cf_pkg_config" >&5
7562echo "${ECHO_T}$cf_pkg_config" >&6
7563
7564case "$cf_pkg_config" in
7565(no)
7566	PKG_CONFIG=none
7567	;;
7568(yes)
7569
7570if test -n "$ac_tool_prefix"; then
7571  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7572set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7573echo "$as_me:7573: checking for $ac_word" >&5
7574echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7575if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
7576  echo $ECHO_N "(cached) $ECHO_C" >&6
7577else
7578  case $PKG_CONFIG in
7579  [\\/]* | ?:[\\/]*)
7580  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7581  ;;
7582  *)
7583  ac_save_IFS=$IFS; IFS=$ac_path_separator
7584ac_dummy="$PATH"
7585for ac_dir in $ac_dummy; do
7586  IFS=$ac_save_IFS
7587  test -z "$ac_dir" && ac_dir=.
7588  if $as_executable_p "$ac_dir/$ac_word"; then
7589   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
7590   echo "$as_me:7590: found $ac_dir/$ac_word" >&5
7591   break
7592fi
7593done
7594
7595  ;;
7596esac
7597fi
7598PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7599
7600if test -n "$PKG_CONFIG"; then
7601  echo "$as_me:7601: result: $PKG_CONFIG" >&5
7602echo "${ECHO_T}$PKG_CONFIG" >&6
7603else
7604  echo "$as_me:7604: result: no" >&5
7605echo "${ECHO_T}no" >&6
7606fi
7607
7608fi
7609if test -z "$ac_cv_path_PKG_CONFIG"; then
7610  ac_pt_PKG_CONFIG=$PKG_CONFIG
7611  # Extract the first word of "pkg-config", so it can be a program name with args.
7612set dummy pkg-config; ac_word=$2
7613echo "$as_me:7613: checking for $ac_word" >&5
7614echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7615if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
7616  echo $ECHO_N "(cached) $ECHO_C" >&6
7617else
7618  case $ac_pt_PKG_CONFIG in
7619  [\\/]* | ?:[\\/]*)
7620  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7621  ;;
7622  *)
7623  ac_save_IFS=$IFS; IFS=$ac_path_separator
7624ac_dummy="$PATH"
7625for ac_dir in $ac_dummy; do
7626  IFS=$ac_save_IFS
7627  test -z "$ac_dir" && ac_dir=.
7628  if $as_executable_p "$ac_dir/$ac_word"; then
7629   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
7630   echo "$as_me:7630: found $ac_dir/$ac_word" >&5
7631   break
7632fi
7633done
7634
7635  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
7636  ;;
7637esac
7638fi
7639ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7640
7641if test -n "$ac_pt_PKG_CONFIG"; then
7642  echo "$as_me:7642: result: $ac_pt_PKG_CONFIG" >&5
7643echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
7644else
7645  echo "$as_me:7645: result: no" >&5
7646echo "${ECHO_T}no" >&6
7647fi
7648
7649  PKG_CONFIG=$ac_pt_PKG_CONFIG
7650else
7651  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7652fi
7653
7654	;;
7655(*)
7656	PKG_CONFIG=$withval
7657	;;
7658esac
7659
7660test -z "$PKG_CONFIG" && PKG_CONFIG=none
7661if test "$PKG_CONFIG" != none ; then
7662
7663if test "x$prefix" != xNONE; then
7664	cf_path_syntax="$prefix"
7665else
7666	cf_path_syntax="$ac_default_prefix"
7667fi
7668
7669case ".$PKG_CONFIG" in
7670(.\$\(*\)*|.\'*\'*)
7671	;;
7672(..|./*|.\\*)
7673	;;
7674(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7675	;;
7676(.\$\{*prefix\}*|.\$\{*dir\}*)
7677	eval PKG_CONFIG="$PKG_CONFIG"
7678	case ".$PKG_CONFIG" in
7679	(.NONE/*)
7680		PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
7681		;;
7682	esac
7683	;;
7684(.no|.NONE/*)
7685	PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
7686	;;
7687(*)
7688	{ { echo "$as_me:7688: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
7689echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
7690   { (exit 1); exit 1; }; }
7691	;;
7692esac
7693
7694elif test "x$cf_pkg_config" != xno ; then
7695	{ echo "$as_me:7695: WARNING: pkg-config is not installed" >&5
7696echo "$as_me: WARNING: pkg-config is not installed" >&2;}
7697fi
7698
7699echo "$as_me:7699: checking for this package's name" >&5
7700echo $ECHO_N "checking for this package's name... $ECHO_C" >&6
7701
7702# Check whether --with-package or --without-package was given.
7703if test "${with_package+set}" = set; then
7704  withval="$with_package"
7705  PACKAGE=$withval
7706else
7707  PACKAGE=dialog
7708fi;
7709echo "$as_me:7709: result: $PACKAGE" >&5
7710echo "${ECHO_T}$PACKAGE" >&6
7711
7712if test -f "$srcdir/VERSION" ; then
7713	echo "$as_me:7713: checking for package version" >&5
7714echo $ECHO_N "checking for package version... $ECHO_C" >&6
7715
7716	# if there are not enough fields, cut returns the last one...
7717	cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
7718	cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
7719	cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
7720
7721	# this is how CF_BUNDLED_INTL uses $VERSION:
7722	VERSION="$cf_field1"
7723
7724	VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
7725	test -z "$VERSION_MAJOR" && { { echo "$as_me:7725: error: missing major-version" >&5
7726echo "$as_me: error: missing major-version" >&2;}
7727   { (exit 1); exit 1; }; }
7728
7729	VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
7730	test -z "$VERSION_MINOR" && { { echo "$as_me:7730: error: missing minor-version" >&5
7731echo "$as_me: error: missing minor-version" >&2;}
7732   { (exit 1); exit 1; }; }
7733
7734	echo "$as_me:7734: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
7735echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
7736
7737	echo "$as_me:7737: checking for package patch date" >&5
7738echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
7739	VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
7740	case .$VERSION_PATCH in
7741	(.)
7742		{ { echo "$as_me:7742: error: missing patch-date $VERSION_PATCH" >&5
7743echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
7744   { (exit 1); exit 1; }; }
7745		;;
7746	(.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
7747		;;
7748	(*)
7749		{ { echo "$as_me:7749: error: illegal patch-date $VERSION_PATCH" >&5
7750echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
7751   { (exit 1); exit 1; }; }
7752		;;
7753	esac
7754	echo "$as_me:7754: result: $VERSION_PATCH" >&5
7755echo "${ECHO_T}$VERSION_PATCH" >&6
7756else
7757	{ { echo "$as_me:7757: error: did not find $srcdir/VERSION" >&5
7758echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
7759   { (exit 1); exit 1; }; }
7760fi
7761
7762# show the actual data that we have for versions:
7763test -n "$verbose" && echo "	ABI VERSION $VERSION" 1>&6
7764
7765echo "${as_me:-configure}:7765: testing ABI VERSION $VERSION ..." 1>&5
7766
7767test -n "$verbose" && echo "	VERSION_MAJOR $VERSION_MAJOR" 1>&6
7768
7769echo "${as_me:-configure}:7769: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
7770
7771test -n "$verbose" && echo "	VERSION_MINOR $VERSION_MINOR" 1>&6
7772
7773echo "${as_me:-configure}:7773: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
7774
7775test -n "$verbose" && echo "	VERSION_PATCH $VERSION_PATCH" 1>&6
7776
7777echo "${as_me:-configure}:7777: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
7778
7779	cf_PACKAGE=dialog
7780	PACKAGE=$PACKAGE
7781
7782cat >>confdefs.h <<EOF
7783#define PACKAGE "$PACKAGE"
7784EOF
7785
7786cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7787
7788	cat >>confdefs.h <<EOF
7789#define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
7790EOF
7791
7792	cat >>confdefs.h <<EOF
7793#define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
7794EOF
7795
7796CFG_ROOTNAME=$PACKAGE
7797HDR_ROOTNAME=$PACKAGE
7798LIB_ROOTNAME=$PACKAGE
7799
7800echo "$as_me:7800: checking if we should install dlg_XXX headers to subdirectory" >&5
7801echo $ECHO_N "checking if we should install dlg_XXX headers to subdirectory... $ECHO_C" >&6
7802
7803# Check whether --enable-header-subdir or --disable-header-subdir was given.
7804if test "${enable_header_subdir+set}" = set; then
7805  enableval="$enable_header_subdir"
7806  SUB_INC=$enableval
7807else
7808  SUB_INC=no
7809fi;
7810echo "$as_me:7810: result: $SUB_INC" >&5
7811echo "${ECHO_T}$SUB_INC" >&6
7812
7813case "x${with_man2html}" in
7814(xno)
7815	cf_man2html=no
7816	;;
7817(x|xyes)
7818	# Extract the first word of "man2html", so it can be a program name with args.
7819set dummy man2html; ac_word=$2
7820echo "$as_me:7820: checking for $ac_word" >&5
7821echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7822if test "${ac_cv_path_cf_man2html+set}" = set; then
7823  echo $ECHO_N "(cached) $ECHO_C" >&6
7824else
7825  case $cf_man2html in
7826  [\\/]* | ?:[\\/]*)
7827  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
7828  ;;
7829  *)
7830  ac_save_IFS=$IFS; IFS=$ac_path_separator
7831ac_dummy="$PATH"
7832for ac_dir in $ac_dummy; do
7833  IFS=$ac_save_IFS
7834  test -z "$ac_dir" && ac_dir=.
7835  if $as_executable_p "$ac_dir/$ac_word"; then
7836   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
7837   echo "$as_me:7837: found $ac_dir/$ac_word" >&5
7838   break
7839fi
7840done
7841
7842  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
7843  ;;
7844esac
7845fi
7846cf_man2html=$ac_cv_path_cf_man2html
7847
7848if test -n "$cf_man2html"; then
7849  echo "$as_me:7849: result: $cf_man2html" >&5
7850echo "${ECHO_T}$cf_man2html" >&6
7851else
7852  echo "$as_me:7852: result: no" >&5
7853echo "${ECHO_T}no" >&6
7854fi
7855
7856	case "x$cf_man2html" in
7857	(x/*)
7858		echo "$as_me:7858: checking for the modified Earl Hood script" >&5
7859echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
7860		if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
7861		then
7862			cf_man2html_ok=yes
7863		else
7864			cf_man2html=no
7865			cf_man2html_ok=no
7866		fi
7867		echo "$as_me:7867: result: $cf_man2html_ok" >&5
7868echo "${ECHO_T}$cf_man2html_ok" >&6
7869		;;
7870	(*)
7871		cf_man2html=no
7872		;;
7873	esac
7874esac
7875
7876echo "$as_me:7876: checking for program to convert manpage to html" >&5
7877echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
7878
7879# Check whether --with-man2html or --without-man2html was given.
7880if test "${with_man2html+set}" = set; then
7881  withval="$with_man2html"
7882  cf_man2html=$withval
7883else
7884  cf_man2html=$cf_man2html
7885fi;
7886
7887cf_with_groff=no
7888
7889case $cf_man2html in
7890(yes)
7891	echo "$as_me:7891: result: man2html" >&5
7892echo "${ECHO_T}man2html" >&6
7893	# Extract the first word of "man2html", so it can be a program name with args.
7894set dummy man2html; 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_path_cf_man2html+set}" = set; then
7898  echo $ECHO_N "(cached) $ECHO_C" >&6
7899else
7900  case $cf_man2html in
7901  [\\/]* | ?:[\\/]*)
7902  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
7903  ;;
7904  *)
7905  ac_save_IFS=$IFS; IFS=$ac_path_separator
7906ac_dummy="$PATH"
7907for ac_dir in $ac_dummy; do
7908  IFS=$ac_save_IFS
7909  test -z "$ac_dir" && ac_dir=.
7910  if $as_executable_p "$ac_dir/$ac_word"; then
7911   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
7912   echo "$as_me:7912: found $ac_dir/$ac_word" >&5
7913   break
7914fi
7915done
7916
7917  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
7918  ;;
7919esac
7920fi
7921cf_man2html=$ac_cv_path_cf_man2html
7922
7923if test -n "$cf_man2html"; then
7924  echo "$as_me:7924: result: $cf_man2html" >&5
7925echo "${ECHO_T}$cf_man2html" >&6
7926else
7927  echo "$as_me:7927: result: no" >&5
7928echo "${ECHO_T}no" >&6
7929fi
7930
7931	;;
7932(no|groff|*/groff*)
7933	cf_with_groff=yes
7934	cf_man2html=$GROFF_PATH
7935	echo "$as_me:7935: result: $cf_man2html" >&5
7936echo "${ECHO_T}$cf_man2html" >&6
7937	;;
7938(*)
7939	echo "$as_me:7939: result: $cf_man2html" >&5
7940echo "${ECHO_T}$cf_man2html" >&6
7941	;;
7942esac
7943
7944MAN2HTML_TEMP="man2html.tmp"
7945	cat >$MAN2HTML_TEMP <<CF_EOF
7946#!$SHELL
7947# Temporary script generated by CF_WITH_MAN2HTML
7948# Convert inputs to html, sending result to standard output.
7949#
7950# Parameters:
7951# \${1} = rootname of file to convert
7952# \${2} = suffix of file to convert, e.g., "1"
7953# \${3} = macros to use, e.g., "man"
7954#
7955ROOT=\$1
7956TYPE=\$2
7957MACS=\$3
7958
7959unset LANG
7960unset LC_ALL
7961unset LC_CTYPE
7962unset LANGUAGE
7963GROFF_NO_SGR=stupid
7964export GROFF_NO_SGR
7965
7966CF_EOF
7967
7968NROFF_OPTS=
7969if test "x$cf_with_groff" = xyes
7970then
7971	MAN2HTML_NOTE="$GROFF_NOTE"
7972	MAN2HTML_PATH="$GROFF_PATH"
7973	cat >>$MAN2HTML_TEMP <<CF_EOF
7974$SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
7975CF_EOF
7976else
7977	# disable hyphenation if this is groff
7978	if test "x$GROFF_PATH" != xno
7979	then
7980		echo "$as_me:7980: checking if nroff is really groff" >&5
7981echo $ECHO_N "checking if nroff is really groff... $ECHO_C" >&6
7982		cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
7983		test -n "$cf_check_groff" && cf_check_groff=yes
7984		test -n "$cf_check_groff" || cf_check_groff=no
7985		echo "$as_me:7985: result: $cf_check_groff" >&5
7986echo "${ECHO_T}$cf_check_groff" >&6
7987		test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
7988	fi
7989	MAN2HTML_NOTE=""
7990
7991if test "x$prefix" != xNONE; then
7992	cf_path_syntax="$prefix"
7993else
7994	cf_path_syntax="$ac_default_prefix"
7995fi
7996
7997case ".$cf_man2html" in
7998(.\$\(*\)*|.\'*\'*)
7999	;;
8000(..|./*|.\\*)
8001	;;
8002(.[a-zA-Z]:[\\/]*) # OS/2 EMX
8003	;;
8004(.\$\{*prefix\}*|.\$\{*dir\}*)
8005	eval cf_man2html="$cf_man2html"
8006	case ".$cf_man2html" in
8007	(.NONE/*)
8008		cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
8009		;;
8010	esac
8011	;;
8012(.no|.NONE/*)
8013	cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
8014	;;
8015(*)
8016	{ { echo "$as_me:8016: error: expected a pathname, not \"$cf_man2html\"" >&5
8017echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
8018   { (exit 1); exit 1; }; }
8019	;;
8020esac
8021
8022	MAN2HTML_PATH="$cf_man2html"
8023	echo "$as_me:8023: checking for $cf_man2html top/bottom margins" >&5
8024echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
8025
8026	# for this example, expect 3 lines of content, the remainder is head/foot
8027	cat >conftest.in <<CF_EOF
8028.TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
8029.SH SECTION
8030MARKER
8031CF_EOF
8032
8033	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
8034
8035	cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
8036	cf_man2html_top=`expr "$cf_man2html_1st" - 2`
8037	cf_man2html_bot="`wc -l conftest.out |sed -e 's/[^0-9]//g'`"
8038	cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
8039	cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
8040
8041	echo "$as_me:8041: result: $cf_man2html_top_bot" >&5
8042echo "${ECHO_T}$cf_man2html_top_bot" >&6
8043
8044	echo "$as_me:8044: checking for pagesize to use" >&5
8045echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
8046	for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
8047	do
8048	cat >>conftest.in <<CF_EOF
8049.nf
80500
80511
80522
80533
80544
80555
80566
80577
80588
80599
8060CF_EOF
8061	done
8062
8063	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
8064	cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
8065	test -z "$cf_man2html_page" && cf_man2html_page=99999
8066	test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
8067
8068	rm -rf conftest*
8069	echo "$as_me:8069: result: $cf_man2html_page" >&5
8070echo "${ECHO_T}$cf_man2html_page" >&6
8071
8072	cat >>$MAN2HTML_TEMP <<CF_EOF
8073: \${MAN2HTML_PATH=$MAN2HTML_PATH}
8074MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
8075case \${TYPE} in
8076(ms)
8077	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
8078	;;
8079(*)
8080	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
8081	;;
8082esac
8083CF_EOF
8084fi
8085
8086chmod 700 $MAN2HTML_TEMP
8087
8088EXTRAOBJS=""
8089echo "$as_me:8089: checking for ANSI C header files" >&5
8090echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8091if test "${ac_cv_header_stdc+set}" = set; then
8092  echo $ECHO_N "(cached) $ECHO_C" >&6
8093else
8094  cat >"conftest.$ac_ext" <<_ACEOF
8095#line 8095 "configure"
8096#include "confdefs.h"
8097#include <stdlib.h>
8098#include <stdarg.h>
8099#include <string.h>
8100#include <float.h>
8101
8102_ACEOF
8103if { (eval echo "$as_me:8103: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8104  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8105  ac_status=$?
8106  $EGREP -v '^ *\+' conftest.er1 >conftest.err
8107  rm -f conftest.er1
8108  cat conftest.err >&5
8109  echo "$as_me:8109: \$? = $ac_status" >&5
8110  (exit "$ac_status"); } >/dev/null; then
8111  if test -s conftest.err; then
8112    ac_cpp_err=$ac_c_preproc_warn_flag
8113  else
8114    ac_cpp_err=
8115  fi
8116else
8117  ac_cpp_err=yes
8118fi
8119if test -z "$ac_cpp_err"; then
8120  ac_cv_header_stdc=yes
8121else
8122  echo "$as_me: failed program was:" >&5
8123  cat "conftest.$ac_ext" >&5
8124  ac_cv_header_stdc=no
8125fi
8126rm -f conftest.err "conftest.$ac_ext"
8127
8128if test $ac_cv_header_stdc = yes; then
8129  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8130  cat >"conftest.$ac_ext" <<_ACEOF
8131#line 8131 "configure"
8132#include "confdefs.h"
8133#include <string.h>
8134
8135_ACEOF
8136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8137  $EGREP "memchr" >/dev/null 2>&1; then
8138  :
8139else
8140  ac_cv_header_stdc=no
8141fi
8142rm -rf conftest*
8143
8144fi
8145
8146if test $ac_cv_header_stdc = yes; then
8147  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8148  cat >"conftest.$ac_ext" <<_ACEOF
8149#line 8149 "configure"
8150#include "confdefs.h"
8151#include <stdlib.h>
8152
8153_ACEOF
8154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8155  $EGREP "free" >/dev/null 2>&1; then
8156  :
8157else
8158  ac_cv_header_stdc=no
8159fi
8160rm -rf conftest*
8161
8162fi
8163
8164if test $ac_cv_header_stdc = yes; then
8165  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8166  if test "$cross_compiling" = yes; then
8167  :
8168else
8169  cat >"conftest.$ac_ext" <<_ACEOF
8170#line 8170 "configure"
8171#include "confdefs.h"
8172#include <ctype.h>
8173#if ((' ' & 0x0FF) == 0x020)
8174# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8175# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8176#else
8177# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8178                     || ('j' <= (c) && (c) <= 'r') \
8179                     || ('s' <= (c) && (c) <= 'z'))
8180# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8181#endif
8182
8183#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8184int
8185main (void)
8186{
8187  int i;
8188  for (i = 0; i < 256; i++)
8189    if (XOR (islower (i), ISLOWER (i))
8190        || toupper (i) != TOUPPER (i))
8191      $ac_main_return(2);
8192  $ac_main_return (0);
8193}
8194_ACEOF
8195rm -f "conftest$ac_exeext"
8196if { (eval echo "$as_me:8196: \"$ac_link\"") >&5
8197  (eval $ac_link) 2>&5
8198  ac_status=$?
8199  echo "$as_me:8199: \$? = $ac_status" >&5
8200  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8201  { (eval echo "$as_me:8201: \"$ac_try\"") >&5
8202  (eval $ac_try) 2>&5
8203  ac_status=$?
8204  echo "$as_me:8204: \$? = $ac_status" >&5
8205  (exit "$ac_status"); }; }; then
8206  :
8207else
8208  echo "$as_me: program exited with status $ac_status" >&5
8209echo "$as_me: failed program was:" >&5
8210cat "conftest.$ac_ext" >&5
8211ac_cv_header_stdc=no
8212fi
8213rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8214fi
8215fi
8216fi
8217echo "$as_me:8217: result: $ac_cv_header_stdc" >&5
8218echo "${ECHO_T}$ac_cv_header_stdc" >&6
8219if test $ac_cv_header_stdc = yes; then
8220
8221cat >>confdefs.h <<\EOF
8222#define STDC_HEADERS 1
8223EOF
8224
8225fi
8226
8227echo "$as_me:8227: checking for inline" >&5
8228echo $ECHO_N "checking for inline... $ECHO_C" >&6
8229if test "${ac_cv_c_inline+set}" = set; then
8230  echo $ECHO_N "(cached) $ECHO_C" >&6
8231else
8232  ac_cv_c_inline=no
8233for ac_kw in inline __inline__ __inline; do
8234  cat >"conftest.$ac_ext" <<_ACEOF
8235#line 8235 "configure"
8236#include "confdefs.h"
8237#ifndef __cplusplus
8238static $ac_kw int static_foo () {return 0; }
8239$ac_kw int foo () {return 0; }
8240#endif
8241
8242_ACEOF
8243rm -f "conftest.$ac_objext"
8244if { (eval echo "$as_me:8244: \"$ac_compile\"") >&5
8245  (eval $ac_compile) 2>&5
8246  ac_status=$?
8247  echo "$as_me:8247: \$? = $ac_status" >&5
8248  (exit "$ac_status"); } &&
8249         { ac_try='test -s "conftest.$ac_objext"'
8250  { (eval echo "$as_me:8250: \"$ac_try\"") >&5
8251  (eval $ac_try) 2>&5
8252  ac_status=$?
8253  echo "$as_me:8253: \$? = $ac_status" >&5
8254  (exit "$ac_status"); }; }; then
8255  ac_cv_c_inline=$ac_kw; break
8256else
8257  echo "$as_me: failed program was:" >&5
8258cat "conftest.$ac_ext" >&5
8259fi
8260rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8261done
8262
8263fi
8264echo "$as_me:8264: result: $ac_cv_c_inline" >&5
8265echo "${ECHO_T}$ac_cv_c_inline" >&6
8266case $ac_cv_c_inline in
8267  inline | yes) ;;
8268  no)
8269cat >>confdefs.h <<\EOF
8270#define inline
8271EOF
8272 ;;
8273  *)  cat >>confdefs.h <<EOF
8274#define inline $ac_cv_c_inline
8275EOF
8276 ;;
8277esac
8278
8279# On IRIX 5.3, sys/types and inttypes.h are conflicting.
8280
8281for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8282                  inttypes.h stdint.h unistd.h
8283do
8284as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8285echo "$as_me:8285: checking for $ac_header" >&5
8286echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8287if eval "test \"\${$as_ac_Header+set}\" = set"; then
8288  echo $ECHO_N "(cached) $ECHO_C" >&6
8289else
8290  cat >"conftest.$ac_ext" <<_ACEOF
8291#line 8291 "configure"
8292#include "confdefs.h"
8293$ac_includes_default
8294#include <$ac_header>
8295_ACEOF
8296rm -f "conftest.$ac_objext"
8297if { (eval echo "$as_me:8297: \"$ac_compile\"") >&5
8298  (eval $ac_compile) 2>&5
8299  ac_status=$?
8300  echo "$as_me:8300: \$? = $ac_status" >&5
8301  (exit "$ac_status"); } &&
8302         { ac_try='test -s "conftest.$ac_objext"'
8303  { (eval echo "$as_me:8303: \"$ac_try\"") >&5
8304  (eval $ac_try) 2>&5
8305  ac_status=$?
8306  echo "$as_me:8306: \$? = $ac_status" >&5
8307  (exit "$ac_status"); }; }; then
8308  eval "$as_ac_Header=yes"
8309else
8310  echo "$as_me: failed program was:" >&5
8311cat "conftest.$ac_ext" >&5
8312eval "$as_ac_Header=no"
8313fi
8314rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8315fi
8316echo "$as_me:8316: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8317echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8318if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8319  cat >>confdefs.h <<EOF
8320#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8321EOF
8322
8323fi
8324done
8325
8326echo "$as_me:8326: checking for off_t" >&5
8327echo $ECHO_N "checking for off_t... $ECHO_C" >&6
8328if test "${ac_cv_type_off_t+set}" = set; then
8329  echo $ECHO_N "(cached) $ECHO_C" >&6
8330else
8331  cat >"conftest.$ac_ext" <<_ACEOF
8332#line 8332 "configure"
8333#include "confdefs.h"
8334$ac_includes_default
8335int
8336main (void)
8337{
8338if ((off_t *) 0)
8339  return 0;
8340if (sizeof (off_t))
8341  return 0;
8342  ;
8343  return 0;
8344}
8345_ACEOF
8346rm -f "conftest.$ac_objext"
8347if { (eval echo "$as_me:8347: \"$ac_compile\"") >&5
8348  (eval $ac_compile) 2>&5
8349  ac_status=$?
8350  echo "$as_me:8350: \$? = $ac_status" >&5
8351  (exit "$ac_status"); } &&
8352         { ac_try='test -s "conftest.$ac_objext"'
8353  { (eval echo "$as_me:8353: \"$ac_try\"") >&5
8354  (eval $ac_try) 2>&5
8355  ac_status=$?
8356  echo "$as_me:8356: \$? = $ac_status" >&5
8357  (exit "$ac_status"); }; }; then
8358  ac_cv_type_off_t=yes
8359else
8360  echo "$as_me: failed program was:" >&5
8361cat "conftest.$ac_ext" >&5
8362ac_cv_type_off_t=no
8363fi
8364rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8365fi
8366echo "$as_me:8366: result: $ac_cv_type_off_t" >&5
8367echo "${ECHO_T}$ac_cv_type_off_t" >&6
8368if test "$ac_cv_type_off_t" = yes; then
8369  :
8370else
8371
8372cat >>confdefs.h <<EOF
8373#define off_t long
8374EOF
8375
8376fi
8377
8378echo "$as_me:8378: checking for size_t" >&5
8379echo $ECHO_N "checking for size_t... $ECHO_C" >&6
8380if test "${ac_cv_type_size_t+set}" = set; then
8381  echo $ECHO_N "(cached) $ECHO_C" >&6
8382else
8383  cat >"conftest.$ac_ext" <<_ACEOF
8384#line 8384 "configure"
8385#include "confdefs.h"
8386$ac_includes_default
8387int
8388main (void)
8389{
8390if ((size_t *) 0)
8391  return 0;
8392if (sizeof (size_t))
8393  return 0;
8394  ;
8395  return 0;
8396}
8397_ACEOF
8398rm -f "conftest.$ac_objext"
8399if { (eval echo "$as_me:8399: \"$ac_compile\"") >&5
8400  (eval $ac_compile) 2>&5
8401  ac_status=$?
8402  echo "$as_me:8402: \$? = $ac_status" >&5
8403  (exit "$ac_status"); } &&
8404         { ac_try='test -s "conftest.$ac_objext"'
8405  { (eval echo "$as_me:8405: \"$ac_try\"") >&5
8406  (eval $ac_try) 2>&5
8407  ac_status=$?
8408  echo "$as_me:8408: \$? = $ac_status" >&5
8409  (exit "$ac_status"); }; }; then
8410  ac_cv_type_size_t=yes
8411else
8412  echo "$as_me: failed program was:" >&5
8413cat "conftest.$ac_ext" >&5
8414ac_cv_type_size_t=no
8415fi
8416rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8417fi
8418echo "$as_me:8418: result: $ac_cv_type_size_t" >&5
8419echo "${ECHO_T}$ac_cv_type_size_t" >&6
8420if test "$ac_cv_type_size_t" = yes; then
8421  :
8422else
8423
8424cat >>confdefs.h <<EOF
8425#define size_t unsigned
8426EOF
8427
8428fi
8429
8430# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8431# for constant arguments.  Useless!
8432echo "$as_me:8432: checking for working alloca.h" >&5
8433echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
8434if test "${ac_cv_working_alloca_h+set}" = set; then
8435  echo $ECHO_N "(cached) $ECHO_C" >&6
8436else
8437  cat >"conftest.$ac_ext" <<_ACEOF
8438#line 8438 "configure"
8439#include "confdefs.h"
8440#include <alloca.h>
8441int
8442main (void)
8443{
8444char *p = (char *) alloca (2 * sizeof (int));
8445  ;
8446  return 0;
8447}
8448_ACEOF
8449rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8450if { (eval echo "$as_me:8450: \"$ac_link\"") >&5
8451  (eval $ac_link) 2>&5
8452  ac_status=$?
8453  echo "$as_me:8453: \$? = $ac_status" >&5
8454  (exit "$ac_status"); } &&
8455         { ac_try='test -s "conftest$ac_exeext"'
8456  { (eval echo "$as_me:8456: \"$ac_try\"") >&5
8457  (eval $ac_try) 2>&5
8458  ac_status=$?
8459  echo "$as_me:8459: \$? = $ac_status" >&5
8460  (exit "$ac_status"); }; }; then
8461  ac_cv_working_alloca_h=yes
8462else
8463  echo "$as_me: failed program was:" >&5
8464cat "conftest.$ac_ext" >&5
8465ac_cv_working_alloca_h=no
8466fi
8467rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8468fi
8469echo "$as_me:8469: result: $ac_cv_working_alloca_h" >&5
8470echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
8471if test $ac_cv_working_alloca_h = yes; then
8472
8473cat >>confdefs.h <<\EOF
8474#define HAVE_ALLOCA_H 1
8475EOF
8476
8477fi
8478
8479echo "$as_me:8479: checking for alloca" >&5
8480echo $ECHO_N "checking for alloca... $ECHO_C" >&6
8481if test "${ac_cv_func_alloca_works+set}" = set; then
8482  echo $ECHO_N "(cached) $ECHO_C" >&6
8483else
8484  cat >"conftest.$ac_ext" <<_ACEOF
8485#line 8485 "configure"
8486#include "confdefs.h"
8487#ifdef __GNUC__
8488# define alloca __builtin_alloca
8489#else
8490# ifdef _MSC_VER
8491#  include <malloc.h>
8492#  define alloca _alloca
8493# else
8494#  if HAVE_ALLOCA_H
8495#   include <alloca.h>
8496#  else
8497#   ifdef _AIX
8498 #pragma alloca
8499#   else
8500#    ifndef alloca /* predefined by HP cc +Olibcalls */
8501char *alloca ();
8502#    endif
8503#   endif
8504#  endif
8505# endif
8506#endif
8507
8508int
8509main (void)
8510{
8511char *p = (char *) alloca (1);
8512  ;
8513  return 0;
8514}
8515_ACEOF
8516rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8517if { (eval echo "$as_me:8517: \"$ac_link\"") >&5
8518  (eval $ac_link) 2>&5
8519  ac_status=$?
8520  echo "$as_me:8520: \$? = $ac_status" >&5
8521  (exit "$ac_status"); } &&
8522         { ac_try='test -s "conftest$ac_exeext"'
8523  { (eval echo "$as_me:8523: \"$ac_try\"") >&5
8524  (eval $ac_try) 2>&5
8525  ac_status=$?
8526  echo "$as_me:8526: \$? = $ac_status" >&5
8527  (exit "$ac_status"); }; }; then
8528  ac_cv_func_alloca_works=yes
8529else
8530  echo "$as_me: failed program was:" >&5
8531cat "conftest.$ac_ext" >&5
8532ac_cv_func_alloca_works=no
8533fi
8534rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8535fi
8536echo "$as_me:8536: result: $ac_cv_func_alloca_works" >&5
8537echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
8538
8539if test $ac_cv_func_alloca_works = yes; then
8540
8541cat >>confdefs.h <<\EOF
8542#define HAVE_ALLOCA 1
8543EOF
8544
8545else
8546  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8547# that cause trouble.  Some versions do not even contain alloca or
8548# contain a buggy version.  If you still want to use their alloca,
8549# use ar to extract alloca.o from them instead of compiling alloca.c.
8550
8551ALLOCA="alloca.$ac_objext"
8552
8553cat >>confdefs.h <<\EOF
8554#define C_ALLOCA 1
8555EOF
8556
8557echo "$as_me:8557: checking whether \`alloca.c' needs Cray hooks" >&5
8558echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
8559if test "${ac_cv_os_cray+set}" = set; then
8560  echo $ECHO_N "(cached) $ECHO_C" >&6
8561else
8562  cat >"conftest.$ac_ext" <<_ACEOF
8563#line 8563 "configure"
8564#include "confdefs.h"
8565#if defined(CRAY) && ! defined(CRAY2)
8566webecray
8567#else
8568wenotbecray
8569#endif
8570
8571_ACEOF
8572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8573  $EGREP "webecray" >/dev/null 2>&1; then
8574  ac_cv_os_cray=yes
8575else
8576  ac_cv_os_cray=no
8577fi
8578rm -rf conftest*
8579
8580fi
8581echo "$as_me:8581: result: $ac_cv_os_cray" >&5
8582echo "${ECHO_T}$ac_cv_os_cray" >&6
8583if test $ac_cv_os_cray = yes; then
8584  for ac_func in _getb67 GETB67 getb67; do
8585    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8586echo "$as_me:8586: checking for $ac_func" >&5
8587echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8588if eval "test \"\${$as_ac_var+set}\" = set"; then
8589  echo $ECHO_N "(cached) $ECHO_C" >&6
8590else
8591  cat >"conftest.$ac_ext" <<_ACEOF
8592#line 8592 "configure"
8593#include "confdefs.h"
8594#define $ac_func autoconf_temporary
8595#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
8596#undef $ac_func
8597
8598#ifdef __cplusplus
8599extern "C"
8600#endif
8601
8602/* We use char because int might match the return type of a gcc2
8603   builtin and then its argument prototype would still apply.  */
8604char $ac_func (void);
8605
8606int
8607main (void)
8608{
8609
8610/* The GNU C library defines stubs for functions which it implements
8611    to always fail with ENOSYS.  Some functions are actually named
8612    something starting with __ and the normal name is an alias.  */
8613#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8614#error found stub for $ac_func
8615#endif
8616
8617	return $ac_func ();
8618  ;
8619  return 0;
8620}
8621_ACEOF
8622rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8623if { (eval echo "$as_me:8623: \"$ac_link\"") >&5
8624  (eval $ac_link) 2>&5
8625  ac_status=$?
8626  echo "$as_me:8626: \$? = $ac_status" >&5
8627  (exit "$ac_status"); } &&
8628         { ac_try='test -s "conftest$ac_exeext"'
8629  { (eval echo "$as_me:8629: \"$ac_try\"") >&5
8630  (eval $ac_try) 2>&5
8631  ac_status=$?
8632  echo "$as_me:8632: \$? = $ac_status" >&5
8633  (exit "$ac_status"); }; }; then
8634  eval "$as_ac_var=yes"
8635else
8636  echo "$as_me: failed program was:" >&5
8637cat "conftest.$ac_ext" >&5
8638eval "$as_ac_var=no"
8639fi
8640rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8641fi
8642echo "$as_me:8642: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8643echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8644if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8645
8646cat >>confdefs.h <<EOF
8647#define CRAY_STACKSEG_END $ac_func
8648EOF
8649
8650    break
8651fi
8652
8653  done
8654fi
8655
8656echo "$as_me:8656: checking stack direction for C alloca" >&5
8657echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
8658if test "${ac_cv_c_stack_direction+set}" = set; then
8659  echo $ECHO_N "(cached) $ECHO_C" >&6
8660else
8661  if test "$cross_compiling" = yes; then
8662  ac_cv_c_stack_direction=0
8663else
8664  cat >"conftest.$ac_ext" <<_ACEOF
8665#line 8665 "configure"
8666#include "confdefs.h"
8667int
8668find_stack_direction (void)
8669{
8670  static char *addr = 0;
8671  auto char dummy;
8672  if (addr == 0)
8673    {
8674      addr = &dummy;
8675      return find_stack_direction ();
8676    }
8677  else
8678    return (&dummy > addr) ? 1 : -1;
8679}
8680
8681int
8682main (void)
8683{
8684  $ac_main_return (find_stack_direction () < 0);
8685}
8686_ACEOF
8687rm -f "conftest$ac_exeext"
8688if { (eval echo "$as_me:8688: \"$ac_link\"") >&5
8689  (eval $ac_link) 2>&5
8690  ac_status=$?
8691  echo "$as_me:8691: \$? = $ac_status" >&5
8692  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8693  { (eval echo "$as_me:8693: \"$ac_try\"") >&5
8694  (eval $ac_try) 2>&5
8695  ac_status=$?
8696  echo "$as_me:8696: \$? = $ac_status" >&5
8697  (exit "$ac_status"); }; }; then
8698  ac_cv_c_stack_direction=1
8699else
8700  echo "$as_me: program exited with status $ac_status" >&5
8701echo "$as_me: failed program was:" >&5
8702cat "conftest.$ac_ext" >&5
8703ac_cv_c_stack_direction=-1
8704fi
8705rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8706fi
8707fi
8708echo "$as_me:8708: result: $ac_cv_c_stack_direction" >&5
8709echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
8710
8711cat >>confdefs.h <<EOF
8712#define STACK_DIRECTION $ac_cv_c_stack_direction
8713EOF
8714
8715fi
8716
8717for ac_header in stdlib.h unistd.h
8718do
8719as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8720echo "$as_me:8720: checking for $ac_header" >&5
8721echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8722if eval "test \"\${$as_ac_Header+set}\" = set"; then
8723  echo $ECHO_N "(cached) $ECHO_C" >&6
8724else
8725  cat >"conftest.$ac_ext" <<_ACEOF
8726#line 8726 "configure"
8727#include "confdefs.h"
8728#include <$ac_header>
8729_ACEOF
8730if { (eval echo "$as_me:8730: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8731  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8732  ac_status=$?
8733  $EGREP -v '^ *\+' conftest.er1 >conftest.err
8734  rm -f conftest.er1
8735  cat conftest.err >&5
8736  echo "$as_me:8736: \$? = $ac_status" >&5
8737  (exit "$ac_status"); } >/dev/null; then
8738  if test -s conftest.err; then
8739    ac_cpp_err=$ac_c_preproc_warn_flag
8740  else
8741    ac_cpp_err=
8742  fi
8743else
8744  ac_cpp_err=yes
8745fi
8746if test -z "$ac_cpp_err"; then
8747  eval "$as_ac_Header=yes"
8748else
8749  echo "$as_me: failed program was:" >&5
8750  cat "conftest.$ac_ext" >&5
8751  eval "$as_ac_Header=no"
8752fi
8753rm -f conftest.err "conftest.$ac_ext"
8754fi
8755echo "$as_me:8755: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8756echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8757if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8758  cat >>confdefs.h <<EOF
8759#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8760EOF
8761
8762fi
8763done
8764
8765for ac_func in getpagesize
8766do
8767as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8768echo "$as_me:8768: checking for $ac_func" >&5
8769echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8770if eval "test \"\${$as_ac_var+set}\" = set"; then
8771  echo $ECHO_N "(cached) $ECHO_C" >&6
8772else
8773  cat >"conftest.$ac_ext" <<_ACEOF
8774#line 8774 "configure"
8775#include "confdefs.h"
8776#define $ac_func autoconf_temporary
8777#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
8778#undef $ac_func
8779
8780#ifdef __cplusplus
8781extern "C"
8782#endif
8783
8784/* We use char because int might match the return type of a gcc2
8785   builtin and then its argument prototype would still apply.  */
8786char $ac_func (void);
8787
8788int
8789main (void)
8790{
8791
8792/* The GNU C library defines stubs for functions which it implements
8793    to always fail with ENOSYS.  Some functions are actually named
8794    something starting with __ and the normal name is an alias.  */
8795#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8796#error found stub for $ac_func
8797#endif
8798
8799	return $ac_func ();
8800  ;
8801  return 0;
8802}
8803_ACEOF
8804rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8805if { (eval echo "$as_me:8805: \"$ac_link\"") >&5
8806  (eval $ac_link) 2>&5
8807  ac_status=$?
8808  echo "$as_me:8808: \$? = $ac_status" >&5
8809  (exit "$ac_status"); } &&
8810         { ac_try='test -s "conftest$ac_exeext"'
8811  { (eval echo "$as_me:8811: \"$ac_try\"") >&5
8812  (eval $ac_try) 2>&5
8813  ac_status=$?
8814  echo "$as_me:8814: \$? = $ac_status" >&5
8815  (exit "$ac_status"); }; }; then
8816  eval "$as_ac_var=yes"
8817else
8818  echo "$as_me: failed program was:" >&5
8819cat "conftest.$ac_ext" >&5
8820eval "$as_ac_var=no"
8821fi
8822rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8823fi
8824echo "$as_me:8824: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8825echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8826if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8827  cat >>confdefs.h <<EOF
8828#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8829EOF
8830
8831fi
8832done
8833
8834echo "$as_me:8834: checking for working mmap" >&5
8835echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8836if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8837  echo $ECHO_N "(cached) $ECHO_C" >&6
8838else
8839  if test "$cross_compiling" = yes; then
8840  ac_cv_func_mmap_fixed_mapped=no
8841else
8842  cat >"conftest.$ac_ext" <<_ACEOF
8843#line 8843 "configure"
8844#include "confdefs.h"
8845$ac_includes_default
8846/* Thanks to Mike Haertel and Jim Avera for this test.
8847   Here is a matrix of mmap possibilities:
8848	mmap private not fixed
8849	mmap private fixed at somewhere currently unmapped
8850	mmap private fixed at somewhere already mapped
8851	mmap shared not fixed
8852	mmap shared fixed at somewhere currently unmapped
8853	mmap shared fixed at somewhere already mapped
8854   For private mappings, we should verify that changes cannot be read()
8855   back from the file, nor mmap's back from the file at a different
8856   address.  (There have been systems where private was not correctly
8857   implemented like the infamous i386 svr4.0, and systems where the
8858   VM page cache was not coherent with the file system buffer cache
8859   like early versions of FreeBSD and possibly contemporary NetBSD.)
8860   For shared mappings, we should conversely verify that changes get
8861   propogated back to all the places they're supposed to be.
8862
8863   Grep wants private fixed already mapped.
8864   The main things grep needs to know about mmap are:
8865   * does it exist and is it safe to write into the mmap'd area
8866   * how to use it (BSD variants)  */
8867
8868#include <fcntl.h>
8869#include <sys/mman.h>
8870
8871#if !STDC_HEADERS && !HAVE_STDLIB_H
8872char *malloc ();
8873#endif
8874
8875/* This mess was copied from the GNU getpagesize.h.  */
8876#if !HAVE_GETPAGESIZE
8877/* Assume that all systems that can run configure have sys/param.h.  */
8878# if !HAVE_SYS_PARAM_H
8879#  define HAVE_SYS_PARAM_H 1
8880# endif
8881
8882# ifdef _SC_PAGESIZE
8883#  define getpagesize() sysconf(_SC_PAGESIZE)
8884# else /* no _SC_PAGESIZE */
8885#  if HAVE_SYS_PARAM_H
8886#   include <sys/param.h>
8887#   ifdef EXEC_PAGESIZE
8888#    define getpagesize() EXEC_PAGESIZE
8889#   else /* no EXEC_PAGESIZE */
8890#    ifdef NBPG
8891#     define getpagesize() NBPG * CLSIZE
8892#     ifndef CLSIZE
8893#      define CLSIZE 1
8894#     endif /* no CLSIZE */
8895#    else /* no NBPG */
8896#     ifdef NBPC
8897#      define getpagesize() NBPC
8898#     else /* no NBPC */
8899#      ifdef PAGESIZE
8900#       define getpagesize() PAGESIZE
8901#      endif /* PAGESIZE */
8902#     endif /* no NBPC */
8903#    endif /* no NBPG */
8904#   endif /* no EXEC_PAGESIZE */
8905#  else /* no HAVE_SYS_PARAM_H */
8906#   define getpagesize() 8192	/* punt totally */
8907#  endif /* no HAVE_SYS_PARAM_H */
8908# endif /* no _SC_PAGESIZE */
8909
8910#endif /* no HAVE_GETPAGESIZE */
8911
8912int
8913main (void)
8914{
8915  char *data, *data2, *data3;
8916  int i, pagesize;
8917  int fd;
8918
8919  pagesize = getpagesize ();
8920
8921  /* First, make a file with some known garbage in it. */
8922  data = (char *) malloc (pagesize);
8923  if (!data)
8924    $ac_main_return (1);
8925  for (i = 0; i < pagesize; ++i)
8926    *(data + i) = rand ();
8927  umask (0);
8928  fd = creat ("conftest.mmap", 0600);
8929  if (fd < 0)
8930    $ac_main_return (1);
8931  if (write (fd, data, pagesize) != pagesize)
8932    $ac_main_return (1);
8933  close (fd);
8934
8935  /* Next, try to mmap the file at a fixed address which already has
8936     something else allocated at it.  If we can, also make sure that
8937     we see the same garbage.  */
8938  fd = open ("conftest.mmap", O_RDWR);
8939  if (fd < 0)
8940    $ac_main_return (1);
8941  data2 = (char *) malloc (2 * pagesize);
8942  if (!data2)
8943    $ac_main_return (1);
8944  data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
8945  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8946                     MAP_PRIVATE | MAP_FIXED, fd, 0L))
8947    $ac_main_return (1);
8948  for (i = 0; i < pagesize; ++i)
8949    if (*(data + i) != *(data2 + i))
8950      $ac_main_return (1);
8951
8952  /* Finally, make sure that changes to the mapped area do not
8953     percolate back to the file as seen by read().  (This is a bug on
8954     some variants of i386 svr4.0.)  */
8955  for (i = 0; i < pagesize; ++i)
8956    *(data2 + i) = *(data2 + i) + 1;
8957  data3 = (char *) malloc (pagesize);
8958  if (!data3)
8959    $ac_main_return (1);
8960  if (read (fd, data3, pagesize) != pagesize)
8961    $ac_main_return (1);
8962  for (i = 0; i < pagesize; ++i)
8963    if (*(data + i) != *(data3 + i))
8964      $ac_main_return (1);
8965  close (fd);
8966  $ac_main_return (0);
8967}
8968_ACEOF
8969rm -f "conftest$ac_exeext"
8970if { (eval echo "$as_me:8970: \"$ac_link\"") >&5
8971  (eval $ac_link) 2>&5
8972  ac_status=$?
8973  echo "$as_me:8973: \$? = $ac_status" >&5
8974  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8975  { (eval echo "$as_me:8975: \"$ac_try\"") >&5
8976  (eval $ac_try) 2>&5
8977  ac_status=$?
8978  echo "$as_me:8978: \$? = $ac_status" >&5
8979  (exit "$ac_status"); }; }; then
8980  ac_cv_func_mmap_fixed_mapped=yes
8981else
8982  echo "$as_me: program exited with status $ac_status" >&5
8983echo "$as_me: failed program was:" >&5
8984cat "conftest.$ac_ext" >&5
8985ac_cv_func_mmap_fixed_mapped=no
8986fi
8987rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8988fi
8989fi
8990echo "$as_me:8990: result: $ac_cv_func_mmap_fixed_mapped" >&5
8991echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8992if test $ac_cv_func_mmap_fixed_mapped = yes; then
8993
8994cat >>confdefs.h <<\EOF
8995#define HAVE_MMAP 1
8996EOF
8997
8998fi
8999rm -f conftest.mmap
9000
9001echo "$as_me:9001: checking whether we are using the GNU C Library 2.1 or newer" >&5
9002echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
9003if test "${ac_cv_gnu_library_2_1+set}" = set; then
9004  echo $ECHO_N "(cached) $ECHO_C" >&6
9005else
9006  cat >"conftest.$ac_ext" <<_ACEOF
9007#line 9007 "configure"
9008#include "confdefs.h"
9009
9010#include <features.h>
9011#ifdef __GNU_LIBRARY__
9012 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
9013  Lucky GNU user
9014 #endif
9015#endif
9016
9017_ACEOF
9018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9019  $EGREP "Lucky GNU user" >/dev/null 2>&1; then
9020  ac_cv_gnu_library_2_1=yes
9021else
9022  ac_cv_gnu_library_2_1=no
9023fi
9024rm -rf conftest*
9025
9026fi
9027echo "$as_me:9027: result: $ac_cv_gnu_library_2_1" >&5
9028echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
9029
9030	GLIBC21="$ac_cv_gnu_library_2_1"
9031
9032cf_makefile=makefile
9033
9034test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d "$srcdir/po" && cd "$srcdir/po" && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
9035
9036# Allow override of "config.h" definition:
9037: ${CONFIG_H:=config.h}
9038
9039if test -z "$PACKAGE" ; then
9040	{ { echo "$as_me:9040: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
9041echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
9042   { (exit 1); exit 1; }; }
9043fi
9044
9045if test -z "$VERSION" ; then
9046if test -f "$srcdir/VERSION" ; then
9047	VERSION=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
9048else
9049	VERSION=unknown
9050fi
9051fi
9052
9053for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
9054stdlib.h string.h unistd.h sys/param.h
9055do
9056as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9057echo "$as_me:9057: checking for $ac_header" >&5
9058echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9059if eval "test \"\${$as_ac_Header+set}\" = set"; then
9060  echo $ECHO_N "(cached) $ECHO_C" >&6
9061else
9062  cat >"conftest.$ac_ext" <<_ACEOF
9063#line 9063 "configure"
9064#include "confdefs.h"
9065#include <$ac_header>
9066_ACEOF
9067if { (eval echo "$as_me:9067: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9068  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9069  ac_status=$?
9070  $EGREP -v '^ *\+' conftest.er1 >conftest.err
9071  rm -f conftest.er1
9072  cat conftest.err >&5
9073  echo "$as_me:9073: \$? = $ac_status" >&5
9074  (exit "$ac_status"); } >/dev/null; then
9075  if test -s conftest.err; then
9076    ac_cpp_err=$ac_c_preproc_warn_flag
9077  else
9078    ac_cpp_err=
9079  fi
9080else
9081  ac_cpp_err=yes
9082fi
9083if test -z "$ac_cpp_err"; then
9084  eval "$as_ac_Header=yes"
9085else
9086  echo "$as_me: failed program was:" >&5
9087  cat "conftest.$ac_ext" >&5
9088  eval "$as_ac_Header=no"
9089fi
9090rm -f conftest.err "conftest.$ac_ext"
9091fi
9092echo "$as_me:9092: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9093echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9094if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9095  cat >>confdefs.h <<EOF
9096#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9097EOF
9098
9099fi
9100done
9101
9102for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
9103getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
9104strdup strtoul tsearch __argz_count __argz_stringify __argz_next
9105do
9106as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9107echo "$as_me:9107: checking for $ac_func" >&5
9108echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9109if eval "test \"\${$as_ac_var+set}\" = set"; then
9110  echo $ECHO_N "(cached) $ECHO_C" >&6
9111else
9112  cat >"conftest.$ac_ext" <<_ACEOF
9113#line 9113 "configure"
9114#include "confdefs.h"
9115#define $ac_func autoconf_temporary
9116#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9117#undef $ac_func
9118
9119#ifdef __cplusplus
9120extern "C"
9121#endif
9122
9123/* We use char because int might match the return type of a gcc2
9124   builtin and then its argument prototype would still apply.  */
9125char $ac_func (void);
9126
9127int
9128main (void)
9129{
9130
9131/* The GNU C library defines stubs for functions which it implements
9132    to always fail with ENOSYS.  Some functions are actually named
9133    something starting with __ and the normal name is an alias.  */
9134#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9135#error found stub for $ac_func
9136#endif
9137
9138	return $ac_func ();
9139  ;
9140  return 0;
9141}
9142_ACEOF
9143rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9144if { (eval echo "$as_me:9144: \"$ac_link\"") >&5
9145  (eval $ac_link) 2>&5
9146  ac_status=$?
9147  echo "$as_me:9147: \$? = $ac_status" >&5
9148  (exit "$ac_status"); } &&
9149         { ac_try='test -s "conftest$ac_exeext"'
9150  { (eval echo "$as_me:9150: \"$ac_try\"") >&5
9151  (eval $ac_try) 2>&5
9152  ac_status=$?
9153  echo "$as_me:9153: \$? = $ac_status" >&5
9154  (exit "$ac_status"); }; }; then
9155  eval "$as_ac_var=yes"
9156else
9157  echo "$as_me: failed program was:" >&5
9158cat "conftest.$ac_ext" >&5
9159eval "$as_ac_var=no"
9160fi
9161rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9162fi
9163echo "$as_me:9163: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9164echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9165if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9166  cat >>confdefs.h <<EOF
9167#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9168EOF
9169
9170fi
9171done
9172
9173# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
9174if test "${with_libiconv_prefix+set}" = set; then
9175  withval="$with_libiconv_prefix"
9176
9177case "$withval" in
9178(no)
9179	;;
9180(yes)
9181	;;
9182(*)
9183
9184for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
9185	if test -d "$cf_searchpath/include" ; then
9186
9187if test -n "$cf_searchpath/include" ; then
9188  for cf_add_incdir in $cf_searchpath/include
9189  do
9190	while test "$cf_add_incdir" != /usr/include
9191	do
9192	  if test -d "$cf_add_incdir"
9193	  then
9194		cf_have_incdir=no
9195		if test -n "$CFLAGS$CPPFLAGS" ; then
9196		  # a loop is needed to ensure we can add subdirs of existing dirs
9197		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9198			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9199			  cf_have_incdir=yes; break
9200			fi
9201		  done
9202		fi
9203
9204		if test "$cf_have_incdir" = no ; then
9205		  if test "$cf_add_incdir" = /usr/local/include ; then
9206			if test "$GCC" = yes
9207			then
9208			  cf_save_CPPFLAGS=$CPPFLAGS
9209
9210	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9211	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9212
9213			  cat >"conftest.$ac_ext" <<_ACEOF
9214#line 9214 "configure"
9215#include "confdefs.h"
9216#include <stdio.h>
9217int
9218main (void)
9219{
9220printf("Hello")
9221  ;
9222  return 0;
9223}
9224_ACEOF
9225rm -f "conftest.$ac_objext"
9226if { (eval echo "$as_me:9226: \"$ac_compile\"") >&5
9227  (eval $ac_compile) 2>&5
9228  ac_status=$?
9229  echo "$as_me:9229: \$? = $ac_status" >&5
9230  (exit "$ac_status"); } &&
9231         { ac_try='test -s "conftest.$ac_objext"'
9232  { (eval echo "$as_me:9232: \"$ac_try\"") >&5
9233  (eval $ac_try) 2>&5
9234  ac_status=$?
9235  echo "$as_me:9235: \$? = $ac_status" >&5
9236  (exit "$ac_status"); }; }; then
9237  :
9238else
9239  echo "$as_me: failed program was:" >&5
9240cat "conftest.$ac_ext" >&5
9241cf_have_incdir=yes
9242fi
9243rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9244			  CPPFLAGS=$cf_save_CPPFLAGS
9245			fi
9246		  fi
9247		fi
9248
9249		if test "$cf_have_incdir" = no ; then
9250		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9251
9252echo "${as_me:-configure}:9252: testing adding $cf_add_incdir to include-path ..." 1>&5
9253
9254		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9255
9256		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9257		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9258		  cf_add_incdir="$cf_top_incdir"
9259		else
9260		  break
9261		fi
9262	  else
9263		break
9264	  fi
9265	done
9266  done
9267fi
9268
9269	elif test -d "$cf_searchpath/../include" ; then
9270
9271if test -n "$cf_searchpath/../include" ; then
9272  for cf_add_incdir in $cf_searchpath/../include
9273  do
9274	while test "$cf_add_incdir" != /usr/include
9275	do
9276	  if test -d "$cf_add_incdir"
9277	  then
9278		cf_have_incdir=no
9279		if test -n "$CFLAGS$CPPFLAGS" ; then
9280		  # a loop is needed to ensure we can add subdirs of existing dirs
9281		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9282			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9283			  cf_have_incdir=yes; break
9284			fi
9285		  done
9286		fi
9287
9288		if test "$cf_have_incdir" = no ; then
9289		  if test "$cf_add_incdir" = /usr/local/include ; then
9290			if test "$GCC" = yes
9291			then
9292			  cf_save_CPPFLAGS=$CPPFLAGS
9293
9294	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9295	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9296
9297			  cat >"conftest.$ac_ext" <<_ACEOF
9298#line 9298 "configure"
9299#include "confdefs.h"
9300#include <stdio.h>
9301int
9302main (void)
9303{
9304printf("Hello")
9305  ;
9306  return 0;
9307}
9308_ACEOF
9309rm -f "conftest.$ac_objext"
9310if { (eval echo "$as_me:9310: \"$ac_compile\"") >&5
9311  (eval $ac_compile) 2>&5
9312  ac_status=$?
9313  echo "$as_me:9313: \$? = $ac_status" >&5
9314  (exit "$ac_status"); } &&
9315         { ac_try='test -s "conftest.$ac_objext"'
9316  { (eval echo "$as_me:9316: \"$ac_try\"") >&5
9317  (eval $ac_try) 2>&5
9318  ac_status=$?
9319  echo "$as_me:9319: \$? = $ac_status" >&5
9320  (exit "$ac_status"); }; }; then
9321  :
9322else
9323  echo "$as_me: failed program was:" >&5
9324cat "conftest.$ac_ext" >&5
9325cf_have_incdir=yes
9326fi
9327rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9328			  CPPFLAGS=$cf_save_CPPFLAGS
9329			fi
9330		  fi
9331		fi
9332
9333		if test "$cf_have_incdir" = no ; then
9334		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9335
9336echo "${as_me:-configure}:9336: testing adding $cf_add_incdir to include-path ..." 1>&5
9337
9338		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9339
9340		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9341		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9342		  cf_add_incdir="$cf_top_incdir"
9343		else
9344		  break
9345		fi
9346	  else
9347		break
9348	  fi
9349	done
9350  done
9351fi
9352
9353	else
9354{ { echo "$as_me:9354: error: cannot find libiconv under $withval" >&5
9355echo "$as_me: error: cannot find libiconv under $withval" >&2;}
9356   { (exit 1); exit 1; }; }
9357	fi
9358	if test -d "$cf_searchpath/lib" ; then
9359
9360if test -n "$cf_searchpath/lib" ; then
9361	for cf_add_libdir in $cf_searchpath/lib
9362	do
9363		if test "$cf_add_libdir" = /usr/lib ; then
9364			:
9365		elif test -d "$cf_add_libdir"
9366		then
9367			cf_have_libdir=no
9368			if test -n "$LDFLAGS$LIBS" ; then
9369				# a loop is needed to ensure we can add subdirs of existing dirs
9370				for cf_test_libdir in $LDFLAGS $LIBS ; do
9371					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9372						cf_have_libdir=yes; break
9373					fi
9374				done
9375			fi
9376			if test "$cf_have_libdir" = no ; then
9377				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
9378
9379echo "${as_me:-configure}:9379: testing adding $cf_add_libdir to library-path ..." 1>&5
9380
9381				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9382			fi
9383		fi
9384	done
9385fi
9386
9387	elif test -d "$cf_searchpath" ; then
9388
9389if test -n "$cf_searchpath" ; then
9390	for cf_add_libdir in $cf_searchpath
9391	do
9392		if test "$cf_add_libdir" = /usr/lib ; then
9393			:
9394		elif test -d "$cf_add_libdir"
9395		then
9396			cf_have_libdir=no
9397			if test -n "$LDFLAGS$LIBS" ; then
9398				# a loop is needed to ensure we can add subdirs of existing dirs
9399				for cf_test_libdir in $LDFLAGS $LIBS ; do
9400					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9401						cf_have_libdir=yes; break
9402					fi
9403				done
9404			fi
9405			if test "$cf_have_libdir" = no ; then
9406				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
9407
9408echo "${as_me:-configure}:9408: testing adding $cf_add_libdir to library-path ..." 1>&5
9409
9410				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9411			fi
9412		fi
9413	done
9414fi
9415
9416	else
9417{ { echo "$as_me:9417: error: cannot find libiconv under $withval" >&5
9418echo "$as_me: error: cannot find libiconv under $withval" >&2;}
9419   { (exit 1); exit 1; }; }
9420	fi
9421done
9422
9423	;;
9424esac
9425
9426fi;
9427
9428  echo "$as_me:9428: checking for iconv" >&5
9429echo $ECHO_N "checking for iconv... $ECHO_C" >&6
9430if test "${am_cv_func_iconv+set}" = set; then
9431  echo $ECHO_N "(cached) $ECHO_C" >&6
9432else
9433
9434# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9435# will be set on completion of the AC_TRY_LINK below.
9436cf_cv_header_path_iconv=
9437cf_cv_library_path_iconv=
9438
9439echo "${as_me:-configure}:9439: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
9440
9441cf_save_LIBS="$LIBS"
9442
9443cat >"conftest.$ac_ext" <<_ACEOF
9444#line 9444 "configure"
9445#include "confdefs.h"
9446
9447#include <stdlib.h>
9448#include <iconv.h>
9449
9450int
9451main (void)
9452{
9453
9454	iconv_t cd = iconv_open("","");
9455	iconv(cd,NULL,NULL,NULL,NULL);
9456	iconv_close(cd);
9457
9458  ;
9459  return 0;
9460}
9461_ACEOF
9462rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9463if { (eval echo "$as_me:9463: \"$ac_link\"") >&5
9464  (eval $ac_link) 2>&5
9465  ac_status=$?
9466  echo "$as_me:9466: \$? = $ac_status" >&5
9467  (exit "$ac_status"); } &&
9468         { ac_try='test -s "conftest$ac_exeext"'
9469  { (eval echo "$as_me:9469: \"$ac_try\"") >&5
9470  (eval $ac_try) 2>&5
9471  ac_status=$?
9472  echo "$as_me:9472: \$? = $ac_status" >&5
9473  (exit "$ac_status"); }; }; then
9474
9475	cf_cv_find_linkage_iconv=yes
9476	cf_cv_header_path_iconv=/usr/include
9477	cf_cv_library_path_iconv=/usr/lib
9478
9479else
9480  echo "$as_me: failed program was:" >&5
9481cat "conftest.$ac_ext" >&5
9482
9483LIBS="-liconv  $cf_save_LIBS"
9484
9485cat >"conftest.$ac_ext" <<_ACEOF
9486#line 9486 "configure"
9487#include "confdefs.h"
9488
9489#include <stdlib.h>
9490#include <iconv.h>
9491
9492int
9493main (void)
9494{
9495
9496	iconv_t cd = iconv_open("","");
9497	iconv(cd,NULL,NULL,NULL,NULL);
9498	iconv_close(cd);
9499
9500  ;
9501  return 0;
9502}
9503_ACEOF
9504rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9505if { (eval echo "$as_me:9505: \"$ac_link\"") >&5
9506  (eval $ac_link) 2>&5
9507  ac_status=$?
9508  echo "$as_me:9508: \$? = $ac_status" >&5
9509  (exit "$ac_status"); } &&
9510         { ac_try='test -s "conftest$ac_exeext"'
9511  { (eval echo "$as_me:9511: \"$ac_try\"") >&5
9512  (eval $ac_try) 2>&5
9513  ac_status=$?
9514  echo "$as_me:9514: \$? = $ac_status" >&5
9515  (exit "$ac_status"); }; }; then
9516
9517	cf_cv_find_linkage_iconv=yes
9518	cf_cv_header_path_iconv=/usr/include
9519	cf_cv_library_path_iconv=/usr/lib
9520	cf_cv_library_file_iconv="-liconv"
9521
9522else
9523  echo "$as_me: failed program was:" >&5
9524cat "conftest.$ac_ext" >&5
9525
9526	cf_cv_find_linkage_iconv=no
9527	LIBS="$cf_save_LIBS"
9528
9529	test -n "$verbose" && echo "	find linkage for iconv library" 1>&6
9530
9531echo "${as_me:-configure}:9531: testing find linkage for iconv library ..." 1>&5
9532
9533echo "${as_me:-configure}:9533: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
9534
9535	cf_save_CPPFLAGS="$CPPFLAGS"
9536	cf_test_CPPFLAGS="$CPPFLAGS"
9537
9538cf_search=
9539
9540# collect the current set of include-directories from compiler flags
9541cf_header_path_list=""
9542if test -n "${CFLAGS}${CPPFLAGS}" ; then
9543	for cf_header_path in $CPPFLAGS $CFLAGS
9544	do
9545		case "$cf_header_path" in
9546		(-I*)
9547			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9548
9549test "x$cf_header_path" != "xNONE" && \
9550test -d "$cf_header_path" && \
9551 {
9552	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
9553	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
9554	test -d "$cf_header_path/include/iconv" &&       cf_search="$cf_search $cf_header_path/include/iconv"
9555	test -d "$cf_header_path/include/iconv/include" &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
9556	test -d "$cf_header_path/iconv/include" &&       cf_search="$cf_search $cf_header_path/iconv/include"
9557	test -d "$cf_header_path/iconv/include/iconv" &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
9558}
9559
9560			cf_header_path_list="$cf_header_path_list $cf_search"
9561			;;
9562		esac
9563	done
9564fi
9565
9566# add the variations for the package we are looking for
9567
9568cf_search=
9569
9570test "x$prefix" != "xNONE" && \
9571test -d "$prefix" && \
9572 {
9573	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
9574	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
9575	test -d "$prefix/include/iconv" &&       cf_search="$cf_search $prefix/include/iconv"
9576	test -d "$prefix/include/iconv/include" &&    cf_search="$cf_search $prefix/include/iconv/include"
9577	test -d "$prefix/iconv/include" &&       cf_search="$cf_search $prefix/iconv/include"
9578	test -d "$prefix/iconv/include/iconv" &&    cf_search="$cf_search $prefix/iconv/include/iconv"
9579}
9580
9581for cf_subdir_prefix in \
9582	/usr \
9583	/usr/local \
9584	/usr/pkg \
9585	/opt \
9586	/opt/local \
9587	$HOME
9588do
9589
9590test "x$cf_subdir_prefix" != "x$prefix" && \
9591test -d "$cf_subdir_prefix" && \
9592{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9593	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
9594	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
9595	test -d "$cf_subdir_prefix/include/iconv" &&       cf_search="$cf_search $cf_subdir_prefix/include/iconv"
9596	test -d "$cf_subdir_prefix/include/iconv/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
9597	test -d "$cf_subdir_prefix/iconv/include" &&       cf_search="$cf_search $cf_subdir_prefix/iconv/include"
9598	test -d "$cf_subdir_prefix/iconv/include/iconv" &&    cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
9599}
9600
9601done
9602
9603test "$includedir" != NONE && \
9604test "$includedir" != "/usr/include" && \
9605test -d "$includedir" && {
9606	test -d "$includedir" &&    cf_search="$cf_search $includedir"
9607	test -d "$includedir/iconv" && cf_search="$cf_search $includedir/iconv"
9608}
9609
9610test "$oldincludedir" != NONE && \
9611test "$oldincludedir" != "/usr/include" && \
9612test -d "$oldincludedir" && {
9613	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
9614	test -d "$oldincludedir/iconv" && cf_search="$cf_search $oldincludedir/iconv"
9615}
9616
9617cf_search="$cf_search $cf_header_path_list"
9618
9619	for cf_cv_header_path_iconv in $cf_search
9620	do
9621		if test -d "$cf_cv_header_path_iconv" ; then
9622			test -n "$verbose" && echo "	... testing $cf_cv_header_path_iconv" 1>&6
9623
9624echo "${as_me:-configure}:9624: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
9625
9626			CPPFLAGS="$cf_save_CPPFLAGS"
9627
9628	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9629	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"
9630
9631			cat >"conftest.$ac_ext" <<_ACEOF
9632#line 9632 "configure"
9633#include "confdefs.h"
9634
9635#include <stdlib.h>
9636#include <iconv.h>
9637
9638int
9639main (void)
9640{
9641
9642	iconv_t cd = iconv_open("","");
9643	iconv(cd,NULL,NULL,NULL,NULL);
9644	iconv_close(cd);
9645
9646  ;
9647  return 0;
9648}
9649_ACEOF
9650rm -f "conftest.$ac_objext"
9651if { (eval echo "$as_me:9651: \"$ac_compile\"") >&5
9652  (eval $ac_compile) 2>&5
9653  ac_status=$?
9654  echo "$as_me:9654: \$? = $ac_status" >&5
9655  (exit "$ac_status"); } &&
9656         { ac_try='test -s "conftest.$ac_objext"'
9657  { (eval echo "$as_me:9657: \"$ac_try\"") >&5
9658  (eval $ac_try) 2>&5
9659  ac_status=$?
9660  echo "$as_me:9660: \$? = $ac_status" >&5
9661  (exit "$ac_status"); }; }; then
9662
9663				test -n "$verbose" && echo "	... found iconv headers in $cf_cv_header_path_iconv" 1>&6
9664
9665echo "${as_me:-configure}:9665: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
9666
9667				cf_cv_find_linkage_iconv=maybe
9668				cf_test_CPPFLAGS="$CPPFLAGS"
9669				break
9670else
9671  echo "$as_me: failed program was:" >&5
9672cat "conftest.$ac_ext" >&5
9673
9674				CPPFLAGS="$cf_save_CPPFLAGS"
9675
9676fi
9677rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9678		fi
9679	done
9680
9681	if test "$cf_cv_find_linkage_iconv" = maybe ; then
9682
9683echo "${as_me:-configure}:9683: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
9684
9685		cf_save_LIBS="$LIBS"
9686		cf_save_LDFLAGS="$LDFLAGS"
9687
9688		if test "$cf_cv_find_linkage_iconv" != yes ; then
9689
9690cf_search=
9691cf_library_path_list=""
9692if test -n "${LDFLAGS}${LIBS}" ; then
9693	for cf_library_path in $LDFLAGS $LIBS
9694	do
9695		case "$cf_library_path" in
9696		(-L*)
9697			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9698
9699test "x$cf_library_path" != "xNONE" && \
9700test -d "$cf_library_path" && \
9701 {
9702	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
9703	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
9704	test -d "$cf_library_path/lib/iconv" &&       cf_search="$cf_search $cf_library_path/lib/iconv"
9705	test -d "$cf_library_path/lib/iconv/lib" &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
9706	test -d "$cf_library_path/iconv/lib" &&       cf_search="$cf_search $cf_library_path/iconv/lib"
9707	test -d "$cf_library_path/iconv/lib/iconv" &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
9708}
9709
9710			cf_library_path_list="$cf_library_path_list $cf_search"
9711			;;
9712		esac
9713	done
9714fi
9715
9716cf_search=
9717
9718test "x$prefix" != "xNONE" && \
9719test -d "$prefix" && \
9720 {
9721	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
9722	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
9723	test -d "$prefix/lib/iconv" &&       cf_search="$cf_search $prefix/lib/iconv"
9724	test -d "$prefix/lib/iconv/lib" &&    cf_search="$cf_search $prefix/lib/iconv/lib"
9725	test -d "$prefix/iconv/lib" &&       cf_search="$cf_search $prefix/iconv/lib"
9726	test -d "$prefix/iconv/lib/iconv" &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
9727}
9728
9729for cf_subdir_prefix in \
9730	/usr \
9731	/usr/local \
9732	/usr/pkg \
9733	/opt \
9734	/opt/local \
9735	$HOME
9736do
9737
9738test "x$cf_subdir_prefix" != "x$prefix" && \
9739test -d "$cf_subdir_prefix" && \
9740{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9741	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
9742	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9743	test -d "$cf_subdir_prefix/lib/iconv" &&       cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
9744	test -d "$cf_subdir_prefix/lib/iconv/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
9745	test -d "$cf_subdir_prefix/iconv/lib" &&       cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
9746	test -d "$cf_subdir_prefix/iconv/lib/iconv" &&    cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
9747}
9748
9749done
9750
9751cf_search="$cf_library_path_list $cf_search"
9752
9753			for cf_cv_library_path_iconv in $cf_search
9754			do
9755				if test -d "$cf_cv_library_path_iconv" ; then
9756					test -n "$verbose" && echo "	... testing $cf_cv_library_path_iconv" 1>&6
9757
9758echo "${as_me:-configure}:9758: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
9759
9760					CPPFLAGS="$cf_test_CPPFLAGS"
9761					LIBS="-liconv  $cf_save_LIBS"
9762					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
9763					cat >"conftest.$ac_ext" <<_ACEOF
9764#line 9764 "configure"
9765#include "confdefs.h"
9766
9767#include <stdlib.h>
9768#include <iconv.h>
9769
9770int
9771main (void)
9772{
9773
9774	iconv_t cd = iconv_open("","");
9775	iconv(cd,NULL,NULL,NULL,NULL);
9776	iconv_close(cd);
9777
9778  ;
9779  return 0;
9780}
9781_ACEOF
9782rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9783if { (eval echo "$as_me:9783: \"$ac_link\"") >&5
9784  (eval $ac_link) 2>&5
9785  ac_status=$?
9786  echo "$as_me:9786: \$? = $ac_status" >&5
9787  (exit "$ac_status"); } &&
9788         { ac_try='test -s "conftest$ac_exeext"'
9789  { (eval echo "$as_me:9789: \"$ac_try\"") >&5
9790  (eval $ac_try) 2>&5
9791  ac_status=$?
9792  echo "$as_me:9792: \$? = $ac_status" >&5
9793  (exit "$ac_status"); }; }; then
9794
9795					test -n "$verbose" && echo "	... found iconv library in $cf_cv_library_path_iconv" 1>&6
9796
9797echo "${as_me:-configure}:9797: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
9798
9799					cf_cv_find_linkage_iconv=yes
9800					cf_cv_library_file_iconv="-liconv"
9801					break
9802else
9803  echo "$as_me: failed program was:" >&5
9804cat "conftest.$ac_ext" >&5
9805
9806					CPPFLAGS="$cf_save_CPPFLAGS"
9807					LIBS="$cf_save_LIBS"
9808					LDFLAGS="$cf_save_LDFLAGS"
9809
9810fi
9811rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9812				fi
9813			done
9814			CPPFLAGS="$cf_save_CPPFLAGS"
9815			LDFLAGS="$cf_save_LDFLAGS"
9816		fi
9817
9818	else
9819		cf_cv_find_linkage_iconv=no
9820	fi
9821
9822fi
9823rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9824
9825fi
9826rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9827
9828LIBS="$cf_save_LIBS"
9829
9830if test "$cf_cv_find_linkage_iconv" = yes ; then
9831am_cv_func_iconv=yes
9832else
9833am_cv_func_iconv="no, consider installing GNU libiconv"
9834fi
9835
9836fi
9837echo "$as_me:9837: result: $am_cv_func_iconv" >&5
9838echo "${ECHO_T}$am_cv_func_iconv" >&6
9839
9840  if test "$am_cv_func_iconv" = yes; then
9841
9842cat >>confdefs.h <<\EOF
9843#define HAVE_ICONV 1
9844EOF
9845
9846    echo "$as_me:9846: checking if the declaration of iconv() needs const." >&5
9847echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
9848if test "${am_cv_proto_iconv_const+set}" = set; then
9849  echo $ECHO_N "(cached) $ECHO_C" >&6
9850else
9851
9852      cat >"conftest.$ac_ext" <<_ACEOF
9853#line 9853 "configure"
9854#include "confdefs.h"
9855
9856#include <stdlib.h>
9857#include <iconv.h>
9858
9859extern
9860#ifdef __cplusplus
9861"C"
9862#endif
9863#if defined(__STDC__) || defined(__cplusplus)
9864size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9865#else
9866size_t iconv();
9867#endif
9868
9869int
9870main (void)
9871{
9872
9873  ;
9874  return 0;
9875}
9876_ACEOF
9877rm -f "conftest.$ac_objext"
9878if { (eval echo "$as_me:9878: \"$ac_compile\"") >&5
9879  (eval $ac_compile) 2>&5
9880  ac_status=$?
9881  echo "$as_me:9881: \$? = $ac_status" >&5
9882  (exit "$ac_status"); } &&
9883         { ac_try='test -s "conftest.$ac_objext"'
9884  { (eval echo "$as_me:9884: \"$ac_try\"") >&5
9885  (eval $ac_try) 2>&5
9886  ac_status=$?
9887  echo "$as_me:9887: \$? = $ac_status" >&5
9888  (exit "$ac_status"); }; }; then
9889  am_cv_proto_iconv_const=no
9890else
9891  echo "$as_me: failed program was:" >&5
9892cat "conftest.$ac_ext" >&5
9893am_cv_proto_iconv_const=yes
9894fi
9895rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9896fi
9897echo "$as_me:9897: result: $am_cv_proto_iconv_const" >&5
9898echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
9899
9900    if test "$am_cv_proto_iconv_const" = yes ; then
9901      am_cv_proto_iconv_arg1="const"
9902    else
9903      am_cv_proto_iconv_arg1=""
9904    fi
9905
9906cat >>confdefs.h <<EOF
9907#define ICONV_CONST $am_cv_proto_iconv_arg1
9908EOF
9909
9910  fi
9911
9912  LIBICONV=
9913  if test "$cf_cv_find_linkage_iconv" = yes; then
9914
9915if test -n "$cf_cv_header_path_iconv" ; then
9916  for cf_add_incdir in $cf_cv_header_path_iconv
9917  do
9918	while test "$cf_add_incdir" != /usr/include
9919	do
9920	  if test -d "$cf_add_incdir"
9921	  then
9922		cf_have_incdir=no
9923		if test -n "$CFLAGS$CPPFLAGS" ; then
9924		  # a loop is needed to ensure we can add subdirs of existing dirs
9925		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9926			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9927			  cf_have_incdir=yes; break
9928			fi
9929		  done
9930		fi
9931
9932		if test "$cf_have_incdir" = no ; then
9933		  if test "$cf_add_incdir" = /usr/local/include ; then
9934			if test "$GCC" = yes
9935			then
9936			  cf_save_CPPFLAGS=$CPPFLAGS
9937
9938	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9939	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9940
9941			  cat >"conftest.$ac_ext" <<_ACEOF
9942#line 9942 "configure"
9943#include "confdefs.h"
9944#include <stdio.h>
9945int
9946main (void)
9947{
9948printf("Hello")
9949  ;
9950  return 0;
9951}
9952_ACEOF
9953rm -f "conftest.$ac_objext"
9954if { (eval echo "$as_me:9954: \"$ac_compile\"") >&5
9955  (eval $ac_compile) 2>&5
9956  ac_status=$?
9957  echo "$as_me:9957: \$? = $ac_status" >&5
9958  (exit "$ac_status"); } &&
9959         { ac_try='test -s "conftest.$ac_objext"'
9960  { (eval echo "$as_me:9960: \"$ac_try\"") >&5
9961  (eval $ac_try) 2>&5
9962  ac_status=$?
9963  echo "$as_me:9963: \$? = $ac_status" >&5
9964  (exit "$ac_status"); }; }; then
9965  :
9966else
9967  echo "$as_me: failed program was:" >&5
9968cat "conftest.$ac_ext" >&5
9969cf_have_incdir=yes
9970fi
9971rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9972			  CPPFLAGS=$cf_save_CPPFLAGS
9973			fi
9974		  fi
9975		fi
9976
9977		if test "$cf_have_incdir" = no ; then
9978		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9979
9980echo "${as_me:-configure}:9980: testing adding $cf_add_incdir to include-path ..." 1>&5
9981
9982		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9983
9984		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9985		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9986		  cf_add_incdir="$cf_top_incdir"
9987		else
9988		  break
9989		fi
9990	  else
9991		break
9992	  fi
9993	done
9994  done
9995fi
9996
9997    if test -n "$cf_cv_library_file_iconv" ; then
9998      LIBICONV="-liconv"
9999
10000if test -n "$cf_cv_library_path_iconv" ; then
10001	for cf_add_libdir in $cf_cv_library_path_iconv
10002	do
10003		if test "$cf_add_libdir" = /usr/lib ; then
10004			:
10005		elif test -d "$cf_add_libdir"
10006		then
10007			cf_have_libdir=no
10008			if test -n "$LDFLAGS$LIBS" ; then
10009				# a loop is needed to ensure we can add subdirs of existing dirs
10010				for cf_test_libdir in $LDFLAGS $LIBS ; do
10011					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10012						cf_have_libdir=yes; break
10013					fi
10014				done
10015			fi
10016			if test "$cf_have_libdir" = no ; then
10017				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
10018
10019echo "${as_me:-configure}:10019: testing adding $cf_add_libdir to library-path ..." 1>&5
10020
10021				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10022			fi
10023		fi
10024	done
10025fi
10026
10027    fi
10028  fi
10029
10030echo "$as_me:10030: checking for nl_langinfo and CODESET" >&5
10031echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
10032if test "${am_cv_langinfo_codeset+set}" = set; then
10033  echo $ECHO_N "(cached) $ECHO_C" >&6
10034else
10035  cat >"conftest.$ac_ext" <<_ACEOF
10036#line 10036 "configure"
10037#include "confdefs.h"
10038#include <langinfo.h>
10039int
10040main (void)
10041{
10042char* cs = nl_langinfo(CODESET); (void)cs
10043  ;
10044  return 0;
10045}
10046_ACEOF
10047rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10048if { (eval echo "$as_me:10048: \"$ac_link\"") >&5
10049  (eval $ac_link) 2>&5
10050  ac_status=$?
10051  echo "$as_me:10051: \$? = $ac_status" >&5
10052  (exit "$ac_status"); } &&
10053         { ac_try='test -s "conftest$ac_exeext"'
10054  { (eval echo "$as_me:10054: \"$ac_try\"") >&5
10055  (eval $ac_try) 2>&5
10056  ac_status=$?
10057  echo "$as_me:10057: \$? = $ac_status" >&5
10058  (exit "$ac_status"); }; }; then
10059  am_cv_langinfo_codeset=yes
10060else
10061  echo "$as_me: failed program was:" >&5
10062cat "conftest.$ac_ext" >&5
10063am_cv_langinfo_codeset=no
10064fi
10065rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10066
10067fi
10068echo "$as_me:10068: result: $am_cv_langinfo_codeset" >&5
10069echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
10070	if test "$am_cv_langinfo_codeset" = yes; then
10071
10072cat >>confdefs.h <<\EOF
10073#define HAVE_LANGINFO_CODESET 1
10074EOF
10075
10076	fi
10077
10078   if test "$ac_cv_header_locale_h" = yes; then
10079	echo "$as_me:10079: checking for LC_MESSAGES" >&5
10080echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
10081if test "${am_cv_val_LC_MESSAGES+set}" = set; then
10082  echo $ECHO_N "(cached) $ECHO_C" >&6
10083else
10084  cat >"conftest.$ac_ext" <<_ACEOF
10085#line 10085 "configure"
10086#include "confdefs.h"
10087#include <locale.h>
10088int
10089main (void)
10090{
10091return LC_MESSAGES
10092  ;
10093  return 0;
10094}
10095_ACEOF
10096rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10097if { (eval echo "$as_me:10097: \"$ac_link\"") >&5
10098  (eval $ac_link) 2>&5
10099  ac_status=$?
10100  echo "$as_me:10100: \$? = $ac_status" >&5
10101  (exit "$ac_status"); } &&
10102         { ac_try='test -s "conftest$ac_exeext"'
10103  { (eval echo "$as_me:10103: \"$ac_try\"") >&5
10104  (eval $ac_try) 2>&5
10105  ac_status=$?
10106  echo "$as_me:10106: \$? = $ac_status" >&5
10107  (exit "$ac_status"); }; }; then
10108  am_cv_val_LC_MESSAGES=yes
10109else
10110  echo "$as_me: failed program was:" >&5
10111cat "conftest.$ac_ext" >&5
10112am_cv_val_LC_MESSAGES=no
10113fi
10114rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10115fi
10116echo "$as_me:10116: result: $am_cv_val_LC_MESSAGES" >&5
10117echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
10118	if test "$am_cv_val_LC_MESSAGES" = yes; then
10119
10120cat >>confdefs.h <<\EOF
10121#define HAVE_LC_MESSAGES 1
10122EOF
10123
10124	fi
10125fi
10126   echo "$as_me:10126: checking whether NLS is requested" >&5
10127echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
10128
10129# Check whether --enable-nls or --disable-nls was given.
10130if test "${enable_nls+set}" = set; then
10131  enableval="$enable_nls"
10132  USE_NLS=$enableval
10133else
10134  USE_NLS=no
10135fi;
10136  echo "$as_me:10136: result: $USE_NLS" >&5
10137echo "${ECHO_T}$USE_NLS" >&6
10138
10139  BUILD_INCLUDED_LIBINTL=no
10140  USE_INCLUDED_LIBINTL=no
10141  INTLLIBS=
10142
10143    if test "$USE_NLS" = "yes"; then
10144        POSUB=po
10145
10146cat >>confdefs.h <<\EOF
10147#define ENABLE_NLS 1
10148EOF
10149
10150    echo "$as_me:10150: checking whether included gettext is requested" >&5
10151echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
10152
10153# Check whether --with-included-gettext or --without-included-gettext was given.
10154if test "${with_included_gettext+set}" = set; then
10155  withval="$with_included_gettext"
10156  nls_cv_force_use_gnu_gettext=$withval
10157else
10158  nls_cv_force_use_gnu_gettext=no
10159fi;
10160    echo "$as_me:10160: result: $nls_cv_force_use_gnu_gettext" >&5
10161echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
10162
10163    nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
10164    if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
10165                        CATOBJEXT=NONE
10166
10167                                          cf_save_msgfmt_path="$MSGFMT"
10168      cf_save_xgettext_path="$XGETTEXT"
10169
10170            # Extract the first word of "msgfmt", so it can be a program name with args.
10171
10172set dummy msgfmt; ac_word=$2
10173echo "$as_me:10173: checking for $ac_word" >&5
10174echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10175if test "${ac_cv_path_MSGFMT+set}" = set; then
10176  echo $ECHO_N "(cached) $ECHO_C" >&6
10177else
10178  case "$MSGFMT" in
10179  ([\\/]*|?:[\\/]*)
10180  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
10181  ;;
10182  (*)
10183  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10184  for ac_dir in $PATH; do
10185    test -z "$ac_dir" && ac_dir=.
10186    if test -f "$ac_dir/$ac_word$ac_exeext" ; then
10187      if "$ac_dir/$ac_word" --statistics /dev/null >/dev/null 2>&1; then
10188	ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
10189	break
10190      fi
10191    fi
10192  done
10193  IFS="$ac_save_ifs"
10194  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
10195  ;;
10196esac
10197fi
10198MSGFMT="$ac_cv_path_MSGFMT"
10199if test "$MSGFMT" != ":"; then
10200  echo "$as_me:10200: result: $MSGFMT" >&5
10201echo "${ECHO_T}$MSGFMT" >&6
10202else
10203  echo "$as_me:10203: result: no" >&5
10204echo "${ECHO_T}no" >&6
10205fi
10206
10207      # Extract the first word of "gmsgfmt", so it can be a program name with args.
10208set dummy gmsgfmt; ac_word=$2
10209echo "$as_me:10209: checking for $ac_word" >&5
10210echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10211if test "${ac_cv_path_GMSGFMT+set}" = set; then
10212  echo $ECHO_N "(cached) $ECHO_C" >&6
10213else
10214  case $GMSGFMT in
10215  [\\/]* | ?:[\\/]*)
10216  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
10217  ;;
10218  *)
10219  ac_save_IFS=$IFS; IFS=$ac_path_separator
10220ac_dummy="$PATH"
10221for ac_dir in $ac_dummy; do
10222  IFS=$ac_save_IFS
10223  test -z "$ac_dir" && ac_dir=.
10224  if $as_executable_p "$ac_dir/$ac_word"; then
10225   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
10226   echo "$as_me:10226: found $ac_dir/$ac_word" >&5
10227   break
10228fi
10229done
10230
10231  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
10232  ;;
10233esac
10234fi
10235GMSGFMT=$ac_cv_path_GMSGFMT
10236
10237if test -n "$GMSGFMT"; then
10238  echo "$as_me:10238: result: $GMSGFMT" >&5
10239echo "${ECHO_T}$GMSGFMT" >&6
10240else
10241  echo "$as_me:10241: result: no" >&5
10242echo "${ECHO_T}no" >&6
10243fi
10244
10245            # Extract the first word of "xgettext", so it can be a program name with args.
10246
10247set dummy xgettext; ac_word=$2
10248echo "$as_me:10248: checking for $ac_word" >&5
10249echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10250if test "${ac_cv_path_XGETTEXT+set}" = set; then
10251  echo $ECHO_N "(cached) $ECHO_C" >&6
10252else
10253  case "$XGETTEXT" in
10254  ([\\/]*|?:[\\/]*)
10255  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
10256  ;;
10257  (*)
10258  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10259  for ac_dir in $PATH; do
10260    test -z "$ac_dir" && ac_dir=.
10261    if test -f "$ac_dir/$ac_word$ac_exeext" ; then
10262      if "$ac_dir/$ac_word" --omit-header /dev/null >/dev/null 2>&1; then
10263	ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
10264	break
10265      fi
10266    fi
10267  done
10268  IFS="$ac_save_ifs"
10269  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
10270  ;;
10271esac
10272fi
10273XGETTEXT="$ac_cv_path_XGETTEXT"
10274if test "$XGETTEXT" != ":"; then
10275  echo "$as_me:10275: result: $XGETTEXT" >&5
10276echo "${ECHO_T}$XGETTEXT" >&6
10277else
10278  echo "$as_me:10278: result: no" >&5
10279echo "${ECHO_T}no" >&6
10280fi
10281
10282      cf_save_OPTS_1="$CPPFLAGS"
10283      if test "x$cf_save_msgfmt_path" = "x$MSGFMT" && \
10284         test "x$cf_save_xgettext_path" = "x$XGETTEXT" ; then
10285
10286cf_fix_cppflags=no
10287cf_new_cflags=
10288cf_new_cppflags=
10289cf_new_extra_cppflags=
10290
10291for cf_add_cflags in -DIGNORE_MSGFMT_HACK
10292do
10293case "$cf_fix_cppflags" in
10294(no)
10295	case "$cf_add_cflags" in
10296	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10297		case "$cf_add_cflags" in
10298		(-D*)
10299			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10300
10301			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10302				&& test -z "${cf_tst_cflags}" \
10303				&& cf_fix_cppflags=yes
10304
10305			if test "$cf_fix_cppflags" = yes ; then
10306
10307	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10308	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10309
10310				continue
10311			elif test "${cf_tst_cflags}" = "\"'" ; then
10312
10313	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10314	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10315
10316				continue
10317			fi
10318			;;
10319		esac
10320		case "$CPPFLAGS" in
10321		(*$cf_add_cflags)
10322			;;
10323		(*)
10324			case "$cf_add_cflags" in
10325			(-D*)
10326				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10327
10328CPPFLAGS=`echo "$CPPFLAGS" | \
10329	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10330		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10331
10332				;;
10333			esac
10334
10335	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10336	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10337
10338			;;
10339		esac
10340		;;
10341	(*)
10342
10343	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10344	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10345
10346		;;
10347	esac
10348	;;
10349(yes)
10350
10351	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10352	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10353
10354	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10355
10356	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10357		&& test -z "${cf_tst_cflags}" \
10358		&& cf_fix_cppflags=no
10359	;;
10360esac
10361done
10362
10363if test -n "$cf_new_cflags" ; then
10364
10365	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10366	CFLAGS="${CFLAGS}$cf_new_cflags"
10367
10368fi
10369
10370if test -n "$cf_new_cppflags" ; then
10371
10372	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10373	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10374
10375fi
10376
10377if test -n "$cf_new_extra_cppflags" ; then
10378
10379	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10380	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10381
10382fi
10383
10384      fi
10385
10386      cf_save_LIBS_1="$LIBS"
10387
10388cf_add_libs="$LIBS"
10389# reverse order
10390cf_add_0lib=
10391for cf_add_1lib in $LIBICONV; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10392# filter duplicates
10393for cf_add_1lib in $cf_add_0lib; do
10394	for cf_add_2lib in $cf_add_libs; do
10395		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10396			cf_add_1lib=
10397			break
10398		fi
10399	done
10400	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10401done
10402LIBS="$cf_add_libs"
10403
10404# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10405# will be set on completion of the AC_TRY_LINK below.
10406cf_cv_header_path_intl=
10407cf_cv_library_path_intl=
10408
10409echo "${as_me:-configure}:10409: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
10410
10411cf_save_LIBS="$LIBS"
10412
10413cat >"conftest.$ac_ext" <<_ACEOF
10414#line 10414 "configure"
10415#include "confdefs.h"
10416
10417#include <libintl.h>
10418extern int _nl_msg_cat_cntr;
10419
10420int
10421main (void)
10422{
10423
10424	bindtextdomain ("", "");
10425	return (int) gettext ("")
10426
10427#ifndef IGNORE_MSGFMT_HACK
10428			 + _nl_msg_cat_cntr
10429#endif
10430
10431  ;
10432  return 0;
10433}
10434_ACEOF
10435rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10436if { (eval echo "$as_me:10436: \"$ac_link\"") >&5
10437  (eval $ac_link) 2>&5
10438  ac_status=$?
10439  echo "$as_me:10439: \$? = $ac_status" >&5
10440  (exit "$ac_status"); } &&
10441         { ac_try='test -s "conftest$ac_exeext"'
10442  { (eval echo "$as_me:10442: \"$ac_try\"") >&5
10443  (eval $ac_try) 2>&5
10444  ac_status=$?
10445  echo "$as_me:10445: \$? = $ac_status" >&5
10446  (exit "$ac_status"); }; }; then
10447
10448	cf_cv_find_linkage_intl=yes
10449	cf_cv_header_path_intl=/usr/include
10450	cf_cv_library_path_intl=/usr/lib
10451
10452else
10453  echo "$as_me: failed program was:" >&5
10454cat "conftest.$ac_ext" >&5
10455
10456LIBS="-lintl  $cf_save_LIBS"
10457
10458cat >"conftest.$ac_ext" <<_ACEOF
10459#line 10459 "configure"
10460#include "confdefs.h"
10461
10462#include <libintl.h>
10463extern int _nl_msg_cat_cntr;
10464
10465int
10466main (void)
10467{
10468
10469	bindtextdomain ("", "");
10470	return (int) gettext ("")
10471
10472#ifndef IGNORE_MSGFMT_HACK
10473			 + _nl_msg_cat_cntr
10474#endif
10475
10476  ;
10477  return 0;
10478}
10479_ACEOF
10480rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10481if { (eval echo "$as_me:10481: \"$ac_link\"") >&5
10482  (eval $ac_link) 2>&5
10483  ac_status=$?
10484  echo "$as_me:10484: \$? = $ac_status" >&5
10485  (exit "$ac_status"); } &&
10486         { ac_try='test -s "conftest$ac_exeext"'
10487  { (eval echo "$as_me:10487: \"$ac_try\"") >&5
10488  (eval $ac_try) 2>&5
10489  ac_status=$?
10490  echo "$as_me:10490: \$? = $ac_status" >&5
10491  (exit "$ac_status"); }; }; then
10492
10493	cf_cv_find_linkage_intl=yes
10494	cf_cv_header_path_intl=/usr/include
10495	cf_cv_library_path_intl=/usr/lib
10496	cf_cv_library_file_intl="-lintl"
10497
10498else
10499  echo "$as_me: failed program was:" >&5
10500cat "conftest.$ac_ext" >&5
10501
10502	cf_cv_find_linkage_intl=no
10503	LIBS="$cf_save_LIBS"
10504
10505	test -n "$verbose" && echo "	find linkage for intl library" 1>&6
10506
10507echo "${as_me:-configure}:10507: testing find linkage for intl library ..." 1>&5
10508
10509echo "${as_me:-configure}:10509: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
10510
10511	cf_save_CPPFLAGS="$CPPFLAGS"
10512	cf_test_CPPFLAGS="$CPPFLAGS"
10513
10514cf_search=
10515
10516# collect the current set of include-directories from compiler flags
10517cf_header_path_list=""
10518if test -n "${CFLAGS}${CPPFLAGS}" ; then
10519	for cf_header_path in $CPPFLAGS $CFLAGS
10520	do
10521		case "$cf_header_path" in
10522		(-I*)
10523			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10524
10525test "x$cf_header_path" != "xNONE" && \
10526test -d "$cf_header_path" && \
10527 {
10528	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
10529	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
10530	test -d "$cf_header_path/include/intl" &&       cf_search="$cf_search $cf_header_path/include/intl"
10531	test -d "$cf_header_path/include/intl/include" &&    cf_search="$cf_search $cf_header_path/include/intl/include"
10532	test -d "$cf_header_path/intl/include" &&       cf_search="$cf_search $cf_header_path/intl/include"
10533	test -d "$cf_header_path/intl/include/intl" &&    cf_search="$cf_search $cf_header_path/intl/include/intl"
10534}
10535
10536			cf_header_path_list="$cf_header_path_list $cf_search"
10537			;;
10538		esac
10539	done
10540fi
10541
10542# add the variations for the package we are looking for
10543
10544cf_search=
10545
10546test "x$prefix" != "xNONE" && \
10547test -d "$prefix" && \
10548 {
10549	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
10550	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
10551	test -d "$prefix/include/intl" &&       cf_search="$cf_search $prefix/include/intl"
10552	test -d "$prefix/include/intl/include" &&    cf_search="$cf_search $prefix/include/intl/include"
10553	test -d "$prefix/intl/include" &&       cf_search="$cf_search $prefix/intl/include"
10554	test -d "$prefix/intl/include/intl" &&    cf_search="$cf_search $prefix/intl/include/intl"
10555}
10556
10557for cf_subdir_prefix in \
10558	/usr \
10559	/usr/local \
10560	/usr/pkg \
10561	/opt \
10562	/opt/local \
10563	$HOME
10564do
10565
10566test "x$cf_subdir_prefix" != "x$prefix" && \
10567test -d "$cf_subdir_prefix" && \
10568{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10569	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
10570	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
10571	test -d "$cf_subdir_prefix/include/intl" &&       cf_search="$cf_search $cf_subdir_prefix/include/intl"
10572	test -d "$cf_subdir_prefix/include/intl/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/intl/include"
10573	test -d "$cf_subdir_prefix/intl/include" &&       cf_search="$cf_search $cf_subdir_prefix/intl/include"
10574	test -d "$cf_subdir_prefix/intl/include/intl" &&    cf_search="$cf_search $cf_subdir_prefix/intl/include/intl"
10575}
10576
10577done
10578
10579test "$includedir" != NONE && \
10580test "$includedir" != "/usr/include" && \
10581test -d "$includedir" && {
10582	test -d "$includedir" &&    cf_search="$cf_search $includedir"
10583	test -d "$includedir/intl" && cf_search="$cf_search $includedir/intl"
10584}
10585
10586test "$oldincludedir" != NONE && \
10587test "$oldincludedir" != "/usr/include" && \
10588test -d "$oldincludedir" && {
10589	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
10590	test -d "$oldincludedir/intl" && cf_search="$cf_search $oldincludedir/intl"
10591}
10592
10593cf_search="$cf_search $cf_header_path_list"
10594
10595	for cf_cv_header_path_intl in $cf_search
10596	do
10597		if test -d "$cf_cv_header_path_intl" ; then
10598			test -n "$verbose" && echo "	... testing $cf_cv_header_path_intl" 1>&6
10599
10600echo "${as_me:-configure}:10600: testing ... testing $cf_cv_header_path_intl ..." 1>&5
10601
10602			CPPFLAGS="$cf_save_CPPFLAGS"
10603
10604	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10605	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_intl"
10606
10607			cat >"conftest.$ac_ext" <<_ACEOF
10608#line 10608 "configure"
10609#include "confdefs.h"
10610
10611#include <libintl.h>
10612extern int _nl_msg_cat_cntr;
10613
10614int
10615main (void)
10616{
10617
10618	bindtextdomain ("", "");
10619	return (int) gettext ("")
10620
10621#ifndef IGNORE_MSGFMT_HACK
10622			 + _nl_msg_cat_cntr
10623#endif
10624
10625  ;
10626  return 0;
10627}
10628_ACEOF
10629rm -f "conftest.$ac_objext"
10630if { (eval echo "$as_me:10630: \"$ac_compile\"") >&5
10631  (eval $ac_compile) 2>&5
10632  ac_status=$?
10633  echo "$as_me:10633: \$? = $ac_status" >&5
10634  (exit "$ac_status"); } &&
10635         { ac_try='test -s "conftest.$ac_objext"'
10636  { (eval echo "$as_me:10636: \"$ac_try\"") >&5
10637  (eval $ac_try) 2>&5
10638  ac_status=$?
10639  echo "$as_me:10639: \$? = $ac_status" >&5
10640  (exit "$ac_status"); }; }; then
10641
10642				test -n "$verbose" && echo "	... found intl headers in $cf_cv_header_path_intl" 1>&6
10643
10644echo "${as_me:-configure}:10644: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
10645
10646				cf_cv_find_linkage_intl=maybe
10647				cf_test_CPPFLAGS="$CPPFLAGS"
10648				break
10649else
10650  echo "$as_me: failed program was:" >&5
10651cat "conftest.$ac_ext" >&5
10652
10653				CPPFLAGS="$cf_save_CPPFLAGS"
10654
10655fi
10656rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10657		fi
10658	done
10659
10660	if test "$cf_cv_find_linkage_intl" = maybe ; then
10661
10662echo "${as_me:-configure}:10662: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
10663
10664		cf_save_LIBS="$LIBS"
10665		cf_save_LDFLAGS="$LDFLAGS"
10666
10667		if test "$cf_cv_find_linkage_intl" != yes ; then
10668
10669cf_search=
10670cf_library_path_list=""
10671if test -n "${LDFLAGS}${LIBS}" ; then
10672	for cf_library_path in $LDFLAGS $LIBS
10673	do
10674		case "$cf_library_path" in
10675		(-L*)
10676			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10677
10678test "x$cf_library_path" != "xNONE" && \
10679test -d "$cf_library_path" && \
10680 {
10681	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
10682	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
10683	test -d "$cf_library_path/lib/intl" &&       cf_search="$cf_search $cf_library_path/lib/intl"
10684	test -d "$cf_library_path/lib/intl/lib" &&    cf_search="$cf_search $cf_library_path/lib/intl/lib"
10685	test -d "$cf_library_path/intl/lib" &&       cf_search="$cf_search $cf_library_path/intl/lib"
10686	test -d "$cf_library_path/intl/lib/intl" &&    cf_search="$cf_search $cf_library_path/intl/lib/intl"
10687}
10688
10689			cf_library_path_list="$cf_library_path_list $cf_search"
10690			;;
10691		esac
10692	done
10693fi
10694
10695cf_search=
10696
10697test "x$prefix" != "xNONE" && \
10698test -d "$prefix" && \
10699 {
10700	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
10701	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
10702	test -d "$prefix/lib/intl" &&       cf_search="$cf_search $prefix/lib/intl"
10703	test -d "$prefix/lib/intl/lib" &&    cf_search="$cf_search $prefix/lib/intl/lib"
10704	test -d "$prefix/intl/lib" &&       cf_search="$cf_search $prefix/intl/lib"
10705	test -d "$prefix/intl/lib/intl" &&    cf_search="$cf_search $prefix/intl/lib/intl"
10706}
10707
10708for cf_subdir_prefix in \
10709	/usr \
10710	/usr/local \
10711	/usr/pkg \
10712	/opt \
10713	/opt/local \
10714	$HOME
10715do
10716
10717test "x$cf_subdir_prefix" != "x$prefix" && \
10718test -d "$cf_subdir_prefix" && \
10719{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10720	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
10721	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10722	test -d "$cf_subdir_prefix/lib/intl" &&       cf_search="$cf_search $cf_subdir_prefix/lib/intl"
10723	test -d "$cf_subdir_prefix/lib/intl/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/intl/lib"
10724	test -d "$cf_subdir_prefix/intl/lib" &&       cf_search="$cf_search $cf_subdir_prefix/intl/lib"
10725	test -d "$cf_subdir_prefix/intl/lib/intl" &&    cf_search="$cf_search $cf_subdir_prefix/intl/lib/intl"
10726}
10727
10728done
10729
10730cf_search="$cf_library_path_list $cf_search"
10731
10732			for cf_cv_library_path_intl in $cf_search
10733			do
10734				if test -d "$cf_cv_library_path_intl" ; then
10735					test -n "$verbose" && echo "	... testing $cf_cv_library_path_intl" 1>&6
10736
10737echo "${as_me:-configure}:10737: testing ... testing $cf_cv_library_path_intl ..." 1>&5
10738
10739					CPPFLAGS="$cf_test_CPPFLAGS"
10740					LIBS="-lintl  $cf_save_LIBS"
10741					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
10742					cat >"conftest.$ac_ext" <<_ACEOF
10743#line 10743 "configure"
10744#include "confdefs.h"
10745
10746#include <libintl.h>
10747extern int _nl_msg_cat_cntr;
10748
10749int
10750main (void)
10751{
10752
10753	bindtextdomain ("", "");
10754	return (int) gettext ("")
10755
10756#ifndef IGNORE_MSGFMT_HACK
10757			 + _nl_msg_cat_cntr
10758#endif
10759
10760  ;
10761  return 0;
10762}
10763_ACEOF
10764rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10765if { (eval echo "$as_me:10765: \"$ac_link\"") >&5
10766  (eval $ac_link) 2>&5
10767  ac_status=$?
10768  echo "$as_me:10768: \$? = $ac_status" >&5
10769  (exit "$ac_status"); } &&
10770         { ac_try='test -s "conftest$ac_exeext"'
10771  { (eval echo "$as_me:10771: \"$ac_try\"") >&5
10772  (eval $ac_try) 2>&5
10773  ac_status=$?
10774  echo "$as_me:10774: \$? = $ac_status" >&5
10775  (exit "$ac_status"); }; }; then
10776
10777					test -n "$verbose" && echo "	... found intl library in $cf_cv_library_path_intl" 1>&6
10778
10779echo "${as_me:-configure}:10779: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
10780
10781					cf_cv_find_linkage_intl=yes
10782					cf_cv_library_file_intl="-lintl"
10783					break
10784else
10785  echo "$as_me: failed program was:" >&5
10786cat "conftest.$ac_ext" >&5
10787
10788					CPPFLAGS="$cf_save_CPPFLAGS"
10789					LIBS="$cf_save_LIBS"
10790					LDFLAGS="$cf_save_LDFLAGS"
10791
10792fi
10793rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10794				fi
10795			done
10796			CPPFLAGS="$cf_save_CPPFLAGS"
10797			LDFLAGS="$cf_save_LDFLAGS"
10798		fi
10799
10800	else
10801		cf_cv_find_linkage_intl=no
10802	fi
10803
10804fi
10805rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10806
10807fi
10808rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10809
10810LIBS="$cf_save_LIBS"
10811
10812if test "$cf_cv_find_linkage_intl" = yes ; then
10813cf_cv_func_gettext=yes
10814else
10815cf_cv_func_gettext=no
10816fi
10817
10818      echo "$as_me:10818: checking for libintl.h and gettext()" >&5
10819echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
10820      echo "$as_me:10820: result: $cf_cv_func_gettext" >&5
10821echo "${ECHO_T}$cf_cv_func_gettext" >&6
10822
10823      LIBS="$cf_save_LIBS_1"
10824      CPPFLAGS="$cf_save_OPTS_1"
10825
10826      if test "$cf_cv_func_gettext" = yes ; then
10827
10828cat >>confdefs.h <<\EOF
10829#define HAVE_LIBINTL_H 1
10830EOF
10831
10832                                        if test "$PACKAGE" != gettext; then
10833
10834cat >>confdefs.h <<\EOF
10835#define HAVE_GETTEXT 1
10836EOF
10837
10838if test -n "$cf_cv_header_path_intl" ; then
10839  for cf_add_incdir in $cf_cv_header_path_intl
10840  do
10841	while test "$cf_add_incdir" != /usr/include
10842	do
10843	  if test -d "$cf_add_incdir"
10844	  then
10845		cf_have_incdir=no
10846		if test -n "$CFLAGS$CPPFLAGS" ; then
10847		  # a loop is needed to ensure we can add subdirs of existing dirs
10848		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10849			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10850			  cf_have_incdir=yes; break
10851			fi
10852		  done
10853		fi
10854
10855		if test "$cf_have_incdir" = no ; then
10856		  if test "$cf_add_incdir" = /usr/local/include ; then
10857			if test "$GCC" = yes
10858			then
10859			  cf_save_CPPFLAGS=$CPPFLAGS
10860
10861	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10862	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10863
10864			  cat >"conftest.$ac_ext" <<_ACEOF
10865#line 10865 "configure"
10866#include "confdefs.h"
10867#include <stdio.h>
10868int
10869main (void)
10870{
10871printf("Hello")
10872  ;
10873  return 0;
10874}
10875_ACEOF
10876rm -f "conftest.$ac_objext"
10877if { (eval echo "$as_me:10877: \"$ac_compile\"") >&5
10878  (eval $ac_compile) 2>&5
10879  ac_status=$?
10880  echo "$as_me:10880: \$? = $ac_status" >&5
10881  (exit "$ac_status"); } &&
10882         { ac_try='test -s "conftest.$ac_objext"'
10883  { (eval echo "$as_me:10883: \"$ac_try\"") >&5
10884  (eval $ac_try) 2>&5
10885  ac_status=$?
10886  echo "$as_me:10886: \$? = $ac_status" >&5
10887  (exit "$ac_status"); }; }; then
10888  :
10889else
10890  echo "$as_me: failed program was:" >&5
10891cat "conftest.$ac_ext" >&5
10892cf_have_incdir=yes
10893fi
10894rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10895			  CPPFLAGS=$cf_save_CPPFLAGS
10896			fi
10897		  fi
10898		fi
10899
10900		if test "$cf_have_incdir" = no ; then
10901		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
10902
10903echo "${as_me:-configure}:10903: testing adding $cf_add_incdir to include-path ..." 1>&5
10904
10905		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10906
10907		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10908		  test "$cf_top_incdir" = "$cf_add_incdir" && break
10909		  cf_add_incdir="$cf_top_incdir"
10910		else
10911		  break
10912		fi
10913	  else
10914		break
10915	  fi
10916	done
10917  done
10918fi
10919
10920          if test -n "$cf_cv_library_file_intl" ; then
10921                                                INTLLIBS="$cf_cv_library_file_intl $LIBICONV"
10922
10923if test -n "$cf_cv_library_path_intl" ; then
10924	for cf_add_libdir in $cf_cv_library_path_intl
10925	do
10926		if test "$cf_add_libdir" = /usr/lib ; then
10927			:
10928		elif test -d "$cf_add_libdir"
10929		then
10930			cf_have_libdir=no
10931			if test -n "$LDFLAGS$LIBS" ; then
10932				# a loop is needed to ensure we can add subdirs of existing dirs
10933				for cf_test_libdir in $LDFLAGS $LIBS ; do
10934					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10935						cf_have_libdir=yes; break
10936					fi
10937				done
10938			fi
10939			if test "$cf_have_libdir" = no ; then
10940				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
10941
10942echo "${as_me:-configure}:10942: testing adding $cf_add_libdir to library-path ..." 1>&5
10943
10944				INTLLIBS="-L$cf_add_libdir $INTLLIBS"
10945			fi
10946		fi
10947	done
10948fi
10949
10950          fi
10951
10952          gt_save_LIBS="$LIBS"
10953          LIBS="$LIBS $INTLLIBS"
10954
10955for ac_func in dcgettext
10956do
10957as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10958echo "$as_me:10958: checking for $ac_func" >&5
10959echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10960if eval "test \"\${$as_ac_var+set}\" = set"; then
10961  echo $ECHO_N "(cached) $ECHO_C" >&6
10962else
10963  cat >"conftest.$ac_ext" <<_ACEOF
10964#line 10964 "configure"
10965#include "confdefs.h"
10966#define $ac_func autoconf_temporary
10967#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
10968#undef $ac_func
10969
10970#ifdef __cplusplus
10971extern "C"
10972#endif
10973
10974/* We use char because int might match the return type of a gcc2
10975   builtin and then its argument prototype would still apply.  */
10976char $ac_func (void);
10977
10978int
10979main (void)
10980{
10981
10982/* The GNU C library defines stubs for functions which it implements
10983    to always fail with ENOSYS.  Some functions are actually named
10984    something starting with __ and the normal name is an alias.  */
10985#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10986#error found stub for $ac_func
10987#endif
10988
10989	return $ac_func ();
10990  ;
10991  return 0;
10992}
10993_ACEOF
10994rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10995if { (eval echo "$as_me:10995: \"$ac_link\"") >&5
10996  (eval $ac_link) 2>&5
10997  ac_status=$?
10998  echo "$as_me:10998: \$? = $ac_status" >&5
10999  (exit "$ac_status"); } &&
11000         { ac_try='test -s "conftest$ac_exeext"'
11001  { (eval echo "$as_me:11001: \"$ac_try\"") >&5
11002  (eval $ac_try) 2>&5
11003  ac_status=$?
11004  echo "$as_me:11004: \$? = $ac_status" >&5
11005  (exit "$ac_status"); }; }; then
11006  eval "$as_ac_var=yes"
11007else
11008  echo "$as_me: failed program was:" >&5
11009cat "conftest.$ac_ext" >&5
11010eval "$as_ac_var=no"
11011fi
11012rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11013fi
11014echo "$as_me:11014: result: `eval echo '${'"$as_ac_var"'}'`" >&5
11015echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
11016if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
11017  cat >>confdefs.h <<EOF
11018#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11019EOF
11020
11021fi
11022done
11023
11024          LIBS="$gt_save_LIBS"
11025
11026          CATOBJEXT=.gmo
11027        fi
11028      elif test -z "$MSGFMT" || test -z "$XGETTEXT" ; then
11029        { echo "$as_me:11029: WARNING: disabling NLS feature" >&5
11030echo "$as_me: WARNING: disabling NLS feature" >&2;}
11031        sed -e /ENABLE_NLS/d confdefs.h >confdefs.tmp
11032        mv confdefs.tmp confdefs.h
11033        ALL_LINGUAS=
11034        CATOBJEXT=.ignored
11035        MSGFMT=":"
11036        GMSGFMT=":"
11037        XGETTEXT=":"
11038        POSUB=
11039        BUILD_INCLUDED_LIBINTL=no
11040        USE_INCLUDED_LIBINTL=no
11041        USE_NLS=no
11042        nls_cv_use_gnu_gettext=no
11043      fi
11044
11045      if test "$CATOBJEXT" = "NONE"; then
11046                        nls_cv_use_gnu_gettext=maybe
11047      fi
11048    fi
11049
11050    if test "$nls_cv_use_gnu_gettext" != "no"; then
11051      CATOBJEXT=.gmo
11052      if test -f "$srcdir/intl/libintl.h" ; then
11053                INTLOBJS="\$(GETTOBJS)"
11054        BUILD_INCLUDED_LIBINTL=yes
11055        USE_INCLUDED_LIBINTL=yes
11056        INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
11057        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
11058      elif test "$nls_cv_use_gnu_gettext" = "yes"; then
11059        nls_cv_use_gnu_gettext=no
11060        { echo "$as_me:11060: WARNING: no NLS library is packaged with this application" >&5
11061echo "$as_me: WARNING: no NLS library is packaged with this application" >&2;}
11062      fi
11063    fi
11064
11065        if test "$GMSGFMT" != ":"; then
11066      if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
11067        : ;
11068      else
11069        { echo "$as_me:11069: WARNING: found msgfmt program is not GNU msgfmt" >&5
11070echo "$as_me: WARNING: found msgfmt program is not GNU msgfmt" >&2;}
11071      fi
11072    fi
11073
11074        if test "$XGETTEXT" != ":"; then
11075      if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
11076        : ;
11077      else
11078        { echo "$as_me:11078: WARNING: found xgettext program is not GNU xgettext" >&5
11079echo "$as_me: WARNING: found xgettext program is not GNU xgettext" >&2;}
11080      fi
11081    fi
11082  fi
11083
11084  if test "$XGETTEXT" != ":"; then
11085    ac_config_commands="$ac_config_commands default-1"
11086
11087            if test "$PACKAGE" = gettext; then
11088      BUILD_INCLUDED_LIBINTL=yes
11089    fi
11090
11091                                            if test "$nls_cv_use_gnu_gettext" = "yes"; then
11092      for ac_prog in bison
11093do
11094  # Extract the first word of "$ac_prog", so it can be a program name with args.
11095set dummy $ac_prog; ac_word=$2
11096echo "$as_me:11096: checking for $ac_word" >&5
11097echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11098if test "${ac_cv_prog_INTLBISON+set}" = set; then
11099  echo $ECHO_N "(cached) $ECHO_C" >&6
11100else
11101  if test -n "$INTLBISON"; then
11102  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
11103else
11104  ac_save_IFS=$IFS; IFS=$ac_path_separator
11105ac_dummy="$PATH"
11106for ac_dir in $ac_dummy; do
11107  IFS=$ac_save_IFS
11108  test -z "$ac_dir" && ac_dir=.
11109  $as_executable_p "$ac_dir/$ac_word" || continue
11110ac_cv_prog_INTLBISON="$ac_prog"
11111echo "$as_me:11111: found $ac_dir/$ac_word" >&5
11112break
11113done
11114
11115fi
11116fi
11117INTLBISON=$ac_cv_prog_INTLBISON
11118if test -n "$INTLBISON"; then
11119  echo "$as_me:11119: result: $INTLBISON" >&5
11120echo "${ECHO_T}$INTLBISON" >&6
11121else
11122  echo "$as_me:11122: result: no" >&5
11123echo "${ECHO_T}no" >&6
11124fi
11125
11126  test -n "$INTLBISON" && break
11127done
11128
11129      if test -z "$INTLBISON"; then
11130        ac_verc_fail=yes
11131      else
11132                echo "$as_me:11132: checking version of bison" >&5
11133echo $ECHO_N "checking version of bison... $ECHO_C" >&6
11134        ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
11135        case "$ac_prog_version" in
11136          ('') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
11137          (1.2[6-9]*|1.[3-9][0-9]*|[2-9].*)
11138             ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
11139          (*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
11140        esac
11141      echo "$as_me:11141: result: $ac_prog_version" >&5
11142echo "${ECHO_T}$ac_prog_version" >&6
11143      fi
11144      if test "$ac_verc_fail" = yes; then
11145        INTLBISON=:
11146      fi
11147    fi
11148
11149                for lang in $ALL_LINGUAS; do
11150      GMOFILES="$GMOFILES $lang.gmo"
11151      POFILES="$POFILES $lang.po"
11152    done
11153  fi
11154
11155    nls_cv_header_intl=
11156  nls_cv_header_libgt=
11157
11158    DATADIRNAME=share
11159
11160    INSTOBJEXT=.mo
11161
11162    GENCAT=gencat
11163
11164   if test "x$CATOBJEXT" != "x"; then
11165     if test "x$ALL_LINGUAS" = "x"; then
11166       LINGUAS=
11167     else
11168       echo "$as_me:11168: checking for catalogs to be installed" >&5
11169echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
11170       NEW_LINGUAS=
11171       for presentlang in $ALL_LINGUAS; do
11172         useit=no
11173         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
11174           # Use the presentlang catalog if desiredlang is
11175           #   a. equal to presentlang, or
11176           #   b. a variant of presentlang (because in this case,
11177           #      presentlang can be used as a fallback for messages
11178           #      which are not translated in the desiredlang catalog).
11179           case "$desiredlang" in
11180             ("$presentlang"*) useit=yes;;
11181           esac
11182         done
11183         if test "$useit" = yes; then
11184           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
11185         fi
11186       done
11187       LINGUAS=$NEW_LINGUAS
11188       echo "$as_me:11188: result: $LINGUAS" >&5
11189echo "${ECHO_T}$LINGUAS" >&6
11190     fi
11191
11192          if test -n "$LINGUAS"; then
11193       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
11194     fi
11195   fi
11196
11197      INTL_LIBTOOL_SUFFIX_PREFIX=
11198
11199if test "$USE_NLS" = yes ; then
11200
11201# Check whether --with-textdomain or --without-textdomain was given.
11202if test "${with_textdomain+set}" = set; then
11203  withval="$with_textdomain"
11204  NLS_TEXTDOMAIN=$withval
11205else
11206  NLS_TEXTDOMAIN=$PACKAGE
11207fi;
11208
11209cat >>confdefs.h <<EOF
11210#define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
11211EOF
11212
11213fi
11214
11215INTLDIR_MAKE=
11216MSG_DIR_MAKE=
11217SUB_MAKEFILE=
11218
11219cf_makefile=makefile
11220
11221use_our_messages=no
11222if test "$USE_NLS" = yes ; then
11223if test -d "$srcdir/po" ; then
11224echo "$as_me:11224: checking if we should use included message-library" >&5
11225echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
11226
11227# Check whether --enable-included-msgs or --disable-included-msgs was given.
11228if test "${enable_included_msgs+set}" = set; then
11229  enableval="$enable_included_msgs"
11230  use_our_messages=$enableval
11231else
11232  use_our_messages=yes
11233fi;
11234fi
11235echo "$as_me:11235: result: $use_our_messages" >&5
11236echo "${ECHO_T}$use_our_messages" >&6
11237fi
11238
11239MSG_DIR_MAKE="#"
11240if test "$use_our_messages" = yes
11241then
11242	SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
11243	MSG_DIR_MAKE=
11244fi
11245
11246if test "$USE_INCLUDED_LIBINTL" = yes ; then
11247	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
11248		:
11249	elif test "$nls_cv_use_gnu_gettext" = yes ; then
11250		:
11251	else
11252		INTLDIR_MAKE="#"
11253	fi
11254	if test -z "$INTLDIR_MAKE"; then
11255
11256cat >>confdefs.h <<\EOF
11257#define HAVE_LIBGETTEXT_H 1
11258EOF
11259
11260		for cf_makefile in \
11261			$srcdir/intl/Makefile.in \
11262			$srcdir/intl/makefile.in
11263		do
11264			if test -f "$cf_makefile" ; then
11265				SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf_makefile}"
11266				break
11267			fi
11268		done
11269	fi
11270else
11271	INTLDIR_MAKE="#"
11272	if test "$USE_NLS" = yes ; then
11273
11274for ac_header in libintl.h
11275do
11276as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11277echo "$as_me:11277: checking for $ac_header" >&5
11278echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11279if eval "test \"\${$as_ac_Header+set}\" = set"; then
11280  echo $ECHO_N "(cached) $ECHO_C" >&6
11281else
11282  cat >"conftest.$ac_ext" <<_ACEOF
11283#line 11283 "configure"
11284#include "confdefs.h"
11285#include <$ac_header>
11286_ACEOF
11287if { (eval echo "$as_me:11287: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11288  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11289  ac_status=$?
11290  $EGREP -v '^ *\+' conftest.er1 >conftest.err
11291  rm -f conftest.er1
11292  cat conftest.err >&5
11293  echo "$as_me:11293: \$? = $ac_status" >&5
11294  (exit "$ac_status"); } >/dev/null; then
11295  if test -s conftest.err; then
11296    ac_cpp_err=$ac_c_preproc_warn_flag
11297  else
11298    ac_cpp_err=
11299  fi
11300else
11301  ac_cpp_err=yes
11302fi
11303if test -z "$ac_cpp_err"; then
11304  eval "$as_ac_Header=yes"
11305else
11306  echo "$as_me: failed program was:" >&5
11307  cat "conftest.$ac_ext" >&5
11308  eval "$as_ac_Header=no"
11309fi
11310rm -f conftest.err "conftest.$ac_ext"
11311fi
11312echo "$as_me:11312: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11313echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11314if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11315  cat >>confdefs.h <<EOF
11316#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11317EOF
11318
11319fi
11320done
11321
11322	fi
11323fi
11324
11325if test -z "$INTLDIR_MAKE" ; then
11326
11327	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11328	CPPFLAGS="${CPPFLAGS}-I../intl"
11329
11330fi
11331
11332if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
11333	GT_YES="#"
11334	GT_NO=
11335else
11336	GT_YES=
11337	GT_NO="#"
11338fi
11339
11340if test "$USE_INCLUDED_LIBINTL" = yes ; then
11341	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
11342
11343cat >>confdefs.h <<\EOF
11344#define HAVE_GETTEXT 1
11345EOF
11346
11347	elif test "$nls_cv_use_gnu_gettext" = yes ; then
11348
11349cat >>confdefs.h <<\EOF
11350#define HAVE_GETTEXT 1
11351EOF
11352
11353	fi
11354	if test -n "$nls_cv_header_intl" ; then
11355
11356cat >>confdefs.h <<\EOF
11357#define HAVE_LIBINTL_H 1
11358EOF
11359
11360	fi
11361fi
11362
11363echo "$as_me:11363: checking if -lm needed for math functions" >&5
11364echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11365if test "${cf_cv_need_libm+set}" = set; then
11366  echo $ECHO_N "(cached) $ECHO_C" >&6
11367else
11368
11369	cat >"conftest.$ac_ext" <<_ACEOF
11370#line 11370 "configure"
11371#include "confdefs.h"
11372
11373	#include <stdio.h>
11374	#include <stdlib.h>
11375	#include <math.h>
11376
11377int
11378main (void)
11379{
11380double x = rand(); printf("result = %g\\n", sqrt(x))
11381  ;
11382  return 0;
11383}
11384_ACEOF
11385rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11386if { (eval echo "$as_me:11386: \"$ac_link\"") >&5
11387  (eval $ac_link) 2>&5
11388  ac_status=$?
11389  echo "$as_me:11389: \$? = $ac_status" >&5
11390  (exit "$ac_status"); } &&
11391         { ac_try='test -s "conftest$ac_exeext"'
11392  { (eval echo "$as_me:11392: \"$ac_try\"") >&5
11393  (eval $ac_try) 2>&5
11394  ac_status=$?
11395  echo "$as_me:11395: \$? = $ac_status" >&5
11396  (exit "$ac_status"); }; }; then
11397  cf_cv_need_libm=no
11398else
11399  echo "$as_me: failed program was:" >&5
11400cat "conftest.$ac_ext" >&5
11401cf_cv_need_libm=yes
11402fi
11403rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11404fi
11405echo "$as_me:11405: result: $cf_cv_need_libm" >&5
11406echo "${ECHO_T}$cf_cv_need_libm" >&6
11407if test "$cf_cv_need_libm" = yes
11408then
11409
11410cf_add_libs="$LIBS"
11411# reverse order
11412cf_add_0lib=
11413for cf_add_1lib in -lm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11414# filter duplicates
11415for cf_add_1lib in $cf_add_0lib; do
11416	for cf_add_2lib in $cf_add_libs; do
11417		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11418			cf_add_1lib=
11419			break
11420		fi
11421	done
11422	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11423done
11424LIBS="$cf_add_libs"
11425
11426fi
11427
11428echo "$as_me:11428: checking if you want to use dmalloc for testing" >&5
11429echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11430
11431# Check whether --with-dmalloc or --without-dmalloc was given.
11432if test "${with_dmalloc+set}" = set; then
11433  withval="$with_dmalloc"
11434
11435cat >>confdefs.h <<EOF
11436#define USE_DMALLOC 1
11437EOF
11438
11439	: "${with_cflags:=-g}"
11440	: "${enable_leaks:=no}"
11441	 with_dmalloc=yes
11442else
11443  with_dmalloc=
11444fi;
11445echo "$as_me:11445: result: ${with_dmalloc:-no}" >&5
11446echo "${ECHO_T}${with_dmalloc:-no}" >&6
11447
11448case ".$with_cflags" in
11449(.*-g*)
11450	case .$CFLAGS in
11451	(.*-g*)
11452		;;
11453	(*)
11454
11455cf_fix_cppflags=no
11456cf_new_cflags=
11457cf_new_cppflags=
11458cf_new_extra_cppflags=
11459
11460for cf_add_cflags in -g
11461do
11462case "$cf_fix_cppflags" in
11463(no)
11464	case "$cf_add_cflags" in
11465	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11466		case "$cf_add_cflags" in
11467		(-D*)
11468			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11469
11470			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11471				&& test -z "${cf_tst_cflags}" \
11472				&& cf_fix_cppflags=yes
11473
11474			if test "$cf_fix_cppflags" = yes ; then
11475
11476	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11477	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11478
11479				continue
11480			elif test "${cf_tst_cflags}" = "\"'" ; then
11481
11482	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11483	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11484
11485				continue
11486			fi
11487			;;
11488		esac
11489		case "$CPPFLAGS" in
11490		(*$cf_add_cflags)
11491			;;
11492		(*)
11493			case "$cf_add_cflags" in
11494			(-D*)
11495				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11496
11497CPPFLAGS=`echo "$CPPFLAGS" | \
11498	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11499		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11500
11501				;;
11502			esac
11503
11504	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11505	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11506
11507			;;
11508		esac
11509		;;
11510	(*)
11511
11512	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11513	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11514
11515		;;
11516	esac
11517	;;
11518(yes)
11519
11520	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11521	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11522
11523	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11524
11525	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11526		&& test -z "${cf_tst_cflags}" \
11527		&& cf_fix_cppflags=no
11528	;;
11529esac
11530done
11531
11532if test -n "$cf_new_cflags" ; then
11533
11534	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11535	CFLAGS="${CFLAGS}$cf_new_cflags"
11536
11537fi
11538
11539if test -n "$cf_new_cppflags" ; then
11540
11541	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11542	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11543
11544fi
11545
11546if test -n "$cf_new_extra_cppflags" ; then
11547
11548	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11549	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11550
11551fi
11552
11553		;;
11554	esac
11555	;;
11556esac
11557
11558if test "$with_dmalloc" = yes ; then
11559	echo "$as_me:11559: checking for dmalloc.h" >&5
11560echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11561if test "${ac_cv_header_dmalloc_h+set}" = set; then
11562  echo $ECHO_N "(cached) $ECHO_C" >&6
11563else
11564  cat >"conftest.$ac_ext" <<_ACEOF
11565#line 11565 "configure"
11566#include "confdefs.h"
11567#include <dmalloc.h>
11568_ACEOF
11569if { (eval echo "$as_me:11569: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11570  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11571  ac_status=$?
11572  $EGREP -v '^ *\+' conftest.er1 >conftest.err
11573  rm -f conftest.er1
11574  cat conftest.err >&5
11575  echo "$as_me:11575: \$? = $ac_status" >&5
11576  (exit "$ac_status"); } >/dev/null; then
11577  if test -s conftest.err; then
11578    ac_cpp_err=$ac_c_preproc_warn_flag
11579  else
11580    ac_cpp_err=
11581  fi
11582else
11583  ac_cpp_err=yes
11584fi
11585if test -z "$ac_cpp_err"; then
11586  ac_cv_header_dmalloc_h=yes
11587else
11588  echo "$as_me: failed program was:" >&5
11589  cat "conftest.$ac_ext" >&5
11590  ac_cv_header_dmalloc_h=no
11591fi
11592rm -f conftest.err "conftest.$ac_ext"
11593fi
11594echo "$as_me:11594: result: $ac_cv_header_dmalloc_h" >&5
11595echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11596if test "$ac_cv_header_dmalloc_h" = yes; then
11597
11598echo "$as_me:11598: checking for dmalloc_debug in -ldmalloc" >&5
11599echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11600if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11601  echo $ECHO_N "(cached) $ECHO_C" >&6
11602else
11603  ac_check_lib_save_LIBS=$LIBS
11604LIBS="-ldmalloc  $LIBS"
11605cat >"conftest.$ac_ext" <<_ACEOF
11606#line 11606 "configure"
11607#include "confdefs.h"
11608
11609/* Override any gcc2 internal prototype to avoid an error.  */
11610#ifdef __cplusplus
11611extern "C"
11612#endif
11613/* We use char because int might match the return type of a gcc2
11614   builtin and then its argument prototype would still apply.  */
11615char dmalloc_debug ();
11616int
11617main (void)
11618{
11619dmalloc_debug ();
11620  ;
11621  return 0;
11622}
11623_ACEOF
11624rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11625if { (eval echo "$as_me:11625: \"$ac_link\"") >&5
11626  (eval $ac_link) 2>&5
11627  ac_status=$?
11628  echo "$as_me:11628: \$? = $ac_status" >&5
11629  (exit "$ac_status"); } &&
11630         { ac_try='test -s "conftest$ac_exeext"'
11631  { (eval echo "$as_me:11631: \"$ac_try\"") >&5
11632  (eval $ac_try) 2>&5
11633  ac_status=$?
11634  echo "$as_me:11634: \$? = $ac_status" >&5
11635  (exit "$ac_status"); }; }; then
11636  ac_cv_lib_dmalloc_dmalloc_debug=yes
11637else
11638  echo "$as_me: failed program was:" >&5
11639cat "conftest.$ac_ext" >&5
11640ac_cv_lib_dmalloc_dmalloc_debug=no
11641fi
11642rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11643LIBS=$ac_check_lib_save_LIBS
11644fi
11645echo "$as_me:11645: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11646echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11647if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
11648  cat >>confdefs.h <<EOF
11649#define HAVE_LIBDMALLOC 1
11650EOF
11651
11652  LIBS="-ldmalloc $LIBS"
11653
11654fi
11655
11656fi
11657
11658fi
11659
11660echo "$as_me:11660: checking if you want to use dbmalloc for testing" >&5
11661echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11662
11663# Check whether --with-dbmalloc or --without-dbmalloc was given.
11664if test "${with_dbmalloc+set}" = set; then
11665  withval="$with_dbmalloc"
11666
11667cat >>confdefs.h <<EOF
11668#define USE_DBMALLOC 1
11669EOF
11670
11671	: "${with_cflags:=-g}"
11672	: "${enable_leaks:=no}"
11673	 with_dbmalloc=yes
11674else
11675  with_dbmalloc=
11676fi;
11677echo "$as_me:11677: result: ${with_dbmalloc:-no}" >&5
11678echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11679
11680case ".$with_cflags" in
11681(.*-g*)
11682	case .$CFLAGS in
11683	(.*-g*)
11684		;;
11685	(*)
11686
11687cf_fix_cppflags=no
11688cf_new_cflags=
11689cf_new_cppflags=
11690cf_new_extra_cppflags=
11691
11692for cf_add_cflags in -g
11693do
11694case "$cf_fix_cppflags" in
11695(no)
11696	case "$cf_add_cflags" in
11697	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11698		case "$cf_add_cflags" in
11699		(-D*)
11700			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11701
11702			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11703				&& test -z "${cf_tst_cflags}" \
11704				&& cf_fix_cppflags=yes
11705
11706			if test "$cf_fix_cppflags" = yes ; then
11707
11708	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11709	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11710
11711				continue
11712			elif test "${cf_tst_cflags}" = "\"'" ; then
11713
11714	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11715	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11716
11717				continue
11718			fi
11719			;;
11720		esac
11721		case "$CPPFLAGS" in
11722		(*$cf_add_cflags)
11723			;;
11724		(*)
11725			case "$cf_add_cflags" in
11726			(-D*)
11727				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11728
11729CPPFLAGS=`echo "$CPPFLAGS" | \
11730	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11731		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11732
11733				;;
11734			esac
11735
11736	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11737	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11738
11739			;;
11740		esac
11741		;;
11742	(*)
11743
11744	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11745	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11746
11747		;;
11748	esac
11749	;;
11750(yes)
11751
11752	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11753	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11754
11755	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11756
11757	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11758		&& test -z "${cf_tst_cflags}" \
11759		&& cf_fix_cppflags=no
11760	;;
11761esac
11762done
11763
11764if test -n "$cf_new_cflags" ; then
11765
11766	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11767	CFLAGS="${CFLAGS}$cf_new_cflags"
11768
11769fi
11770
11771if test -n "$cf_new_cppflags" ; then
11772
11773	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11774	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11775
11776fi
11777
11778if test -n "$cf_new_extra_cppflags" ; then
11779
11780	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11781	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11782
11783fi
11784
11785		;;
11786	esac
11787	;;
11788esac
11789
11790if test "$with_dbmalloc" = yes ; then
11791	echo "$as_me:11791: checking for dbmalloc.h" >&5
11792echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11793if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11794  echo $ECHO_N "(cached) $ECHO_C" >&6
11795else
11796  cat >"conftest.$ac_ext" <<_ACEOF
11797#line 11797 "configure"
11798#include "confdefs.h"
11799#include <dbmalloc.h>
11800_ACEOF
11801if { (eval echo "$as_me:11801: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11802  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11803  ac_status=$?
11804  $EGREP -v '^ *\+' conftest.er1 >conftest.err
11805  rm -f conftest.er1
11806  cat conftest.err >&5
11807  echo "$as_me:11807: \$? = $ac_status" >&5
11808  (exit "$ac_status"); } >/dev/null; then
11809  if test -s conftest.err; then
11810    ac_cpp_err=$ac_c_preproc_warn_flag
11811  else
11812    ac_cpp_err=
11813  fi
11814else
11815  ac_cpp_err=yes
11816fi
11817if test -z "$ac_cpp_err"; then
11818  ac_cv_header_dbmalloc_h=yes
11819else
11820  echo "$as_me: failed program was:" >&5
11821  cat "conftest.$ac_ext" >&5
11822  ac_cv_header_dbmalloc_h=no
11823fi
11824rm -f conftest.err "conftest.$ac_ext"
11825fi
11826echo "$as_me:11826: result: $ac_cv_header_dbmalloc_h" >&5
11827echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11828if test "$ac_cv_header_dbmalloc_h" = yes; then
11829
11830echo "$as_me:11830: checking for debug_malloc in -ldbmalloc" >&5
11831echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11832if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11833  echo $ECHO_N "(cached) $ECHO_C" >&6
11834else
11835  ac_check_lib_save_LIBS=$LIBS
11836LIBS="-ldbmalloc  $LIBS"
11837cat >"conftest.$ac_ext" <<_ACEOF
11838#line 11838 "configure"
11839#include "confdefs.h"
11840
11841/* Override any gcc2 internal prototype to avoid an error.  */
11842#ifdef __cplusplus
11843extern "C"
11844#endif
11845/* We use char because int might match the return type of a gcc2
11846   builtin and then its argument prototype would still apply.  */
11847char debug_malloc ();
11848int
11849main (void)
11850{
11851debug_malloc ();
11852  ;
11853  return 0;
11854}
11855_ACEOF
11856rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11857if { (eval echo "$as_me:11857: \"$ac_link\"") >&5
11858  (eval $ac_link) 2>&5
11859  ac_status=$?
11860  echo "$as_me:11860: \$? = $ac_status" >&5
11861  (exit "$ac_status"); } &&
11862         { ac_try='test -s "conftest$ac_exeext"'
11863  { (eval echo "$as_me:11863: \"$ac_try\"") >&5
11864  (eval $ac_try) 2>&5
11865  ac_status=$?
11866  echo "$as_me:11866: \$? = $ac_status" >&5
11867  (exit "$ac_status"); }; }; then
11868  ac_cv_lib_dbmalloc_debug_malloc=yes
11869else
11870  echo "$as_me: failed program was:" >&5
11871cat "conftest.$ac_ext" >&5
11872ac_cv_lib_dbmalloc_debug_malloc=no
11873fi
11874rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11875LIBS=$ac_check_lib_save_LIBS
11876fi
11877echo "$as_me:11877: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11878echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11879if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
11880  cat >>confdefs.h <<EOF
11881#define HAVE_LIBDBMALLOC 1
11882EOF
11883
11884  LIBS="-ldbmalloc $LIBS"
11885
11886fi
11887
11888fi
11889
11890fi
11891
11892echo "$as_me:11892: checking if you want to use purify for testing" >&5
11893echo $ECHO_N "checking if you want to use purify for testing... $ECHO_C" >&6
11894
11895# Check whether --with-purify or --without-purify was given.
11896if test "${with_purify+set}" = set; then
11897  withval="$with_purify"
11898
11899cat >>confdefs.h <<EOF
11900#define USE_PURIFY 1
11901EOF
11902
11903	: "${with_cflags:=-g}"
11904	: "${enable_leaks:=no}"
11905	 with_purify=yes
11906else
11907  with_purify=
11908fi;
11909echo "$as_me:11909: result: ${with_purify:-no}" >&5
11910echo "${ECHO_T}${with_purify:-no}" >&6
11911
11912case ".$with_cflags" in
11913(.*-g*)
11914	case .$CFLAGS in
11915	(.*-g*)
11916		;;
11917	(*)
11918
11919cf_fix_cppflags=no
11920cf_new_cflags=
11921cf_new_cppflags=
11922cf_new_extra_cppflags=
11923
11924for cf_add_cflags in -g
11925do
11926case "$cf_fix_cppflags" in
11927(no)
11928	case "$cf_add_cflags" in
11929	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11930		case "$cf_add_cflags" in
11931		(-D*)
11932			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11933
11934			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11935				&& test -z "${cf_tst_cflags}" \
11936				&& cf_fix_cppflags=yes
11937
11938			if test "$cf_fix_cppflags" = yes ; then
11939
11940	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11941	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11942
11943				continue
11944			elif test "${cf_tst_cflags}" = "\"'" ; then
11945
11946	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11947	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11948
11949				continue
11950			fi
11951			;;
11952		esac
11953		case "$CPPFLAGS" in
11954		(*$cf_add_cflags)
11955			;;
11956		(*)
11957			case "$cf_add_cflags" in
11958			(-D*)
11959				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11960
11961CPPFLAGS=`echo "$CPPFLAGS" | \
11962	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11963		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11964
11965				;;
11966			esac
11967
11968	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11969	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11970
11971			;;
11972		esac
11973		;;
11974	(*)
11975
11976	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11977	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11978
11979		;;
11980	esac
11981	;;
11982(yes)
11983
11984	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11985	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11986
11987	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11988
11989	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11990		&& test -z "${cf_tst_cflags}" \
11991		&& cf_fix_cppflags=no
11992	;;
11993esac
11994done
11995
11996if test -n "$cf_new_cflags" ; then
11997
11998	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11999	CFLAGS="${CFLAGS}$cf_new_cflags"
12000
12001fi
12002
12003if test -n "$cf_new_cppflags" ; then
12004
12005	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12006	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12007
12008fi
12009
12010if test -n "$cf_new_extra_cppflags" ; then
12011
12012	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12013	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12014
12015fi
12016
12017		;;
12018	esac
12019	;;
12020esac
12021
12022echo "$as_me:12022: checking if you want to use valgrind for testing" >&5
12023echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12024
12025# Check whether --with-valgrind or --without-valgrind was given.
12026if test "${with_valgrind+set}" = set; then
12027  withval="$with_valgrind"
12028
12029cat >>confdefs.h <<EOF
12030#define USE_VALGRIND 1
12031EOF
12032
12033	: "${with_cflags:=-g}"
12034	: "${enable_leaks:=no}"
12035	 with_valgrind=yes
12036else
12037  with_valgrind=
12038fi;
12039echo "$as_me:12039: result: ${with_valgrind:-no}" >&5
12040echo "${ECHO_T}${with_valgrind:-no}" >&6
12041
12042case ".$with_cflags" in
12043(.*-g*)
12044	case .$CFLAGS in
12045	(.*-g*)
12046		;;
12047	(*)
12048
12049cf_fix_cppflags=no
12050cf_new_cflags=
12051cf_new_cppflags=
12052cf_new_extra_cppflags=
12053
12054for cf_add_cflags in -g
12055do
12056case "$cf_fix_cppflags" in
12057(no)
12058	case "$cf_add_cflags" in
12059	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12060		case "$cf_add_cflags" in
12061		(-D*)
12062			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12063
12064			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12065				&& test -z "${cf_tst_cflags}" \
12066				&& cf_fix_cppflags=yes
12067
12068			if test "$cf_fix_cppflags" = yes ; then
12069
12070	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12071	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12072
12073				continue
12074			elif test "${cf_tst_cflags}" = "\"'" ; then
12075
12076	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12077	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12078
12079				continue
12080			fi
12081			;;
12082		esac
12083		case "$CPPFLAGS" in
12084		(*$cf_add_cflags)
12085			;;
12086		(*)
12087			case "$cf_add_cflags" in
12088			(-D*)
12089				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12090
12091CPPFLAGS=`echo "$CPPFLAGS" | \
12092	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12093		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12094
12095				;;
12096			esac
12097
12098	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12099	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12100
12101			;;
12102		esac
12103		;;
12104	(*)
12105
12106	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12107	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12108
12109		;;
12110	esac
12111	;;
12112(yes)
12113
12114	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12115	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12116
12117	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12118
12119	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12120		&& test -z "${cf_tst_cflags}" \
12121		&& cf_fix_cppflags=no
12122	;;
12123esac
12124done
12125
12126if test -n "$cf_new_cflags" ; then
12127
12128	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12129	CFLAGS="${CFLAGS}$cf_new_cflags"
12130
12131fi
12132
12133if test -n "$cf_new_cppflags" ; then
12134
12135	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12136	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12137
12138fi
12139
12140if test -n "$cf_new_extra_cppflags" ; then
12141
12142	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12143	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12144
12145fi
12146
12147		;;
12148	esac
12149	;;
12150esac
12151
12152echo "$as_me:12152: checking if you want to perform memory-leak testing" >&5
12153echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12154
12155# Check whether --with-no-leaks or --without-no-leaks was given.
12156if test "${with_no_leaks+set}" = set; then
12157  withval="$with_no_leaks"
12158
12159cat >>confdefs.h <<\EOF
12160#define NO_LEAKS 1
12161EOF
12162
12163	 cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
12164	 case ${cf_doalloc} in
12165	 (*yes*) ;;
12166	 (*)
12167cat >>confdefs.h <<\EOF
12168#define DOALLOC 10000
12169EOF
12170 ;;
12171	 esac
12172	 enable_leaks=no
12173else
12174  enable_leaks=yes
12175fi;
12176if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12177echo "$as_me:12177: result: $with_no_leaks" >&5
12178echo "${ECHO_T}$with_no_leaks" >&6
12179
12180echo "$as_me:12180: checking if you want --trace option" >&5
12181echo $ECHO_N "checking if you want --trace option... $ECHO_C" >&6
12182
12183# Check whether --enable-trace or --disable-trace was given.
12184if test "${enable_trace+set}" = set; then
12185  enableval="$enable_trace"
12186
12187else
12188  enableval=yes
12189fi;
12190echo "$as_me:12190: result: $enableval" >&5
12191echo "${ECHO_T}$enableval" >&6
12192if test "$enableval" != no ; then
12193EXTRAOBJS="$EXTRAOBJS trace\$o"
12194
12195cat >>confdefs.h <<\EOF
12196#define HAVE_DLG_TRACE 1
12197EOF
12198
12199else
12200	:
12201fi
12202
12203echo "$as_me:12203: checking if rpath option should be used" >&5
12204echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
12205
12206# Check whether --enable-rpath or --disable-rpath was given.
12207if test "${enable_rpath+set}" = set; then
12208  enableval="$enable_rpath"
12209  cf_cv_enable_rpath=$enableval
12210else
12211  cf_cv_enable_rpath=no
12212fi;
12213echo "$as_me:12213: result: $cf_cv_enable_rpath" >&5
12214echo "${ECHO_T}$cf_cv_enable_rpath" >&6
12215
12216LD_RPATH_OPT=
12217if test "x$cf_cv_enable_rpath" != xno
12218then
12219	echo "$as_me:12219: checking for an rpath option" >&5
12220echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
12221	case "$cf_cv_system_name" in
12222	(irix*)
12223		if test "$GCC" = yes; then
12224			LD_RPATH_OPT="-Wl,-rpath,"
12225		else
12226			LD_RPATH_OPT="-rpath "
12227		fi
12228		;;
12229	(linux*|gnu*|k*bsd*-gnu|freebsd*)
12230		LD_RPATH_OPT="-Wl,-rpath,"
12231		;;
12232	(openbsd[2-9].*|mirbsd*)
12233		LD_RPATH_OPT="-Wl,-rpath,"
12234		;;
12235	(dragonfly*)
12236		LD_RPATH_OPT="-rpath "
12237		;;
12238	(netbsd*)
12239		LD_RPATH_OPT="-Wl,-rpath,"
12240		;;
12241	(osf*|mls+*)
12242		LD_RPATH_OPT="-rpath "
12243		;;
12244	(solaris2*)
12245		LD_RPATH_OPT="-R"
12246		;;
12247	(*)
12248		;;
12249	esac
12250	echo "$as_me:12250: result: $LD_RPATH_OPT" >&5
12251echo "${ECHO_T}$LD_RPATH_OPT" >&6
12252
12253	case "x$LD_RPATH_OPT" in
12254	(x-R*)
12255		echo "$as_me:12255: checking if we need a space after rpath option" >&5
12256echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
12257		cf_save_LIBS="$LIBS"
12258
12259cf_add_libs="$LIBS"
12260# reverse order
12261cf_add_0lib=
12262for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12263# filter duplicates
12264for cf_add_1lib in $cf_add_0lib; do
12265	for cf_add_2lib in $cf_add_libs; do
12266		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12267			cf_add_1lib=
12268			break
12269		fi
12270	done
12271	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12272done
12273LIBS="$cf_add_libs"
12274
12275		cat >"conftest.$ac_ext" <<_ACEOF
12276#line 12276 "configure"
12277#include "confdefs.h"
12278
12279int
12280main (void)
12281{
12282
12283  ;
12284  return 0;
12285}
12286_ACEOF
12287rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12288if { (eval echo "$as_me:12288: \"$ac_link\"") >&5
12289  (eval $ac_link) 2>&5
12290  ac_status=$?
12291  echo "$as_me:12291: \$? = $ac_status" >&5
12292  (exit "$ac_status"); } &&
12293         { ac_try='test -s "conftest$ac_exeext"'
12294  { (eval echo "$as_me:12294: \"$ac_try\"") >&5
12295  (eval $ac_try) 2>&5
12296  ac_status=$?
12297  echo "$as_me:12297: \$? = $ac_status" >&5
12298  (exit "$ac_status"); }; }; then
12299  cf_rpath_space=no
12300else
12301  echo "$as_me: failed program was:" >&5
12302cat "conftest.$ac_ext" >&5
12303cf_rpath_space=yes
12304fi
12305rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12306		LIBS="$cf_save_LIBS"
12307		echo "$as_me:12307: result: $cf_rpath_space" >&5
12308echo "${ECHO_T}$cf_rpath_space" >&6
12309		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
12310		;;
12311	esac
12312fi
12313
12314REL_VERSION=${VERSION_MAJOR}.${VERSION_MINOR}
12315ABI_VERSION=`echo "$VERSION" |sed -e 's/:/./g'`
12316cf_cv_rel_version=$REL_VERSION
12317
12318test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
12319
12320# Check whether --with-rel-version or --without-rel-version was given.
12321if test "${with_rel_version+set}" = set; then
12322  withval="$with_rel_version"
12323  { echo "$as_me:12323: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
12324echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
12325 cf_cv_rel_version=$withval
12326fi;
12327
12328 DIALOG_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
12329 DIALOG_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
12330
12331if test -n "$DIALOG_MAJOR" ; then
12332  case $DIALOG_MAJOR in
12333  ([0-9]*)
12334 	;;
12335  (*)
12336	{ { echo "$as_me:12336: error: Release major-version is not a number: $DIALOG_MAJOR" >&5
12337echo "$as_me: error: Release major-version is not a number: $DIALOG_MAJOR" >&2;}
12338   { (exit 1); exit 1; }; }
12339 	;;
12340  esac
12341else
12342  { { echo "$as_me:12342: error: Release major-version value is empty" >&5
12343echo "$as_me: error: Release major-version value is empty" >&2;}
12344   { (exit 1); exit 1; }; }
12345fi
12346
12347if test -n "$DIALOG_MINOR" ; then
12348  case $DIALOG_MINOR in
12349  ([0-9]*)
12350 	;;
12351  (*)
12352	{ { echo "$as_me:12352: error: Release minor-version is not a number: $DIALOG_MINOR" >&5
12353echo "$as_me: error: Release minor-version is not a number: $DIALOG_MINOR" >&2;}
12354   { (exit 1); exit 1; }; }
12355 	;;
12356  esac
12357else
12358  { { echo "$as_me:12358: error: Release minor-version value is empty" >&5
12359echo "$as_me: error: Release minor-version value is empty" >&2;}
12360   { (exit 1); exit 1; }; }
12361fi
12362
12363test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
12364
12365# Check whether --with-abi-version or --without-abi-version was given.
12366if test "${with_abi_version+set}" = set; then
12367  withval="$with_abi_version"
12368
12369	if test "x$cf_cv_abi_version" != "x$withval"
12370	then
12371		{ echo "$as_me:12371: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
12372echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
12373		case "$cf_cv_rel_version" in
12374		(5.*)
12375			cf_cv_rel_version=$withval.0
12376			;;
12377		(6.*)
12378			cf_cv_rel_version=$withval.9	# FIXME: should be 10 as of 6.0 release
12379			;;
12380		esac
12381	fi
12382	cf_cv_abi_version=$withval
12383fi;
12384
12385if test -n "$cf_cv_abi_version" ; then
12386  case $cf_cv_abi_version in
12387  ([0-9]*)
12388 	;;
12389  (*)
12390	{ { echo "$as_me:12390: error: ABI version is not a number: $cf_cv_abi_version" >&5
12391echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
12392   { (exit 1); exit 1; }; }
12393 	;;
12394  esac
12395else
12396  { { echo "$as_me:12396: error: ABI version value is empty" >&5
12397echo "$as_me: error: ABI version value is empty" >&2;}
12398   { (exit 1); exit 1; }; }
12399fi
12400
12401LIB_MODEL=static
12402DFT_LWR_MODEL=$LIB_MODEL
12403LIBTOOL_MAKE="#"
12404
12405# use to comment-out makefile lines
12406MAKE_NORMAL=
12407MAKE_STATIC=
12408MAKE_SHARED="#"
12409MAKE_DLLS="#"
12410
12411shlibdir=$libdir
12412
12413echo "$as_me:12413: checking if libtool -version-number should be used" >&5
12414echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
12415
12416# Check whether --enable-libtool-version or --disable-libtool-version was given.
12417if test "${enable_libtool_version+set}" = set; then
12418  enableval="$enable_libtool_version"
12419  test "$enableval" != no && enableval=yes
12420	if test "$enableval" != "yes" ; then
12421    cf_libtool_version=no
12422	else
12423		cf_libtool_version=yes
12424	fi
12425else
12426  enableval=yes
12427	cf_libtool_version=yes
12428
12429fi;
12430echo "$as_me:12430: result: $cf_libtool_version" >&5
12431echo "${ECHO_T}$cf_libtool_version" >&6
12432
12433if test "$cf_libtool_version" = yes ; then
12434	LIBTOOL_VERSION="-version-number"
12435else
12436	LIBTOOL_VERSION="-version-info"
12437	case "x$VERSION" in
12438	(x)
12439		{ echo "$as_me:12439: WARNING: VERSION was not set" >&5
12440echo "$as_me: WARNING: VERSION was not set" >&2;}
12441		;;
12442	(x*.*.*)
12443		ABI_VERSION="$VERSION"
12444		test -n "$verbose" && echo "	ABI_VERSION: $ABI_VERSION" 1>&6
12445
12446echo "${as_me:-configure}:12446: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
12447
12448		;;
12449	(x*:*:*)
12450		ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
12451		test -n "$verbose" && echo "	ABI_VERSION: $ABI_VERSION" 1>&6
12452
12453echo "${as_me:-configure}:12453: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
12454
12455		;;
12456	(*)
12457		{ echo "$as_me:12457: WARNING: unexpected VERSION value: $VERSION" >&5
12458echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
12459		;;
12460	esac
12461fi
12462
12463LIBTOOL=
12464
12465# common library maintenance symbols that are convenient for libtool scripts:
12466LIB_CREATE='${AR} -cr'
12467LIB_OBJECT='${OBJECTS}'
12468LIB_SUFFIX=.a
12469LIB_PREP="$RANLIB"
12470
12471# symbols used to prop libtool up to enable it to determine what it should be
12472# doing:
12473LIB_CLEAN=
12474LIB_COMPILE=
12475LIB_LINK='${CC}'
12476LIB_INSTALL=
12477LIB_UNINSTALL=
12478
12479echo "$as_me:12479: checking if you want to build libraries with libtool" >&5
12480echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
12481
12482# Check whether --with-libtool or --without-libtool was given.
12483if test "${with_libtool+set}" = set; then
12484  withval="$with_libtool"
12485  with_libtool=$withval
12486else
12487  with_libtool=no
12488fi;
12489echo "$as_me:12489: result: $with_libtool" >&5
12490echo "${ECHO_T}$with_libtool" >&6
12491if test "$with_libtool" != "no"; then
12492
12493	if test "$with_libtool" != "yes" ; then
12494
12495if test "x$prefix" != xNONE; then
12496	cf_path_syntax="$prefix"
12497else
12498	cf_path_syntax="$ac_default_prefix"
12499fi
12500
12501case ".$with_libtool" in
12502(.\$\(*\)*|.\'*\'*)
12503	;;
12504(..|./*|.\\*)
12505	;;
12506(.[a-zA-Z]:[\\/]*) # OS/2 EMX
12507	;;
12508(.\$\{*prefix\}*|.\$\{*dir\}*)
12509	eval with_libtool="$with_libtool"
12510	case ".$with_libtool" in
12511	(.NONE/*)
12512		with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
12513		;;
12514	esac
12515	;;
12516(.no|.NONE/*)
12517	with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
12518	;;
12519(*)
12520	{ { echo "$as_me:12520: error: expected a pathname, not \"$with_libtool\"" >&5
12521echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
12522   { (exit 1); exit 1; }; }
12523	;;
12524esac
12525
12526		LIBTOOL=$with_libtool
12527	else
12528		if test -n "$ac_tool_prefix"; then
12529  for ac_prog in libtool glibtool
12530  do
12531    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12532set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12533echo "$as_me:12533: checking for $ac_word" >&5
12534echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12535if test "${ac_cv_prog_LIBTOOL+set}" = set; then
12536  echo $ECHO_N "(cached) $ECHO_C" >&6
12537else
12538  if test -n "$LIBTOOL"; then
12539  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
12540else
12541  ac_save_IFS=$IFS; IFS=$ac_path_separator
12542ac_dummy="$PATH"
12543for ac_dir in $ac_dummy; do
12544  IFS=$ac_save_IFS
12545  test -z "$ac_dir" && ac_dir=.
12546  $as_executable_p "$ac_dir/$ac_word" || continue
12547ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
12548echo "$as_me:12548: found $ac_dir/$ac_word" >&5
12549break
12550done
12551
12552fi
12553fi
12554LIBTOOL=$ac_cv_prog_LIBTOOL
12555if test -n "$LIBTOOL"; then
12556  echo "$as_me:12556: result: $LIBTOOL" >&5
12557echo "${ECHO_T}$LIBTOOL" >&6
12558else
12559  echo "$as_me:12559: result: no" >&5
12560echo "${ECHO_T}no" >&6
12561fi
12562
12563    test -n "$LIBTOOL" && break
12564  done
12565fi
12566if test -z "$LIBTOOL"; then
12567  ac_ct_LIBTOOL=$LIBTOOL
12568  for ac_prog in libtool glibtool
12569do
12570  # Extract the first word of "$ac_prog", so it can be a program name with args.
12571set dummy $ac_prog; ac_word=$2
12572echo "$as_me:12572: checking for $ac_word" >&5
12573echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12574if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
12575  echo $ECHO_N "(cached) $ECHO_C" >&6
12576else
12577  if test -n "$ac_ct_LIBTOOL"; then
12578  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
12579else
12580  ac_save_IFS=$IFS; IFS=$ac_path_separator
12581ac_dummy="$PATH"
12582for ac_dir in $ac_dummy; do
12583  IFS=$ac_save_IFS
12584  test -z "$ac_dir" && ac_dir=.
12585  $as_executable_p "$ac_dir/$ac_word" || continue
12586ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
12587echo "$as_me:12587: found $ac_dir/$ac_word" >&5
12588break
12589done
12590
12591fi
12592fi
12593ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
12594if test -n "$ac_ct_LIBTOOL"; then
12595  echo "$as_me:12595: result: $ac_ct_LIBTOOL" >&5
12596echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
12597else
12598  echo "$as_me:12598: result: no" >&5
12599echo "${ECHO_T}no" >&6
12600fi
12601
12602  test -n "$ac_ct_LIBTOOL" && break
12603done
12604test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
12605
12606  LIBTOOL=$ac_ct_LIBTOOL
12607fi
12608
12609if test -n "$LIBTOOL" && test "$LIBTOOL" != none
12610then
12611	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
12612else
12613	cf_cv_libtool_version=
12614fi
12615test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
12616
12617		if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
12618		then
12619
12620unset ac_cv_prog_ac_ct_LIBTOOL
12621unset ac_ct_LIBTOOL
12622unset LIBTOOL
12623
12624			if test -n "$ac_tool_prefix"; then
12625  for ac_prog in glibtool
12626  do
12627    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12628set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12629echo "$as_me:12629: checking for $ac_word" >&5
12630echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12631if test "${ac_cv_prog_LIBTOOL+set}" = set; then
12632  echo $ECHO_N "(cached) $ECHO_C" >&6
12633else
12634  if test -n "$LIBTOOL"; then
12635  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
12636else
12637  ac_save_IFS=$IFS; IFS=$ac_path_separator
12638ac_dummy="$PATH"
12639for ac_dir in $ac_dummy; do
12640  IFS=$ac_save_IFS
12641  test -z "$ac_dir" && ac_dir=.
12642  $as_executable_p "$ac_dir/$ac_word" || continue
12643ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
12644echo "$as_me:12644: found $ac_dir/$ac_word" >&5
12645break
12646done
12647
12648fi
12649fi
12650LIBTOOL=$ac_cv_prog_LIBTOOL
12651if test -n "$LIBTOOL"; then
12652  echo "$as_me:12652: result: $LIBTOOL" >&5
12653echo "${ECHO_T}$LIBTOOL" >&6
12654else
12655  echo "$as_me:12655: result: no" >&5
12656echo "${ECHO_T}no" >&6
12657fi
12658
12659    test -n "$LIBTOOL" && break
12660  done
12661fi
12662if test -z "$LIBTOOL"; then
12663  ac_ct_LIBTOOL=$LIBTOOL
12664  for ac_prog in glibtool
12665do
12666  # Extract the first word of "$ac_prog", so it can be a program name with args.
12667set dummy $ac_prog; ac_word=$2
12668echo "$as_me:12668: checking for $ac_word" >&5
12669echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12670if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
12671  echo $ECHO_N "(cached) $ECHO_C" >&6
12672else
12673  if test -n "$ac_ct_LIBTOOL"; then
12674  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
12675else
12676  ac_save_IFS=$IFS; IFS=$ac_path_separator
12677ac_dummy="$PATH"
12678for ac_dir in $ac_dummy; do
12679  IFS=$ac_save_IFS
12680  test -z "$ac_dir" && ac_dir=.
12681  $as_executable_p "$ac_dir/$ac_word" || continue
12682ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
12683echo "$as_me:12683: found $ac_dir/$ac_word" >&5
12684break
12685done
12686
12687fi
12688fi
12689ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
12690if test -n "$ac_ct_LIBTOOL"; then
12691  echo "$as_me:12691: result: $ac_ct_LIBTOOL" >&5
12692echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
12693else
12694  echo "$as_me:12694: result: no" >&5
12695echo "${ECHO_T}no" >&6
12696fi
12697
12698  test -n "$ac_ct_LIBTOOL" && break
12699done
12700test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
12701
12702  LIBTOOL=$ac_ct_LIBTOOL
12703fi
12704
12705if test -n "$LIBTOOL" && test "$LIBTOOL" != none
12706then
12707	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
12708else
12709	cf_cv_libtool_version=
12710fi
12711test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
12712
12713		fi
12714	fi
12715	if test -z "$LIBTOOL" ; then
12716		{ { echo "$as_me:12716: error: Cannot find libtool" >&5
12717echo "$as_me: error: Cannot find libtool" >&2;}
12718   { (exit 1); exit 1; }; }
12719	fi
12720	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
12721	LIB_OBJECT='${OBJECTS:.o=.lo}'
12722	LIB_SUFFIX=.la
12723	LIB_CLEAN='${LIBTOOL} --mode=clean'
12724	LIB_COMPILE='${LIBTOOL} --mode=compile'
12725	LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
12726	LIB_INSTALL='${LIBTOOL} --mode=install'
12727	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
12728	LIB_PREP=:
12729
12730if test -n "$LIBTOOL" && test "$LIBTOOL" != none
12731then
12732	echo "$as_me:12732: checking version of $LIBTOOL" >&5
12733echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
12734
12735if test -n "$LIBTOOL" && test "$LIBTOOL" != none
12736then
12737	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
12738else
12739	cf_cv_libtool_version=
12740fi
12741test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
12742
12743	echo "$as_me:12743: result: $cf_cv_libtool_version" >&5
12744echo "${ECHO_T}$cf_cv_libtool_version" >&6
12745	if test -z "$cf_cv_libtool_version" ; then
12746		{ { echo "$as_me:12746: error: This is not GNU libtool" >&5
12747echo "$as_me: error: This is not GNU libtool" >&2;}
12748   { (exit 1); exit 1; }; }
12749	fi
12750else
12751	{ { echo "$as_me:12751: error: GNU libtool has not been found" >&5
12752echo "$as_me: error: GNU libtool has not been found" >&2;}
12753   { (exit 1); exit 1; }; }
12754fi
12755
12756	# special hack to add -no-undefined (which libtool should do for itself)
12757	LT_UNDEF=
12758	case "$cf_cv_system_name" in
12759	(cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
12760		LT_UNDEF=-no-undefined
12761		;;
12762	esac
12763
12764	# special hack to add --tag option for C++ compiler
12765	case "$cf_cv_libtool_version" in
12766	(1.[5-9]*|[2-9].[0-9.a-z]*)
12767		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
12768		LIBTOOL="$LIBTOOL --tag=CC"
12769		;;
12770	(*)
12771		LIBTOOL_CXX="$LIBTOOL"
12772		;;
12773	esac
12774else
12775	LIBTOOL=""
12776	LIBTOOL_CXX=""
12777fi
12778
12779test -z "$LIBTOOL" && ECHO_LT=
12780
12781LIB_CREATE="$LIB_CREATE \$@"
12782
12783if test "$with_libtool" = "yes" ; then
12784	OBJEXT="lo"
12785	LIB_MODEL=libtool
12786	DFT_LWR_MODEL=$LIB_MODEL
12787	LIBTOOL_MAKE=
12788
12789echo "$as_me:12789: checking for additional libtool options" >&5
12790echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
12791
12792# Check whether --with-libtool-opts or --without-libtool-opts was given.
12793if test "${with_libtool_opts+set}" = set; then
12794  withval="$with_libtool_opts"
12795  with_libtool_opts=$withval
12796else
12797  with_libtool_opts=no
12798fi;
12799echo "$as_me:12799: result: $with_libtool_opts" >&5
12800echo "${ECHO_T}$with_libtool_opts" >&6
12801
12802case .$with_libtool_opts in
12803(.yes|.no|.)
12804	;;
12805(*)
12806	LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
12807	;;
12808esac
12809
12810echo "$as_me:12810: checking if exported-symbols file should be used" >&5
12811echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
12812
12813# Check whether --with-export-syms or --without-export-syms was given.
12814if test "${with_export_syms+set}" = set; then
12815  withval="$with_export_syms"
12816  with_export_syms=$withval
12817else
12818  with_export_syms=no
12819fi;
12820if test "x$with_export_syms" = xyes
12821then
12822	with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
12823
12824fi
12825echo "$as_me:12825: result: $with_export_syms" >&5
12826echo "${ECHO_T}$with_export_syms" >&6
12827if test "x$with_export_syms" != xno
12828then
12829	EXPORT_SYMS="-export-symbols $with_export_syms"
12830
12831fi
12832
12833	MAKE_NORMAL="#"
12834	MAKE_STATIC="#"
12835	MAKE_SHARED=
12836else
12837	echo "$as_me:12837: checking if you want to build shared libraries" >&5
12838echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
12839
12840# Check whether --with-shared or --without-shared was given.
12841if test "${with_shared+set}" = set; then
12842  withval="$with_shared"
12843  with_shared=$withval
12844else
12845  with_shared=no
12846fi;
12847	echo "$as_me:12847: result: $with_shared" >&5
12848echo "${ECHO_T}$with_shared" >&6
12849	if test "$with_shared" = "yes" ; then
12850		LIB_MODEL=shared
12851		DFT_LWR_MODEL=$LIB_MODEL
12852
12853	RM_SHARED_OPTS=
12854	LOCAL_LDFLAGS=
12855	LOCAL_LDFLAGS2=
12856	LD_SHARED_OPTS=
12857	INSTALL_LIB="-m 644"
12858	: ${rel_builddir:=.}
12859
12860	shlibdir=$libdir
12861
12862	MAKE_DLLS="#"
12863
12864	cf_cv_do_symlinks=no
12865	cf_ld_rpath_opt=
12866	test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
12867
12868	echo "$as_me:12868: checking if release/abi version should be used for shared libs" >&5
12869echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
12870
12871# Check whether --with-shlib-version or --without-shlib-version was given.
12872if test "${with_shlib_version+set}" = set; then
12873  withval="$with_shlib_version"
12874  test -z "$withval" && withval=auto
12875	case "$withval" in
12876	(yes)
12877		cf_cv_shlib_version=auto
12878		;;
12879	(rel|abi|auto)
12880		cf_cv_shlib_version=$withval
12881		;;
12882	(*)
12883		echo "$as_me:12883: result: $withval" >&5
12884echo "${ECHO_T}$withval" >&6
12885		{ { echo "$as_me:12885: error: option value must be one of: rel, abi, or auto" >&5
12886echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
12887   { (exit 1); exit 1; }; }
12888		;;
12889	esac
12890
12891else
12892  cf_cv_shlib_version=auto
12893fi;
12894	echo "$as_me:12894: result: $cf_cv_shlib_version" >&5
12895echo "${ECHO_T}$cf_cv_shlib_version" >&6
12896
12897	cf_cv_rm_so_locs=no
12898	cf_try_cflags=
12899
12900	# Some less-capable ports of gcc support only -fpic
12901	CC_SHARED_OPTS=
12902
12903	cf_try_fPIC=no
12904	if test "$GCC" = yes
12905	then
12906		cf_try_fPIC=yes
12907	else
12908		case "$cf_cv_system_name" in
12909		(*linux*)	# e.g., PGI compiler
12910			cf_try_fPIC=yes
12911			;;
12912		esac
12913	fi
12914
12915	if test "$cf_try_fPIC" = yes
12916	then
12917		echo "$as_me:12917: checking which $CC option to use" >&5
12918echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
12919		cf_save_CFLAGS="$CFLAGS"
12920		for CC_SHARED_OPTS in -fPIC -fpic ''
12921		do
12922			CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
12923			cat >"conftest.$ac_ext" <<_ACEOF
12924#line 12924 "configure"
12925#include "confdefs.h"
12926#include <stdio.h>
12927int
12928main (void)
12929{
12930int x = 1
12931  ;
12932  return 0;
12933}
12934_ACEOF
12935rm -f "conftest.$ac_objext"
12936if { (eval echo "$as_me:12936: \"$ac_compile\"") >&5
12937  (eval $ac_compile) 2>&5
12938  ac_status=$?
12939  echo "$as_me:12939: \$? = $ac_status" >&5
12940  (exit "$ac_status"); } &&
12941         { ac_try='test -s "conftest.$ac_objext"'
12942  { (eval echo "$as_me:12942: \"$ac_try\"") >&5
12943  (eval $ac_try) 2>&5
12944  ac_status=$?
12945  echo "$as_me:12945: \$? = $ac_status" >&5
12946  (exit "$ac_status"); }; }; then
12947  break
12948else
12949  echo "$as_me: failed program was:" >&5
12950cat "conftest.$ac_ext" >&5
12951fi
12952rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12953		done
12954		echo "$as_me:12954: result: $CC_SHARED_OPTS" >&5
12955echo "${ECHO_T}$CC_SHARED_OPTS" >&6
12956		CFLAGS="$cf_save_CFLAGS"
12957	fi
12958
12959	cf_cv_shlib_version_infix=no
12960
12961	case "$cf_cv_system_name" in
12962	(aix4.3-9*|aix[5-7]*)
12963		if test "$GCC" = yes; then
12964			CC_SHARED_OPTS='-Wl,-brtl'
12965			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
12966		else
12967			CC_SHARED_OPTS='-brtl'
12968			# as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
12969			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
12970		fi
12971		;;
12972	(beos*)
12973		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
12974		;;
12975	(cygwin*)
12976		CC_SHARED_OPTS=
12977		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12978		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12979		cf_cv_shlib_version=cygdll
12980		cf_cv_shlib_version_infix=cygdll
12981		shlibdir=$bindir
12982		MAKE_DLLS=
12983		cat >mk_shared_lib.sh <<-CF_EOF
12984		#!$SHELL
12985		SHARED_LIB=\$1
12986		IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
12987		shift
12988		cat <<-EOF
12989		Linking shared library
12990		** SHARED_LIB \$SHARED_LIB
12991		** IMPORT_LIB \$IMPORT_LIB
12992EOF
12993		exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12994CF_EOF
12995		chmod +x mk_shared_lib.sh
12996		;;
12997	(msys*)
12998		CC_SHARED_OPTS=
12999		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
13000		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
13001		cf_cv_shlib_version=msysdll
13002		cf_cv_shlib_version_infix=msysdll
13003		shlibdir=$bindir
13004		MAKE_DLLS=
13005		cat >mk_shared_lib.sh <<-CF_EOF
13006		#!$SHELL
13007		SHARED_LIB=\$1
13008		IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
13009		shift
13010		cat <<-EOF
13011		Linking shared library
13012		** SHARED_LIB \$SHARED_LIB
13013		** IMPORT_LIB \$IMPORT_LIB
13014EOF
13015		exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
13016CF_EOF
13017		chmod +x mk_shared_lib.sh
13018		;;
13019	(darwin*)
13020		cf_try_cflags="no-cpp-precomp"
13021		CC_SHARED_OPTS="-dynamic"
13022		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
13023		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
13024		cf_cv_shlib_version_infix=yes
13025		echo "$as_me:13025: checking if ld -search_paths_first works" >&5
13026echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
13027if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
13028  echo $ECHO_N "(cached) $ECHO_C" >&6
13029else
13030
13031			cf_save_LDFLAGS=$LDFLAGS
13032			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
13033			cat >"conftest.$ac_ext" <<_ACEOF
13034#line 13034 "configure"
13035#include "confdefs.h"
13036
13037int
13038main (void)
13039{
13040int i;
13041  ;
13042  return 0;
13043}
13044_ACEOF
13045rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13046if { (eval echo "$as_me:13046: \"$ac_link\"") >&5
13047  (eval $ac_link) 2>&5
13048  ac_status=$?
13049  echo "$as_me:13049: \$? = $ac_status" >&5
13050  (exit "$ac_status"); } &&
13051         { ac_try='test -s "conftest$ac_exeext"'
13052  { (eval echo "$as_me:13052: \"$ac_try\"") >&5
13053  (eval $ac_try) 2>&5
13054  ac_status=$?
13055  echo "$as_me:13055: \$? = $ac_status" >&5
13056  (exit "$ac_status"); }; }; then
13057  cf_cv_ldflags_search_paths_first=yes
13058else
13059  echo "$as_me: failed program was:" >&5
13060cat "conftest.$ac_ext" >&5
13061cf_cv_ldflags_search_paths_first=no
13062fi
13063rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13064				LDFLAGS=$cf_save_LDFLAGS
13065fi
13066echo "$as_me:13066: result: $cf_cv_ldflags_search_paths_first" >&5
13067echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
13068		if test "$cf_cv_ldflags_search_paths_first" = yes; then
13069			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
13070		fi
13071		;;
13072	(hpux[7-8]*)
13073		# HP-UX 8.07 ld lacks "+b" option used for libdir search-list
13074		if test "$GCC" != yes; then
13075			CC_SHARED_OPTS='+Z'
13076		fi
13077		MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
13078		INSTALL_LIB="-m 555"
13079		;;
13080	(hpux*)
13081		# (tested with gcc 2.7.2 -- I don't have c89)
13082		if test "$GCC" = yes; then
13083			LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
13084		else
13085			CC_SHARED_OPTS='+Z'
13086			LD_SHARED_OPTS='-Wl,+b,${libdir}'
13087		fi
13088		MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
13089		# HP-UX shared libraries must be executable, and should be
13090		# readonly to exploit a quirk in the memory manager.
13091		INSTALL_LIB="-m 555"
13092		;;
13093	(interix*)
13094		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13095		if test "$cf_cv_shlib_version" = rel; then
13096			cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13097		else
13098			cf_shared_soname='`basename $@`'
13099		fi
13100		CC_SHARED_OPTS=
13101		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
13102		;;
13103	(irix*)
13104		if test "$cf_cv_enable_rpath" = yes ; then
13105			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13106		fi
13107		# tested with IRIX 5.2 and 'cc'.
13108		if test "$GCC" != yes; then
13109			CC_SHARED_OPTS='-KPIC'
13110			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
13111		else
13112			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
13113		fi
13114		cf_cv_rm_so_locs=yes
13115		;;
13116	(linux*|gnu*|k*bsd*-gnu)
13117		if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
13118			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
13119			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13120		fi
13121		if test "$cf_cv_enable_rpath" = yes ; then
13122			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13123		fi
13124
13125	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13126	if test "$cf_cv_shlib_version" = rel; then
13127		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13128	else
13129		cf_cv_shared_soname='`basename $@`'
13130	fi
13131
13132		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
13133		;;
13134	(mingw*msvc*)
13135		cf_cv_shlib_version=msvcdll
13136		cf_cv_shlib_version_infix=msvcdll
13137		shlibdir=$bindir
13138		MAKE_DLLS=
13139		if test "$DFT_LWR_MODEL" = "shared" ; then
13140			LOCAL_LDFLAGS="-link -dll"
13141			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13142			EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
13143		fi
13144		CC_SHARED_OPTS=
13145		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
13146		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
13147		cat >mk_shared_lib.sh <<-CF_EOF
13148		#!$SHELL
13149		SHARED_LIB=\$1
13150		IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
13151		shift
13152		my_ld=\$1
13153		shift
13154		cat <<-EOF
13155		Linking shared library
13156		** SHARED LIB \$SHARED_LIB
13157		** IMPORT_LIB \$IMPORT_LIB
13158EOF
13159		args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
13160		exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
13161		mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
13162CF_EOF
13163		chmod +x mk_shared_lib.sh
13164		cat >mk_prog.sh <<-CF_EOF
13165		#!$SHELL
13166		shift
13167		# Ignore first argument (compiler) and use LD (link.exe) unconditionally
13168		LD="$LD"
13169		clopts=()
13170		ldopts=("/subsystem:console")
13171		libs=()
13172		isdll=0
13173		while test \$# -gt 0; do
13174			case "\$1" in
13175				-link)
13176					# ignore -link argument
13177					;;
13178				-M[TD] | -M[TD]d)
13179					# ignore runtime-library option
13180					;;
13181				-dll)
13182					isdll=1
13183					;;
13184				-W* | -w*)
13185					# ignore warnings
13186					;;
13187				-D*)
13188					clopts+=("\$1")
13189					;;
13190				-I*)
13191					clopts+=("\$1")
13192					;;
13193				-l*)
13194					libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
13195					;;
13196				-L*)
13197					ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
13198					;;
13199				*.obj | *.o)
13200					ldopts+=("\$1")
13201					;;
13202				-Wl,*)
13203					for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
13204						ldopts+=("\${linkarg}")
13205					done
13206					;;
13207				*.lib)
13208					ldopts+=("\$1")
13209					;;
13210				-o)
13211					shift
13212					ldopts+=("-out:\$1")
13213					;;
13214				*)
13215					clopts+=("\$1")
13216					ldopts+=("\$1")
13217					;;
13218			esac
13219			shift
13220		done
13221		if [ "\$isdll" -ne 0 ]; then
13222			for lib in \${libs[*]}; do
13223				ldopts+=("\$lib.dll.lib")
13224			done
13225		else
13226			for lib in \${libs[*]}; do
13227				ldopts+=("\$lib.lib")
13228			done
13229		fi
13230		cat <<-EOF
13231		Creating program
13232		** ld options:   "\${ldopts[@]}"
13233EOF
13234		exec \$LD \${ldopts[@]}
13235CF_EOF
13236		chmod +x mk_prog.sh
13237		LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
13238		LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
13239		;;
13240	(mingw*)
13241		cf_cv_shlib_version=mingw
13242		cf_cv_shlib_version_infix=mingw
13243		shlibdir=$bindir
13244		MAKE_DLLS=
13245		if test "$DFT_LWR_MODEL" = "shared" ; then
13246			LOCAL_LDFLAGS="-Wl,--enable-auto-import"
13247			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13248			EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
13249		fi
13250		CC_SHARED_OPTS=
13251		MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
13252		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
13253		cat >mk_shared_lib.sh <<-CF_EOF
13254		#!$SHELL
13255		SHARED_LIB=\$1
13256		IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
13257		shift
13258		cat <<-EOF
13259		Linking shared library
13260		** SHARED_LIB \$SHARED_LIB
13261		** IMPORT_LIB \$IMPORT_LIB
13262EOF
13263		exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
13264CF_EOF
13265		chmod +x mk_shared_lib.sh
13266		;;
13267	(openbsd[2-9].*|mirbsd*)
13268		if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
13269			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
13270			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13271		fi
13272		if test "$cf_cv_enable_rpath" = yes ; then
13273			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13274		fi
13275		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13276
13277	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13278	if test "$cf_cv_shlib_version" = rel; then
13279		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13280	else
13281		cf_cv_shared_soname='`basename $@`'
13282	fi
13283
13284		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
13285		;;
13286	(nskJ*)
13287		CC_SHARED_OPTS=
13288		MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
13289		;;
13290	(nskL*)
13291		CC_SHARED_OPTS=
13292		MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
13293		;;
13294	(nto-qnx*|openbsd*|freebsd[12].*)
13295		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13296		MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
13297		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13298		;;
13299	(dragonfly*|freebsd*)
13300		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13301		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
13302			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
13303			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
13304			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13305		fi
13306
13307	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13308	if test "$cf_cv_shlib_version" = rel; then
13309		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13310	else
13311		cf_cv_shared_soname='`basename $@`'
13312	fi
13313
13314		MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
13315		;;
13316	(netbsd*)
13317		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13318		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
13319			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
13320			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13321			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13322			if test "$cf_cv_shlib_version" = auto; then
13323			if test -f /usr/libexec/ld.elf_so; then
13324				cf_cv_shlib_version=abi
13325			else
13326				cf_cv_shlib_version=rel
13327			fi
13328			fi
13329
13330	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13331	if test "$cf_cv_shlib_version" = rel; then
13332		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13333	else
13334		cf_cv_shared_soname='`basename $@`'
13335	fi
13336
13337			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
13338		else
13339			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
13340		fi
13341		;;
13342	(osf*|mls+*)
13343		# tested with OSF/1 V3.2 and 'cc'
13344		# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
13345		# link with shared libs).
13346		MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
13347		case "$host_os" in
13348		(osf4*)
13349			MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
13350			;;
13351		esac
13352		MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
13353		if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
13354			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
13355			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13356		fi
13357		cf_cv_rm_so_locs=yes
13358		;;
13359	(sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
13360		# tested with osr5.0.5
13361		if test "$GCC" != yes; then
13362			CC_SHARED_OPTS='-belf -KPIC'
13363		fi
13364		MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
13365		if test "$cf_cv_enable_rpath" = yes ; then
13366			# only way is to set LD_RUN_PATH but no switch for it
13367			RUN_PATH=$libdir
13368		fi
13369		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13370		LINK_PROGS='LD_RUN_PATH=${libdir}'
13371		LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
13372		;;
13373	(sunos4*)
13374		# tested with SunOS 4.1.1 and gcc 2.7.0
13375		if test "$GCC" != yes; then
13376			CC_SHARED_OPTS='-KPIC'
13377		fi
13378		MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
13379		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13380		;;
13381	(solaris2*)
13382		# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
13383		# tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
13384		if test "$DFT_LWR_MODEL" = "shared" ; then
13385			LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
13386			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13387		fi
13388		if test "$cf_cv_enable_rpath" = yes ; then
13389			EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
13390		fi
13391
13392	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13393	if test "$cf_cv_shlib_version" = rel; then
13394		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13395	else
13396		cf_cv_shared_soname='`basename $@`'
13397	fi
13398
13399		if test "$GCC" != yes; then
13400			cf_save_CFLAGS="$CFLAGS"
13401			for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
13402			do
13403				CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
13404				cat >"conftest.$ac_ext" <<_ACEOF
13405#line 13405 "configure"
13406#include "confdefs.h"
13407#include <stdio.h>
13408int
13409main (void)
13410{
13411printf("Hello\\n");
13412  ;
13413  return 0;
13414}
13415_ACEOF
13416rm -f "conftest.$ac_objext"
13417if { (eval echo "$as_me:13417: \"$ac_compile\"") >&5
13418  (eval $ac_compile) 2>&5
13419  ac_status=$?
13420  echo "$as_me:13420: \$? = $ac_status" >&5
13421  (exit "$ac_status"); } &&
13422         { ac_try='test -s "conftest.$ac_objext"'
13423  { (eval echo "$as_me:13423: \"$ac_try\"") >&5
13424  (eval $ac_try) 2>&5
13425  ac_status=$?
13426  echo "$as_me:13426: \$? = $ac_status" >&5
13427  (exit "$ac_status"); }; }; then
13428  break
13429else
13430  echo "$as_me: failed program was:" >&5
13431cat "conftest.$ac_ext" >&5
13432fi
13433rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13434			done
13435			CFLAGS="$cf_save_CFLAGS"
13436			CC_SHARED_OPTS=$cf_shared_opts
13437			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
13438		else
13439			MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
13440		fi
13441		;;
13442	(sysv5uw7*|unix_sv*)
13443		# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
13444		if test "$GCC" != yes; then
13445			CC_SHARED_OPTS='-KPIC'
13446		fi
13447		MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
13448		;;
13449	(*)
13450		CC_SHARED_OPTS='unknown'
13451		MK_SHARED_LIB='echo unknown'
13452		;;
13453	esac
13454
13455	# This works if the last tokens in $MK_SHARED_LIB are the -o target.
13456	case "$cf_cv_shlib_version" in
13457	(rel|abi)
13458		case "$MK_SHARED_LIB" in
13459		(*'-o $@')
13460			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
13461			;;
13462		(*)
13463			{ echo "$as_me:13463: WARNING: ignored --with-shlib-version" >&5
13464echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
13465			;;
13466		esac
13467		;;
13468	esac
13469
13470	if test -n "$cf_try_cflags"
13471	then
13472cat > conftest.$ac_ext <<EOF
13473#line 13473 "${as_me:-configure}"
13474#include <stdio.h>
13475int main(int argc, char *argv[])
13476{
13477	printf("hello\\n");
13478	return (argv[argc-1] == 0) ;
13479}
13480EOF
13481		cf_save_CFLAGS="$CFLAGS"
13482		for cf_opt in $cf_try_cflags
13483		do
13484			CFLAGS="$cf_save_CFLAGS -$cf_opt"
13485			echo "$as_me:13485: checking if CFLAGS option -$cf_opt works" >&5
13486echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
13487			if { (eval echo "$as_me:13487: \"$ac_compile\"") >&5
13488  (eval $ac_compile) 2>&5
13489  ac_status=$?
13490  echo "$as_me:13490: \$? = $ac_status" >&5
13491  (exit "$ac_status"); }; then
13492				echo "$as_me:13492: result: yes" >&5
13493echo "${ECHO_T}yes" >&6
13494				cf_save_CFLAGS="$CFLAGS"
13495			else
13496				echo "$as_me:13496: result: no" >&5
13497echo "${ECHO_T}no" >&6
13498			fi
13499		done
13500		CFLAGS="$cf_save_CFLAGS"
13501	fi
13502
13503	# RPATH_LIST is a colon-separated list of directories
13504	test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
13505	test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
13506
13507	test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
13508
13509	test -n "$verbose" && echo "	CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
13510
13511echo "${as_me:-configure}:13511: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
13512
13513	test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
13514
13515echo "${as_me:-configure}:13515: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
13516
13517echo "$as_me:13517: checking if versioned-symbols file should be used" >&5
13518echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
13519
13520# Check whether --with-versioned-syms or --without-versioned-syms was given.
13521if test "${with_versioned_syms+set}" = set; then
13522  withval="$with_versioned_syms"
13523  with_versioned_syms=$withval
13524else
13525  with_versioned_syms=no
13526fi;
13527case "x$with_versioned_syms" in
13528(xyes)
13529	with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
13530
13531	;;
13532(xno)
13533	;;
13534(x/*)
13535	test -f "$with_versioned_syms" || { { echo "$as_me:13535: error: expected a filename: $with_versioned_syms" >&5
13536echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
13537   { (exit 1); exit 1; }; }
13538	;;
13539(*)
13540	test -f "$with_versioned_syms" || { { echo "$as_me:13540: error: expected a filename: $with_versioned_syms" >&5
13541echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
13542   { (exit 1); exit 1; }; }
13543	with_versioned_syms=`pwd`/"$with_versioned_syms"
13544	;;
13545esac
13546echo "$as_me:13546: result: $with_versioned_syms" >&5
13547echo "${ECHO_T}$with_versioned_syms" >&6
13548
13549RESULTING_SYMS=
13550VERSIONED_SYMS=
13551WILDCARD_SYMS=
13552
13553if test "x$with_versioned_syms" != xno
13554then
13555	RESULTING_SYMS=$with_versioned_syms
13556	case "x$MK_SHARED_LIB" in
13557	(*-Wl,*)
13558		VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
13559		MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
13560		test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
13561
13562echo "${as_me:-configure}:13562: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
13563
13564		;;
13565	(*-dy\ *)
13566		VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
13567		MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
13568		test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
13569
13570echo "${as_me:-configure}:13570: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
13571
13572		;;
13573	(*)
13574		{ echo "$as_me:13574: WARNING: this system does not support versioned-symbols" >&5
13575echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
13576		;;
13577	esac
13578
13579	# Linux ld can selectively override scope, e.g., of symbols beginning with
13580	# "_" by first declaring some as global, and then using a wildcard to
13581	# declare the others as local.  Some other loaders cannot do this.  Check
13582	# by constructing a (very) simple shared library and inspecting its
13583	# symbols.
13584	if test "x$VERSIONED_SYMS" != "x"
13585	then
13586		echo "$as_me:13586: checking if wildcards can be used to selectively omit symbols" >&5
13587echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
13588		WILDCARD_SYMS=no
13589
13590		# make sources
13591		rm -f conftest.*
13592
13593		cat >conftest.ver <<EOF
13594module_1.0 {
13595global:
13596	globalf1;
13597local:
13598	localf1;
13599};
13600module_2.0 {
13601global:
13602	globalf2;
13603local:
13604	localf2;
13605	_*;
13606} module_1.0;
13607submodule_1.0 {
13608global:
13609	subglobalf1;
13610	_ismissing;
13611local:
13612	sublocalf1;
13613};
13614submodule_2.0 {
13615global:
13616	subglobalf2;
13617local:
13618	sublocalf2;
13619	_*;
13620} submodule_1.0;
13621EOF
13622		cat >conftest.$ac_ext <<EOF
13623#line 13623 "configure"
13624int	_ismissing(void) { return 1; }
13625int	_localf1(void) { return 1; }
13626int	_localf2(void) { return 2; }
13627int	globalf1(void) { return 1; }
13628int	globalf2(void) { return 2; }
13629int	_sublocalf1(void) { return 1; }
13630int	_sublocalf2(void) { return 2; }
13631int	subglobalf1(void) { return 1; }
13632int	subglobalf2(void) { return 2; }
13633EOF
13634		cat >conftest.mk <<EOF
13635CC=${CC}
13636CFLAGS=${CFLAGS}
13637CPPFLAGS=${CPPFLAGS}
13638LDFLAGS=${LDFLAGS}
13639LIBS=${LIBS}
13640VERSIONED_SYMS=${VERSIONED_SYMS}
13641RESULTING_SYMS=conftest.ver
13642MK_SHARED_LIB=${MK_SHARED_LIB}
13643conftest.so: conftest.$ac_cv_objext
13644		\$(MK_SHARED_LIB) conftest.$ac_cv_objext
13645EOF
13646
13647		# compile source, make library
13648		if make -f conftest.mk 2>&5 >/dev/null
13649		then
13650			# test for missing symbol in either Data or Text section
13651			cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[ 	][DT][ 	]'`"
13652			test -n "$cf_missing" && WILDCARD_SYMS=yes
13653		fi
13654		echo "$as_me:13654: result: $WILDCARD_SYMS" >&5
13655echo "${ECHO_T}$WILDCARD_SYMS" >&6
13656		rm -f conftest.*
13657	fi
13658fi
13659
13660		LIB_PREP=:
13661		LIB_CREATE="$MK_SHARED_LIB"
13662		CFLAGS="$CFLAGS $CC_SHARED_OPTS"
13663		MAKE_NORMAL="#"
13664		MAKE_STATIC="#"
13665		MAKE_SHARED=
13666	fi
13667fi
13668
13669LIB_SUFFIX=
13670
13671	case X$LIB_MODEL in
13672	(Xlibtool)
13673		DFT_LIB_SUFFIX='.la'
13674		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13675		;;
13676	(Xdebug)
13677		case "$cf_cv_system_name" in
13678		(*-msvc*)
13679			DFT_LIB_SUFFIX='_g.lib'
13680			;;
13681		(*)
13682			DFT_LIB_SUFFIX='_g.a'
13683			;;
13684		esac
13685		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13686		;;
13687	(Xprofile)
13688		case "$cf_cv_system_name" in
13689		(*-msvc*)
13690			DFT_LIB_SUFFIX='_p.lib'
13691			;;
13692		(*)
13693			DFT_LIB_SUFFIX='_p.a'
13694			;;
13695		esac
13696		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13697		;;
13698	(Xshared)
13699		case "$cf_cv_system_name" in
13700		(aix[5-7]*)
13701			DFT_LIB_SUFFIX='.so'
13702			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13703			;;
13704		(*-msvc*)
13705			DFT_LIB_SUFFIX='.dll'
13706			DFT_DEP_SUFFIX='.dll.lib'
13707			;;
13708		(cygwin*|msys*|mingw*)
13709			DFT_LIB_SUFFIX='.dll'
13710			DFT_DEP_SUFFIX='.dll.a'
13711			;;
13712		(darwin*)
13713			DFT_LIB_SUFFIX='.dylib'
13714			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13715			;;
13716		(hpux*)
13717			case "$target" in
13718			(ia64*)
13719				DFT_LIB_SUFFIX='.so'
13720				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13721				;;
13722			(*)
13723				DFT_LIB_SUFFIX='.sl'
13724				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13725				;;
13726			esac
13727			;;
13728		(*)
13729			DFT_LIB_SUFFIX='.so'
13730			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13731			;;
13732		esac
13733		;;
13734	(*)
13735		case "$target" in
13736		(*-msvc*)
13737			DFT_LIB_SUFFIX='.lib'
13738			;;
13739		(*)
13740			DFT_LIB_SUFFIX='.a'
13741			;;
13742		esac
13743		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13744		;;
13745	esac
13746	if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
13747	then
13748		DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
13749		DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
13750	fi
13751
13752LIB_SUFFIX=$DFT_LIB_SUFFIX
13753
13754echo "$as_me:13754: checking for specific curses-directory" >&5
13755echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
13756
13757# Check whether --with-curses-dir or --without-curses-dir was given.
13758if test "${with_curses_dir+set}" = set; then
13759  withval="$with_curses_dir"
13760  cf_cv_curses_dir=$withval
13761else
13762  cf_cv_curses_dir=no
13763fi;
13764echo "$as_me:13764: result: $cf_cv_curses_dir" >&5
13765echo "${ECHO_T}$cf_cv_curses_dir" >&6
13766
13767if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
13768then
13769
13770if test "x$prefix" != xNONE; then
13771	cf_path_syntax="$prefix"
13772else
13773	cf_path_syntax="$ac_default_prefix"
13774fi
13775
13776case ".$withval" in
13777(.\$\(*\)*|.\'*\'*)
13778	;;
13779(..|./*|.\\*)
13780	;;
13781(.[a-zA-Z]:[\\/]*) # OS/2 EMX
13782	;;
13783(.\$\{*prefix\}*|.\$\{*dir\}*)
13784	eval withval="$withval"
13785	case ".$withval" in
13786	(.NONE/*)
13787		withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
13788		;;
13789	esac
13790	;;
13791(.no|.NONE/*)
13792	withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
13793	;;
13794(*)
13795	{ { echo "$as_me:13795: error: expected a pathname, not \"$withval\"" >&5
13796echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13797   { (exit 1); exit 1; }; }
13798	;;
13799esac
13800
13801	if test -d "$cf_cv_curses_dir"
13802	then
13803
13804if test -n "$cf_cv_curses_dir/include" ; then
13805  for cf_add_incdir in $cf_cv_curses_dir/include
13806  do
13807	while test "$cf_add_incdir" != /usr/include
13808	do
13809	  if test -d "$cf_add_incdir"
13810	  then
13811		cf_have_incdir=no
13812		if test -n "$CFLAGS$CPPFLAGS" ; then
13813		  # a loop is needed to ensure we can add subdirs of existing dirs
13814		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13815			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13816			  cf_have_incdir=yes; break
13817			fi
13818		  done
13819		fi
13820
13821		if test "$cf_have_incdir" = no ; then
13822		  if test "$cf_add_incdir" = /usr/local/include ; then
13823			if test "$GCC" = yes
13824			then
13825			  cf_save_CPPFLAGS=$CPPFLAGS
13826
13827	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13828	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13829
13830			  cat >"conftest.$ac_ext" <<_ACEOF
13831#line 13831 "configure"
13832#include "confdefs.h"
13833#include <stdio.h>
13834int
13835main (void)
13836{
13837printf("Hello")
13838  ;
13839  return 0;
13840}
13841_ACEOF
13842rm -f "conftest.$ac_objext"
13843if { (eval echo "$as_me:13843: \"$ac_compile\"") >&5
13844  (eval $ac_compile) 2>&5
13845  ac_status=$?
13846  echo "$as_me:13846: \$? = $ac_status" >&5
13847  (exit "$ac_status"); } &&
13848         { ac_try='test -s "conftest.$ac_objext"'
13849  { (eval echo "$as_me:13849: \"$ac_try\"") >&5
13850  (eval $ac_try) 2>&5
13851  ac_status=$?
13852  echo "$as_me:13852: \$? = $ac_status" >&5
13853  (exit "$ac_status"); }; }; then
13854  :
13855else
13856  echo "$as_me: failed program was:" >&5
13857cat "conftest.$ac_ext" >&5
13858cf_have_incdir=yes
13859fi
13860rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13861			  CPPFLAGS=$cf_save_CPPFLAGS
13862			fi
13863		  fi
13864		fi
13865
13866		if test "$cf_have_incdir" = no ; then
13867		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
13868
13869echo "${as_me:-configure}:13869: testing adding $cf_add_incdir to include-path ..." 1>&5
13870
13871		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13872
13873		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13874		  test "$cf_top_incdir" = "$cf_add_incdir" && break
13875		  cf_add_incdir="$cf_top_incdir"
13876		else
13877		  break
13878		fi
13879	  else
13880		break
13881	  fi
13882	done
13883  done
13884fi
13885
13886if test -n "$cf_cv_curses_dir/lib" ; then
13887	for cf_add_libdir in $cf_cv_curses_dir/lib
13888	do
13889		if test "$cf_add_libdir" = /usr/lib ; then
13890			:
13891		elif test -d "$cf_add_libdir"
13892		then
13893			cf_have_libdir=no
13894			if test -n "$LDFLAGS$LIBS" ; then
13895				# a loop is needed to ensure we can add subdirs of existing dirs
13896				for cf_test_libdir in $LDFLAGS $LIBS ; do
13897					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13898						cf_have_libdir=yes; break
13899					fi
13900				done
13901			fi
13902			if test "$cf_have_libdir" = no ; then
13903				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
13904
13905echo "${as_me:-configure}:13905: testing adding $cf_add_libdir to library-path ..." 1>&5
13906
13907				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13908			fi
13909		fi
13910	done
13911fi
13912
13913	fi
13914fi
13915
13916echo "$as_me:13916: checking for specific curses-directory" >&5
13917echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
13918
13919# Check whether --with-curses-dir or --without-curses-dir was given.
13920if test "${with_curses_dir+set}" = set; then
13921  withval="$with_curses_dir"
13922  cf_cv_curses_dir=$withval
13923else
13924  cf_cv_curses_dir=no
13925fi;
13926echo "$as_me:13926: result: $cf_cv_curses_dir" >&5
13927echo "${ECHO_T}$cf_cv_curses_dir" >&6
13928
13929if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
13930then
13931
13932if test "x$prefix" != xNONE; then
13933	cf_path_syntax="$prefix"
13934else
13935	cf_path_syntax="$ac_default_prefix"
13936fi
13937
13938case ".$withval" in
13939(.\$\(*\)*|.\'*\'*)
13940	;;
13941(..|./*|.\\*)
13942	;;
13943(.[a-zA-Z]:[\\/]*) # OS/2 EMX
13944	;;
13945(.\$\{*prefix\}*|.\$\{*dir\}*)
13946	eval withval="$withval"
13947	case ".$withval" in
13948	(.NONE/*)
13949		withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
13950		;;
13951	esac
13952	;;
13953(.no|.NONE/*)
13954	withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
13955	;;
13956(*)
13957	{ { echo "$as_me:13957: error: expected a pathname, not \"$withval\"" >&5
13958echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13959   { (exit 1); exit 1; }; }
13960	;;
13961esac
13962
13963	if test -d "$cf_cv_curses_dir"
13964	then
13965
13966if test -n "$cf_cv_curses_dir/include" ; then
13967  for cf_add_incdir in $cf_cv_curses_dir/include
13968  do
13969	while test "$cf_add_incdir" != /usr/include
13970	do
13971	  if test -d "$cf_add_incdir"
13972	  then
13973		cf_have_incdir=no
13974		if test -n "$CFLAGS$CPPFLAGS" ; then
13975		  # a loop is needed to ensure we can add subdirs of existing dirs
13976		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13977			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13978			  cf_have_incdir=yes; break
13979			fi
13980		  done
13981		fi
13982
13983		if test "$cf_have_incdir" = no ; then
13984		  if test "$cf_add_incdir" = /usr/local/include ; then
13985			if test "$GCC" = yes
13986			then
13987			  cf_save_CPPFLAGS=$CPPFLAGS
13988
13989	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13990	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13991
13992			  cat >"conftest.$ac_ext" <<_ACEOF
13993#line 13993 "configure"
13994#include "confdefs.h"
13995#include <stdio.h>
13996int
13997main (void)
13998{
13999printf("Hello")
14000  ;
14001  return 0;
14002}
14003_ACEOF
14004rm -f "conftest.$ac_objext"
14005if { (eval echo "$as_me:14005: \"$ac_compile\"") >&5
14006  (eval $ac_compile) 2>&5
14007  ac_status=$?
14008  echo "$as_me:14008: \$? = $ac_status" >&5
14009  (exit "$ac_status"); } &&
14010         { ac_try='test -s "conftest.$ac_objext"'
14011  { (eval echo "$as_me:14011: \"$ac_try\"") >&5
14012  (eval $ac_try) 2>&5
14013  ac_status=$?
14014  echo "$as_me:14014: \$? = $ac_status" >&5
14015  (exit "$ac_status"); }; }; then
14016  :
14017else
14018  echo "$as_me: failed program was:" >&5
14019cat "conftest.$ac_ext" >&5
14020cf_have_incdir=yes
14021fi
14022rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14023			  CPPFLAGS=$cf_save_CPPFLAGS
14024			fi
14025		  fi
14026		fi
14027
14028		if test "$cf_have_incdir" = no ; then
14029		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
14030
14031echo "${as_me:-configure}:14031: testing adding $cf_add_incdir to include-path ..." 1>&5
14032
14033		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14034
14035		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
14036		  test "$cf_top_incdir" = "$cf_add_incdir" && break
14037		  cf_add_incdir="$cf_top_incdir"
14038		else
14039		  break
14040		fi
14041	  else
14042		break
14043	  fi
14044	done
14045  done
14046fi
14047
14048if test -n "$cf_cv_curses_dir/lib" ; then
14049	for cf_add_libdir in $cf_cv_curses_dir/lib
14050	do
14051		if test "$cf_add_libdir" = /usr/lib ; then
14052			:
14053		elif test -d "$cf_add_libdir"
14054		then
14055			cf_have_libdir=no
14056			if test -n "$LDFLAGS$LIBS" ; then
14057				# a loop is needed to ensure we can add subdirs of existing dirs
14058				for cf_test_libdir in $LDFLAGS $LIBS ; do
14059					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14060						cf_have_libdir=yes; break
14061					fi
14062				done
14063			fi
14064			if test "$cf_have_libdir" = no ; then
14065				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
14066
14067echo "${as_me:-configure}:14067: testing adding $cf_add_libdir to library-path ..." 1>&5
14068
14069				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14070			fi
14071		fi
14072	done
14073fi
14074
14075	fi
14076fi
14077
14078cf_cv_screen=curses
14079
14080echo "$as_me:14080: checking for specified curses library type" >&5
14081echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
14082
14083# Check whether --with-screen or --without-screen was given.
14084if test "${with_screen+set}" = set; then
14085  withval="$with_screen"
14086  cf_cv_screen=$withval
14087else
14088
14089# Check whether --with-ncursesw or --without-ncursesw was given.
14090if test "${with_ncursesw+set}" = set; then
14091  withval="$with_ncursesw"
14092  cf_cv_screen=ncursesw
14093else
14094
14095# Check whether --with-ncurses or --without-ncurses was given.
14096if test "${with_ncurses+set}" = set; then
14097  withval="$with_ncurses"
14098  cf_cv_screen=ncurses
14099else
14100
14101# Check whether --with-pdcurses or --without-pdcurses was given.
14102if test "${with_pdcurses+set}" = set; then
14103  withval="$with_pdcurses"
14104  cf_cv_screen=pdcurses
14105else
14106
14107# Check whether --with-curses-colr or --without-curses-colr was given.
14108if test "${with_curses_colr+set}" = set; then
14109  withval="$with_curses_colr"
14110  cf_cv_screen=curses_colr
14111else
14112
14113# Check whether --with-curses-5lib or --without-curses-5lib was given.
14114if test "${with_curses_5lib+set}" = set; then
14115  withval="$with_curses_5lib"
14116  cf_cv_screen=curses_5lib
14117fi;
14118fi;
14119fi;
14120fi;
14121fi;
14122fi;
14123
14124echo "$as_me:14124: result: $cf_cv_screen" >&5
14125echo "${ECHO_T}$cf_cv_screen" >&6
14126
14127case $cf_cv_screen in
14128(curses|curses_*)
14129
14130echo "$as_me:14130: checking for extra include directories" >&5
14131echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
14132if test "${cf_cv_curses_incdir+set}" = set; then
14133  echo $ECHO_N "(cached) $ECHO_C" >&6
14134else
14135
14136cf_cv_curses_incdir=no
14137case "$host_os" in
14138(hpux10.*)
14139	if test "x$cf_cv_screen" = "xcurses_colr"
14140	then
14141		test -d /usr/include/curses_colr && \
14142		cf_cv_curses_incdir="-I/usr/include/curses_colr"
14143	fi
14144	;;
14145(sunos3*|sunos4*)
14146	if test "x$cf_cv_screen" = "xcurses_5lib"
14147	then
14148		test -d /usr/5lib && \
14149		test -d /usr/5include && \
14150		cf_cv_curses_incdir="-I/usr/5include"
14151	fi
14152	;;
14153esac
14154
14155fi
14156echo "$as_me:14156: result: $cf_cv_curses_incdir" >&5
14157echo "${ECHO_T}$cf_cv_curses_incdir" >&6
14158if test "$cf_cv_curses_incdir" != no
14159then
14160
14161	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14162	CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
14163
14164fi
14165
14166echo "$as_me:14166: checking if we have identified curses headers" >&5
14167echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
14168if test "${cf_cv_ncurses_header+set}" = set; then
14169  echo $ECHO_N "(cached) $ECHO_C" >&6
14170else
14171
14172cf_cv_ncurses_header=none
14173for cf_header in \
14174	ncurses.h  \
14175	curses.h  ncurses/ncurses.h ncurses/curses.h
14176do
14177cat >"conftest.$ac_ext" <<_ACEOF
14178#line 14178 "configure"
14179#include "confdefs.h"
14180#include <${cf_header}>
14181int
14182main (void)
14183{
14184initscr(); tgoto("?", 0,0)
14185  ;
14186  return 0;
14187}
14188_ACEOF
14189rm -f "conftest.$ac_objext"
14190if { (eval echo "$as_me:14190: \"$ac_compile\"") >&5
14191  (eval $ac_compile) 2>&5
14192  ac_status=$?
14193  echo "$as_me:14193: \$? = $ac_status" >&5
14194  (exit "$ac_status"); } &&
14195         { ac_try='test -s "conftest.$ac_objext"'
14196  { (eval echo "$as_me:14196: \"$ac_try\"") >&5
14197  (eval $ac_try) 2>&5
14198  ac_status=$?
14199  echo "$as_me:14199: \$? = $ac_status" >&5
14200  (exit "$ac_status"); }; }; then
14201  cf_cv_ncurses_header=$cf_header; break
14202else
14203  echo "$as_me: failed program was:" >&5
14204cat "conftest.$ac_ext" >&5
14205fi
14206rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14207done
14208
14209fi
14210echo "$as_me:14210: result: $cf_cv_ncurses_header" >&5
14211echo "${ECHO_T}$cf_cv_ncurses_header" >&6
14212
14213if test "$cf_cv_ncurses_header" = none ; then
14214	{ { echo "$as_me:14214: error: No curses header-files found" >&5
14215echo "$as_me: error: No curses header-files found" >&2;}
14216   { (exit 1); exit 1; }; }
14217fi
14218
14219# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
14220
14221for ac_header in $cf_cv_ncurses_header
14222do
14223as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14224echo "$as_me:14224: checking for $ac_header" >&5
14225echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14226if eval "test \"\${$as_ac_Header+set}\" = set"; then
14227  echo $ECHO_N "(cached) $ECHO_C" >&6
14228else
14229  cat >"conftest.$ac_ext" <<_ACEOF
14230#line 14230 "configure"
14231#include "confdefs.h"
14232#include <$ac_header>
14233_ACEOF
14234if { (eval echo "$as_me:14234: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14235  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14236  ac_status=$?
14237  $EGREP -v '^ *\+' conftest.er1 >conftest.err
14238  rm -f conftest.er1
14239  cat conftest.err >&5
14240  echo "$as_me:14240: \$? = $ac_status" >&5
14241  (exit "$ac_status"); } >/dev/null; then
14242  if test -s conftest.err; then
14243    ac_cpp_err=$ac_c_preproc_warn_flag
14244  else
14245    ac_cpp_err=
14246  fi
14247else
14248  ac_cpp_err=yes
14249fi
14250if test -z "$ac_cpp_err"; then
14251  eval "$as_ac_Header=yes"
14252else
14253  echo "$as_me: failed program was:" >&5
14254  cat "conftest.$ac_ext" >&5
14255  eval "$as_ac_Header=no"
14256fi
14257rm -f conftest.err "conftest.$ac_ext"
14258fi
14259echo "$as_me:14259: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14260echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14261if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14262  cat >>confdefs.h <<EOF
14263#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14264EOF
14265
14266fi
14267done
14268
14269echo "$as_me:14269: checking for terminfo header" >&5
14270echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
14271if test "${cf_cv_term_header+set}" = set; then
14272  echo $ECHO_N "(cached) $ECHO_C" >&6
14273else
14274
14275case "${cf_cv_ncurses_header}" in
14276(*/ncurses.h|*/ncursesw.h)
14277	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
14278	;;
14279(*)
14280	cf_term_header=term.h
14281	;;
14282esac
14283
14284for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
14285do
14286cat >"conftest.$ac_ext" <<_ACEOF
14287#line 14287 "configure"
14288#include "confdefs.h"
14289#include <stdio.h>
14290#include <${cf_cv_ncurses_header:-curses.h}>
14291#include <$cf_test>
14292
14293int
14294main (void)
14295{
14296int x = auto_left_margin; (void)x
14297  ;
14298  return 0;
14299}
14300_ACEOF
14301rm -f "conftest.$ac_objext"
14302if { (eval echo "$as_me:14302: \"$ac_compile\"") >&5
14303  (eval $ac_compile) 2>&5
14304  ac_status=$?
14305  echo "$as_me:14305: \$? = $ac_status" >&5
14306  (exit "$ac_status"); } &&
14307         { ac_try='test -s "conftest.$ac_objext"'
14308  { (eval echo "$as_me:14308: \"$ac_try\"") >&5
14309  (eval $ac_try) 2>&5
14310  ac_status=$?
14311  echo "$as_me:14311: \$? = $ac_status" >&5
14312  (exit "$ac_status"); }; }; then
14313
14314	cf_cv_term_header="$cf_test"
14315else
14316  echo "$as_me: failed program was:" >&5
14317cat "conftest.$ac_ext" >&5
14318
14319	cf_cv_term_header=unknown
14320
14321fi
14322rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14323	test "$cf_cv_term_header" != unknown && break
14324done
14325
14326fi
14327echo "$as_me:14327: result: $cf_cv_term_header" >&5
14328echo "${ECHO_T}$cf_cv_term_header" >&6
14329
14330# Set definitions to allow ifdef'ing to accommodate subdirectories
14331
14332case "$cf_cv_term_header" in
14333(*term.h)
14334
14335cat >>confdefs.h <<\EOF
14336#define HAVE_TERM_H 1
14337EOF
14338
14339	;;
14340esac
14341
14342case "$cf_cv_term_header" in
14343(ncurses/term.h)
14344
14345cat >>confdefs.h <<\EOF
14346#define HAVE_NCURSES_TERM_H 1
14347EOF
14348
14349	;;
14350(ncursesw/term.h)
14351
14352cat >>confdefs.h <<\EOF
14353#define HAVE_NCURSESW_TERM_H 1
14354EOF
14355
14356	;;
14357esac
14358
14359echo "$as_me:14359: checking for ncurses version" >&5
14360echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
14361if test "${cf_cv_ncurses_version+set}" = set; then
14362  echo $ECHO_N "(cached) $ECHO_C" >&6
14363else
14364
14365	cf_cv_ncurses_version=no
14366	cf_tempfile=out$$
14367	rm -f "$cf_tempfile"
14368	if test "$cross_compiling" = yes; then
14369
14370	# This will not work if the preprocessor splits the line after the
14371	# Autoconf token.  The 'unproto' program does that.
14372	cat > "conftest.$ac_ext" <<EOF
14373#include <${cf_cv_ncurses_header:-curses.h}>
14374#undef Autoconf
14375#ifdef NCURSES_VERSION
14376Autoconf NCURSES_VERSION
14377#else
14378#ifdef __NCURSES_H
14379Autoconf "old"
14380#endif
14381;
14382#endif
14383EOF
14384	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
14385	{ (eval echo "$as_me:14385: \"$cf_try\"") >&5
14386  (eval $cf_try) 2>&5
14387  ac_status=$?
14388  echo "$as_me:14388: \$? = $ac_status" >&5
14389  (exit "$ac_status"); }
14390	if test -f conftest.out ; then
14391		cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
14392		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
14393		rm -f conftest.out
14394	fi
14395
14396else
14397  cat >"conftest.$ac_ext" <<_ACEOF
14398#line 14398 "configure"
14399#include "confdefs.h"
14400
14401#include <${cf_cv_ncurses_header:-curses.h}>
14402#include <stdio.h>
14403int main(void)
14404{
14405	FILE *fp = fopen("$cf_tempfile", "w");
14406#ifdef NCURSES_VERSION
14407# ifdef NCURSES_VERSION_PATCH
14408	fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
14409# else
14410	fprintf(fp, "%s\\n", NCURSES_VERSION);
14411# endif
14412#else
14413# ifdef __NCURSES_H
14414	fprintf(fp, "old\\n");
14415# else
14416	make an error
14417# endif
14418#endif
14419	${cf_cv_main_return:-return}(0);
14420}
14421_ACEOF
14422rm -f "conftest$ac_exeext"
14423if { (eval echo "$as_me:14423: \"$ac_link\"") >&5
14424  (eval $ac_link) 2>&5
14425  ac_status=$?
14426  echo "$as_me:14426: \$? = $ac_status" >&5
14427  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14428  { (eval echo "$as_me:14428: \"$ac_try\"") >&5
14429  (eval $ac_try) 2>&5
14430  ac_status=$?
14431  echo "$as_me:14431: \$? = $ac_status" >&5
14432  (exit "$ac_status"); }; }; then
14433
14434	cf_cv_ncurses_version=`cat $cf_tempfile`
14435else
14436  echo "$as_me: program exited with status $ac_status" >&5
14437echo "$as_me: failed program was:" >&5
14438cat "conftest.$ac_ext" >&5
14439fi
14440rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14441fi
14442	rm -f "$cf_tempfile"
14443
14444fi
14445echo "$as_me:14445: result: $cf_cv_ncurses_version" >&5
14446echo "${ECHO_T}$cf_cv_ncurses_version" >&6
14447test "$cf_cv_ncurses_version" = no ||
14448cat >>confdefs.h <<\EOF
14449#define NCURSES 1
14450EOF
14451
14452echo "$as_me:14452: checking if we have identified curses libraries" >&5
14453echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
14454cat >"conftest.$ac_ext" <<_ACEOF
14455#line 14455 "configure"
14456#include "confdefs.h"
14457#include <${cf_cv_ncurses_header:-curses.h}>
14458int
14459main (void)
14460{
14461initscr(); tgoto("?", 0,0)
14462  ;
14463  return 0;
14464}
14465_ACEOF
14466rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14467if { (eval echo "$as_me:14467: \"$ac_link\"") >&5
14468  (eval $ac_link) 2>&5
14469  ac_status=$?
14470  echo "$as_me:14470: \$? = $ac_status" >&5
14471  (exit "$ac_status"); } &&
14472         { ac_try='test -s "conftest$ac_exeext"'
14473  { (eval echo "$as_me:14473: \"$ac_try\"") >&5
14474  (eval $ac_try) 2>&5
14475  ac_status=$?
14476  echo "$as_me:14476: \$? = $ac_status" >&5
14477  (exit "$ac_status"); }; }; then
14478  cf_result=yes
14479else
14480  echo "$as_me: failed program was:" >&5
14481cat "conftest.$ac_ext" >&5
14482cf_result=no
14483fi
14484rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14485echo "$as_me:14485: result: $cf_result" >&5
14486echo "${ECHO_T}$cf_result" >&6
14487
14488if test "$cf_result" = no ; then
14489case "$host_os" in
14490(freebsd*)
14491	echo "$as_me:14491: checking for tgoto in -lmytinfo" >&5
14492echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
14493if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
14494  echo $ECHO_N "(cached) $ECHO_C" >&6
14495else
14496  ac_check_lib_save_LIBS=$LIBS
14497LIBS="-lmytinfo  $LIBS"
14498cat >"conftest.$ac_ext" <<_ACEOF
14499#line 14499 "configure"
14500#include "confdefs.h"
14501
14502/* Override any gcc2 internal prototype to avoid an error.  */
14503#ifdef __cplusplus
14504extern "C"
14505#endif
14506/* We use char because int might match the return type of a gcc2
14507   builtin and then its argument prototype would still apply.  */
14508char tgoto ();
14509int
14510main (void)
14511{
14512tgoto ();
14513  ;
14514  return 0;
14515}
14516_ACEOF
14517rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14518if { (eval echo "$as_me:14518: \"$ac_link\"") >&5
14519  (eval $ac_link) 2>&5
14520  ac_status=$?
14521  echo "$as_me:14521: \$? = $ac_status" >&5
14522  (exit "$ac_status"); } &&
14523         { ac_try='test -s "conftest$ac_exeext"'
14524  { (eval echo "$as_me:14524: \"$ac_try\"") >&5
14525  (eval $ac_try) 2>&5
14526  ac_status=$?
14527  echo "$as_me:14527: \$? = $ac_status" >&5
14528  (exit "$ac_status"); }; }; then
14529  ac_cv_lib_mytinfo_tgoto=yes
14530else
14531  echo "$as_me: failed program was:" >&5
14532cat "conftest.$ac_ext" >&5
14533ac_cv_lib_mytinfo_tgoto=no
14534fi
14535rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14536LIBS=$ac_check_lib_save_LIBS
14537fi
14538echo "$as_me:14538: result: $ac_cv_lib_mytinfo_tgoto" >&5
14539echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
14540if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
14541
14542cf_add_libs="$LIBS"
14543# reverse order
14544cf_add_0lib=
14545for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14546# filter duplicates
14547for cf_add_1lib in $cf_add_0lib; do
14548	for cf_add_2lib in $cf_add_libs; do
14549		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14550			cf_add_1lib=
14551			break
14552		fi
14553	done
14554	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14555done
14556LIBS="$cf_add_libs"
14557
14558fi
14559
14560	;;
14561(hpux10.*)
14562	# Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
14563	# next (1998), and xcurses "newer" (2000).  There is no header file for
14564	# Hcurses; the subdirectory curses_colr has the headers (curses.h and
14565	# term.h) for cur_colr
14566	if test "x$cf_cv_screen" = "xcurses_colr"
14567	then
14568		echo "$as_me:14568: checking for initscr in -lcur_colr" >&5
14569echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
14570if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
14571  echo $ECHO_N "(cached) $ECHO_C" >&6
14572else
14573  ac_check_lib_save_LIBS=$LIBS
14574LIBS="-lcur_colr  $LIBS"
14575cat >"conftest.$ac_ext" <<_ACEOF
14576#line 14576 "configure"
14577#include "confdefs.h"
14578
14579/* Override any gcc2 internal prototype to avoid an error.  */
14580#ifdef __cplusplus
14581extern "C"
14582#endif
14583/* We use char because int might match the return type of a gcc2
14584   builtin and then its argument prototype would still apply.  */
14585char initscr ();
14586int
14587main (void)
14588{
14589initscr ();
14590  ;
14591  return 0;
14592}
14593_ACEOF
14594rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14595if { (eval echo "$as_me:14595: \"$ac_link\"") >&5
14596  (eval $ac_link) 2>&5
14597  ac_status=$?
14598  echo "$as_me:14598: \$? = $ac_status" >&5
14599  (exit "$ac_status"); } &&
14600         { ac_try='test -s "conftest$ac_exeext"'
14601  { (eval echo "$as_me:14601: \"$ac_try\"") >&5
14602  (eval $ac_try) 2>&5
14603  ac_status=$?
14604  echo "$as_me:14604: \$? = $ac_status" >&5
14605  (exit "$ac_status"); }; }; then
14606  ac_cv_lib_cur_colr_initscr=yes
14607else
14608  echo "$as_me: failed program was:" >&5
14609cat "conftest.$ac_ext" >&5
14610ac_cv_lib_cur_colr_initscr=no
14611fi
14612rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14613LIBS=$ac_check_lib_save_LIBS
14614fi
14615echo "$as_me:14615: result: $ac_cv_lib_cur_colr_initscr" >&5
14616echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
14617if test "$ac_cv_lib_cur_colr_initscr" = yes; then
14618
14619cf_add_libs="$LIBS"
14620# reverse order
14621cf_add_0lib=
14622for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14623# filter duplicates
14624for cf_add_1lib in $cf_add_0lib; do
14625	for cf_add_2lib in $cf_add_libs; do
14626		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14627			cf_add_1lib=
14628			break
14629		fi
14630	done
14631	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14632done
14633LIBS="$cf_add_libs"
14634
14635			ac_cv_func_initscr=yes
14636
14637else
14638
14639		echo "$as_me:14639: checking for initscr in -lHcurses" >&5
14640echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
14641if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
14642  echo $ECHO_N "(cached) $ECHO_C" >&6
14643else
14644  ac_check_lib_save_LIBS=$LIBS
14645LIBS="-lHcurses  $LIBS"
14646cat >"conftest.$ac_ext" <<_ACEOF
14647#line 14647 "configure"
14648#include "confdefs.h"
14649
14650/* Override any gcc2 internal prototype to avoid an error.  */
14651#ifdef __cplusplus
14652extern "C"
14653#endif
14654/* We use char because int might match the return type of a gcc2
14655   builtin and then its argument prototype would still apply.  */
14656char initscr ();
14657int
14658main (void)
14659{
14660initscr ();
14661  ;
14662  return 0;
14663}
14664_ACEOF
14665rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14666if { (eval echo "$as_me:14666: \"$ac_link\"") >&5
14667  (eval $ac_link) 2>&5
14668  ac_status=$?
14669  echo "$as_me:14669: \$? = $ac_status" >&5
14670  (exit "$ac_status"); } &&
14671         { ac_try='test -s "conftest$ac_exeext"'
14672  { (eval echo "$as_me:14672: \"$ac_try\"") >&5
14673  (eval $ac_try) 2>&5
14674  ac_status=$?
14675  echo "$as_me:14675: \$? = $ac_status" >&5
14676  (exit "$ac_status"); }; }; then
14677  ac_cv_lib_Hcurses_initscr=yes
14678else
14679  echo "$as_me: failed program was:" >&5
14680cat "conftest.$ac_ext" >&5
14681ac_cv_lib_Hcurses_initscr=no
14682fi
14683rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14684LIBS=$ac_check_lib_save_LIBS
14685fi
14686echo "$as_me:14686: result: $ac_cv_lib_Hcurses_initscr" >&5
14687echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
14688if test "$ac_cv_lib_Hcurses_initscr" = yes; then
14689
14690			# HP's header uses __HP_CURSES, but user claims _HP_CURSES.
14691
14692cf_add_libs="$LIBS"
14693# reverse order
14694cf_add_0lib=
14695for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14696# filter duplicates
14697for cf_add_1lib in $cf_add_0lib; do
14698	for cf_add_2lib in $cf_add_libs; do
14699		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14700			cf_add_1lib=
14701			break
14702		fi
14703	done
14704	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14705done
14706LIBS="$cf_add_libs"
14707
14708	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14709	CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
14710
14711			ac_cv_func_initscr=yes
14712
14713fi
14714
14715fi
14716
14717	fi
14718	;;
14719(linux*)
14720	case `arch 2>/dev/null` in
14721	(x86_64)
14722		if test -d /lib64
14723		then
14724
14725if test -n "/lib64" ; then
14726	for cf_add_libdir in /lib64
14727	do
14728		if test "$cf_add_libdir" = /usr/lib ; then
14729			:
14730		elif test -d "$cf_add_libdir"
14731		then
14732			cf_have_libdir=no
14733			if test -n "$LDFLAGS$LIBS" ; then
14734				# a loop is needed to ensure we can add subdirs of existing dirs
14735				for cf_test_libdir in $LDFLAGS $LIBS ; do
14736					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14737						cf_have_libdir=yes; break
14738					fi
14739				done
14740			fi
14741			if test "$cf_have_libdir" = no ; then
14742				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
14743
14744echo "${as_me:-configure}:14744: testing adding $cf_add_libdir to library-path ..." 1>&5
14745
14746				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14747			fi
14748		fi
14749	done
14750fi
14751
14752		else
14753
14754if test -n "/lib" ; then
14755	for cf_add_libdir in /lib
14756	do
14757		if test "$cf_add_libdir" = /usr/lib ; then
14758			:
14759		elif test -d "$cf_add_libdir"
14760		then
14761			cf_have_libdir=no
14762			if test -n "$LDFLAGS$LIBS" ; then
14763				# a loop is needed to ensure we can add subdirs of existing dirs
14764				for cf_test_libdir in $LDFLAGS $LIBS ; do
14765					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14766						cf_have_libdir=yes; break
14767					fi
14768				done
14769			fi
14770			if test "$cf_have_libdir" = no ; then
14771				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
14772
14773echo "${as_me:-configure}:14773: testing adding $cf_add_libdir to library-path ..." 1>&5
14774
14775				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14776			fi
14777		fi
14778	done
14779fi
14780
14781		fi
14782		;;
14783	(*)
14784
14785if test -n "/lib" ; then
14786	for cf_add_libdir in /lib
14787	do
14788		if test "$cf_add_libdir" = /usr/lib ; then
14789			:
14790		elif test -d "$cf_add_libdir"
14791		then
14792			cf_have_libdir=no
14793			if test -n "$LDFLAGS$LIBS" ; then
14794				# a loop is needed to ensure we can add subdirs of existing dirs
14795				for cf_test_libdir in $LDFLAGS $LIBS ; do
14796					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14797						cf_have_libdir=yes; break
14798					fi
14799				done
14800			fi
14801			if test "$cf_have_libdir" = no ; then
14802				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
14803
14804echo "${as_me:-configure}:14804: testing adding $cf_add_libdir to library-path ..." 1>&5
14805
14806				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14807			fi
14808		fi
14809	done
14810fi
14811
14812		;;
14813	esac
14814	;;
14815(sunos3*|sunos4*)
14816	if test "x$cf_cv_screen" = "xcurses_5lib"
14817	then
14818		if test -d /usr/5lib ; then
14819
14820if test -n "/usr/5lib" ; then
14821	for cf_add_libdir in /usr/5lib
14822	do
14823		if test "$cf_add_libdir" = /usr/lib ; then
14824			:
14825		elif test -d "$cf_add_libdir"
14826		then
14827			cf_have_libdir=no
14828			if test -n "$LDFLAGS$LIBS" ; then
14829				# a loop is needed to ensure we can add subdirs of existing dirs
14830				for cf_test_libdir in $LDFLAGS $LIBS ; do
14831					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14832						cf_have_libdir=yes; break
14833					fi
14834				done
14835			fi
14836			if test "$cf_have_libdir" = no ; then
14837				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
14838
14839echo "${as_me:-configure}:14839: testing adding $cf_add_libdir to library-path ..." 1>&5
14840
14841				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14842			fi
14843		fi
14844	done
14845fi
14846
14847cf_add_libs="$LIBS"
14848# reverse order
14849cf_add_0lib=
14850for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14851# filter duplicates
14852for cf_add_1lib in $cf_add_0lib; do
14853	for cf_add_2lib in $cf_add_libs; do
14854		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14855			cf_add_1lib=
14856			break
14857		fi
14858	done
14859	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14860done
14861LIBS="$cf_add_libs"
14862
14863		fi
14864	fi
14865	ac_cv_func_initscr=yes
14866	;;
14867esac
14868
14869if test ".$ac_cv_func_initscr" != .yes ; then
14870	cf_save_LIBS="$LIBS"
14871
14872	if test ".${cf_cv_ncurses_version:-no}" != .no
14873	then
14874		cf_check_list="ncurses curses cursesX"
14875	else
14876		cf_check_list="cursesX curses ncurses"
14877	fi
14878
14879	# Check for library containing tgoto.  Do this before curses library
14880	# because it may be needed to link the test-case for initscr.
14881	if test "x$cf_term_lib" = x
14882	then
14883		echo "$as_me:14883: checking for tgoto" >&5
14884echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
14885if test "${ac_cv_func_tgoto+set}" = set; then
14886  echo $ECHO_N "(cached) $ECHO_C" >&6
14887else
14888  cat >"conftest.$ac_ext" <<_ACEOF
14889#line 14889 "configure"
14890#include "confdefs.h"
14891#define tgoto autoconf_temporary
14892#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
14893#undef tgoto
14894
14895#ifdef __cplusplus
14896extern "C"
14897#endif
14898
14899/* We use char because int might match the return type of a gcc2
14900   builtin and then its argument prototype would still apply.  */
14901char tgoto (void);
14902
14903int
14904main (void)
14905{
14906
14907/* The GNU C library defines stubs for functions which it implements
14908    to always fail with ENOSYS.  Some functions are actually named
14909    something starting with __ and the normal name is an alias.  */
14910#if defined (__stub_tgoto) || defined (__stub___tgoto)
14911#error found stub for tgoto
14912#endif
14913
14914	return tgoto ();
14915  ;
14916  return 0;
14917}
14918_ACEOF
14919rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14920if { (eval echo "$as_me:14920: \"$ac_link\"") >&5
14921  (eval $ac_link) 2>&5
14922  ac_status=$?
14923  echo "$as_me:14923: \$? = $ac_status" >&5
14924  (exit "$ac_status"); } &&
14925         { ac_try='test -s "conftest$ac_exeext"'
14926  { (eval echo "$as_me:14926: \"$ac_try\"") >&5
14927  (eval $ac_try) 2>&5
14928  ac_status=$?
14929  echo "$as_me:14929: \$? = $ac_status" >&5
14930  (exit "$ac_status"); }; }; then
14931  ac_cv_func_tgoto=yes
14932else
14933  echo "$as_me: failed program was:" >&5
14934cat "conftest.$ac_ext" >&5
14935ac_cv_func_tgoto=no
14936fi
14937rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14938fi
14939echo "$as_me:14939: result: $ac_cv_func_tgoto" >&5
14940echo "${ECHO_T}$ac_cv_func_tgoto" >&6
14941if test "$ac_cv_func_tgoto" = yes; then
14942  cf_term_lib=predefined
14943else
14944
14945			for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
14946			do
14947				as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
14948echo "$as_me:14948: checking for tgoto in -l$cf_term_lib" >&5
14949echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
14950if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14951  echo $ECHO_N "(cached) $ECHO_C" >&6
14952else
14953  ac_check_lib_save_LIBS=$LIBS
14954LIBS="-l$cf_term_lib  $LIBS"
14955cat >"conftest.$ac_ext" <<_ACEOF
14956#line 14956 "configure"
14957#include "confdefs.h"
14958
14959/* Override any gcc2 internal prototype to avoid an error.  */
14960#ifdef __cplusplus
14961extern "C"
14962#endif
14963/* We use char because int might match the return type of a gcc2
14964   builtin and then its argument prototype would still apply.  */
14965char tgoto ();
14966int
14967main (void)
14968{
14969tgoto ();
14970  ;
14971  return 0;
14972}
14973_ACEOF
14974rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14975if { (eval echo "$as_me:14975: \"$ac_link\"") >&5
14976  (eval $ac_link) 2>&5
14977  ac_status=$?
14978  echo "$as_me:14978: \$? = $ac_status" >&5
14979  (exit "$ac_status"); } &&
14980         { ac_try='test -s "conftest$ac_exeext"'
14981  { (eval echo "$as_me:14981: \"$ac_try\"") >&5
14982  (eval $ac_try) 2>&5
14983  ac_status=$?
14984  echo "$as_me:14984: \$? = $ac_status" >&5
14985  (exit "$ac_status"); }; }; then
14986  eval "$as_ac_Lib=yes"
14987else
14988  echo "$as_me: failed program was:" >&5
14989cat "conftest.$ac_ext" >&5
14990eval "$as_ac_Lib=no"
14991fi
14992rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14993LIBS=$ac_check_lib_save_LIBS
14994fi
14995echo "$as_me:14995: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
14996echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
14997if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
14998
14999					: "${cf_nculib_root:=$cf_term_lib}"
15000					break
15001
15002fi
15003
15004			done
15005
15006fi
15007
15008	fi
15009
15010	# Check for library containing initscr
15011	test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
15012	if test "x$cf_curs_lib" = x
15013	then
15014		for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
15015		do
15016			LIBS="-l$cf_curs_lib $cf_save_LIBS"
15017			if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
15018				echo "$as_me:15018: checking if we can link with $cf_curs_lib library" >&5
15019echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
15020				cat >"conftest.$ac_ext" <<_ACEOF
15021#line 15021 "configure"
15022#include "confdefs.h"
15023#include <${cf_cv_ncurses_header:-curses.h}>
15024int
15025main (void)
15026{
15027initscr()
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  cf_result=yes
15045else
15046  echo "$as_me: failed program was:" >&5
15047cat "conftest.$ac_ext" >&5
15048cf_result=no
15049fi
15050rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15051				echo "$as_me:15051: result: $cf_result" >&5
15052echo "${ECHO_T}$cf_result" >&6
15053				test "$cf_result" = yes && break
15054			elif test "$cf_curs_lib" = "$cf_term_lib" ; then
15055				cf_result=no
15056			elif test "$cf_term_lib" != predefined ; then
15057				echo "$as_me:15057: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
15058echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
15059				cat >"conftest.$ac_ext" <<_ACEOF
15060#line 15060 "configure"
15061#include "confdefs.h"
15062#include <${cf_cv_ncurses_header:-curses.h}>
15063int
15064main (void)
15065{
15066initscr(); tgoto((char *)0, 0, 0);
15067  ;
15068  return 0;
15069}
15070_ACEOF
15071rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15072if { (eval echo "$as_me:15072: \"$ac_link\"") >&5
15073  (eval $ac_link) 2>&5
15074  ac_status=$?
15075  echo "$as_me:15075: \$? = $ac_status" >&5
15076  (exit "$ac_status"); } &&
15077         { ac_try='test -s "conftest$ac_exeext"'
15078  { (eval echo "$as_me:15078: \"$ac_try\"") >&5
15079  (eval $ac_try) 2>&5
15080  ac_status=$?
15081  echo "$as_me:15081: \$? = $ac_status" >&5
15082  (exit "$ac_status"); }; }; then
15083  cf_result=no
15084else
15085  echo "$as_me: failed program was:" >&5
15086cat "conftest.$ac_ext" >&5
15087
15088					LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
15089					cat >"conftest.$ac_ext" <<_ACEOF
15090#line 15090 "configure"
15091#include "confdefs.h"
15092#include <${cf_cv_ncurses_header:-curses.h}>
15093int
15094main (void)
15095{
15096initscr()
15097  ;
15098  return 0;
15099}
15100_ACEOF
15101rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15102if { (eval echo "$as_me:15102: \"$ac_link\"") >&5
15103  (eval $ac_link) 2>&5
15104  ac_status=$?
15105  echo "$as_me:15105: \$? = $ac_status" >&5
15106  (exit "$ac_status"); } &&
15107         { ac_try='test -s "conftest$ac_exeext"'
15108  { (eval echo "$as_me:15108: \"$ac_try\"") >&5
15109  (eval $ac_try) 2>&5
15110  ac_status=$?
15111  echo "$as_me:15111: \$? = $ac_status" >&5
15112  (exit "$ac_status"); }; }; then
15113  cf_result=yes
15114else
15115  echo "$as_me: failed program was:" >&5
15116cat "conftest.$ac_ext" >&5
15117cf_result=error
15118fi
15119rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15120
15121fi
15122rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15123				echo "$as_me:15123: result: $cf_result" >&5
15124echo "${ECHO_T}$cf_result" >&6
15125				test "$cf_result" != error && break
15126			fi
15127		done
15128	fi
15129	test "$cf_curs_lib" = unknown && { { echo "$as_me:15129: error: no curses library found" >&5
15130echo "$as_me: error: no curses library found" >&2;}
15131   { (exit 1); exit 1; }; }
15132fi
15133fi
15134
15135	;;
15136(ncursesw*)
15137
15138echo "$as_me:15138: checking for multibyte character support" >&5
15139echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
15140if test "${cf_cv_utf8_lib+set}" = set; then
15141  echo $ECHO_N "(cached) $ECHO_C" >&6
15142else
15143
15144	cf_save_LIBS="$LIBS"
15145	cat >"conftest.$ac_ext" <<_ACEOF
15146#line 15146 "configure"
15147#include "confdefs.h"
15148
15149#include <stdlib.h>
15150int
15151main (void)
15152{
15153putwc(0,0);
15154  ;
15155  return 0;
15156}
15157_ACEOF
15158rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15159if { (eval echo "$as_me:15159: \"$ac_link\"") >&5
15160  (eval $ac_link) 2>&5
15161  ac_status=$?
15162  echo "$as_me:15162: \$? = $ac_status" >&5
15163  (exit "$ac_status"); } &&
15164         { ac_try='test -s "conftest$ac_exeext"'
15165  { (eval echo "$as_me:15165: \"$ac_try\"") >&5
15166  (eval $ac_try) 2>&5
15167  ac_status=$?
15168  echo "$as_me:15168: \$? = $ac_status" >&5
15169  (exit "$ac_status"); }; }; then
15170  cf_cv_utf8_lib=yes
15171else
15172  echo "$as_me: failed program was:" >&5
15173cat "conftest.$ac_ext" >&5
15174
15175# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
15176# will be set on completion of the AC_TRY_LINK below.
15177cf_cv_header_path_utf8=
15178cf_cv_library_path_utf8=
15179
15180echo "${as_me:-configure}:15180: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
15181
15182cf_save_LIBS="$LIBS"
15183
15184cat >"conftest.$ac_ext" <<_ACEOF
15185#line 15185 "configure"
15186#include "confdefs.h"
15187
15188#include <libutf8.h>
15189int
15190main (void)
15191{
15192putwc(0,0);
15193  ;
15194  return 0;
15195}
15196_ACEOF
15197rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15198if { (eval echo "$as_me:15198: \"$ac_link\"") >&5
15199  (eval $ac_link) 2>&5
15200  ac_status=$?
15201  echo "$as_me:15201: \$? = $ac_status" >&5
15202  (exit "$ac_status"); } &&
15203         { ac_try='test -s "conftest$ac_exeext"'
15204  { (eval echo "$as_me:15204: \"$ac_try\"") >&5
15205  (eval $ac_try) 2>&5
15206  ac_status=$?
15207  echo "$as_me:15207: \$? = $ac_status" >&5
15208  (exit "$ac_status"); }; }; then
15209
15210	cf_cv_find_linkage_utf8=yes
15211	cf_cv_header_path_utf8=/usr/include
15212	cf_cv_library_path_utf8=/usr/lib
15213
15214else
15215  echo "$as_me: failed program was:" >&5
15216cat "conftest.$ac_ext" >&5
15217
15218LIBS="-lutf8  $cf_save_LIBS"
15219
15220cat >"conftest.$ac_ext" <<_ACEOF
15221#line 15221 "configure"
15222#include "confdefs.h"
15223
15224#include <libutf8.h>
15225int
15226main (void)
15227{
15228putwc(0,0);
15229  ;
15230  return 0;
15231}
15232_ACEOF
15233rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15234if { (eval echo "$as_me:15234: \"$ac_link\"") >&5
15235  (eval $ac_link) 2>&5
15236  ac_status=$?
15237  echo "$as_me:15237: \$? = $ac_status" >&5
15238  (exit "$ac_status"); } &&
15239         { ac_try='test -s "conftest$ac_exeext"'
15240  { (eval echo "$as_me:15240: \"$ac_try\"") >&5
15241  (eval $ac_try) 2>&5
15242  ac_status=$?
15243  echo "$as_me:15243: \$? = $ac_status" >&5
15244  (exit "$ac_status"); }; }; then
15245
15246	cf_cv_find_linkage_utf8=yes
15247	cf_cv_header_path_utf8=/usr/include
15248	cf_cv_library_path_utf8=/usr/lib
15249	cf_cv_library_file_utf8="-lutf8"
15250
15251else
15252  echo "$as_me: failed program was:" >&5
15253cat "conftest.$ac_ext" >&5
15254
15255	cf_cv_find_linkage_utf8=no
15256	LIBS="$cf_save_LIBS"
15257
15258	test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6
15259
15260echo "${as_me:-configure}:15260: testing find linkage for utf8 library ..." 1>&5
15261
15262echo "${as_me:-configure}:15262: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
15263
15264	cf_save_CPPFLAGS="$CPPFLAGS"
15265	cf_test_CPPFLAGS="$CPPFLAGS"
15266
15267cf_search=
15268
15269# collect the current set of include-directories from compiler flags
15270cf_header_path_list=""
15271if test -n "${CFLAGS}${CPPFLAGS}" ; then
15272	for cf_header_path in $CPPFLAGS $CFLAGS
15273	do
15274		case "$cf_header_path" in
15275		(-I*)
15276			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
15277
15278test "x$cf_header_path" != "xNONE" && \
15279test -d "$cf_header_path" && \
15280 {
15281	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
15282	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
15283	test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
15284	test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
15285	test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
15286	test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
15287}
15288
15289			cf_header_path_list="$cf_header_path_list $cf_search"
15290			;;
15291		esac
15292	done
15293fi
15294
15295# add the variations for the package we are looking for
15296
15297cf_search=
15298
15299test "x$prefix" != "xNONE" && \
15300test -d "$prefix" && \
15301 {
15302	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
15303	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
15304	test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
15305	test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
15306	test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
15307	test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
15308}
15309
15310for cf_subdir_prefix in \
15311	/usr \
15312	/usr/local \
15313	/usr/pkg \
15314	/opt \
15315	/opt/local \
15316	$HOME
15317do
15318
15319test "x$cf_subdir_prefix" != "x$prefix" && \
15320test -d "$cf_subdir_prefix" && \
15321{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
15322	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
15323	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
15324	test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
15325	test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
15326	test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
15327	test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
15328}
15329
15330done
15331
15332test "$includedir" != NONE && \
15333test "$includedir" != "/usr/include" && \
15334test -d "$includedir" && {
15335	test -d "$includedir" &&    cf_search="$cf_search $includedir"
15336	test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
15337}
15338
15339test "$oldincludedir" != NONE && \
15340test "$oldincludedir" != "/usr/include" && \
15341test -d "$oldincludedir" && {
15342	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
15343	test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
15344}
15345
15346cf_search="$cf_search $cf_header_path_list"
15347
15348	for cf_cv_header_path_utf8 in $cf_search
15349	do
15350		if test -d "$cf_cv_header_path_utf8" ; then
15351			test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6
15352
15353echo "${as_me:-configure}:15353: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
15354
15355			CPPFLAGS="$cf_save_CPPFLAGS"
15356
15357	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15358	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
15359
15360			cat >"conftest.$ac_ext" <<_ACEOF
15361#line 15361 "configure"
15362#include "confdefs.h"
15363
15364#include <libutf8.h>
15365int
15366main (void)
15367{
15368putwc(0,0);
15369  ;
15370  return 0;
15371}
15372_ACEOF
15373rm -f "conftest.$ac_objext"
15374if { (eval echo "$as_me:15374: \"$ac_compile\"") >&5
15375  (eval $ac_compile) 2>&5
15376  ac_status=$?
15377  echo "$as_me:15377: \$? = $ac_status" >&5
15378  (exit "$ac_status"); } &&
15379         { ac_try='test -s "conftest.$ac_objext"'
15380  { (eval echo "$as_me:15380: \"$ac_try\"") >&5
15381  (eval $ac_try) 2>&5
15382  ac_status=$?
15383  echo "$as_me:15383: \$? = $ac_status" >&5
15384  (exit "$ac_status"); }; }; then
15385
15386				test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
15387
15388echo "${as_me:-configure}:15388: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
15389
15390				cf_cv_find_linkage_utf8=maybe
15391				cf_test_CPPFLAGS="$CPPFLAGS"
15392				break
15393else
15394  echo "$as_me: failed program was:" >&5
15395cat "conftest.$ac_ext" >&5
15396
15397				CPPFLAGS="$cf_save_CPPFLAGS"
15398
15399fi
15400rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15401		fi
15402	done
15403
15404	if test "$cf_cv_find_linkage_utf8" = maybe ; then
15405
15406echo "${as_me:-configure}:15406: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
15407
15408		cf_save_LIBS="$LIBS"
15409		cf_save_LDFLAGS="$LDFLAGS"
15410
15411		if test "$cf_cv_find_linkage_utf8" != yes ; then
15412
15413cf_search=
15414cf_library_path_list=""
15415if test -n "${LDFLAGS}${LIBS}" ; then
15416	for cf_library_path in $LDFLAGS $LIBS
15417	do
15418		case "$cf_library_path" in
15419		(-L*)
15420			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
15421
15422test "x$cf_library_path" != "xNONE" && \
15423test -d "$cf_library_path" && \
15424 {
15425	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
15426	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
15427	test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
15428	test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
15429	test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
15430	test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
15431}
15432
15433			cf_library_path_list="$cf_library_path_list $cf_search"
15434			;;
15435		esac
15436	done
15437fi
15438
15439cf_search=
15440
15441test "x$prefix" != "xNONE" && \
15442test -d "$prefix" && \
15443 {
15444	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
15445	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
15446	test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
15447	test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
15448	test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
15449	test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
15450}
15451
15452for cf_subdir_prefix in \
15453	/usr \
15454	/usr/local \
15455	/usr/pkg \
15456	/opt \
15457	/opt/local \
15458	$HOME
15459do
15460
15461test "x$cf_subdir_prefix" != "x$prefix" && \
15462test -d "$cf_subdir_prefix" && \
15463{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
15464	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
15465	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
15466	test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
15467	test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
15468	test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
15469	test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
15470}
15471
15472done
15473
15474cf_search="$cf_library_path_list $cf_search"
15475
15476			for cf_cv_library_path_utf8 in $cf_search
15477			do
15478				if test -d "$cf_cv_library_path_utf8" ; then
15479					test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6
15480
15481echo "${as_me:-configure}:15481: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
15482
15483					CPPFLAGS="$cf_test_CPPFLAGS"
15484					LIBS="-lutf8  $cf_save_LIBS"
15485					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
15486					cat >"conftest.$ac_ext" <<_ACEOF
15487#line 15487 "configure"
15488#include "confdefs.h"
15489
15490#include <libutf8.h>
15491int
15492main (void)
15493{
15494putwc(0,0);
15495  ;
15496  return 0;
15497}
15498_ACEOF
15499rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15500if { (eval echo "$as_me:15500: \"$ac_link\"") >&5
15501  (eval $ac_link) 2>&5
15502  ac_status=$?
15503  echo "$as_me:15503: \$? = $ac_status" >&5
15504  (exit "$ac_status"); } &&
15505         { ac_try='test -s "conftest$ac_exeext"'
15506  { (eval echo "$as_me:15506: \"$ac_try\"") >&5
15507  (eval $ac_try) 2>&5
15508  ac_status=$?
15509  echo "$as_me:15509: \$? = $ac_status" >&5
15510  (exit "$ac_status"); }; }; then
15511
15512					test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6
15513
15514echo "${as_me:-configure}:15514: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
15515
15516					cf_cv_find_linkage_utf8=yes
15517					cf_cv_library_file_utf8="-lutf8"
15518					break
15519else
15520  echo "$as_me: failed program was:" >&5
15521cat "conftest.$ac_ext" >&5
15522
15523					CPPFLAGS="$cf_save_CPPFLAGS"
15524					LIBS="$cf_save_LIBS"
15525					LDFLAGS="$cf_save_LDFLAGS"
15526
15527fi
15528rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15529				fi
15530			done
15531			CPPFLAGS="$cf_save_CPPFLAGS"
15532			LDFLAGS="$cf_save_LDFLAGS"
15533		fi
15534
15535	else
15536		cf_cv_find_linkage_utf8=no
15537	fi
15538
15539fi
15540rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15541
15542fi
15543rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15544
15545LIBS="$cf_save_LIBS"
15546
15547if test "$cf_cv_find_linkage_utf8" = yes ; then
15548cf_cv_utf8_lib=add-on
15549else
15550cf_cv_utf8_lib=no
15551fi
15552
15553fi
15554rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15555fi
15556echo "$as_me:15556: result: $cf_cv_utf8_lib" >&5
15557echo "${ECHO_T}$cf_cv_utf8_lib" >&6
15558
15559# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
15560# ncurses/ncursesw:
15561if test "$cf_cv_utf8_lib" = "add-on" ; then
15562
15563cat >>confdefs.h <<\EOF
15564#define HAVE_LIBUTF8_H 1
15565EOF
15566
15567if test -n "$cf_cv_header_path_utf8" ; then
15568  for cf_add_incdir in $cf_cv_header_path_utf8
15569  do
15570	while test "$cf_add_incdir" != /usr/include
15571	do
15572	  if test -d "$cf_add_incdir"
15573	  then
15574		cf_have_incdir=no
15575		if test -n "$CFLAGS$CPPFLAGS" ; then
15576		  # a loop is needed to ensure we can add subdirs of existing dirs
15577		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15578			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15579			  cf_have_incdir=yes; break
15580			fi
15581		  done
15582		fi
15583
15584		if test "$cf_have_incdir" = no ; then
15585		  if test "$cf_add_incdir" = /usr/local/include ; then
15586			if test "$GCC" = yes
15587			then
15588			  cf_save_CPPFLAGS=$CPPFLAGS
15589
15590	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15591	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
15592
15593			  cat >"conftest.$ac_ext" <<_ACEOF
15594#line 15594 "configure"
15595#include "confdefs.h"
15596#include <stdio.h>
15597int
15598main (void)
15599{
15600printf("Hello")
15601  ;
15602  return 0;
15603}
15604_ACEOF
15605rm -f "conftest.$ac_objext"
15606if { (eval echo "$as_me:15606: \"$ac_compile\"") >&5
15607  (eval $ac_compile) 2>&5
15608  ac_status=$?
15609  echo "$as_me:15609: \$? = $ac_status" >&5
15610  (exit "$ac_status"); } &&
15611         { ac_try='test -s "conftest.$ac_objext"'
15612  { (eval echo "$as_me:15612: \"$ac_try\"") >&5
15613  (eval $ac_try) 2>&5
15614  ac_status=$?
15615  echo "$as_me:15615: \$? = $ac_status" >&5
15616  (exit "$ac_status"); }; }; then
15617  :
15618else
15619  echo "$as_me: failed program was:" >&5
15620cat "conftest.$ac_ext" >&5
15621cf_have_incdir=yes
15622fi
15623rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15624			  CPPFLAGS=$cf_save_CPPFLAGS
15625			fi
15626		  fi
15627		fi
15628
15629		if test "$cf_have_incdir" = no ; then
15630		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
15631
15632echo "${as_me:-configure}:15632: testing adding $cf_add_incdir to include-path ..." 1>&5
15633
15634		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15635
15636		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
15637		  test "$cf_top_incdir" = "$cf_add_incdir" && break
15638		  cf_add_incdir="$cf_top_incdir"
15639		else
15640		  break
15641		fi
15642	  else
15643		break
15644	  fi
15645	done
15646  done
15647fi
15648
15649if test -n "$cf_cv_library_path_utf8" ; then
15650	for cf_add_libdir in $cf_cv_library_path_utf8
15651	do
15652		if test "$cf_add_libdir" = /usr/lib ; then
15653			:
15654		elif test -d "$cf_add_libdir"
15655		then
15656			cf_have_libdir=no
15657			if test -n "$LDFLAGS$LIBS" ; then
15658				# a loop is needed to ensure we can add subdirs of existing dirs
15659				for cf_test_libdir in $LDFLAGS $LIBS ; do
15660					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
15661						cf_have_libdir=yes; break
15662					fi
15663				done
15664			fi
15665			if test "$cf_have_libdir" = no ; then
15666				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
15667
15668echo "${as_me:-configure}:15668: testing adding $cf_add_libdir to library-path ..." 1>&5
15669
15670				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
15671			fi
15672		fi
15673	done
15674fi
15675
15676cf_add_libs="$LIBS"
15677# reverse order
15678cf_add_0lib=
15679for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15680# filter duplicates
15681for cf_add_1lib in $cf_add_0lib; do
15682	for cf_add_2lib in $cf_add_libs; do
15683		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15684			cf_add_1lib=
15685			break
15686		fi
15687	done
15688	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15689done
15690LIBS="$cf_add_libs"
15691
15692fi
15693
15694cf_ncuconfig_root=$cf_cv_screen
15695cf_have_ncuconfig=no
15696
15697if test "x${PKG_CONFIG:=none}" != xnone; then
15698	echo "$as_me:15698: checking pkg-config for $cf_ncuconfig_root" >&5
15699echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
15700	if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
15701		echo "$as_me:15701: result: yes" >&5
15702echo "${ECHO_T}yes" >&6
15703
15704		echo "$as_me:15704: checking if the $cf_ncuconfig_root package files work" >&5
15705echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
15706		cf_have_ncuconfig=unknown
15707
15708		cf_save_CFLAGS="$CFLAGS"
15709		cf_save_CPPFLAGS="$CPPFLAGS"
15710		cf_save_LIBS="$LIBS"
15711
15712		cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
15713		cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
15714
15715		# while -W for passing linker flags is prevalent, it is not "standard".
15716		# At least one wrapper for c89/c99 (in Apple's xcode) has its own
15717		# incompatible _and_ non-standard -W option which gives an error.  Work
15718		# around that pitfall.
15719		case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
15720		(x*c[89]9@@*-W*)
15721
15722cf_fix_cppflags=no
15723cf_new_cflags=
15724cf_new_cppflags=
15725cf_new_extra_cppflags=
15726
15727for cf_add_cflags in $cf_pkg_cflags
15728do
15729case "$cf_fix_cppflags" in
15730(no)
15731	case "$cf_add_cflags" in
15732	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15733		case "$cf_add_cflags" in
15734		(-D*)
15735			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15736
15737			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15738				&& test -z "${cf_tst_cflags}" \
15739				&& cf_fix_cppflags=yes
15740
15741			if test "$cf_fix_cppflags" = yes ; then
15742
15743	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15744	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15745
15746				continue
15747			elif test "${cf_tst_cflags}" = "\"'" ; then
15748
15749	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15750	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15751
15752				continue
15753			fi
15754			;;
15755		esac
15756		case "$CPPFLAGS" in
15757		(*$cf_add_cflags)
15758			;;
15759		(*)
15760			case "$cf_add_cflags" in
15761			(-D*)
15762				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15763
15764CPPFLAGS=`echo "$CPPFLAGS" | \
15765	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
15766		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
15767
15768				;;
15769			esac
15770
15771	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15772	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15773
15774			;;
15775		esac
15776		;;
15777	(*)
15778
15779	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15780	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15781
15782		;;
15783	esac
15784	;;
15785(yes)
15786
15787	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15788	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15789
15790	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15791
15792	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15793		&& test -z "${cf_tst_cflags}" \
15794		&& cf_fix_cppflags=no
15795	;;
15796esac
15797done
15798
15799if test -n "$cf_new_cflags" ; then
15800
15801	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15802	CFLAGS="${CFLAGS}$cf_new_cflags"
15803
15804fi
15805
15806if test -n "$cf_new_cppflags" ; then
15807
15808	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15809	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15810
15811fi
15812
15813if test -n "$cf_new_extra_cppflags" ; then
15814
15815	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15816	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15817
15818fi
15819
15820cf_add_libs="$LIBS"
15821# reverse order
15822cf_add_0lib=
15823for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15824# filter duplicates
15825for cf_add_1lib in $cf_add_0lib; do
15826	for cf_add_2lib in $cf_add_libs; do
15827		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15828			cf_add_1lib=
15829			break
15830		fi
15831	done
15832	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15833done
15834LIBS="$cf_add_libs"
15835
15836			cat >"conftest.$ac_ext" <<_ACEOF
15837#line 15837 "configure"
15838#include "confdefs.h"
15839#include <${cf_cv_ncurses_header:-curses.h}>
15840int
15841main (void)
15842{
15843initscr(); mousemask(0,0); tigetstr((char *)0);
15844  ;
15845  return 0;
15846}
15847_ACEOF
15848rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15849if { (eval echo "$as_me:15849: \"$ac_link\"") >&5
15850  (eval $ac_link) 2>&5
15851  ac_status=$?
15852  echo "$as_me:15852: \$? = $ac_status" >&5
15853  (exit "$ac_status"); } &&
15854         { ac_try='test -s "conftest$ac_exeext"'
15855  { (eval echo "$as_me:15855: \"$ac_try\"") >&5
15856  (eval $ac_try) 2>&5
15857  ac_status=$?
15858  echo "$as_me:15858: \$? = $ac_status" >&5
15859  (exit "$ac_status"); }; }; then
15860  if test "$cross_compiling" = yes; then
15861  cf_test_ncuconfig=maybe
15862else
15863  cat >"conftest.$ac_ext" <<_ACEOF
15864#line 15864 "configure"
15865#include "confdefs.h"
15866#include <${cf_cv_ncurses_header:-curses.h}>
15867					int main(void)
15868					{ char *xx = curses_version(); return (xx == 0); }
15869_ACEOF
15870rm -f "conftest$ac_exeext"
15871if { (eval echo "$as_me:15871: \"$ac_link\"") >&5
15872  (eval $ac_link) 2>&5
15873  ac_status=$?
15874  echo "$as_me:15874: \$? = $ac_status" >&5
15875  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15876  { (eval echo "$as_me:15876: \"$ac_try\"") >&5
15877  (eval $ac_try) 2>&5
15878  ac_status=$?
15879  echo "$as_me:15879: \$? = $ac_status" >&5
15880  (exit "$ac_status"); }; }; then
15881  cf_test_ncuconfig=yes
15882else
15883  echo "$as_me: program exited with status $ac_status" >&5
15884echo "$as_me: failed program was:" >&5
15885cat "conftest.$ac_ext" >&5
15886cf_test_ncuconfig=no
15887fi
15888rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15889fi
15890else
15891  echo "$as_me: failed program was:" >&5
15892cat "conftest.$ac_ext" >&5
15893cf_test_ncuconfig=no
15894fi
15895rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15896
15897			CFLAGS="$cf_save_CFLAGS"
15898			CPPFLAGS="$cf_save_CPPFLAGS"
15899			LIBS="$cf_save_LIBS"
15900
15901			if test "x$cf_test_ncuconfig" != xyes; then
15902				cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
15903				cf_pkg_cflags="$cf_temp"
15904				cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
15905				cf_pkg_libs="$cf_temp"
15906			fi
15907			;;
15908		esac
15909
15910cf_fix_cppflags=no
15911cf_new_cflags=
15912cf_new_cppflags=
15913cf_new_extra_cppflags=
15914
15915for cf_add_cflags in $cf_pkg_cflags
15916do
15917case "$cf_fix_cppflags" in
15918(no)
15919	case "$cf_add_cflags" in
15920	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15921		case "$cf_add_cflags" in
15922		(-D*)
15923			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15924
15925			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15926				&& test -z "${cf_tst_cflags}" \
15927				&& cf_fix_cppflags=yes
15928
15929			if test "$cf_fix_cppflags" = yes ; then
15930
15931	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15932	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15933
15934				continue
15935			elif test "${cf_tst_cflags}" = "\"'" ; then
15936
15937	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15938	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15939
15940				continue
15941			fi
15942			;;
15943		esac
15944		case "$CPPFLAGS" in
15945		(*$cf_add_cflags)
15946			;;
15947		(*)
15948			case "$cf_add_cflags" in
15949			(-D*)
15950				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15951
15952CPPFLAGS=`echo "$CPPFLAGS" | \
15953	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
15954		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
15955
15956				;;
15957			esac
15958
15959	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15960	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15961
15962			;;
15963		esac
15964		;;
15965	(*)
15966
15967	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15968	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15969
15970		;;
15971	esac
15972	;;
15973(yes)
15974
15975	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15976	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15977
15978	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15979
15980	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15981		&& test -z "${cf_tst_cflags}" \
15982		&& cf_fix_cppflags=no
15983	;;
15984esac
15985done
15986
15987if test -n "$cf_new_cflags" ; then
15988
15989	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15990	CFLAGS="${CFLAGS}$cf_new_cflags"
15991
15992fi
15993
15994if test -n "$cf_new_cppflags" ; then
15995
15996	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15997	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15998
15999fi
16000
16001if test -n "$cf_new_extra_cppflags" ; then
16002
16003	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16004	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16005
16006fi
16007
16008cf_add_libs="$LIBS"
16009# reverse order
16010cf_add_0lib=
16011for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16012# filter duplicates
16013for cf_add_1lib in $cf_add_0lib; do
16014	for cf_add_2lib in $cf_add_libs; do
16015		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16016			cf_add_1lib=
16017			break
16018		fi
16019	done
16020	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16021done
16022LIBS="$cf_add_libs"
16023
16024		cat >"conftest.$ac_ext" <<_ACEOF
16025#line 16025 "configure"
16026#include "confdefs.h"
16027#include <${cf_cv_ncurses_header:-curses.h}>
16028int
16029main (void)
16030{
16031initscr(); mousemask(0,0); tigetstr((char *)0);
16032  ;
16033  return 0;
16034}
16035_ACEOF
16036rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16037if { (eval echo "$as_me:16037: \"$ac_link\"") >&5
16038  (eval $ac_link) 2>&5
16039  ac_status=$?
16040  echo "$as_me:16040: \$? = $ac_status" >&5
16041  (exit "$ac_status"); } &&
16042         { ac_try='test -s "conftest$ac_exeext"'
16043  { (eval echo "$as_me:16043: \"$ac_try\"") >&5
16044  (eval $ac_try) 2>&5
16045  ac_status=$?
16046  echo "$as_me:16046: \$? = $ac_status" >&5
16047  (exit "$ac_status"); }; }; then
16048  if test "$cross_compiling" = yes; then
16049  cf_have_ncuconfig=maybe
16050else
16051  cat >"conftest.$ac_ext" <<_ACEOF
16052#line 16052 "configure"
16053#include "confdefs.h"
16054#include <${cf_cv_ncurses_header:-curses.h}>
16055				int main(void)
16056				{ char *xx = curses_version(); return (xx == 0); }
16057_ACEOF
16058rm -f "conftest$ac_exeext"
16059if { (eval echo "$as_me:16059: \"$ac_link\"") >&5
16060  (eval $ac_link) 2>&5
16061  ac_status=$?
16062  echo "$as_me:16062: \$? = $ac_status" >&5
16063  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16064  { (eval echo "$as_me:16064: \"$ac_try\"") >&5
16065  (eval $ac_try) 2>&5
16066  ac_status=$?
16067  echo "$as_me:16067: \$? = $ac_status" >&5
16068  (exit "$ac_status"); }; }; then
16069  cf_have_ncuconfig=yes
16070else
16071  echo "$as_me: program exited with status $ac_status" >&5
16072echo "$as_me: failed program was:" >&5
16073cat "conftest.$ac_ext" >&5
16074cf_have_ncuconfig=no
16075fi
16076rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16077fi
16078else
16079  echo "$as_me: failed program was:" >&5
16080cat "conftest.$ac_ext" >&5
16081cf_have_ncuconfig=no
16082fi
16083rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16084		echo "$as_me:16084: result: $cf_have_ncuconfig" >&5
16085echo "${ECHO_T}$cf_have_ncuconfig" >&6
16086		test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
16087		if test "$cf_have_ncuconfig" != "yes"
16088		then
16089			CPPFLAGS="$cf_save_CPPFLAGS"
16090			LIBS="$cf_save_LIBS"
16091			NCURSES_CONFIG_PKG=none
16092		else
16093
16094cat >>confdefs.h <<\EOF
16095#define NCURSES 1
16096EOF
16097
16098			NCURSES_CONFIG_PKG=$cf_ncuconfig_root
16099
16100echo "$as_me:16100: checking for terminfo header" >&5
16101echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
16102if test "${cf_cv_term_header+set}" = set; then
16103  echo $ECHO_N "(cached) $ECHO_C" >&6
16104else
16105
16106case "${cf_cv_ncurses_header}" in
16107(*/ncurses.h|*/ncursesw.h)
16108	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
16109	;;
16110(*)
16111	cf_term_header=term.h
16112	;;
16113esac
16114
16115for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
16116do
16117cat >"conftest.$ac_ext" <<_ACEOF
16118#line 16118 "configure"
16119#include "confdefs.h"
16120#include <stdio.h>
16121#include <${cf_cv_ncurses_header:-curses.h}>
16122#include <$cf_test>
16123
16124int
16125main (void)
16126{
16127int x = auto_left_margin; (void)x
16128  ;
16129  return 0;
16130}
16131_ACEOF
16132rm -f "conftest.$ac_objext"
16133if { (eval echo "$as_me:16133: \"$ac_compile\"") >&5
16134  (eval $ac_compile) 2>&5
16135  ac_status=$?
16136  echo "$as_me:16136: \$? = $ac_status" >&5
16137  (exit "$ac_status"); } &&
16138         { ac_try='test -s "conftest.$ac_objext"'
16139  { (eval echo "$as_me:16139: \"$ac_try\"") >&5
16140  (eval $ac_try) 2>&5
16141  ac_status=$?
16142  echo "$as_me:16142: \$? = $ac_status" >&5
16143  (exit "$ac_status"); }; }; then
16144
16145	cf_cv_term_header="$cf_test"
16146else
16147  echo "$as_me: failed program was:" >&5
16148cat "conftest.$ac_ext" >&5
16149
16150	cf_cv_term_header=unknown
16151
16152fi
16153rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16154	test "$cf_cv_term_header" != unknown && break
16155done
16156
16157fi
16158echo "$as_me:16158: result: $cf_cv_term_header" >&5
16159echo "${ECHO_T}$cf_cv_term_header" >&6
16160
16161# Set definitions to allow ifdef'ing to accommodate subdirectories
16162
16163case "$cf_cv_term_header" in
16164(*term.h)
16165
16166cat >>confdefs.h <<\EOF
16167#define HAVE_TERM_H 1
16168EOF
16169
16170	;;
16171esac
16172
16173case "$cf_cv_term_header" in
16174(ncurses/term.h)
16175
16176cat >>confdefs.h <<\EOF
16177#define HAVE_NCURSES_TERM_H 1
16178EOF
16179
16180	;;
16181(ncursesw/term.h)
16182
16183cat >>confdefs.h <<\EOF
16184#define HAVE_NCURSESW_TERM_H 1
16185EOF
16186
16187	;;
16188esac
16189
16190		fi
16191
16192	else
16193		echo "$as_me:16193: result: no" >&5
16194echo "${ECHO_T}no" >&6
16195		NCURSES_CONFIG_PKG=none
16196	fi
16197else
16198	NCURSES_CONFIG_PKG=none
16199fi
16200
16201if test "x$cf_have_ncuconfig" = "xno"; then
16202	cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
16203
16204if test -n "$ac_tool_prefix"; then
16205  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
16206  do
16207    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16208set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16209echo "$as_me:16209: checking for $ac_word" >&5
16210echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16211if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
16212  echo $ECHO_N "(cached) $ECHO_C" >&6
16213else
16214  if test -n "$NCURSES_CONFIG"; then
16215  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
16216else
16217  ac_save_IFS=$IFS; IFS=$ac_path_separator
16218ac_dummy="$PATH"
16219for ac_dir in $ac_dummy; do
16220  IFS=$ac_save_IFS
16221  test -z "$ac_dir" && ac_dir=.
16222  $as_executable_p "$ac_dir/$ac_word" || continue
16223ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
16224echo "$as_me:16224: found $ac_dir/$ac_word" >&5
16225break
16226done
16227
16228fi
16229fi
16230NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
16231if test -n "$NCURSES_CONFIG"; then
16232  echo "$as_me:16232: result: $NCURSES_CONFIG" >&5
16233echo "${ECHO_T}$NCURSES_CONFIG" >&6
16234else
16235  echo "$as_me:16235: result: no" >&5
16236echo "${ECHO_T}no" >&6
16237fi
16238
16239    test -n "$NCURSES_CONFIG" && break
16240  done
16241fi
16242if test -z "$NCURSES_CONFIG"; then
16243  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
16244  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
16245do
16246  # Extract the first word of "$ac_prog", so it can be a program name with args.
16247set dummy $ac_prog; ac_word=$2
16248echo "$as_me:16248: checking for $ac_word" >&5
16249echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16250if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
16251  echo $ECHO_N "(cached) $ECHO_C" >&6
16252else
16253  if test -n "$ac_ct_NCURSES_CONFIG"; then
16254  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
16255else
16256  ac_save_IFS=$IFS; IFS=$ac_path_separator
16257ac_dummy="$PATH"
16258for ac_dir in $ac_dummy; do
16259  IFS=$ac_save_IFS
16260  test -z "$ac_dir" && ac_dir=.
16261  $as_executable_p "$ac_dir/$ac_word" || continue
16262ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
16263echo "$as_me:16263: found $ac_dir/$ac_word" >&5
16264break
16265done
16266
16267fi
16268fi
16269ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
16270if test -n "$ac_ct_NCURSES_CONFIG"; then
16271  echo "$as_me:16271: result: $ac_ct_NCURSES_CONFIG" >&5
16272echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
16273else
16274  echo "$as_me:16274: result: no" >&5
16275echo "${ECHO_T}no" >&6
16276fi
16277
16278  test -n "$ac_ct_NCURSES_CONFIG" && break
16279done
16280test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
16281
16282  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
16283fi
16284
16285	if test "$NCURSES_CONFIG" != none ; then
16286
16287cf_fix_cppflags=no
16288cf_new_cflags=
16289cf_new_cppflags=
16290cf_new_extra_cppflags=
16291
16292for cf_add_cflags in `$NCURSES_CONFIG --cflags`
16293do
16294case "$cf_fix_cppflags" in
16295(no)
16296	case "$cf_add_cflags" in
16297	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16298		case "$cf_add_cflags" in
16299		(-D*)
16300			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16301
16302			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16303				&& test -z "${cf_tst_cflags}" \
16304				&& cf_fix_cppflags=yes
16305
16306			if test "$cf_fix_cppflags" = yes ; then
16307
16308	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16309	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16310
16311				continue
16312			elif test "${cf_tst_cflags}" = "\"'" ; then
16313
16314	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16315	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16316
16317				continue
16318			fi
16319			;;
16320		esac
16321		case "$CPPFLAGS" in
16322		(*$cf_add_cflags)
16323			;;
16324		(*)
16325			case "$cf_add_cflags" in
16326			(-D*)
16327				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16328
16329CPPFLAGS=`echo "$CPPFLAGS" | \
16330	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16331		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16332
16333				;;
16334			esac
16335
16336	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16337	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16338
16339			;;
16340		esac
16341		;;
16342	(*)
16343
16344	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16345	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16346
16347		;;
16348	esac
16349	;;
16350(yes)
16351
16352	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16353	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16354
16355	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16356
16357	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16358		&& test -z "${cf_tst_cflags}" \
16359		&& cf_fix_cppflags=no
16360	;;
16361esac
16362done
16363
16364if test -n "$cf_new_cflags" ; then
16365
16366	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16367	CFLAGS="${CFLAGS}$cf_new_cflags"
16368
16369fi
16370
16371if test -n "$cf_new_cppflags" ; then
16372
16373	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16374	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16375
16376fi
16377
16378if test -n "$cf_new_extra_cppflags" ; then
16379
16380	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16381	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16382
16383fi
16384
16385cf_add_libs="$LIBS"
16386# reverse order
16387cf_add_0lib=
16388for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16389# filter duplicates
16390for cf_add_1lib in $cf_add_0lib; do
16391	for cf_add_2lib in $cf_add_libs; do
16392		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16393			cf_add_1lib=
16394			break
16395		fi
16396	done
16397	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16398done
16399LIBS="$cf_add_libs"
16400
16401		# even with config script, some packages use no-override for curses.h
16402
16403echo "$as_me:16403: checking if we have identified curses headers" >&5
16404echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
16405if test "${cf_cv_ncurses_header+set}" = set; then
16406  echo $ECHO_N "(cached) $ECHO_C" >&6
16407else
16408
16409cf_cv_ncurses_header=none
16410for cf_header in \
16411	ncurses.h $cf_cv_screen/ncurses.h \
16412	curses.h $cf_cv_screen/curses.h
16413do
16414cat >"conftest.$ac_ext" <<_ACEOF
16415#line 16415 "configure"
16416#include "confdefs.h"
16417#include <${cf_header}>
16418int
16419main (void)
16420{
16421initscr(); tgoto("?", 0,0)
16422  ;
16423  return 0;
16424}
16425_ACEOF
16426rm -f "conftest.$ac_objext"
16427if { (eval echo "$as_me:16427: \"$ac_compile\"") >&5
16428  (eval $ac_compile) 2>&5
16429  ac_status=$?
16430  echo "$as_me:16430: \$? = $ac_status" >&5
16431  (exit "$ac_status"); } &&
16432         { ac_try='test -s "conftest.$ac_objext"'
16433  { (eval echo "$as_me:16433: \"$ac_try\"") >&5
16434  (eval $ac_try) 2>&5
16435  ac_status=$?
16436  echo "$as_me:16436: \$? = $ac_status" >&5
16437  (exit "$ac_status"); }; }; then
16438  cf_cv_ncurses_header=$cf_header; break
16439else
16440  echo "$as_me: failed program was:" >&5
16441cat "conftest.$ac_ext" >&5
16442fi
16443rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16444done
16445
16446fi
16447echo "$as_me:16447: result: $cf_cv_ncurses_header" >&5
16448echo "${ECHO_T}$cf_cv_ncurses_header" >&6
16449
16450if test "$cf_cv_ncurses_header" = none ; then
16451	{ { echo "$as_me:16451: error: No curses header-files found" >&5
16452echo "$as_me: error: No curses header-files found" >&2;}
16453   { (exit 1); exit 1; }; }
16454fi
16455
16456# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
16457
16458for ac_header in $cf_cv_ncurses_header
16459do
16460as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16461echo "$as_me:16461: checking for $ac_header" >&5
16462echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16463if eval "test \"\${$as_ac_Header+set}\" = set"; then
16464  echo $ECHO_N "(cached) $ECHO_C" >&6
16465else
16466  cat >"conftest.$ac_ext" <<_ACEOF
16467#line 16467 "configure"
16468#include "confdefs.h"
16469#include <$ac_header>
16470_ACEOF
16471if { (eval echo "$as_me:16471: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16472  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16473  ac_status=$?
16474  $EGREP -v '^ *\+' conftest.er1 >conftest.err
16475  rm -f conftest.er1
16476  cat conftest.err >&5
16477  echo "$as_me:16477: \$? = $ac_status" >&5
16478  (exit "$ac_status"); } >/dev/null; then
16479  if test -s conftest.err; then
16480    ac_cpp_err=$ac_c_preproc_warn_flag
16481  else
16482    ac_cpp_err=
16483  fi
16484else
16485  ac_cpp_err=yes
16486fi
16487if test -z "$ac_cpp_err"; then
16488  eval "$as_ac_Header=yes"
16489else
16490  echo "$as_me: failed program was:" >&5
16491  cat "conftest.$ac_ext" >&5
16492  eval "$as_ac_Header=no"
16493fi
16494rm -f conftest.err "conftest.$ac_ext"
16495fi
16496echo "$as_me:16496: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16497echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16498if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16499  cat >>confdefs.h <<EOF
16500#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16501EOF
16502
16503fi
16504done
16505
16506cat >>confdefs.h <<\EOF
16507#define NCURSES 1
16508EOF
16509
16510cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16511
16512		cat >>confdefs.h <<EOF
16513#define $cf_nculib_ROOT 1
16514EOF
16515
16516				cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
16517
16518	else
16519
16520cf_ncuhdr_root=$cf_cv_screen
16521
16522test -n "$cf_cv_curses_dir" && \
16523test "$cf_cv_curses_dir" != "no" && { \
16524
16525if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
16526  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
16527  do
16528	while test "$cf_add_incdir" != /usr/include
16529	do
16530	  if test -d "$cf_add_incdir"
16531	  then
16532		cf_have_incdir=no
16533		if test -n "$CFLAGS$CPPFLAGS" ; then
16534		  # a loop is needed to ensure we can add subdirs of existing dirs
16535		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16536			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16537			  cf_have_incdir=yes; break
16538			fi
16539		  done
16540		fi
16541
16542		if test "$cf_have_incdir" = no ; then
16543		  if test "$cf_add_incdir" = /usr/local/include ; then
16544			if test "$GCC" = yes
16545			then
16546			  cf_save_CPPFLAGS=$CPPFLAGS
16547
16548	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16549	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16550
16551			  cat >"conftest.$ac_ext" <<_ACEOF
16552#line 16552 "configure"
16553#include "confdefs.h"
16554#include <stdio.h>
16555int
16556main (void)
16557{
16558printf("Hello")
16559  ;
16560  return 0;
16561}
16562_ACEOF
16563rm -f "conftest.$ac_objext"
16564if { (eval echo "$as_me:16564: \"$ac_compile\"") >&5
16565  (eval $ac_compile) 2>&5
16566  ac_status=$?
16567  echo "$as_me:16567: \$? = $ac_status" >&5
16568  (exit "$ac_status"); } &&
16569         { ac_try='test -s "conftest.$ac_objext"'
16570  { (eval echo "$as_me:16570: \"$ac_try\"") >&5
16571  (eval $ac_try) 2>&5
16572  ac_status=$?
16573  echo "$as_me:16573: \$? = $ac_status" >&5
16574  (exit "$ac_status"); }; }; then
16575  :
16576else
16577  echo "$as_me: failed program was:" >&5
16578cat "conftest.$ac_ext" >&5
16579cf_have_incdir=yes
16580fi
16581rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16582			  CPPFLAGS=$cf_save_CPPFLAGS
16583			fi
16584		  fi
16585		fi
16586
16587		if test "$cf_have_incdir" = no ; then
16588		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
16589
16590echo "${as_me:-configure}:16590: testing adding $cf_add_incdir to include-path ..." 1>&5
16591
16592		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16593
16594		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
16595		  test "$cf_top_incdir" = "$cf_add_incdir" && break
16596		  cf_add_incdir="$cf_top_incdir"
16597		else
16598		  break
16599		fi
16600	  else
16601		break
16602	  fi
16603	done
16604  done
16605fi
16606
16607}
16608
16609echo "$as_me:16609: checking for $cf_ncuhdr_root header in include-path" >&5
16610echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
16611if test "${cf_cv_ncurses_h+set}" = set; then
16612  echo $ECHO_N "(cached) $ECHO_C" >&6
16613else
16614
16615	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
16616	{ test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
16617	for cf_header in $cf_header_list
16618	do
16619
16620	cat >"conftest.$ac_ext" <<_ACEOF
16621#line 16621 "configure"
16622#include "confdefs.h"
16623
16624#include <$cf_header>
16625int
16626main (void)
16627{
16628
16629#ifdef NCURSES_VERSION
16630
16631printf("%s\\n", NCURSES_VERSION);
16632#else
16633#ifdef __NCURSES_H
16634printf("old\\n");
16635#else
16636	make an error
16637#endif
16638#endif
16639
16640  ;
16641  return 0;
16642}
16643_ACEOF
16644rm -f "conftest.$ac_objext"
16645if { (eval echo "$as_me:16645: \"$ac_compile\"") >&5
16646  (eval $ac_compile) 2>&5
16647  ac_status=$?
16648  echo "$as_me:16648: \$? = $ac_status" >&5
16649  (exit "$ac_status"); } &&
16650         { ac_try='test -s "conftest.$ac_objext"'
16651  { (eval echo "$as_me:16651: \"$ac_try\"") >&5
16652  (eval $ac_try) 2>&5
16653  ac_status=$?
16654  echo "$as_me:16654: \$? = $ac_status" >&5
16655  (exit "$ac_status"); }; }; then
16656  cf_cv_ncurses_h=$cf_header
16657
16658else
16659  echo "$as_me: failed program was:" >&5
16660cat "conftest.$ac_ext" >&5
16661cf_cv_ncurses_h=no
16662fi
16663rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16664
16665		test "$cf_cv_ncurses_h" != no && break
16666	done
16667
16668fi
16669echo "$as_me:16669: result: $cf_cv_ncurses_h" >&5
16670echo "${ECHO_T}$cf_cv_ncurses_h" >&6
16671
16672if test "$cf_cv_ncurses_h" != no ; then
16673	cf_cv_ncurses_header=$cf_cv_ncurses_h
16674else
16675
16676echo "$as_me:16676: checking for $cf_ncuhdr_root include-path" >&5
16677echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
16678if test "${cf_cv_ncurses_h2+set}" = set; then
16679  echo $ECHO_N "(cached) $ECHO_C" >&6
16680else
16681
16682	test -n "$verbose" && echo
16683
16684cf_search=
16685
16686# collect the current set of include-directories from compiler flags
16687cf_header_path_list=""
16688if test -n "${CFLAGS}${CPPFLAGS}" ; then
16689	for cf_header_path in $CPPFLAGS $CFLAGS
16690	do
16691		case "$cf_header_path" in
16692		(-I*)
16693			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
16694
16695test "x$cf_header_path" != "xNONE" && \
16696test -d "$cf_header_path" && \
16697 {
16698	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
16699	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
16700	test -d "$cf_header_path/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
16701	test -d "$cf_header_path/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
16702	test -d "$cf_header_path/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
16703	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"
16704}
16705
16706			cf_header_path_list="$cf_header_path_list $cf_search"
16707			;;
16708		esac
16709	done
16710fi
16711
16712# add the variations for the package we are looking for
16713
16714cf_search=
16715
16716test "x$prefix" != "xNONE" && \
16717test -d "$prefix" && \
16718 {
16719	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
16720	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
16721	test -d "$prefix/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
16722	test -d "$prefix/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
16723	test -d "$prefix/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
16724	test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
16725}
16726
16727for cf_subdir_prefix in \
16728	/usr \
16729	/usr/local \
16730	/usr/pkg \
16731	/opt \
16732	/opt/local \
16733	$HOME
16734do
16735
16736test "x$cf_subdir_prefix" != "x$prefix" && \
16737test -d "$cf_subdir_prefix" && \
16738{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
16739	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
16740	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
16741	test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
16742	test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
16743	test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
16744	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"
16745}
16746
16747done
16748
16749test "$includedir" != NONE && \
16750test "$includedir" != "/usr/include" && \
16751test -d "$includedir" && {
16752	test -d "$includedir" &&    cf_search="$cf_search $includedir"
16753	test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
16754}
16755
16756test "$oldincludedir" != NONE && \
16757test "$oldincludedir" != "/usr/include" && \
16758test -d "$oldincludedir" && {
16759	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
16760	test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
16761}
16762
16763cf_search="$cf_search $cf_header_path_list"
16764
16765	test -n "$verbose" && echo "search path $cf_search"
16766	cf_save2_CPPFLAGS="$CPPFLAGS"
16767	for cf_incdir in $cf_search
16768	do
16769
16770if test -n "$cf_incdir" ; then
16771  for cf_add_incdir in $cf_incdir
16772  do
16773	while test "$cf_add_incdir" != /usr/include
16774	do
16775	  if test -d "$cf_add_incdir"
16776	  then
16777		cf_have_incdir=no
16778		if test -n "$CFLAGS$CPPFLAGS" ; then
16779		  # a loop is needed to ensure we can add subdirs of existing dirs
16780		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16781			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16782			  cf_have_incdir=yes; break
16783			fi
16784		  done
16785		fi
16786
16787		if test "$cf_have_incdir" = no ; then
16788		  if test "$cf_add_incdir" = /usr/local/include ; then
16789			if test "$GCC" = yes
16790			then
16791			  cf_save_CPPFLAGS=$CPPFLAGS
16792
16793	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16794	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16795
16796			  cat >"conftest.$ac_ext" <<_ACEOF
16797#line 16797 "configure"
16798#include "confdefs.h"
16799#include <stdio.h>
16800int
16801main (void)
16802{
16803printf("Hello")
16804  ;
16805  return 0;
16806}
16807_ACEOF
16808rm -f "conftest.$ac_objext"
16809if { (eval echo "$as_me:16809: \"$ac_compile\"") >&5
16810  (eval $ac_compile) 2>&5
16811  ac_status=$?
16812  echo "$as_me:16812: \$? = $ac_status" >&5
16813  (exit "$ac_status"); } &&
16814         { ac_try='test -s "conftest.$ac_objext"'
16815  { (eval echo "$as_me:16815: \"$ac_try\"") >&5
16816  (eval $ac_try) 2>&5
16817  ac_status=$?
16818  echo "$as_me:16818: \$? = $ac_status" >&5
16819  (exit "$ac_status"); }; }; then
16820  :
16821else
16822  echo "$as_me: failed program was:" >&5
16823cat "conftest.$ac_ext" >&5
16824cf_have_incdir=yes
16825fi
16826rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16827			  CPPFLAGS=$cf_save_CPPFLAGS
16828			fi
16829		  fi
16830		fi
16831
16832		if test "$cf_have_incdir" = no ; then
16833		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
16834
16835echo "${as_me:-configure}:16835: testing adding $cf_add_incdir to include-path ..." 1>&5
16836
16837		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16838
16839		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
16840		  test "$cf_top_incdir" = "$cf_add_incdir" && break
16841		  cf_add_incdir="$cf_top_incdir"
16842		else
16843		  break
16844		fi
16845	  else
16846		break
16847	  fi
16848	done
16849  done
16850fi
16851
16852		for cf_header in \
16853			ncurses.h \
16854			curses.h
16855		do
16856
16857	cat >"conftest.$ac_ext" <<_ACEOF
16858#line 16858 "configure"
16859#include "confdefs.h"
16860
16861#include <$cf_header>
16862int
16863main (void)
16864{
16865
16866#ifdef NCURSES_VERSION
16867
16868printf("%s\\n", NCURSES_VERSION);
16869#else
16870#ifdef __NCURSES_H
16871printf("old\\n");
16872#else
16873	make an error
16874#endif
16875#endif
16876
16877  ;
16878  return 0;
16879}
16880_ACEOF
16881rm -f "conftest.$ac_objext"
16882if { (eval echo "$as_me:16882: \"$ac_compile\"") >&5
16883  (eval $ac_compile) 2>&5
16884  ac_status=$?
16885  echo "$as_me:16885: \$? = $ac_status" >&5
16886  (exit "$ac_status"); } &&
16887         { ac_try='test -s "conftest.$ac_objext"'
16888  { (eval echo "$as_me:16888: \"$ac_try\"") >&5
16889  (eval $ac_try) 2>&5
16890  ac_status=$?
16891  echo "$as_me:16891: \$? = $ac_status" >&5
16892  (exit "$ac_status"); }; }; then
16893  cf_cv_ncurses_h2=$cf_header
16894
16895else
16896  echo "$as_me: failed program was:" >&5
16897cat "conftest.$ac_ext" >&5
16898cf_cv_ncurses_h2=no
16899fi
16900rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16901
16902			if test "$cf_cv_ncurses_h2" != no ; then
16903				cf_cv_ncurses_h2=$cf_incdir/$cf_header
16904				test -n "$verbose" && echo $ECHO_N "	... found $ECHO_C" 1>&6
16905				break
16906			fi
16907			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
16908		done
16909		CPPFLAGS="$cf_save2_CPPFLAGS"
16910		test "$cf_cv_ncurses_h2" != no && break
16911	done
16912	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:16912: error: not found" >&5
16913echo "$as_me: error: not found" >&2;}
16914   { (exit 1); exit 1; }; }
16915
16916fi
16917echo "$as_me:16917: result: $cf_cv_ncurses_h2" >&5
16918echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
16919
16920	cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
16921	cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
16922	if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
16923		cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
16924	fi
16925
16926if test -n "$cf_1st_incdir" ; then
16927  for cf_add_incdir in $cf_1st_incdir
16928  do
16929	while test "$cf_add_incdir" != /usr/include
16930	do
16931	  if test -d "$cf_add_incdir"
16932	  then
16933		cf_have_incdir=no
16934		if test -n "$CFLAGS$CPPFLAGS" ; then
16935		  # a loop is needed to ensure we can add subdirs of existing dirs
16936		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16937			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16938			  cf_have_incdir=yes; break
16939			fi
16940		  done
16941		fi
16942
16943		if test "$cf_have_incdir" = no ; then
16944		  if test "$cf_add_incdir" = /usr/local/include ; then
16945			if test "$GCC" = yes
16946			then
16947			  cf_save_CPPFLAGS=$CPPFLAGS
16948
16949	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16950	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16951
16952			  cat >"conftest.$ac_ext" <<_ACEOF
16953#line 16953 "configure"
16954#include "confdefs.h"
16955#include <stdio.h>
16956int
16957main (void)
16958{
16959printf("Hello")
16960  ;
16961  return 0;
16962}
16963_ACEOF
16964rm -f "conftest.$ac_objext"
16965if { (eval echo "$as_me:16965: \"$ac_compile\"") >&5
16966  (eval $ac_compile) 2>&5
16967  ac_status=$?
16968  echo "$as_me:16968: \$? = $ac_status" >&5
16969  (exit "$ac_status"); } &&
16970         { ac_try='test -s "conftest.$ac_objext"'
16971  { (eval echo "$as_me:16971: \"$ac_try\"") >&5
16972  (eval $ac_try) 2>&5
16973  ac_status=$?
16974  echo "$as_me:16974: \$? = $ac_status" >&5
16975  (exit "$ac_status"); }; }; then
16976  :
16977else
16978  echo "$as_me: failed program was:" >&5
16979cat "conftest.$ac_ext" >&5
16980cf_have_incdir=yes
16981fi
16982rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16983			  CPPFLAGS=$cf_save_CPPFLAGS
16984			fi
16985		  fi
16986		fi
16987
16988		if test "$cf_have_incdir" = no ; then
16989		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
16990
16991echo "${as_me:-configure}:16991: testing adding $cf_add_incdir to include-path ..." 1>&5
16992
16993		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16994
16995		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
16996		  test "$cf_top_incdir" = "$cf_add_incdir" && break
16997		  cf_add_incdir="$cf_top_incdir"
16998		else
16999		  break
17000		fi
17001	  else
17002		break
17003	  fi
17004	done
17005  done
17006fi
17007
17008fi
17009
17010# Set definitions to allow ifdef'ing for ncurses.h
17011
17012case "$cf_cv_ncurses_header" in
17013(*ncurses.h)
17014
17015cat >>confdefs.h <<\EOF
17016#define HAVE_NCURSES_H 1
17017EOF
17018
17019	;;
17020esac
17021
17022case "$cf_cv_ncurses_header" in
17023(ncurses/curses.h|ncurses/ncurses.h)
17024
17025cat >>confdefs.h <<\EOF
17026#define HAVE_NCURSES_NCURSES_H 1
17027EOF
17028
17029	;;
17030(ncursesw/curses.h|ncursesw/ncurses.h)
17031
17032cat >>confdefs.h <<\EOF
17033#define HAVE_NCURSESW_NCURSES_H 1
17034EOF
17035
17036	;;
17037esac
17038
17039echo "$as_me:17039: checking for terminfo header" >&5
17040echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
17041if test "${cf_cv_term_header+set}" = set; then
17042  echo $ECHO_N "(cached) $ECHO_C" >&6
17043else
17044
17045case "${cf_cv_ncurses_header}" in
17046(*/ncurses.h|*/ncursesw.h)
17047	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
17048	;;
17049(*)
17050	cf_term_header=term.h
17051	;;
17052esac
17053
17054for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
17055do
17056cat >"conftest.$ac_ext" <<_ACEOF
17057#line 17057 "configure"
17058#include "confdefs.h"
17059#include <stdio.h>
17060#include <${cf_cv_ncurses_header:-curses.h}>
17061#include <$cf_test>
17062
17063int
17064main (void)
17065{
17066int x = auto_left_margin; (void)x
17067  ;
17068  return 0;
17069}
17070_ACEOF
17071rm -f "conftest.$ac_objext"
17072if { (eval echo "$as_me:17072: \"$ac_compile\"") >&5
17073  (eval $ac_compile) 2>&5
17074  ac_status=$?
17075  echo "$as_me:17075: \$? = $ac_status" >&5
17076  (exit "$ac_status"); } &&
17077         { ac_try='test -s "conftest.$ac_objext"'
17078  { (eval echo "$as_me:17078: \"$ac_try\"") >&5
17079  (eval $ac_try) 2>&5
17080  ac_status=$?
17081  echo "$as_me:17081: \$? = $ac_status" >&5
17082  (exit "$ac_status"); }; }; then
17083
17084	cf_cv_term_header="$cf_test"
17085else
17086  echo "$as_me: failed program was:" >&5
17087cat "conftest.$ac_ext" >&5
17088
17089	cf_cv_term_header=unknown
17090
17091fi
17092rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17093	test "$cf_cv_term_header" != unknown && break
17094done
17095
17096fi
17097echo "$as_me:17097: result: $cf_cv_term_header" >&5
17098echo "${ECHO_T}$cf_cv_term_header" >&6
17099
17100# Set definitions to allow ifdef'ing to accommodate subdirectories
17101
17102case "$cf_cv_term_header" in
17103(*term.h)
17104
17105cat >>confdefs.h <<\EOF
17106#define HAVE_TERM_H 1
17107EOF
17108
17109	;;
17110esac
17111
17112case "$cf_cv_term_header" in
17113(ncurses/term.h)
17114
17115cat >>confdefs.h <<\EOF
17116#define HAVE_NCURSES_TERM_H 1
17117EOF
17118
17119	;;
17120(ncursesw/term.h)
17121
17122cat >>confdefs.h <<\EOF
17123#define HAVE_NCURSESW_TERM_H 1
17124EOF
17125
17126	;;
17127esac
17128
17129# some applications need this, but should check for NCURSES_VERSION
17130
17131cat >>confdefs.h <<\EOF
17132#define NCURSES 1
17133EOF
17134
17135echo "$as_me:17135: checking for ncurses version" >&5
17136echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
17137if test "${cf_cv_ncurses_version+set}" = set; then
17138  echo $ECHO_N "(cached) $ECHO_C" >&6
17139else
17140
17141	cf_cv_ncurses_version=no
17142	cf_tempfile=out$$
17143	rm -f "$cf_tempfile"
17144	if test "$cross_compiling" = yes; then
17145
17146	# This will not work if the preprocessor splits the line after the
17147	# Autoconf token.  The 'unproto' program does that.
17148	cat > "conftest.$ac_ext" <<EOF
17149#include <${cf_cv_ncurses_header:-curses.h}>
17150#undef Autoconf
17151#ifdef NCURSES_VERSION
17152Autoconf NCURSES_VERSION
17153#else
17154#ifdef __NCURSES_H
17155Autoconf "old"
17156#endif
17157;
17158#endif
17159EOF
17160	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
17161	{ (eval echo "$as_me:17161: \"$cf_try\"") >&5
17162  (eval $cf_try) 2>&5
17163  ac_status=$?
17164  echo "$as_me:17164: \$? = $ac_status" >&5
17165  (exit "$ac_status"); }
17166	if test -f conftest.out ; then
17167		cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
17168		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
17169		rm -f conftest.out
17170	fi
17171
17172else
17173  cat >"conftest.$ac_ext" <<_ACEOF
17174#line 17174 "configure"
17175#include "confdefs.h"
17176
17177#include <${cf_cv_ncurses_header:-curses.h}>
17178#include <stdio.h>
17179int main(void)
17180{
17181	FILE *fp = fopen("$cf_tempfile", "w");
17182#ifdef NCURSES_VERSION
17183# ifdef NCURSES_VERSION_PATCH
17184	fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
17185# else
17186	fprintf(fp, "%s\\n", NCURSES_VERSION);
17187# endif
17188#else
17189# ifdef __NCURSES_H
17190	fprintf(fp, "old\\n");
17191# else
17192	make an error
17193# endif
17194#endif
17195	${cf_cv_main_return:-return}(0);
17196}
17197_ACEOF
17198rm -f "conftest$ac_exeext"
17199if { (eval echo "$as_me:17199: \"$ac_link\"") >&5
17200  (eval $ac_link) 2>&5
17201  ac_status=$?
17202  echo "$as_me:17202: \$? = $ac_status" >&5
17203  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17204  { (eval echo "$as_me:17204: \"$ac_try\"") >&5
17205  (eval $ac_try) 2>&5
17206  ac_status=$?
17207  echo "$as_me:17207: \$? = $ac_status" >&5
17208  (exit "$ac_status"); }; }; then
17209
17210	cf_cv_ncurses_version=`cat $cf_tempfile`
17211else
17212  echo "$as_me: program exited with status $ac_status" >&5
17213echo "$as_me: failed program was:" >&5
17214cat "conftest.$ac_ext" >&5
17215fi
17216rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17217fi
17218	rm -f "$cf_tempfile"
17219
17220fi
17221echo "$as_me:17221: result: $cf_cv_ncurses_version" >&5
17222echo "${ECHO_T}$cf_cv_ncurses_version" >&6
17223test "$cf_cv_ncurses_version" = no ||
17224cat >>confdefs.h <<\EOF
17225#define NCURSES 1
17226EOF
17227
17228cf_nculib_root=$cf_cv_screen
17229	# This works, except for the special case where we find gpm, but
17230	# ncurses is in a nonstandard location via $LIBS, and we really want
17231	# to link gpm.
17232cf_ncurses_LIBS=""
17233cf_ncurses_SAVE="$LIBS"
17234echo "$as_me:17234: checking for Gpm_Open in -lgpm" >&5
17235echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
17236if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
17237  echo $ECHO_N "(cached) $ECHO_C" >&6
17238else
17239  ac_check_lib_save_LIBS=$LIBS
17240LIBS="-lgpm  $LIBS"
17241cat >"conftest.$ac_ext" <<_ACEOF
17242#line 17242 "configure"
17243#include "confdefs.h"
17244
17245/* Override any gcc2 internal prototype to avoid an error.  */
17246#ifdef __cplusplus
17247extern "C"
17248#endif
17249/* We use char because int might match the return type of a gcc2
17250   builtin and then its argument prototype would still apply.  */
17251char Gpm_Open ();
17252int
17253main (void)
17254{
17255Gpm_Open ();
17256  ;
17257  return 0;
17258}
17259_ACEOF
17260rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17261if { (eval echo "$as_me:17261: \"$ac_link\"") >&5
17262  (eval $ac_link) 2>&5
17263  ac_status=$?
17264  echo "$as_me:17264: \$? = $ac_status" >&5
17265  (exit "$ac_status"); } &&
17266         { ac_try='test -s "conftest$ac_exeext"'
17267  { (eval echo "$as_me:17267: \"$ac_try\"") >&5
17268  (eval $ac_try) 2>&5
17269  ac_status=$?
17270  echo "$as_me:17270: \$? = $ac_status" >&5
17271  (exit "$ac_status"); }; }; then
17272  ac_cv_lib_gpm_Gpm_Open=yes
17273else
17274  echo "$as_me: failed program was:" >&5
17275cat "conftest.$ac_ext" >&5
17276ac_cv_lib_gpm_Gpm_Open=no
17277fi
17278rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17279LIBS=$ac_check_lib_save_LIBS
17280fi
17281echo "$as_me:17281: result: $ac_cv_lib_gpm_Gpm_Open" >&5
17282echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
17283if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
17284  echo "$as_me:17284: checking for initscr in -lgpm" >&5
17285echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
17286if test "${ac_cv_lib_gpm_initscr+set}" = set; then
17287  echo $ECHO_N "(cached) $ECHO_C" >&6
17288else
17289  ac_check_lib_save_LIBS=$LIBS
17290LIBS="-lgpm  $LIBS"
17291cat >"conftest.$ac_ext" <<_ACEOF
17292#line 17292 "configure"
17293#include "confdefs.h"
17294
17295/* Override any gcc2 internal prototype to avoid an error.  */
17296#ifdef __cplusplus
17297extern "C"
17298#endif
17299/* We use char because int might match the return type of a gcc2
17300   builtin and then its argument prototype would still apply.  */
17301char initscr ();
17302int
17303main (void)
17304{
17305initscr ();
17306  ;
17307  return 0;
17308}
17309_ACEOF
17310rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17311if { (eval echo "$as_me:17311: \"$ac_link\"") >&5
17312  (eval $ac_link) 2>&5
17313  ac_status=$?
17314  echo "$as_me:17314: \$? = $ac_status" >&5
17315  (exit "$ac_status"); } &&
17316         { ac_try='test -s "conftest$ac_exeext"'
17317  { (eval echo "$as_me:17317: \"$ac_try\"") >&5
17318  (eval $ac_try) 2>&5
17319  ac_status=$?
17320  echo "$as_me:17320: \$? = $ac_status" >&5
17321  (exit "$ac_status"); }; }; then
17322  ac_cv_lib_gpm_initscr=yes
17323else
17324  echo "$as_me: failed program was:" >&5
17325cat "conftest.$ac_ext" >&5
17326ac_cv_lib_gpm_initscr=no
17327fi
17328rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17329LIBS=$ac_check_lib_save_LIBS
17330fi
17331echo "$as_me:17331: result: $ac_cv_lib_gpm_initscr" >&5
17332echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
17333if test "$ac_cv_lib_gpm_initscr" = yes; then
17334  LIBS="$cf_ncurses_SAVE"
17335else
17336  cf_ncurses_LIBS="-lgpm"
17337fi
17338
17339fi
17340
17341case "$host_os" in
17342(freebsd*)
17343	# This is only necessary if you are linking against an obsolete
17344	# version of ncurses (but it should do no harm, since it's static).
17345	if test "$cf_nculib_root" = ncurses ; then
17346		echo "$as_me:17346: checking for tgoto in -lmytinfo" >&5
17347echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
17348if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
17349  echo $ECHO_N "(cached) $ECHO_C" >&6
17350else
17351  ac_check_lib_save_LIBS=$LIBS
17352LIBS="-lmytinfo  $LIBS"
17353cat >"conftest.$ac_ext" <<_ACEOF
17354#line 17354 "configure"
17355#include "confdefs.h"
17356
17357/* Override any gcc2 internal prototype to avoid an error.  */
17358#ifdef __cplusplus
17359extern "C"
17360#endif
17361/* We use char because int might match the return type of a gcc2
17362   builtin and then its argument prototype would still apply.  */
17363char tgoto ();
17364int
17365main (void)
17366{
17367tgoto ();
17368  ;
17369  return 0;
17370}
17371_ACEOF
17372rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17373if { (eval echo "$as_me:17373: \"$ac_link\"") >&5
17374  (eval $ac_link) 2>&5
17375  ac_status=$?
17376  echo "$as_me:17376: \$? = $ac_status" >&5
17377  (exit "$ac_status"); } &&
17378         { ac_try='test -s "conftest$ac_exeext"'
17379  { (eval echo "$as_me:17379: \"$ac_try\"") >&5
17380  (eval $ac_try) 2>&5
17381  ac_status=$?
17382  echo "$as_me:17382: \$? = $ac_status" >&5
17383  (exit "$ac_status"); }; }; then
17384  ac_cv_lib_mytinfo_tgoto=yes
17385else
17386  echo "$as_me: failed program was:" >&5
17387cat "conftest.$ac_ext" >&5
17388ac_cv_lib_mytinfo_tgoto=no
17389fi
17390rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17391LIBS=$ac_check_lib_save_LIBS
17392fi
17393echo "$as_me:17393: result: $ac_cv_lib_mytinfo_tgoto" >&5
17394echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
17395if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
17396  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
17397fi
17398
17399	fi
17400	;;
17401esac
17402
17403cf_add_libs="$LIBS"
17404# reverse order
17405cf_add_0lib=
17406for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17407# filter duplicates
17408for cf_add_1lib in $cf_add_0lib; do
17409	for cf_add_2lib in $cf_add_libs; do
17410		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17411			cf_add_1lib=
17412			break
17413		fi
17414	done
17415	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17416done
17417LIBS="$cf_add_libs"
17418
17419if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
17420then
17421
17422cf_add_libs="$LIBS"
17423# reverse order
17424cf_add_0lib=
17425for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17426# filter duplicates
17427for cf_add_1lib in $cf_add_0lib; do
17428	for cf_add_2lib in $cf_add_libs; do
17429		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17430			cf_add_1lib=
17431			break
17432		fi
17433	done
17434	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17435done
17436LIBS="$cf_add_libs"
17437
17438else
17439
17440	eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
17441	cf_libdir=""
17442	echo "$as_me:17442: checking for initscr" >&5
17443echo $ECHO_N "checking for initscr... $ECHO_C" >&6
17444if test "${ac_cv_func_initscr+set}" = set; then
17445  echo $ECHO_N "(cached) $ECHO_C" >&6
17446else
17447  cat >"conftest.$ac_ext" <<_ACEOF
17448#line 17448 "configure"
17449#include "confdefs.h"
17450#define initscr autoconf_temporary
17451#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
17452#undef initscr
17453
17454#ifdef __cplusplus
17455extern "C"
17456#endif
17457
17458/* We use char because int might match the return type of a gcc2
17459   builtin and then its argument prototype would still apply.  */
17460char initscr (void);
17461
17462int
17463main (void)
17464{
17465
17466/* The GNU C library defines stubs for functions which it implements
17467    to always fail with ENOSYS.  Some functions are actually named
17468    something starting with __ and the normal name is an alias.  */
17469#if defined (__stub_initscr) || defined (__stub___initscr)
17470#error found stub for initscr
17471#endif
17472
17473	return initscr ();
17474  ;
17475  return 0;
17476}
17477_ACEOF
17478rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17479if { (eval echo "$as_me:17479: \"$ac_link\"") >&5
17480  (eval $ac_link) 2>&5
17481  ac_status=$?
17482  echo "$as_me:17482: \$? = $ac_status" >&5
17483  (exit "$ac_status"); } &&
17484         { ac_try='test -s "conftest$ac_exeext"'
17485  { (eval echo "$as_me:17485: \"$ac_try\"") >&5
17486  (eval $ac_try) 2>&5
17487  ac_status=$?
17488  echo "$as_me:17488: \$? = $ac_status" >&5
17489  (exit "$ac_status"); }; }; then
17490  ac_cv_func_initscr=yes
17491else
17492  echo "$as_me: failed program was:" >&5
17493cat "conftest.$ac_ext" >&5
17494ac_cv_func_initscr=no
17495fi
17496rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17497fi
17498echo "$as_me:17498: result: $ac_cv_func_initscr" >&5
17499echo "${ECHO_T}$ac_cv_func_initscr" >&6
17500if test "$ac_cv_func_initscr" = yes; then
17501  eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
17502else
17503
17504		cf_save_LIBS="$LIBS"
17505		echo "$as_me:17505: checking for initscr in -l$cf_nculib_root" >&5
17506echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
17507		LIBS="-l$cf_nculib_root $LIBS"
17508		cat >"conftest.$ac_ext" <<_ACEOF
17509#line 17509 "configure"
17510#include "confdefs.h"
17511#include <${cf_cv_ncurses_header:-curses.h}>
17512int
17513main (void)
17514{
17515initscr()
17516  ;
17517  return 0;
17518}
17519_ACEOF
17520rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17521if { (eval echo "$as_me:17521: \"$ac_link\"") >&5
17522  (eval $ac_link) 2>&5
17523  ac_status=$?
17524  echo "$as_me:17524: \$? = $ac_status" >&5
17525  (exit "$ac_status"); } &&
17526         { ac_try='test -s "conftest$ac_exeext"'
17527  { (eval echo "$as_me:17527: \"$ac_try\"") >&5
17528  (eval $ac_try) 2>&5
17529  ac_status=$?
17530  echo "$as_me:17530: \$? = $ac_status" >&5
17531  (exit "$ac_status"); }; }; then
17532  echo "$as_me:17532: result: yes" >&5
17533echo "${ECHO_T}yes" >&6
17534			 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
17535
17536else
17537  echo "$as_me: failed program was:" >&5
17538cat "conftest.$ac_ext" >&5
17539echo "$as_me:17539: result: no" >&5
17540echo "${ECHO_T}no" >&6
17541
17542cf_search=
17543cf_library_path_list=""
17544if test -n "${LDFLAGS}${LIBS}" ; then
17545	for cf_library_path in $LDFLAGS $LIBS
17546	do
17547		case "$cf_library_path" in
17548		(-L*)
17549			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
17550
17551test "x$cf_library_path" != "xNONE" && \
17552test -d "$cf_library_path" && \
17553 {
17554	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
17555	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
17556	test -d "$cf_library_path/lib/$cf_nculib_root" &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
17557	test -d "$cf_library_path/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
17558	test -d "$cf_library_path/$cf_nculib_root/lib" &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
17559	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"
17560}
17561
17562			cf_library_path_list="$cf_library_path_list $cf_search"
17563			;;
17564		esac
17565	done
17566fi
17567
17568cf_search=
17569
17570test "x$prefix" != "xNONE" && \
17571test -d "$prefix" && \
17572 {
17573	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
17574	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
17575	test -d "$prefix/lib/$cf_nculib_root" &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
17576	test -d "$prefix/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
17577	test -d "$prefix/$cf_nculib_root/lib" &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
17578	test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
17579}
17580
17581for cf_subdir_prefix in \
17582	/usr \
17583	/usr/local \
17584	/usr/pkg \
17585	/opt \
17586	/opt/local \
17587	$HOME
17588do
17589
17590test "x$cf_subdir_prefix" != "x$prefix" && \
17591test -d "$cf_subdir_prefix" && \
17592{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
17593	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
17594	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
17595	test -d "$cf_subdir_prefix/lib/$cf_nculib_root" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
17596	test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
17597	test -d "$cf_subdir_prefix/$cf_nculib_root/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
17598	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"
17599}
17600
17601done
17602
17603cf_search="$cf_library_path_list $cf_search"
17604
17605			for cf_libdir in $cf_search
17606			do
17607				echo "$as_me:17607: checking for -l$cf_nculib_root in $cf_libdir" >&5
17608echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
17609				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
17610				cat >"conftest.$ac_ext" <<_ACEOF
17611#line 17611 "configure"
17612#include "confdefs.h"
17613#include <${cf_cv_ncurses_header:-curses.h}>
17614int
17615main (void)
17616{
17617initscr()
17618  ;
17619  return 0;
17620}
17621_ACEOF
17622rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17623if { (eval echo "$as_me:17623: \"$ac_link\"") >&5
17624  (eval $ac_link) 2>&5
17625  ac_status=$?
17626  echo "$as_me:17626: \$? = $ac_status" >&5
17627  (exit "$ac_status"); } &&
17628         { ac_try='test -s "conftest$ac_exeext"'
17629  { (eval echo "$as_me:17629: \"$ac_try\"") >&5
17630  (eval $ac_try) 2>&5
17631  ac_status=$?
17632  echo "$as_me:17632: \$? = $ac_status" >&5
17633  (exit "$ac_status"); }; }; then
17634  echo "$as_me:17634: result: yes" >&5
17635echo "${ECHO_T}yes" >&6
17636			 		 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
17637					 break
17638else
17639  echo "$as_me: failed program was:" >&5
17640cat "conftest.$ac_ext" >&5
17641echo "$as_me:17641: result: no" >&5
17642echo "${ECHO_T}no" >&6
17643					 LIBS="$cf_save_LIBS"
17644fi
17645rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17646			done
17647
17648fi
17649rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17650
17651fi
17652
17653eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
17654
17655if test "$cf_found_library" = no ; then
17656	{ { echo "$as_me:17656: error: Cannot link $cf_nculib_root library" >&5
17657echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
17658   { (exit 1); exit 1; }; }
17659fi
17660
17661fi
17662
17663if test -n "$cf_ncurses_LIBS" ; then
17664	echo "$as_me:17664: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
17665echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
17666	cf_ncurses_SAVE="$LIBS"
17667	for p in $cf_ncurses_LIBS ; do
17668		q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
17669		if test "$q" != "$LIBS" ; then
17670			LIBS="$q"
17671		fi
17672	done
17673	cat >"conftest.$ac_ext" <<_ACEOF
17674#line 17674 "configure"
17675#include "confdefs.h"
17676#include <${cf_cv_ncurses_header:-curses.h}>
17677int
17678main (void)
17679{
17680initscr(); mousemask(0,0); tigetstr((char *)0);
17681  ;
17682  return 0;
17683}
17684_ACEOF
17685rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17686if { (eval echo "$as_me:17686: \"$ac_link\"") >&5
17687  (eval $ac_link) 2>&5
17688  ac_status=$?
17689  echo "$as_me:17689: \$? = $ac_status" >&5
17690  (exit "$ac_status"); } &&
17691         { ac_try='test -s "conftest$ac_exeext"'
17692  { (eval echo "$as_me:17692: \"$ac_try\"") >&5
17693  (eval $ac_try) 2>&5
17694  ac_status=$?
17695  echo "$as_me:17695: \$? = $ac_status" >&5
17696  (exit "$ac_status"); }; }; then
17697  echo "$as_me:17697: result: yes" >&5
17698echo "${ECHO_T}yes" >&6
17699else
17700  echo "$as_me: failed program was:" >&5
17701cat "conftest.$ac_ext" >&5
17702echo "$as_me:17702: result: no" >&5
17703echo "${ECHO_T}no" >&6
17704		 LIBS="$cf_ncurses_SAVE"
17705fi
17706rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17707fi
17708
17709cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17710
17711cat >>confdefs.h <<EOF
17712#define $cf_nculib_ROOT 1
17713EOF
17714
17715	fi
17716else
17717	NCURSES_CONFIG=none
17718fi
17719
17720	;;
17721(ncurses*)
17722
17723cf_ncuconfig_root=$cf_cv_screen
17724cf_have_ncuconfig=no
17725
17726if test "x${PKG_CONFIG:=none}" != xnone; then
17727	echo "$as_me:17727: checking pkg-config for $cf_ncuconfig_root" >&5
17728echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
17729	if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
17730		echo "$as_me:17730: result: yes" >&5
17731echo "${ECHO_T}yes" >&6
17732
17733		echo "$as_me:17733: checking if the $cf_ncuconfig_root package files work" >&5
17734echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
17735		cf_have_ncuconfig=unknown
17736
17737		cf_save_CFLAGS="$CFLAGS"
17738		cf_save_CPPFLAGS="$CPPFLAGS"
17739		cf_save_LIBS="$LIBS"
17740
17741		cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
17742		cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
17743
17744		# while -W for passing linker flags is prevalent, it is not "standard".
17745		# At least one wrapper for c89/c99 (in Apple's xcode) has its own
17746		# incompatible _and_ non-standard -W option which gives an error.  Work
17747		# around that pitfall.
17748		case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
17749		(x*c[89]9@@*-W*)
17750
17751cf_fix_cppflags=no
17752cf_new_cflags=
17753cf_new_cppflags=
17754cf_new_extra_cppflags=
17755
17756for cf_add_cflags in $cf_pkg_cflags
17757do
17758case "$cf_fix_cppflags" in
17759(no)
17760	case "$cf_add_cflags" in
17761	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17762		case "$cf_add_cflags" in
17763		(-D*)
17764			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17765
17766			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17767				&& test -z "${cf_tst_cflags}" \
17768				&& cf_fix_cppflags=yes
17769
17770			if test "$cf_fix_cppflags" = yes ; then
17771
17772	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17773	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17774
17775				continue
17776			elif test "${cf_tst_cflags}" = "\"'" ; then
17777
17778	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17779	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17780
17781				continue
17782			fi
17783			;;
17784		esac
17785		case "$CPPFLAGS" in
17786		(*$cf_add_cflags)
17787			;;
17788		(*)
17789			case "$cf_add_cflags" in
17790			(-D*)
17791				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17792
17793CPPFLAGS=`echo "$CPPFLAGS" | \
17794	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17795		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17796
17797				;;
17798			esac
17799
17800	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17801	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17802
17803			;;
17804		esac
17805		;;
17806	(*)
17807
17808	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17809	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17810
17811		;;
17812	esac
17813	;;
17814(yes)
17815
17816	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17817	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17818
17819	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17820
17821	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17822		&& test -z "${cf_tst_cflags}" \
17823		&& cf_fix_cppflags=no
17824	;;
17825esac
17826done
17827
17828if test -n "$cf_new_cflags" ; then
17829
17830	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17831	CFLAGS="${CFLAGS}$cf_new_cflags"
17832
17833fi
17834
17835if test -n "$cf_new_cppflags" ; then
17836
17837	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17838	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17839
17840fi
17841
17842if test -n "$cf_new_extra_cppflags" ; then
17843
17844	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17845	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17846
17847fi
17848
17849cf_add_libs="$LIBS"
17850# reverse order
17851cf_add_0lib=
17852for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17853# filter duplicates
17854for cf_add_1lib in $cf_add_0lib; do
17855	for cf_add_2lib in $cf_add_libs; do
17856		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17857			cf_add_1lib=
17858			break
17859		fi
17860	done
17861	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17862done
17863LIBS="$cf_add_libs"
17864
17865			cat >"conftest.$ac_ext" <<_ACEOF
17866#line 17866 "configure"
17867#include "confdefs.h"
17868#include <${cf_cv_ncurses_header:-curses.h}>
17869int
17870main (void)
17871{
17872initscr(); mousemask(0,0); tigetstr((char *)0);
17873  ;
17874  return 0;
17875}
17876_ACEOF
17877rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17878if { (eval echo "$as_me:17878: \"$ac_link\"") >&5
17879  (eval $ac_link) 2>&5
17880  ac_status=$?
17881  echo "$as_me:17881: \$? = $ac_status" >&5
17882  (exit "$ac_status"); } &&
17883         { ac_try='test -s "conftest$ac_exeext"'
17884  { (eval echo "$as_me:17884: \"$ac_try\"") >&5
17885  (eval $ac_try) 2>&5
17886  ac_status=$?
17887  echo "$as_me:17887: \$? = $ac_status" >&5
17888  (exit "$ac_status"); }; }; then
17889  if test "$cross_compiling" = yes; then
17890  cf_test_ncuconfig=maybe
17891else
17892  cat >"conftest.$ac_ext" <<_ACEOF
17893#line 17893 "configure"
17894#include "confdefs.h"
17895#include <${cf_cv_ncurses_header:-curses.h}>
17896					int main(void)
17897					{ char *xx = curses_version(); return (xx == 0); }
17898_ACEOF
17899rm -f "conftest$ac_exeext"
17900if { (eval echo "$as_me:17900: \"$ac_link\"") >&5
17901  (eval $ac_link) 2>&5
17902  ac_status=$?
17903  echo "$as_me:17903: \$? = $ac_status" >&5
17904  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17905  { (eval echo "$as_me:17905: \"$ac_try\"") >&5
17906  (eval $ac_try) 2>&5
17907  ac_status=$?
17908  echo "$as_me:17908: \$? = $ac_status" >&5
17909  (exit "$ac_status"); }; }; then
17910  cf_test_ncuconfig=yes
17911else
17912  echo "$as_me: program exited with status $ac_status" >&5
17913echo "$as_me: failed program was:" >&5
17914cat "conftest.$ac_ext" >&5
17915cf_test_ncuconfig=no
17916fi
17917rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17918fi
17919else
17920  echo "$as_me: failed program was:" >&5
17921cat "conftest.$ac_ext" >&5
17922cf_test_ncuconfig=no
17923fi
17924rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17925
17926			CFLAGS="$cf_save_CFLAGS"
17927			CPPFLAGS="$cf_save_CPPFLAGS"
17928			LIBS="$cf_save_LIBS"
17929
17930			if test "x$cf_test_ncuconfig" != xyes; then
17931				cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
17932				cf_pkg_cflags="$cf_temp"
17933				cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
17934				cf_pkg_libs="$cf_temp"
17935			fi
17936			;;
17937		esac
17938
17939cf_fix_cppflags=no
17940cf_new_cflags=
17941cf_new_cppflags=
17942cf_new_extra_cppflags=
17943
17944for cf_add_cflags in $cf_pkg_cflags
17945do
17946case "$cf_fix_cppflags" in
17947(no)
17948	case "$cf_add_cflags" in
17949	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17950		case "$cf_add_cflags" in
17951		(-D*)
17952			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17953
17954			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17955				&& test -z "${cf_tst_cflags}" \
17956				&& cf_fix_cppflags=yes
17957
17958			if test "$cf_fix_cppflags" = yes ; then
17959
17960	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17961	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17962
17963				continue
17964			elif test "${cf_tst_cflags}" = "\"'" ; then
17965
17966	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17967	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17968
17969				continue
17970			fi
17971			;;
17972		esac
17973		case "$CPPFLAGS" in
17974		(*$cf_add_cflags)
17975			;;
17976		(*)
17977			case "$cf_add_cflags" in
17978			(-D*)
17979				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17980
17981CPPFLAGS=`echo "$CPPFLAGS" | \
17982	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17983		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17984
17985				;;
17986			esac
17987
17988	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17989	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17990
17991			;;
17992		esac
17993		;;
17994	(*)
17995
17996	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17997	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17998
17999		;;
18000	esac
18001	;;
18002(yes)
18003
18004	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18005	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18006
18007	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18008
18009	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18010		&& test -z "${cf_tst_cflags}" \
18011		&& cf_fix_cppflags=no
18012	;;
18013esac
18014done
18015
18016if test -n "$cf_new_cflags" ; then
18017
18018	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18019	CFLAGS="${CFLAGS}$cf_new_cflags"
18020
18021fi
18022
18023if test -n "$cf_new_cppflags" ; then
18024
18025	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18026	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18027
18028fi
18029
18030if test -n "$cf_new_extra_cppflags" ; then
18031
18032	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18033	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18034
18035fi
18036
18037cf_add_libs="$LIBS"
18038# reverse order
18039cf_add_0lib=
18040for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18041# filter duplicates
18042for cf_add_1lib in $cf_add_0lib; do
18043	for cf_add_2lib in $cf_add_libs; do
18044		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18045			cf_add_1lib=
18046			break
18047		fi
18048	done
18049	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18050done
18051LIBS="$cf_add_libs"
18052
18053		cat >"conftest.$ac_ext" <<_ACEOF
18054#line 18054 "configure"
18055#include "confdefs.h"
18056#include <${cf_cv_ncurses_header:-curses.h}>
18057int
18058main (void)
18059{
18060initscr(); mousemask(0,0); tigetstr((char *)0);
18061  ;
18062  return 0;
18063}
18064_ACEOF
18065rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18066if { (eval echo "$as_me:18066: \"$ac_link\"") >&5
18067  (eval $ac_link) 2>&5
18068  ac_status=$?
18069  echo "$as_me:18069: \$? = $ac_status" >&5
18070  (exit "$ac_status"); } &&
18071         { ac_try='test -s "conftest$ac_exeext"'
18072  { (eval echo "$as_me:18072: \"$ac_try\"") >&5
18073  (eval $ac_try) 2>&5
18074  ac_status=$?
18075  echo "$as_me:18075: \$? = $ac_status" >&5
18076  (exit "$ac_status"); }; }; then
18077  if test "$cross_compiling" = yes; then
18078  cf_have_ncuconfig=maybe
18079else
18080  cat >"conftest.$ac_ext" <<_ACEOF
18081#line 18081 "configure"
18082#include "confdefs.h"
18083#include <${cf_cv_ncurses_header:-curses.h}>
18084				int main(void)
18085				{ char *xx = curses_version(); return (xx == 0); }
18086_ACEOF
18087rm -f "conftest$ac_exeext"
18088if { (eval echo "$as_me:18088: \"$ac_link\"") >&5
18089  (eval $ac_link) 2>&5
18090  ac_status=$?
18091  echo "$as_me:18091: \$? = $ac_status" >&5
18092  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18093  { (eval echo "$as_me:18093: \"$ac_try\"") >&5
18094  (eval $ac_try) 2>&5
18095  ac_status=$?
18096  echo "$as_me:18096: \$? = $ac_status" >&5
18097  (exit "$ac_status"); }; }; then
18098  cf_have_ncuconfig=yes
18099else
18100  echo "$as_me: program exited with status $ac_status" >&5
18101echo "$as_me: failed program was:" >&5
18102cat "conftest.$ac_ext" >&5
18103cf_have_ncuconfig=no
18104fi
18105rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18106fi
18107else
18108  echo "$as_me: failed program was:" >&5
18109cat "conftest.$ac_ext" >&5
18110cf_have_ncuconfig=no
18111fi
18112rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18113		echo "$as_me:18113: result: $cf_have_ncuconfig" >&5
18114echo "${ECHO_T}$cf_have_ncuconfig" >&6
18115		test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
18116		if test "$cf_have_ncuconfig" != "yes"
18117		then
18118			CPPFLAGS="$cf_save_CPPFLAGS"
18119			LIBS="$cf_save_LIBS"
18120			NCURSES_CONFIG_PKG=none
18121		else
18122
18123cat >>confdefs.h <<\EOF
18124#define NCURSES 1
18125EOF
18126
18127			NCURSES_CONFIG_PKG=$cf_ncuconfig_root
18128
18129echo "$as_me:18129: checking for terminfo header" >&5
18130echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
18131if test "${cf_cv_term_header+set}" = set; then
18132  echo $ECHO_N "(cached) $ECHO_C" >&6
18133else
18134
18135case "${cf_cv_ncurses_header}" in
18136(*/ncurses.h|*/ncursesw.h)
18137	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
18138	;;
18139(*)
18140	cf_term_header=term.h
18141	;;
18142esac
18143
18144for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
18145do
18146cat >"conftest.$ac_ext" <<_ACEOF
18147#line 18147 "configure"
18148#include "confdefs.h"
18149#include <stdio.h>
18150#include <${cf_cv_ncurses_header:-curses.h}>
18151#include <$cf_test>
18152
18153int
18154main (void)
18155{
18156int x = auto_left_margin; (void)x
18157  ;
18158  return 0;
18159}
18160_ACEOF
18161rm -f "conftest.$ac_objext"
18162if { (eval echo "$as_me:18162: \"$ac_compile\"") >&5
18163  (eval $ac_compile) 2>&5
18164  ac_status=$?
18165  echo "$as_me:18165: \$? = $ac_status" >&5
18166  (exit "$ac_status"); } &&
18167         { ac_try='test -s "conftest.$ac_objext"'
18168  { (eval echo "$as_me:18168: \"$ac_try\"") >&5
18169  (eval $ac_try) 2>&5
18170  ac_status=$?
18171  echo "$as_me:18171: \$? = $ac_status" >&5
18172  (exit "$ac_status"); }; }; then
18173
18174	cf_cv_term_header="$cf_test"
18175else
18176  echo "$as_me: failed program was:" >&5
18177cat "conftest.$ac_ext" >&5
18178
18179	cf_cv_term_header=unknown
18180
18181fi
18182rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18183	test "$cf_cv_term_header" != unknown && break
18184done
18185
18186fi
18187echo "$as_me:18187: result: $cf_cv_term_header" >&5
18188echo "${ECHO_T}$cf_cv_term_header" >&6
18189
18190# Set definitions to allow ifdef'ing to accommodate subdirectories
18191
18192case "$cf_cv_term_header" in
18193(*term.h)
18194
18195cat >>confdefs.h <<\EOF
18196#define HAVE_TERM_H 1
18197EOF
18198
18199	;;
18200esac
18201
18202case "$cf_cv_term_header" in
18203(ncurses/term.h)
18204
18205cat >>confdefs.h <<\EOF
18206#define HAVE_NCURSES_TERM_H 1
18207EOF
18208
18209	;;
18210(ncursesw/term.h)
18211
18212cat >>confdefs.h <<\EOF
18213#define HAVE_NCURSESW_TERM_H 1
18214EOF
18215
18216	;;
18217esac
18218
18219		fi
18220
18221	else
18222		echo "$as_me:18222: result: no" >&5
18223echo "${ECHO_T}no" >&6
18224		NCURSES_CONFIG_PKG=none
18225	fi
18226else
18227	NCURSES_CONFIG_PKG=none
18228fi
18229
18230if test "x$cf_have_ncuconfig" = "xno"; then
18231	cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
18232
18233if test -n "$ac_tool_prefix"; then
18234  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
18235  do
18236    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18237set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18238echo "$as_me:18238: checking for $ac_word" >&5
18239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18240if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
18241  echo $ECHO_N "(cached) $ECHO_C" >&6
18242else
18243  if test -n "$NCURSES_CONFIG"; then
18244  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
18245else
18246  ac_save_IFS=$IFS; IFS=$ac_path_separator
18247ac_dummy="$PATH"
18248for ac_dir in $ac_dummy; do
18249  IFS=$ac_save_IFS
18250  test -z "$ac_dir" && ac_dir=.
18251  $as_executable_p "$ac_dir/$ac_word" || continue
18252ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
18253echo "$as_me:18253: found $ac_dir/$ac_word" >&5
18254break
18255done
18256
18257fi
18258fi
18259NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
18260if test -n "$NCURSES_CONFIG"; then
18261  echo "$as_me:18261: result: $NCURSES_CONFIG" >&5
18262echo "${ECHO_T}$NCURSES_CONFIG" >&6
18263else
18264  echo "$as_me:18264: result: no" >&5
18265echo "${ECHO_T}no" >&6
18266fi
18267
18268    test -n "$NCURSES_CONFIG" && break
18269  done
18270fi
18271if test -z "$NCURSES_CONFIG"; then
18272  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
18273  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
18274do
18275  # Extract the first word of "$ac_prog", so it can be a program name with args.
18276set dummy $ac_prog; ac_word=$2
18277echo "$as_me:18277: checking for $ac_word" >&5
18278echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18279if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
18280  echo $ECHO_N "(cached) $ECHO_C" >&6
18281else
18282  if test -n "$ac_ct_NCURSES_CONFIG"; then
18283  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
18284else
18285  ac_save_IFS=$IFS; IFS=$ac_path_separator
18286ac_dummy="$PATH"
18287for ac_dir in $ac_dummy; do
18288  IFS=$ac_save_IFS
18289  test -z "$ac_dir" && ac_dir=.
18290  $as_executable_p "$ac_dir/$ac_word" || continue
18291ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
18292echo "$as_me:18292: found $ac_dir/$ac_word" >&5
18293break
18294done
18295
18296fi
18297fi
18298ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
18299if test -n "$ac_ct_NCURSES_CONFIG"; then
18300  echo "$as_me:18300: result: $ac_ct_NCURSES_CONFIG" >&5
18301echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
18302else
18303  echo "$as_me:18303: result: no" >&5
18304echo "${ECHO_T}no" >&6
18305fi
18306
18307  test -n "$ac_ct_NCURSES_CONFIG" && break
18308done
18309test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
18310
18311  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
18312fi
18313
18314	if test "$NCURSES_CONFIG" != none ; then
18315
18316cf_fix_cppflags=no
18317cf_new_cflags=
18318cf_new_cppflags=
18319cf_new_extra_cppflags=
18320
18321for cf_add_cflags in `$NCURSES_CONFIG --cflags`
18322do
18323case "$cf_fix_cppflags" in
18324(no)
18325	case "$cf_add_cflags" in
18326	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18327		case "$cf_add_cflags" in
18328		(-D*)
18329			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18330
18331			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18332				&& test -z "${cf_tst_cflags}" \
18333				&& cf_fix_cppflags=yes
18334
18335			if test "$cf_fix_cppflags" = yes ; then
18336
18337	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18338	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18339
18340				continue
18341			elif test "${cf_tst_cflags}" = "\"'" ; then
18342
18343	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18344	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18345
18346				continue
18347			fi
18348			;;
18349		esac
18350		case "$CPPFLAGS" in
18351		(*$cf_add_cflags)
18352			;;
18353		(*)
18354			case "$cf_add_cflags" in
18355			(-D*)
18356				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18357
18358CPPFLAGS=`echo "$CPPFLAGS" | \
18359	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18360		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18361
18362				;;
18363			esac
18364
18365	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18366	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18367
18368			;;
18369		esac
18370		;;
18371	(*)
18372
18373	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18374	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18375
18376		;;
18377	esac
18378	;;
18379(yes)
18380
18381	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18382	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18383
18384	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18385
18386	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18387		&& test -z "${cf_tst_cflags}" \
18388		&& cf_fix_cppflags=no
18389	;;
18390esac
18391done
18392
18393if test -n "$cf_new_cflags" ; then
18394
18395	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18396	CFLAGS="${CFLAGS}$cf_new_cflags"
18397
18398fi
18399
18400if test -n "$cf_new_cppflags" ; then
18401
18402	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18403	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18404
18405fi
18406
18407if test -n "$cf_new_extra_cppflags" ; then
18408
18409	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18410	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18411
18412fi
18413
18414cf_add_libs="$LIBS"
18415# reverse order
18416cf_add_0lib=
18417for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18418# filter duplicates
18419for cf_add_1lib in $cf_add_0lib; do
18420	for cf_add_2lib in $cf_add_libs; do
18421		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18422			cf_add_1lib=
18423			break
18424		fi
18425	done
18426	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18427done
18428LIBS="$cf_add_libs"
18429
18430		# even with config script, some packages use no-override for curses.h
18431
18432echo "$as_me:18432: checking if we have identified curses headers" >&5
18433echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
18434if test "${cf_cv_ncurses_header+set}" = set; then
18435  echo $ECHO_N "(cached) $ECHO_C" >&6
18436else
18437
18438cf_cv_ncurses_header=none
18439for cf_header in \
18440	ncurses.h $cf_cv_screen/ncurses.h \
18441	curses.h $cf_cv_screen/curses.h
18442do
18443cat >"conftest.$ac_ext" <<_ACEOF
18444#line 18444 "configure"
18445#include "confdefs.h"
18446#include <${cf_header}>
18447int
18448main (void)
18449{
18450initscr(); tgoto("?", 0,0)
18451  ;
18452  return 0;
18453}
18454_ACEOF
18455rm -f "conftest.$ac_objext"
18456if { (eval echo "$as_me:18456: \"$ac_compile\"") >&5
18457  (eval $ac_compile) 2>&5
18458  ac_status=$?
18459  echo "$as_me:18459: \$? = $ac_status" >&5
18460  (exit "$ac_status"); } &&
18461         { ac_try='test -s "conftest.$ac_objext"'
18462  { (eval echo "$as_me:18462: \"$ac_try\"") >&5
18463  (eval $ac_try) 2>&5
18464  ac_status=$?
18465  echo "$as_me:18465: \$? = $ac_status" >&5
18466  (exit "$ac_status"); }; }; then
18467  cf_cv_ncurses_header=$cf_header; break
18468else
18469  echo "$as_me: failed program was:" >&5
18470cat "conftest.$ac_ext" >&5
18471fi
18472rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18473done
18474
18475fi
18476echo "$as_me:18476: result: $cf_cv_ncurses_header" >&5
18477echo "${ECHO_T}$cf_cv_ncurses_header" >&6
18478
18479if test "$cf_cv_ncurses_header" = none ; then
18480	{ { echo "$as_me:18480: error: No curses header-files found" >&5
18481echo "$as_me: error: No curses header-files found" >&2;}
18482   { (exit 1); exit 1; }; }
18483fi
18484
18485# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
18486
18487for ac_header in $cf_cv_ncurses_header
18488do
18489as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18490echo "$as_me:18490: checking for $ac_header" >&5
18491echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18492if eval "test \"\${$as_ac_Header+set}\" = set"; then
18493  echo $ECHO_N "(cached) $ECHO_C" >&6
18494else
18495  cat >"conftest.$ac_ext" <<_ACEOF
18496#line 18496 "configure"
18497#include "confdefs.h"
18498#include <$ac_header>
18499_ACEOF
18500if { (eval echo "$as_me:18500: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18501  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18502  ac_status=$?
18503  $EGREP -v '^ *\+' conftest.er1 >conftest.err
18504  rm -f conftest.er1
18505  cat conftest.err >&5
18506  echo "$as_me:18506: \$? = $ac_status" >&5
18507  (exit "$ac_status"); } >/dev/null; then
18508  if test -s conftest.err; then
18509    ac_cpp_err=$ac_c_preproc_warn_flag
18510  else
18511    ac_cpp_err=
18512  fi
18513else
18514  ac_cpp_err=yes
18515fi
18516if test -z "$ac_cpp_err"; then
18517  eval "$as_ac_Header=yes"
18518else
18519  echo "$as_me: failed program was:" >&5
18520  cat "conftest.$ac_ext" >&5
18521  eval "$as_ac_Header=no"
18522fi
18523rm -f conftest.err "conftest.$ac_ext"
18524fi
18525echo "$as_me:18525: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18526echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18527if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18528  cat >>confdefs.h <<EOF
18529#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18530EOF
18531
18532fi
18533done
18534
18535cat >>confdefs.h <<\EOF
18536#define NCURSES 1
18537EOF
18538
18539cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18540
18541		cat >>confdefs.h <<EOF
18542#define $cf_nculib_ROOT 1
18543EOF
18544
18545				cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
18546
18547	else
18548
18549cf_ncuhdr_root=$cf_cv_screen
18550
18551test -n "$cf_cv_curses_dir" && \
18552test "$cf_cv_curses_dir" != "no" && { \
18553
18554if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
18555  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
18556  do
18557	while test "$cf_add_incdir" != /usr/include
18558	do
18559	  if test -d "$cf_add_incdir"
18560	  then
18561		cf_have_incdir=no
18562		if test -n "$CFLAGS$CPPFLAGS" ; then
18563		  # a loop is needed to ensure we can add subdirs of existing dirs
18564		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18565			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18566			  cf_have_incdir=yes; break
18567			fi
18568		  done
18569		fi
18570
18571		if test "$cf_have_incdir" = no ; then
18572		  if test "$cf_add_incdir" = /usr/local/include ; then
18573			if test "$GCC" = yes
18574			then
18575			  cf_save_CPPFLAGS=$CPPFLAGS
18576
18577	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18578	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
18579
18580			  cat >"conftest.$ac_ext" <<_ACEOF
18581#line 18581 "configure"
18582#include "confdefs.h"
18583#include <stdio.h>
18584int
18585main (void)
18586{
18587printf("Hello")
18588  ;
18589  return 0;
18590}
18591_ACEOF
18592rm -f "conftest.$ac_objext"
18593if { (eval echo "$as_me:18593: \"$ac_compile\"") >&5
18594  (eval $ac_compile) 2>&5
18595  ac_status=$?
18596  echo "$as_me:18596: \$? = $ac_status" >&5
18597  (exit "$ac_status"); } &&
18598         { ac_try='test -s "conftest.$ac_objext"'
18599  { (eval echo "$as_me:18599: \"$ac_try\"") >&5
18600  (eval $ac_try) 2>&5
18601  ac_status=$?
18602  echo "$as_me:18602: \$? = $ac_status" >&5
18603  (exit "$ac_status"); }; }; then
18604  :
18605else
18606  echo "$as_me: failed program was:" >&5
18607cat "conftest.$ac_ext" >&5
18608cf_have_incdir=yes
18609fi
18610rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18611			  CPPFLAGS=$cf_save_CPPFLAGS
18612			fi
18613		  fi
18614		fi
18615
18616		if test "$cf_have_incdir" = no ; then
18617		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
18618
18619echo "${as_me:-configure}:18619: testing adding $cf_add_incdir to include-path ..." 1>&5
18620
18621		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18622
18623		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
18624		  test "$cf_top_incdir" = "$cf_add_incdir" && break
18625		  cf_add_incdir="$cf_top_incdir"
18626		else
18627		  break
18628		fi
18629	  else
18630		break
18631	  fi
18632	done
18633  done
18634fi
18635
18636}
18637
18638echo "$as_me:18638: checking for $cf_ncuhdr_root header in include-path" >&5
18639echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
18640if test "${cf_cv_ncurses_h+set}" = set; then
18641  echo $ECHO_N "(cached) $ECHO_C" >&6
18642else
18643
18644	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
18645	{ test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
18646	for cf_header in $cf_header_list
18647	do
18648
18649	cat >"conftest.$ac_ext" <<_ACEOF
18650#line 18650 "configure"
18651#include "confdefs.h"
18652
18653#include <$cf_header>
18654int
18655main (void)
18656{
18657
18658#ifdef NCURSES_VERSION
18659
18660printf("%s\\n", NCURSES_VERSION);
18661#else
18662#ifdef __NCURSES_H
18663printf("old\\n");
18664#else
18665	make an error
18666#endif
18667#endif
18668
18669  ;
18670  return 0;
18671}
18672_ACEOF
18673rm -f "conftest.$ac_objext"
18674if { (eval echo "$as_me:18674: \"$ac_compile\"") >&5
18675  (eval $ac_compile) 2>&5
18676  ac_status=$?
18677  echo "$as_me:18677: \$? = $ac_status" >&5
18678  (exit "$ac_status"); } &&
18679         { ac_try='test -s "conftest.$ac_objext"'
18680  { (eval echo "$as_me:18680: \"$ac_try\"") >&5
18681  (eval $ac_try) 2>&5
18682  ac_status=$?
18683  echo "$as_me:18683: \$? = $ac_status" >&5
18684  (exit "$ac_status"); }; }; then
18685  cf_cv_ncurses_h=$cf_header
18686
18687else
18688  echo "$as_me: failed program was:" >&5
18689cat "conftest.$ac_ext" >&5
18690cf_cv_ncurses_h=no
18691fi
18692rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18693
18694		test "$cf_cv_ncurses_h" != no && break
18695	done
18696
18697fi
18698echo "$as_me:18698: result: $cf_cv_ncurses_h" >&5
18699echo "${ECHO_T}$cf_cv_ncurses_h" >&6
18700
18701if test "$cf_cv_ncurses_h" != no ; then
18702	cf_cv_ncurses_header=$cf_cv_ncurses_h
18703else
18704
18705echo "$as_me:18705: checking for $cf_ncuhdr_root include-path" >&5
18706echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
18707if test "${cf_cv_ncurses_h2+set}" = set; then
18708  echo $ECHO_N "(cached) $ECHO_C" >&6
18709else
18710
18711	test -n "$verbose" && echo
18712
18713cf_search=
18714
18715# collect the current set of include-directories from compiler flags
18716cf_header_path_list=""
18717if test -n "${CFLAGS}${CPPFLAGS}" ; then
18718	for cf_header_path in $CPPFLAGS $CFLAGS
18719	do
18720		case "$cf_header_path" in
18721		(-I*)
18722			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
18723
18724test "x$cf_header_path" != "xNONE" && \
18725test -d "$cf_header_path" && \
18726 {
18727	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
18728	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
18729	test -d "$cf_header_path/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
18730	test -d "$cf_header_path/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
18731	test -d "$cf_header_path/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
18732	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"
18733}
18734
18735			cf_header_path_list="$cf_header_path_list $cf_search"
18736			;;
18737		esac
18738	done
18739fi
18740
18741# add the variations for the package we are looking for
18742
18743cf_search=
18744
18745test "x$prefix" != "xNONE" && \
18746test -d "$prefix" && \
18747 {
18748	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
18749	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
18750	test -d "$prefix/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
18751	test -d "$prefix/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
18752	test -d "$prefix/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
18753	test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
18754}
18755
18756for cf_subdir_prefix in \
18757	/usr \
18758	/usr/local \
18759	/usr/pkg \
18760	/opt \
18761	/opt/local \
18762	$HOME
18763do
18764
18765test "x$cf_subdir_prefix" != "x$prefix" && \
18766test -d "$cf_subdir_prefix" && \
18767{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
18768	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
18769	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
18770	test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
18771	test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
18772	test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
18773	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"
18774}
18775
18776done
18777
18778test "$includedir" != NONE && \
18779test "$includedir" != "/usr/include" && \
18780test -d "$includedir" && {
18781	test -d "$includedir" &&    cf_search="$cf_search $includedir"
18782	test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
18783}
18784
18785test "$oldincludedir" != NONE && \
18786test "$oldincludedir" != "/usr/include" && \
18787test -d "$oldincludedir" && {
18788	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
18789	test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
18790}
18791
18792cf_search="$cf_search $cf_header_path_list"
18793
18794	test -n "$verbose" && echo "search path $cf_search"
18795	cf_save2_CPPFLAGS="$CPPFLAGS"
18796	for cf_incdir in $cf_search
18797	do
18798
18799if test -n "$cf_incdir" ; then
18800  for cf_add_incdir in $cf_incdir
18801  do
18802	while test "$cf_add_incdir" != /usr/include
18803	do
18804	  if test -d "$cf_add_incdir"
18805	  then
18806		cf_have_incdir=no
18807		if test -n "$CFLAGS$CPPFLAGS" ; then
18808		  # a loop is needed to ensure we can add subdirs of existing dirs
18809		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18810			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18811			  cf_have_incdir=yes; break
18812			fi
18813		  done
18814		fi
18815
18816		if test "$cf_have_incdir" = no ; then
18817		  if test "$cf_add_incdir" = /usr/local/include ; then
18818			if test "$GCC" = yes
18819			then
18820			  cf_save_CPPFLAGS=$CPPFLAGS
18821
18822	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18823	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
18824
18825			  cat >"conftest.$ac_ext" <<_ACEOF
18826#line 18826 "configure"
18827#include "confdefs.h"
18828#include <stdio.h>
18829int
18830main (void)
18831{
18832printf("Hello")
18833  ;
18834  return 0;
18835}
18836_ACEOF
18837rm -f "conftest.$ac_objext"
18838if { (eval echo "$as_me:18838: \"$ac_compile\"") >&5
18839  (eval $ac_compile) 2>&5
18840  ac_status=$?
18841  echo "$as_me:18841: \$? = $ac_status" >&5
18842  (exit "$ac_status"); } &&
18843         { ac_try='test -s "conftest.$ac_objext"'
18844  { (eval echo "$as_me:18844: \"$ac_try\"") >&5
18845  (eval $ac_try) 2>&5
18846  ac_status=$?
18847  echo "$as_me:18847: \$? = $ac_status" >&5
18848  (exit "$ac_status"); }; }; then
18849  :
18850else
18851  echo "$as_me: failed program was:" >&5
18852cat "conftest.$ac_ext" >&5
18853cf_have_incdir=yes
18854fi
18855rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18856			  CPPFLAGS=$cf_save_CPPFLAGS
18857			fi
18858		  fi
18859		fi
18860
18861		if test "$cf_have_incdir" = no ; then
18862		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
18863
18864echo "${as_me:-configure}:18864: testing adding $cf_add_incdir to include-path ..." 1>&5
18865
18866		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18867
18868		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
18869		  test "$cf_top_incdir" = "$cf_add_incdir" && break
18870		  cf_add_incdir="$cf_top_incdir"
18871		else
18872		  break
18873		fi
18874	  else
18875		break
18876	  fi
18877	done
18878  done
18879fi
18880
18881		for cf_header in \
18882			ncurses.h \
18883			curses.h
18884		do
18885
18886	cat >"conftest.$ac_ext" <<_ACEOF
18887#line 18887 "configure"
18888#include "confdefs.h"
18889
18890#include <$cf_header>
18891int
18892main (void)
18893{
18894
18895#ifdef NCURSES_VERSION
18896
18897printf("%s\\n", NCURSES_VERSION);
18898#else
18899#ifdef __NCURSES_H
18900printf("old\\n");
18901#else
18902	make an error
18903#endif
18904#endif
18905
18906  ;
18907  return 0;
18908}
18909_ACEOF
18910rm -f "conftest.$ac_objext"
18911if { (eval echo "$as_me:18911: \"$ac_compile\"") >&5
18912  (eval $ac_compile) 2>&5
18913  ac_status=$?
18914  echo "$as_me:18914: \$? = $ac_status" >&5
18915  (exit "$ac_status"); } &&
18916         { ac_try='test -s "conftest.$ac_objext"'
18917  { (eval echo "$as_me:18917: \"$ac_try\"") >&5
18918  (eval $ac_try) 2>&5
18919  ac_status=$?
18920  echo "$as_me:18920: \$? = $ac_status" >&5
18921  (exit "$ac_status"); }; }; then
18922  cf_cv_ncurses_h2=$cf_header
18923
18924else
18925  echo "$as_me: failed program was:" >&5
18926cat "conftest.$ac_ext" >&5
18927cf_cv_ncurses_h2=no
18928fi
18929rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18930
18931			if test "$cf_cv_ncurses_h2" != no ; then
18932				cf_cv_ncurses_h2=$cf_incdir/$cf_header
18933				test -n "$verbose" && echo $ECHO_N "	... found $ECHO_C" 1>&6
18934				break
18935			fi
18936			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
18937		done
18938		CPPFLAGS="$cf_save2_CPPFLAGS"
18939		test "$cf_cv_ncurses_h2" != no && break
18940	done
18941	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:18941: error: not found" >&5
18942echo "$as_me: error: not found" >&2;}
18943   { (exit 1); exit 1; }; }
18944
18945fi
18946echo "$as_me:18946: result: $cf_cv_ncurses_h2" >&5
18947echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
18948
18949	cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
18950	cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
18951	if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
18952		cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
18953	fi
18954
18955if test -n "$cf_1st_incdir" ; then
18956  for cf_add_incdir in $cf_1st_incdir
18957  do
18958	while test "$cf_add_incdir" != /usr/include
18959	do
18960	  if test -d "$cf_add_incdir"
18961	  then
18962		cf_have_incdir=no
18963		if test -n "$CFLAGS$CPPFLAGS" ; then
18964		  # a loop is needed to ensure we can add subdirs of existing dirs
18965		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18966			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18967			  cf_have_incdir=yes; break
18968			fi
18969		  done
18970		fi
18971
18972		if test "$cf_have_incdir" = no ; then
18973		  if test "$cf_add_incdir" = /usr/local/include ; then
18974			if test "$GCC" = yes
18975			then
18976			  cf_save_CPPFLAGS=$CPPFLAGS
18977
18978	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18979	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
18980
18981			  cat >"conftest.$ac_ext" <<_ACEOF
18982#line 18982 "configure"
18983#include "confdefs.h"
18984#include <stdio.h>
18985int
18986main (void)
18987{
18988printf("Hello")
18989  ;
18990  return 0;
18991}
18992_ACEOF
18993rm -f "conftest.$ac_objext"
18994if { (eval echo "$as_me:18994: \"$ac_compile\"") >&5
18995  (eval $ac_compile) 2>&5
18996  ac_status=$?
18997  echo "$as_me:18997: \$? = $ac_status" >&5
18998  (exit "$ac_status"); } &&
18999         { ac_try='test -s "conftest.$ac_objext"'
19000  { (eval echo "$as_me:19000: \"$ac_try\"") >&5
19001  (eval $ac_try) 2>&5
19002  ac_status=$?
19003  echo "$as_me:19003: \$? = $ac_status" >&5
19004  (exit "$ac_status"); }; }; then
19005  :
19006else
19007  echo "$as_me: failed program was:" >&5
19008cat "conftest.$ac_ext" >&5
19009cf_have_incdir=yes
19010fi
19011rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19012			  CPPFLAGS=$cf_save_CPPFLAGS
19013			fi
19014		  fi
19015		fi
19016
19017		if test "$cf_have_incdir" = no ; then
19018		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
19019
19020echo "${as_me:-configure}:19020: testing adding $cf_add_incdir to include-path ..." 1>&5
19021
19022		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19023
19024		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
19025		  test "$cf_top_incdir" = "$cf_add_incdir" && break
19026		  cf_add_incdir="$cf_top_incdir"
19027		else
19028		  break
19029		fi
19030	  else
19031		break
19032	  fi
19033	done
19034  done
19035fi
19036
19037fi
19038
19039# Set definitions to allow ifdef'ing for ncurses.h
19040
19041case "$cf_cv_ncurses_header" in
19042(*ncurses.h)
19043
19044cat >>confdefs.h <<\EOF
19045#define HAVE_NCURSES_H 1
19046EOF
19047
19048	;;
19049esac
19050
19051case "$cf_cv_ncurses_header" in
19052(ncurses/curses.h|ncurses/ncurses.h)
19053
19054cat >>confdefs.h <<\EOF
19055#define HAVE_NCURSES_NCURSES_H 1
19056EOF
19057
19058	;;
19059(ncursesw/curses.h|ncursesw/ncurses.h)
19060
19061cat >>confdefs.h <<\EOF
19062#define HAVE_NCURSESW_NCURSES_H 1
19063EOF
19064
19065	;;
19066esac
19067
19068echo "$as_me:19068: checking for terminfo header" >&5
19069echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
19070if test "${cf_cv_term_header+set}" = set; then
19071  echo $ECHO_N "(cached) $ECHO_C" >&6
19072else
19073
19074case "${cf_cv_ncurses_header}" in
19075(*/ncurses.h|*/ncursesw.h)
19076	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
19077	;;
19078(*)
19079	cf_term_header=term.h
19080	;;
19081esac
19082
19083for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
19084do
19085cat >"conftest.$ac_ext" <<_ACEOF
19086#line 19086 "configure"
19087#include "confdefs.h"
19088#include <stdio.h>
19089#include <${cf_cv_ncurses_header:-curses.h}>
19090#include <$cf_test>
19091
19092int
19093main (void)
19094{
19095int x = auto_left_margin; (void)x
19096  ;
19097  return 0;
19098}
19099_ACEOF
19100rm -f "conftest.$ac_objext"
19101if { (eval echo "$as_me:19101: \"$ac_compile\"") >&5
19102  (eval $ac_compile) 2>&5
19103  ac_status=$?
19104  echo "$as_me:19104: \$? = $ac_status" >&5
19105  (exit "$ac_status"); } &&
19106         { ac_try='test -s "conftest.$ac_objext"'
19107  { (eval echo "$as_me:19107: \"$ac_try\"") >&5
19108  (eval $ac_try) 2>&5
19109  ac_status=$?
19110  echo "$as_me:19110: \$? = $ac_status" >&5
19111  (exit "$ac_status"); }; }; then
19112
19113	cf_cv_term_header="$cf_test"
19114else
19115  echo "$as_me: failed program was:" >&5
19116cat "conftest.$ac_ext" >&5
19117
19118	cf_cv_term_header=unknown
19119
19120fi
19121rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19122	test "$cf_cv_term_header" != unknown && break
19123done
19124
19125fi
19126echo "$as_me:19126: result: $cf_cv_term_header" >&5
19127echo "${ECHO_T}$cf_cv_term_header" >&6
19128
19129# Set definitions to allow ifdef'ing to accommodate subdirectories
19130
19131case "$cf_cv_term_header" in
19132(*term.h)
19133
19134cat >>confdefs.h <<\EOF
19135#define HAVE_TERM_H 1
19136EOF
19137
19138	;;
19139esac
19140
19141case "$cf_cv_term_header" in
19142(ncurses/term.h)
19143
19144cat >>confdefs.h <<\EOF
19145#define HAVE_NCURSES_TERM_H 1
19146EOF
19147
19148	;;
19149(ncursesw/term.h)
19150
19151cat >>confdefs.h <<\EOF
19152#define HAVE_NCURSESW_TERM_H 1
19153EOF
19154
19155	;;
19156esac
19157
19158# some applications need this, but should check for NCURSES_VERSION
19159
19160cat >>confdefs.h <<\EOF
19161#define NCURSES 1
19162EOF
19163
19164echo "$as_me:19164: checking for ncurses version" >&5
19165echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
19166if test "${cf_cv_ncurses_version+set}" = set; then
19167  echo $ECHO_N "(cached) $ECHO_C" >&6
19168else
19169
19170	cf_cv_ncurses_version=no
19171	cf_tempfile=out$$
19172	rm -f "$cf_tempfile"
19173	if test "$cross_compiling" = yes; then
19174
19175	# This will not work if the preprocessor splits the line after the
19176	# Autoconf token.  The 'unproto' program does that.
19177	cat > "conftest.$ac_ext" <<EOF
19178#include <${cf_cv_ncurses_header:-curses.h}>
19179#undef Autoconf
19180#ifdef NCURSES_VERSION
19181Autoconf NCURSES_VERSION
19182#else
19183#ifdef __NCURSES_H
19184Autoconf "old"
19185#endif
19186;
19187#endif
19188EOF
19189	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
19190	{ (eval echo "$as_me:19190: \"$cf_try\"") >&5
19191  (eval $cf_try) 2>&5
19192  ac_status=$?
19193  echo "$as_me:19193: \$? = $ac_status" >&5
19194  (exit "$ac_status"); }
19195	if test -f conftest.out ; then
19196		cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
19197		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
19198		rm -f conftest.out
19199	fi
19200
19201else
19202  cat >"conftest.$ac_ext" <<_ACEOF
19203#line 19203 "configure"
19204#include "confdefs.h"
19205
19206#include <${cf_cv_ncurses_header:-curses.h}>
19207#include <stdio.h>
19208int main(void)
19209{
19210	FILE *fp = fopen("$cf_tempfile", "w");
19211#ifdef NCURSES_VERSION
19212# ifdef NCURSES_VERSION_PATCH
19213	fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
19214# else
19215	fprintf(fp, "%s\\n", NCURSES_VERSION);
19216# endif
19217#else
19218# ifdef __NCURSES_H
19219	fprintf(fp, "old\\n");
19220# else
19221	make an error
19222# endif
19223#endif
19224	${cf_cv_main_return:-return}(0);
19225}
19226_ACEOF
19227rm -f "conftest$ac_exeext"
19228if { (eval echo "$as_me:19228: \"$ac_link\"") >&5
19229  (eval $ac_link) 2>&5
19230  ac_status=$?
19231  echo "$as_me:19231: \$? = $ac_status" >&5
19232  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19233  { (eval echo "$as_me:19233: \"$ac_try\"") >&5
19234  (eval $ac_try) 2>&5
19235  ac_status=$?
19236  echo "$as_me:19236: \$? = $ac_status" >&5
19237  (exit "$ac_status"); }; }; then
19238
19239	cf_cv_ncurses_version=`cat $cf_tempfile`
19240else
19241  echo "$as_me: program exited with status $ac_status" >&5
19242echo "$as_me: failed program was:" >&5
19243cat "conftest.$ac_ext" >&5
19244fi
19245rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19246fi
19247	rm -f "$cf_tempfile"
19248
19249fi
19250echo "$as_me:19250: result: $cf_cv_ncurses_version" >&5
19251echo "${ECHO_T}$cf_cv_ncurses_version" >&6
19252test "$cf_cv_ncurses_version" = no ||
19253cat >>confdefs.h <<\EOF
19254#define NCURSES 1
19255EOF
19256
19257cf_nculib_root=$cf_cv_screen
19258	# This works, except for the special case where we find gpm, but
19259	# ncurses is in a nonstandard location via $LIBS, and we really want
19260	# to link gpm.
19261cf_ncurses_LIBS=""
19262cf_ncurses_SAVE="$LIBS"
19263echo "$as_me:19263: checking for Gpm_Open in -lgpm" >&5
19264echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
19265if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
19266  echo $ECHO_N "(cached) $ECHO_C" >&6
19267else
19268  ac_check_lib_save_LIBS=$LIBS
19269LIBS="-lgpm  $LIBS"
19270cat >"conftest.$ac_ext" <<_ACEOF
19271#line 19271 "configure"
19272#include "confdefs.h"
19273
19274/* Override any gcc2 internal prototype to avoid an error.  */
19275#ifdef __cplusplus
19276extern "C"
19277#endif
19278/* We use char because int might match the return type of a gcc2
19279   builtin and then its argument prototype would still apply.  */
19280char Gpm_Open ();
19281int
19282main (void)
19283{
19284Gpm_Open ();
19285  ;
19286  return 0;
19287}
19288_ACEOF
19289rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19290if { (eval echo "$as_me:19290: \"$ac_link\"") >&5
19291  (eval $ac_link) 2>&5
19292  ac_status=$?
19293  echo "$as_me:19293: \$? = $ac_status" >&5
19294  (exit "$ac_status"); } &&
19295         { ac_try='test -s "conftest$ac_exeext"'
19296  { (eval echo "$as_me:19296: \"$ac_try\"") >&5
19297  (eval $ac_try) 2>&5
19298  ac_status=$?
19299  echo "$as_me:19299: \$? = $ac_status" >&5
19300  (exit "$ac_status"); }; }; then
19301  ac_cv_lib_gpm_Gpm_Open=yes
19302else
19303  echo "$as_me: failed program was:" >&5
19304cat "conftest.$ac_ext" >&5
19305ac_cv_lib_gpm_Gpm_Open=no
19306fi
19307rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19308LIBS=$ac_check_lib_save_LIBS
19309fi
19310echo "$as_me:19310: result: $ac_cv_lib_gpm_Gpm_Open" >&5
19311echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
19312if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
19313  echo "$as_me:19313: checking for initscr in -lgpm" >&5
19314echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
19315if test "${ac_cv_lib_gpm_initscr+set}" = set; then
19316  echo $ECHO_N "(cached) $ECHO_C" >&6
19317else
19318  ac_check_lib_save_LIBS=$LIBS
19319LIBS="-lgpm  $LIBS"
19320cat >"conftest.$ac_ext" <<_ACEOF
19321#line 19321 "configure"
19322#include "confdefs.h"
19323
19324/* Override any gcc2 internal prototype to avoid an error.  */
19325#ifdef __cplusplus
19326extern "C"
19327#endif
19328/* We use char because int might match the return type of a gcc2
19329   builtin and then its argument prototype would still apply.  */
19330char initscr ();
19331int
19332main (void)
19333{
19334initscr ();
19335  ;
19336  return 0;
19337}
19338_ACEOF
19339rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19340if { (eval echo "$as_me:19340: \"$ac_link\"") >&5
19341  (eval $ac_link) 2>&5
19342  ac_status=$?
19343  echo "$as_me:19343: \$? = $ac_status" >&5
19344  (exit "$ac_status"); } &&
19345         { ac_try='test -s "conftest$ac_exeext"'
19346  { (eval echo "$as_me:19346: \"$ac_try\"") >&5
19347  (eval $ac_try) 2>&5
19348  ac_status=$?
19349  echo "$as_me:19349: \$? = $ac_status" >&5
19350  (exit "$ac_status"); }; }; then
19351  ac_cv_lib_gpm_initscr=yes
19352else
19353  echo "$as_me: failed program was:" >&5
19354cat "conftest.$ac_ext" >&5
19355ac_cv_lib_gpm_initscr=no
19356fi
19357rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19358LIBS=$ac_check_lib_save_LIBS
19359fi
19360echo "$as_me:19360: result: $ac_cv_lib_gpm_initscr" >&5
19361echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
19362if test "$ac_cv_lib_gpm_initscr" = yes; then
19363  LIBS="$cf_ncurses_SAVE"
19364else
19365  cf_ncurses_LIBS="-lgpm"
19366fi
19367
19368fi
19369
19370case "$host_os" in
19371(freebsd*)
19372	# This is only necessary if you are linking against an obsolete
19373	# version of ncurses (but it should do no harm, since it's static).
19374	if test "$cf_nculib_root" = ncurses ; then
19375		echo "$as_me:19375: checking for tgoto in -lmytinfo" >&5
19376echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
19377if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
19378  echo $ECHO_N "(cached) $ECHO_C" >&6
19379else
19380  ac_check_lib_save_LIBS=$LIBS
19381LIBS="-lmytinfo  $LIBS"
19382cat >"conftest.$ac_ext" <<_ACEOF
19383#line 19383 "configure"
19384#include "confdefs.h"
19385
19386/* Override any gcc2 internal prototype to avoid an error.  */
19387#ifdef __cplusplus
19388extern "C"
19389#endif
19390/* We use char because int might match the return type of a gcc2
19391   builtin and then its argument prototype would still apply.  */
19392char tgoto ();
19393int
19394main (void)
19395{
19396tgoto ();
19397  ;
19398  return 0;
19399}
19400_ACEOF
19401rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19402if { (eval echo "$as_me:19402: \"$ac_link\"") >&5
19403  (eval $ac_link) 2>&5
19404  ac_status=$?
19405  echo "$as_me:19405: \$? = $ac_status" >&5
19406  (exit "$ac_status"); } &&
19407         { ac_try='test -s "conftest$ac_exeext"'
19408  { (eval echo "$as_me:19408: \"$ac_try\"") >&5
19409  (eval $ac_try) 2>&5
19410  ac_status=$?
19411  echo "$as_me:19411: \$? = $ac_status" >&5
19412  (exit "$ac_status"); }; }; then
19413  ac_cv_lib_mytinfo_tgoto=yes
19414else
19415  echo "$as_me: failed program was:" >&5
19416cat "conftest.$ac_ext" >&5
19417ac_cv_lib_mytinfo_tgoto=no
19418fi
19419rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19420LIBS=$ac_check_lib_save_LIBS
19421fi
19422echo "$as_me:19422: result: $ac_cv_lib_mytinfo_tgoto" >&5
19423echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
19424if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
19425  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
19426fi
19427
19428	fi
19429	;;
19430esac
19431
19432cf_add_libs="$LIBS"
19433# reverse order
19434cf_add_0lib=
19435for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19436# filter duplicates
19437for cf_add_1lib in $cf_add_0lib; do
19438	for cf_add_2lib in $cf_add_libs; do
19439		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19440			cf_add_1lib=
19441			break
19442		fi
19443	done
19444	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19445done
19446LIBS="$cf_add_libs"
19447
19448if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
19449then
19450
19451cf_add_libs="$LIBS"
19452# reverse order
19453cf_add_0lib=
19454for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19455# filter duplicates
19456for cf_add_1lib in $cf_add_0lib; do
19457	for cf_add_2lib in $cf_add_libs; do
19458		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19459			cf_add_1lib=
19460			break
19461		fi
19462	done
19463	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19464done
19465LIBS="$cf_add_libs"
19466
19467else
19468
19469	eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
19470	cf_libdir=""
19471	echo "$as_me:19471: checking for initscr" >&5
19472echo $ECHO_N "checking for initscr... $ECHO_C" >&6
19473if test "${ac_cv_func_initscr+set}" = set; then
19474  echo $ECHO_N "(cached) $ECHO_C" >&6
19475else
19476  cat >"conftest.$ac_ext" <<_ACEOF
19477#line 19477 "configure"
19478#include "confdefs.h"
19479#define initscr autoconf_temporary
19480#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
19481#undef initscr
19482
19483#ifdef __cplusplus
19484extern "C"
19485#endif
19486
19487/* We use char because int might match the return type of a gcc2
19488   builtin and then its argument prototype would still apply.  */
19489char initscr (void);
19490
19491int
19492main (void)
19493{
19494
19495/* The GNU C library defines stubs for functions which it implements
19496    to always fail with ENOSYS.  Some functions are actually named
19497    something starting with __ and the normal name is an alias.  */
19498#if defined (__stub_initscr) || defined (__stub___initscr)
19499#error found stub for initscr
19500#endif
19501
19502	return initscr ();
19503  ;
19504  return 0;
19505}
19506_ACEOF
19507rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19508if { (eval echo "$as_me:19508: \"$ac_link\"") >&5
19509  (eval $ac_link) 2>&5
19510  ac_status=$?
19511  echo "$as_me:19511: \$? = $ac_status" >&5
19512  (exit "$ac_status"); } &&
19513         { ac_try='test -s "conftest$ac_exeext"'
19514  { (eval echo "$as_me:19514: \"$ac_try\"") >&5
19515  (eval $ac_try) 2>&5
19516  ac_status=$?
19517  echo "$as_me:19517: \$? = $ac_status" >&5
19518  (exit "$ac_status"); }; }; then
19519  ac_cv_func_initscr=yes
19520else
19521  echo "$as_me: failed program was:" >&5
19522cat "conftest.$ac_ext" >&5
19523ac_cv_func_initscr=no
19524fi
19525rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19526fi
19527echo "$as_me:19527: result: $ac_cv_func_initscr" >&5
19528echo "${ECHO_T}$ac_cv_func_initscr" >&6
19529if test "$ac_cv_func_initscr" = yes; then
19530  eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
19531else
19532
19533		cf_save_LIBS="$LIBS"
19534		echo "$as_me:19534: checking for initscr in -l$cf_nculib_root" >&5
19535echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
19536		LIBS="-l$cf_nculib_root $LIBS"
19537		cat >"conftest.$ac_ext" <<_ACEOF
19538#line 19538 "configure"
19539#include "confdefs.h"
19540#include <${cf_cv_ncurses_header:-curses.h}>
19541int
19542main (void)
19543{
19544initscr()
19545  ;
19546  return 0;
19547}
19548_ACEOF
19549rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19550if { (eval echo "$as_me:19550: \"$ac_link\"") >&5
19551  (eval $ac_link) 2>&5
19552  ac_status=$?
19553  echo "$as_me:19553: \$? = $ac_status" >&5
19554  (exit "$ac_status"); } &&
19555         { ac_try='test -s "conftest$ac_exeext"'
19556  { (eval echo "$as_me:19556: \"$ac_try\"") >&5
19557  (eval $ac_try) 2>&5
19558  ac_status=$?
19559  echo "$as_me:19559: \$? = $ac_status" >&5
19560  (exit "$ac_status"); }; }; then
19561  echo "$as_me:19561: result: yes" >&5
19562echo "${ECHO_T}yes" >&6
19563			 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
19564
19565else
19566  echo "$as_me: failed program was:" >&5
19567cat "conftest.$ac_ext" >&5
19568echo "$as_me:19568: result: no" >&5
19569echo "${ECHO_T}no" >&6
19570
19571cf_search=
19572cf_library_path_list=""
19573if test -n "${LDFLAGS}${LIBS}" ; then
19574	for cf_library_path in $LDFLAGS $LIBS
19575	do
19576		case "$cf_library_path" in
19577		(-L*)
19578			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
19579
19580test "x$cf_library_path" != "xNONE" && \
19581test -d "$cf_library_path" && \
19582 {
19583	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
19584	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
19585	test -d "$cf_library_path/lib/$cf_nculib_root" &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
19586	test -d "$cf_library_path/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
19587	test -d "$cf_library_path/$cf_nculib_root/lib" &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
19588	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"
19589}
19590
19591			cf_library_path_list="$cf_library_path_list $cf_search"
19592			;;
19593		esac
19594	done
19595fi
19596
19597cf_search=
19598
19599test "x$prefix" != "xNONE" && \
19600test -d "$prefix" && \
19601 {
19602	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
19603	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
19604	test -d "$prefix/lib/$cf_nculib_root" &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
19605	test -d "$prefix/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
19606	test -d "$prefix/$cf_nculib_root/lib" &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
19607	test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
19608}
19609
19610for cf_subdir_prefix in \
19611	/usr \
19612	/usr/local \
19613	/usr/pkg \
19614	/opt \
19615	/opt/local \
19616	$HOME
19617do
19618
19619test "x$cf_subdir_prefix" != "x$prefix" && \
19620test -d "$cf_subdir_prefix" && \
19621{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
19622	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
19623	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19624	test -d "$cf_subdir_prefix/lib/$cf_nculib_root" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
19625	test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
19626	test -d "$cf_subdir_prefix/$cf_nculib_root/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
19627	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"
19628}
19629
19630done
19631
19632cf_search="$cf_library_path_list $cf_search"
19633
19634			for cf_libdir in $cf_search
19635			do
19636				echo "$as_me:19636: checking for -l$cf_nculib_root in $cf_libdir" >&5
19637echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
19638				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
19639				cat >"conftest.$ac_ext" <<_ACEOF
19640#line 19640 "configure"
19641#include "confdefs.h"
19642#include <${cf_cv_ncurses_header:-curses.h}>
19643int
19644main (void)
19645{
19646initscr()
19647  ;
19648  return 0;
19649}
19650_ACEOF
19651rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19652if { (eval echo "$as_me:19652: \"$ac_link\"") >&5
19653  (eval $ac_link) 2>&5
19654  ac_status=$?
19655  echo "$as_me:19655: \$? = $ac_status" >&5
19656  (exit "$ac_status"); } &&
19657         { ac_try='test -s "conftest$ac_exeext"'
19658  { (eval echo "$as_me:19658: \"$ac_try\"") >&5
19659  (eval $ac_try) 2>&5
19660  ac_status=$?
19661  echo "$as_me:19661: \$? = $ac_status" >&5
19662  (exit "$ac_status"); }; }; then
19663  echo "$as_me:19663: result: yes" >&5
19664echo "${ECHO_T}yes" >&6
19665			 		 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
19666					 break
19667else
19668  echo "$as_me: failed program was:" >&5
19669cat "conftest.$ac_ext" >&5
19670echo "$as_me:19670: result: no" >&5
19671echo "${ECHO_T}no" >&6
19672					 LIBS="$cf_save_LIBS"
19673fi
19674rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19675			done
19676
19677fi
19678rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19679
19680fi
19681
19682eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
19683
19684if test "$cf_found_library" = no ; then
19685	{ { echo "$as_me:19685: error: Cannot link $cf_nculib_root library" >&5
19686echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
19687   { (exit 1); exit 1; }; }
19688fi
19689
19690fi
19691
19692if test -n "$cf_ncurses_LIBS" ; then
19693	echo "$as_me:19693: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
19694echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
19695	cf_ncurses_SAVE="$LIBS"
19696	for p in $cf_ncurses_LIBS ; do
19697		q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
19698		if test "$q" != "$LIBS" ; then
19699			LIBS="$q"
19700		fi
19701	done
19702	cat >"conftest.$ac_ext" <<_ACEOF
19703#line 19703 "configure"
19704#include "confdefs.h"
19705#include <${cf_cv_ncurses_header:-curses.h}>
19706int
19707main (void)
19708{
19709initscr(); mousemask(0,0); tigetstr((char *)0);
19710  ;
19711  return 0;
19712}
19713_ACEOF
19714rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19715if { (eval echo "$as_me:19715: \"$ac_link\"") >&5
19716  (eval $ac_link) 2>&5
19717  ac_status=$?
19718  echo "$as_me:19718: \$? = $ac_status" >&5
19719  (exit "$ac_status"); } &&
19720         { ac_try='test -s "conftest$ac_exeext"'
19721  { (eval echo "$as_me:19721: \"$ac_try\"") >&5
19722  (eval $ac_try) 2>&5
19723  ac_status=$?
19724  echo "$as_me:19724: \$? = $ac_status" >&5
19725  (exit "$ac_status"); }; }; then
19726  echo "$as_me:19726: result: yes" >&5
19727echo "${ECHO_T}yes" >&6
19728else
19729  echo "$as_me: failed program was:" >&5
19730cat "conftest.$ac_ext" >&5
19731echo "$as_me:19731: result: no" >&5
19732echo "${ECHO_T}no" >&6
19733		 LIBS="$cf_ncurses_SAVE"
19734fi
19735rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19736fi
19737
19738cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19739
19740cat >>confdefs.h <<EOF
19741#define $cf_nculib_ROOT 1
19742EOF
19743
19744	fi
19745else
19746	NCURSES_CONFIG=none
19747fi
19748
19749	;;
19750(pdcurses)
19751
19752cf_x_athena=${cf_x_athena:-Xaw}
19753
19754echo "$as_me:19754: checking if you want to link with Xaw 3d library" >&5
19755echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
19756withval=
19757
19758# Check whether --with-Xaw3d or --without-Xaw3d was given.
19759if test "${with_Xaw3d+set}" = set; then
19760  withval="$with_Xaw3d"
19761
19762fi;
19763if test "$withval" = yes ; then
19764	cf_x_athena=Xaw3d
19765	echo "$as_me:19765: result: yes" >&5
19766echo "${ECHO_T}yes" >&6
19767else
19768	echo "$as_me:19768: result: no" >&5
19769echo "${ECHO_T}no" >&6
19770fi
19771
19772echo "$as_me:19772: checking if you want to link with Xaw 3d xft library" >&5
19773echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
19774withval=
19775
19776# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
19777if test "${with_Xaw3dxft+set}" = set; then
19778  withval="$with_Xaw3dxft"
19779
19780fi;
19781if test "$withval" = yes ; then
19782	cf_x_athena=Xaw3dxft
19783	echo "$as_me:19783: result: yes" >&5
19784echo "${ECHO_T}yes" >&6
19785else
19786	echo "$as_me:19786: result: no" >&5
19787echo "${ECHO_T}no" >&6
19788fi
19789
19790echo "$as_me:19790: checking if you want to link with neXT Athena library" >&5
19791echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
19792withval=
19793
19794# Check whether --with-neXtaw or --without-neXtaw was given.
19795if test "${with_neXtaw+set}" = set; then
19796  withval="$with_neXtaw"
19797
19798fi;
19799if test "$withval" = yes ; then
19800	cf_x_athena=neXtaw
19801	echo "$as_me:19801: result: yes" >&5
19802echo "${ECHO_T}yes" >&6
19803else
19804	echo "$as_me:19804: result: no" >&5
19805echo "${ECHO_T}no" >&6
19806fi
19807
19808echo "$as_me:19808: checking if you want to link with Athena-Plus library" >&5
19809echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
19810withval=
19811
19812# Check whether --with-XawPlus or --without-XawPlus was given.
19813if test "${with_XawPlus+set}" = set; then
19814  withval="$with_XawPlus"
19815
19816fi;
19817if test "$withval" = yes ; then
19818	cf_x_athena=XawPlus
19819	echo "$as_me:19819: result: yes" >&5
19820echo "${ECHO_T}yes" >&6
19821else
19822	echo "$as_me:19822: result: no" >&5
19823echo "${ECHO_T}no" >&6
19824fi
19825
19826cf_x_athena_lib=""
19827
19828if test "$PKG_CONFIG" != none ; then
19829	cf_athena_list=
19830	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
19831	for cf_athena_pkg in \
19832		$cf_athena_list \
19833		${cf_x_athena} \
19834		${cf_x_athena}-devel \
19835		lib${cf_x_athena} \
19836		lib${cf_x_athena}-devel
19837	do
19838
19839if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
19840	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
19841
19842echo "${as_me:-configure}:19842: testing found package $cf_athena_pkg ..." 1>&5
19843
19844	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
19845	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_athena_pkg" 2>/dev/null`"
19846	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
19847
19848echo "${as_me:-configure}:19848: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19849
19850	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
19851
19852echo "${as_me:-configure}:19852: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
19853
19854cf_fix_cppflags=no
19855cf_new_cflags=
19856cf_new_cppflags=
19857cf_new_extra_cppflags=
19858
19859for cf_add_cflags in $cf_pkgconfig_incs
19860do
19861case "$cf_fix_cppflags" in
19862(no)
19863	case "$cf_add_cflags" in
19864	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19865		case "$cf_add_cflags" in
19866		(-D*)
19867			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19868
19869			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19870				&& test -z "${cf_tst_cflags}" \
19871				&& cf_fix_cppflags=yes
19872
19873			if test "$cf_fix_cppflags" = yes ; then
19874
19875	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19876	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19877
19878				continue
19879			elif test "${cf_tst_cflags}" = "\"'" ; then
19880
19881	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19882	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19883
19884				continue
19885			fi
19886			;;
19887		esac
19888		case "$CPPFLAGS" in
19889		(*$cf_add_cflags)
19890			;;
19891		(*)
19892			case "$cf_add_cflags" in
19893			(-D*)
19894				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19895
19896CPPFLAGS=`echo "$CPPFLAGS" | \
19897	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19898		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19899
19900				;;
19901			esac
19902
19903	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19904	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19905
19906			;;
19907		esac
19908		;;
19909	(*)
19910
19911	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19912	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19913
19914		;;
19915	esac
19916	;;
19917(yes)
19918
19919	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19920	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19921
19922	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19923
19924	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19925		&& test -z "${cf_tst_cflags}" \
19926		&& cf_fix_cppflags=no
19927	;;
19928esac
19929done
19930
19931if test -n "$cf_new_cflags" ; then
19932
19933	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19934	CFLAGS="${CFLAGS}$cf_new_cflags"
19935
19936fi
19937
19938if test -n "$cf_new_cppflags" ; then
19939
19940	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19941	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19942
19943fi
19944
19945if test -n "$cf_new_extra_cppflags" ; then
19946
19947	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19948	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19949
19950fi
19951
19952cf_add_libs="$LIBS"
19953# reverse order
19954cf_add_0lib=
19955for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19956# filter duplicates
19957for cf_add_1lib in $cf_add_0lib; do
19958	for cf_add_2lib in $cf_add_libs; do
19959		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19960			cf_add_1lib=
19961			break
19962		fi
19963	done
19964	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19965done
19966LIBS="$cf_add_libs"
19967
19968			cf_x_athena_lib="$cf_pkgconfig_libs"
19969
19970cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19971
19972			cat >>confdefs.h <<EOF
19973#define $cf_x_athena_LIBS 1
19974EOF
19975
19976	for cf_trim_lib in Xmu Xt X11
19977	do
19978		case "$LIBS" in
19979		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
19980			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
19981			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
19982
19983echo "${as_me:-configure}:19983: testing ..trimmed $LIBS ..." 1>&5
19984
19985			;;
19986		esac
19987	done
19988
19989echo "$as_me:19989: checking for usable $cf_x_athena/Xmu package" >&5
19990echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
19991if test "${cf_cv_xaw_compat+set}" = set; then
19992  echo $ECHO_N "(cached) $ECHO_C" >&6
19993else
19994
19995cat >"conftest.$ac_ext" <<_ACEOF
19996#line 19996 "configure"
19997#include "confdefs.h"
19998
19999#include <X11/Xmu/CharSet.h>
20000
20001int
20002main (void)
20003{
20004
20005int check = XmuCompareISOLatin1("big", "small");
20006(void)check;
20007
20008  ;
20009  return 0;
20010}
20011_ACEOF
20012rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20013if { (eval echo "$as_me:20013: \"$ac_link\"") >&5
20014  (eval $ac_link) 2>&5
20015  ac_status=$?
20016  echo "$as_me:20016: \$? = $ac_status" >&5
20017  (exit "$ac_status"); } &&
20018         { ac_try='test -s "conftest$ac_exeext"'
20019  { (eval echo "$as_me:20019: \"$ac_try\"") >&5
20020  (eval $ac_try) 2>&5
20021  ac_status=$?
20022  echo "$as_me:20022: \$? = $ac_status" >&5
20023  (exit "$ac_status"); }; }; then
20024  cf_cv_xaw_compat=yes
20025else
20026  echo "$as_me: failed program was:" >&5
20027cat "conftest.$ac_ext" >&5
20028cf_cv_xaw_compat=no
20029fi
20030rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20031fi
20032echo "$as_me:20032: result: $cf_cv_xaw_compat" >&5
20033echo "${ECHO_T}$cf_cv_xaw_compat" >&6
20034
20035			if test "$cf_cv_xaw_compat" = no
20036			then
20037				# workaround for broken ".pc" files...
20038				case "$cf_x_athena_lib" in
20039				(*-lXmu*)
20040					;;
20041				(*)
20042					test -n "$verbose" && echo "	work around broken package" 1>&6
20043
20044echo "${as_me:-configure}:20044: testing work around broken package ..." 1>&5
20045
20046					cf_save_xmu="$LIBS"
20047					cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
20048
20049if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
20050	test -n "$verbose" && echo "	found package xmu" 1>&6
20051
20052echo "${as_me:-configure}:20052: testing found package xmu ..." 1>&5
20053
20054	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
20055	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xmu" 2>/dev/null`"
20056	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
20057
20058echo "${as_me:-configure}:20058: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20059
20060	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
20061
20062echo "${as_me:-configure}:20062: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
20063
20064cf_fix_cppflags=no
20065cf_new_cflags=
20066cf_new_cppflags=
20067cf_new_extra_cppflags=
20068
20069for cf_add_cflags in $cf_pkgconfig_incs
20070do
20071case "$cf_fix_cppflags" in
20072(no)
20073	case "$cf_add_cflags" in
20074	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20075		case "$cf_add_cflags" in
20076		(-D*)
20077			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20078
20079			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20080				&& test -z "${cf_tst_cflags}" \
20081				&& cf_fix_cppflags=yes
20082
20083			if test "$cf_fix_cppflags" = yes ; then
20084
20085	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20086	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20087
20088				continue
20089			elif test "${cf_tst_cflags}" = "\"'" ; then
20090
20091	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20092	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20093
20094				continue
20095			fi
20096			;;
20097		esac
20098		case "$CPPFLAGS" in
20099		(*$cf_add_cflags)
20100			;;
20101		(*)
20102			case "$cf_add_cflags" in
20103			(-D*)
20104				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20105
20106CPPFLAGS=`echo "$CPPFLAGS" | \
20107	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20108		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20109
20110				;;
20111			esac
20112
20113	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20114	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20115
20116			;;
20117		esac
20118		;;
20119	(*)
20120
20121	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20122	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20123
20124		;;
20125	esac
20126	;;
20127(yes)
20128
20129	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20130	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20131
20132	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20133
20134	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20135		&& test -z "${cf_tst_cflags}" \
20136		&& cf_fix_cppflags=no
20137	;;
20138esac
20139done
20140
20141if test -n "$cf_new_cflags" ; then
20142
20143	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20144	CFLAGS="${CFLAGS}$cf_new_cflags"
20145
20146fi
20147
20148if test -n "$cf_new_cppflags" ; then
20149
20150	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20151	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20152
20153fi
20154
20155if test -n "$cf_new_extra_cppflags" ; then
20156
20157	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20158	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20159
20160fi
20161
20162cf_add_libs="$LIBS"
20163# reverse order
20164cf_add_0lib=
20165for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20166# filter duplicates
20167for cf_add_1lib in $cf_add_0lib; do
20168	for cf_add_2lib in $cf_add_libs; do
20169		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20170			cf_add_1lib=
20171			break
20172		fi
20173	done
20174	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20175done
20176LIBS="$cf_add_libs"
20177
20178							LIBS="$cf_save_xmu"
20179
20180test -n "$verbose" && echo "	...before $LIBS" 1>&6
20181
20182echo "${as_me:-configure}:20182: testing ...before $LIBS ..." 1>&5
20183
20184LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
20185test -n "$verbose" && echo "	...after  $LIBS" 1>&6
20186
20187echo "${as_me:-configure}:20187: testing ...after  $LIBS ..." 1>&5
20188
20189else
20190	cf_pkgconfig_incs=
20191	cf_pkgconfig_libs=
20192
20193test -n "$verbose" && echo "	...before $LIBS" 1>&6
20194
20195echo "${as_me:-configure}:20195: testing ...before $LIBS ..." 1>&5
20196
20197LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
20198test -n "$verbose" && echo "	...after  $LIBS" 1>&6
20199
20200echo "${as_me:-configure}:20200: testing ...after  $LIBS ..." 1>&5
20201
20202fi
20203
20204	for cf_trim_lib in Xmu Xt X11
20205	do
20206		case "$LIBS" in
20207		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
20208			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
20209			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
20210
20211echo "${as_me:-configure}:20211: testing ..trimmed $LIBS ..." 1>&5
20212
20213			;;
20214		esac
20215	done
20216
20217					;;
20218				esac
20219			fi
20220
20221			break
20222else
20223	cf_pkgconfig_incs=
20224	cf_pkgconfig_libs=
20225	:
20226fi
20227
20228	done
20229fi
20230
20231if test -z "$cf_x_athena_lib" ; then
20232
20233if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
20234	test -n "$verbose" && echo "	found package Xext" 1>&6
20235
20236echo "${as_me:-configure}:20236: testing found package Xext ..." 1>&5
20237
20238	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
20239	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "Xext" 2>/dev/null`"
20240	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
20241
20242echo "${as_me:-configure}:20242: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20243
20244	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
20245
20246echo "${as_me:-configure}:20246: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
20247
20248cf_fix_cppflags=no
20249cf_new_cflags=
20250cf_new_cppflags=
20251cf_new_extra_cppflags=
20252
20253for cf_add_cflags in $cf_pkgconfig_incs
20254do
20255case "$cf_fix_cppflags" in
20256(no)
20257	case "$cf_add_cflags" in
20258	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20259		case "$cf_add_cflags" in
20260		(-D*)
20261			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20262
20263			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20264				&& test -z "${cf_tst_cflags}" \
20265				&& cf_fix_cppflags=yes
20266
20267			if test "$cf_fix_cppflags" = yes ; then
20268
20269	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20270	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20271
20272				continue
20273			elif test "${cf_tst_cflags}" = "\"'" ; then
20274
20275	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20276	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20277
20278				continue
20279			fi
20280			;;
20281		esac
20282		case "$CPPFLAGS" in
20283		(*$cf_add_cflags)
20284			;;
20285		(*)
20286			case "$cf_add_cflags" in
20287			(-D*)
20288				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20289
20290CPPFLAGS=`echo "$CPPFLAGS" | \
20291	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20292		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20293
20294				;;
20295			esac
20296
20297	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20298	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20299
20300			;;
20301		esac
20302		;;
20303	(*)
20304
20305	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20306	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20307
20308		;;
20309	esac
20310	;;
20311(yes)
20312
20313	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20314	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20315
20316	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20317
20318	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20319		&& test -z "${cf_tst_cflags}" \
20320		&& cf_fix_cppflags=no
20321	;;
20322esac
20323done
20324
20325if test -n "$cf_new_cflags" ; then
20326
20327	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20328	CFLAGS="${CFLAGS}$cf_new_cflags"
20329
20330fi
20331
20332if test -n "$cf_new_cppflags" ; then
20333
20334	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20335	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20336
20337fi
20338
20339if test -n "$cf_new_extra_cppflags" ; then
20340
20341	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20342	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20343
20344fi
20345
20346cf_add_libs="$LIBS"
20347# reverse order
20348cf_add_0lib=
20349for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20350# filter duplicates
20351for cf_add_1lib in $cf_add_0lib; do
20352	for cf_add_2lib in $cf_add_libs; do
20353		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20354			cf_add_1lib=
20355			break
20356		fi
20357	done
20358	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20359done
20360LIBS="$cf_add_libs"
20361
20362	:
20363else
20364	cf_pkgconfig_incs=
20365	cf_pkgconfig_libs=
20366
20367	echo "$as_me:20367: checking for XextCreateExtension in -lXext" >&5
20368echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
20369if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
20370  echo $ECHO_N "(cached) $ECHO_C" >&6
20371else
20372  ac_check_lib_save_LIBS=$LIBS
20373LIBS="-lXext  $LIBS"
20374cat >"conftest.$ac_ext" <<_ACEOF
20375#line 20375 "configure"
20376#include "confdefs.h"
20377
20378/* Override any gcc2 internal prototype to avoid an error.  */
20379#ifdef __cplusplus
20380extern "C"
20381#endif
20382/* We use char because int might match the return type of a gcc2
20383   builtin and then its argument prototype would still apply.  */
20384char XextCreateExtension ();
20385int
20386main (void)
20387{
20388XextCreateExtension ();
20389  ;
20390  return 0;
20391}
20392_ACEOF
20393rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20394if { (eval echo "$as_me:20394: \"$ac_link\"") >&5
20395  (eval $ac_link) 2>&5
20396  ac_status=$?
20397  echo "$as_me:20397: \$? = $ac_status" >&5
20398  (exit "$ac_status"); } &&
20399         { ac_try='test -s "conftest$ac_exeext"'
20400  { (eval echo "$as_me:20400: \"$ac_try\"") >&5
20401  (eval $ac_try) 2>&5
20402  ac_status=$?
20403  echo "$as_me:20403: \$? = $ac_status" >&5
20404  (exit "$ac_status"); }; }; then
20405  ac_cv_lib_Xext_XextCreateExtension=yes
20406else
20407  echo "$as_me: failed program was:" >&5
20408cat "conftest.$ac_ext" >&5
20409ac_cv_lib_Xext_XextCreateExtension=no
20410fi
20411rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20412LIBS=$ac_check_lib_save_LIBS
20413fi
20414echo "$as_me:20414: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
20415echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
20416if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
20417
20418cf_add_libs="$LIBS"
20419# reverse order
20420cf_add_0lib=
20421for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20422# filter duplicates
20423for cf_add_1lib in $cf_add_0lib; do
20424	for cf_add_2lib in $cf_add_libs; do
20425		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20426			cf_add_1lib=
20427			break
20428		fi
20429	done
20430	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20431done
20432LIBS="$cf_add_libs"
20433
20434fi
20435
20436fi
20437
20438# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
20439# in some cases has installed dummy files in the former, other cases replaced
20440# it with a link to the new location).  This complicates the configure script.
20441# Check for that pitfall, and recover using pkg-config
20442#
20443# If none of these are set, the configuration is almost certainly broken.
20444if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
20445then
20446
20447if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
20448	test -n "$verbose" && echo "	found package x11" 1>&6
20449
20450echo "${as_me:-configure}:20450: testing found package x11 ..." 1>&5
20451
20452	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
20453	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
20454	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
20455
20456echo "${as_me:-configure}:20456: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20457
20458	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
20459
20460echo "${as_me:-configure}:20460: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
20461
20462cf_fix_cppflags=no
20463cf_new_cflags=
20464cf_new_cppflags=
20465cf_new_extra_cppflags=
20466
20467for cf_add_cflags in $cf_pkgconfig_incs
20468do
20469case "$cf_fix_cppflags" in
20470(no)
20471	case "$cf_add_cflags" in
20472	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20473		case "$cf_add_cflags" in
20474		(-D*)
20475			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20476
20477			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20478				&& test -z "${cf_tst_cflags}" \
20479				&& cf_fix_cppflags=yes
20480
20481			if test "$cf_fix_cppflags" = yes ; then
20482
20483	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20484	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20485
20486				continue
20487			elif test "${cf_tst_cflags}" = "\"'" ; then
20488
20489	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20490	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20491
20492				continue
20493			fi
20494			;;
20495		esac
20496		case "$CPPFLAGS" in
20497		(*$cf_add_cflags)
20498			;;
20499		(*)
20500			case "$cf_add_cflags" in
20501			(-D*)
20502				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20503
20504CPPFLAGS=`echo "$CPPFLAGS" | \
20505	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20506		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20507
20508				;;
20509			esac
20510
20511	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20512	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20513
20514			;;
20515		esac
20516		;;
20517	(*)
20518
20519	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20520	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20521
20522		;;
20523	esac
20524	;;
20525(yes)
20526
20527	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20528	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20529
20530	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20531
20532	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20533		&& test -z "${cf_tst_cflags}" \
20534		&& cf_fix_cppflags=no
20535	;;
20536esac
20537done
20538
20539if test -n "$cf_new_cflags" ; then
20540
20541	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20542	CFLAGS="${CFLAGS}$cf_new_cflags"
20543
20544fi
20545
20546if test -n "$cf_new_cppflags" ; then
20547
20548	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20549	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20550
20551fi
20552
20553if test -n "$cf_new_extra_cppflags" ; then
20554
20555	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20556	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20557
20558fi
20559
20560cf_add_libs="$LIBS"
20561# reverse order
20562cf_add_0lib=
20563for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20564# filter duplicates
20565for cf_add_1lib in $cf_add_0lib; do
20566	for cf_add_2lib in $cf_add_libs; do
20567		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20568			cf_add_1lib=
20569			break
20570		fi
20571	done
20572	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20573done
20574LIBS="$cf_add_libs"
20575
20576	:
20577else
20578	cf_pkgconfig_incs=
20579	cf_pkgconfig_libs=
20580	{ echo "$as_me:20580: WARNING: unable to find X11 library" >&5
20581echo "$as_me: WARNING: unable to find X11 library" >&2;}
20582fi
20583
20584if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
20585	test -n "$verbose" && echo "	found package ice" 1>&6
20586
20587echo "${as_me:-configure}:20587: testing found package ice ..." 1>&5
20588
20589	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
20590	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
20591	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
20592
20593echo "${as_me:-configure}:20593: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20594
20595	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
20596
20597echo "${as_me:-configure}:20597: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
20598
20599cf_fix_cppflags=no
20600cf_new_cflags=
20601cf_new_cppflags=
20602cf_new_extra_cppflags=
20603
20604for cf_add_cflags in $cf_pkgconfig_incs
20605do
20606case "$cf_fix_cppflags" in
20607(no)
20608	case "$cf_add_cflags" in
20609	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20610		case "$cf_add_cflags" in
20611		(-D*)
20612			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20613
20614			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20615				&& test -z "${cf_tst_cflags}" \
20616				&& cf_fix_cppflags=yes
20617
20618			if test "$cf_fix_cppflags" = yes ; then
20619
20620	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20621	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20622
20623				continue
20624			elif test "${cf_tst_cflags}" = "\"'" ; then
20625
20626	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20627	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20628
20629				continue
20630			fi
20631			;;
20632		esac
20633		case "$CPPFLAGS" in
20634		(*$cf_add_cflags)
20635			;;
20636		(*)
20637			case "$cf_add_cflags" in
20638			(-D*)
20639				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20640
20641CPPFLAGS=`echo "$CPPFLAGS" | \
20642	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20643		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20644
20645				;;
20646			esac
20647
20648	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20649	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20650
20651			;;
20652		esac
20653		;;
20654	(*)
20655
20656	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20657	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20658
20659		;;
20660	esac
20661	;;
20662(yes)
20663
20664	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20665	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20666
20667	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20668
20669	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20670		&& test -z "${cf_tst_cflags}" \
20671		&& cf_fix_cppflags=no
20672	;;
20673esac
20674done
20675
20676if test -n "$cf_new_cflags" ; then
20677
20678	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20679	CFLAGS="${CFLAGS}$cf_new_cflags"
20680
20681fi
20682
20683if test -n "$cf_new_cppflags" ; then
20684
20685	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20686	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20687
20688fi
20689
20690if test -n "$cf_new_extra_cppflags" ; then
20691
20692	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20693	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20694
20695fi
20696
20697cf_add_libs="$LIBS"
20698# reverse order
20699cf_add_0lib=
20700for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20701# filter duplicates
20702for cf_add_1lib in $cf_add_0lib; do
20703	for cf_add_2lib in $cf_add_libs; do
20704		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20705			cf_add_1lib=
20706			break
20707		fi
20708	done
20709	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20710done
20711LIBS="$cf_add_libs"
20712
20713	:
20714else
20715	cf_pkgconfig_incs=
20716	cf_pkgconfig_libs=
20717	{ echo "$as_me:20717: WARNING: unable to find ICE library" >&5
20718echo "$as_me: WARNING: unable to find ICE library" >&2;}
20719fi
20720
20721if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
20722	test -n "$verbose" && echo "	found package sm" 1>&6
20723
20724echo "${as_me:-configure}:20724: testing found package sm ..." 1>&5
20725
20726	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
20727	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
20728	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
20729
20730echo "${as_me:-configure}:20730: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20731
20732	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
20733
20734echo "${as_me:-configure}:20734: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
20735
20736cf_fix_cppflags=no
20737cf_new_cflags=
20738cf_new_cppflags=
20739cf_new_extra_cppflags=
20740
20741for cf_add_cflags in $cf_pkgconfig_incs
20742do
20743case "$cf_fix_cppflags" in
20744(no)
20745	case "$cf_add_cflags" in
20746	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20747		case "$cf_add_cflags" in
20748		(-D*)
20749			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20750
20751			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20752				&& test -z "${cf_tst_cflags}" \
20753				&& cf_fix_cppflags=yes
20754
20755			if test "$cf_fix_cppflags" = yes ; then
20756
20757	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20758	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20759
20760				continue
20761			elif test "${cf_tst_cflags}" = "\"'" ; then
20762
20763	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20764	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20765
20766				continue
20767			fi
20768			;;
20769		esac
20770		case "$CPPFLAGS" in
20771		(*$cf_add_cflags)
20772			;;
20773		(*)
20774			case "$cf_add_cflags" in
20775			(-D*)
20776				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20777
20778CPPFLAGS=`echo "$CPPFLAGS" | \
20779	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20780		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20781
20782				;;
20783			esac
20784
20785	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20786	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20787
20788			;;
20789		esac
20790		;;
20791	(*)
20792
20793	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20794	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20795
20796		;;
20797	esac
20798	;;
20799(yes)
20800
20801	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20802	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20803
20804	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20805
20806	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20807		&& test -z "${cf_tst_cflags}" \
20808		&& cf_fix_cppflags=no
20809	;;
20810esac
20811done
20812
20813if test -n "$cf_new_cflags" ; then
20814
20815	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20816	CFLAGS="${CFLAGS}$cf_new_cflags"
20817
20818fi
20819
20820if test -n "$cf_new_cppflags" ; then
20821
20822	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20823	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20824
20825fi
20826
20827if test -n "$cf_new_extra_cppflags" ; then
20828
20829	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20830	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20831
20832fi
20833
20834cf_add_libs="$LIBS"
20835# reverse order
20836cf_add_0lib=
20837for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20838# filter duplicates
20839for cf_add_1lib in $cf_add_0lib; do
20840	for cf_add_2lib in $cf_add_libs; do
20841		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20842			cf_add_1lib=
20843			break
20844		fi
20845	done
20846	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20847done
20848LIBS="$cf_add_libs"
20849
20850	:
20851else
20852	cf_pkgconfig_incs=
20853	cf_pkgconfig_libs=
20854	{ echo "$as_me:20854: WARNING: unable to find SM library" >&5
20855echo "$as_me: WARNING: unable to find SM library" >&2;}
20856fi
20857
20858if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
20859	test -n "$verbose" && echo "	found package xt" 1>&6
20860
20861echo "${as_me:-configure}:20861: testing found package xt ..." 1>&5
20862
20863	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
20864	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
20865	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
20866
20867echo "${as_me:-configure}:20867: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20868
20869	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
20870
20871echo "${as_me:-configure}:20871: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
20872
20873cf_fix_cppflags=no
20874cf_new_cflags=
20875cf_new_cppflags=
20876cf_new_extra_cppflags=
20877
20878for cf_add_cflags in $cf_pkgconfig_incs
20879do
20880case "$cf_fix_cppflags" in
20881(no)
20882	case "$cf_add_cflags" in
20883	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20884		case "$cf_add_cflags" in
20885		(-D*)
20886			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20887
20888			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20889				&& test -z "${cf_tst_cflags}" \
20890				&& cf_fix_cppflags=yes
20891
20892			if test "$cf_fix_cppflags" = yes ; then
20893
20894	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20895	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20896
20897				continue
20898			elif test "${cf_tst_cflags}" = "\"'" ; then
20899
20900	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20901	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20902
20903				continue
20904			fi
20905			;;
20906		esac
20907		case "$CPPFLAGS" in
20908		(*$cf_add_cflags)
20909			;;
20910		(*)
20911			case "$cf_add_cflags" in
20912			(-D*)
20913				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20914
20915CPPFLAGS=`echo "$CPPFLAGS" | \
20916	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20917		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20918
20919				;;
20920			esac
20921
20922	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20923	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20924
20925			;;
20926		esac
20927		;;
20928	(*)
20929
20930	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20931	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20932
20933		;;
20934	esac
20935	;;
20936(yes)
20937
20938	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20939	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20940
20941	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20942
20943	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20944		&& test -z "${cf_tst_cflags}" \
20945		&& cf_fix_cppflags=no
20946	;;
20947esac
20948done
20949
20950if test -n "$cf_new_cflags" ; then
20951
20952	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20953	CFLAGS="${CFLAGS}$cf_new_cflags"
20954
20955fi
20956
20957if test -n "$cf_new_cppflags" ; then
20958
20959	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20960	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20961
20962fi
20963
20964if test -n "$cf_new_extra_cppflags" ; then
20965
20966	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20967	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20968
20969fi
20970
20971cf_add_libs="$LIBS"
20972# reverse order
20973cf_add_0lib=
20974for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20975# filter duplicates
20976for cf_add_1lib in $cf_add_0lib; do
20977	for cf_add_2lib in $cf_add_libs; do
20978		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20979			cf_add_1lib=
20980			break
20981		fi
20982	done
20983	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20984done
20985LIBS="$cf_add_libs"
20986
20987	:
20988else
20989	cf_pkgconfig_incs=
20990	cf_pkgconfig_libs=
20991	{ echo "$as_me:20991: WARNING: unable to find Xt library" >&5
20992echo "$as_me: WARNING: unable to find Xt library" >&2;}
20993fi
20994
20995else
20996	LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
20997fi
20998
20999cf_have_X_LIBS=no
21000
21001if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
21002	test -n "$verbose" && echo "	found package xt" 1>&6
21003
21004echo "${as_me:-configure}:21004: testing found package xt ..." 1>&5
21005
21006	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
21007	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
21008	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
21009
21010echo "${as_me:-configure}:21010: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21011
21012	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
21013
21014echo "${as_me:-configure}:21014: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
21015
21016cf_fix_cppflags=no
21017cf_new_cflags=
21018cf_new_cppflags=
21019cf_new_extra_cppflags=
21020
21021for cf_add_cflags in $cf_pkgconfig_incs
21022do
21023case "$cf_fix_cppflags" in
21024(no)
21025	case "$cf_add_cflags" in
21026	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21027		case "$cf_add_cflags" in
21028		(-D*)
21029			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21030
21031			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21032				&& test -z "${cf_tst_cflags}" \
21033				&& cf_fix_cppflags=yes
21034
21035			if test "$cf_fix_cppflags" = yes ; then
21036
21037	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21038	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21039
21040				continue
21041			elif test "${cf_tst_cflags}" = "\"'" ; then
21042
21043	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21044	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21045
21046				continue
21047			fi
21048			;;
21049		esac
21050		case "$CPPFLAGS" in
21051		(*$cf_add_cflags)
21052			;;
21053		(*)
21054			case "$cf_add_cflags" in
21055			(-D*)
21056				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21057
21058CPPFLAGS=`echo "$CPPFLAGS" | \
21059	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
21060		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
21061
21062				;;
21063			esac
21064
21065	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21066	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21067
21068			;;
21069		esac
21070		;;
21071	(*)
21072
21073	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21074	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21075
21076		;;
21077	esac
21078	;;
21079(yes)
21080
21081	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21082	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21083
21084	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21085
21086	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21087		&& test -z "${cf_tst_cflags}" \
21088		&& cf_fix_cppflags=no
21089	;;
21090esac
21091done
21092
21093if test -n "$cf_new_cflags" ; then
21094
21095	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21096	CFLAGS="${CFLAGS}$cf_new_cflags"
21097
21098fi
21099
21100if test -n "$cf_new_cppflags" ; then
21101
21102	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21103	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21104
21105fi
21106
21107if test -n "$cf_new_extra_cppflags" ; then
21108
21109	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21110	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21111
21112fi
21113
21114cf_add_libs="$LIBS"
21115# reverse order
21116cf_add_0lib=
21117for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21118# filter duplicates
21119for cf_add_1lib in $cf_add_0lib; do
21120	for cf_add_2lib in $cf_add_libs; do
21121		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21122			cf_add_1lib=
21123			break
21124		fi
21125	done
21126	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21127done
21128LIBS="$cf_add_libs"
21129
21130	case "x$LIBS" in
21131	(*-lX11*)
21132		;;
21133	(*)
21134# we have an "xt" package, but it may omit Xt's dependency on X11
21135echo "$as_me:21135: checking for usable X dependency" >&5
21136echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
21137if test "${cf_cv_xt_x11_compat+set}" = set; then
21138  echo $ECHO_N "(cached) $ECHO_C" >&6
21139else
21140
21141cat >"conftest.$ac_ext" <<_ACEOF
21142#line 21142 "configure"
21143#include "confdefs.h"
21144
21145#include <X11/Xlib.h>
21146
21147int
21148main (void)
21149{
21150
21151	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
21152	int rc2 = XClearWindow((Display*) 0, (Window) 0);
21153	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
21154	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
21155
21156  ;
21157  return 0;
21158}
21159_ACEOF
21160rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21161if { (eval echo "$as_me:21161: \"$ac_link\"") >&5
21162  (eval $ac_link) 2>&5
21163  ac_status=$?
21164  echo "$as_me:21164: \$? = $ac_status" >&5
21165  (exit "$ac_status"); } &&
21166         { ac_try='test -s "conftest$ac_exeext"'
21167  { (eval echo "$as_me:21167: \"$ac_try\"") >&5
21168  (eval $ac_try) 2>&5
21169  ac_status=$?
21170  echo "$as_me:21170: \$? = $ac_status" >&5
21171  (exit "$ac_status"); }; }; then
21172  cf_cv_xt_x11_compat=yes
21173else
21174  echo "$as_me: failed program was:" >&5
21175cat "conftest.$ac_ext" >&5
21176cf_cv_xt_x11_compat=no
21177fi
21178rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21179fi
21180echo "$as_me:21180: result: $cf_cv_xt_x11_compat" >&5
21181echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
21182		if test "$cf_cv_xt_x11_compat" = no
21183		then
21184			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
21185
21186echo "${as_me:-configure}:21186: testing work around broken X11 dependency ..." 1>&5
21187
21188			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
21189
21190if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
21191	test -n "$verbose" && echo "	found package x11" 1>&6
21192
21193echo "${as_me:-configure}:21193: testing found package x11 ..." 1>&5
21194
21195	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
21196	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
21197	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
21198
21199echo "${as_me:-configure}:21199: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21200
21201	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
21202
21203echo "${as_me:-configure}:21203: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
21204
21205cf_fix_cppflags=no
21206cf_new_cflags=
21207cf_new_cppflags=
21208cf_new_extra_cppflags=
21209
21210for cf_add_cflags in $cf_pkgconfig_incs
21211do
21212case "$cf_fix_cppflags" in
21213(no)
21214	case "$cf_add_cflags" in
21215	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21216		case "$cf_add_cflags" in
21217		(-D*)
21218			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21219
21220			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21221				&& test -z "${cf_tst_cflags}" \
21222				&& cf_fix_cppflags=yes
21223
21224			if test "$cf_fix_cppflags" = yes ; then
21225
21226	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21227	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21228
21229				continue
21230			elif test "${cf_tst_cflags}" = "\"'" ; then
21231
21232	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21233	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21234
21235				continue
21236			fi
21237			;;
21238		esac
21239		case "$CPPFLAGS" in
21240		(*$cf_add_cflags)
21241			;;
21242		(*)
21243			case "$cf_add_cflags" in
21244			(-D*)
21245				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21246
21247CPPFLAGS=`echo "$CPPFLAGS" | \
21248	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
21249		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
21250
21251				;;
21252			esac
21253
21254	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21255	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21256
21257			;;
21258		esac
21259		;;
21260	(*)
21261
21262	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21263	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21264
21265		;;
21266	esac
21267	;;
21268(yes)
21269
21270	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21271	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21272
21273	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21274
21275	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21276		&& test -z "${cf_tst_cflags}" \
21277		&& cf_fix_cppflags=no
21278	;;
21279esac
21280done
21281
21282if test -n "$cf_new_cflags" ; then
21283
21284	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21285	CFLAGS="${CFLAGS}$cf_new_cflags"
21286
21287fi
21288
21289if test -n "$cf_new_cppflags" ; then
21290
21291	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21292	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21293
21294fi
21295
21296if test -n "$cf_new_extra_cppflags" ; then
21297
21298	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21299	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21300
21301fi
21302
21303cf_add_libs="$LIBS"
21304# reverse order
21305cf_add_0lib=
21306for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21307# filter duplicates
21308for cf_add_1lib in $cf_add_0lib; do
21309	for cf_add_2lib in $cf_add_libs; do
21310		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21311			cf_add_1lib=
21312			break
21313		fi
21314	done
21315	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21316done
21317LIBS="$cf_add_libs"
21318
21319	:
21320else
21321	cf_pkgconfig_incs=
21322	cf_pkgconfig_libs=
21323
21324test -n "$verbose" && echo "	...before $LIBS" 1>&6
21325
21326echo "${as_me:-configure}:21326: testing ...before $LIBS ..." 1>&5
21327
21328LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
21329test -n "$verbose" && echo "	...after  $LIBS" 1>&6
21330
21331echo "${as_me:-configure}:21331: testing ...after  $LIBS ..." 1>&5
21332
21333fi
21334
21335		fi
21336		;;
21337	esac
21338
21339echo "$as_me:21339: checking for usable X Toolkit package" >&5
21340echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
21341if test "${cf_cv_xt_ice_compat+set}" = set; then
21342  echo $ECHO_N "(cached) $ECHO_C" >&6
21343else
21344
21345cat >"conftest.$ac_ext" <<_ACEOF
21346#line 21346 "configure"
21347#include "confdefs.h"
21348
21349#include <X11/Shell.h>
21350
21351int
21352main (void)
21353{
21354int num = IceConnectionNumber(0); (void) num
21355
21356  ;
21357  return 0;
21358}
21359_ACEOF
21360rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21361if { (eval echo "$as_me:21361: \"$ac_link\"") >&5
21362  (eval $ac_link) 2>&5
21363  ac_status=$?
21364  echo "$as_me:21364: \$? = $ac_status" >&5
21365  (exit "$ac_status"); } &&
21366         { ac_try='test -s "conftest$ac_exeext"'
21367  { (eval echo "$as_me:21367: \"$ac_try\"") >&5
21368  (eval $ac_try) 2>&5
21369  ac_status=$?
21370  echo "$as_me:21370: \$? = $ac_status" >&5
21371  (exit "$ac_status"); }; }; then
21372  cf_cv_xt_ice_compat=yes
21373else
21374  echo "$as_me: failed program was:" >&5
21375cat "conftest.$ac_ext" >&5
21376cf_cv_xt_ice_compat=no
21377fi
21378rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21379fi
21380echo "$as_me:21380: result: $cf_cv_xt_ice_compat" >&5
21381echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
21382
21383	if test "$cf_cv_xt_ice_compat" = no
21384	then
21385		# workaround for broken ".pc" files used for X Toolkit.
21386		case "x$X_PRE_LIBS" in
21387		(*-lICE*)
21388			case "x$LIBS" in
21389			(*-lICE*)
21390				;;
21391			(*)
21392				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
21393
21394echo "${as_me:-configure}:21394: testing work around broken ICE dependency ..." 1>&5
21395
21396if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
21397	test -n "$verbose" && echo "	found package ice" 1>&6
21398
21399echo "${as_me:-configure}:21399: testing found package ice ..." 1>&5
21400
21401	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
21402	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
21403	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
21404
21405echo "${as_me:-configure}:21405: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21406
21407	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
21408
21409echo "${as_me:-configure}:21409: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
21410
21411cf_fix_cppflags=no
21412cf_new_cflags=
21413cf_new_cppflags=
21414cf_new_extra_cppflags=
21415
21416for cf_add_cflags in $cf_pkgconfig_incs
21417do
21418case "$cf_fix_cppflags" in
21419(no)
21420	case "$cf_add_cflags" in
21421	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21422		case "$cf_add_cflags" in
21423		(-D*)
21424			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21425
21426			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21427				&& test -z "${cf_tst_cflags}" \
21428				&& cf_fix_cppflags=yes
21429
21430			if test "$cf_fix_cppflags" = yes ; then
21431
21432	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21433	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21434
21435				continue
21436			elif test "${cf_tst_cflags}" = "\"'" ; then
21437
21438	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21439	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21440
21441				continue
21442			fi
21443			;;
21444		esac
21445		case "$CPPFLAGS" in
21446		(*$cf_add_cflags)
21447			;;
21448		(*)
21449			case "$cf_add_cflags" in
21450			(-D*)
21451				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21452
21453CPPFLAGS=`echo "$CPPFLAGS" | \
21454	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
21455		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
21456
21457				;;
21458			esac
21459
21460	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21461	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21462
21463			;;
21464		esac
21465		;;
21466	(*)
21467
21468	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21469	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21470
21471		;;
21472	esac
21473	;;
21474(yes)
21475
21476	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21477	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21478
21479	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21480
21481	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21482		&& test -z "${cf_tst_cflags}" \
21483		&& cf_fix_cppflags=no
21484	;;
21485esac
21486done
21487
21488if test -n "$cf_new_cflags" ; then
21489
21490	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21491	CFLAGS="${CFLAGS}$cf_new_cflags"
21492
21493fi
21494
21495if test -n "$cf_new_cppflags" ; then
21496
21497	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21498	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21499
21500fi
21501
21502if test -n "$cf_new_extra_cppflags" ; then
21503
21504	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21505	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21506
21507fi
21508
21509cf_add_libs="$LIBS"
21510# reverse order
21511cf_add_0lib=
21512for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21513# filter duplicates
21514for cf_add_1lib in $cf_add_0lib; do
21515	for cf_add_2lib in $cf_add_libs; do
21516		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21517			cf_add_1lib=
21518			break
21519		fi
21520	done
21521	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21522done
21523LIBS="$cf_add_libs"
21524
21525if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
21526	test -n "$verbose" && echo "	found package sm" 1>&6
21527
21528echo "${as_me:-configure}:21528: testing found package sm ..." 1>&5
21529
21530	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
21531	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
21532	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
21533
21534echo "${as_me:-configure}:21534: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21535
21536	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
21537
21538echo "${as_me:-configure}:21538: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
21539
21540cf_fix_cppflags=no
21541cf_new_cflags=
21542cf_new_cppflags=
21543cf_new_extra_cppflags=
21544
21545for cf_add_cflags in $cf_pkgconfig_incs
21546do
21547case "$cf_fix_cppflags" in
21548(no)
21549	case "$cf_add_cflags" in
21550	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21551		case "$cf_add_cflags" in
21552		(-D*)
21553			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21554
21555			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21556				&& test -z "${cf_tst_cflags}" \
21557				&& cf_fix_cppflags=yes
21558
21559			if test "$cf_fix_cppflags" = yes ; then
21560
21561	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21562	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21563
21564				continue
21565			elif test "${cf_tst_cflags}" = "\"'" ; then
21566
21567	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21568	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21569
21570				continue
21571			fi
21572			;;
21573		esac
21574		case "$CPPFLAGS" in
21575		(*$cf_add_cflags)
21576			;;
21577		(*)
21578			case "$cf_add_cflags" in
21579			(-D*)
21580				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21581
21582CPPFLAGS=`echo "$CPPFLAGS" | \
21583	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
21584		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
21585
21586				;;
21587			esac
21588
21589	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21590	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21591
21592			;;
21593		esac
21594		;;
21595	(*)
21596
21597	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21598	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21599
21600		;;
21601	esac
21602	;;
21603(yes)
21604
21605	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21606	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21607
21608	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21609
21610	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21611		&& test -z "${cf_tst_cflags}" \
21612		&& cf_fix_cppflags=no
21613	;;
21614esac
21615done
21616
21617if test -n "$cf_new_cflags" ; then
21618
21619	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21620	CFLAGS="${CFLAGS}$cf_new_cflags"
21621
21622fi
21623
21624if test -n "$cf_new_cppflags" ; then
21625
21626	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21627	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21628
21629fi
21630
21631if test -n "$cf_new_extra_cppflags" ; then
21632
21633	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21634	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21635
21636fi
21637
21638cf_add_libs="$LIBS"
21639# reverse order
21640cf_add_0lib=
21641for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21642# filter duplicates
21643for cf_add_1lib in $cf_add_0lib; do
21644	for cf_add_2lib in $cf_add_libs; do
21645		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21646			cf_add_1lib=
21647			break
21648		fi
21649	done
21650	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21651done
21652LIBS="$cf_add_libs"
21653
21654	:
21655else
21656	cf_pkgconfig_incs=
21657	cf_pkgconfig_libs=
21658	:
21659fi
21660
21661else
21662	cf_pkgconfig_incs=
21663	cf_pkgconfig_libs=
21664
21665test -n "$verbose" && echo "	...before $LIBS" 1>&6
21666
21667echo "${as_me:-configure}:21667: testing ...before $LIBS ..." 1>&5
21668
21669LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
21670test -n "$verbose" && echo "	...after  $LIBS" 1>&6
21671
21672echo "${as_me:-configure}:21672: testing ...after  $LIBS ..." 1>&5
21673
21674fi
21675
21676				;;
21677			esac
21678			;;
21679		esac
21680	fi
21681
21682	cf_have_X_LIBS=yes
21683
21684else
21685	cf_pkgconfig_incs=
21686	cf_pkgconfig_libs=
21687
21688	LDFLAGS="$X_LIBS $LDFLAGS"
21689
21690test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
21691
21692echo "${as_me:-configure}:21692: testing checking additions to CFLAGS ..." 1>&5
21693
21694cf_check_cflags="$CFLAGS"
21695cf_check_cppflags="$CPPFLAGS"
21696
21697cf_fix_cppflags=no
21698cf_new_cflags=
21699cf_new_cppflags=
21700cf_new_extra_cppflags=
21701
21702for cf_add_cflags in $X_CFLAGS
21703do
21704case "$cf_fix_cppflags" in
21705(no)
21706	case "$cf_add_cflags" in
21707	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21708		case "$cf_add_cflags" in
21709		(-D*)
21710			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21711
21712			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21713				&& test -z "${cf_tst_cflags}" \
21714				&& cf_fix_cppflags=yes
21715
21716			if test "$cf_fix_cppflags" = yes ; then
21717
21718	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21719	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21720
21721				continue
21722			elif test "${cf_tst_cflags}" = "\"'" ; then
21723
21724	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21725	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21726
21727				continue
21728			fi
21729			;;
21730		esac
21731		case "$CPPFLAGS" in
21732		(*$cf_add_cflags)
21733			;;
21734		(*)
21735			case "$cf_add_cflags" in
21736			(-D*)
21737				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21738
21739CPPFLAGS=`echo "$CPPFLAGS" | \
21740	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
21741		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
21742
21743				;;
21744			esac
21745
21746	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21747	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21748
21749			;;
21750		esac
21751		;;
21752	(*)
21753
21754	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21755	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21756
21757		;;
21758	esac
21759	;;
21760(yes)
21761
21762	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21763	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21764
21765	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21766
21767	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21768		&& test -z "${cf_tst_cflags}" \
21769		&& cf_fix_cppflags=no
21770	;;
21771esac
21772done
21773
21774if test -n "$cf_new_cflags" ; then
21775	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
21776
21777echo "${as_me:-configure}:21777: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
21778
21779	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21780	CFLAGS="${CFLAGS}$cf_new_cflags"
21781
21782fi
21783
21784if test -n "$cf_new_cppflags" ; then
21785	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
21786
21787echo "${as_me:-configure}:21787: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
21788
21789	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21790	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21791
21792fi
21793
21794if test -n "$cf_new_extra_cppflags" ; then
21795	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
21796
21797echo "${as_me:-configure}:21797: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
21798
21799	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21800	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21801
21802fi
21803
21804if test "x$cf_check_cflags" != "x$CFLAGS" ; then
21805cat >"conftest.$ac_ext" <<_ACEOF
21806#line 21806 "configure"
21807#include "confdefs.h"
21808#include <stdio.h>
21809int
21810main (void)
21811{
21812printf("Hello world");
21813  ;
21814  return 0;
21815}
21816_ACEOF
21817rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21818if { (eval echo "$as_me:21818: \"$ac_link\"") >&5
21819  (eval $ac_link) 2>&5
21820  ac_status=$?
21821  echo "$as_me:21821: \$? = $ac_status" >&5
21822  (exit "$ac_status"); } &&
21823         { ac_try='test -s "conftest$ac_exeext"'
21824  { (eval echo "$as_me:21824: \"$ac_try\"") >&5
21825  (eval $ac_try) 2>&5
21826  ac_status=$?
21827  echo "$as_me:21827: \$? = $ac_status" >&5
21828  (exit "$ac_status"); }; }; then
21829  :
21830else
21831  echo "$as_me: failed program was:" >&5
21832cat "conftest.$ac_ext" >&5
21833test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
21834
21835echo "${as_me:-configure}:21835: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
21836
21837	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
21838		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
21839
21840echo "${as_me:-configure}:21840: testing but keeping change to \$CPPFLAGS ..." 1>&5
21841
21842	 fi
21843	 CFLAGS="$cf_check_cflags"
21844fi
21845rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21846fi
21847
21848	echo "$as_me:21848: checking for XOpenDisplay" >&5
21849echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
21850if test "${ac_cv_func_XOpenDisplay+set}" = set; then
21851  echo $ECHO_N "(cached) $ECHO_C" >&6
21852else
21853  cat >"conftest.$ac_ext" <<_ACEOF
21854#line 21854 "configure"
21855#include "confdefs.h"
21856#define XOpenDisplay autoconf_temporary
21857#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21858#undef XOpenDisplay
21859
21860#ifdef __cplusplus
21861extern "C"
21862#endif
21863
21864/* We use char because int might match the return type of a gcc2
21865   builtin and then its argument prototype would still apply.  */
21866char XOpenDisplay (void);
21867
21868int
21869main (void)
21870{
21871
21872/* The GNU C library defines stubs for functions which it implements
21873    to always fail with ENOSYS.  Some functions are actually named
21874    something starting with __ and the normal name is an alias.  */
21875#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
21876#error found stub for XOpenDisplay
21877#endif
21878
21879	return XOpenDisplay ();
21880  ;
21881  return 0;
21882}
21883_ACEOF
21884rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21885if { (eval echo "$as_me:21885: \"$ac_link\"") >&5
21886  (eval $ac_link) 2>&5
21887  ac_status=$?
21888  echo "$as_me:21888: \$? = $ac_status" >&5
21889  (exit "$ac_status"); } &&
21890         { ac_try='test -s "conftest$ac_exeext"'
21891  { (eval echo "$as_me:21891: \"$ac_try\"") >&5
21892  (eval $ac_try) 2>&5
21893  ac_status=$?
21894  echo "$as_me:21894: \$? = $ac_status" >&5
21895  (exit "$ac_status"); }; }; then
21896  ac_cv_func_XOpenDisplay=yes
21897else
21898  echo "$as_me: failed program was:" >&5
21899cat "conftest.$ac_ext" >&5
21900ac_cv_func_XOpenDisplay=no
21901fi
21902rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21903fi
21904echo "$as_me:21904: result: $ac_cv_func_XOpenDisplay" >&5
21905echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
21906if test "$ac_cv_func_XOpenDisplay" = yes; then
21907  :
21908else
21909
21910	echo "$as_me:21910: checking for XOpenDisplay in -lX11" >&5
21911echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
21912if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
21913  echo $ECHO_N "(cached) $ECHO_C" >&6
21914else
21915  ac_check_lib_save_LIBS=$LIBS
21916LIBS="-lX11  $LIBS"
21917cat >"conftest.$ac_ext" <<_ACEOF
21918#line 21918 "configure"
21919#include "confdefs.h"
21920
21921/* Override any gcc2 internal prototype to avoid an error.  */
21922#ifdef __cplusplus
21923extern "C"
21924#endif
21925/* We use char because int might match the return type of a gcc2
21926   builtin and then its argument prototype would still apply.  */
21927char XOpenDisplay ();
21928int
21929main (void)
21930{
21931XOpenDisplay ();
21932  ;
21933  return 0;
21934}
21935_ACEOF
21936rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21937if { (eval echo "$as_me:21937: \"$ac_link\"") >&5
21938  (eval $ac_link) 2>&5
21939  ac_status=$?
21940  echo "$as_me:21940: \$? = $ac_status" >&5
21941  (exit "$ac_status"); } &&
21942         { ac_try='test -s "conftest$ac_exeext"'
21943  { (eval echo "$as_me:21943: \"$ac_try\"") >&5
21944  (eval $ac_try) 2>&5
21945  ac_status=$?
21946  echo "$as_me:21946: \$? = $ac_status" >&5
21947  (exit "$ac_status"); }; }; then
21948  ac_cv_lib_X11_XOpenDisplay=yes
21949else
21950  echo "$as_me: failed program was:" >&5
21951cat "conftest.$ac_ext" >&5
21952ac_cv_lib_X11_XOpenDisplay=no
21953fi
21954rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21955LIBS=$ac_check_lib_save_LIBS
21956fi
21957echo "$as_me:21957: result: $ac_cv_lib_X11_XOpenDisplay" >&5
21958echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
21959if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
21960
21961cf_add_libs="$LIBS"
21962# reverse order
21963cf_add_0lib=
21964for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21965# filter duplicates
21966for cf_add_1lib in $cf_add_0lib; do
21967	for cf_add_2lib in $cf_add_libs; do
21968		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21969			cf_add_1lib=
21970			break
21971		fi
21972	done
21973	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21974done
21975LIBS="$cf_add_libs"
21976
21977fi
21978
21979fi
21980
21981	echo "$as_me:21981: checking for XtAppInitialize" >&5
21982echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
21983if test "${ac_cv_func_XtAppInitialize+set}" = set; then
21984  echo $ECHO_N "(cached) $ECHO_C" >&6
21985else
21986  cat >"conftest.$ac_ext" <<_ACEOF
21987#line 21987 "configure"
21988#include "confdefs.h"
21989#define XtAppInitialize autoconf_temporary
21990#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21991#undef XtAppInitialize
21992
21993#ifdef __cplusplus
21994extern "C"
21995#endif
21996
21997/* We use char because int might match the return type of a gcc2
21998   builtin and then its argument prototype would still apply.  */
21999char XtAppInitialize (void);
22000
22001int
22002main (void)
22003{
22004
22005/* The GNU C library defines stubs for functions which it implements
22006    to always fail with ENOSYS.  Some functions are actually named
22007    something starting with __ and the normal name is an alias.  */
22008#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
22009#error found stub for XtAppInitialize
22010#endif
22011
22012	return XtAppInitialize ();
22013  ;
22014  return 0;
22015}
22016_ACEOF
22017rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22018if { (eval echo "$as_me:22018: \"$ac_link\"") >&5
22019  (eval $ac_link) 2>&5
22020  ac_status=$?
22021  echo "$as_me:22021: \$? = $ac_status" >&5
22022  (exit "$ac_status"); } &&
22023         { ac_try='test -s "conftest$ac_exeext"'
22024  { (eval echo "$as_me:22024: \"$ac_try\"") >&5
22025  (eval $ac_try) 2>&5
22026  ac_status=$?
22027  echo "$as_me:22027: \$? = $ac_status" >&5
22028  (exit "$ac_status"); }; }; then
22029  ac_cv_func_XtAppInitialize=yes
22030else
22031  echo "$as_me: failed program was:" >&5
22032cat "conftest.$ac_ext" >&5
22033ac_cv_func_XtAppInitialize=no
22034fi
22035rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22036fi
22037echo "$as_me:22037: result: $ac_cv_func_XtAppInitialize" >&5
22038echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
22039if test "$ac_cv_func_XtAppInitialize" = yes; then
22040  :
22041else
22042
22043	echo "$as_me:22043: checking for XtAppInitialize in -lXt" >&5
22044echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
22045if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
22046  echo $ECHO_N "(cached) $ECHO_C" >&6
22047else
22048  ac_check_lib_save_LIBS=$LIBS
22049LIBS="-lXt  $LIBS"
22050cat >"conftest.$ac_ext" <<_ACEOF
22051#line 22051 "configure"
22052#include "confdefs.h"
22053
22054/* Override any gcc2 internal prototype to avoid an error.  */
22055#ifdef __cplusplus
22056extern "C"
22057#endif
22058/* We use char because int might match the return type of a gcc2
22059   builtin and then its argument prototype would still apply.  */
22060char XtAppInitialize ();
22061int
22062main (void)
22063{
22064XtAppInitialize ();
22065  ;
22066  return 0;
22067}
22068_ACEOF
22069rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22070if { (eval echo "$as_me:22070: \"$ac_link\"") >&5
22071  (eval $ac_link) 2>&5
22072  ac_status=$?
22073  echo "$as_me:22073: \$? = $ac_status" >&5
22074  (exit "$ac_status"); } &&
22075         { ac_try='test -s "conftest$ac_exeext"'
22076  { (eval echo "$as_me:22076: \"$ac_try\"") >&5
22077  (eval $ac_try) 2>&5
22078  ac_status=$?
22079  echo "$as_me:22079: \$? = $ac_status" >&5
22080  (exit "$ac_status"); }; }; then
22081  ac_cv_lib_Xt_XtAppInitialize=yes
22082else
22083  echo "$as_me: failed program was:" >&5
22084cat "conftest.$ac_ext" >&5
22085ac_cv_lib_Xt_XtAppInitialize=no
22086fi
22087rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22088LIBS=$ac_check_lib_save_LIBS
22089fi
22090echo "$as_me:22090: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
22091echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
22092if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
22093
22094cat >>confdefs.h <<\EOF
22095#define HAVE_LIBXT 1
22096EOF
22097
22098		 cf_have_X_LIBS=Xt
22099		 LIBS="-lXt $LIBS"
22100fi
22101
22102fi
22103
22104fi
22105
22106if test "$cf_have_X_LIBS" = no ; then
22107	{ echo "$as_me:22107: WARNING: Unable to successfully link X Toolkit library (-lXt) with
22108test program.  You will have to check and add the proper libraries by hand
22109to makefile." >&5
22110echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
22111test program.  You will have to check and add the proper libraries by hand
22112to makefile." >&2;}
22113fi
22114
22115cf_x_athena_root=$cf_x_athena
22116cf_x_athena_inc=""
22117
22118for cf_path in default \
22119	/usr/contrib/X11R6 \
22120	/usr/contrib/X11R5 \
22121	/usr/lib/X11R5 \
22122	/usr/local
22123do
22124	if test -z "$cf_x_athena_inc" ; then
22125
22126cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
22127cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
22128cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
22129LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
22130for cf_X_CFLAGS in $X_CFLAGS
22131do
22132	case "x$cf_X_CFLAGS" in
22133	x-[IUD]*)
22134		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
22135		;;
22136	*)
22137		CFLAGS="$CFLAGS $cf_X_CFLAGS"
22138		;;
22139	esac
22140done
22141
22142		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
22143		if test "$cf_path" != default ; then
22144
22145	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22146	CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
22147
22148			echo "$as_me:22148: checking for $cf_test in $cf_path" >&5
22149echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
22150		else
22151			echo "$as_me:22151: checking for $cf_test" >&5
22152echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
22153		fi
22154		cat >"conftest.$ac_ext" <<_ACEOF
22155#line 22155 "configure"
22156#include "confdefs.h"
22157
22158#include <X11/Intrinsic.h>
22159#include <$cf_test>
22160int
22161main (void)
22162{
22163
22164  ;
22165  return 0;
22166}
22167_ACEOF
22168rm -f "conftest.$ac_objext"
22169if { (eval echo "$as_me:22169: \"$ac_compile\"") >&5
22170  (eval $ac_compile) 2>&5
22171  ac_status=$?
22172  echo "$as_me:22172: \$? = $ac_status" >&5
22173  (exit "$ac_status"); } &&
22174         { ac_try='test -s "conftest.$ac_objext"'
22175  { (eval echo "$as_me:22175: \"$ac_try\"") >&5
22176  (eval $ac_try) 2>&5
22177  ac_status=$?
22178  echo "$as_me:22178: \$? = $ac_status" >&5
22179  (exit "$ac_status"); }; }; then
22180  cf_result=yes
22181else
22182  echo "$as_me: failed program was:" >&5
22183cat "conftest.$ac_ext" >&5
22184cf_result=no
22185fi
22186rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22187		echo "$as_me:22187: result: $cf_result" >&5
22188echo "${ECHO_T}$cf_result" >&6
22189
22190LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
22191CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
22192CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
22193
22194		if test "$cf_result" = yes ; then
22195			test "$cf_path"  = default && cf_x_athena_inc=default
22196			test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
22197			break
22198		fi
22199	fi
22200done
22201
22202if test -z "$cf_x_athena_inc" ; then
22203	{ echo "$as_me:22203: WARNING: Unable to find Athena header files" >&5
22204echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
22205elif test "$cf_x_athena_inc" != default ; then
22206
22207	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22208	CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
22209
22210fi
22211
22212cf_x_athena_root=$cf_x_athena
22213cf_x_athena_lib=""
22214
22215for cf_path in default \
22216	/usr/contrib/X11R6 \
22217	/usr/contrib/X11R5 \
22218	/usr/lib/X11R5 \
22219	/usr/local
22220do
22221	for cf_lib in \
22222		${cf_x_athena_root} \
22223		${cf_x_athena_root}7 \
22224		${cf_x_athena_root}6
22225	do
22226	for cf_libs in \
22227		"-l$cf_lib -lXmu" \
22228		"-l$cf_lib -lXpm -lXmu" \
22229		"-l${cf_lib}_s -lXmu_s"
22230	do
22231		test -n "$cf_x_athena_lib" && break
22232
22233cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
22234cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
22235cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
22236LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
22237for cf_X_CFLAGS in $X_CFLAGS
22238do
22239	case "x$cf_X_CFLAGS" in
22240	x-[IUD]*)
22241		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
22242		;;
22243	*)
22244		CFLAGS="$CFLAGS $cf_X_CFLAGS"
22245		;;
22246	esac
22247done
22248
22249		cf_test=XawSimpleMenuAddGlobalActions
22250		test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
22251
22252cf_add_libs="$LIBS"
22253# reverse order
22254cf_add_0lib=
22255for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22256# filter duplicates
22257for cf_add_1lib in $cf_add_0lib; do
22258	for cf_add_2lib in $cf_add_libs; do
22259		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22260			cf_add_1lib=
22261			break
22262		fi
22263	done
22264	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22265done
22266LIBS="$cf_add_libs"
22267
22268		echo "$as_me:22268: checking for $cf_test in $cf_libs" >&5
22269echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
22270		cat >"conftest.$ac_ext" <<_ACEOF
22271#line 22271 "configure"
22272#include "confdefs.h"
22273
22274#include <X11/Intrinsic.h>
22275#include <X11/$cf_x_athena_root/SimpleMenu.h>
22276
22277int
22278main (void)
22279{
22280
22281$cf_test((XtAppContext) 0)
22282  ;
22283  return 0;
22284}
22285_ACEOF
22286rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22287if { (eval echo "$as_me:22287: \"$ac_link\"") >&5
22288  (eval $ac_link) 2>&5
22289  ac_status=$?
22290  echo "$as_me:22290: \$? = $ac_status" >&5
22291  (exit "$ac_status"); } &&
22292         { ac_try='test -s "conftest$ac_exeext"'
22293  { (eval echo "$as_me:22293: \"$ac_try\"") >&5
22294  (eval $ac_try) 2>&5
22295  ac_status=$?
22296  echo "$as_me:22296: \$? = $ac_status" >&5
22297  (exit "$ac_status"); }; }; then
22298  cf_result=yes
22299else
22300  echo "$as_me: failed program was:" >&5
22301cat "conftest.$ac_ext" >&5
22302cf_result=no
22303fi
22304rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22305		echo "$as_me:22305: result: $cf_result" >&5
22306echo "${ECHO_T}$cf_result" >&6
22307
22308LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
22309CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
22310CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
22311
22312		if test "$cf_result" = yes ; then
22313			cf_x_athena_lib="$cf_libs"
22314			break
22315		fi
22316	done # cf_libs
22317		test -n "$cf_x_athena_lib" && break
22318	done # cf_lib
22319done
22320
22321if test -z "$cf_x_athena_lib" ; then
22322	{ { echo "$as_me:22322: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
22323echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
22324   { (exit 1); exit 1; }; }
22325fi
22326
22327cf_add_libs="$LIBS"
22328# reverse order
22329cf_add_0lib=
22330for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22331# filter duplicates
22332for cf_add_1lib in $cf_add_0lib; do
22333	for cf_add_2lib in $cf_add_libs; do
22334		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22335			cf_add_1lib=
22336			break
22337		fi
22338	done
22339	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22340done
22341LIBS="$cf_add_libs"
22342
22343cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22344
22345cat >>confdefs.h <<EOF
22346#define $cf_x_athena_LIBS 1
22347EOF
22348
22349fi
22350
22351if test -n "$ac_tool_prefix"; then
22352  for ac_prog in xcurses-config
22353  do
22354    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22355set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22356echo "$as_me:22356: checking for $ac_word" >&5
22357echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22358if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
22359  echo $ECHO_N "(cached) $ECHO_C" >&6
22360else
22361  if test -n "$XCURSES_CONFIG"; then
22362  ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
22363else
22364  ac_save_IFS=$IFS; IFS=$ac_path_separator
22365ac_dummy="$PATH"
22366for ac_dir in $ac_dummy; do
22367  IFS=$ac_save_IFS
22368  test -z "$ac_dir" && ac_dir=.
22369  $as_executable_p "$ac_dir/$ac_word" || continue
22370ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
22371echo "$as_me:22371: found $ac_dir/$ac_word" >&5
22372break
22373done
22374
22375fi
22376fi
22377XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
22378if test -n "$XCURSES_CONFIG"; then
22379  echo "$as_me:22379: result: $XCURSES_CONFIG" >&5
22380echo "${ECHO_T}$XCURSES_CONFIG" >&6
22381else
22382  echo "$as_me:22382: result: no" >&5
22383echo "${ECHO_T}no" >&6
22384fi
22385
22386    test -n "$XCURSES_CONFIG" && break
22387  done
22388fi
22389if test -z "$XCURSES_CONFIG"; then
22390  ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
22391  for ac_prog in xcurses-config
22392do
22393  # Extract the first word of "$ac_prog", so it can be a program name with args.
22394set dummy $ac_prog; ac_word=$2
22395echo "$as_me:22395: checking for $ac_word" >&5
22396echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22397if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
22398  echo $ECHO_N "(cached) $ECHO_C" >&6
22399else
22400  if test -n "$ac_ct_XCURSES_CONFIG"; then
22401  ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
22402else
22403  ac_save_IFS=$IFS; IFS=$ac_path_separator
22404ac_dummy="$PATH"
22405for ac_dir in $ac_dummy; do
22406  IFS=$ac_save_IFS
22407  test -z "$ac_dir" && ac_dir=.
22408  $as_executable_p "$ac_dir/$ac_word" || continue
22409ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
22410echo "$as_me:22410: found $ac_dir/$ac_word" >&5
22411break
22412done
22413
22414fi
22415fi
22416ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
22417if test -n "$ac_ct_XCURSES_CONFIG"; then
22418  echo "$as_me:22418: result: $ac_ct_XCURSES_CONFIG" >&5
22419echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
22420else
22421  echo "$as_me:22421: result: no" >&5
22422echo "${ECHO_T}no" >&6
22423fi
22424
22425  test -n "$ac_ct_XCURSES_CONFIG" && break
22426done
22427test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
22428
22429  XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
22430fi
22431
22432if test "$XCURSES_CONFIG" != none ; then
22433
22434cf_fix_cppflags=no
22435cf_new_cflags=
22436cf_new_cppflags=
22437cf_new_extra_cppflags=
22438
22439for cf_add_cflags in `$XCURSES_CONFIG --cflags`
22440do
22441case "$cf_fix_cppflags" in
22442(no)
22443	case "$cf_add_cflags" in
22444	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22445		case "$cf_add_cflags" in
22446		(-D*)
22447			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22448
22449			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22450				&& test -z "${cf_tst_cflags}" \
22451				&& cf_fix_cppflags=yes
22452
22453			if test "$cf_fix_cppflags" = yes ; then
22454
22455	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22456	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22457
22458				continue
22459			elif test "${cf_tst_cflags}" = "\"'" ; then
22460
22461	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22462	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22463
22464				continue
22465			fi
22466			;;
22467		esac
22468		case "$CPPFLAGS" in
22469		(*$cf_add_cflags)
22470			;;
22471		(*)
22472			case "$cf_add_cflags" in
22473			(-D*)
22474				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22475
22476CPPFLAGS=`echo "$CPPFLAGS" | \
22477	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
22478		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
22479
22480				;;
22481			esac
22482
22483	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22484	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22485
22486			;;
22487		esac
22488		;;
22489	(*)
22490
22491	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22492	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22493
22494		;;
22495	esac
22496	;;
22497(yes)
22498
22499	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22500	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22501
22502	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22503
22504	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22505		&& test -z "${cf_tst_cflags}" \
22506		&& cf_fix_cppflags=no
22507	;;
22508esac
22509done
22510
22511if test -n "$cf_new_cflags" ; then
22512
22513	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22514	CFLAGS="${CFLAGS}$cf_new_cflags"
22515
22516fi
22517
22518if test -n "$cf_new_cppflags" ; then
22519
22520	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22521	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22522
22523fi
22524
22525if test -n "$cf_new_extra_cppflags" ; then
22526
22527	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22528	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22529
22530fi
22531
22532cf_add_libs="$LIBS"
22533# reverse order
22534cf_add_0lib=
22535for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22536# filter duplicates
22537for cf_add_1lib in $cf_add_0lib; do
22538	for cf_add_2lib in $cf_add_libs; do
22539		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22540			cf_add_1lib=
22541			break
22542		fi
22543	done
22544	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22545done
22546LIBS="$cf_add_libs"
22547
22548cf_cv_lib_XCurses=yes
22549
22550else
22551
22552LDFLAGS="$LDFLAGS $X_LIBS"
22553
22554test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
22555
22556echo "${as_me:-configure}:22556: testing checking additions to CFLAGS ..." 1>&5
22557
22558cf_check_cflags="$CFLAGS"
22559cf_check_cppflags="$CPPFLAGS"
22560
22561cf_fix_cppflags=no
22562cf_new_cflags=
22563cf_new_cppflags=
22564cf_new_extra_cppflags=
22565
22566for cf_add_cflags in $X_CFLAGS
22567do
22568case "$cf_fix_cppflags" in
22569(no)
22570	case "$cf_add_cflags" in
22571	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22572		case "$cf_add_cflags" in
22573		(-D*)
22574			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22575
22576			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22577				&& test -z "${cf_tst_cflags}" \
22578				&& cf_fix_cppflags=yes
22579
22580			if test "$cf_fix_cppflags" = yes ; then
22581
22582	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22583	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22584
22585				continue
22586			elif test "${cf_tst_cflags}" = "\"'" ; then
22587
22588	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22589	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22590
22591				continue
22592			fi
22593			;;
22594		esac
22595		case "$CPPFLAGS" in
22596		(*$cf_add_cflags)
22597			;;
22598		(*)
22599			case "$cf_add_cflags" in
22600			(-D*)
22601				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22602
22603CPPFLAGS=`echo "$CPPFLAGS" | \
22604	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
22605		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
22606
22607				;;
22608			esac
22609
22610	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22611	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22612
22613			;;
22614		esac
22615		;;
22616	(*)
22617
22618	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22619	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22620
22621		;;
22622	esac
22623	;;
22624(yes)
22625
22626	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22627	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22628
22629	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22630
22631	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22632		&& test -z "${cf_tst_cflags}" \
22633		&& cf_fix_cppflags=no
22634	;;
22635esac
22636done
22637
22638if test -n "$cf_new_cflags" ; then
22639	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
22640
22641echo "${as_me:-configure}:22641: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
22642
22643	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22644	CFLAGS="${CFLAGS}$cf_new_cflags"
22645
22646fi
22647
22648if test -n "$cf_new_cppflags" ; then
22649	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
22650
22651echo "${as_me:-configure}:22651: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
22652
22653	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22654	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22655
22656fi
22657
22658if test -n "$cf_new_extra_cppflags" ; then
22659	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
22660
22661echo "${as_me:-configure}:22661: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
22662
22663	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22664	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22665
22666fi
22667
22668if test "x$cf_check_cflags" != "x$CFLAGS" ; then
22669cat >"conftest.$ac_ext" <<_ACEOF
22670#line 22670 "configure"
22671#include "confdefs.h"
22672#include <stdio.h>
22673int
22674main (void)
22675{
22676printf("Hello world");
22677  ;
22678  return 0;
22679}
22680_ACEOF
22681rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22682if { (eval echo "$as_me:22682: \"$ac_link\"") >&5
22683  (eval $ac_link) 2>&5
22684  ac_status=$?
22685  echo "$as_me:22685: \$? = $ac_status" >&5
22686  (exit "$ac_status"); } &&
22687         { ac_try='test -s "conftest$ac_exeext"'
22688  { (eval echo "$as_me:22688: \"$ac_try\"") >&5
22689  (eval $ac_try) 2>&5
22690  ac_status=$?
22691  echo "$as_me:22691: \$? = $ac_status" >&5
22692  (exit "$ac_status"); }; }; then
22693  :
22694else
22695  echo "$as_me: failed program was:" >&5
22696cat "conftest.$ac_ext" >&5
22697test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
22698
22699echo "${as_me:-configure}:22699: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
22700
22701	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
22702		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
22703
22704echo "${as_me:-configure}:22704: testing but keeping change to \$CPPFLAGS ..." 1>&5
22705
22706	 fi
22707	 CFLAGS="$cf_check_cflags"
22708fi
22709rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22710fi
22711
22712echo "$as_me:22712: checking for XOpenDisplay in -lX11" >&5
22713echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
22714if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
22715  echo $ECHO_N "(cached) $ECHO_C" >&6
22716else
22717  ac_check_lib_save_LIBS=$LIBS
22718LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
22719cat >"conftest.$ac_ext" <<_ACEOF
22720#line 22720 "configure"
22721#include "confdefs.h"
22722
22723/* Override any gcc2 internal prototype to avoid an error.  */
22724#ifdef __cplusplus
22725extern "C"
22726#endif
22727/* We use char because int might match the return type of a gcc2
22728   builtin and then its argument prototype would still apply.  */
22729char XOpenDisplay ();
22730int
22731main (void)
22732{
22733XOpenDisplay ();
22734  ;
22735  return 0;
22736}
22737_ACEOF
22738rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22739if { (eval echo "$as_me:22739: \"$ac_link\"") >&5
22740  (eval $ac_link) 2>&5
22741  ac_status=$?
22742  echo "$as_me:22742: \$? = $ac_status" >&5
22743  (exit "$ac_status"); } &&
22744         { ac_try='test -s "conftest$ac_exeext"'
22745  { (eval echo "$as_me:22745: \"$ac_try\"") >&5
22746  (eval $ac_try) 2>&5
22747  ac_status=$?
22748  echo "$as_me:22748: \$? = $ac_status" >&5
22749  (exit "$ac_status"); }; }; then
22750  ac_cv_lib_X11_XOpenDisplay=yes
22751else
22752  echo "$as_me: failed program was:" >&5
22753cat "conftest.$ac_ext" >&5
22754ac_cv_lib_X11_XOpenDisplay=no
22755fi
22756rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22757LIBS=$ac_check_lib_save_LIBS
22758fi
22759echo "$as_me:22759: result: $ac_cv_lib_X11_XOpenDisplay" >&5
22760echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
22761if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
22762
22763cf_add_libs="$LIBS"
22764# reverse order
22765cf_add_0lib=
22766for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22767# filter duplicates
22768for cf_add_1lib in $cf_add_0lib; do
22769	for cf_add_2lib in $cf_add_libs; do
22770		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22771			cf_add_1lib=
22772			break
22773		fi
22774	done
22775	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22776done
22777LIBS="$cf_add_libs"
22778
22779fi
22780
22781echo "$as_me:22781: checking for XCurses library" >&5
22782echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
22783if test "${cf_cv_lib_XCurses+set}" = set; then
22784  echo $ECHO_N "(cached) $ECHO_C" >&6
22785else
22786
22787cf_add_libs="$LIBS"
22788# reverse order
22789cf_add_0lib=
22790for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22791# filter duplicates
22792for cf_add_1lib in $cf_add_0lib; do
22793	for cf_add_2lib in $cf_add_libs; do
22794		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22795			cf_add_1lib=
22796			break
22797		fi
22798	done
22799	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22800done
22801LIBS="$cf_add_libs"
22802
22803cat >"conftest.$ac_ext" <<_ACEOF
22804#line 22804 "configure"
22805#include "confdefs.h"
22806
22807#include <xcurses.h>
22808char *XCursesProgramName = "test";
22809
22810int
22811main (void)
22812{
22813XCursesExit();
22814  ;
22815  return 0;
22816}
22817_ACEOF
22818rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22819if { (eval echo "$as_me:22819: \"$ac_link\"") >&5
22820  (eval $ac_link) 2>&5
22821  ac_status=$?
22822  echo "$as_me:22822: \$? = $ac_status" >&5
22823  (exit "$ac_status"); } &&
22824         { ac_try='test -s "conftest$ac_exeext"'
22825  { (eval echo "$as_me:22825: \"$ac_try\"") >&5
22826  (eval $ac_try) 2>&5
22827  ac_status=$?
22828  echo "$as_me:22828: \$? = $ac_status" >&5
22829  (exit "$ac_status"); }; }; then
22830  cf_cv_lib_XCurses=yes
22831else
22832  echo "$as_me: failed program was:" >&5
22833cat "conftest.$ac_ext" >&5
22834cf_cv_lib_XCurses=no
22835fi
22836rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22837
22838fi
22839echo "$as_me:22839: result: $cf_cv_lib_XCurses" >&5
22840echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
22841
22842fi
22843
22844if test "$cf_cv_lib_XCurses" = yes ; then
22845
22846cat >>confdefs.h <<\EOF
22847#define UNIX 1
22848EOF
22849
22850cat >>confdefs.h <<\EOF
22851#define XCURSES 1
22852EOF
22853
22854	echo "$as_me:22854: checking for xcurses.h" >&5
22855echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
22856if test "${ac_cv_header_xcurses_h+set}" = set; then
22857  echo $ECHO_N "(cached) $ECHO_C" >&6
22858else
22859  cat >"conftest.$ac_ext" <<_ACEOF
22860#line 22860 "configure"
22861#include "confdefs.h"
22862#include <xcurses.h>
22863_ACEOF
22864if { (eval echo "$as_me:22864: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22865  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22866  ac_status=$?
22867  $EGREP -v '^ *\+' conftest.er1 >conftest.err
22868  rm -f conftest.er1
22869  cat conftest.err >&5
22870  echo "$as_me:22870: \$? = $ac_status" >&5
22871  (exit "$ac_status"); } >/dev/null; then
22872  if test -s conftest.err; then
22873    ac_cpp_err=$ac_c_preproc_warn_flag
22874  else
22875    ac_cpp_err=
22876  fi
22877else
22878  ac_cpp_err=yes
22879fi
22880if test -z "$ac_cpp_err"; then
22881  ac_cv_header_xcurses_h=yes
22882else
22883  echo "$as_me: failed program was:" >&5
22884  cat "conftest.$ac_ext" >&5
22885  ac_cv_header_xcurses_h=no
22886fi
22887rm -f conftest.err "conftest.$ac_ext"
22888fi
22889echo "$as_me:22889: result: $ac_cv_header_xcurses_h" >&5
22890echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
22891if test "$ac_cv_header_xcurses_h" = yes; then
22892
22893cat >>confdefs.h <<\EOF
22894#define HAVE_XCURSES 1
22895EOF
22896
22897fi
22898
22899else
22900	{ { echo "$as_me:22900: error: Cannot link with XCurses" >&5
22901echo "$as_me: error: Cannot link with XCurses" >&2;}
22902   { (exit 1); exit 1; }; }
22903fi
22904
22905	;;
22906(*)
22907	{ { echo "$as_me:22907: error: unexpected screen-value: $cf_cv_screen" >&5
22908echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
22909   { (exit 1); exit 1; }; }
22910	;;
22911esac
22912
22913: ${cf_nculib_root:=$cf_cv_screen}
22914as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
22915echo "$as_me:22915: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
22916echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
22917if eval "test \"\${$as_ac_Lib+set}\" = set"; then
22918  echo $ECHO_N "(cached) $ECHO_C" >&6
22919else
22920  ac_check_lib_save_LIBS=$LIBS
22921LIBS="-l$cf_nculib_root  $LIBS"
22922cat >"conftest.$ac_ext" <<_ACEOF
22923#line 22923 "configure"
22924#include "confdefs.h"
22925
22926/* Override any gcc2 internal prototype to avoid an error.  */
22927#ifdef __cplusplus
22928extern "C"
22929#endif
22930/* We use char because int might match the return type of a gcc2
22931   builtin and then its argument prototype would still apply.  */
22932char _nc_init_pthreads ();
22933int
22934main (void)
22935{
22936_nc_init_pthreads ();
22937  ;
22938  return 0;
22939}
22940_ACEOF
22941rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22942if { (eval echo "$as_me:22942: \"$ac_link\"") >&5
22943  (eval $ac_link) 2>&5
22944  ac_status=$?
22945  echo "$as_me:22945: \$? = $ac_status" >&5
22946  (exit "$ac_status"); } &&
22947         { ac_try='test -s "conftest$ac_exeext"'
22948  { (eval echo "$as_me:22948: \"$ac_try\"") >&5
22949  (eval $ac_try) 2>&5
22950  ac_status=$?
22951  echo "$as_me:22951: \$? = $ac_status" >&5
22952  (exit "$ac_status"); }; }; then
22953  eval "$as_ac_Lib=yes"
22954else
22955  echo "$as_me: failed program was:" >&5
22956cat "conftest.$ac_ext" >&5
22957eval "$as_ac_Lib=no"
22958fi
22959rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22960LIBS=$ac_check_lib_save_LIBS
22961fi
22962echo "$as_me:22962: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
22963echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
22964if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
22965  cf_cv_ncurses_pthreads=yes
22966else
22967  cf_cv_ncurses_pthreads=no
22968fi
22969
22970if test "$cf_cv_ncurses_pthreads" = yes
22971then
22972
22973cf_add_libs="$LIBS"
22974# reverse order
22975cf_add_0lib=
22976for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22977# filter duplicates
22978for cf_add_1lib in $cf_add_0lib; do
22979	for cf_add_2lib in $cf_add_libs; do
22980		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22981			cf_add_1lib=
22982			break
22983		fi
22984	done
22985	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22986done
22987LIBS="$cf_add_libs"
22988
22989fi
22990
22991echo "$as_me:22991: checking if curses supports wide characters" >&5
22992echo $ECHO_N "checking if curses supports wide characters... $ECHO_C" >&6
22993if test "${cf_cv_widec_curses+set}" = set; then
22994  echo $ECHO_N "(cached) $ECHO_C" >&6
22995else
22996
22997cat >"conftest.$ac_ext" <<_ACEOF
22998#line 22998 "configure"
22999#include "confdefs.h"
23000
23001#include <stdlib.h>
23002#include <${cf_cv_ncurses_header:-curses.h}>
23003int
23004main (void)
23005{
23006
23007    wchar_t temp[2];
23008    wchar_t wch = 'A';
23009    temp[0] = wch;
23010    waddnwstr(stdscr, temp, 1);
23011
23012  ;
23013  return 0;
23014}
23015_ACEOF
23016rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23017if { (eval echo "$as_me:23017: \"$ac_link\"") >&5
23018  (eval $ac_link) 2>&5
23019  ac_status=$?
23020  echo "$as_me:23020: \$? = $ac_status" >&5
23021  (exit "$ac_status"); } &&
23022         { ac_try='test -s "conftest$ac_exeext"'
23023  { (eval echo "$as_me:23023: \"$ac_try\"") >&5
23024  (eval $ac_try) 2>&5
23025  ac_status=$?
23026  echo "$as_me:23026: \$? = $ac_status" >&5
23027  (exit "$ac_status"); }; }; then
23028  cf_cv_widec_curses=yes
23029else
23030  echo "$as_me: failed program was:" >&5
23031cat "conftest.$ac_ext" >&5
23032cf_cv_widec_curses=no
23033fi
23034rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23035
23036fi
23037echo "$as_me:23037: result: $cf_cv_widec_curses" >&5
23038echo "${ECHO_T}$cf_cv_widec_curses" >&6
23039
23040if test "$cf_cv_widec_curses" = yes ; then
23041
23042cat >>confdefs.h <<\EOF
23043#define WIDEC_CURSES 1
23044EOF
23045
23046	# This is needed on Tru64 5.0 to declare mbstate_t
23047	echo "$as_me:23047: checking if we must include wchar.h to declare mbstate_t" >&5
23048echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
23049if test "${cf_cv_widec_mbstate+set}" = set; then
23050  echo $ECHO_N "(cached) $ECHO_C" >&6
23051else
23052
23053	cat >"conftest.$ac_ext" <<_ACEOF
23054#line 23054 "configure"
23055#include "confdefs.h"
23056
23057#include <stdlib.h>
23058#include <${cf_cv_ncurses_header:-curses.h}>
23059int
23060main (void)
23061{
23062mbstate_t state; (void)state
23063  ;
23064  return 0;
23065}
23066_ACEOF
23067rm -f "conftest.$ac_objext"
23068if { (eval echo "$as_me:23068: \"$ac_compile\"") >&5
23069  (eval $ac_compile) 2>&5
23070  ac_status=$?
23071  echo "$as_me:23071: \$? = $ac_status" >&5
23072  (exit "$ac_status"); } &&
23073         { ac_try='test -s "conftest.$ac_objext"'
23074  { (eval echo "$as_me:23074: \"$ac_try\"") >&5
23075  (eval $ac_try) 2>&5
23076  ac_status=$?
23077  echo "$as_me:23077: \$? = $ac_status" >&5
23078  (exit "$ac_status"); }; }; then
23079  cf_cv_widec_mbstate=no
23080else
23081  echo "$as_me: failed program was:" >&5
23082cat "conftest.$ac_ext" >&5
23083cat >"conftest.$ac_ext" <<_ACEOF
23084#line 23084 "configure"
23085#include "confdefs.h"
23086
23087#include <stdlib.h>
23088#include <wchar.h>
23089#include <${cf_cv_ncurses_header:-curses.h}>
23090int
23091main (void)
23092{
23093mbstate_t state; (void)state
23094  ;
23095  return 0;
23096}
23097_ACEOF
23098rm -f "conftest.$ac_objext"
23099if { (eval echo "$as_me:23099: \"$ac_compile\"") >&5
23100  (eval $ac_compile) 2>&5
23101  ac_status=$?
23102  echo "$as_me:23102: \$? = $ac_status" >&5
23103  (exit "$ac_status"); } &&
23104         { ac_try='test -s "conftest.$ac_objext"'
23105  { (eval echo "$as_me:23105: \"$ac_try\"") >&5
23106  (eval $ac_try) 2>&5
23107  ac_status=$?
23108  echo "$as_me:23108: \$? = $ac_status" >&5
23109  (exit "$ac_status"); }; }; then
23110  cf_cv_widec_mbstate=yes
23111else
23112  echo "$as_me: failed program was:" >&5
23113cat "conftest.$ac_ext" >&5
23114cf_cv_widec_mbstate=unknown
23115fi
23116rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23117fi
23118rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23119fi
23120echo "$as_me:23120: result: $cf_cv_widec_mbstate" >&5
23121echo "${ECHO_T}$cf_cv_widec_mbstate" >&6
23122
23123if test "$cf_cv_widec_mbstate" = yes ; then
23124
23125cat >>confdefs.h <<\EOF
23126#define NEED_WCHAR_H 1
23127EOF
23128
23129fi
23130
23131if test "$cf_cv_widec_mbstate" != unknown ; then
23132
23133cat >>confdefs.h <<\EOF
23134#define HAVE_MBSTATE_T 1
23135EOF
23136
23137fi
23138
23139fi
23140
23141cf_all_widgets=yes
23142
23143echo "$as_me:23143: checking if you want extra dialogs" >&5
23144echo $ECHO_N "checking if you want extra dialogs... $ECHO_C" >&6
23145
23146# Check whether --enable-extras or --disable-extras was given.
23147if test "${enable_extras+set}" = set; then
23148  enableval="$enable_extras"
23149
23150else
23151  enableval=yes
23152fi;
23153echo "$as_me:23153: result: $enableval" >&5
23154echo "${ECHO_T}$enableval" >&6
23155if test "$enableval" != no ; then
23156cf_all_widgets=yes
23157else
23158cf_all_widgets=no
23159fi
23160
23161cf_use_dialogrc=yes
23162
23163echo "$as_me:23163: checking if you want config-file support" >&5
23164echo $ECHO_N "checking if you want config-file support... $ECHO_C" >&6
23165
23166# Check whether --enable-rc-file or --disable-rc-file was given.
23167if test "${enable_rc_file+set}" = set; then
23168  enableval="$enable_rc_file"
23169
23170else
23171  enableval=$cf_all_widgets
23172fi;
23173echo "$as_me:23173: result: $enableval" >&5
23174echo "${ECHO_T}$enableval" >&6
23175if test "$enableval" != no ; then
23176EXTRAOBJS="$EXTRAOBJS rc\$o"
23177
23178cat >>confdefs.h <<\EOF
23179#define HAVE_RC_FILE 1
23180EOF
23181
23182else
23183cf_use_dialogrc=no
23184fi
23185
23186cf_use_dialogrc2=yes
23187if test "$cf_use_dialogrc" = yes; then
23188
23189echo "$as_me:23189: checking if you want extra attributes in config-file" >&5
23190echo $ECHO_N "checking if you want extra attributes in config-file... $ECHO_C" >&6
23191
23192# Check whether --enable-rc-file2 or --disable-rc-file2 was given.
23193if test "${enable_rc_file2+set}" = set; then
23194  enableval="$enable_rc_file2"
23195
23196else
23197  enableval=$cf_all_widgets
23198fi;
23199echo "$as_me:23199: result: $enableval" >&5
23200echo "${ECHO_T}$enableval" >&6
23201if test "$enableval" != no ; then
23202
23203cat >>confdefs.h <<\EOF
23204#define HAVE_RC_FILE2 1
23205EOF
23206
23207else
23208cf_use_dialogrc2=no
23209fi
23210
23211fi
23212
23213echo "$as_me:23213: checking if you want Xdialog-style dialogs" >&5
23214echo $ECHO_N "checking if you want Xdialog-style dialogs... $ECHO_C" >&6
23215
23216# Check whether --enable-Xdialog or --disable-Xdialog was given.
23217if test "${enable_Xdialog+set}" = set; then
23218  enableval="$enable_Xdialog"
23219
23220else
23221  enableval=$cf_all_widgets
23222fi;
23223echo "$as_me:23223: result: $enableval" >&5
23224echo "${ECHO_T}$enableval" >&6
23225if test "$enableval" != no ; then
23226EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
23227
23228cat >>confdefs.h <<\EOF
23229#define HAVE_XDIALOG 1
23230EOF
23231
23232else
23233	:
23234fi
23235
23236echo "$as_me:23236: checking if you want extra Xdialog-style dialogs (1.2)" >&5
23237echo $ECHO_N "checking if you want extra Xdialog-style dialogs (1.2)... $ECHO_C" >&6
23238
23239# Check whether --enable-Xdialog2 or --disable-Xdialog2 was given.
23240if test "${enable_Xdialog2+set}" = set; then
23241  enableval="$enable_Xdialog2"
23242
23243else
23244  enableval=$cf_all_widgets
23245fi;
23246echo "$as_me:23246: result: $enableval" >&5
23247echo "${ECHO_T}$enableval" >&6
23248if test "$enableval" != no ; then
23249EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
23250
23251cat >>confdefs.h <<\EOF
23252#define HAVE_XDIALOG2 1
23253EOF
23254
23255else
23256	:
23257fi
23258
23259echo "$as_me:23259: checking if you want compatibility with whiptail options" >&5
23260echo $ECHO_N "checking if you want compatibility with whiptail options... $ECHO_C" >&6
23261
23262# Check whether --enable-whiptail or --disable-whiptail was given.
23263if test "${enable_whiptail+set}" = set; then
23264  enableval="$enable_whiptail"
23265
23266else
23267  enableval=$cf_all_widgets
23268fi;
23269echo "$as_me:23269: result: $enableval" >&5
23270echo "${ECHO_T}$enableval" >&6
23271if test "$enableval" != no ; then
23272
23273cat >>confdefs.h <<\EOF
23274#define HAVE_WHIPTAIL 1
23275EOF
23276
23277else
23278	:
23279fi
23280
23281echo "$as_me:23281: checking if you want the form dialog" >&5
23282echo $ECHO_N "checking if you want the form dialog... $ECHO_C" >&6
23283
23284# Check whether --enable-form or --disable-form was given.
23285if test "${enable_form+set}" = set; then
23286  enableval="$enable_form"
23287
23288else
23289  enableval=$cf_all_widgets
23290fi;
23291echo "$as_me:23291: result: $enableval" >&5
23292echo "${ECHO_T}$enableval" >&6
23293if test "$enableval" != no ; then
23294EXTRAOBJS="$EXTRAOBJS formbox\$o"
23295
23296cat >>confdefs.h <<\EOF
23297#define HAVE_DLG_FORMBOX 1
23298EOF
23299
23300else
23301	:
23302fi
23303
23304echo "$as_me:23304: checking if you want the gauge dialog" >&5
23305echo $ECHO_N "checking if you want the gauge dialog... $ECHO_C" >&6
23306
23307# Check whether --enable-gauge or --disable-gauge was given.
23308if test "${enable_gauge+set}" = set; then
23309  enableval="$enable_gauge"
23310
23311else
23312  enableval=$cf_all_widgets
23313fi;
23314echo "$as_me:23314: result: $enableval" >&5
23315echo "${ECHO_T}$enableval" >&6
23316if test "$enableval" != no ; then
23317EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
23318
23319cat >>confdefs.h <<\EOF
23320#define HAVE_DLG_GAUGE 1
23321EOF
23322
23323else
23324	:
23325fi
23326
23327echo "$as_me:23327: checking if you want the tailbox dialog" >&5
23328echo $ECHO_N "checking if you want the tailbox dialog... $ECHO_C" >&6
23329
23330# Check whether --enable-tailbox or --disable-tailbox was given.
23331if test "${enable_tailbox+set}" = set; then
23332  enableval="$enable_tailbox"
23333
23334else
23335  enableval=$cf_all_widgets
23336fi;
23337echo "$as_me:23337: result: $enableval" >&5
23338echo "${ECHO_T}$enableval" >&6
23339if test "$enableval" != no ; then
23340EXTRAOBJS="$EXTRAOBJS tailbox\$o"
23341
23342cat >>confdefs.h <<\EOF
23343#define HAVE_DLG_TAILBOX 1
23344EOF
23345
23346else
23347	:
23348fi
23349
23350echo "$as_me:23350: checking if you want the mixedform dialog" >&5
23351echo $ECHO_N "checking if you want the mixedform dialog... $ECHO_C" >&6
23352
23353# Check whether --enable-mixedform or --disable-mixedform was given.
23354if test "${enable_mixedform+set}" = set; then
23355  enableval="$enable_mixedform"
23356
23357else
23358  enableval=${enable_form:=$cf_all_widgets}
23359fi;
23360echo "$as_me:23360: result: $enableval" >&5
23361echo "${ECHO_T}$enableval" >&6
23362if test "$enableval" != no ; then
23363EXTRAOBJS="$EXTRAOBJS mixedform\$o"
23364
23365cat >>confdefs.h <<\EOF
23366#define HAVE_DLG_MIXEDFORM 1
23367EOF
23368
23369else
23370	:
23371fi
23372
23373echo "$as_me:23373: checking if you want the mixedgauge dialog" >&5
23374echo $ECHO_N "checking if you want the mixedgauge dialog... $ECHO_C" >&6
23375
23376# Check whether --enable-mixedgauge or --disable-mixedgauge was given.
23377if test "${enable_mixedgauge+set}" = set; then
23378  enableval="$enable_mixedgauge"
23379
23380else
23381  enableval=$cf_all_widgets
23382fi;
23383echo "$as_me:23383: result: $enableval" >&5
23384echo "${ECHO_T}$enableval" >&6
23385if test "$enableval" != no ; then
23386EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
23387
23388cat >>confdefs.h <<\EOF
23389#define HAVE_MIXEDGAUGE 1
23390EOF
23391
23392else
23393	:
23394fi
23395
23396echo "$as_me:23396: checking if you want the wide-curses features" >&5
23397echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
23398
23399# Check whether --enable-widec or --disable-widec was given.
23400if test "${enable_widec+set}" = set; then
23401  enableval="$enable_widec"
23402
23403else
23404  enableval=$cf_cv_widec_curses
23405fi;
23406echo "$as_me:23406: result: $enableval" >&5
23407echo "${ECHO_T}$enableval" >&6
23408if test "$enableval" != no ; then
23409
23410cat >>confdefs.h <<\EOF
23411#define USE_WIDE_CURSES 1
23412EOF
23413
23414else
23415	:
23416fi
23417
23418echo "$as_me:23418: checking for ANSI C header files" >&5
23419echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
23420if test "${ac_cv_header_stdc+set}" = set; then
23421  echo $ECHO_N "(cached) $ECHO_C" >&6
23422else
23423  cat >"conftest.$ac_ext" <<_ACEOF
23424#line 23424 "configure"
23425#include "confdefs.h"
23426#include <stdlib.h>
23427#include <stdarg.h>
23428#include <string.h>
23429#include <float.h>
23430
23431_ACEOF
23432if { (eval echo "$as_me:23432: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23433  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23434  ac_status=$?
23435  $EGREP -v '^ *\+' conftest.er1 >conftest.err
23436  rm -f conftest.er1
23437  cat conftest.err >&5
23438  echo "$as_me:23438: \$? = $ac_status" >&5
23439  (exit "$ac_status"); } >/dev/null; then
23440  if test -s conftest.err; then
23441    ac_cpp_err=$ac_c_preproc_warn_flag
23442  else
23443    ac_cpp_err=
23444  fi
23445else
23446  ac_cpp_err=yes
23447fi
23448if test -z "$ac_cpp_err"; then
23449  ac_cv_header_stdc=yes
23450else
23451  echo "$as_me: failed program was:" >&5
23452  cat "conftest.$ac_ext" >&5
23453  ac_cv_header_stdc=no
23454fi
23455rm -f conftest.err "conftest.$ac_ext"
23456
23457if test $ac_cv_header_stdc = yes; then
23458  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
23459  cat >"conftest.$ac_ext" <<_ACEOF
23460#line 23460 "configure"
23461#include "confdefs.h"
23462#include <string.h>
23463
23464_ACEOF
23465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23466  $EGREP "memchr" >/dev/null 2>&1; then
23467  :
23468else
23469  ac_cv_header_stdc=no
23470fi
23471rm -rf conftest*
23472
23473fi
23474
23475if test $ac_cv_header_stdc = yes; then
23476  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
23477  cat >"conftest.$ac_ext" <<_ACEOF
23478#line 23478 "configure"
23479#include "confdefs.h"
23480#include <stdlib.h>
23481
23482_ACEOF
23483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23484  $EGREP "free" >/dev/null 2>&1; then
23485  :
23486else
23487  ac_cv_header_stdc=no
23488fi
23489rm -rf conftest*
23490
23491fi
23492
23493if test $ac_cv_header_stdc = yes; then
23494  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
23495  if test "$cross_compiling" = yes; then
23496  :
23497else
23498  cat >"conftest.$ac_ext" <<_ACEOF
23499#line 23499 "configure"
23500#include "confdefs.h"
23501#include <ctype.h>
23502#if ((' ' & 0x0FF) == 0x020)
23503# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
23504# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
23505#else
23506# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
23507                     || ('j' <= (c) && (c) <= 'r') \
23508                     || ('s' <= (c) && (c) <= 'z'))
23509# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
23510#endif
23511
23512#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
23513int
23514main (void)
23515{
23516  int i;
23517  for (i = 0; i < 256; i++)
23518    if (XOR (islower (i), ISLOWER (i))
23519        || toupper (i) != TOUPPER (i))
23520      $ac_main_return(2);
23521  $ac_main_return (0);
23522}
23523_ACEOF
23524rm -f "conftest$ac_exeext"
23525if { (eval echo "$as_me:23525: \"$ac_link\"") >&5
23526  (eval $ac_link) 2>&5
23527  ac_status=$?
23528  echo "$as_me:23528: \$? = $ac_status" >&5
23529  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23530  { (eval echo "$as_me:23530: \"$ac_try\"") >&5
23531  (eval $ac_try) 2>&5
23532  ac_status=$?
23533  echo "$as_me:23533: \$? = $ac_status" >&5
23534  (exit "$ac_status"); }; }; then
23535  :
23536else
23537  echo "$as_me: program exited with status $ac_status" >&5
23538echo "$as_me: failed program was:" >&5
23539cat "conftest.$ac_ext" >&5
23540ac_cv_header_stdc=no
23541fi
23542rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23543fi
23544fi
23545fi
23546echo "$as_me:23546: result: $ac_cv_header_stdc" >&5
23547echo "${ECHO_T}$ac_cv_header_stdc" >&6
23548if test $ac_cv_header_stdc = yes; then
23549
23550cat >>confdefs.h <<\EOF
23551#define STDC_HEADERS 1
23552EOF
23553
23554fi
23555
23556echo "$as_me:23556: checking whether time.h and sys/time.h may both be included" >&5
23557echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
23558if test "${ac_cv_header_time+set}" = set; then
23559  echo $ECHO_N "(cached) $ECHO_C" >&6
23560else
23561  cat >"conftest.$ac_ext" <<_ACEOF
23562#line 23562 "configure"
23563#include "confdefs.h"
23564#include <sys/types.h>
23565#include <sys/time.h>
23566#include <time.h>
23567
23568int
23569main (void)
23570{
23571if ((struct tm *) 0)
23572return 0;
23573  ;
23574  return 0;
23575}
23576_ACEOF
23577rm -f "conftest.$ac_objext"
23578if { (eval echo "$as_me:23578: \"$ac_compile\"") >&5
23579  (eval $ac_compile) 2>&5
23580  ac_status=$?
23581  echo "$as_me:23581: \$? = $ac_status" >&5
23582  (exit "$ac_status"); } &&
23583         { ac_try='test -s "conftest.$ac_objext"'
23584  { (eval echo "$as_me:23584: \"$ac_try\"") >&5
23585  (eval $ac_try) 2>&5
23586  ac_status=$?
23587  echo "$as_me:23587: \$? = $ac_status" >&5
23588  (exit "$ac_status"); }; }; then
23589  ac_cv_header_time=yes
23590else
23591  echo "$as_me: failed program was:" >&5
23592cat "conftest.$ac_ext" >&5
23593ac_cv_header_time=no
23594fi
23595rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23596fi
23597echo "$as_me:23597: result: $ac_cv_header_time" >&5
23598echo "${ECHO_T}$ac_cv_header_time" >&6
23599if test $ac_cv_header_time = yes; then
23600
23601cat >>confdefs.h <<\EOF
23602#define TIME_WITH_SYS_TIME 1
23603EOF
23604
23605fi
23606
23607ac_header_dirent=no
23608for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
23609  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
23610echo "$as_me:23610: checking for $ac_hdr that defines DIR" >&5
23611echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
23612if eval "test \"\${$as_ac_Header+set}\" = set"; then
23613  echo $ECHO_N "(cached) $ECHO_C" >&6
23614else
23615  cat >"conftest.$ac_ext" <<_ACEOF
23616#line 23616 "configure"
23617#include "confdefs.h"
23618#include <sys/types.h>
23619#include <$ac_hdr>
23620
23621int
23622main (void)
23623{
23624if ((DIR *) 0)
23625return 0;
23626  ;
23627  return 0;
23628}
23629_ACEOF
23630rm -f "conftest.$ac_objext"
23631if { (eval echo "$as_me:23631: \"$ac_compile\"") >&5
23632  (eval $ac_compile) 2>&5
23633  ac_status=$?
23634  echo "$as_me:23634: \$? = $ac_status" >&5
23635  (exit "$ac_status"); } &&
23636         { ac_try='test -s "conftest.$ac_objext"'
23637  { (eval echo "$as_me:23637: \"$ac_try\"") >&5
23638  (eval $ac_try) 2>&5
23639  ac_status=$?
23640  echo "$as_me:23640: \$? = $ac_status" >&5
23641  (exit "$ac_status"); }; }; then
23642  eval "$as_ac_Header=yes"
23643else
23644  echo "$as_me: failed program was:" >&5
23645cat "conftest.$ac_ext" >&5
23646eval "$as_ac_Header=no"
23647fi
23648rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23649fi
23650echo "$as_me:23650: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23651echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23652if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23653  cat >>confdefs.h <<EOF
23654#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
23655EOF
23656
23657ac_header_dirent=$ac_hdr; break
23658fi
23659
23660done
23661# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
23662if test $ac_header_dirent = dirent.h; then
23663  echo "$as_me:23663: checking for opendir in -ldir" >&5
23664echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
23665if test "${ac_cv_lib_dir_opendir+set}" = set; then
23666  echo $ECHO_N "(cached) $ECHO_C" >&6
23667else
23668  ac_check_lib_save_LIBS=$LIBS
23669LIBS="-ldir  $LIBS"
23670cat >"conftest.$ac_ext" <<_ACEOF
23671#line 23671 "configure"
23672#include "confdefs.h"
23673
23674/* Override any gcc2 internal prototype to avoid an error.  */
23675#ifdef __cplusplus
23676extern "C"
23677#endif
23678/* We use char because int might match the return type of a gcc2
23679   builtin and then its argument prototype would still apply.  */
23680char opendir ();
23681int
23682main (void)
23683{
23684opendir ();
23685  ;
23686  return 0;
23687}
23688_ACEOF
23689rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23690if { (eval echo "$as_me:23690: \"$ac_link\"") >&5
23691  (eval $ac_link) 2>&5
23692  ac_status=$?
23693  echo "$as_me:23693: \$? = $ac_status" >&5
23694  (exit "$ac_status"); } &&
23695         { ac_try='test -s "conftest$ac_exeext"'
23696  { (eval echo "$as_me:23696: \"$ac_try\"") >&5
23697  (eval $ac_try) 2>&5
23698  ac_status=$?
23699  echo "$as_me:23699: \$? = $ac_status" >&5
23700  (exit "$ac_status"); }; }; then
23701  ac_cv_lib_dir_opendir=yes
23702else
23703  echo "$as_me: failed program was:" >&5
23704cat "conftest.$ac_ext" >&5
23705ac_cv_lib_dir_opendir=no
23706fi
23707rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23708LIBS=$ac_check_lib_save_LIBS
23709fi
23710echo "$as_me:23710: result: $ac_cv_lib_dir_opendir" >&5
23711echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
23712if test "$ac_cv_lib_dir_opendir" = yes; then
23713  LIBS="$LIBS -ldir"
23714fi
23715
23716else
23717  echo "$as_me:23717: checking for opendir in -lx" >&5
23718echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
23719if test "${ac_cv_lib_x_opendir+set}" = set; then
23720  echo $ECHO_N "(cached) $ECHO_C" >&6
23721else
23722  ac_check_lib_save_LIBS=$LIBS
23723LIBS="-lx  $LIBS"
23724cat >"conftest.$ac_ext" <<_ACEOF
23725#line 23725 "configure"
23726#include "confdefs.h"
23727
23728/* Override any gcc2 internal prototype to avoid an error.  */
23729#ifdef __cplusplus
23730extern "C"
23731#endif
23732/* We use char because int might match the return type of a gcc2
23733   builtin and then its argument prototype would still apply.  */
23734char opendir ();
23735int
23736main (void)
23737{
23738opendir ();
23739  ;
23740  return 0;
23741}
23742_ACEOF
23743rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23744if { (eval echo "$as_me:23744: \"$ac_link\"") >&5
23745  (eval $ac_link) 2>&5
23746  ac_status=$?
23747  echo "$as_me:23747: \$? = $ac_status" >&5
23748  (exit "$ac_status"); } &&
23749         { ac_try='test -s "conftest$ac_exeext"'
23750  { (eval echo "$as_me:23750: \"$ac_try\"") >&5
23751  (eval $ac_try) 2>&5
23752  ac_status=$?
23753  echo "$as_me:23753: \$? = $ac_status" >&5
23754  (exit "$ac_status"); }; }; then
23755  ac_cv_lib_x_opendir=yes
23756else
23757  echo "$as_me: failed program was:" >&5
23758cat "conftest.$ac_ext" >&5
23759ac_cv_lib_x_opendir=no
23760fi
23761rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23762LIBS=$ac_check_lib_save_LIBS
23763fi
23764echo "$as_me:23764: result: $ac_cv_lib_x_opendir" >&5
23765echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
23766if test "$ac_cv_lib_x_opendir" = yes; then
23767  LIBS="$LIBS -lx"
23768fi
23769
23770fi
23771
23772for ac_header in search.h stdint.h sys/param.h unistd.h
23773do
23774as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23775echo "$as_me:23775: checking for $ac_header" >&5
23776echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23777if eval "test \"\${$as_ac_Header+set}\" = set"; then
23778  echo $ECHO_N "(cached) $ECHO_C" >&6
23779else
23780  cat >"conftest.$ac_ext" <<_ACEOF
23781#line 23781 "configure"
23782#include "confdefs.h"
23783#include <$ac_header>
23784_ACEOF
23785if { (eval echo "$as_me:23785: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23786  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23787  ac_status=$?
23788  $EGREP -v '^ *\+' conftest.er1 >conftest.err
23789  rm -f conftest.er1
23790  cat conftest.err >&5
23791  echo "$as_me:23791: \$? = $ac_status" >&5
23792  (exit "$ac_status"); } >/dev/null; then
23793  if test -s conftest.err; then
23794    ac_cpp_err=$ac_c_preproc_warn_flag
23795  else
23796    ac_cpp_err=
23797  fi
23798else
23799  ac_cpp_err=yes
23800fi
23801if test -z "$ac_cpp_err"; then
23802  eval "$as_ac_Header=yes"
23803else
23804  echo "$as_me: failed program was:" >&5
23805  cat "conftest.$ac_ext" >&5
23806  eval "$as_ac_Header=no"
23807fi
23808rm -f conftest.err "conftest.$ac_ext"
23809fi
23810echo "$as_me:23810: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23811echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23812if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23813  cat >>confdefs.h <<EOF
23814#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23815EOF
23816
23817fi
23818done
23819
23820echo "$as_me:23820: checking for term.h" >&5
23821echo $ECHO_N "checking for term.h... $ECHO_C" >&6
23822if test "${cf_cv_term_header+set}" = set; then
23823  echo $ECHO_N "(cached) $ECHO_C" >&6
23824else
23825
23826# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
23827# for <term.h> if we do not find the variant.
23828
23829cf_header_list="term.h ncurses/term.h ncursesw/term.h"
23830
23831case "${cf_cv_ncurses_header:-curses.h}" in
23832(*/*)
23833	cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
23834	cf_header_list="$cf_header_item $cf_header_list"
23835	;;
23836esac
23837
23838for cf_header in $cf_header_list
23839do
23840	cat >"conftest.$ac_ext" <<_ACEOF
23841#line 23841 "configure"
23842#include "confdefs.h"
23843
23844#include <${cf_cv_ncurses_header:-curses.h}>
23845#include <${cf_header}>
23846int
23847main (void)
23848{
23849WINDOW *x; (void)x
23850  ;
23851  return 0;
23852}
23853_ACEOF
23854rm -f "conftest.$ac_objext"
23855if { (eval echo "$as_me:23855: \"$ac_compile\"") >&5
23856  (eval $ac_compile) 2>&5
23857  ac_status=$?
23858  echo "$as_me:23858: \$? = $ac_status" >&5
23859  (exit "$ac_status"); } &&
23860         { ac_try='test -s "conftest.$ac_objext"'
23861  { (eval echo "$as_me:23861: \"$ac_try\"") >&5
23862  (eval $ac_try) 2>&5
23863  ac_status=$?
23864  echo "$as_me:23864: \$? = $ac_status" >&5
23865  (exit "$ac_status"); }; }; then
23866  cf_cv_term_header=$cf_header
23867	 break
23868else
23869  echo "$as_me: failed program was:" >&5
23870cat "conftest.$ac_ext" >&5
23871cf_cv_term_header=no
23872fi
23873rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23874done
23875
23876case "$cf_cv_term_header" in
23877(no)
23878	# If curses is ncurses, some packagers still mess it up by trying to make
23879	# us use GNU termcap.  This handles the most common case.
23880	for cf_header in ncurses/term.h ncursesw/term.h
23881	do
23882		cat >"conftest.$ac_ext" <<_ACEOF
23883#line 23883 "configure"
23884#include "confdefs.h"
23885
23886#include <${cf_cv_ncurses_header:-curses.h}>
23887#ifdef NCURSES_VERSION
23888#include <${cf_header}>
23889#else
23890make an error
23891#endif
23892int
23893main (void)
23894{
23895WINDOW *x; (void)x
23896  ;
23897  return 0;
23898}
23899_ACEOF
23900rm -f "conftest.$ac_objext"
23901if { (eval echo "$as_me:23901: \"$ac_compile\"") >&5
23902  (eval $ac_compile) 2>&5
23903  ac_status=$?
23904  echo "$as_me:23904: \$? = $ac_status" >&5
23905  (exit "$ac_status"); } &&
23906         { ac_try='test -s "conftest.$ac_objext"'
23907  { (eval echo "$as_me:23907: \"$ac_try\"") >&5
23908  (eval $ac_try) 2>&5
23909  ac_status=$?
23910  echo "$as_me:23910: \$? = $ac_status" >&5
23911  (exit "$ac_status"); }; }; then
23912  cf_cv_term_header=$cf_header
23913			 break
23914else
23915  echo "$as_me: failed program was:" >&5
23916cat "conftest.$ac_ext" >&5
23917cf_cv_term_header=no
23918fi
23919rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23920	done
23921	;;
23922esac
23923
23924fi
23925echo "$as_me:23925: result: $cf_cv_term_header" >&5
23926echo "${ECHO_T}$cf_cv_term_header" >&6
23927
23928case "$cf_cv_term_header" in
23929(term.h)
23930
23931cat >>confdefs.h <<\EOF
23932#define HAVE_TERM_H 1
23933EOF
23934
23935	;;
23936(ncurses/term.h)
23937
23938cat >>confdefs.h <<\EOF
23939#define HAVE_NCURSES_TERM_H 1
23940EOF
23941
23942	;;
23943(ncursesw/term.h)
23944
23945cat >>confdefs.h <<\EOF
23946#define HAVE_NCURSESW_TERM_H 1
23947EOF
23948
23949	;;
23950esac
23951
23952echo "$as_me:23952: checking return type of signal handlers" >&5
23953echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
23954if test "${ac_cv_type_signal+set}" = set; then
23955  echo $ECHO_N "(cached) $ECHO_C" >&6
23956else
23957  cat >"conftest.$ac_ext" <<_ACEOF
23958#line 23958 "configure"
23959#include "confdefs.h"
23960#include <sys/types.h>
23961#include <signal.h>
23962#ifdef signal
23963# undef signal
23964#endif
23965#ifdef __cplusplus
23966extern "C" void (*signal (int, void (*)(int)))(int);
23967#else
23968void (*signal ()) ();
23969#endif
23970
23971int
23972main (void)
23973{
23974int i;
23975  ;
23976  return 0;
23977}
23978_ACEOF
23979rm -f "conftest.$ac_objext"
23980if { (eval echo "$as_me:23980: \"$ac_compile\"") >&5
23981  (eval $ac_compile) 2>&5
23982  ac_status=$?
23983  echo "$as_me:23983: \$? = $ac_status" >&5
23984  (exit "$ac_status"); } &&
23985         { ac_try='test -s "conftest.$ac_objext"'
23986  { (eval echo "$as_me:23986: \"$ac_try\"") >&5
23987  (eval $ac_try) 2>&5
23988  ac_status=$?
23989  echo "$as_me:23989: \$? = $ac_status" >&5
23990  (exit "$ac_status"); }; }; then
23991  ac_cv_type_signal=void
23992else
23993  echo "$as_me: failed program was:" >&5
23994cat "conftest.$ac_ext" >&5
23995ac_cv_type_signal=int
23996fi
23997rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23998fi
23999echo "$as_me:23999: result: $ac_cv_type_signal" >&5
24000echo "${ECHO_T}$ac_cv_type_signal" >&6
24001
24002cat >>confdefs.h <<EOF
24003#define RETSIGTYPE $ac_cv_type_signal
24004EOF
24005
24006for ac_func in \
24007btowc \
24008mblen \
24009mbrlen \
24010mbrtowc \
24011mbtowc \
24012strcasecmp \
24013strftime \
24014tsearch \
24015waitpid \
24016wcsrtombs \
24017wcstombs \
24018wctob \
24019wctomb \
24020mktime \
24021
24022do
24023as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24024echo "$as_me:24024: checking for $ac_func" >&5
24025echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24026if eval "test \"\${$as_ac_var+set}\" = set"; then
24027  echo $ECHO_N "(cached) $ECHO_C" >&6
24028else
24029  cat >"conftest.$ac_ext" <<_ACEOF
24030#line 24030 "configure"
24031#include "confdefs.h"
24032#define $ac_func autoconf_temporary
24033#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
24034#undef $ac_func
24035
24036#ifdef __cplusplus
24037extern "C"
24038#endif
24039
24040/* We use char because int might match the return type of a gcc2
24041   builtin and then its argument prototype would still apply.  */
24042char $ac_func (void);
24043
24044int
24045main (void)
24046{
24047
24048/* The GNU C library defines stubs for functions which it implements
24049    to always fail with ENOSYS.  Some functions are actually named
24050    something starting with __ and the normal name is an alias.  */
24051#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24052#error found stub for $ac_func
24053#endif
24054
24055	return $ac_func ();
24056  ;
24057  return 0;
24058}
24059_ACEOF
24060rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24061if { (eval echo "$as_me:24061: \"$ac_link\"") >&5
24062  (eval $ac_link) 2>&5
24063  ac_status=$?
24064  echo "$as_me:24064: \$? = $ac_status" >&5
24065  (exit "$ac_status"); } &&
24066         { ac_try='test -s "conftest$ac_exeext"'
24067  { (eval echo "$as_me:24067: \"$ac_try\"") >&5
24068  (eval $ac_try) 2>&5
24069  ac_status=$?
24070  echo "$as_me:24070: \$? = $ac_status" >&5
24071  (exit "$ac_status"); }; }; then
24072  eval "$as_ac_var=yes"
24073else
24074  echo "$as_me: failed program was:" >&5
24075cat "conftest.$ac_ext" >&5
24076eval "$as_ac_var=no"
24077fi
24078rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24079fi
24080echo "$as_me:24080: result: `eval echo '${'"$as_ac_var"'}'`" >&5
24081echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
24082if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
24083  cat >>confdefs.h <<EOF
24084#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24085EOF
24086
24087fi
24088done
24089
24090echo "$as_me:24090: checking definition to turn on extended curses functions" >&5
24091echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
24092if test "${cf_cv_need_xopen_extension+set}" = set; then
24093  echo $ECHO_N "(cached) $ECHO_C" >&6
24094else
24095
24096cf_cv_need_xopen_extension=unknown
24097cat >"conftest.$ac_ext" <<_ACEOF
24098#line 24098 "configure"
24099#include "confdefs.h"
24100
24101#include <stdlib.h>
24102#include <${cf_cv_ncurses_header:-curses.h}>
24103int
24104main (void)
24105{
24106
24107#if defined(NCURSES_VERSION_PATCH)
24108#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
24109	make an error
24110#endif
24111#endif
24112#ifdef NCURSES_VERSION
24113	cchar_t check;
24114	int check2 = curs_set((int)sizeof(check));
24115#endif
24116	long x = winnstr(stdscr, "", 0);
24117	int x1, y1;
24118#ifdef NCURSES_VERSION
24119	(void)check2;
24120#endif
24121	getbegyx(stdscr, y1, x1);
24122	(void)x;
24123	(void)y1;
24124	(void)x1;
24125
24126  ;
24127  return 0;
24128}
24129_ACEOF
24130rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24131if { (eval echo "$as_me:24131: \"$ac_link\"") >&5
24132  (eval $ac_link) 2>&5
24133  ac_status=$?
24134  echo "$as_me:24134: \$? = $ac_status" >&5
24135  (exit "$ac_status"); } &&
24136         { ac_try='test -s "conftest$ac_exeext"'
24137  { (eval echo "$as_me:24137: \"$ac_try\"") >&5
24138  (eval $ac_try) 2>&5
24139  ac_status=$?
24140  echo "$as_me:24140: \$? = $ac_status" >&5
24141  (exit "$ac_status"); }; }; then
24142  cf_cv_need_xopen_extension=none
24143else
24144  echo "$as_me: failed program was:" >&5
24145cat "conftest.$ac_ext" >&5
24146
24147	for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
24148	do
24149		cat >"conftest.$ac_ext" <<_ACEOF
24150#line 24150 "configure"
24151#include "confdefs.h"
24152
24153#define $cf_try_xopen_extension 1
24154#include <stdlib.h>
24155#include <${cf_cv_ncurses_header:-curses.h}>
24156int
24157main (void)
24158{
24159
24160#ifdef NCURSES_VERSION
24161		cchar_t check;
24162		int check2 = curs_set((int)sizeof(check));
24163#endif
24164		long x = winnstr(stdscr, "", 0);
24165		int x1, y1;
24166		getbegyx(stdscr, y1, x1);
24167#ifdef NCURSES_VERSION
24168		(void)check2;
24169#endif
24170		(void)x;
24171		(void)y1;
24172		(void)x1;
24173
24174  ;
24175  return 0;
24176}
24177_ACEOF
24178rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24179if { (eval echo "$as_me:24179: \"$ac_link\"") >&5
24180  (eval $ac_link) 2>&5
24181  ac_status=$?
24182  echo "$as_me:24182: \$? = $ac_status" >&5
24183  (exit "$ac_status"); } &&
24184         { ac_try='test -s "conftest$ac_exeext"'
24185  { (eval echo "$as_me:24185: \"$ac_try\"") >&5
24186  (eval $ac_try) 2>&5
24187  ac_status=$?
24188  echo "$as_me:24188: \$? = $ac_status" >&5
24189  (exit "$ac_status"); }; }; then
24190  cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
24191else
24192  echo "$as_me: failed program was:" >&5
24193cat "conftest.$ac_ext" >&5
24194fi
24195rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24196	done
24197
24198fi
24199rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24200
24201fi
24202echo "$as_me:24202: result: $cf_cv_need_xopen_extension" >&5
24203echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
24204
24205case "$cf_cv_need_xopen_extension" in
24206(*_*)
24207
24208	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24209	CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
24210
24211	;;
24212esac
24213
24214echo "$as_me:24214: checking for unctrl.h" >&5
24215echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
24216if test "${cf_cv_unctrl_header+set}" = set; then
24217  echo $ECHO_N "(cached) $ECHO_C" >&6
24218else
24219
24220# If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
24221# for <unctrl.h> if we do not find the variant.
24222
24223cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
24224
24225case "${cf_cv_ncurses_header:-curses.h}" in
24226(*/*)
24227	cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
24228	cf_header_list="$cf_header_item $cf_header_list"
24229	;;
24230esac
24231
24232for cf_header in $cf_header_list
24233do
24234	cat >"conftest.$ac_ext" <<_ACEOF
24235#line 24235 "configure"
24236#include "confdefs.h"
24237
24238#include <${cf_cv_ncurses_header:-curses.h}>
24239#include <${cf_header}>
24240int
24241main (void)
24242{
24243WINDOW *x; (void)x
24244  ;
24245  return 0;
24246}
24247_ACEOF
24248rm -f "conftest.$ac_objext"
24249if { (eval echo "$as_me:24249: \"$ac_compile\"") >&5
24250  (eval $ac_compile) 2>&5
24251  ac_status=$?
24252  echo "$as_me:24252: \$? = $ac_status" >&5
24253  (exit "$ac_status"); } &&
24254         { ac_try='test -s "conftest.$ac_objext"'
24255  { (eval echo "$as_me:24255: \"$ac_try\"") >&5
24256  (eval $ac_try) 2>&5
24257  ac_status=$?
24258  echo "$as_me:24258: \$? = $ac_status" >&5
24259  (exit "$ac_status"); }; }; then
24260  cf_cv_unctrl_header=$cf_header
24261	 break
24262else
24263  echo "$as_me: failed program was:" >&5
24264cat "conftest.$ac_ext" >&5
24265cf_cv_unctrl_header=no
24266fi
24267rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24268done
24269
24270fi
24271echo "$as_me:24271: result: $cf_cv_unctrl_header" >&5
24272echo "${ECHO_T}$cf_cv_unctrl_header" >&6
24273
24274case "$cf_cv_unctrl_header" in
24275(no)
24276	{ echo "$as_me:24276: WARNING: unctrl.h header not found" >&5
24277echo "$as_me: WARNING: unctrl.h header not found" >&2;}
24278	;;
24279esac
24280
24281case "$cf_cv_unctrl_header" in
24282(unctrl.h)
24283
24284cat >>confdefs.h <<\EOF
24285#define HAVE_UNCTRL_H 1
24286EOF
24287
24288	;;
24289(ncurses/unctrl.h)
24290
24291cat >>confdefs.h <<\EOF
24292#define HAVE_NCURSES_UNCTRL_H 1
24293EOF
24294
24295	;;
24296(ncursesw/unctrl.h)
24297
24298cat >>confdefs.h <<\EOF
24299#define HAVE_NCURSESW_UNCTRL_H 1
24300EOF
24301
24302	;;
24303esac
24304
24305for cf_func in \
24306flushinp \
24307getattrs \
24308getbegx \
24309getbegy \
24310getbegyx \
24311getcurx \
24312getcury \
24313getmaxx \
24314getmaxy \
24315getmaxyx \
24316getparx \
24317getpary \
24318getparyx \
24319use_default_colors \
24320wchgat \
24321wcursyncup \
24322wget_wch \
24323wsyncup \
24324
24325do
24326
24327cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24328
24329	echo "$as_me:24329: checking for ${cf_func}" >&5
24330echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
24331
24332echo "${as_me:-configure}:24332: testing ${cf_func} ..." 1>&5
24333
24334	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
24335  echo $ECHO_N "(cached) $ECHO_C" >&6
24336else
24337
24338		eval cf_result='$ac_cv_func_'$cf_func
24339		if test ".$cf_result" != ".no"; then
24340			cat >"conftest.$ac_ext" <<_ACEOF
24341#line 24341 "configure"
24342#include "confdefs.h"
24343
24344#ifdef HAVE_XCURSES
24345#include <xcurses.h>
24346char * XCursesProgramName = "test";
24347#else
24348#include <${cf_cv_ncurses_header:-curses.h}>
24349#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
24350#include <ncursesw/term.h>
24351#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
24352#include <ncurses/term.h>
24353#elif defined(HAVE_TERM_H)
24354#include <term.h>
24355#endif
24356#endif
24357
24358int
24359main (void)
24360{
24361
24362#ifndef ${cf_func}
24363long foo = (long)(&${cf_func});
24364fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
24365if (foo + 1234L > 5678L)
24366	${cf_cv_main_return:-return}(foo != 0);
24367#endif
24368
24369  ;
24370  return 0;
24371}
24372_ACEOF
24373rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24374if { (eval echo "$as_me:24374: \"$ac_link\"") >&5
24375  (eval $ac_link) 2>&5
24376  ac_status=$?
24377  echo "$as_me:24377: \$? = $ac_status" >&5
24378  (exit "$ac_status"); } &&
24379         { ac_try='test -s "conftest$ac_exeext"'
24380  { (eval echo "$as_me:24380: \"$ac_try\"") >&5
24381  (eval $ac_try) 2>&5
24382  ac_status=$?
24383  echo "$as_me:24383: \$? = $ac_status" >&5
24384  (exit "$ac_status"); }; }; then
24385  cf_result=yes
24386else
24387  echo "$as_me: failed program was:" >&5
24388cat "conftest.$ac_ext" >&5
24389cf_result=no
24390fi
24391rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24392		fi
24393		eval 'cf_cv_func_'$cf_func'="$cf_result"'
24394
24395fi
24396
24397	# use the computed/retrieved cache-value:
24398	eval 'cf_result=$cf_cv_func_'$cf_func
24399	echo "$as_me:24399: result: $cf_result" >&5
24400echo "${ECHO_T}$cf_result" >&6
24401	if test "$cf_result" != no; then
24402		cat >>confdefs.h <<EOF
24403#define HAVE_${cf_tr_func} 1
24404EOF
24405
24406	fi
24407done
24408
24409for cf_func in \
24410curses_exit \
24411_nc_free_and_exit \
24412
24413do
24414
24415cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24416
24417	echo "$as_me:24417: checking for ${cf_func}" >&5
24418echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
24419
24420echo "${as_me:-configure}:24420: testing ${cf_func} ..." 1>&5
24421
24422	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
24423  echo $ECHO_N "(cached) $ECHO_C" >&6
24424else
24425
24426		eval cf_result='$ac_cv_func_'$cf_func
24427		if test ".$cf_result" != ".no"; then
24428			cat >"conftest.$ac_ext" <<_ACEOF
24429#line 24429 "configure"
24430#include "confdefs.h"
24431
24432#ifdef HAVE_XCURSES
24433#include <xcurses.h>
24434char * XCursesProgramName = "test";
24435#else
24436#include <${cf_cv_ncurses_header:-curses.h}>
24437#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
24438#include <ncursesw/term.h>
24439#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
24440#include <ncurses/term.h>
24441#elif defined(HAVE_TERM_H)
24442#include <term.h>
24443#endif
24444#endif
24445
24446int
24447main (void)
24448{
24449
24450#ifndef ${cf_func}
24451long foo = (long)(&${cf_func});
24452fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
24453if (foo + 1234L > 5678L)
24454	${cf_cv_main_return:-return}(foo != 0);
24455#endif
24456
24457  ;
24458  return 0;
24459}
24460_ACEOF
24461rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24462if { (eval echo "$as_me:24462: \"$ac_link\"") >&5
24463  (eval $ac_link) 2>&5
24464  ac_status=$?
24465  echo "$as_me:24465: \$? = $ac_status" >&5
24466  (exit "$ac_status"); } &&
24467         { ac_try='test -s "conftest$ac_exeext"'
24468  { (eval echo "$as_me:24468: \"$ac_try\"") >&5
24469  (eval $ac_try) 2>&5
24470  ac_status=$?
24471  echo "$as_me:24471: \$? = $ac_status" >&5
24472  (exit "$ac_status"); }; }; then
24473  cf_result=yes
24474else
24475  echo "$as_me: failed program was:" >&5
24476cat "conftest.$ac_ext" >&5
24477cf_result=no
24478fi
24479rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24480		fi
24481		eval 'cf_cv_func_'$cf_func'="$cf_result"'
24482
24483fi
24484
24485	# use the computed/retrieved cache-value:
24486	eval 'cf_result=$cf_cv_func_'$cf_func
24487	echo "$as_me:24487: result: $cf_result" >&5
24488echo "${ECHO_T}$cf_result" >&6
24489	if test "$cf_result" != no; then
24490		cat >>confdefs.h <<EOF
24491#define HAVE_${cf_tr_func} 1
24492EOF
24493
24494	fi
24495done
24496
24497echo "$as_me:24497: checking for start_color" >&5
24498echo $ECHO_N "checking for start_color... $ECHO_C" >&6
24499if test "${ac_cv_func_start_color+set}" = set; then
24500  echo $ECHO_N "(cached) $ECHO_C" >&6
24501else
24502  cat >"conftest.$ac_ext" <<_ACEOF
24503#line 24503 "configure"
24504#include "confdefs.h"
24505#define start_color autoconf_temporary
24506#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
24507#undef start_color
24508
24509#ifdef __cplusplus
24510extern "C"
24511#endif
24512
24513/* We use char because int might match the return type of a gcc2
24514   builtin and then its argument prototype would still apply.  */
24515char start_color (void);
24516
24517int
24518main (void)
24519{
24520
24521/* The GNU C library defines stubs for functions which it implements
24522    to always fail with ENOSYS.  Some functions are actually named
24523    something starting with __ and the normal name is an alias.  */
24524#if defined (__stub_start_color) || defined (__stub___start_color)
24525#error found stub for start_color
24526#endif
24527
24528	return start_color ();
24529  ;
24530  return 0;
24531}
24532_ACEOF
24533rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24534if { (eval echo "$as_me:24534: \"$ac_link\"") >&5
24535  (eval $ac_link) 2>&5
24536  ac_status=$?
24537  echo "$as_me:24537: \$? = $ac_status" >&5
24538  (exit "$ac_status"); } &&
24539         { ac_try='test -s "conftest$ac_exeext"'
24540  { (eval echo "$as_me:24540: \"$ac_try\"") >&5
24541  (eval $ac_try) 2>&5
24542  ac_status=$?
24543  echo "$as_me:24543: \$? = $ac_status" >&5
24544  (exit "$ac_status"); }; }; then
24545  ac_cv_func_start_color=yes
24546else
24547  echo "$as_me: failed program was:" >&5
24548cat "conftest.$ac_ext" >&5
24549ac_cv_func_start_color=no
24550fi
24551rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24552fi
24553echo "$as_me:24553: result: $ac_cv_func_start_color" >&5
24554echo "${ECHO_T}$ac_cv_func_start_color" >&6
24555if test "$ac_cv_func_start_color" = yes; then
24556
24557cat >>confdefs.h <<\EOF
24558#define HAVE_COLOR 1
24559EOF
24560
24561fi
24562
24563echo "$as_me:24563: checking for chtype typedef" >&5
24564echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
24565if test "${cf_cv_chtype_decl+set}" = set; then
24566  echo $ECHO_N "(cached) $ECHO_C" >&6
24567else
24568
24569	cat >"conftest.$ac_ext" <<_ACEOF
24570#line 24570 "configure"
24571#include "confdefs.h"
24572#include <${cf_cv_ncurses_header:-curses.h}>
24573int
24574main (void)
24575{
24576chtype foo; (void)foo
24577  ;
24578  return 0;
24579}
24580_ACEOF
24581rm -f "conftest.$ac_objext"
24582if { (eval echo "$as_me:24582: \"$ac_compile\"") >&5
24583  (eval $ac_compile) 2>&5
24584  ac_status=$?
24585  echo "$as_me:24585: \$? = $ac_status" >&5
24586  (exit "$ac_status"); } &&
24587         { ac_try='test -s "conftest.$ac_objext"'
24588  { (eval echo "$as_me:24588: \"$ac_try\"") >&5
24589  (eval $ac_try) 2>&5
24590  ac_status=$?
24591  echo "$as_me:24591: \$? = $ac_status" >&5
24592  (exit "$ac_status"); }; }; then
24593  cf_cv_chtype_decl=yes
24594else
24595  echo "$as_me: failed program was:" >&5
24596cat "conftest.$ac_ext" >&5
24597cf_cv_chtype_decl=no
24598fi
24599rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24600fi
24601echo "$as_me:24601: result: $cf_cv_chtype_decl" >&5
24602echo "${ECHO_T}$cf_cv_chtype_decl" >&6
24603if test "$cf_cv_chtype_decl" = yes ; then
24604
24605cat >>confdefs.h <<\EOF
24606#define HAVE_TYPE_CHTYPE 1
24607EOF
24608
24609	echo "$as_me:24609: checking if chtype is scalar or struct" >&5
24610echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
24611if test "${cf_cv_chtype_type+set}" = set; then
24612  echo $ECHO_N "(cached) $ECHO_C" >&6
24613else
24614
24615		cat >"conftest.$ac_ext" <<_ACEOF
24616#line 24616 "configure"
24617#include "confdefs.h"
24618#include <${cf_cv_ncurses_header:-curses.h}>
24619int
24620main (void)
24621{
24622static chtype foo; long x = foo; (void)x
24623  ;
24624  return 0;
24625}
24626_ACEOF
24627rm -f "conftest.$ac_objext"
24628if { (eval echo "$as_me:24628: \"$ac_compile\"") >&5
24629  (eval $ac_compile) 2>&5
24630  ac_status=$?
24631  echo "$as_me:24631: \$? = $ac_status" >&5
24632  (exit "$ac_status"); } &&
24633         { ac_try='test -s "conftest.$ac_objext"'
24634  { (eval echo "$as_me:24634: \"$ac_try\"") >&5
24635  (eval $ac_try) 2>&5
24636  ac_status=$?
24637  echo "$as_me:24637: \$? = $ac_status" >&5
24638  (exit "$ac_status"); }; }; then
24639  cf_cv_chtype_type=scalar
24640else
24641  echo "$as_me: failed program was:" >&5
24642cat "conftest.$ac_ext" >&5
24643cf_cv_chtype_type=struct
24644fi
24645rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24646fi
24647echo "$as_me:24647: result: $cf_cv_chtype_type" >&5
24648echo "${ECHO_T}$cf_cv_chtype_type" >&6
24649	if test "$cf_cv_chtype_type" = scalar ; then
24650
24651cat >>confdefs.h <<\EOF
24652#define TYPE_CHTYPE_IS_SCALAR 1
24653EOF
24654
24655	fi
24656fi
24657
24658echo "$as_me:24658: checking for wide alternate character set array" >&5
24659echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
24660if test "${cf_cv_curses_wacs_map+set}" = set; then
24661  echo $ECHO_N "(cached) $ECHO_C" >&6
24662else
24663
24664	cf_cv_curses_wacs_map=unknown
24665	for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
24666	do
24667	cat >"conftest.$ac_ext" <<_ACEOF
24668#line 24668 "configure"
24669#include "confdefs.h"
24670
24671#ifndef _XOPEN_SOURCE_EXTENDED
24672#define _XOPEN_SOURCE_EXTENDED
24673#endif
24674#include <${cf_cv_ncurses_header:-curses.h}>
24675int
24676main (void)
24677{
24678void *foo = &(${name}['k']); (void)foo
24679  ;
24680  return 0;
24681}
24682_ACEOF
24683rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24684if { (eval echo "$as_me:24684: \"$ac_link\"") >&5
24685  (eval $ac_link) 2>&5
24686  ac_status=$?
24687  echo "$as_me:24687: \$? = $ac_status" >&5
24688  (exit "$ac_status"); } &&
24689         { ac_try='test -s "conftest$ac_exeext"'
24690  { (eval echo "$as_me:24690: \"$ac_try\"") >&5
24691  (eval $ac_try) 2>&5
24692  ac_status=$?
24693  echo "$as_me:24693: \$? = $ac_status" >&5
24694  (exit "$ac_status"); }; }; then
24695  cf_cv_curses_wacs_map=$name
24696	 break
24697else
24698  echo "$as_me: failed program was:" >&5
24699cat "conftest.$ac_ext" >&5
24700fi
24701rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24702	done
24703fi
24704echo "$as_me:24704: result: $cf_cv_curses_wacs_map" >&5
24705echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
24706
24707test "$cf_cv_curses_wacs_map" != unknown &&
24708cat >>confdefs.h <<EOF
24709#define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
24710EOF
24711
24712echo "$as_me:24712: checking for wide alternate character constants" >&5
24713echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
24714if test "${cf_cv_curses_wacs_symbols+set}" = set; then
24715  echo $ECHO_N "(cached) $ECHO_C" >&6
24716else
24717
24718cf_cv_curses_wacs_symbols=no
24719if test "$cf_cv_curses_wacs_map" != unknown
24720then
24721	cat >"conftest.$ac_ext" <<_ACEOF
24722#line 24722 "configure"
24723#include "confdefs.h"
24724
24725#ifndef _XOPEN_SOURCE_EXTENDED
24726#define _XOPEN_SOURCE_EXTENDED
24727#endif
24728#include <${cf_cv_ncurses_header:-curses.h}>
24729int
24730main (void)
24731{
24732cchar_t *foo = WACS_PLUS;
24733	 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
24734  ;
24735  return 0;
24736}
24737_ACEOF
24738rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24739if { (eval echo "$as_me:24739: \"$ac_link\"") >&5
24740  (eval $ac_link) 2>&5
24741  ac_status=$?
24742  echo "$as_me:24742: \$? = $ac_status" >&5
24743  (exit "$ac_status"); } &&
24744         { ac_try='test -s "conftest$ac_exeext"'
24745  { (eval echo "$as_me:24745: \"$ac_try\"") >&5
24746  (eval $ac_try) 2>&5
24747  ac_status=$?
24748  echo "$as_me:24748: \$? = $ac_status" >&5
24749  (exit "$ac_status"); }; }; then
24750  cf_cv_curses_wacs_symbols=yes
24751else
24752  echo "$as_me: failed program was:" >&5
24753cat "conftest.$ac_ext" >&5
24754fi
24755rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24756else
24757	cat >"conftest.$ac_ext" <<_ACEOF
24758#line 24758 "configure"
24759#include "confdefs.h"
24760
24761#ifndef _XOPEN_SOURCE_EXTENDED
24762#define _XOPEN_SOURCE_EXTENDED
24763#endif
24764#include <${cf_cv_ncurses_header:-curses.h}>
24765int
24766main (void)
24767{
24768cchar_t *foo = WACS_PLUS; (void)foo
24769  ;
24770  return 0;
24771}
24772_ACEOF
24773rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24774if { (eval echo "$as_me:24774: \"$ac_link\"") >&5
24775  (eval $ac_link) 2>&5
24776  ac_status=$?
24777  echo "$as_me:24777: \$? = $ac_status" >&5
24778  (exit "$ac_status"); } &&
24779         { ac_try='test -s "conftest$ac_exeext"'
24780  { (eval echo "$as_me:24780: \"$ac_try\"") >&5
24781  (eval $ac_try) 2>&5
24782  ac_status=$?
24783  echo "$as_me:24783: \$? = $ac_status" >&5
24784  (exit "$ac_status"); }; }; then
24785  cf_cv_curses_wacs_symbols=yes
24786else
24787  echo "$as_me: failed program was:" >&5
24788cat "conftest.$ac_ext" >&5
24789fi
24790rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24791fi
24792
24793fi
24794echo "$as_me:24794: result: $cf_cv_curses_wacs_symbols" >&5
24795echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
24796
24797test "$cf_cv_curses_wacs_symbols" != no &&
24798cat >>confdefs.h <<\EOF
24799#define CURSES_WACS_SYMBOLS 1
24800EOF
24801
24802for cf_func in wgetparent
24803do
24804
24805cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24806
24807	echo "$as_me:24807: checking for ${cf_func}" >&5
24808echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
24809
24810echo "${as_me:-configure}:24810: testing ${cf_func} ..." 1>&5
24811
24812	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
24813  echo $ECHO_N "(cached) $ECHO_C" >&6
24814else
24815
24816		eval cf_result='$ac_cv_func_'$cf_func
24817		if test ".$cf_result" != ".no"; then
24818			cat >"conftest.$ac_ext" <<_ACEOF
24819#line 24819 "configure"
24820#include "confdefs.h"
24821
24822#ifdef HAVE_XCURSES
24823#include <xcurses.h>
24824char * XCursesProgramName = "test";
24825#else
24826#include <${cf_cv_ncurses_header:-curses.h}>
24827#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
24828#include <ncursesw/term.h>
24829#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
24830#include <ncurses/term.h>
24831#elif defined(HAVE_TERM_H)
24832#include <term.h>
24833#endif
24834#endif
24835
24836int
24837main (void)
24838{
24839
24840#ifndef ${cf_func}
24841long foo = (long)(&${cf_func});
24842fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
24843if (foo + 1234L > 5678L)
24844	${cf_cv_main_return:-return}(foo != 0);
24845#endif
24846
24847  ;
24848  return 0;
24849}
24850_ACEOF
24851rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24852if { (eval echo "$as_me:24852: \"$ac_link\"") >&5
24853  (eval $ac_link) 2>&5
24854  ac_status=$?
24855  echo "$as_me:24855: \$? = $ac_status" >&5
24856  (exit "$ac_status"); } &&
24857         { ac_try='test -s "conftest$ac_exeext"'
24858  { (eval echo "$as_me:24858: \"$ac_try\"") >&5
24859  (eval $ac_try) 2>&5
24860  ac_status=$?
24861  echo "$as_me:24861: \$? = $ac_status" >&5
24862  (exit "$ac_status"); }; }; then
24863  cf_result=yes
24864else
24865  echo "$as_me: failed program was:" >&5
24866cat "conftest.$ac_ext" >&5
24867cf_result=no
24868fi
24869rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24870		fi
24871		eval 'cf_cv_func_'$cf_func'="$cf_result"'
24872
24873fi
24874
24875	# use the computed/retrieved cache-value:
24876	eval 'cf_result=$cf_cv_func_'$cf_func
24877	echo "$as_me:24877: result: $cf_result" >&5
24878echo "${ECHO_T}$cf_result" >&6
24879	if test "$cf_result" != no; then
24880		cat >>confdefs.h <<EOF
24881#define HAVE_${cf_tr_func} 1
24882EOF
24883
24884	fi
24885done
24886
24887if test "x$cf_cv_func_wgetparent" != xyes
24888then
24889	echo "$as_me:24889: checking if WINDOW has _parent member" >&5
24890echo $ECHO_N "checking if WINDOW has _parent member... $ECHO_C" >&6
24891	cat >"conftest.$ac_ext" <<_ACEOF
24892#line 24892 "configure"
24893#include "confdefs.h"
24894#include <${cf_cv_ncurses_header:-curses.h}>
24895int
24896main (void)
24897{
24898WINDOW *p = stdscr->_parent; (void)p
24899  ;
24900  return 0;
24901}
24902_ACEOF
24903rm -f "conftest.$ac_objext"
24904if { (eval echo "$as_me:24904: \"$ac_compile\"") >&5
24905  (eval $ac_compile) 2>&5
24906  ac_status=$?
24907  echo "$as_me:24907: \$? = $ac_status" >&5
24908  (exit "$ac_status"); } &&
24909         { ac_try='test -s "conftest.$ac_objext"'
24910  { (eval echo "$as_me:24910: \"$ac_try\"") >&5
24911  (eval $ac_try) 2>&5
24912  ac_status=$?
24913  echo "$as_me:24913: \$? = $ac_status" >&5
24914  (exit "$ac_status"); }; }; then
24915  cf_window__parent=yes
24916else
24917  echo "$as_me: failed program was:" >&5
24918cat "conftest.$ac_ext" >&5
24919cf_window__parent=no
24920fi
24921rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24922	echo "$as_me:24922: result: $cf_window__parent" >&5
24923echo "${ECHO_T}$cf_window__parent" >&6
24924	if test "$cf_window__parent" = yes
24925	then
24926
24927cat >>confdefs.h <<\EOF
24928#define HAVE_WINDOW__PARENT 1
24929EOF
24930
24931	fi
24932fi
24933
24934for ac_header in sys/wait.h
24935do
24936as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24937echo "$as_me:24937: checking for $ac_header" >&5
24938echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24939if eval "test \"\${$as_ac_Header+set}\" = set"; then
24940  echo $ECHO_N "(cached) $ECHO_C" >&6
24941else
24942  cat >"conftest.$ac_ext" <<_ACEOF
24943#line 24943 "configure"
24944#include "confdefs.h"
24945#include <$ac_header>
24946_ACEOF
24947if { (eval echo "$as_me:24947: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24948  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24949  ac_status=$?
24950  $EGREP -v '^ *\+' conftest.er1 >conftest.err
24951  rm -f conftest.er1
24952  cat conftest.err >&5
24953  echo "$as_me:24953: \$? = $ac_status" >&5
24954  (exit "$ac_status"); } >/dev/null; then
24955  if test -s conftest.err; then
24956    ac_cpp_err=$ac_c_preproc_warn_flag
24957  else
24958    ac_cpp_err=
24959  fi
24960else
24961  ac_cpp_err=yes
24962fi
24963if test -z "$ac_cpp_err"; then
24964  eval "$as_ac_Header=yes"
24965else
24966  echo "$as_me: failed program was:" >&5
24967  cat "conftest.$ac_ext" >&5
24968  eval "$as_ac_Header=no"
24969fi
24970rm -f conftest.err "conftest.$ac_ext"
24971fi
24972echo "$as_me:24972: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24973echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24974if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24975  cat >>confdefs.h <<EOF
24976#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24977EOF
24978
24979fi
24980done
24981
24982cf_wait_headers="#include <sys/types.h>
24983"
24984if test "$ac_cv_header_sys_wait_h" = yes; then
24985cf_wait_headers="$cf_wait_headers
24986#include <sys/wait.h>
24987"
24988else
24989
24990for ac_header in wait.h
24991do
24992as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24993echo "$as_me:24993: checking for $ac_header" >&5
24994echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24995if eval "test \"\${$as_ac_Header+set}\" = set"; then
24996  echo $ECHO_N "(cached) $ECHO_C" >&6
24997else
24998  cat >"conftest.$ac_ext" <<_ACEOF
24999#line 24999 "configure"
25000#include "confdefs.h"
25001#include <$ac_header>
25002_ACEOF
25003if { (eval echo "$as_me:25003: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25004  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25005  ac_status=$?
25006  $EGREP -v '^ *\+' conftest.er1 >conftest.err
25007  rm -f conftest.er1
25008  cat conftest.err >&5
25009  echo "$as_me:25009: \$? = $ac_status" >&5
25010  (exit "$ac_status"); } >/dev/null; then
25011  if test -s conftest.err; then
25012    ac_cpp_err=$ac_c_preproc_warn_flag
25013  else
25014    ac_cpp_err=
25015  fi
25016else
25017  ac_cpp_err=yes
25018fi
25019if test -z "$ac_cpp_err"; then
25020  eval "$as_ac_Header=yes"
25021else
25022  echo "$as_me: failed program was:" >&5
25023  cat "conftest.$ac_ext" >&5
25024  eval "$as_ac_Header=no"
25025fi
25026rm -f conftest.err "conftest.$ac_ext"
25027fi
25028echo "$as_me:25028: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25029echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25030if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25031  cat >>confdefs.h <<EOF
25032#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25033EOF
25034
25035fi
25036done
25037
25038for ac_header in waitstatus.h
25039do
25040as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25041echo "$as_me:25041: checking for $ac_header" >&5
25042echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25043if eval "test \"\${$as_ac_Header+set}\" = set"; then
25044  echo $ECHO_N "(cached) $ECHO_C" >&6
25045else
25046  cat >"conftest.$ac_ext" <<_ACEOF
25047#line 25047 "configure"
25048#include "confdefs.h"
25049#include <$ac_header>
25050_ACEOF
25051if { (eval echo "$as_me:25051: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25052  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25053  ac_status=$?
25054  $EGREP -v '^ *\+' conftest.er1 >conftest.err
25055  rm -f conftest.er1
25056  cat conftest.err >&5
25057  echo "$as_me:25057: \$? = $ac_status" >&5
25058  (exit "$ac_status"); } >/dev/null; then
25059  if test -s conftest.err; then
25060    ac_cpp_err=$ac_c_preproc_warn_flag
25061  else
25062    ac_cpp_err=
25063  fi
25064else
25065  ac_cpp_err=yes
25066fi
25067if test -z "$ac_cpp_err"; then
25068  eval "$as_ac_Header=yes"
25069else
25070  echo "$as_me: failed program was:" >&5
25071  cat "conftest.$ac_ext" >&5
25072  eval "$as_ac_Header=no"
25073fi
25074rm -f conftest.err "conftest.$ac_ext"
25075fi
25076echo "$as_me:25076: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25077echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25078if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25079  cat >>confdefs.h <<EOF
25080#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25081EOF
25082
25083fi
25084done
25085
25086if test "$ac_cv_header_wait_h" = yes; then
25087cf_wait_headers="$cf_wait_headers
25088#include <wait.h>
25089"
25090fi
25091if test "$ac_cv_header_waitstatus_h" = yes; then
25092cf_wait_headers="$cf_wait_headers
25093#include <waitstatus.h>
25094"
25095fi
25096fi
25097
25098echo "$as_me:25098: checking for union wait" >&5
25099echo $ECHO_N "checking for union wait... $ECHO_C" >&6
25100if test "${cf_cv_type_unionwait+set}" = set; then
25101  echo $ECHO_N "(cached) $ECHO_C" >&6
25102else
25103
25104	cat >"conftest.$ac_ext" <<_ACEOF
25105#line 25105 "configure"
25106#include "confdefs.h"
25107$cf_wait_headers
25108int
25109main (void)
25110{
25111int x;
25112	 int y = WEXITSTATUS(x);
25113	 int z = WTERMSIG(x);
25114	 wait(&x);
25115	 (void)x;
25116	 (void)y;
25117	 (void)z;
25118
25119  ;
25120  return 0;
25121}
25122_ACEOF
25123rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25124if { (eval echo "$as_me:25124: \"$ac_link\"") >&5
25125  (eval $ac_link) 2>&5
25126  ac_status=$?
25127  echo "$as_me:25127: \$? = $ac_status" >&5
25128  (exit "$ac_status"); } &&
25129         { ac_try='test -s "conftest$ac_exeext"'
25130  { (eval echo "$as_me:25130: \"$ac_try\"") >&5
25131  (eval $ac_try) 2>&5
25132  ac_status=$?
25133  echo "$as_me:25133: \$? = $ac_status" >&5
25134  (exit "$ac_status"); }; }; then
25135  cf_cv_type_unionwait=no
25136	 echo compiles ok w/o union wait 1>&5
25137
25138else
25139  echo "$as_me: failed program was:" >&5
25140cat "conftest.$ac_ext" >&5
25141
25142	cat >"conftest.$ac_ext" <<_ACEOF
25143#line 25143 "configure"
25144#include "confdefs.h"
25145$cf_wait_headers
25146int
25147main (void)
25148{
25149union wait x;
25150#ifdef WEXITSTATUS
25151	 int y = WEXITSTATUS(x);
25152#endif
25153#ifdef WTERMSIG
25154	 int z = WTERMSIG(x);
25155#endif
25156	 wait(&x);
25157	 (void)x;
25158#ifdef WEXITSTATUS
25159	 (void)y;
25160#endif
25161#ifdef WTERMSIG
25162	 (void)z;
25163#endif
25164
25165  ;
25166  return 0;
25167}
25168_ACEOF
25169rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25170if { (eval echo "$as_me:25170: \"$ac_link\"") >&5
25171  (eval $ac_link) 2>&5
25172  ac_status=$?
25173  echo "$as_me:25173: \$? = $ac_status" >&5
25174  (exit "$ac_status"); } &&
25175         { ac_try='test -s "conftest$ac_exeext"'
25176  { (eval echo "$as_me:25176: \"$ac_try\"") >&5
25177  (eval $ac_try) 2>&5
25178  ac_status=$?
25179  echo "$as_me:25179: \$? = $ac_status" >&5
25180  (exit "$ac_status"); }; }; then
25181  cf_cv_type_unionwait=yes
25182	 echo compiles ok with union wait and possibly macros too 1>&5
25183
25184else
25185  echo "$as_me: failed program was:" >&5
25186cat "conftest.$ac_ext" >&5
25187cf_cv_type_unionwait=no
25188fi
25189rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25190fi
25191rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25192fi
25193
25194echo "$as_me:25194: result: $cf_cv_type_unionwait" >&5
25195echo "${ECHO_T}$cf_cv_type_unionwait" >&6
25196test "$cf_cv_type_unionwait" = yes &&
25197cat >>confdefs.h <<\EOF
25198#define HAVE_TYPE_UNIONWAIT 1
25199EOF
25200
25201if test "$cf_cv_type_unionwait" = yes; then
25202
25203	echo "$as_me:25203: checking if union wait can be used as wait-arg" >&5
25204echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
25205	if test "${cf_cv_arg_union_wait+set}" = set; then
25206  echo $ECHO_N "(cached) $ECHO_C" >&6
25207else
25208
25209		cat >"conftest.$ac_ext" <<_ACEOF
25210#line 25210 "configure"
25211#include "confdefs.h"
25212$cf_wait_headers
25213int
25214main (void)
25215{
25216union wait x; wait(&x)
25217  ;
25218  return 0;
25219}
25220_ACEOF
25221rm -f "conftest.$ac_objext"
25222if { (eval echo "$as_me:25222: \"$ac_compile\"") >&5
25223  (eval $ac_compile) 2>&5
25224  ac_status=$?
25225  echo "$as_me:25225: \$? = $ac_status" >&5
25226  (exit "$ac_status"); } &&
25227         { ac_try='test -s "conftest.$ac_objext"'
25228  { (eval echo "$as_me:25228: \"$ac_try\"") >&5
25229  (eval $ac_try) 2>&5
25230  ac_status=$?
25231  echo "$as_me:25231: \$? = $ac_status" >&5
25232  (exit "$ac_status"); }; }; then
25233  cf_cv_arg_union_wait=yes
25234else
25235  echo "$as_me: failed program was:" >&5
25236cat "conftest.$ac_ext" >&5
25237cf_cv_arg_union_wait=no
25238fi
25239rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25240
25241fi
25242
25243	echo "$as_me:25243: result: $cf_cv_arg_union_wait" >&5
25244echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
25245	test "$cf_cv_arg_union_wait" = yes &&
25246cat >>confdefs.h <<\EOF
25247#define WAIT_USES_UNION 1
25248EOF
25249
25250	echo "$as_me:25250: checking if union wait can be used as waitpid-arg" >&5
25251echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
25252	if test "${cf_cv_arg_union_waitpid+set}" = set; then
25253  echo $ECHO_N "(cached) $ECHO_C" >&6
25254else
25255
25256		cat >"conftest.$ac_ext" <<_ACEOF
25257#line 25257 "configure"
25258#include "confdefs.h"
25259$cf_wait_headers
25260int
25261main (void)
25262{
25263union wait x; waitpid(0, &x, 0)
25264  ;
25265  return 0;
25266}
25267_ACEOF
25268rm -f "conftest.$ac_objext"
25269if { (eval echo "$as_me:25269: \"$ac_compile\"") >&5
25270  (eval $ac_compile) 2>&5
25271  ac_status=$?
25272  echo "$as_me:25272: \$? = $ac_status" >&5
25273  (exit "$ac_status"); } &&
25274         { ac_try='test -s "conftest.$ac_objext"'
25275  { (eval echo "$as_me:25275: \"$ac_try\"") >&5
25276  (eval $ac_try) 2>&5
25277  ac_status=$?
25278  echo "$as_me:25278: \$? = $ac_status" >&5
25279  (exit "$ac_status"); }; }; then
25280  cf_cv_arg_union_waitpid=yes
25281else
25282  echo "$as_me: failed program was:" >&5
25283cat "conftest.$ac_ext" >&5
25284cf_cv_arg_union_waitpid=no
25285fi
25286rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25287
25288fi
25289
25290	echo "$as_me:25290: result: $cf_cv_arg_union_waitpid" >&5
25291echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
25292	test "$cf_cv_arg_union_waitpid" = yes &&
25293cat >>confdefs.h <<\EOF
25294#define WAITPID_USES_UNION 1
25295EOF
25296
25297fi
25298
25299echo "$as_me:25299: checking if we must include wchar.h to declare mbstate_t" >&5
25300echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
25301if test "${cf_cv_mbstate_t+set}" = set; then
25302  echo $ECHO_N "(cached) $ECHO_C" >&6
25303else
25304
25305cat >"conftest.$ac_ext" <<_ACEOF
25306#line 25306 "configure"
25307#include "confdefs.h"
25308
25309#include <stdlib.h>
25310#include <stdio.h>
25311#ifdef HAVE_LIBUTF8_H
25312#include <libutf8.h>
25313#endif
25314int
25315main (void)
25316{
25317mbstate_t state; (void)state
25318  ;
25319  return 0;
25320}
25321_ACEOF
25322rm -f "conftest.$ac_objext"
25323if { (eval echo "$as_me:25323: \"$ac_compile\"") >&5
25324  (eval $ac_compile) 2>&5
25325  ac_status=$?
25326  echo "$as_me:25326: \$? = $ac_status" >&5
25327  (exit "$ac_status"); } &&
25328         { ac_try='test -s "conftest.$ac_objext"'
25329  { (eval echo "$as_me:25329: \"$ac_try\"") >&5
25330  (eval $ac_try) 2>&5
25331  ac_status=$?
25332  echo "$as_me:25332: \$? = $ac_status" >&5
25333  (exit "$ac_status"); }; }; then
25334  cf_cv_mbstate_t=no
25335else
25336  echo "$as_me: failed program was:" >&5
25337cat "conftest.$ac_ext" >&5
25338cat >"conftest.$ac_ext" <<_ACEOF
25339#line 25339 "configure"
25340#include "confdefs.h"
25341
25342#include <stdlib.h>
25343#include <stdio.h>
25344#include <wchar.h>
25345#ifdef HAVE_LIBUTF8_H
25346#include <libutf8.h>
25347#endif
25348int
25349main (void)
25350{
25351mbstate_t value; (void)value
25352  ;
25353  return 0;
25354}
25355_ACEOF
25356rm -f "conftest.$ac_objext"
25357if { (eval echo "$as_me:25357: \"$ac_compile\"") >&5
25358  (eval $ac_compile) 2>&5
25359  ac_status=$?
25360  echo "$as_me:25360: \$? = $ac_status" >&5
25361  (exit "$ac_status"); } &&
25362         { ac_try='test -s "conftest.$ac_objext"'
25363  { (eval echo "$as_me:25363: \"$ac_try\"") >&5
25364  (eval $ac_try) 2>&5
25365  ac_status=$?
25366  echo "$as_me:25366: \$? = $ac_status" >&5
25367  (exit "$ac_status"); }; }; then
25368  cf_cv_mbstate_t=yes
25369else
25370  echo "$as_me: failed program was:" >&5
25371cat "conftest.$ac_ext" >&5
25372cf_cv_mbstate_t=unknown
25373fi
25374rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25375fi
25376rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25377fi
25378echo "$as_me:25378: result: $cf_cv_mbstate_t" >&5
25379echo "${ECHO_T}$cf_cv_mbstate_t" >&6
25380
25381if test "$cf_cv_mbstate_t" = yes ; then
25382
25383cat >>confdefs.h <<\EOF
25384#define NEED_WCHAR_H 1
25385EOF
25386
25387fi
25388
25389if test "$cf_cv_mbstate_t" != unknown ; then
25390
25391cat >>confdefs.h <<\EOF
25392#define HAVE_MBSTATE_T 1
25393EOF
25394
25395fi
25396
25397for ac_header in \
25398termio.h \
25399termios.h \
25400unistd.h \
25401sys/ioctl.h \
25402sys/termio.h \
25403
25404do
25405as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25406echo "$as_me:25406: checking for $ac_header" >&5
25407echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25408if eval "test \"\${$as_ac_Header+set}\" = set"; then
25409  echo $ECHO_N "(cached) $ECHO_C" >&6
25410else
25411  cat >"conftest.$ac_ext" <<_ACEOF
25412#line 25412 "configure"
25413#include "confdefs.h"
25414#include <$ac_header>
25415_ACEOF
25416if { (eval echo "$as_me:25416: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25417  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25418  ac_status=$?
25419  $EGREP -v '^ *\+' conftest.er1 >conftest.err
25420  rm -f conftest.er1
25421  cat conftest.err >&5
25422  echo "$as_me:25422: \$? = $ac_status" >&5
25423  (exit "$ac_status"); } >/dev/null; then
25424  if test -s conftest.err; then
25425    ac_cpp_err=$ac_c_preproc_warn_flag
25426  else
25427    ac_cpp_err=
25428  fi
25429else
25430  ac_cpp_err=yes
25431fi
25432if test -z "$ac_cpp_err"; then
25433  eval "$as_ac_Header=yes"
25434else
25435  echo "$as_me: failed program was:" >&5
25436  cat "conftest.$ac_ext" >&5
25437  eval "$as_ac_Header=no"
25438fi
25439rm -f conftest.err "conftest.$ac_ext"
25440fi
25441echo "$as_me:25441: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25442echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25443if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25444  cat >>confdefs.h <<EOF
25445#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25446EOF
25447
25448fi
25449done
25450
25451if test "$ac_cv_header_termios_h" = yes ; then
25452	case "$CFLAGS $CPPFLAGS" in
25453	(*-D_POSIX_SOURCE*)
25454		termios_bad=dunno ;;
25455	(*)	termios_bad=maybe ;;
25456	esac
25457	if test "$termios_bad" = maybe ; then
25458	echo "$as_me:25458: checking whether termios.h needs _POSIX_SOURCE" >&5
25459echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
25460	cat >"conftest.$ac_ext" <<_ACEOF
25461#line 25461 "configure"
25462#include "confdefs.h"
25463#include <termios.h>
25464int
25465main (void)
25466{
25467struct termios foo; int x = foo.c_iflag = 1; (void)x
25468  ;
25469  return 0;
25470}
25471_ACEOF
25472rm -f "conftest.$ac_objext"
25473if { (eval echo "$as_me:25473: \"$ac_compile\"") >&5
25474  (eval $ac_compile) 2>&5
25475  ac_status=$?
25476  echo "$as_me:25476: \$? = $ac_status" >&5
25477  (exit "$ac_status"); } &&
25478         { ac_try='test -s "conftest.$ac_objext"'
25479  { (eval echo "$as_me:25479: \"$ac_try\"") >&5
25480  (eval $ac_try) 2>&5
25481  ac_status=$?
25482  echo "$as_me:25482: \$? = $ac_status" >&5
25483  (exit "$ac_status"); }; }; then
25484  termios_bad=no
25485else
25486  echo "$as_me: failed program was:" >&5
25487cat "conftest.$ac_ext" >&5
25488
25489		cat >"conftest.$ac_ext" <<_ACEOF
25490#line 25490 "configure"
25491#include "confdefs.h"
25492
25493#define _POSIX_SOURCE
25494#include <termios.h>
25495int
25496main (void)
25497{
25498struct termios foo; int x = foo.c_iflag = 2; (void)x
25499  ;
25500  return 0;
25501}
25502_ACEOF
25503rm -f "conftest.$ac_objext"
25504if { (eval echo "$as_me:25504: \"$ac_compile\"") >&5
25505  (eval $ac_compile) 2>&5
25506  ac_status=$?
25507  echo "$as_me:25507: \$? = $ac_status" >&5
25508  (exit "$ac_status"); } &&
25509         { ac_try='test -s "conftest.$ac_objext"'
25510  { (eval echo "$as_me:25510: \"$ac_try\"") >&5
25511  (eval $ac_try) 2>&5
25512  ac_status=$?
25513  echo "$as_me:25513: \$? = $ac_status" >&5
25514  (exit "$ac_status"); }; }; then
25515  termios_bad=unknown
25516else
25517  echo "$as_me: failed program was:" >&5
25518cat "conftest.$ac_ext" >&5
25519termios_bad=yes
25520cat >>confdefs.h <<\EOF
25521#define _POSIX_SOURCE 1
25522EOF
25523
25524fi
25525rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25526
25527fi
25528rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25529	echo "$as_me:25529: result: $termios_bad" >&5
25530echo "${ECHO_T}$termios_bad" >&6
25531	fi
25532fi
25533
25534echo "$as_me:25534: checking declaration of size-change" >&5
25535echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
25536if test "${cf_cv_sizechange+set}" = set; then
25537  echo $ECHO_N "(cached) $ECHO_C" >&6
25538else
25539
25540	cf_cv_sizechange=unknown
25541	cf_save_CPPFLAGS="$CPPFLAGS"
25542
25543for cf_opts in "" "NEED_PTEM_H"
25544do
25545
25546	CPPFLAGS="$cf_save_CPPFLAGS"
25547	if test -n "$cf_opts"
25548	then
25549
25550	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25551	CPPFLAGS="${CPPFLAGS}-D$cf_opts"
25552
25553	fi
25554	cat >"conftest.$ac_ext" <<_ACEOF
25555#line 25555 "configure"
25556#include "confdefs.h"
25557#include <sys/types.h>
25558#ifdef HAVE_TERMIOS_H
25559#include <termios.h>
25560#else
25561#ifdef HAVE_TERMIO_H
25562#include <termio.h>
25563#endif
25564#endif
25565
25566#ifdef NEED_PTEM_H
25567/* This is a workaround for SCO:  they neglected to define struct winsize in
25568 * termios.h -- it's only in termio.h and ptem.h
25569 */
25570#include <sys/stream.h>
25571#include <sys/ptem.h>
25572#endif
25573
25574#ifdef HAVE_SYS_IOCTL_H
25575#include <sys/ioctl.h>
25576#endif
25577
25578int
25579main (void)
25580{
25581
25582#ifdef TIOCGSIZE
25583	struct ttysize win;	/* SunOS 3.0... */
25584	int y = win.ts_lines = 2;
25585	int x = win.ts_cols = 1;
25586	(void)y;
25587	(void)x;
25588#else
25589#ifdef TIOCGWINSZ
25590	struct winsize win;	/* everything else */
25591	int y = win.ws_row = 2;
25592	int x = win.ws_col = 1;
25593	(void)y;
25594	(void)x;
25595#else
25596	no TIOCGSIZE or TIOCGWINSZ
25597#endif /* TIOCGWINSZ */
25598#endif /* TIOCGSIZE */
25599
25600  ;
25601  return 0;
25602}
25603_ACEOF
25604rm -f "conftest.$ac_objext"
25605if { (eval echo "$as_me:25605: \"$ac_compile\"") >&5
25606  (eval $ac_compile) 2>&5
25607  ac_status=$?
25608  echo "$as_me:25608: \$? = $ac_status" >&5
25609  (exit "$ac_status"); } &&
25610         { ac_try='test -s "conftest.$ac_objext"'
25611  { (eval echo "$as_me:25611: \"$ac_try\"") >&5
25612  (eval $ac_try) 2>&5
25613  ac_status=$?
25614  echo "$as_me:25614: \$? = $ac_status" >&5
25615  (exit "$ac_status"); }; }; then
25616  cf_cv_sizechange=yes
25617else
25618  echo "$as_me: failed program was:" >&5
25619cat "conftest.$ac_ext" >&5
25620cf_cv_sizechange=no
25621fi
25622rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25623
25624	CPPFLAGS="$cf_save_CPPFLAGS"
25625	if test "$cf_cv_sizechange" = yes ; then
25626		echo "size-change succeeded ($cf_opts)" >&5
25627		test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
25628		break
25629	fi
25630done
25631
25632fi
25633echo "$as_me:25633: result: $cf_cv_sizechange" >&5
25634echo "${ECHO_T}$cf_cv_sizechange" >&6
25635if test "$cf_cv_sizechange" != no ; then
25636
25637cat >>confdefs.h <<\EOF
25638#define HAVE_SIZECHANGE 1
25639EOF
25640
25641	case "$cf_cv_sizechange" in
25642	(NEED*)
25643		cat >>confdefs.h <<EOF
25644#define $cf_cv_sizechange  1
25645EOF
25646
25647		;;
25648	esac
25649fi
25650
25651PACKAGE_PREFIX=DLG
25652PACKAGE_CONFIG=dlg_config.h
25653
25654EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
25655
25656cat >"conftest.$ac_ext" <<_ACEOF
25657#line 25657 "configure"
25658#include "confdefs.h"
25659#include <locale.h>
25660int
25661main (void)
25662{
25663setlocale(LC_ALL, "")
25664  ;
25665  return 0;
25666}
25667_ACEOF
25668rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25669if { (eval echo "$as_me:25669: \"$ac_link\"") >&5
25670  (eval $ac_link) 2>&5
25671  ac_status=$?
25672  echo "$as_me:25672: \$? = $ac_status" >&5
25673  (exit "$ac_status"); } &&
25674         { ac_try='test -s "conftest$ac_exeext"'
25675  { (eval echo "$as_me:25675: \"$ac_try\"") >&5
25676  (eval $ac_try) 2>&5
25677  ac_status=$?
25678  echo "$as_me:25678: \$? = $ac_status" >&5
25679  (exit "$ac_status"); }; }; then
25680
25681cat >>confdefs.h <<\EOF
25682#define HAVE_SETLOCALE 1
25683EOF
25684
25685else
25686  echo "$as_me: failed program was:" >&5
25687cat "conftest.$ac_ext" >&5
25688fi
25689rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25690
25691echo "$as_me:25691: checking if runtime has nl_langinfo support for first weekday" >&5
25692echo $ECHO_N "checking if runtime has nl_langinfo support for first weekday... $ECHO_C" >&6
25693if test "${cf_nl_langinfo_1stday+set}" = set; then
25694  echo $ECHO_N "(cached) $ECHO_C" >&6
25695else
25696
25697	cat >"conftest.$ac_ext" <<_ACEOF
25698#line 25698 "configure"
25699#include "confdefs.h"
25700
25701#include <langinfo.h>
25702#include <locale.h>
25703
25704int
25705main (void)
25706{
25707
25708	int first_weekday = nl_langinfo (_NL_TIME_FIRST_WEEKDAY)[0];
25709	long week_1stday_l = (long) nl_langinfo (_NL_TIME_WEEK_1STDAY);
25710	(void) first_weekday;
25711	(void) week_1stday_l;
25712
25713  ;
25714  return 0;
25715}
25716_ACEOF
25717rm -f "conftest.$ac_objext"
25718if { (eval echo "$as_me:25718: \"$ac_compile\"") >&5
25719  (eval $ac_compile) 2>&5
25720  ac_status=$?
25721  echo "$as_me:25721: \$? = $ac_status" >&5
25722  (exit "$ac_status"); } &&
25723         { ac_try='test -s "conftest.$ac_objext"'
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_nl_langinfo_1stday=yes
25730
25731else
25732  echo "$as_me: failed program was:" >&5
25733cat "conftest.$ac_ext" >&5
25734cf_nl_langinfo_1stday=no
25735
25736fi
25737rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25738
25739fi
25740echo "$as_me:25740: result: $cf_nl_langinfo_1stday" >&5
25741echo "${ECHO_T}$cf_nl_langinfo_1stday" >&6
25742test "x$cf_nl_langinfo_1stday" = xyes &&
25743cat >>confdefs.h <<\EOF
25744#define HAVE_NL_LANGINFO_1STDAY 1
25745EOF
25746
25747if test "$GCC" = yes || test "$GXX" = yes
25748then
25749
25750	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25751	CFLAGS="${CFLAGS}$EXTRA_CFLAGS"
25752
25753	EXTRA_CFLAGS=
25754fi
25755
25756echo "$as_me:25756: checking if rpath-hack should be disabled" >&5
25757echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
25758
25759# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
25760if test "${enable_rpath_hack+set}" = set; then
25761  enableval="$enable_rpath_hack"
25762  test "$enableval" != no && enableval=yes
25763	if test "$enableval" != "yes" ; then
25764    enable_rpath_hack=no
25765	else
25766		enable_rpath_hack=yes
25767	fi
25768else
25769  enableval=yes
25770	enable_rpath_hack=yes
25771
25772fi;
25773if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
25774echo "$as_me:25774: result: $cf_disable_rpath_hack" >&5
25775echo "${ECHO_T}$cf_disable_rpath_hack" >&6
25776
25777if test "$enable_rpath_hack" = yes ; then
25778
25779echo "$as_me:25779: checking for updated LDFLAGS" >&5
25780echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
25781if test -n "$LD_RPATH_OPT" ; then
25782	echo "$as_me:25782: result: maybe" >&5
25783echo "${ECHO_T}maybe" >&6
25784
25785	for ac_prog in ldd
25786do
25787  # Extract the first word of "$ac_prog", so it can be a program name with args.
25788set dummy $ac_prog; ac_word=$2
25789echo "$as_me:25789: checking for $ac_word" >&5
25790echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
25791if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
25792  echo $ECHO_N "(cached) $ECHO_C" >&6
25793else
25794  if test -n "$cf_ldd_prog"; then
25795  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
25796else
25797  ac_save_IFS=$IFS; IFS=$ac_path_separator
25798ac_dummy="$PATH"
25799for ac_dir in $ac_dummy; do
25800  IFS=$ac_save_IFS
25801  test -z "$ac_dir" && ac_dir=.
25802  $as_executable_p "$ac_dir/$ac_word" || continue
25803ac_cv_prog_cf_ldd_prog="$ac_prog"
25804echo "$as_me:25804: found $ac_dir/$ac_word" >&5
25805break
25806done
25807
25808fi
25809fi
25810cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
25811if test -n "$cf_ldd_prog"; then
25812  echo "$as_me:25812: result: $cf_ldd_prog" >&5
25813echo "${ECHO_T}$cf_ldd_prog" >&6
25814else
25815  echo "$as_me:25815: result: no" >&5
25816echo "${ECHO_T}no" >&6
25817fi
25818
25819  test -n "$cf_ldd_prog" && break
25820done
25821test -n "$cf_ldd_prog" || cf_ldd_prog="no"
25822
25823	cf_rpath_list="/usr/lib /lib"
25824	if test "$cf_ldd_prog" != no
25825	then
25826		cf_rpath_oops=
25827
25828cat >"conftest.$ac_ext" <<_ACEOF
25829#line 25829 "configure"
25830#include "confdefs.h"
25831#include <stdio.h>
25832int
25833main (void)
25834{
25835printf("Hello");
25836  ;
25837  return 0;
25838}
25839_ACEOF
25840rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25841if { (eval echo "$as_me:25841: \"$ac_link\"") >&5
25842  (eval $ac_link) 2>&5
25843  ac_status=$?
25844  echo "$as_me:25844: \$? = $ac_status" >&5
25845  (exit "$ac_status"); } &&
25846         { ac_try='test -s "conftest$ac_exeext"'
25847  { (eval echo "$as_me:25847: \"$ac_try\"") >&5
25848  (eval $ac_try) 2>&5
25849  ac_status=$?
25850  echo "$as_me:25850: \$? = $ac_status" >&5
25851  (exit "$ac_status"); }; }; then
25852  cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
25853		 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
25854else
25855  echo "$as_me: failed program was:" >&5
25856cat "conftest.$ac_ext" >&5
25857fi
25858rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25859
25860		# If we passed the link-test, but get a "not found" on a given library,
25861		# this could be due to inept reconfiguration of gcc to make it only
25862		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
25863		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
25864		# /usr/local libraries.
25865		if test -n "$cf_rpath_oops"
25866		then
25867			for cf_rpath_src in $cf_rpath_oops
25868			do
25869				for cf_rpath_dir in \
25870					/usr/local \
25871					/usr/pkg \
25872					/opt/sfw
25873				do
25874					if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
25875					then
25876						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
25877
25878echo "${as_me:-configure}:25878: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
25879
25880						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
25881						break
25882					fi
25883				done
25884			done
25885		fi
25886	fi
25887
25888	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
25889
25890echo "${as_me:-configure}:25890: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
25891
25892test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
25893
25894echo "${as_me:-configure}:25894: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
25895
25896cf_rpath_dst=
25897for cf_rpath_src in $LDFLAGS
25898do
25899	case "$cf_rpath_src" in
25900	(-L*)
25901
25902		# check if this refers to a directory which we will ignore
25903		cf_rpath_skip=no
25904		if test -n "$cf_rpath_list"
25905		then
25906			for cf_rpath_item in $cf_rpath_list
25907			do
25908				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
25909				then
25910					cf_rpath_skip=yes
25911					break
25912				fi
25913			done
25914		fi
25915
25916		if test "$cf_rpath_skip" = no
25917		then
25918			# transform the option
25919			if test "$LD_RPATH_OPT" = "-R " ; then
25920				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
25921			else
25922				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
25923			fi
25924
25925			# if we have not already added this, add it now
25926			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
25927			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
25928			then
25929				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
25930
25931echo "${as_me:-configure}:25931: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
25932
25933				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
25934			fi
25935		fi
25936		;;
25937	esac
25938	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
25939done
25940LDFLAGS=$cf_rpath_dst
25941
25942test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
25943
25944echo "${as_me:-configure}:25944: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
25945
25946test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
25947
25948echo "${as_me:-configure}:25948: testing ...checking LIBS $LIBS ..." 1>&5
25949
25950cf_rpath_dst=
25951for cf_rpath_src in $LIBS
25952do
25953	case "$cf_rpath_src" in
25954	(-L*)
25955
25956		# check if this refers to a directory which we will ignore
25957		cf_rpath_skip=no
25958		if test -n "$cf_rpath_list"
25959		then
25960			for cf_rpath_item in $cf_rpath_list
25961			do
25962				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
25963				then
25964					cf_rpath_skip=yes
25965					break
25966				fi
25967			done
25968		fi
25969
25970		if test "$cf_rpath_skip" = no
25971		then
25972			# transform the option
25973			if test "$LD_RPATH_OPT" = "-R " ; then
25974				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
25975			else
25976				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
25977			fi
25978
25979			# if we have not already added this, add it now
25980			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
25981			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
25982			then
25983				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
25984
25985echo "${as_me:-configure}:25985: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
25986
25987				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
25988			fi
25989		fi
25990		;;
25991	esac
25992	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
25993done
25994LIBS=$cf_rpath_dst
25995
25996test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
25997
25998echo "${as_me:-configure}:25998: testing ...checked LIBS $LIBS ..." 1>&5
25999
26000	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
26001
26002echo "${as_me:-configure}:26002: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
26003
26004else
26005	echo "$as_me:26005: result: no" >&5
26006echo "${ECHO_T}no" >&6
26007fi
26008
26009fi
26010
26011cf_libname=\${LIB_BASENAME}
26012cf_liblink=$cf_libname
26013cf_libroot=$cf_libname
26014
26015if test "x$cf_cv_do_symlinks" = xyes
26016then
26017	case "x$cf_cv_shlib_version" in
26018	(xrel)
26019		cf_liblink="\${LIB_ABI_NAME}"
26020		cf_libname="\${LIB_REL_NAME}"
26021		;;
26022	(xabi)
26023		cf_liblink="\${LIB_REL_NAME}"
26024		cf_libname="\${LIB_ABI_NAME}"
26025		;;
26026	esac
26027fi
26028LIB_TARGET=$cf_libname
26029
26030SET_SHLIB_VARS="# begin CF__DEFINE_SHLIB_VARS\\
26031LIB_BASENAME	= \${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\
26032LIB_REL_NAME	= \${LIB_BASENAME}.\${REL_VERSION}\\
26033LIB_ABI_NAME	= \${LIB_BASENAME}.\${ABI_VERSION}\\
26034LIB_TARGET	= $LIB_TARGET\\
26035RM_SHARED_OPTS	= $RM_SHARED_OPTS\\
26036# end CF__DEFINE_SHLIB_VARS"
26037
26038echo "$as_me:26038: checking for linker search path" >&5
26039echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26040if test "${cf_cv_ld_searchpath+set}" = set; then
26041  echo $ECHO_N "(cached) $ECHO_C" >&6
26042else
26043
26044if test "$cross_compiling" != yes ; then
26045
26046# GNU binutils' ld does not involve permissions which may stop ldconfig.
26047cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26048
26049# The -NX options tell newer versions of Linux ldconfig to not attempt to
26050# update the cache, which makes it run faster.
26051test -z "$cf_pathlist" && \
26052	cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[ 	]/d' -e 's/:$//' | sort -u`
26053
26054test -z "$cf_pathlist" &&
26055	cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[ 	]/d' -e 's/:$//p' | sort -u`
26056
26057# This works with OpenBSD 6.5, which lists only filenames
26058test -z "$cf_pathlist" &&
26059	cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26060
26061if test -z "$cf_pathlist"
26062then
26063	# dyld default path with MacOS
26064	if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26065	then
26066		# do this to bypass check
26067		cf_cv_ld_searchpath='$HOME/lib'
26068		cf_pathlist="/usr/local/lib /lib /usr/lib"
26069	fi
26070fi
26071
26072if test -z "$cf_pathlist"
26073then
26074	# Solaris is hardcoded
26075	if test -d /opt/SUNWspro/lib
26076	then
26077		cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26078	elif test -d /usr/ccs/lib
26079	then
26080		cf_pathlist="/usr/ccs/lib /usr/lib"
26081	fi
26082fi
26083
26084fi
26085
26086# If nothing else, assume it is conventional
26087test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26088
26089# Finally, check that this is only directories
26090for cf_path in $0 $cf_pathlist
26091do
26092	if test -d "$cf_path"; then
26093		test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26094		cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26095	fi
26096done
26097
26098# Ensure that it is nonempty
26099test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26100
26101fi
26102echo "$as_me:26102: result: $cf_cv_ld_searchpath" >&5
26103echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26104
26105LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26106
26107ac_config_files="$ac_config_files dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE"
26108ac_config_commands="$ac_config_commands default"
26109cat >confcache <<\_ACEOF
26110# This file is a shell script that caches the results of configure
26111# tests run on this system so they can be shared between configure
26112# scripts and configure runs, see configure's option --config-cache.
26113# It is not useful on other systems.  If it contains results you don't
26114# want to keep, you may remove or edit it.
26115#
26116# config.status only pays attention to the cache file if you give it
26117# the --recheck option to rerun configure.
26118#
26119# `ac_cv_env_foo' variables (set or unset) will be overriden when
26120# loading this file, other *unset* `ac_cv_foo' will be assigned the
26121# following values.
26122
26123_ACEOF
26124
26125# The following way of writing the cache mishandles newlines in values,
26126# but we know of no workaround that is simple, portable, and efficient.
26127# So, don't put newlines in cache variables' values.
26128# Ultrix sh set writes to stderr and can't be redirected directly,
26129# and sets the high bit in the cache file unless we assign to the vars.
26130{
26131  (set) 2>&1 |
26132    case `(ac_space=' '; set | grep ac_space) 2>&1` in
26133    *ac_space=\ *)
26134      # `set' does not quote correctly, so add quotes (double-quote
26135      # substitution turns \\\\ into \\, and sed turns \\ into \).
26136      sed -n \
26137        "s/'/'\\\\''/g;
26138    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26139      ;;
26140    *)
26141      # `set' quotes correctly as required by POSIX, so do not add quotes.
26142      sed -n \
26143        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26144      ;;
26145    esac;
26146} |
26147  sed '
26148     t clear
26149     : clear
26150     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26151     t end
26152     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26153     : end' >>confcache
26154if cmp -s $cache_file confcache; then :; else
26155  if test -w $cache_file; then
26156    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26157    cat confcache >$cache_file
26158  else
26159    echo "not updating unwritable cache $cache_file"
26160  fi
26161fi
26162rm -f confcache
26163
26164test "x$prefix" = xNONE && prefix=$ac_default_prefix
26165# Let make expand exec_prefix.
26166test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26167
26168# VPATH may cause trouble with some makes, so we remove $(srcdir),
26169# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26170# trailing colons and then remove the whole line if VPATH becomes empty
26171# (actually we leave an empty line to preserve line numbers).
26172if test "x$srcdir" = x.; then
26173  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
26174s/:*\$(srcdir):*/:/;
26175s/:*\${srcdir}:*/:/;
26176s/:*@srcdir@:*/:/;
26177s/^\([^=]*=[ 	]*\):*/\1/;
26178s/:*$//;
26179s/^[^=]*=[ 	]*$//;
26180}'
26181fi
26182
26183DEFS=-DHAVE_CONFIG_H
26184
26185: "${CONFIG_STATUS=./config.status}"
26186ac_clean_files_save=$ac_clean_files
26187ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26188{ echo "$as_me:26188: creating $CONFIG_STATUS" >&5
26189echo "$as_me: creating $CONFIG_STATUS" >&6;}
26190cat >"$CONFIG_STATUS" <<_ACEOF
26191#! $SHELL
26192# Generated automatically by configure.
26193# Run this file to recreate the current configuration.
26194# Compiler output produced by configure, useful for debugging
26195# configure, is in config.log if it exists.
26196
26197debug=false
26198SHELL=\${CONFIG_SHELL-$SHELL}
26199ac_cs_invocation="\$0 \$@"
26200
26201CLICOLOR_FORCE= GREP_OPTIONS=
26202unset CLICOLOR_FORCE GREP_OPTIONS
26203_ACEOF
26204
26205cat >>"$CONFIG_STATUS" <<\_ACEOF
26206# Be Bourne compatible
26207if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26208  emulate sh
26209  NULLCMD=:
26210elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26211  set -o posix
26212fi
26213
26214# Name of the executable.
26215as_me=`echo "$0" |sed 's,.*[\\/],,'`
26216
26217if expr a : '\(a\)' >/dev/null 2>&1; then
26218  as_expr=expr
26219else
26220  as_expr=false
26221fi
26222
26223rm -f conf$$ conf$$.exe conf$$.file
26224echo >conf$$.file
26225if ln -s conf$$.file conf$$ 2>/dev/null; then
26226  # We could just check for DJGPP; but this test a) works b) is more generic
26227  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26228  if test -f conf$$.exe; then
26229    # Don't use ln at all; we don't have any links
26230    as_ln_s='cp -p'
26231  else
26232    as_ln_s='ln -s'
26233  fi
26234elif ln conf$$.file conf$$ 2>/dev/null; then
26235  as_ln_s=ln
26236else
26237  as_ln_s='cp -p'
26238fi
26239rm -f conf$$ conf$$.exe conf$$.file
26240
26241as_executable_p="test -f"
26242
26243# Support unset when possible.
26244if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26245  as_unset="unset"
26246else
26247  as_unset="false"
26248fi
26249
26250# NLS nuisances.
26251$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26252$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26253$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26254$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26255$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26256$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26257$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26258$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26259
26260# IFS
26261# We need space, tab and new line, in precisely that order.
26262as_nl='
26263'
26264IFS=" 	$as_nl"
26265
26266# CDPATH.
26267$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26268
26269exec 6>&1
26270
26271_ACEOF
26272
26273# Files that config.status was made for.
26274if test -n "$ac_config_files"; then
26275  echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
26276fi
26277
26278if test -n "$ac_config_headers"; then
26279  echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
26280fi
26281
26282if test -n "$ac_config_links"; then
26283  echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
26284fi
26285
26286if test -n "$ac_config_commands"; then
26287  echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
26288fi
26289
26290cat >>"$CONFIG_STATUS" <<\EOF
26291
26292ac_cs_usage="\
26293\`$as_me' instantiates files from templates according to the
26294current configuration.
26295
26296Usage: $0 [OPTIONS] [FILE]...
26297
26298  -h, --help       print this help, then exit
26299  -V, --version    print version number, then exit
26300  -d, --debug      don't remove temporary files
26301      --recheck    update $as_me by reconfiguring in the same conditions
26302  --file=FILE[:TEMPLATE]
26303                   instantiate the configuration file FILE
26304  --header=FILE[:TEMPLATE]
26305                   instantiate the configuration header FILE
26306
26307Configuration files:
26308$config_files
26309
26310Configuration headers:
26311$config_headers
26312
26313Configuration commands:
26314$config_commands
26315
26316Report bugs to <dickey@invisible-island.net>."
26317EOF
26318
26319cat >>"$CONFIG_STATUS" <<EOF
26320ac_cs_version="\\
26321config.status
26322configured by $0, generated by GNU Autoconf 2.52.20210105,
26323  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26324
26325Copyright 2003-2020,2021	Thomas E. Dickey
26326Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26327Free Software Foundation, Inc.
26328This config.status script is free software; the Free Software Foundation
26329gives unlimited permission to copy, distribute and modify it."
26330srcdir="$srcdir"
26331INSTALL="$INSTALL"
26332EOF
26333
26334cat >>"$CONFIG_STATUS" <<\EOF
26335# If no file are specified by the user, then we need to provide default
26336# value.  By we need to know if files were specified by the user.
26337ac_need_defaults=:
26338while test $# != 0
26339do
26340  case $1 in
26341  --*=*)
26342    ac_option=`expr "x$1" : 'x\([^=]*\)='`
26343    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26344    shift
26345    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26346    shift
26347    ;;
26348  -*);;
26349  *) # This is not an option, so the user has probably given explicit
26350     # arguments.
26351     ac_need_defaults=false;;
26352  esac
26353
26354  case $1 in
26355  # Handling of the options.
26356EOF
26357cat >>"$CONFIG_STATUS" <<EOF
26358  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26359    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26360    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26361EOF
26362cat >>"$CONFIG_STATUS" <<\EOF
26363  --version | --vers* | -V )
26364    echo "$ac_cs_version"; exit 0 ;;
26365  --he | --h)
26366    # Conflict between --help and --header
26367    { { echo "$as_me:26367: error: ambiguous option: $1
26368Try \`$0 --help' for more information." >&5
26369echo "$as_me: error: ambiguous option: $1
26370Try \`$0 --help' for more information." >&2;}
26371   { (exit 1); exit 1; }; };;
26372  --help | --hel | -h )
26373    echo "$ac_cs_usage"; exit 0 ;;
26374  --debug | --d* | -d )
26375    debug=: ;;
26376  --file | --fil | --fi | --f )
26377    shift
26378    CONFIG_FILES="$CONFIG_FILES $1"
26379    ac_need_defaults=false;;
26380  --header | --heade | --head | --hea )
26381    shift
26382    CONFIG_HEADERS="$CONFIG_HEADERS $1"
26383    ac_need_defaults=false;;
26384
26385  # This is an error.
26386  -*) { { echo "$as_me:26386: error: unrecognized option: $1
26387Try \`$0 --help' for more information." >&5
26388echo "$as_me: error: unrecognized option: $1
26389Try \`$0 --help' for more information." >&2;}
26390   { (exit 1); exit 1; }; } ;;
26391
26392  *) ac_config_targets="$ac_config_targets $1" ;;
26393
26394  esac
26395  shift
26396done
26397
26398exec 5>>config.log
26399cat >&5 << _ACEOF
26400
26401## ----------------------- ##
26402## Running config.status.  ##
26403## ----------------------- ##
26404
26405This file was extended by $as_me 2.52.20210105, executed with
26406  CONFIG_FILES    = $CONFIG_FILES
26407  CONFIG_HEADERS  = $CONFIG_HEADERS
26408  CONFIG_LINKS    = $CONFIG_LINKS
26409  CONFIG_COMMANDS = $CONFIG_COMMANDS
26410  > "$ac_cs_invocation"
26411on `(hostname || uname -n) 2>/dev/null | sed 1q`
26412
26413_ACEOF
26414EOF
26415
26416cat >>"$CONFIG_STATUS" <<EOF
26417#
26418# INIT-COMMANDS section.
26419#
26420
26421ABI_VERSION="$ABI_VERSION"
26422REL_VERSION="$REL_VERSION"
26423LIB_MODEL="$LIB_MODEL"
26424LIB_PREFIX="$LIB_PREFIX"
26425LIB_ROOTNAME="$LIB_ROOTNAME"
26426DFT_DEP_SUFFIX="$DFT_DEP_SUFFIX"
26427RM_SHARED_OPTS="$RM_SHARED_OPTS"
26428cf_cv_do_symlinks="$cf_cv_do_symlinks"
26429cf_cv_shlib_version="$cf_cv_shlib_version"
26430
26431EOF
26432
26433cat >>"$CONFIG_STATUS" <<\EOF
26434for ac_config_target in $ac_config_targets
26435do
26436  case "$ac_config_target" in
26437  # Handling of arguments.
26438  "dialog-config" ) CONFIG_FILES="$CONFIG_FILES dialog-config" ;;
26439  "makefile" ) CONFIG_FILES="$CONFIG_FILES makefile" ;;
26440  "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
26441  "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
26442  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
26443  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26444  "dlg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS dlg_config.h:config.hin" ;;
26445  *) { { echo "$as_me:26445: error: invalid argument: $ac_config_target" >&5
26446echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26447   { (exit 1); exit 1; }; };;
26448  esac
26449done
26450
26451# If the user did not use the arguments to specify the items to instantiate,
26452# then the envvar interface is used.  Set only those that are not.
26453# We use the long form for the default assignment because of an extremely
26454# bizarre bug on SunOS 4.1.3.
26455if "$ac_need_defaults"; then
26456  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26457  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26458  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26459fi
26460
26461# Create a temporary directory, and hook for its removal unless debugging.
26462$debug ||
26463{
26464  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26465  trap '{ (exit 1); exit 1; }' 1 2 13 15
26466}
26467
26468# Create a (secure) tmp directory for tmp files.
26469: ${TMPDIR=/tmp}
26470{
26471  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26472  test -n "$tmp" && test -d "$tmp"
26473}  ||
26474{
26475  tmp=$TMPDIR/cs$$-$RANDOM
26476  (umask 077 && mkdir $tmp)
26477} ||
26478{
26479   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26480   { (exit 1); exit 1; }
26481}
26482
26483EOF
26484
26485cat >>"$CONFIG_STATUS" <<EOF
26486
26487#
26488# CONFIG_FILES section.
26489#
26490
26491# No need to generate the scripts if there are no CONFIG_FILES.
26492# This happens for instance when ./config.status config.h
26493if test -n "\$CONFIG_FILES"; then
26494  # Protect against being on the right side of a sed subst in config.status.
26495  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26496   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
26497s,@SHELL@,$SHELL,;t t
26498s,@exec_prefix@,$exec_prefix,;t t
26499s,@prefix@,$prefix,;t t
26500s,@program_transform_name@,$program_transform_name,;t t
26501s,@bindir@,$bindir,;t t
26502s,@sbindir@,$sbindir,;t t
26503s,@libexecdir@,$libexecdir,;t t
26504s,@datarootdir@,$datarootdir,;t t
26505s,@datadir@,$datadir,;t t
26506s,@sysconfdir@,$sysconfdir,;t t
26507s,@sharedstatedir@,$sharedstatedir,;t t
26508s,@localstatedir@,$localstatedir,;t t
26509s,@runstatedir@,$runstatedir,;t t
26510s,@libdir@,$libdir,;t t
26511s,@includedir@,$includedir,;t t
26512s,@oldincludedir@,$oldincludedir,;t t
26513s,@infodir@,$infodir,;t t
26514s,@mandir@,$mandir,;t t
26515s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26516s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26517s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26518s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26519s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26520s,@build_alias@,$build_alias,;t t
26521s,@host_alias@,$host_alias,;t t
26522s,@target_alias@,$target_alias,;t t
26523s,@ECHO_C@,$ECHO_C,;t t
26524s,@ECHO_N@,$ECHO_N,;t t
26525s,@ECHO_T@,$ECHO_T,;t t
26526s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26527s,@DEFS@,$DEFS,;t t
26528s,@LIBS@,$LIBS,;t t
26529s,@DESTDIR@,$DESTDIR,;t t
26530s,@CC@,$CC,;t t
26531s,@CFLAGS@,$CFLAGS,;t t
26532s,@LDFLAGS@,$LDFLAGS,;t t
26533s,@CPPFLAGS@,$CPPFLAGS,;t t
26534s,@ac_ct_CC@,$ac_ct_CC,;t t
26535s,@EXEEXT@,$EXEEXT,;t t
26536s,@OBJEXT@,$OBJEXT,;t t
26537s,@build@,$build,;t t
26538s,@build_cpu@,$build_cpu,;t t
26539s,@build_vendor@,$build_vendor,;t t
26540s,@build_os@,$build_os,;t t
26541s,@host@,$host,;t t
26542s,@host_cpu@,$host_cpu,;t t
26543s,@host_vendor@,$host_vendor,;t t
26544s,@host_os@,$host_os,;t t
26545s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
26546s,@CPP@,$CPP,;t t
26547s,@GREP@,$GREP,;t t
26548s,@EGREP@,$EGREP,;t t
26549s,@SET_MAKE@,$SET_MAKE,;t t
26550s,@RANLIB@,$RANLIB,;t t
26551s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
26552s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26553s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26554s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26555s,@LN_S@,$LN_S,;t t
26556s,@LINT@,$LINT,;t t
26557s,@LINT_OPTS@,$LINT_OPTS,;t t
26558s,@GROFF_PATH@,$GROFF_PATH,;t t
26559s,@NROFF_PATH@,$NROFF_PATH,;t t
26560s,@TBL_PATH@,$TBL_PATH,;t t
26561s,@GROFF_NOTE@,$GROFF_NOTE,;t t
26562s,@NROFF_NOTE@,$NROFF_NOTE,;t t
26563s,@AR@,$AR,;t t
26564s,@ac_ct_AR@,$ac_ct_AR,;t t
26565s,@ARFLAGS@,$ARFLAGS,;t t
26566s,@FGREP@,$FGREP,;t t
26567s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
26568s,@CTAGS@,$CTAGS,;t t
26569s,@ETAGS@,$ETAGS,;t t
26570s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
26571s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
26572s,@ECHO_LT@,$ECHO_LT,;t t
26573s,@ECHO_LD@,$ECHO_LD,;t t
26574s,@RULE_CC@,$RULE_CC,;t t
26575s,@SHOW_CC@,$SHOW_CC,;t t
26576s,@ECHO_CC@,$ECHO_CC,;t t
26577s,@PROG_EXT@,$PROG_EXT,;t t
26578s,@LIB_PREFIX@,$LIB_PREFIX,;t t
26579s,@X_CFLAGS@,$X_CFLAGS,;t t
26580s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
26581s,@X_LIBS@,$X_LIBS,;t t
26582s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
26583s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
26584s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26585s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
26586s,@VERSION@,$VERSION,;t t
26587s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
26588s,@VERSION_MINOR@,$VERSION_MINOR,;t t
26589s,@VERSION_PATCH@,$VERSION_PATCH,;t t
26590s,@PACKAGE@,$PACKAGE,;t t
26591s,@CFG_ROOTNAME@,$CFG_ROOTNAME,;t t
26592s,@HDR_ROOTNAME@,$HDR_ROOTNAME,;t t
26593s,@LIB_ROOTNAME@,$LIB_ROOTNAME,;t t
26594s,@SUB_INC@,$SUB_INC,;t t
26595s,@cf_man2html@,$cf_man2html,;t t
26596s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
26597s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
26598s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
26599s,@CONFIG_H@,$CONFIG_H,;t t
26600s,@ALLOCA@,$ALLOCA,;t t
26601s,@GLIBC21@,$GLIBC21,;t t
26602s,@LIBICONV@,$LIBICONV,;t t
26603s,@USE_NLS@,$USE_NLS,;t t
26604s,@MSGFMT@,$MSGFMT,;t t
26605s,@GMSGFMT@,$GMSGFMT,;t t
26606s,@XGETTEXT@,$XGETTEXT,;t t
26607s,@INTLBISON@,$INTLBISON,;t t
26608s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
26609s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
26610s,@CATALOGS@,$CATALOGS,;t t
26611s,@CATOBJEXT@,$CATOBJEXT,;t t
26612s,@GMOFILES@,$GMOFILES,;t t
26613s,@INTLLIBS@,$INTLLIBS,;t t
26614s,@INTLOBJS@,$INTLOBJS,;t t
26615s,@POFILES@,$POFILES,;t t
26616s,@POSUB@,$POSUB,;t t
26617s,@DATADIRNAME@,$DATADIRNAME,;t t
26618s,@INSTOBJEXT@,$INSTOBJEXT,;t t
26619s,@GENCAT@,$GENCAT,;t t
26620s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
26621s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
26622s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
26623s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
26624s,@INTLDIR_MAKE@,$INTLDIR_MAKE,;t t
26625s,@GT_YES@,$GT_YES,;t t
26626s,@GT_NO@,$GT_NO,;t t
26627s,@LINK_PREFIX@,$LINK_PREFIX,;t t
26628s,@ABI_VERSION@,$ABI_VERSION,;t t
26629s,@REL_VERSION@,$REL_VERSION,;t t
26630s,@shlibdir@,$shlibdir,;t t
26631s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
26632s,@LIBTOOL@,$LIBTOOL,;t t
26633s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
26634s,@LT_UNDEF@,$LT_UNDEF,;t t
26635s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
26636s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
26637s,@LIB_CREATE@,$LIB_CREATE,;t t
26638s,@LIB_OBJECT@,$LIB_OBJECT,;t t
26639s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
26640s,@LIB_PREP@,$LIB_PREP,;t t
26641s,@LIB_CLEAN@,$LIB_CLEAN,;t t
26642s,@LIB_COMPILE@,$LIB_COMPILE,;t t
26643s,@LIB_LINK@,$LIB_LINK,;t t
26644s,@LIB_INSTALL@,$LIB_INSTALL,;t t
26645s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
26646s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
26647s,@MAKE_DLLS@,$MAKE_DLLS,;t t
26648s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
26649s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
26650s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
26651s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
26652s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
26653s,@LINK_PROGS@,$LINK_PROGS,;t t
26654s,@LINK_TESTS@,$LINK_TESTS,;t t
26655s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
26656s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
26657s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
26658s,@INSTALL_LIB@,$INSTALL_LIB,;t t
26659s,@RPATH_LIST@,$RPATH_LIST,;t t
26660s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
26661s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
26662s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
26663s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
26664s,@DFT_LIB_SUFFIX@,$DFT_LIB_SUFFIX,;t t
26665s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
26666s,@LIB_MODEL@,$LIB_MODEL,;t t
26667s,@LIBTOOL_MAKE@,$LIBTOOL_MAKE,;t t
26668s,@MAKE_NORMAL@,$MAKE_NORMAL,;t t
26669s,@MAKE_SHARED@,$MAKE_SHARED,;t t
26670s,@MAKE_STATIC@,$MAKE_STATIC,;t t
26671s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
26672s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
26673s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
26674s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
26675s,@EXTRAOBJS@,$EXTRAOBJS,;t t
26676s,@PACKAGE_PREFIX@,$PACKAGE_PREFIX,;t t
26677s,@PACKAGE_CONFIG@,$PACKAGE_CONFIG,;t t
26678s,@cf_ldd_prog@,$cf_ldd_prog,;t t
26679s,@SET_SHLIB_VARS@,$SET_SHLIB_VARS,;t t
26680s,@LIB_TARGET@,$LIB_TARGET,;t t
26681s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
26682CEOF
26683
26684EOF
26685
26686  cat >>"$CONFIG_STATUS" <<\EOF
26687  # Split the substitutions into bite-sized pieces for seds with
26688  # small command number limits, like on Digital OSF/1 and HP-UX.
26689  ac_max_sed_lines=48
26690  ac_sed_frag=1 # Number of current file.
26691  ac_beg=1 # First line for current file.
26692  ac_end=$ac_max_sed_lines # Line after last line for current file.
26693  ac_more_lines=:
26694  ac_sed_cmds=
26695  while "$ac_more_lines"; do
26696    if test "$ac_beg" -gt 1; then
26697      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26698    else
26699      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
26700    fi
26701    if test ! -s $tmp/subs.frag; then
26702      ac_more_lines=false
26703    else
26704      # The purpose of the label and of the branching condition is to
26705      # speed up the sed processing (if there are no `@' at all, there
26706      # is no need to browse any of the substitutions).
26707      # These are the two extra sed commands mentioned above.
26708      (echo ':t
26709  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
26710      # It is possible to make a multiline substitution using escaped newlines.
26711      # Ensure that we do not split the substitution between script fragments.
26712      ac_BEG=$ac_end
26713      ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
26714      sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
26715      if test -s $tmp/subs.next; then
26716        grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
26717        if test ! -s $tmp/subs.edit; then
26718          grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
26719          if test ! -s $tmp/subs.edit; then
26720            if test "$ac_beg" -gt 1; then
26721              ac_end=`expr "$ac_end" - 1`
26722              continue
26723            fi
26724          fi
26725        fi
26726      fi
26727
26728      if test -z "$ac_sed_cmds"; then
26729        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
26730      else
26731        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
26732      fi
26733      ac_sed_frag=`expr "$ac_sed_frag" + 1`
26734      ac_beg=$ac_end
26735      ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
26736    fi
26737  done
26738  if test -z "$ac_sed_cmds"; then
26739    ac_sed_cmds=cat
26740  fi
26741fi # test -n "$CONFIG_FILES"
26742
26743EOF
26744cat >>"$CONFIG_STATUS" <<\EOF
26745for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
26746  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26747  case "$ac_file" in
26748  - | *:- | *:-:* ) # input from stdin
26749        cat >$tmp/stdin
26750        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26751        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26752  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26753        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26754  * )   ac_file_in=$ac_file.in ;;
26755  esac
26756
26757  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
26758  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26759         X"$ac_file" : 'X\(//\)[^/]' \| \
26760         X"$ac_file" : 'X\(//\)$' \| \
26761         X"$ac_file" : 'X\(/\)' \| \
26762         .     : '\(.\)' 2>/dev/null ||
26763echo X"$ac_file" |
26764    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26765  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26766  	  /^X\(\/\/\)$/{ s//\1/; q; }
26767  	  /^X\(\/\).*/{ s//\1/; q; }
26768  	  s/.*/./; q'`
26769  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26770    { case "$ac_dir" in
26771  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26772  *)                      as_incr_dir=.;;
26773esac
26774as_dummy="$ac_dir"
26775for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26776  case $as_mkdir_dir in
26777    # Skip DOS drivespec
26778    ?:) as_incr_dir=$as_mkdir_dir ;;
26779    *)
26780      as_incr_dir=$as_incr_dir/$as_mkdir_dir
26781      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26782    ;;
26783  esac
26784done; }
26785
26786    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
26787    # A "../" for each directory in $ac_dir_suffix.
26788    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
26789  else
26790    ac_dir_suffix= ac_dots=
26791  fi
26792
26793  case "$srcdir" in
26794  .)  ac_srcdir=.
26795      if test -z "$ac_dots"; then
26796         ac_top_srcdir=.
26797      else
26798         ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
26799      fi ;;
26800  [\\/]* | ?:[\\/]* )
26801      ac_srcdir="$srcdir$ac_dir_suffix";
26802      ac_top_srcdir="$srcdir" ;;
26803  *) # Relative path.
26804    ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
26805    ac_top_srcdir="$ac_dots$srcdir" ;;
26806  esac
26807
26808  case $INSTALL in
26809  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26810  *) ac_INSTALL=$ac_dots$INSTALL ;;
26811  esac
26812
26813  if test x"$ac_file" != x-; then
26814    { echo "$as_me:26814: creating $ac_file" >&5
26815echo "$as_me: creating $ac_file" >&6;}
26816    rm -f "$ac_file"
26817  fi
26818  # Let's still pretend it is `configure' which instantiates (i.e., don't
26819  # use $as_me), people would be surprised to read:
26820  #    /* config.h.  Generated automatically by config.status.  */
26821  configure_input="Generated automatically from `echo $ac_file_in |
26822                                                 sed 's,.*/,,'` by configure."
26823
26824  # First look for the input files in the build tree, otherwise in the
26825  # src tree.
26826  ac_file_inputs=`IFS=:
26827    for f in $ac_file_in; do
26828      case $f in
26829      -) echo $tmp/stdin ;;
26830      [\\/$]*)
26831         # Absolute (can't be DOS-style, as IFS=:)
26832         test -f "$f" || { { echo "$as_me:26832: error: cannot find input file: $f" >&5
26833echo "$as_me: error: cannot find input file: $f" >&2;}
26834   { (exit 1); exit 1; }; }
26835         echo $f;;
26836      *) # Relative
26837         if test -f "$f"; then
26838           # Build tree
26839           echo $f
26840         elif test -f "$srcdir/$f"; then
26841           # Source tree
26842           echo "$srcdir/$f"
26843         else
26844           # /dev/null tree
26845           { { echo "$as_me:26845: error: cannot find input file: $f" >&5
26846echo "$as_me: error: cannot find input file: $f" >&2;}
26847   { (exit 1); exit 1; }; }
26848         fi;;
26849      esac
26850    done` || { (exit 1); exit 1; }
26851EOF
26852cat >>"$CONFIG_STATUS" <<\EOF
26853  ac_warn_datarootdir=no
26854  if test x"$ac_file" != x-; then
26855    for ac_item in $ac_file_inputs
26856    do
26857      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
26858      if test -n "$ac_seen"; then
26859        ac_used=`grep '@datarootdir@' "$ac_item"`
26860        if test -z "$ac_used"; then
26861          { echo "$as_me:26861: WARNING: datarootdir was used implicitly but not set:
26862$ac_seen" >&5
26863echo "$as_me: WARNING: datarootdir was used implicitly but not set:
26864$ac_seen" >&2;}
26865          ac_warn_datarootdir=yes
26866        fi
26867      fi
26868      ac_seen=`grep '${datarootdir}' "$ac_item"`
26869      if test -n "$ac_seen"; then
26870        { echo "$as_me:26870: WARNING: datarootdir was used explicitly but not set:
26871$ac_seen" >&5
26872echo "$as_me: WARNING: datarootdir was used explicitly but not set:
26873$ac_seen" >&2;}
26874        ac_warn_datarootdir=yes
26875      fi
26876    done
26877  fi
26878
26879if test "x$ac_warn_datarootdir" = xyes; then
26880  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
26881fi
26882
26883EOF
26884cat >>"$CONFIG_STATUS" <<EOF
26885  sed "$ac_vpsub
26886$extrasub
26887EOF
26888cat >>"$CONFIG_STATUS" <<\EOF
26889:t
26890/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26891s,@configure_input@,$configure_input,;t t
26892s,@srcdir@,$ac_srcdir,;t t
26893s,@top_srcdir@,$ac_top_srcdir,;t t
26894s,@INSTALL@,$ac_INSTALL,;t t
26895" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
26896  rm -f $tmp/stdin
26897  if test x"$ac_file" != x-; then
26898    cp "$tmp/out" "$ac_file"
26899
26900    for ac_name in prefix exec_prefix datarootdir
26901    do
26902        ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
26903        if test -n "$ac_seen"; then
26904            ac_init=`${EGREP-egrep} '[ 	]*'$ac_name'[ 	]*=' "$ac_file"`
26905            if test -z "$ac_init"; then
26906              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
26907              { echo "$as_me:26907: WARNING: Variable $ac_name is used but was not set:
26908$ac_seen" >&5
26909echo "$as_me: WARNING: Variable $ac_name is used but was not set:
26910$ac_seen" >&2;}
26911            fi
26912        fi
26913    done
26914    ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
26915    ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
26916    if test -s $tmp/out; then
26917      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
26918      { echo "$as_me:26918: WARNING: Some variables may not be substituted:
26919$ac_seen" >&5
26920echo "$as_me: WARNING: Some variables may not be substituted:
26921$ac_seen" >&2;}
26922    fi
26923  else
26924    cat $tmp/out
26925  fi
26926  rm -f $tmp/out
26927
26928done
26929EOF
26930cat >>"$CONFIG_STATUS" <<\EOF
26931
26932#
26933# CONFIG_HEADER section.
26934#
26935
26936# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
26937# NAME is the cpp macro being defined and VALUE is the value it is being given.
26938#
26939# ac_d sets the value in "#define NAME VALUE" lines.
26940ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
26941ac_dB='[ 	].*$,\1#\2'
26942ac_dC=' '
26943ac_dD=',;t'
26944# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
26945ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
26946ac_iB='\([ 	]\),\1#\2define\3'
26947ac_iC=' '
26948ac_iD='\4,;t'
26949# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
26950ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
26951ac_uB='$,\1#\2define\3'
26952ac_uC=' '
26953ac_uD=',;t'
26954
26955for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
26956  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26957  case "$ac_file" in
26958  - | *:- | *:-:* ) # input from stdin
26959        cat >$tmp/stdin
26960        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26961        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26962  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26963        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26964  * )   ac_file_in=$ac_file.in ;;
26965  esac
26966
26967  test x"$ac_file" != x- && { echo "$as_me:26967: creating $ac_file" >&5
26968echo "$as_me: creating $ac_file" >&6;}
26969
26970  # First look for the input files in the build tree, otherwise in the
26971  # src tree.
26972  ac_file_inputs=`IFS=:
26973    for f in $ac_file_in; do
26974      case $f in
26975      -) echo $tmp/stdin ;;
26976      [\\/$]*)
26977         # Absolute (can't be DOS-style, as IFS=:)
26978         test -f "$f" || { { echo "$as_me:26978: error: cannot find input file: $f" >&5
26979echo "$as_me: error: cannot find input file: $f" >&2;}
26980   { (exit 1); exit 1; }; }
26981         echo $f;;
26982      *) # Relative
26983         if test -f "$f"; then
26984           # Build tree
26985           echo $f
26986         elif test -f "$srcdir/$f"; then
26987           # Source tree
26988           echo "$srcdir/$f"
26989         else
26990           # /dev/null tree
26991           { { echo "$as_me:26991: error: cannot find input file: $f" >&5
26992echo "$as_me: error: cannot find input file: $f" >&2;}
26993   { (exit 1); exit 1; }; }
26994         fi;;
26995      esac
26996    done` || { (exit 1); exit 1; }
26997  # Remove the trailing spaces.
26998  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
26999
27000EOF
27001
27002# Transform confdefs.h into a list of #define's.  We won't use it as a sed
27003# script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27004# be either 'cat' or 'sort'.
27005sort -u confdefs.h | uniq >conftest.vals
27006
27007# Break up conftest.vals because some shells have a limit on
27008# the size of here documents, and old seds have small limits too.
27009
27010rm -f conftest.tail
27011echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
27012while grep . conftest.vals >/dev/null
27013do
27014  # Write chunks of a limited-size here document to conftest.frag.
27015  echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
27016  sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
27017  echo 'CEOF' >> "$CONFIG_STATUS"
27018  sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
27019  rm -f conftest.vals
27020  mv conftest.tail conftest.vals
27021done
27022rm -f conftest.vals
27023
27024# Run sed to substitute the contents of conftest.frag into $tmp/in at the
27025# marker @DEFS@.
27026echo '  cat >> conftest.edit <<CEOF
27027/@DEFS@/r conftest.frag
27028/@DEFS@/d
27029CEOF
27030sed -f conftest.edit $tmp/in > $tmp/out
27031rm -f $tmp/in
27032mv $tmp/out $tmp/in
27033rm -f conftest.edit conftest.frag
27034' >> "$CONFIG_STATUS"
27035
27036cat >>"$CONFIG_STATUS" <<\EOF
27037  # Let's still pretend it is `configure' which instantiates (i.e., don't
27038  # use $as_me), people would be surprised to read:
27039  #    /* config.h.  Generated automatically by config.status.  */
27040  if test x"$ac_file" = x-; then
27041    echo "/* Generated automatically by configure.  */" >$tmp/config.h
27042  else
27043    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27044  fi
27045  cat $tmp/in >>$tmp/config.h
27046  rm -f $tmp/in
27047  if test x"$ac_file" != x-; then
27048    if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
27049      { echo "$as_me:27049: $ac_file is unchanged" >&5
27050echo "$as_me: $ac_file is unchanged" >&6;}
27051    else
27052      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27053         X"$ac_file" : 'X\(//\)[^/]' \| \
27054         X"$ac_file" : 'X\(//\)$' \| \
27055         X"$ac_file" : 'X\(/\)' \| \
27056         .     : '\(.\)' 2>/dev/null ||
27057echo X"$ac_file" |
27058    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27059  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27060  	  /^X\(\/\/\)$/{ s//\1/; q; }
27061  	  /^X\(\/\).*/{ s//\1/; q; }
27062  	  s/.*/./; q'`
27063      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27064        { case "$ac_dir" in
27065  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27066  *)                      as_incr_dir=.;;
27067esac
27068as_dummy="$ac_dir"
27069for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27070  case $as_mkdir_dir in
27071    # Skip DOS drivespec
27072    ?:) as_incr_dir=$as_mkdir_dir ;;
27073    *)
27074      as_incr_dir=$as_incr_dir/$as_mkdir_dir
27075      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27076    ;;
27077  esac
27078done; }
27079
27080      fi
27081      rm -f "$ac_file"
27082      mv "$tmp/config.h" "$ac_file"
27083    fi
27084  else
27085    cat $tmp/config.h
27086    rm -f $tmp/config.h
27087  fi
27088done
27089EOF
27090cat >>"$CONFIG_STATUS" <<\EOF
27091#
27092# CONFIG_COMMANDS section.
27093#
27094for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27095  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27096  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27097
27098  case "$ac_dest" in
27099    default-1 ) for ac_file in $CONFIG_FILES; do
27100
27101        # Support "outfile[:infile[:infile...]]"
27102        case "$ac_file" in
27103          (*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
27104        esac
27105
27106        # PO directories have a Makefile.in generated from Makefile.inn.
27107        case "$ac_file" in
27108        (*/[Mm]akefile.in)
27109          # Adjust a relative srcdir.
27110          ac_dir="`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`"
27111          ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
27112          ac_dots="`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`"
27113          ac_base="`basename $ac_file .in`"
27114          # In autoconf-2.13 it is called $ac_given_srcdir.
27115          # In autoconf-2.50 it is called $srcdir.
27116          test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
27117
27118          case "$ac_given_srcdir" in
27119            (.)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
27120            (/*) top_srcdir="$ac_given_srcdir" ;;
27121            (*)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
27122          esac
27123
27124          if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
27125            rm -f "$ac_dir/POTFILES"
27126            test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
27127            sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
27128            test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
27129            sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
27130          fi
27131          ;;
27132        esac
27133      done ;;
27134    default )
27135
27136cf_libname=\${LIB_BASENAME}
27137cf_liblink=$cf_libname
27138cf_libroot=$cf_libname
27139
27140if test "x$cf_cv_do_symlinks" = xyes
27141then
27142	case "x$cf_cv_shlib_version" in
27143	(xrel)
27144		cf_liblink="\${LIB_ABI_NAME}"
27145		cf_libname="\${LIB_REL_NAME}"
27146		;;
27147	(xabi)
27148		cf_liblink="\${LIB_REL_NAME}"
27149		cf_libname="\${LIB_ABI_NAME}"
27150		;;
27151	esac
27152fi
27153LIB_TARGET=$cf_libname
27154
27155case x$LIB_MODEL in
27156(xlibtool|xshared)
27157	cf_libdeps="\${LIBS} \${LDFLAGS}"
27158	;;
27159(x*)
27160	cf_libdeps=
27161	;;
27162esac
27163
27164cat >>makefile <<CF_EOF
27165
27166# generated by CF__ADD_SHLIB_RULES
27167# libmodel: $LIB_MODEL
27168# symlinks: $cf_cv_do_symlinks
27169# shlibver: $cf_cv_shlib_version
27170
27171CF_EOF
27172
27173cat >>makefile <<CF_EOF
27174$cf_libname :: \\
27175CF_EOF
27176
27177cat >>makefile <<CF_EOF
27178		\${LIB_OBJECT}
27179	@echo linking \$@
27180	\$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
27181CF_EOF
27182
27183if test "x$cf_cv_do_symlinks" = xyes
27184then
27185cat >>makefile <<CF_EOF
27186	\$(LN_S) $cf_libname $cf_liblink
27187	\$(LN_S) $cf_liblink $cf_libroot
27188CF_EOF
27189fi
27190
27191cat >>makefile <<CF_EOF
27192
27193install \\
27194install.libs :: \$(DESTDIR)\$(libdir)/$cf_libname
27195
27196\$(DESTDIR)\$(libdir)/$cf_libname :: \\
27197		\$(DESTDIR)\$(libdir) \\
27198		\${LIB_OBJECT}
27199	@echo linking \$@
27200	\$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
27201CF_EOF
27202
27203if test "x$cf_cv_do_symlinks" = xyes
27204then
27205cat >>makefile <<CF_EOF
27206	cd \$(DESTDIR)\$(libdir) && (\$(LN_S) $cf_libname $cf_liblink; \$(LN_S) $cf_liblink $cf_libroot; )
27207CF_EOF
27208fi
27209
27210if test x$LIB_MODEL = xshared
27211then
27212cat >>makefile <<CF_EOF
27213	- \$(SHELL) -c "if test -z "\$(DESTDIR)" ; then /sbin/ldconfig; fi"
27214CF_EOF
27215fi
27216
27217cat >>makefile <<CF_EOF
27218
27219uninstall \\
27220uninstall.libs ::
27221	@echo uninstalling \$(DESTDIR)\$(libdir)/$cf_libname
27222CF_EOF
27223
27224if test "x$cf_cv_do_symlinks" = xyes
27225then
27226cat >>makefile <<CF_EOF
27227	-rm -f \$(DESTDIR)\$(libdir)/$cf_libroot
27228	-rm -f \$(DESTDIR)\$(libdir)/$cf_liblink
27229CF_EOF
27230fi
27231
27232cat >>makefile <<CF_EOF
27233	-rm -f \$(DESTDIR)\$(libdir)/$cf_libname
27234
27235clean \\
27236clean.libs ::
27237CF_EOF
27238
27239if test "x$cf_cv_do_symlinks" = xyes
27240then
27241cat >>makefile <<CF_EOF
27242	-rm -f $cf_libroot
27243	-rm -f $cf_liblink
27244CF_EOF
27245fi
27246
27247cat >>makefile <<CF_EOF
27248	-rm -f $cf_libname
27249
27250mostlyclean::
27251	-rm -f \${LIB_OBJECT}
27252# end generated by CF__ADD_SHLIB_RULES
27253CF_EOF
27254
27255 ;;
27256  esac
27257done
27258EOF
27259
27260cat >>"$CONFIG_STATUS" <<\EOF
27261
27262{ (exit 0); exit 0; }
27263EOF
27264chmod +x "$CONFIG_STATUS"
27265ac_clean_files=$ac_clean_files_save
27266
27267# configure is writing to config.log, and then calls config.status.
27268# config.status does its own redirection, appending to config.log.
27269# Unfortunately, on DOS this fails, as config.log is still kept open
27270# by configure, so config.status won't be able to write to it; its
27271# output is simply discarded.  So we exec the FD to /dev/null,
27272# effectively closing config.log, so it can be properly (re)opened and
27273# appended to by config.status.  When coming back to configure, we
27274# need to make the FD available again.
27275if test "$no_create" != yes; then
27276  ac_cs_success=:
27277  exec 5>/dev/null
27278  $SHELL "$CONFIG_STATUS" || ac_cs_success=false
27279  exec 5>>config.log
27280  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27281  # would make configure fail if this is the last instruction.
27282  "$ac_cs_success" || { (exit 1); exit 1; }
27283fi
27284
27285