1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20101002.
4#
5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6# Free Software Foundation, Inc.
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Avoid depending upon Character Ranges.
11as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14as_cr_digits='0123456789'
15as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17# Sed expression to map a string onto a valid variable name.
18as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20# Sed expression to map a string onto a valid CPP name.
21as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23# Be Bourne compatible
24if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25  emulate sh
26  NULLCMD=:
27elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28  set -o posix
29fi
30
31# Name of the executable.
32as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34if expr a : '\(a\)' >/dev/null 2>&1; then
35  as_expr=expr
36else
37  as_expr=false
38fi
39
40rm -f conf$$ conf$$.exe conf$$.file
41echo >conf$$.file
42if ln -s conf$$.file conf$$ 2>/dev/null; then
43  # We could just check for DJGPP; but this test a) works b) is more generic
44  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45  if test -f conf$$.exe; then
46    # Don't use ln at all; we don't have any links
47    as_ln_s='cp -p'
48  else
49    as_ln_s='ln -s'
50  fi
51elif ln conf$$.file conf$$ 2>/dev/null; then
52  as_ln_s=ln
53else
54  as_ln_s='cp -p'
55fi
56rm -f conf$$ conf$$.exe conf$$.file
57
58as_executable_p="test -f"
59
60# Support unset when possible.
61if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62  as_unset=unset
63else
64  as_unset=false
65fi
66
67# NLS nuisances.
68$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77# IFS
78# We need space, tab and new line, in precisely that order.
79as_nl='
80'
81IFS=" 	$as_nl"
82
83# CDPATH.
84$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86# Name of the host.
87# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88# so uname gets run too.
89ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91exec 6>&1
92
93#
94# Initializations.
95#
96ac_default_prefix=/usr/local
97cross_compiling=no
98subdirs=
99MFLAGS= MAKEFLAGS=
100SHELL=${CONFIG_SHELL-/bin/sh}
101
102# Maximum number of lines to put in a shell here document.
103# This variable seems obsolete.  It should probably be removed, and
104# only ac_max_sed_lines should be used.
105: ${ac_max_here_lines=38}
106
107ac_unique_file="dialog.h"
108# Factoring default headers for most tests.
109ac_includes_default="\
110#include <stdio.h>
111#if HAVE_SYS_TYPES_H
112# include <sys/types.h>
113#endif
114#if HAVE_SYS_STAT_H
115# include <sys/stat.h>
116#endif
117#if STDC_HEADERS
118# include <stdlib.h>
119# include <stddef.h>
120#else
121# if HAVE_STDLIB_H
122#  include <stdlib.h>
123# endif
124#endif
125#if HAVE_STRING_H
126# if !STDC_HEADERS && HAVE_MEMORY_H
127#  include <memory.h>
128# endif
129# include <string.h>
130#endif
131#if HAVE_STRINGS_H
132# include <strings.h>
133#endif
134#if HAVE_INTTYPES_H
135# include <inttypes.h>
136#else
137# if HAVE_STDINT_H
138#  include <stdint.h>
139# endif
140#endif
141#if HAVE_UNISTD_H
142# include <unistd.h>
143#endif"
144
145# Initialize some variables set by options.
146ac_init_help=
147ac_init_version=false
148# The variables have the same names as the options, with
149# dashes changed to underlines.
150cache_file=/dev/null
151exec_prefix=NONE
152no_create=
153no_recursion=
154prefix=NONE
155program_prefix=NONE
156program_suffix=NONE
157program_transform_name=s,x,x,
158silent=
159site=
160srcdir=
161verbose=
162x_includes=NONE
163x_libraries=NONE
164
165# Installation directory options.
166# These are left unexpanded so users can "make install exec_prefix=/foo"
167# and all the variables that are supposed to be based on exec_prefix
168# by default will actually change.
169# Use braces instead of parens because sh, perl, etc. also accept them.
170bindir='${exec_prefix}/bin'
171sbindir='${exec_prefix}/sbin'
172libexecdir='${exec_prefix}/libexec'
173datadir='${prefix}/share'
174sysconfdir='${prefix}/etc'
175sharedstatedir='${prefix}/com'
176localstatedir='${prefix}/var'
177libdir='${exec_prefix}/lib'
178includedir='${prefix}/include'
179oldincludedir='/usr/include'
180infodir='${prefix}/info'
181mandir='${prefix}/man'
182
183# Identity of this package.
184PACKAGE_NAME=
185PACKAGE_TARNAME=
186PACKAGE_VERSION=
187PACKAGE_STRING=
188PACKAGE_BUGREPORT=
189
190ac_prev=
191for ac_option
192do
193  # If the previous option needs an argument, assign it.
194  if test -n "$ac_prev"; then
195    eval "$ac_prev=\$ac_option"
196    ac_prev=
197    continue
198  fi
199
200  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
201
202  # Accept the important Cygnus configure options, so we can diagnose typos.
203
204  case $ac_option in
205
206  -bindir | --bindir | --bindi | --bind | --bin | --bi)
207    ac_prev=bindir ;;
208  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
209    bindir=$ac_optarg ;;
210
211  -build | --build | --buil | --bui | --bu)
212    ac_prev=build_alias ;;
213  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
214    build_alias=$ac_optarg ;;
215
216  -cache-file | --cache-file | --cache-fil | --cache-fi \
217  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
218    ac_prev=cache_file ;;
219  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
220  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
221    cache_file=$ac_optarg ;;
222
223  --config-cache | -C)
224    cache_file=config.cache ;;
225
226  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
227    ac_prev=datadir ;;
228  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
229  | --da=*)
230    datadir=$ac_optarg ;;
231
232  -disable-* | --disable-*)
233    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
234    # Reject names that are not valid shell variable names.
235    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
236      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
237   { (exit 1); exit 1; }; }
238    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
239    eval "enable_$ac_feature=no" ;;
240
241  -enable-* | --enable-*)
242    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
243    # Reject names that are not valid shell variable names.
244    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246   { (exit 1); exit 1; }; }
247    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248    case $ac_option in
249      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
250      *) ac_optarg=yes ;;
251    esac
252    eval "enable_$ac_feature='$ac_optarg'" ;;
253
254  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
255  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
256  | --exec | --exe | --ex)
257    ac_prev=exec_prefix ;;
258  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
259  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
260  | --exec=* | --exe=* | --ex=*)
261    exec_prefix=$ac_optarg ;;
262
263  -gas | --gas | --ga | --g)
264    # Obsolete; use --with-gas.
265    with_gas=yes ;;
266
267  -help | --help | --hel | --he | -h)
268    ac_init_help=long ;;
269  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
270    ac_init_help=recursive ;;
271  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
272    ac_init_help=short ;;
273
274  -host | --host | --hos | --ho)
275    ac_prev=host_alias ;;
276  -host=* | --host=* | --hos=* | --ho=*)
277    host_alias=$ac_optarg ;;
278
279  -includedir | --includedir | --includedi | --included | --include \
280  | --includ | --inclu | --incl | --inc)
281    ac_prev=includedir ;;
282  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
283  | --includ=* | --inclu=* | --incl=* | --inc=*)
284    includedir=$ac_optarg ;;
285
286  -infodir | --infodir | --infodi | --infod | --info | --inf)
287    ac_prev=infodir ;;
288  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
289    infodir=$ac_optarg ;;
290
291  -libdir | --libdir | --libdi | --libd)
292    ac_prev=libdir ;;
293  -libdir=* | --libdir=* | --libdi=* | --libd=*)
294    libdir=$ac_optarg ;;
295
296  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
297  | --libexe | --libex | --libe)
298    ac_prev=libexecdir ;;
299  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
300  | --libexe=* | --libex=* | --libe=*)
301    libexecdir=$ac_optarg ;;
302
303  -localstatedir | --localstatedir | --localstatedi | --localstated \
304  | --localstate | --localstat | --localsta | --localst \
305  | --locals | --local | --loca | --loc | --lo)
306    ac_prev=localstatedir ;;
307  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
308  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
309  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
310    localstatedir=$ac_optarg ;;
311
312  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
313    ac_prev=mandir ;;
314  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
315    mandir=$ac_optarg ;;
316
317  -nfp | --nfp | --nf)
318    # Obsolete; use --without-fp.
319    with_fp=no ;;
320
321  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322  | --no-cr | --no-c)
323    no_create=yes ;;
324
325  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
326  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
327    no_recursion=yes ;;
328
329  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
330  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
331  | --oldin | --oldi | --old | --ol | --o)
332    ac_prev=oldincludedir ;;
333  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
334  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
335  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
336    oldincludedir=$ac_optarg ;;
337
338  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
339    ac_prev=prefix ;;
340  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
341    prefix=$ac_optarg ;;
342
343  -program-prefix | --program-prefix | --program-prefi | --program-pref \
344  | --program-pre | --program-pr | --program-p)
345    ac_prev=program_prefix ;;
346  -program-prefix=* | --program-prefix=* | --program-prefi=* \
347  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
348    program_prefix=$ac_optarg ;;
349
350  -program-suffix | --program-suffix | --program-suffi | --program-suff \
351  | --program-suf | --program-su | --program-s)
352    ac_prev=program_suffix ;;
353  -program-suffix=* | --program-suffix=* | --program-suffi=* \
354  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
355    program_suffix=$ac_optarg ;;
356
357  -program-transform-name | --program-transform-name \
358  | --program-transform-nam | --program-transform-na \
359  | --program-transform-n | --program-transform- \
360  | --program-transform | --program-transfor \
361  | --program-transfo | --program-transf \
362  | --program-trans | --program-tran \
363  | --progr-tra | --program-tr | --program-t)
364    ac_prev=program_transform_name ;;
365  -program-transform-name=* | --program-transform-name=* \
366  | --program-transform-nam=* | --program-transform-na=* \
367  | --program-transform-n=* | --program-transform-=* \
368  | --program-transform=* | --program-transfor=* \
369  | --program-transfo=* | --program-transf=* \
370  | --program-trans=* | --program-tran=* \
371  | --progr-tra=* | --program-tr=* | --program-t=*)
372    program_transform_name=$ac_optarg ;;
373
374  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
375  | -silent | --silent | --silen | --sile | --sil)
376    silent=yes ;;
377
378  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
379    ac_prev=sbindir ;;
380  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
381  | --sbi=* | --sb=*)
382    sbindir=$ac_optarg ;;
383
384  -sharedstatedir | --sharedstatedir | --sharedstatedi \
385  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
386  | --sharedst | --shareds | --shared | --share | --shar \
387  | --sha | --sh)
388    ac_prev=sharedstatedir ;;
389  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
390  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
391  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
392  | --sha=* | --sh=*)
393    sharedstatedir=$ac_optarg ;;
394
395  -site | --site | --sit)
396    ac_prev=site ;;
397  -site=* | --site=* | --sit=*)
398    site=$ac_optarg ;;
399
400  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
401    ac_prev=srcdir ;;
402  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
403    srcdir=$ac_optarg ;;
404
405  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
406  | --syscon | --sysco | --sysc | --sys | --sy)
407    ac_prev=sysconfdir ;;
408  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
409  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
410    sysconfdir=$ac_optarg ;;
411
412  -target | --target | --targe | --targ | --tar | --ta | --t)
413    ac_prev=target_alias ;;
414  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
415    target_alias=$ac_optarg ;;
416
417  -v | -verbose | --verbose | --verbos | --verbo | --verb)
418    verbose=yes ;;
419
420  -version | --version | --versio | --versi | --vers | -V)
421    ac_init_version=: ;;
422
423  -with-* | --with-*)
424    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
425    # Reject names that are not valid shell variable names.
426    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
427      { echo "$as_me: error: invalid package name: $ac_package" >&2
428   { (exit 1); exit 1; }; }
429    ac_package=`echo $ac_package| sed 's/-/_/g'`
430    case $ac_option in
431      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
432      *) ac_optarg=yes ;;
433    esac
434    eval "with_$ac_package='$ac_optarg'" ;;
435
436  -without-* | --without-*)
437    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
438    # Reject names that are not valid shell variable names.
439    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
440      { echo "$as_me: error: invalid package name: $ac_package" >&2
441   { (exit 1); exit 1; }; }
442    ac_package=`echo $ac_package | sed 's/-/_/g'`
443    eval "with_$ac_package=no" ;;
444
445  --x)
446    # Obsolete; use --with-x.
447    with_x=yes ;;
448
449  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450  | --x-incl | --x-inc | --x-in | --x-i)
451    ac_prev=x_includes ;;
452  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
454    x_includes=$ac_optarg ;;
455
456  -x-libraries | --x-libraries | --x-librarie | --x-librari \
457  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458    ac_prev=x_libraries ;;
459  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
461    x_libraries=$ac_optarg ;;
462
463  -*) { echo "$as_me: error: unrecognized option: $ac_option
464Try \`$0 --help' for more information." >&2
465   { (exit 1); exit 1; }; }
466    ;;
467
468  *=*)
469    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
470    # Reject names that are not valid shell variable names.
471    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
472      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
473   { (exit 1); exit 1; }; }
474    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
475    eval "$ac_envvar='$ac_optarg'"
476    export $ac_envvar ;;
477
478  *)
479    # FIXME: should be removed in autoconf 3.0.
480    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
481    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
482      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
483    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
484    ;;
485
486  esac
487done
488
489if test -n "$ac_prev"; then
490  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
491  { echo "$as_me: error: missing argument to $ac_option" >&2
492   { (exit 1); exit 1; }; }
493fi
494
495# Be sure to have absolute paths.
496for ac_var in exec_prefix prefix
497do
498  eval ac_val=$`echo $ac_var`
499  case $ac_val in
500    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
501    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
502   { (exit 1); exit 1; }; };;
503  esac
504done
505
506# Be sure to have absolute paths.
507for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
508              localstatedir libdir includedir oldincludedir infodir mandir
509do
510  eval ac_val=$`echo $ac_var`
511  case $ac_val in
512    [\\/$]* | ?:[\\/]* ) ;;
513    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
514   { (exit 1); exit 1; }; };;
515  esac
516done
517
518# There might be people who depend on the old broken behavior: `$host'
519# used to hold the argument of --host etc.
520build=$build_alias
521host=$host_alias
522target=$target_alias
523
524# FIXME: should be removed in autoconf 3.0.
525if test "x$host_alias" != x; then
526  if test "x$build_alias" = x; then
527    cross_compiling=maybe
528    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
529    If a cross compiler is detected then cross compile mode will be used." >&2
530  elif test "x$build_alias" != "x$host_alias"; then
531    cross_compiling=yes
532  fi
533fi
534
535ac_tool_prefix=
536test -n "$host_alias" && ac_tool_prefix=$host_alias-
537
538test "$silent" = yes && exec 6>/dev/null
539
540# Find the source files, if location was not specified.
541if test -z "$srcdir"; then
542  ac_srcdir_defaulted=yes
543  # Try the directory containing this script, then its parent.
544  ac_prog=$0
545  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
546  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
547  srcdir=$ac_confdir
548  if test ! -r $srcdir/$ac_unique_file; then
549    srcdir=..
550  fi
551else
552  ac_srcdir_defaulted=no
553fi
554if test ! -r $srcdir/$ac_unique_file; then
555  if test "$ac_srcdir_defaulted" = yes; then
556    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
557   { (exit 1); exit 1; }; }
558  else
559    { echo "$as_me: error: cannot find sources in $srcdir" >&2
560   { (exit 1); exit 1; }; }
561  fi
562fi
563srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
564ac_env_build_alias_set=${build_alias+set}
565ac_env_build_alias_value=$build_alias
566ac_cv_env_build_alias_set=${build_alias+set}
567ac_cv_env_build_alias_value=$build_alias
568ac_env_host_alias_set=${host_alias+set}
569ac_env_host_alias_value=$host_alias
570ac_cv_env_host_alias_set=${host_alias+set}
571ac_cv_env_host_alias_value=$host_alias
572ac_env_target_alias_set=${target_alias+set}
573ac_env_target_alias_value=$target_alias
574ac_cv_env_target_alias_set=${target_alias+set}
575ac_cv_env_target_alias_value=$target_alias
576ac_env_CC_set=${CC+set}
577ac_env_CC_value=$CC
578ac_cv_env_CC_set=${CC+set}
579ac_cv_env_CC_value=$CC
580ac_env_CFLAGS_set=${CFLAGS+set}
581ac_env_CFLAGS_value=$CFLAGS
582ac_cv_env_CFLAGS_set=${CFLAGS+set}
583ac_cv_env_CFLAGS_value=$CFLAGS
584ac_env_LDFLAGS_set=${LDFLAGS+set}
585ac_env_LDFLAGS_value=$LDFLAGS
586ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
587ac_cv_env_LDFLAGS_value=$LDFLAGS
588ac_env_CPPFLAGS_set=${CPPFLAGS+set}
589ac_env_CPPFLAGS_value=$CPPFLAGS
590ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
591ac_cv_env_CPPFLAGS_value=$CPPFLAGS
592ac_env_CPP_set=${CPP+set}
593ac_env_CPP_value=$CPP
594ac_cv_env_CPP_set=${CPP+set}
595ac_cv_env_CPP_value=$CPP
596
597#
598# Report the --help message.
599#
600if test "$ac_init_help" = "long"; then
601  # Omit some internal or obsolete options to make the list less imposing.
602  # This message is too long to be a string in the A/UX 3.1 sh.
603  cat <<EOF
604\`configure' configures this package to adapt to many kinds of systems.
605
606Usage: $0 [OPTION]... [VAR=VALUE]...
607
608To assign environment variables (e.g., CC, CFLAGS...), specify them as
609VAR=VALUE.  See below for descriptions of some of the useful variables.
610
611Defaults for the options are specified in brackets.
612
613Configuration:
614  -h, --help              display this help and exit
615      --help=short        display options specific to this package
616      --help=recursive    display the short help of all the included packages
617  -V, --version           display version information and exit
618  -q, --quiet, --silent   do not print \`checking...' messages
619      --cache-file=FILE   cache test results in FILE [disabled]
620  -C, --config-cache      alias for \`--cache-file=config.cache'
621  -n, --no-create         do not create output files
622      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
623
624EOF
625
626  cat <<EOF
627Installation directories:
628  --prefix=PREFIX         install architecture-independent files in PREFIX
629                          [$ac_default_prefix]
630  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
631                          [PREFIX]
632
633By default, \`make install' will install all the files in
634\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
635an installation prefix other than \`$ac_default_prefix' using \`--prefix',
636for instance \`--prefix=\$HOME'.
637
638For better control, use the options below.
639
640Fine tuning of the installation directories:
641  --bindir=DIR            user executables [EPREFIX/bin]
642  --sbindir=DIR           system admin executables [EPREFIX/sbin]
643  --libexecdir=DIR        program executables [EPREFIX/libexec]
644  --datadir=DIR           read-only architecture-independent data [PREFIX/share]
645  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
646  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
647  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
648  --libdir=DIR            object code libraries [EPREFIX/lib]
649  --includedir=DIR        C header files [PREFIX/include]
650  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
651  --infodir=DIR           info documentation [PREFIX/info]
652  --mandir=DIR            man documentation [PREFIX/man]
653EOF
654
655  cat <<\EOF
656
657Program names:
658  --program-prefix=PREFIX            prepend PREFIX to installed program names
659  --program-suffix=SUFFIX            append SUFFIX to installed program names
660  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
661
662System types:
663  --build=BUILD           configure for building on BUILD [guessed]
664  --host=HOST       build programs to run on HOST [BUILD]
665EOF
666fi
667
668if test -n "$ac_init_help"; then
669
670  cat <<\EOF
671
672Optional Features:
673  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
674  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
675
676Optional Packages:
677  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
678  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
679
680  --disable-echo          display "compiling" commands
681  --disable-largefile     omit support for large files
682  --with-warnings         test: turn on gcc warnings
683  --with-package=XXX      rename dialog to XXX, library to libXXX.a, etc
684  --enable-header-subdir  install dlg_XXX headers to subdirectory
685  --with-libiconv-prefix=DIR
686                          search for libiconv in DIR/include and DIR/lib
687  --enable-nls            use Native Language Support
688  --with-included-gettext use the GNU gettext library included here
689  --with-textdomain=PKG   NLS text-domain (default is package name)
690  --disable-included-msgs use included messages, for i18n support
691  --with-dmalloc          test: use Gray Watson's dmalloc library
692  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
693  --with-purify           test: use Purify
694  --with-valgrind         test: use valgrind
695  --with-no-leaks         test: free permanent memory, analyze leaks
696  --disable-trace         do not support --trace option
697  --disable-libtool-version  enable to use libtool's incompatible naming scheme
698  --with-libtool          generate libraries with libtool
699  --with-libtool-opts=XXX specify additional libtool options
700  --with-curses-dir=DIR   directory in which (n)curses is installed
701  --with-ncurses          compile/link with ncurses library
702  --with-ncursesw         compile/link with wide-char ncurses library
703  --disable-extras        do not include extra dialogs
704  --disable-rc-file       do not include config-file support
705  --disable-Xdialog       do not include Xdialog-style dialogs
706  --disable-form          do not include the form dialog
707  --disable-gauge         do not include the gauge dialogs
708  --disable-tailbox       do not include the tailbox dialog
709  --disable-mixedform     do not include the mixedform dialog
710  --disable-mixedgauge    do not include the mixedgauge dialog
711  --enable-widec          enable wide-curses features
712  --disable-rpath-hack    don't add rpath options for additional libraries
713
714Some influential environment variables:
715  CC          C compiler command
716  CFLAGS      C compiler flags
717  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
718              nonstandard directory <lib dir>
719  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
720              headers in a nonstandard directory <include dir>
721  CPP         C preprocessor
722
723Use these variables to override the choices made by `configure' or to help
724it to find libraries and programs with nonstandard names/locations.
725
726EOF
727fi
728
729if test "$ac_init_help" = "recursive"; then
730  # If there are subdirs, report their specific --help.
731  ac_popdir=`pwd`
732  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
733    cd $ac_subdir
734    # A "../" for each directory in /$ac_subdir.
735    ac_dots=`echo $ac_subdir |
736             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
737
738    case $srcdir in
739    .) # No --srcdir option.  We are building in place.
740      ac_sub_srcdir=$srcdir ;;
741    [\\/]* | ?:[\\/]* ) # Absolute path.
742      ac_sub_srcdir=$srcdir/$ac_subdir ;;
743    *) # Relative path.
744      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
745    esac
746
747    # Check for guested configure; otherwise get Cygnus style configure.
748    if test -f $ac_sub_srcdir/configure.gnu; then
749      echo
750      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
751    elif test -f $ac_sub_srcdir/configure; then
752      echo
753      $SHELL $ac_sub_srcdir/configure  --help=recursive
754    elif test -f $ac_sub_srcdir/configure.ac ||
755           test -f $ac_sub_srcdir/configure.in; then
756      echo
757      $ac_configure --help
758    else
759      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
760    fi
761    cd $ac_popdir
762  done
763fi
764
765test -n "$ac_init_help" && exit 0
766if $ac_init_version; then
767  cat <<\EOF
768
769Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
770Free Software Foundation, Inc.
771This configure script is free software; the Free Software Foundation
772gives unlimited permission to copy, distribute and modify it.
773EOF
774  exit 0
775fi
776exec 5>config.log
777cat >&5 <<EOF
778This file contains any messages produced by compilers while
779running configure, to aid debugging if configure makes a mistake.
780
781It was created by $as_me, which was
782generated by GNU Autoconf 2.52.20101002.  Invocation command line was
783
784  $ $0 $@
785
786EOF
787{
788cat <<_ASUNAME
789## ---------- ##
790## Platform.  ##
791## ---------- ##
792
793hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
794uname -m = `(uname -m) 2>/dev/null || echo unknown`
795uname -r = `(uname -r) 2>/dev/null || echo unknown`
796uname -s = `(uname -s) 2>/dev/null || echo unknown`
797uname -v = `(uname -v) 2>/dev/null || echo unknown`
798
799/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
800/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
801
802/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
803/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
804/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
805hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
806/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
807/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
808/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
809
810PATH = $PATH
811
812_ASUNAME
813} >&5
814
815cat >&5 <<EOF
816## ------------ ##
817## Core tests.  ##
818## ------------ ##
819
820EOF
821
822# Keep a trace of the command line.
823# Strip out --no-create and --no-recursion so they do not pile up.
824# Also quote any args containing shell meta-characters.
825ac_configure_args=
826ac_sep=
827for ac_arg
828do
829  case $ac_arg in
830  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
831  | --no-cr | --no-c) ;;
832  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
833  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
834  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
835    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
836    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
837    ac_sep=" " ;;
838  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
839     ac_sep=" " ;;
840  esac
841  # Get rid of the leading space.
842done
843
844# When interrupted or exit'd, cleanup temporary files, and complete
845# config.log.  We remove comments because anyway the quotes in there
846# would cause problems or look ugly.
847trap 'exit_status=$?
848  # Save into config.log some information that might help in debugging.
849  echo >&5
850  echo "## ----------------- ##" >&5
851  echo "## Cache variables.  ##" >&5
852  echo "## ----------------- ##" >&5
853  echo >&5
854  # The following way of writing the cache mishandles newlines in values,
855{
856  (set) 2>&1 |
857    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
858    *ac_space=\ *)
859      sed -n \
860        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
861    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
862      ;;
863    *)
864      sed -n \
865        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
866      ;;
867    esac;
868} >&5
869  sed "/^$/d" confdefs.h >conftest.log
870  if test -s conftest.log; then
871    echo >&5
872    echo "## ------------ ##" >&5
873    echo "## confdefs.h.  ##" >&5
874    echo "## ------------ ##" >&5
875    echo >&5
876    cat conftest.log >&5
877  fi
878  (echo; echo) >&5
879  test "$ac_signal" != 0 &&
880    echo "$as_me: caught signal $ac_signal" >&5
881  echo "$as_me: exit $exit_status" >&5
882  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
883    exit $exit_status
884     ' 0
885for ac_signal in 1 2 13 15; do
886  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
887done
888ac_signal=0
889
890# confdefs.h avoids OS command line length limits that DEFS can exceed.
891rm -rf conftest* confdefs.h
892# AIX cpp loses on an empty file, so make sure it contains at least a newline.
893echo >confdefs.h
894
895# Let the site file select an alternate cache file if it wants to.
896# Prefer explicitly selected file to automatically selected ones.
897if test -z "$CONFIG_SITE"; then
898  if test "x$prefix" != xNONE; then
899    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
900  else
901    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
902  fi
903fi
904for ac_site_file in $CONFIG_SITE; do
905  if test -r "$ac_site_file"; then
906    { echo "$as_me:906: loading site script $ac_site_file" >&5
907echo "$as_me: loading site script $ac_site_file" >&6;}
908    cat "$ac_site_file" >&5
909    . "$ac_site_file"
910  fi
911done
912
913if test -r "$cache_file"; then
914  # Some versions of bash will fail to source /dev/null (special
915  # files actually), so we avoid doing that.
916  if test -f "$cache_file"; then
917    { echo "$as_me:917: loading cache $cache_file" >&5
918echo "$as_me: loading cache $cache_file" >&6;}
919    case $cache_file in
920      [\\/]* | ?:[\\/]* ) . $cache_file;;
921      *)                      . ./$cache_file;;
922    esac
923  fi
924else
925  { echo "$as_me:925: creating cache $cache_file" >&5
926echo "$as_me: creating cache $cache_file" >&6;}
927  >$cache_file
928fi
929
930# Check that the precious variables saved in the cache have kept the same
931# value.
932ac_cache_corrupted=false
933for ac_var in `(set) 2>&1 |
934               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
935  eval ac_old_set=\$ac_cv_env_${ac_var}_set
936  eval ac_new_set=\$ac_env_${ac_var}_set
937  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
938  eval ac_new_val="\$ac_env_${ac_var}_value"
939  case $ac_old_set,$ac_new_set in
940    set,)
941      { echo "$as_me:941: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
942echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
943      ac_cache_corrupted=: ;;
944    ,set)
945      { echo "$as_me:945: error: \`$ac_var' was not set in the previous run" >&5
946echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
947      ac_cache_corrupted=: ;;
948    ,);;
949    *)
950      if test "x$ac_old_val" != "x$ac_new_val"; then
951        { echo "$as_me:951: error: \`$ac_var' has changed since the previous run:" >&5
952echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
953        { echo "$as_me:953:   former value:  $ac_old_val" >&5
954echo "$as_me:   former value:  $ac_old_val" >&2;}
955        { echo "$as_me:955:   current value: $ac_new_val" >&5
956echo "$as_me:   current value: $ac_new_val" >&2;}
957        ac_cache_corrupted=:
958      fi;;
959  esac
960  # Pass precious variables to config.status.  It doesn't matter if
961  # we pass some twice (in addition to the command line arguments).
962  if test "$ac_new_set" = set; then
963    case $ac_new_val in
964    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
965      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
966      ac_configure_args="$ac_configure_args '$ac_arg'"
967      ;;
968    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
969       ;;
970    esac
971  fi
972done
973if $ac_cache_corrupted; then
974  { echo "$as_me:974: error: changes in the environment can compromise the build" >&5
975echo "$as_me: error: changes in the environment can compromise the build" >&2;}
976  { { echo "$as_me:976: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
977echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
978   { (exit 1); exit 1; }; }
979fi
980
981ac_ext=c
982ac_cpp='$CPP $CPPFLAGS'
983ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
984ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
985ac_compiler_gnu=$ac_cv_c_compiler_gnu
986ac_main_return=return
987
988case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
989  *c*,-n*) ECHO_N= ECHO_C='
990' ECHO_T='	' ;;
991  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
992  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
993esac
994echo "#! $SHELL" >conftest.sh
995echo  "exit 0"   >>conftest.sh
996chmod +x conftest.sh
997if { (echo "$as_me:997: PATH=\".;.\"; conftest.sh") >&5
998  (PATH=".;."; conftest.sh) 2>&5
999  ac_status=$?
1000  echo "$as_me:1000: \$? = $ac_status" >&5
1001  (exit $ac_status); }; then
1002  ac_path_separator=';'
1003else
1004  ac_path_separator=:
1005fi
1006PATH_SEPARATOR="$ac_path_separator"
1007rm -f conftest.sh
1008
1009ac_config_headers="$ac_config_headers dlg_config.h:config.hin"
1010
1011test "$program_prefix" != NONE &&
1012  program_transform_name="s,^,$program_prefix,;$program_transform_name"
1013# Use a double $ so make ignores it.
1014test "$program_suffix" != NONE &&
1015  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1016# Double any \ or $.  echo might interpret backslashes.
1017# By default was `s,x,x', remove it if useless.
1018cat <<\_ACEOF >conftest.sed
1019s/[\\$]/&&/g;s/;s,x,x,$//
1020_ACEOF
1021program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1022rm conftest.sed
1023
1024DESTDIR=
1025
1026ac_ext=c
1027ac_cpp='$CPP $CPPFLAGS'
1028ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1029ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1030ac_compiler_gnu=$ac_cv_c_compiler_gnu
1031ac_main_return=return
1032if test -n "$ac_tool_prefix"; then
1033  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1034set dummy ${ac_tool_prefix}gcc; ac_word=$2
1035echo "$as_me:1035: checking for $ac_word" >&5
1036echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1037if test "${ac_cv_prog_CC+set}" = set; then
1038  echo $ECHO_N "(cached) $ECHO_C" >&6
1039else
1040  if test -n "$CC"; then
1041  ac_cv_prog_CC="$CC" # Let the user override the test.
1042else
1043  ac_save_IFS=$IFS; IFS=$ac_path_separator
1044ac_dummy="$PATH"
1045for ac_dir in $ac_dummy; do
1046  IFS=$ac_save_IFS
1047  test -z "$ac_dir" && ac_dir=.
1048  $as_executable_p "$ac_dir/$ac_word" || continue
1049ac_cv_prog_CC="${ac_tool_prefix}gcc"
1050echo "$as_me:1050: found $ac_dir/$ac_word" >&5
1051break
1052done
1053
1054fi
1055fi
1056CC=$ac_cv_prog_CC
1057if test -n "$CC"; then
1058  echo "$as_me:1058: result: $CC" >&5
1059echo "${ECHO_T}$CC" >&6
1060else
1061  echo "$as_me:1061: result: no" >&5
1062echo "${ECHO_T}no" >&6
1063fi
1064
1065fi
1066if test -z "$ac_cv_prog_CC"; then
1067  ac_ct_CC=$CC
1068  # Extract the first word of "gcc", so it can be a program name with args.
1069set dummy gcc; ac_word=$2
1070echo "$as_me:1070: checking for $ac_word" >&5
1071echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1072if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1073  echo $ECHO_N "(cached) $ECHO_C" >&6
1074else
1075  if test -n "$ac_ct_CC"; then
1076  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1077else
1078  ac_save_IFS=$IFS; IFS=$ac_path_separator
1079ac_dummy="$PATH"
1080for ac_dir in $ac_dummy; do
1081  IFS=$ac_save_IFS
1082  test -z "$ac_dir" && ac_dir=.
1083  $as_executable_p "$ac_dir/$ac_word" || continue
1084ac_cv_prog_ac_ct_CC="gcc"
1085echo "$as_me:1085: found $ac_dir/$ac_word" >&5
1086break
1087done
1088
1089fi
1090fi
1091ac_ct_CC=$ac_cv_prog_ac_ct_CC
1092if test -n "$ac_ct_CC"; then
1093  echo "$as_me:1093: result: $ac_ct_CC" >&5
1094echo "${ECHO_T}$ac_ct_CC" >&6
1095else
1096  echo "$as_me:1096: result: no" >&5
1097echo "${ECHO_T}no" >&6
1098fi
1099
1100  CC=$ac_ct_CC
1101else
1102  CC="$ac_cv_prog_CC"
1103fi
1104
1105if test -z "$CC"; then
1106  if test -n "$ac_tool_prefix"; then
1107  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1108set dummy ${ac_tool_prefix}cc; ac_word=$2
1109echo "$as_me:1109: checking for $ac_word" >&5
1110echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1111if test "${ac_cv_prog_CC+set}" = set; then
1112  echo $ECHO_N "(cached) $ECHO_C" >&6
1113else
1114  if test -n "$CC"; then
1115  ac_cv_prog_CC="$CC" # Let the user override the test.
1116else
1117  ac_save_IFS=$IFS; IFS=$ac_path_separator
1118ac_dummy="$PATH"
1119for ac_dir in $ac_dummy; do
1120  IFS=$ac_save_IFS
1121  test -z "$ac_dir" && ac_dir=.
1122  $as_executable_p "$ac_dir/$ac_word" || continue
1123ac_cv_prog_CC="${ac_tool_prefix}cc"
1124echo "$as_me:1124: found $ac_dir/$ac_word" >&5
1125break
1126done
1127
1128fi
1129fi
1130CC=$ac_cv_prog_CC
1131if test -n "$CC"; then
1132  echo "$as_me:1132: result: $CC" >&5
1133echo "${ECHO_T}$CC" >&6
1134else
1135  echo "$as_me:1135: result: no" >&5
1136echo "${ECHO_T}no" >&6
1137fi
1138
1139fi
1140if test -z "$ac_cv_prog_CC"; then
1141  ac_ct_CC=$CC
1142  # Extract the first word of "cc", so it can be a program name with args.
1143set dummy cc; ac_word=$2
1144echo "$as_me:1144: checking for $ac_word" >&5
1145echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1146if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1147  echo $ECHO_N "(cached) $ECHO_C" >&6
1148else
1149  if test -n "$ac_ct_CC"; then
1150  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1151else
1152  ac_save_IFS=$IFS; IFS=$ac_path_separator
1153ac_dummy="$PATH"
1154for ac_dir in $ac_dummy; do
1155  IFS=$ac_save_IFS
1156  test -z "$ac_dir" && ac_dir=.
1157  $as_executable_p "$ac_dir/$ac_word" || continue
1158ac_cv_prog_ac_ct_CC="cc"
1159echo "$as_me:1159: found $ac_dir/$ac_word" >&5
1160break
1161done
1162
1163fi
1164fi
1165ac_ct_CC=$ac_cv_prog_ac_ct_CC
1166if test -n "$ac_ct_CC"; then
1167  echo "$as_me:1167: result: $ac_ct_CC" >&5
1168echo "${ECHO_T}$ac_ct_CC" >&6
1169else
1170  echo "$as_me:1170: result: no" >&5
1171echo "${ECHO_T}no" >&6
1172fi
1173
1174  CC=$ac_ct_CC
1175else
1176  CC="$ac_cv_prog_CC"
1177fi
1178
1179fi
1180if test -z "$CC"; then
1181  # Extract the first word of "cc", so it can be a program name with args.
1182set dummy cc; ac_word=$2
1183echo "$as_me:1183: checking for $ac_word" >&5
1184echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1185if test "${ac_cv_prog_CC+set}" = set; then
1186  echo $ECHO_N "(cached) $ECHO_C" >&6
1187else
1188  if test -n "$CC"; then
1189  ac_cv_prog_CC="$CC" # Let the user override the test.
1190else
1191  ac_prog_rejected=no
1192  ac_save_IFS=$IFS; IFS=$ac_path_separator
1193ac_dummy="$PATH"
1194for ac_dir in $ac_dummy; do
1195  IFS=$ac_save_IFS
1196  test -z "$ac_dir" && ac_dir=.
1197  $as_executable_p "$ac_dir/$ac_word" || continue
1198if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1199  ac_prog_rejected=yes
1200  continue
1201fi
1202ac_cv_prog_CC="cc"
1203echo "$as_me:1203: found $ac_dir/$ac_word" >&5
1204break
1205done
1206
1207if test $ac_prog_rejected = yes; then
1208  # We found a bogon in the path, so make sure we never use it.
1209  set dummy $ac_cv_prog_CC
1210  shift
1211  if test $# != 0; then
1212    # We chose a different compiler from the bogus one.
1213    # However, it has the same basename, so the bogon will be chosen
1214    # first if we set CC to just the basename; use the full file name.
1215    shift
1216    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1217    shift
1218    ac_cv_prog_CC="$@"
1219  fi
1220fi
1221fi
1222fi
1223CC=$ac_cv_prog_CC
1224if test -n "$CC"; then
1225  echo "$as_me:1225: result: $CC" >&5
1226echo "${ECHO_T}$CC" >&6
1227else
1228  echo "$as_me:1228: result: no" >&5
1229echo "${ECHO_T}no" >&6
1230fi
1231
1232fi
1233if test -z "$CC"; then
1234  if test -n "$ac_tool_prefix"; then
1235  for ac_prog in cl
1236  do
1237    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1238set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1239echo "$as_me:1239: checking for $ac_word" >&5
1240echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1241if test "${ac_cv_prog_CC+set}" = set; then
1242  echo $ECHO_N "(cached) $ECHO_C" >&6
1243else
1244  if test -n "$CC"; then
1245  ac_cv_prog_CC="$CC" # Let the user override the test.
1246else
1247  ac_save_IFS=$IFS; IFS=$ac_path_separator
1248ac_dummy="$PATH"
1249for ac_dir in $ac_dummy; do
1250  IFS=$ac_save_IFS
1251  test -z "$ac_dir" && ac_dir=.
1252  $as_executable_p "$ac_dir/$ac_word" || continue
1253ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1254echo "$as_me:1254: found $ac_dir/$ac_word" >&5
1255break
1256done
1257
1258fi
1259fi
1260CC=$ac_cv_prog_CC
1261if test -n "$CC"; then
1262  echo "$as_me:1262: result: $CC" >&5
1263echo "${ECHO_T}$CC" >&6
1264else
1265  echo "$as_me:1265: result: no" >&5
1266echo "${ECHO_T}no" >&6
1267fi
1268
1269    test -n "$CC" && break
1270  done
1271fi
1272if test -z "$CC"; then
1273  ac_ct_CC=$CC
1274  for ac_prog in cl
1275do
1276  # Extract the first word of "$ac_prog", so it can be a program name with args.
1277set dummy $ac_prog; 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="$ac_prog"
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  test -n "$ac_ct_CC" && break
1309done
1310
1311  CC=$ac_ct_CC
1312fi
1313
1314fi
1315
1316test -z "$CC" && { { echo "$as_me:1316: error: no acceptable cc found in \$PATH" >&5
1317echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1318   { (exit 1); exit 1; }; }
1319
1320# Provide some information about the compiler.
1321echo "$as_me:1321:" \
1322     "checking for C compiler version" >&5
1323ac_compiler=`set X $ac_compile; echo $2`
1324{ (eval echo "$as_me:1324: \"$ac_compiler --version </dev/null >&5\"") >&5
1325  (eval $ac_compiler --version </dev/null >&5) 2>&5
1326  ac_status=$?
1327  echo "$as_me:1327: \$? = $ac_status" >&5
1328  (exit $ac_status); }
1329{ (eval echo "$as_me:1329: \"$ac_compiler -v </dev/null >&5\"") >&5
1330  (eval $ac_compiler -v </dev/null >&5) 2>&5
1331  ac_status=$?
1332  echo "$as_me:1332: \$? = $ac_status" >&5
1333  (exit $ac_status); }
1334{ (eval echo "$as_me:1334: \"$ac_compiler -V </dev/null >&5\"") >&5
1335  (eval $ac_compiler -V </dev/null >&5) 2>&5
1336  ac_status=$?
1337  echo "$as_me:1337: \$? = $ac_status" >&5
1338  (exit $ac_status); }
1339
1340cat >conftest.$ac_ext <<_ACEOF
1341#line 1341 "configure"
1342#include "confdefs.h"
1343
1344int
1345main ()
1346{
1347
1348  ;
1349  return 0;
1350}
1351_ACEOF
1352ac_clean_files_save=$ac_clean_files
1353ac_clean_files="$ac_clean_files a.out a.exe"
1354# Try to create an executable without -o first, disregard a.out.
1355# It will help us diagnose broken compilers, and finding out an intuition
1356# of exeext.
1357echo "$as_me:1357: checking for C compiler default output" >&5
1358echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1359ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1360if { (eval echo "$as_me:1360: \"$ac_link_default\"") >&5
1361  (eval $ac_link_default) 2>&5
1362  ac_status=$?
1363  echo "$as_me:1363: \$? = $ac_status" >&5
1364  (exit $ac_status); }; then
1365  # Find the output, starting from the most likely.  This scheme is
1366# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1367# resort.
1368for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1369                ls a.out conftest 2>/dev/null;
1370                ls a.* conftest.* 2>/dev/null`; do
1371  case $ac_file in
1372    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1373    a.out ) # We found the default executable, but exeext='' is most
1374            # certainly right.
1375            break;;
1376    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1377          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1378          export ac_cv_exeext
1379          break;;
1380    * ) break;;
1381  esac
1382done
1383else
1384  echo "$as_me: failed program was:" >&5
1385cat conftest.$ac_ext >&5
1386{ { echo "$as_me:1386: error: C compiler cannot create executables" >&5
1387echo "$as_me: error: C compiler cannot create executables" >&2;}
1388   { (exit 77); exit 77; }; }
1389fi
1390
1391ac_exeext=$ac_cv_exeext
1392echo "$as_me:1392: result: $ac_file" >&5
1393echo "${ECHO_T}$ac_file" >&6
1394
1395# Check the compiler produces executables we can run.  If not, either
1396# the compiler is broken, or we cross compile.
1397echo "$as_me:1397: checking whether the C compiler works" >&5
1398echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1399# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1400# If not cross compiling, check that we can run a simple program.
1401if test "$cross_compiling" != yes; then
1402  if { ac_try='./$ac_file'
1403  { (eval echo "$as_me:1403: \"$ac_try\"") >&5
1404  (eval $ac_try) 2>&5
1405  ac_status=$?
1406  echo "$as_me:1406: \$? = $ac_status" >&5
1407  (exit $ac_status); }; }; then
1408    cross_compiling=no
1409  else
1410    if test "$cross_compiling" = maybe; then
1411	cross_compiling=yes
1412    else
1413	{ { echo "$as_me:1413: error: cannot run C compiled programs.
1414If you meant to cross compile, use \`--host'." >&5
1415echo "$as_me: error: cannot run C compiled programs.
1416If you meant to cross compile, use \`--host'." >&2;}
1417   { (exit 1); exit 1; }; }
1418    fi
1419  fi
1420fi
1421echo "$as_me:1421: result: yes" >&5
1422echo "${ECHO_T}yes" >&6
1423
1424rm -f a.out a.exe conftest$ac_cv_exeext
1425ac_clean_files=$ac_clean_files_save
1426# Check the compiler produces executables we can run.  If not, either
1427# the compiler is broken, or we cross compile.
1428echo "$as_me:1428: checking whether we are cross compiling" >&5
1429echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1430echo "$as_me:1430: result: $cross_compiling" >&5
1431echo "${ECHO_T}$cross_compiling" >&6
1432
1433echo "$as_me:1433: checking for executable suffix" >&5
1434echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1435if { (eval echo "$as_me:1435: \"$ac_link\"") >&5
1436  (eval $ac_link) 2>&5
1437  ac_status=$?
1438  echo "$as_me:1438: \$? = $ac_status" >&5
1439  (exit $ac_status); }; then
1440  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1441# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1442# work properly (i.e., refer to `conftest.exe'), while it won't with
1443# `rm'.
1444for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1445  case $ac_file in
1446    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1447    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1448          export ac_cv_exeext
1449          break;;
1450    * ) break;;
1451  esac
1452done
1453else
1454  { { echo "$as_me:1454: error: cannot compute EXEEXT: cannot compile and link" >&5
1455echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1456   { (exit 1); exit 1; }; }
1457fi
1458
1459rm -f conftest$ac_cv_exeext
1460echo "$as_me:1460: result: $ac_cv_exeext" >&5
1461echo "${ECHO_T}$ac_cv_exeext" >&6
1462
1463rm -f conftest.$ac_ext
1464EXEEXT=$ac_cv_exeext
1465ac_exeext=$EXEEXT
1466echo "$as_me:1466: checking for object suffix" >&5
1467echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1468if test "${ac_cv_objext+set}" = set; then
1469  echo $ECHO_N "(cached) $ECHO_C" >&6
1470else
1471  cat >conftest.$ac_ext <<_ACEOF
1472#line 1472 "configure"
1473#include "confdefs.h"
1474
1475int
1476main ()
1477{
1478
1479  ;
1480  return 0;
1481}
1482_ACEOF
1483rm -f conftest.o conftest.obj
1484if { (eval echo "$as_me:1484: \"$ac_compile\"") >&5
1485  (eval $ac_compile) 2>&5
1486  ac_status=$?
1487  echo "$as_me:1487: \$? = $ac_status" >&5
1488  (exit $ac_status); }; then
1489  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1490  case $ac_file in
1491    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1492    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1493       break;;
1494  esac
1495done
1496else
1497  echo "$as_me: failed program was:" >&5
1498cat conftest.$ac_ext >&5
1499{ { echo "$as_me:1499: error: cannot compute OBJEXT: cannot compile" >&5
1500echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1501   { (exit 1); exit 1; }; }
1502fi
1503
1504rm -f conftest.$ac_cv_objext conftest.$ac_ext
1505fi
1506echo "$as_me:1506: result: $ac_cv_objext" >&5
1507echo "${ECHO_T}$ac_cv_objext" >&6
1508OBJEXT=$ac_cv_objext
1509ac_objext=$OBJEXT
1510echo "$as_me:1510: checking whether we are using the GNU C compiler" >&5
1511echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1512if test "${ac_cv_c_compiler_gnu+set}" = set; then
1513  echo $ECHO_N "(cached) $ECHO_C" >&6
1514else
1515  cat >conftest.$ac_ext <<_ACEOF
1516#line 1516 "configure"
1517#include "confdefs.h"
1518
1519int
1520main ()
1521{
1522#ifndef __GNUC__
1523       choke me
1524#endif
1525
1526  ;
1527  return 0;
1528}
1529_ACEOF
1530rm -f conftest.$ac_objext
1531if { (eval echo "$as_me:1531: \"$ac_compile\"") >&5
1532  (eval $ac_compile) 2>&5
1533  ac_status=$?
1534  echo "$as_me:1534: \$? = $ac_status" >&5
1535  (exit $ac_status); } &&
1536         { ac_try='test -s conftest.$ac_objext'
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  ac_compiler_gnu=yes
1543else
1544  echo "$as_me: failed program was:" >&5
1545cat conftest.$ac_ext >&5
1546ac_compiler_gnu=no
1547fi
1548rm -f conftest.$ac_objext conftest.$ac_ext
1549ac_cv_c_compiler_gnu=$ac_compiler_gnu
1550
1551fi
1552echo "$as_me:1552: result: $ac_cv_c_compiler_gnu" >&5
1553echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1554GCC=`test $ac_compiler_gnu = yes && echo yes`
1555ac_test_CFLAGS=${CFLAGS+set}
1556ac_save_CFLAGS=$CFLAGS
1557CFLAGS="-g"
1558echo "$as_me:1558: checking whether $CC accepts -g" >&5
1559echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1560if test "${ac_cv_prog_cc_g+set}" = set; then
1561  echo $ECHO_N "(cached) $ECHO_C" >&6
1562else
1563  cat >conftest.$ac_ext <<_ACEOF
1564#line 1564 "configure"
1565#include "confdefs.h"
1566
1567int
1568main ()
1569{
1570
1571  ;
1572  return 0;
1573}
1574_ACEOF
1575rm -f conftest.$ac_objext
1576if { (eval echo "$as_me:1576: \"$ac_compile\"") >&5
1577  (eval $ac_compile) 2>&5
1578  ac_status=$?
1579  echo "$as_me:1579: \$? = $ac_status" >&5
1580  (exit $ac_status); } &&
1581         { ac_try='test -s conftest.$ac_objext'
1582  { (eval echo "$as_me:1582: \"$ac_try\"") >&5
1583  (eval $ac_try) 2>&5
1584  ac_status=$?
1585  echo "$as_me:1585: \$? = $ac_status" >&5
1586  (exit $ac_status); }; }; then
1587  ac_cv_prog_cc_g=yes
1588else
1589  echo "$as_me: failed program was:" >&5
1590cat conftest.$ac_ext >&5
1591ac_cv_prog_cc_g=no
1592fi
1593rm -f conftest.$ac_objext conftest.$ac_ext
1594fi
1595echo "$as_me:1595: result: $ac_cv_prog_cc_g" >&5
1596echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1597if test "$ac_test_CFLAGS" = set; then
1598  CFLAGS=$ac_save_CFLAGS
1599elif test $ac_cv_prog_cc_g = yes; then
1600  if test "$GCC" = yes; then
1601    CFLAGS="-g -O2"
1602  else
1603    CFLAGS="-g"
1604  fi
1605else
1606  if test "$GCC" = yes; then
1607    CFLAGS="-O2"
1608  else
1609    CFLAGS=
1610  fi
1611fi
1612# Some people use a C++ compiler to compile C.  Since we use `exit',
1613# in C++ we need to declare it.  In case someone uses the same compiler
1614# for both compiling C and C++ we need to have the C++ compiler decide
1615# the declaration of exit, since it's the most demanding environment.
1616cat >conftest.$ac_ext <<_ACEOF
1617#ifndef __cplusplus
1618  choke me
1619#endif
1620_ACEOF
1621rm -f conftest.$ac_objext
1622if { (eval echo "$as_me:1622: \"$ac_compile\"") >&5
1623  (eval $ac_compile) 2>&5
1624  ac_status=$?
1625  echo "$as_me:1625: \$? = $ac_status" >&5
1626  (exit $ac_status); } &&
1627         { ac_try='test -s conftest.$ac_objext'
1628  { (eval echo "$as_me:1628: \"$ac_try\"") >&5
1629  (eval $ac_try) 2>&5
1630  ac_status=$?
1631  echo "$as_me:1631: \$? = $ac_status" >&5
1632  (exit $ac_status); }; }; then
1633  for ac_declaration in \
1634   ''\
1635   '#include <stdlib.h>' \
1636   'extern "C" void std::exit (int) throw (); using std::exit;' \
1637   'extern "C" void std::exit (int); using std::exit;' \
1638   'extern "C" void exit (int) throw ();' \
1639   'extern "C" void exit (int);' \
1640   'void exit (int);'
1641do
1642  cat >conftest.$ac_ext <<_ACEOF
1643#line 1643 "configure"
1644#include "confdefs.h"
1645#include <stdlib.h>
1646$ac_declaration
1647int
1648main ()
1649{
1650exit (42);
1651  ;
1652  return 0;
1653}
1654_ACEOF
1655rm -f conftest.$ac_objext
1656if { (eval echo "$as_me:1656: \"$ac_compile\"") >&5
1657  (eval $ac_compile) 2>&5
1658  ac_status=$?
1659  echo "$as_me:1659: \$? = $ac_status" >&5
1660  (exit $ac_status); } &&
1661         { ac_try='test -s conftest.$ac_objext'
1662  { (eval echo "$as_me:1662: \"$ac_try\"") >&5
1663  (eval $ac_try) 2>&5
1664  ac_status=$?
1665  echo "$as_me:1665: \$? = $ac_status" >&5
1666  (exit $ac_status); }; }; then
1667  :
1668else
1669  echo "$as_me: failed program was:" >&5
1670cat conftest.$ac_ext >&5
1671continue
1672fi
1673rm -f conftest.$ac_objext conftest.$ac_ext
1674  cat >conftest.$ac_ext <<_ACEOF
1675#line 1675 "configure"
1676#include "confdefs.h"
1677$ac_declaration
1678int
1679main ()
1680{
1681exit (42);
1682  ;
1683  return 0;
1684}
1685_ACEOF
1686rm -f conftest.$ac_objext
1687if { (eval echo "$as_me:1687: \"$ac_compile\"") >&5
1688  (eval $ac_compile) 2>&5
1689  ac_status=$?
1690  echo "$as_me:1690: \$? = $ac_status" >&5
1691  (exit $ac_status); } &&
1692         { ac_try='test -s conftest.$ac_objext'
1693  { (eval echo "$as_me:1693: \"$ac_try\"") >&5
1694  (eval $ac_try) 2>&5
1695  ac_status=$?
1696  echo "$as_me:1696: \$? = $ac_status" >&5
1697  (exit $ac_status); }; }; then
1698  break
1699else
1700  echo "$as_me: failed program was:" >&5
1701cat conftest.$ac_ext >&5
1702fi
1703rm -f conftest.$ac_objext conftest.$ac_ext
1704done
1705rm -rf conftest*
1706if test -n "$ac_declaration"; then
1707  echo '#ifdef __cplusplus' >>confdefs.h
1708  echo $ac_declaration      >>confdefs.h
1709  echo '#endif'             >>confdefs.h
1710fi
1711
1712else
1713  echo "$as_me: failed program was:" >&5
1714cat conftest.$ac_ext >&5
1715fi
1716rm -f conftest.$ac_objext conftest.$ac_ext
1717ac_ext=c
1718ac_cpp='$CPP $CPPFLAGS'
1719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1721ac_compiler_gnu=$ac_cv_c_compiler_gnu
1722ac_main_return=return
1723
1724ac_ext=c
1725ac_cpp='$CPP $CPPFLAGS'
1726ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1727ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1728ac_compiler_gnu=$ac_cv_c_compiler_gnu
1729ac_main_return=return
1730echo "$as_me:1730: checking how to run the C preprocessor" >&5
1731echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1732# On Suns, sometimes $CPP names a directory.
1733if test -n "$CPP" && test -d "$CPP"; then
1734  CPP=
1735fi
1736if test -z "$CPP"; then
1737  if test "${ac_cv_prog_CPP+set}" = set; then
1738  echo $ECHO_N "(cached) $ECHO_C" >&6
1739else
1740      # Double quotes because CPP needs to be expanded
1741    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1742    do
1743      ac_preproc_ok=false
1744for ac_c_preproc_warn_flag in '' yes
1745do
1746  # Use a header file that comes with gcc, so configuring glibc
1747  # with a fresh cross-compiler works.
1748  # On the NeXT, cc -E runs the code through the compiler's parser,
1749  # not just through cpp. "Syntax error" is here to catch this case.
1750  cat >conftest.$ac_ext <<_ACEOF
1751#line 1751 "configure"
1752#include "confdefs.h"
1753#include <assert.h>
1754                     Syntax error
1755_ACEOF
1756if { (eval echo "$as_me:1756: \"$ac_cpp conftest.$ac_ext\"") >&5
1757  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1758  ac_status=$?
1759  egrep -v '^ *\+' conftest.er1 >conftest.err
1760  rm -f conftest.er1
1761  cat conftest.err >&5
1762  echo "$as_me:1762: \$? = $ac_status" >&5
1763  (exit $ac_status); } >/dev/null; then
1764  if test -s conftest.err; then
1765    ac_cpp_err=$ac_c_preproc_warn_flag
1766  else
1767    ac_cpp_err=
1768  fi
1769else
1770  ac_cpp_err=yes
1771fi
1772if test -z "$ac_cpp_err"; then
1773  :
1774else
1775  echo "$as_me: failed program was:" >&5
1776  cat conftest.$ac_ext >&5
1777  # Broken: fails on valid input.
1778continue
1779fi
1780rm -f conftest.err conftest.$ac_ext
1781
1782  # OK, works on sane cases.  Now check whether non-existent headers
1783  # can be detected and how.
1784  cat >conftest.$ac_ext <<_ACEOF
1785#line 1785 "configure"
1786#include "confdefs.h"
1787#include <ac_nonexistent.h>
1788_ACEOF
1789if { (eval echo "$as_me:1789: \"$ac_cpp conftest.$ac_ext\"") >&5
1790  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1791  ac_status=$?
1792  egrep -v '^ *\+' conftest.er1 >conftest.err
1793  rm -f conftest.er1
1794  cat conftest.err >&5
1795  echo "$as_me:1795: \$? = $ac_status" >&5
1796  (exit $ac_status); } >/dev/null; then
1797  if test -s conftest.err; then
1798    ac_cpp_err=$ac_c_preproc_warn_flag
1799  else
1800    ac_cpp_err=
1801  fi
1802else
1803  ac_cpp_err=yes
1804fi
1805if test -z "$ac_cpp_err"; then
1806  # Broken: success on invalid input.
1807continue
1808else
1809  echo "$as_me: failed program was:" >&5
1810  cat conftest.$ac_ext >&5
1811  # Passes both tests.
1812ac_preproc_ok=:
1813break
1814fi
1815rm -f conftest.err conftest.$ac_ext
1816
1817done
1818# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1819rm -f conftest.err conftest.$ac_ext
1820if $ac_preproc_ok; then
1821  break
1822fi
1823
1824    done
1825    ac_cv_prog_CPP=$CPP
1826
1827fi
1828  CPP=$ac_cv_prog_CPP
1829else
1830  ac_cv_prog_CPP=$CPP
1831fi
1832echo "$as_me:1832: result: $CPP" >&5
1833echo "${ECHO_T}$CPP" >&6
1834ac_preproc_ok=false
1835for ac_c_preproc_warn_flag in '' yes
1836do
1837  # Use a header file that comes with gcc, so configuring glibc
1838  # with a fresh cross-compiler works.
1839  # On the NeXT, cc -E runs the code through the compiler's parser,
1840  # not just through cpp. "Syntax error" is here to catch this case.
1841  cat >conftest.$ac_ext <<_ACEOF
1842#line 1842 "configure"
1843#include "confdefs.h"
1844#include <assert.h>
1845                     Syntax error
1846_ACEOF
1847if { (eval echo "$as_me:1847: \"$ac_cpp conftest.$ac_ext\"") >&5
1848  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1849  ac_status=$?
1850  egrep -v '^ *\+' conftest.er1 >conftest.err
1851  rm -f conftest.er1
1852  cat conftest.err >&5
1853  echo "$as_me:1853: \$? = $ac_status" >&5
1854  (exit $ac_status); } >/dev/null; then
1855  if test -s conftest.err; then
1856    ac_cpp_err=$ac_c_preproc_warn_flag
1857  else
1858    ac_cpp_err=
1859  fi
1860else
1861  ac_cpp_err=yes
1862fi
1863if test -z "$ac_cpp_err"; then
1864  :
1865else
1866  echo "$as_me: failed program was:" >&5
1867  cat conftest.$ac_ext >&5
1868  # Broken: fails on valid input.
1869continue
1870fi
1871rm -f conftest.err conftest.$ac_ext
1872
1873  # OK, works on sane cases.  Now check whether non-existent headers
1874  # can be detected and how.
1875  cat >conftest.$ac_ext <<_ACEOF
1876#line 1876 "configure"
1877#include "confdefs.h"
1878#include <ac_nonexistent.h>
1879_ACEOF
1880if { (eval echo "$as_me:1880: \"$ac_cpp conftest.$ac_ext\"") >&5
1881  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1882  ac_status=$?
1883  egrep -v '^ *\+' conftest.er1 >conftest.err
1884  rm -f conftest.er1
1885  cat conftest.err >&5
1886  echo "$as_me:1886: \$? = $ac_status" >&5
1887  (exit $ac_status); } >/dev/null; then
1888  if test -s conftest.err; then
1889    ac_cpp_err=$ac_c_preproc_warn_flag
1890  else
1891    ac_cpp_err=
1892  fi
1893else
1894  ac_cpp_err=yes
1895fi
1896if test -z "$ac_cpp_err"; then
1897  # Broken: success on invalid input.
1898continue
1899else
1900  echo "$as_me: failed program was:" >&5
1901  cat conftest.$ac_ext >&5
1902  # Passes both tests.
1903ac_preproc_ok=:
1904break
1905fi
1906rm -f conftest.err conftest.$ac_ext
1907
1908done
1909# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1910rm -f conftest.err conftest.$ac_ext
1911if $ac_preproc_ok; then
1912  :
1913else
1914  { { echo "$as_me:1914: error: C preprocessor \"$CPP\" fails sanity check" >&5
1915echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
1916   { (exit 1); exit 1; }; }
1917fi
1918
1919ac_ext=c
1920ac_cpp='$CPP $CPPFLAGS'
1921ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1922ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1923ac_compiler_gnu=$ac_cv_c_compiler_gnu
1924ac_main_return=return
1925
1926if test $ac_cv_c_compiler_gnu = yes; then
1927    echo "$as_me:1927: checking whether $CC needs -traditional" >&5
1928echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
1929if test "${ac_cv_prog_gcc_traditional+set}" = set; then
1930  echo $ECHO_N "(cached) $ECHO_C" >&6
1931else
1932    ac_pattern="Autoconf.*'x'"
1933  cat >conftest.$ac_ext <<_ACEOF
1934#line 1934 "configure"
1935#include "confdefs.h"
1936#include <sgtty.h>
1937int Autoconf = TIOCGETP;
1938_ACEOF
1939if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1940  egrep "$ac_pattern" >/dev/null 2>&1; then
1941  ac_cv_prog_gcc_traditional=yes
1942else
1943  ac_cv_prog_gcc_traditional=no
1944fi
1945rm -rf conftest*
1946
1947  if test $ac_cv_prog_gcc_traditional = no; then
1948    cat >conftest.$ac_ext <<_ACEOF
1949#line 1949 "configure"
1950#include "confdefs.h"
1951#include <termio.h>
1952int Autoconf = TCGETA;
1953_ACEOF
1954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1955  egrep "$ac_pattern" >/dev/null 2>&1; then
1956  ac_cv_prog_gcc_traditional=yes
1957fi
1958rm -rf conftest*
1959
1960  fi
1961fi
1962echo "$as_me:1962: result: $ac_cv_prog_gcc_traditional" >&5
1963echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
1964  if test $ac_cv_prog_gcc_traditional = yes; then
1965    CC="$CC -traditional"
1966  fi
1967fi
1968
1969echo "$as_me:1969: checking whether ${MAKE-make} sets \${MAKE}" >&5
1970echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1971set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1972if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1973  echo $ECHO_N "(cached) $ECHO_C" >&6
1974else
1975  cat >conftest.make <<\EOF
1976all:
1977	@echo 'ac_maketemp="${MAKE}"'
1978EOF
1979# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1980eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1981if test -n "$ac_maketemp"; then
1982  eval ac_cv_prog_make_${ac_make}_set=yes
1983else
1984  eval ac_cv_prog_make_${ac_make}_set=no
1985fi
1986rm -f conftest.make
1987fi
1988if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1989  echo "$as_me:1989: result: yes" >&5
1990echo "${ECHO_T}yes" >&6
1991  SET_MAKE=
1992else
1993  echo "$as_me:1993: result: no" >&5
1994echo "${ECHO_T}no" >&6
1995  SET_MAKE="MAKE=${MAKE-make}"
1996fi
1997
1998if test -n "$ac_tool_prefix"; then
1999  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2000set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2001echo "$as_me:2001: checking for $ac_word" >&5
2002echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2003if test "${ac_cv_prog_RANLIB+set}" = set; then
2004  echo $ECHO_N "(cached) $ECHO_C" >&6
2005else
2006  if test -n "$RANLIB"; then
2007  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2008else
2009  ac_save_IFS=$IFS; IFS=$ac_path_separator
2010ac_dummy="$PATH"
2011for ac_dir in $ac_dummy; do
2012  IFS=$ac_save_IFS
2013  test -z "$ac_dir" && ac_dir=.
2014  $as_executable_p "$ac_dir/$ac_word" || continue
2015ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2016echo "$as_me:2016: found $ac_dir/$ac_word" >&5
2017break
2018done
2019
2020fi
2021fi
2022RANLIB=$ac_cv_prog_RANLIB
2023if test -n "$RANLIB"; then
2024  echo "$as_me:2024: result: $RANLIB" >&5
2025echo "${ECHO_T}$RANLIB" >&6
2026else
2027  echo "$as_me:2027: result: no" >&5
2028echo "${ECHO_T}no" >&6
2029fi
2030
2031fi
2032if test -z "$ac_cv_prog_RANLIB"; then
2033  ac_ct_RANLIB=$RANLIB
2034  # Extract the first word of "ranlib", so it can be a program name with args.
2035set dummy ranlib; ac_word=$2
2036echo "$as_me:2036: checking for $ac_word" >&5
2037echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2038if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2039  echo $ECHO_N "(cached) $ECHO_C" >&6
2040else
2041  if test -n "$ac_ct_RANLIB"; then
2042  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2043else
2044  ac_save_IFS=$IFS; IFS=$ac_path_separator
2045ac_dummy="$PATH"
2046for ac_dir in $ac_dummy; do
2047  IFS=$ac_save_IFS
2048  test -z "$ac_dir" && ac_dir=.
2049  $as_executable_p "$ac_dir/$ac_word" || continue
2050ac_cv_prog_ac_ct_RANLIB="ranlib"
2051echo "$as_me:2051: found $ac_dir/$ac_word" >&5
2052break
2053done
2054
2055  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2056fi
2057fi
2058ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2059if test -n "$ac_ct_RANLIB"; then
2060  echo "$as_me:2060: result: $ac_ct_RANLIB" >&5
2061echo "${ECHO_T}$ac_ct_RANLIB" >&6
2062else
2063  echo "$as_me:2063: result: no" >&5
2064echo "${ECHO_T}no" >&6
2065fi
2066
2067  RANLIB=$ac_ct_RANLIB
2068else
2069  RANLIB="$ac_cv_prog_RANLIB"
2070fi
2071
2072ac_aux_dir=
2073for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2074  if test -f $ac_dir/install-sh; then
2075    ac_aux_dir=$ac_dir
2076    ac_install_sh="$ac_aux_dir/install-sh -c"
2077    break
2078  elif test -f $ac_dir/install.sh; then
2079    ac_aux_dir=$ac_dir
2080    ac_install_sh="$ac_aux_dir/install.sh -c"
2081    break
2082  elif test -f $ac_dir/shtool; then
2083    ac_aux_dir=$ac_dir
2084    ac_install_sh="$ac_aux_dir/shtool install -c"
2085    break
2086  fi
2087done
2088if test -z "$ac_aux_dir"; then
2089  { { echo "$as_me:2089: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2090echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2091   { (exit 1); exit 1; }; }
2092fi
2093ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2094ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2095ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2096
2097# Find a good install program.  We prefer a C program (faster),
2098# so one script is as good as another.  But avoid the broken or
2099# incompatible versions:
2100# SysV /etc/install, /usr/sbin/install
2101# SunOS /usr/etc/install
2102# IRIX /sbin/install
2103# AIX /bin/install
2104# AmigaOS /C/install, which installs bootblocks on floppy discs
2105# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2106# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2107# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2108# ./install, which can be erroneously created by make from ./install.sh.
2109echo "$as_me:2109: checking for a BSD compatible install" >&5
2110echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2111if test -z "$INSTALL"; then
2112if test "${ac_cv_path_install+set}" = set; then
2113  echo $ECHO_N "(cached) $ECHO_C" >&6
2114else
2115    ac_save_IFS=$IFS; IFS=$ac_path_separator
2116  for ac_dir in $PATH; do
2117    IFS=$ac_save_IFS
2118    # Account for people who put trailing slashes in PATH elements.
2119    case $ac_dir/ in
2120    / | ./ | .// | /cC/* \
2121    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2122    | /usr/ucb/* ) ;;
2123    *)
2124      # OSF1 and SCO ODT 3.0 have their own names for install.
2125      # Don't use installbsd from OSF since it installs stuff as root
2126      # by default.
2127      for ac_prog in ginstall scoinst install; do
2128        if $as_executable_p "$ac_dir/$ac_prog"; then
2129	  if test $ac_prog = install &&
2130            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2131	    # AIX install.  It has an incompatible calling convention.
2132	    :
2133	  elif test $ac_prog = install &&
2134	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2135	    # program-specific install script used by HP pwplus--don't use.
2136	    :
2137	  else
2138	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2139	    break 2
2140	  fi
2141	fi
2142      done
2143      ;;
2144    esac
2145  done
2146
2147fi
2148  if test "${ac_cv_path_install+set}" = set; then
2149    INSTALL=$ac_cv_path_install
2150  else
2151    # As a last resort, use the slow shell script.  We don't cache a
2152    # path for INSTALL within a source directory, because that will
2153    # break other packages using the cache if that directory is
2154    # removed, or if the path is relative.
2155    INSTALL=$ac_install_sh
2156  fi
2157fi
2158echo "$as_me:2158: result: $INSTALL" >&5
2159echo "${ECHO_T}$INSTALL" >&6
2160
2161# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2162# It thinks the first close brace ends the variable substitution.
2163test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2164
2165test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2166
2167test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2168
2169if test -n "$ac_tool_prefix"; then
2170  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2171set dummy ${ac_tool_prefix}ar; ac_word=$2
2172echo "$as_me:2172: checking for $ac_word" >&5
2173echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2174if test "${ac_cv_prog_AR+set}" = set; then
2175  echo $ECHO_N "(cached) $ECHO_C" >&6
2176else
2177  if test -n "$AR"; then
2178  ac_cv_prog_AR="$AR" # Let the user override the test.
2179else
2180  ac_save_IFS=$IFS; IFS=$ac_path_separator
2181ac_dummy="$PATH"
2182for ac_dir in $ac_dummy; do
2183  IFS=$ac_save_IFS
2184  test -z "$ac_dir" && ac_dir=.
2185  $as_executable_p "$ac_dir/$ac_word" || continue
2186ac_cv_prog_AR="${ac_tool_prefix}ar"
2187echo "$as_me:2187: found $ac_dir/$ac_word" >&5
2188break
2189done
2190
2191fi
2192fi
2193AR=$ac_cv_prog_AR
2194if test -n "$AR"; then
2195  echo "$as_me:2195: result: $AR" >&5
2196echo "${ECHO_T}$AR" >&6
2197else
2198  echo "$as_me:2198: result: no" >&5
2199echo "${ECHO_T}no" >&6
2200fi
2201
2202fi
2203if test -z "$ac_cv_prog_AR"; then
2204  ac_ct_AR=$AR
2205  # Extract the first word of "ar", so it can be a program name with args.
2206set dummy ar; ac_word=$2
2207echo "$as_me:2207: checking for $ac_word" >&5
2208echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2209if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
2210  echo $ECHO_N "(cached) $ECHO_C" >&6
2211else
2212  if test -n "$ac_ct_AR"; then
2213  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
2214else
2215  ac_save_IFS=$IFS; IFS=$ac_path_separator
2216ac_dummy="$PATH"
2217for ac_dir in $ac_dummy; do
2218  IFS=$ac_save_IFS
2219  test -z "$ac_dir" && ac_dir=.
2220  $as_executable_p "$ac_dir/$ac_word" || continue
2221ac_cv_prog_ac_ct_AR="ar"
2222echo "$as_me:2222: found $ac_dir/$ac_word" >&5
2223break
2224done
2225
2226  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
2227fi
2228fi
2229ac_ct_AR=$ac_cv_prog_ac_ct_AR
2230if test -n "$ac_ct_AR"; then
2231  echo "$as_me:2231: result: $ac_ct_AR" >&5
2232echo "${ECHO_T}$ac_ct_AR" >&6
2233else
2234  echo "$as_me:2234: result: no" >&5
2235echo "${ECHO_T}no" >&6
2236fi
2237
2238  AR=$ac_ct_AR
2239else
2240  AR="$ac_cv_prog_AR"
2241fi
2242
2243echo "$as_me:2243: checking for POSIXized ISC" >&5
2244echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2245if test -d /etc/conf/kconfig.d &&
2246   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2247then
2248  echo "$as_me:2248: result: yes" >&5
2249echo "${ECHO_T}yes" >&6
2250  ISC=yes # If later tests want to check for ISC.
2251
2252cat >>confdefs.h <<\EOF
2253#define _POSIX_SOURCE 1
2254EOF
2255
2256  if test "$GCC" = yes; then
2257    CC="$CC -posix"
2258  else
2259    CC="$CC -Xp"
2260  fi
2261else
2262  echo "$as_me:2262: result: no" >&5
2263echo "${ECHO_T}no" >&6
2264  ISC=
2265fi
2266
2267echo "$as_me:2267: checking for $CC option to accept ANSI C" >&5
2268echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2269if test "${ac_cv_prog_cc_stdc+set}" = set; then
2270  echo $ECHO_N "(cached) $ECHO_C" >&6
2271else
2272  ac_cv_prog_cc_stdc=no
2273ac_save_CC=$CC
2274cat >conftest.$ac_ext <<_ACEOF
2275#line 2275 "configure"
2276#include "confdefs.h"
2277#include <stdarg.h>
2278#include <stdio.h>
2279#include <sys/types.h>
2280#include <sys/stat.h>
2281/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2282struct buf { int x; };
2283FILE * (*rcsopen) (struct buf *, struct stat *, int);
2284static char *e (p, i)
2285     char **p;
2286     int i;
2287{
2288  return p[i];
2289}
2290static char *f (char * (*g) (char **, int), char **p, ...)
2291{
2292  char *s;
2293  va_list v;
2294  va_start (v,p);
2295  s = g (p, va_arg (v,int));
2296  va_end (v);
2297  return s;
2298}
2299int test (int i, double x);
2300struct s1 {int (*f) (int a);};
2301struct s2 {int (*f) (double a);};
2302int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2303int argc;
2304char **argv;
2305int
2306main ()
2307{
2308return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2309  ;
2310  return 0;
2311}
2312_ACEOF
2313# Don't try gcc -ansi; that turns off useful extensions and
2314# breaks some systems' header files.
2315# AIX			-qlanglvl=ansi
2316# Ultrix and OSF/1	-std1
2317# HP-UX 10.20 and later	-Ae
2318# HP-UX older versions	-Aa -D_HPUX_SOURCE
2319# SVR4			-Xc -D__EXTENSIONS__
2320for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2321do
2322  CC="$ac_save_CC $ac_arg"
2323  rm -f conftest.$ac_objext
2324if { (eval echo "$as_me:2324: \"$ac_compile\"") >&5
2325  (eval $ac_compile) 2>&5
2326  ac_status=$?
2327  echo "$as_me:2327: \$? = $ac_status" >&5
2328  (exit $ac_status); } &&
2329         { ac_try='test -s conftest.$ac_objext'
2330  { (eval echo "$as_me:2330: \"$ac_try\"") >&5
2331  (eval $ac_try) 2>&5
2332  ac_status=$?
2333  echo "$as_me:2333: \$? = $ac_status" >&5
2334  (exit $ac_status); }; }; then
2335  ac_cv_prog_cc_stdc=$ac_arg
2336break
2337else
2338  echo "$as_me: failed program was:" >&5
2339cat conftest.$ac_ext >&5
2340fi
2341rm -f conftest.$ac_objext
2342done
2343rm -f conftest.$ac_ext conftest.$ac_objext
2344CC=$ac_save_CC
2345
2346fi
2347
2348case "x$ac_cv_prog_cc_stdc" in
2349  x|xno)
2350    echo "$as_me:2350: result: none needed" >&5
2351echo "${ECHO_T}none needed" >&6 ;;
2352  *)
2353    echo "$as_me:2353: result: $ac_cv_prog_cc_stdc" >&5
2354echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2355    CC="$CC $ac_cv_prog_cc_stdc" ;;
2356esac
2357
2358echo "$as_me:2358: checking for an ANSI C-conforming const" >&5
2359echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2360if test "${ac_cv_c_const+set}" = set; then
2361  echo $ECHO_N "(cached) $ECHO_C" >&6
2362else
2363  cat >conftest.$ac_ext <<_ACEOF
2364#line 2364 "configure"
2365#include "confdefs.h"
2366
2367int
2368main ()
2369{
2370/* FIXME: Include the comments suggested by Paul. */
2371#ifndef __cplusplus
2372  /* Ultrix mips cc rejects this.  */
2373  typedef int charset[2];
2374  const charset x;
2375  /* SunOS 4.1.1 cc rejects this.  */
2376  char const *const *ccp;
2377  char **p;
2378  /* NEC SVR4.0.2 mips cc rejects this.  */
2379  struct point {int x, y;};
2380  static struct point const zero = {0,0};
2381  /* AIX XL C 1.02.0.0 rejects this.
2382     It does not let you subtract one const X* pointer from another in
2383     an arm of an if-expression whose if-part is not a constant
2384     expression */
2385  const char *g = "string";
2386  ccp = &g + (g ? g-g : 0);
2387  /* HPUX 7.0 cc rejects these. */
2388  ++ccp;
2389  p = (char**) ccp;
2390  ccp = (char const *const *) p;
2391  { /* SCO 3.2v4 cc rejects this.  */
2392    char *t;
2393    char const *s = 0 ? (char *) 0 : (char const *) 0;
2394
2395    *t++ = 0;
2396  }
2397  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2398    int x[] = {25, 17};
2399    const int *foo = &x[0];
2400    ++foo;
2401  }
2402  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2403    typedef const int *iptr;
2404    iptr p = 0;
2405    ++p;
2406  }
2407  { /* AIX XL C 1.02.0.0 rejects this saying
2408       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2409    struct s { int j; const int *ap[3]; };
2410    struct s *b; b->j = 5;
2411  }
2412  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2413    const int foo = 10;
2414  }
2415#endif
2416
2417  ;
2418  return 0;
2419}
2420_ACEOF
2421rm -f conftest.$ac_objext
2422if { (eval echo "$as_me:2422: \"$ac_compile\"") >&5
2423  (eval $ac_compile) 2>&5
2424  ac_status=$?
2425  echo "$as_me:2425: \$? = $ac_status" >&5
2426  (exit $ac_status); } &&
2427         { ac_try='test -s conftest.$ac_objext'
2428  { (eval echo "$as_me:2428: \"$ac_try\"") >&5
2429  (eval $ac_try) 2>&5
2430  ac_status=$?
2431  echo "$as_me:2431: \$? = $ac_status" >&5
2432  (exit $ac_status); }; }; then
2433  ac_cv_c_const=yes
2434else
2435  echo "$as_me: failed program was:" >&5
2436cat conftest.$ac_ext >&5
2437ac_cv_c_const=no
2438fi
2439rm -f conftest.$ac_objext conftest.$ac_ext
2440fi
2441echo "$as_me:2441: result: $ac_cv_c_const" >&5
2442echo "${ECHO_T}$ac_cv_c_const" >&6
2443if test $ac_cv_c_const = no; then
2444
2445cat >>confdefs.h <<\EOF
2446#define const
2447EOF
2448
2449fi
2450
2451echo "$as_me:2451: checking for makeflags variable" >&5
2452echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2453if test "${cf_cv_makeflags+set}" = set; then
2454  echo $ECHO_N "(cached) $ECHO_C" >&6
2455else
2456
2457	cf_cv_makeflags=''
2458	for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2459	do
2460		cat >cf_makeflags.tmp <<CF_EOF
2461SHELL = /bin/sh
2462all :
2463	@ echo '.$cf_option'
2464CF_EOF
2465		cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ 	]*$,,'`
2466		case "$cf_result" in
2467		.*k)
2468			cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2469			case "$cf_result" in
2470			.*CC=*)	cf_cv_makeflags=
2471				;;
2472			*)	cf_cv_makeflags=$cf_option
2473				;;
2474			esac
2475			break
2476			;;
2477		.-)	;;
2478		*)	echo "given option \"$cf_option\", no match \"$cf_result\""
2479			;;
2480		esac
2481	done
2482	rm -f cf_makeflags.tmp
2483
2484fi
2485echo "$as_me:2485: result: $cf_cv_makeflags" >&5
2486echo "${ECHO_T}$cf_cv_makeflags" >&6
2487
2488echo "$as_me:2488: checking if filesystem supports mixed-case filenames" >&5
2489echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2490if test "${cf_cv_mixedcase+set}" = set; then
2491  echo $ECHO_N "(cached) $ECHO_C" >&6
2492else
2493
2494if test "$cross_compiling" = yes ; then
2495	case $target_alias in #(vi
2496	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2497		cf_cv_mixedcase=no
2498		;;
2499	*)
2500		cf_cv_mixedcase=yes
2501		;;
2502	esac
2503else
2504	rm -f conftest CONFTEST
2505	echo test >conftest
2506	if test -f CONFTEST ; then
2507		cf_cv_mixedcase=no
2508	else
2509		cf_cv_mixedcase=yes
2510	fi
2511	rm -f conftest CONFTEST
2512fi
2513
2514fi
2515echo "$as_me:2515: result: $cf_cv_mixedcase" >&5
2516echo "${ECHO_T}$cf_cv_mixedcase" >&6
2517test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2518#define MIXEDCASE_FILENAMES 1
2519EOF
2520
2521for ac_prog in exctags ctags
2522do
2523  # Extract the first word of "$ac_prog", so it can be a program name with args.
2524set dummy $ac_prog; ac_word=$2
2525echo "$as_me:2525: checking for $ac_word" >&5
2526echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2527if test "${ac_cv_prog_CTAGS+set}" = set; then
2528  echo $ECHO_N "(cached) $ECHO_C" >&6
2529else
2530  if test -n "$CTAGS"; then
2531  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2532else
2533  ac_save_IFS=$IFS; IFS=$ac_path_separator
2534ac_dummy="$PATH"
2535for ac_dir in $ac_dummy; do
2536  IFS=$ac_save_IFS
2537  test -z "$ac_dir" && ac_dir=.
2538  $as_executable_p "$ac_dir/$ac_word" || continue
2539ac_cv_prog_CTAGS="$ac_prog"
2540echo "$as_me:2540: found $ac_dir/$ac_word" >&5
2541break
2542done
2543
2544fi
2545fi
2546CTAGS=$ac_cv_prog_CTAGS
2547if test -n "$CTAGS"; then
2548  echo "$as_me:2548: result: $CTAGS" >&5
2549echo "${ECHO_T}$CTAGS" >&6
2550else
2551  echo "$as_me:2551: result: no" >&5
2552echo "${ECHO_T}no" >&6
2553fi
2554
2555  test -n "$CTAGS" && break
2556done
2557
2558for ac_prog in exetags etags
2559do
2560  # Extract the first word of "$ac_prog", so it can be a program name with args.
2561set dummy $ac_prog; ac_word=$2
2562echo "$as_me:2562: checking for $ac_word" >&5
2563echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2564if test "${ac_cv_prog_ETAGS+set}" = set; then
2565  echo $ECHO_N "(cached) $ECHO_C" >&6
2566else
2567  if test -n "$ETAGS"; then
2568  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2569else
2570  ac_save_IFS=$IFS; IFS=$ac_path_separator
2571ac_dummy="$PATH"
2572for ac_dir in $ac_dummy; do
2573  IFS=$ac_save_IFS
2574  test -z "$ac_dir" && ac_dir=.
2575  $as_executable_p "$ac_dir/$ac_word" || continue
2576ac_cv_prog_ETAGS="$ac_prog"
2577echo "$as_me:2577: found $ac_dir/$ac_word" >&5
2578break
2579done
2580
2581fi
2582fi
2583ETAGS=$ac_cv_prog_ETAGS
2584if test -n "$ETAGS"; then
2585  echo "$as_me:2585: result: $ETAGS" >&5
2586echo "${ECHO_T}$ETAGS" >&6
2587else
2588  echo "$as_me:2588: result: no" >&5
2589echo "${ECHO_T}no" >&6
2590fi
2591
2592  test -n "$ETAGS" && break
2593done
2594
2595# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2596set dummy ${CTAGS:-ctags}; ac_word=$2
2597echo "$as_me:2597: checking for $ac_word" >&5
2598echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2599if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2600  echo $ECHO_N "(cached) $ECHO_C" >&6
2601else
2602  if test -n "$MAKE_LOWER_TAGS"; then
2603  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2604else
2605  ac_save_IFS=$IFS; IFS=$ac_path_separator
2606ac_dummy="$PATH"
2607for ac_dir in $ac_dummy; do
2608  IFS=$ac_save_IFS
2609  test -z "$ac_dir" && ac_dir=.
2610  $as_executable_p "$ac_dir/$ac_word" || continue
2611ac_cv_prog_MAKE_LOWER_TAGS="yes"
2612echo "$as_me:2612: found $ac_dir/$ac_word" >&5
2613break
2614done
2615
2616  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2617fi
2618fi
2619MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2620if test -n "$MAKE_LOWER_TAGS"; then
2621  echo "$as_me:2621: result: $MAKE_LOWER_TAGS" >&5
2622echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2623else
2624  echo "$as_me:2624: result: no" >&5
2625echo "${ECHO_T}no" >&6
2626fi
2627
2628if test "$cf_cv_mixedcase" = yes ; then
2629	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2630set dummy ${ETAGS:-etags}; ac_word=$2
2631echo "$as_me:2631: checking for $ac_word" >&5
2632echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2633if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2634  echo $ECHO_N "(cached) $ECHO_C" >&6
2635else
2636  if test -n "$MAKE_UPPER_TAGS"; then
2637  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2638else
2639  ac_save_IFS=$IFS; IFS=$ac_path_separator
2640ac_dummy="$PATH"
2641for ac_dir in $ac_dummy; do
2642  IFS=$ac_save_IFS
2643  test -z "$ac_dir" && ac_dir=.
2644  $as_executable_p "$ac_dir/$ac_word" || continue
2645ac_cv_prog_MAKE_UPPER_TAGS="yes"
2646echo "$as_me:2646: found $ac_dir/$ac_word" >&5
2647break
2648done
2649
2650  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2651fi
2652fi
2653MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2654if test -n "$MAKE_UPPER_TAGS"; then
2655  echo "$as_me:2655: result: $MAKE_UPPER_TAGS" >&5
2656echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2657else
2658  echo "$as_me:2658: result: no" >&5
2659echo "${ECHO_T}no" >&6
2660fi
2661
2662else
2663	MAKE_UPPER_TAGS=no
2664fi
2665
2666if test "$MAKE_UPPER_TAGS" = yes ; then
2667	MAKE_UPPER_TAGS=
2668else
2669	MAKE_UPPER_TAGS="#"
2670fi
2671
2672if test "$MAKE_LOWER_TAGS" = yes ; then
2673	MAKE_LOWER_TAGS=
2674else
2675	MAKE_LOWER_TAGS="#"
2676fi
2677
2678echo "$as_me:2678: checking if you want to see long compiling messages" >&5
2679echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
2680
2681# Check whether --enable-echo or --disable-echo was given.
2682if test "${enable_echo+set}" = set; then
2683  enableval="$enable_echo"
2684  test "$enableval" != no && enableval=yes
2685  if test "$enableval" != "yes" ; then
2686
2687    ECHO_LT='--silent'
2688    ECHO_LD='@echo linking $@;'
2689    RULE_CC='@echo compiling $<'
2690    SHOW_CC='@echo compiling $@'
2691    ECHO_CC='@'
2692
2693  else
2694
2695    ECHO_LT=''
2696    ECHO_LD=''
2697    RULE_CC=''
2698    SHOW_CC=''
2699    ECHO_CC=''
2700
2701  fi
2702else
2703  enableval=yes
2704
2705    ECHO_LT=''
2706    ECHO_LD=''
2707    RULE_CC=''
2708    SHOW_CC=''
2709    ECHO_CC=''
2710
2711fi;
2712echo "$as_me:2712: result: $enableval" >&5
2713echo "${ECHO_T}$enableval" >&6
2714
2715# Make sure we can run config.sub.
2716$ac_config_sub sun4 >/dev/null 2>&1 ||
2717  { { echo "$as_me:2717: error: cannot run $ac_config_sub" >&5
2718echo "$as_me: error: cannot run $ac_config_sub" >&2;}
2719   { (exit 1); exit 1; }; }
2720
2721echo "$as_me:2721: checking build system type" >&5
2722echo $ECHO_N "checking build system type... $ECHO_C" >&6
2723if test "${ac_cv_build+set}" = set; then
2724  echo $ECHO_N "(cached) $ECHO_C" >&6
2725else
2726  ac_cv_build_alias=$build_alias
2727test -z "$ac_cv_build_alias" &&
2728  ac_cv_build_alias=`$ac_config_guess`
2729test -z "$ac_cv_build_alias" &&
2730  { { echo "$as_me:2730: error: cannot guess build type; you must specify one" >&5
2731echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2732   { (exit 1); exit 1; }; }
2733ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
2734  { { echo "$as_me:2734: error: $ac_config_sub $ac_cv_build_alias failed." >&5
2735echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
2736   { (exit 1); exit 1; }; }
2737
2738fi
2739echo "$as_me:2739: result: $ac_cv_build" >&5
2740echo "${ECHO_T}$ac_cv_build" >&6
2741build=$ac_cv_build
2742build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2743build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2744build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2745
2746if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
2747	echo "$as_me:2747: checking host system type" >&5
2748echo $ECHO_N "checking host system type... $ECHO_C" >&6
2749if test "${ac_cv_host+set}" = set; then
2750  echo $ECHO_N "(cached) $ECHO_C" >&6
2751else
2752  ac_cv_host_alias=$host_alias
2753test -z "$ac_cv_host_alias" &&
2754  ac_cv_host_alias=$ac_cv_build_alias
2755ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
2756  { { echo "$as_me:2756: error: $ac_config_sub $ac_cv_host_alias failed" >&5
2757echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
2758   { (exit 1); exit 1; }; }
2759
2760fi
2761echo "$as_me:2761: result: $ac_cv_host" >&5
2762echo "${ECHO_T}$ac_cv_host" >&6
2763host=$ac_cv_host
2764host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2765host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2766host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2767
2768	system_name="$host_os"
2769else
2770	system_name="`(uname -s -r) 2>/dev/null`"
2771	if test -z "$system_name" ; then
2772		system_name="`(hostname) 2>/dev/null`"
2773	fi
2774fi
2775test -n "$system_name" && cat >>confdefs.h <<EOF
2776#define SYSTEM_NAME "$system_name"
2777EOF
2778
2779if test "${cf_cv_system_name+set}" = set; then
2780  echo $ECHO_N "(cached) $ECHO_C" >&6
2781else
2782  cf_cv_system_name="$system_name"
2783fi
2784
2785test -z "$system_name" && system_name="$cf_cv_system_name"
2786test -n "$cf_cv_system_name" && echo "$as_me:2786: result: Configuring for $cf_cv_system_name" >&5
2787echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
2788
2789if test ".$system_name" != ".$cf_cv_system_name" ; then
2790	echo "$as_me:2790: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
2791echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
2792	{ { echo "$as_me:2792: error: \"Please remove config.cache and try again.\"" >&5
2793echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
2794   { (exit 1); exit 1; }; }
2795fi
2796
2797case $cf_cv_system_name in
2798os2*)
2799    CFLAGS="$CFLAGS -Zmt"
2800    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2801    CXXFLAGS="$CXXFLAGS -Zmt"
2802    # autoconf's macro sets -Zexe and suffix both, which conflict:w
2803    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2804    ac_cv_exeext=.exe
2805    ;;
2806esac
2807
2808PROG_EXT="$EXEEXT"
2809
2810test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2811#define PROG_EXT "$PROG_EXT"
2812EOF
2813
2814	case $cf_cv_system_name in
2815	os2*)	PATH_SEPARATOR=';'  ;;
2816	*)	PATH_SEPARATOR=':'  ;;
2817	esac
2818
2819	case $cf_cv_system_name in #(vi
2820	OS/2*|os2*) #(vi
2821        LIB_PREFIX=''
2822        ;;
2823	*)	LIB_PREFIX='lib'
2824        ;;
2825	esac
2826
2827cf_XOPEN_SOURCE=500
2828cf_POSIX_C_SOURCE=199506L
2829cf_xopen_source=
2830
2831case $host_os in #(vi
2832aix[456]*) #(vi
2833	cf_xopen_source="-D_ALL_SOURCE"
2834	;;
2835cygwin) #(vi
2836	cf_XOPEN_SOURCE=600
2837	;;
2838darwin[0-8].*) #(vi
2839	cf_xopen_source="-D_APPLE_C_SOURCE"
2840	;;
2841darwin*) #(vi
2842	cf_xopen_source="-D_DARWIN_C_SOURCE"
2843	;;
2844freebsd*|dragonfly*) #(vi
2845	# 5.x headers associate
2846	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2847	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2848	cf_POSIX_C_SOURCE=200112L
2849	cf_XOPEN_SOURCE=600
2850	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2851	;;
2852hpux11*) #(vi
2853	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2854	;;
2855hpux*) #(vi
2856	cf_xopen_source="-D_HPUX_SOURCE"
2857	;;
2858irix[56].*) #(vi
2859	cf_xopen_source="-D_SGI_SOURCE"
2860	;;
2861linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2862
2863echo "$as_me:2863: checking if we must define _GNU_SOURCE" >&5
2864echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2865if test "${cf_cv_gnu_source+set}" = set; then
2866  echo $ECHO_N "(cached) $ECHO_C" >&6
2867else
2868
2869cat >conftest.$ac_ext <<_ACEOF
2870#line 2870 "configure"
2871#include "confdefs.h"
2872#include <sys/types.h>
2873int
2874main ()
2875{
2876
2877#ifndef _XOPEN_SOURCE
2878make an error
2879#endif
2880  ;
2881  return 0;
2882}
2883_ACEOF
2884rm -f conftest.$ac_objext
2885if { (eval echo "$as_me:2885: \"$ac_compile\"") >&5
2886  (eval $ac_compile) 2>&5
2887  ac_status=$?
2888  echo "$as_me:2888: \$? = $ac_status" >&5
2889  (exit $ac_status); } &&
2890         { ac_try='test -s conftest.$ac_objext'
2891  { (eval echo "$as_me:2891: \"$ac_try\"") >&5
2892  (eval $ac_try) 2>&5
2893  ac_status=$?
2894  echo "$as_me:2894: \$? = $ac_status" >&5
2895  (exit $ac_status); }; }; then
2896  cf_cv_gnu_source=no
2897else
2898  echo "$as_me: failed program was:" >&5
2899cat conftest.$ac_ext >&5
2900cf_save="$CPPFLAGS"
2901	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2902	 cat >conftest.$ac_ext <<_ACEOF
2903#line 2903 "configure"
2904#include "confdefs.h"
2905#include <sys/types.h>
2906int
2907main ()
2908{
2909
2910#ifdef _XOPEN_SOURCE
2911make an error
2912#endif
2913  ;
2914  return 0;
2915}
2916_ACEOF
2917rm -f conftest.$ac_objext
2918if { (eval echo "$as_me:2918: \"$ac_compile\"") >&5
2919  (eval $ac_compile) 2>&5
2920  ac_status=$?
2921  echo "$as_me:2921: \$? = $ac_status" >&5
2922  (exit $ac_status); } &&
2923         { ac_try='test -s conftest.$ac_objext'
2924  { (eval echo "$as_me:2924: \"$ac_try\"") >&5
2925  (eval $ac_try) 2>&5
2926  ac_status=$?
2927  echo "$as_me:2927: \$? = $ac_status" >&5
2928  (exit $ac_status); }; }; then
2929  cf_cv_gnu_source=no
2930else
2931  echo "$as_me: failed program was:" >&5
2932cat conftest.$ac_ext >&5
2933cf_cv_gnu_source=yes
2934fi
2935rm -f conftest.$ac_objext conftest.$ac_ext
2936	CPPFLAGS="$cf_save"
2937
2938fi
2939rm -f conftest.$ac_objext conftest.$ac_ext
2940
2941fi
2942echo "$as_me:2942: result: $cf_cv_gnu_source" >&5
2943echo "${ECHO_T}$cf_cv_gnu_source" >&6
2944test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2945
2946	;;
2947mirbsd*) #(vi
2948	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
2949	;;
2950netbsd*) #(vi
2951	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
2952	;;
2953openbsd*) #(vi
2954	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
2955	;;
2956osf[45]*) #(vi
2957	cf_xopen_source="-D_OSF_SOURCE"
2958	;;
2959nto-qnx*) #(vi
2960	cf_xopen_source="-D_QNX_SOURCE"
2961	;;
2962sco*) #(vi
2963	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
2964	;;
2965solaris2.1[0-9]) #(vi
2966	cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2967	;;
2968solaris2.[1-9]) #(vi
2969	cf_xopen_source="-D__EXTENSIONS__"
2970	;;
2971*)
2972	echo "$as_me:2972: checking if we should define _XOPEN_SOURCE" >&5
2973echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
2974if test "${cf_cv_xopen_source+set}" = set; then
2975  echo $ECHO_N "(cached) $ECHO_C" >&6
2976else
2977
2978	cat >conftest.$ac_ext <<_ACEOF
2979#line 2979 "configure"
2980#include "confdefs.h"
2981#include <sys/types.h>
2982int
2983main ()
2984{
2985
2986#ifndef _XOPEN_SOURCE
2987make an error
2988#endif
2989  ;
2990  return 0;
2991}
2992_ACEOF
2993rm -f conftest.$ac_objext
2994if { (eval echo "$as_me:2994: \"$ac_compile\"") >&5
2995  (eval $ac_compile) 2>&5
2996  ac_status=$?
2997  echo "$as_me:2997: \$? = $ac_status" >&5
2998  (exit $ac_status); } &&
2999         { ac_try='test -s conftest.$ac_objext'
3000  { (eval echo "$as_me:3000: \"$ac_try\"") >&5
3001  (eval $ac_try) 2>&5
3002  ac_status=$?
3003  echo "$as_me:3003: \$? = $ac_status" >&5
3004  (exit $ac_status); }; }; then
3005  cf_cv_xopen_source=no
3006else
3007  echo "$as_me: failed program was:" >&5
3008cat conftest.$ac_ext >&5
3009cf_save="$CPPFLAGS"
3010	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3011	 cat >conftest.$ac_ext <<_ACEOF
3012#line 3012 "configure"
3013#include "confdefs.h"
3014#include <sys/types.h>
3015int
3016main ()
3017{
3018
3019#ifdef _XOPEN_SOURCE
3020make an error
3021#endif
3022  ;
3023  return 0;
3024}
3025_ACEOF
3026rm -f conftest.$ac_objext
3027if { (eval echo "$as_me:3027: \"$ac_compile\"") >&5
3028  (eval $ac_compile) 2>&5
3029  ac_status=$?
3030  echo "$as_me:3030: \$? = $ac_status" >&5
3031  (exit $ac_status); } &&
3032         { ac_try='test -s conftest.$ac_objext'
3033  { (eval echo "$as_me:3033: \"$ac_try\"") >&5
3034  (eval $ac_try) 2>&5
3035  ac_status=$?
3036  echo "$as_me:3036: \$? = $ac_status" >&5
3037  (exit $ac_status); }; }; then
3038  cf_cv_xopen_source=no
3039else
3040  echo "$as_me: failed program was:" >&5
3041cat conftest.$ac_ext >&5
3042cf_cv_xopen_source=$cf_XOPEN_SOURCE
3043fi
3044rm -f conftest.$ac_objext conftest.$ac_ext
3045	CPPFLAGS="$cf_save"
3046
3047fi
3048rm -f conftest.$ac_objext conftest.$ac_ext
3049
3050fi
3051echo "$as_me:3051: result: $cf_cv_xopen_source" >&5
3052echo "${ECHO_T}$cf_cv_xopen_source" >&6
3053	if test "$cf_cv_xopen_source" != no ; then
3054
3055CFLAGS=`echo "$CFLAGS" | \
3056	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3057		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3058
3059CPPFLAGS=`echo "$CPPFLAGS" | \
3060	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3061		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3062
3063		cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3064
3065cf_fix_cppflags=no
3066cf_new_cflags=
3067cf_new_cppflags=
3068cf_new_extra_cppflags=
3069
3070for cf_add_cflags in $cf_temp_xopen_source
3071do
3072case $cf_fix_cppflags in
3073no)
3074	case $cf_add_cflags in #(vi
3075	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3076		case $cf_add_cflags in
3077		-D*)
3078			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3079
3080			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3081				&& test -z "${cf_tst_cflags}" \
3082				&& cf_fix_cppflags=yes
3083
3084			if test $cf_fix_cppflags = yes ; then
3085				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3086				continue
3087			elif test "${cf_tst_cflags}" = "\"'" ; then
3088				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3089				continue
3090			fi
3091			;;
3092		esac
3093		case "$CPPFLAGS" in
3094		*$cf_add_cflags) #(vi
3095			;;
3096		*) #(vi
3097			case $cf_add_cflags in #(vi
3098			-D*)
3099				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3100
3101CPPFLAGS=`echo "$CPPFLAGS" | \
3102	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3103		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3104
3105				;;
3106			esac
3107			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3108			;;
3109		esac
3110		;;
3111	*)
3112		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3113		;;
3114	esac
3115	;;
3116yes)
3117	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3118
3119	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3120
3121	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3122		&& test -z "${cf_tst_cflags}" \
3123		&& cf_fix_cppflags=no
3124	;;
3125esac
3126done
3127
3128if test -n "$cf_new_cflags" ; then
3129
3130	CFLAGS="$CFLAGS $cf_new_cflags"
3131fi
3132
3133if test -n "$cf_new_cppflags" ; then
3134
3135	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3136fi
3137
3138if test -n "$cf_new_extra_cppflags" ; then
3139
3140	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3141fi
3142
3143	fi
3144
3145cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3146
3147cf_save_CFLAGS="$CFLAGS"
3148cf_save_CPPFLAGS="$CPPFLAGS"
3149
3150cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3151	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3152		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3153
3154cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3155	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3156		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3157
3158echo "$as_me:3158: checking if we should define _POSIX_C_SOURCE" >&5
3159echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3160if test "${cf_cv_posix_c_source+set}" = set; then
3161  echo $ECHO_N "(cached) $ECHO_C" >&6
3162else
3163
3164echo "${as_me:-configure}:3164: testing if the symbol is already defined go no further ..." 1>&5
3165
3166	cat >conftest.$ac_ext <<_ACEOF
3167#line 3167 "configure"
3168#include "confdefs.h"
3169#include <sys/types.h>
3170int
3171main ()
3172{
3173
3174#ifndef _POSIX_C_SOURCE
3175make an error
3176#endif
3177  ;
3178  return 0;
3179}
3180_ACEOF
3181rm -f conftest.$ac_objext
3182if { (eval echo "$as_me:3182: \"$ac_compile\"") >&5
3183  (eval $ac_compile) 2>&5
3184  ac_status=$?
3185  echo "$as_me:3185: \$? = $ac_status" >&5
3186  (exit $ac_status); } &&
3187         { ac_try='test -s conftest.$ac_objext'
3188  { (eval echo "$as_me:3188: \"$ac_try\"") >&5
3189  (eval $ac_try) 2>&5
3190  ac_status=$?
3191  echo "$as_me:3191: \$? = $ac_status" >&5
3192  (exit $ac_status); }; }; then
3193  cf_cv_posix_c_source=no
3194else
3195  echo "$as_me: failed program was:" >&5
3196cat conftest.$ac_ext >&5
3197cf_want_posix_source=no
3198	 case .$cf_POSIX_C_SOURCE in #(vi
3199	 .[12]??*) #(vi
3200		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3201		;;
3202	 .2) #(vi
3203		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3204		cf_want_posix_source=yes
3205		;;
3206	 .*)
3207		cf_want_posix_source=yes
3208		;;
3209	 esac
3210	 if test "$cf_want_posix_source" = yes ; then
3211		cat >conftest.$ac_ext <<_ACEOF
3212#line 3212 "configure"
3213#include "confdefs.h"
3214#include <sys/types.h>
3215int
3216main ()
3217{
3218
3219#ifdef _POSIX_SOURCE
3220make an error
3221#endif
3222  ;
3223  return 0;
3224}
3225_ACEOF
3226rm -f conftest.$ac_objext
3227if { (eval echo "$as_me:3227: \"$ac_compile\"") >&5
3228  (eval $ac_compile) 2>&5
3229  ac_status=$?
3230  echo "$as_me:3230: \$? = $ac_status" >&5
3231  (exit $ac_status); } &&
3232         { ac_try='test -s conftest.$ac_objext'
3233  { (eval echo "$as_me:3233: \"$ac_try\"") >&5
3234  (eval $ac_try) 2>&5
3235  ac_status=$?
3236  echo "$as_me:3236: \$? = $ac_status" >&5
3237  (exit $ac_status); }; }; then
3238  :
3239else
3240  echo "$as_me: failed program was:" >&5
3241cat conftest.$ac_ext >&5
3242cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3243fi
3244rm -f conftest.$ac_objext conftest.$ac_ext
3245	 fi
3246
3247echo "${as_me:-configure}:3247: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3248
3249	 CFLAGS="$cf_trim_CFLAGS"
3250	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3251
3252echo "${as_me:-configure}:3252: testing if the second compile does not leave our definition intact error ..." 1>&5
3253
3254	 cat >conftest.$ac_ext <<_ACEOF
3255#line 3255 "configure"
3256#include "confdefs.h"
3257#include <sys/types.h>
3258int
3259main ()
3260{
3261
3262#ifndef _POSIX_C_SOURCE
3263make an error
3264#endif
3265  ;
3266  return 0;
3267}
3268_ACEOF
3269rm -f conftest.$ac_objext
3270if { (eval echo "$as_me:3270: \"$ac_compile\"") >&5
3271  (eval $ac_compile) 2>&5
3272  ac_status=$?
3273  echo "$as_me:3273: \$? = $ac_status" >&5
3274  (exit $ac_status); } &&
3275         { ac_try='test -s conftest.$ac_objext'
3276  { (eval echo "$as_me:3276: \"$ac_try\"") >&5
3277  (eval $ac_try) 2>&5
3278  ac_status=$?
3279  echo "$as_me:3279: \$? = $ac_status" >&5
3280  (exit $ac_status); }; }; then
3281  :
3282else
3283  echo "$as_me: failed program was:" >&5
3284cat conftest.$ac_ext >&5
3285cf_cv_posix_c_source=no
3286fi
3287rm -f conftest.$ac_objext conftest.$ac_ext
3288	 CFLAGS="$cf_save_CFLAGS"
3289	 CPPFLAGS="$cf_save_CPPFLAGS"
3290
3291fi
3292rm -f conftest.$ac_objext conftest.$ac_ext
3293
3294fi
3295echo "$as_me:3295: result: $cf_cv_posix_c_source" >&5
3296echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3297
3298if test "$cf_cv_posix_c_source" != no ; then
3299	CFLAGS="$cf_trim_CFLAGS"
3300	CPPFLAGS="$cf_trim_CPPFLAGS"
3301
3302cf_fix_cppflags=no
3303cf_new_cflags=
3304cf_new_cppflags=
3305cf_new_extra_cppflags=
3306
3307for cf_add_cflags in $cf_cv_posix_c_source
3308do
3309case $cf_fix_cppflags in
3310no)
3311	case $cf_add_cflags in #(vi
3312	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3313		case $cf_add_cflags in
3314		-D*)
3315			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3316
3317			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3318				&& test -z "${cf_tst_cflags}" \
3319				&& cf_fix_cppflags=yes
3320
3321			if test $cf_fix_cppflags = yes ; then
3322				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3323				continue
3324			elif test "${cf_tst_cflags}" = "\"'" ; then
3325				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3326				continue
3327			fi
3328			;;
3329		esac
3330		case "$CPPFLAGS" in
3331		*$cf_add_cflags) #(vi
3332			;;
3333		*) #(vi
3334			case $cf_add_cflags in #(vi
3335			-D*)
3336				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3337
3338CPPFLAGS=`echo "$CPPFLAGS" | \
3339	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3340		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3341
3342				;;
3343			esac
3344			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3345			;;
3346		esac
3347		;;
3348	*)
3349		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3350		;;
3351	esac
3352	;;
3353yes)
3354	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3355
3356	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3357
3358	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3359		&& test -z "${cf_tst_cflags}" \
3360		&& cf_fix_cppflags=no
3361	;;
3362esac
3363done
3364
3365if test -n "$cf_new_cflags" ; then
3366
3367	CFLAGS="$CFLAGS $cf_new_cflags"
3368fi
3369
3370if test -n "$cf_new_cppflags" ; then
3371
3372	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3373fi
3374
3375if test -n "$cf_new_extra_cppflags" ; then
3376
3377	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3378fi
3379
3380fi
3381
3382	;;
3383esac
3384
3385if test -n "$cf_xopen_source" ; then
3386
3387cf_fix_cppflags=no
3388cf_new_cflags=
3389cf_new_cppflags=
3390cf_new_extra_cppflags=
3391
3392for cf_add_cflags in $cf_xopen_source
3393do
3394case $cf_fix_cppflags in
3395no)
3396	case $cf_add_cflags in #(vi
3397	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3398		case $cf_add_cflags in
3399		-D*)
3400			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3401
3402			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3403				&& test -z "${cf_tst_cflags}" \
3404				&& cf_fix_cppflags=yes
3405
3406			if test $cf_fix_cppflags = yes ; then
3407				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3408				continue
3409			elif test "${cf_tst_cflags}" = "\"'" ; then
3410				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3411				continue
3412			fi
3413			;;
3414		esac
3415		case "$CPPFLAGS" in
3416		*$cf_add_cflags) #(vi
3417			;;
3418		*) #(vi
3419			case $cf_add_cflags in #(vi
3420			-D*)
3421				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3422
3423CPPFLAGS=`echo "$CPPFLAGS" | \
3424	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3425		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3426
3427				;;
3428			esac
3429			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3430			;;
3431		esac
3432		;;
3433	*)
3434		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3435		;;
3436	esac
3437	;;
3438yes)
3439	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3440
3441	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3442
3443	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3444		&& test -z "${cf_tst_cflags}" \
3445		&& cf_fix_cppflags=no
3446	;;
3447esac
3448done
3449
3450if test -n "$cf_new_cflags" ; then
3451
3452	CFLAGS="$CFLAGS $cf_new_cflags"
3453fi
3454
3455if test -n "$cf_new_cppflags" ; then
3456
3457	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3458fi
3459
3460if test -n "$cf_new_extra_cppflags" ; then
3461
3462	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3463fi
3464
3465fi
3466
3467# Check whether --enable-largefile or --disable-largefile was given.
3468if test "${enable_largefile+set}" = set; then
3469  enableval="$enable_largefile"
3470
3471fi;
3472if test "$enable_largefile" != no; then
3473
3474  echo "$as_me:3474: checking for special C compiler options needed for large files" >&5
3475echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
3476if test "${ac_cv_sys_largefile_CC+set}" = set; then
3477  echo $ECHO_N "(cached) $ECHO_C" >&6
3478else
3479  ac_cv_sys_largefile_CC=no
3480     if test "$GCC" != yes; then
3481       ac_save_CC=$CC
3482       while :; do
3483     	 # IRIX 6.2 and later do not support large files by default,
3484     	 # so use the C compiler's -n32 option if that helps.
3485         cat >conftest.$ac_ext <<_ACEOF
3486#line 3486 "configure"
3487#include "confdefs.h"
3488#include <sys/types.h>
3489 /* Check that off_t can represent 2**63 - 1 correctly.
3490    We can't simply define LARGE_OFF_T to be 9223372036854775807,
3491    since some C++ compilers masquerading as C compilers
3492    incorrectly reject 9223372036854775807.  */
3493#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3494  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3495		       && LARGE_OFF_T % 2147483647 == 1)
3496		      ? 1 : -1];
3497int
3498main ()
3499{
3500
3501  ;
3502  return 0;
3503}
3504_ACEOF
3505     	 rm -f conftest.$ac_objext
3506if { (eval echo "$as_me:3506: \"$ac_compile\"") >&5
3507  (eval $ac_compile) 2>&5
3508  ac_status=$?
3509  echo "$as_me:3509: \$? = $ac_status" >&5
3510  (exit $ac_status); } &&
3511         { ac_try='test -s conftest.$ac_objext'
3512  { (eval echo "$as_me:3512: \"$ac_try\"") >&5
3513  (eval $ac_try) 2>&5
3514  ac_status=$?
3515  echo "$as_me:3515: \$? = $ac_status" >&5
3516  (exit $ac_status); }; }; then
3517  break
3518else
3519  echo "$as_me: failed program was:" >&5
3520cat conftest.$ac_ext >&5
3521fi
3522rm -f conftest.$ac_objext
3523     	 CC="$CC -n32"
3524     	 rm -f conftest.$ac_objext
3525if { (eval echo "$as_me:3525: \"$ac_compile\"") >&5
3526  (eval $ac_compile) 2>&5
3527  ac_status=$?
3528  echo "$as_me:3528: \$? = $ac_status" >&5
3529  (exit $ac_status); } &&
3530         { ac_try='test -s conftest.$ac_objext'
3531  { (eval echo "$as_me:3531: \"$ac_try\"") >&5
3532  (eval $ac_try) 2>&5
3533  ac_status=$?
3534  echo "$as_me:3534: \$? = $ac_status" >&5
3535  (exit $ac_status); }; }; then
3536  ac_cv_sys_largefile_CC=' -n32'; break
3537else
3538  echo "$as_me: failed program was:" >&5
3539cat conftest.$ac_ext >&5
3540fi
3541rm -f conftest.$ac_objext
3542         break
3543       done
3544       CC=$ac_save_CC
3545       rm -f conftest.$ac_ext
3546    fi
3547fi
3548echo "$as_me:3548: result: $ac_cv_sys_largefile_CC" >&5
3549echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
3550  if test "$ac_cv_sys_largefile_CC" != no; then
3551    CC=$CC$ac_cv_sys_largefile_CC
3552  fi
3553
3554  echo "$as_me:3554: checking for _FILE_OFFSET_BITS value needed for large files" >&5
3555echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
3556if test "${ac_cv_sys_file_offset_bits+set}" = set; then
3557  echo $ECHO_N "(cached) $ECHO_C" >&6
3558else
3559  while :; do
3560  ac_cv_sys_file_offset_bits=no
3561  cat >conftest.$ac_ext <<_ACEOF
3562#line 3562 "configure"
3563#include "confdefs.h"
3564#include <sys/types.h>
3565 /* Check that off_t can represent 2**63 - 1 correctly.
3566    We can't simply define LARGE_OFF_T to be 9223372036854775807,
3567    since some C++ compilers masquerading as C compilers
3568    incorrectly reject 9223372036854775807.  */
3569#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3570  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3571		       && LARGE_OFF_T % 2147483647 == 1)
3572		      ? 1 : -1];
3573int
3574main ()
3575{
3576
3577  ;
3578  return 0;
3579}
3580_ACEOF
3581rm -f conftest.$ac_objext
3582if { (eval echo "$as_me:3582: \"$ac_compile\"") >&5
3583  (eval $ac_compile) 2>&5
3584  ac_status=$?
3585  echo "$as_me:3585: \$? = $ac_status" >&5
3586  (exit $ac_status); } &&
3587         { ac_try='test -s conftest.$ac_objext'
3588  { (eval echo "$as_me:3588: \"$ac_try\"") >&5
3589  (eval $ac_try) 2>&5
3590  ac_status=$?
3591  echo "$as_me:3591: \$? = $ac_status" >&5
3592  (exit $ac_status); }; }; then
3593  break
3594else
3595  echo "$as_me: failed program was:" >&5
3596cat conftest.$ac_ext >&5
3597fi
3598rm -f conftest.$ac_objext conftest.$ac_ext
3599  cat >conftest.$ac_ext <<_ACEOF
3600#line 3600 "configure"
3601#include "confdefs.h"
3602#define _FILE_OFFSET_BITS 64
3603#include <sys/types.h>
3604 /* Check that off_t can represent 2**63 - 1 correctly.
3605    We can't simply define LARGE_OFF_T to be 9223372036854775807,
3606    since some C++ compilers masquerading as C compilers
3607    incorrectly reject 9223372036854775807.  */
3608#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3609  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3610		       && LARGE_OFF_T % 2147483647 == 1)
3611		      ? 1 : -1];
3612int
3613main ()
3614{
3615
3616  ;
3617  return 0;
3618}
3619_ACEOF
3620rm -f conftest.$ac_objext
3621if { (eval echo "$as_me:3621: \"$ac_compile\"") >&5
3622  (eval $ac_compile) 2>&5
3623  ac_status=$?
3624  echo "$as_me:3624: \$? = $ac_status" >&5
3625  (exit $ac_status); } &&
3626         { ac_try='test -s conftest.$ac_objext'
3627  { (eval echo "$as_me:3627: \"$ac_try\"") >&5
3628  (eval $ac_try) 2>&5
3629  ac_status=$?
3630  echo "$as_me:3630: \$? = $ac_status" >&5
3631  (exit $ac_status); }; }; then
3632  ac_cv_sys_file_offset_bits=64; break
3633else
3634  echo "$as_me: failed program was:" >&5
3635cat conftest.$ac_ext >&5
3636fi
3637rm -f conftest.$ac_objext conftest.$ac_ext
3638  break
3639done
3640fi
3641echo "$as_me:3641: result: $ac_cv_sys_file_offset_bits" >&5
3642echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
3643if test "$ac_cv_sys_file_offset_bits" != no; then
3644
3645cat >>confdefs.h <<EOF
3646#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
3647EOF
3648
3649fi
3650rm -rf conftest*
3651  echo "$as_me:3651: checking for _LARGE_FILES value needed for large files" >&5
3652echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
3653if test "${ac_cv_sys_large_files+set}" = set; then
3654  echo $ECHO_N "(cached) $ECHO_C" >&6
3655else
3656  while :; do
3657  ac_cv_sys_large_files=no
3658  cat >conftest.$ac_ext <<_ACEOF
3659#line 3659 "configure"
3660#include "confdefs.h"
3661#include <sys/types.h>
3662 /* Check that off_t can represent 2**63 - 1 correctly.
3663    We can't simply define LARGE_OFF_T to be 9223372036854775807,
3664    since some C++ compilers masquerading as C compilers
3665    incorrectly reject 9223372036854775807.  */
3666#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3667  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3668		       && LARGE_OFF_T % 2147483647 == 1)
3669		      ? 1 : -1];
3670int
3671main ()
3672{
3673
3674  ;
3675  return 0;
3676}
3677_ACEOF
3678rm -f conftest.$ac_objext
3679if { (eval echo "$as_me:3679: \"$ac_compile\"") >&5
3680  (eval $ac_compile) 2>&5
3681  ac_status=$?
3682  echo "$as_me:3682: \$? = $ac_status" >&5
3683  (exit $ac_status); } &&
3684         { ac_try='test -s conftest.$ac_objext'
3685  { (eval echo "$as_me:3685: \"$ac_try\"") >&5
3686  (eval $ac_try) 2>&5
3687  ac_status=$?
3688  echo "$as_me:3688: \$? = $ac_status" >&5
3689  (exit $ac_status); }; }; then
3690  break
3691else
3692  echo "$as_me: failed program was:" >&5
3693cat conftest.$ac_ext >&5
3694fi
3695rm -f conftest.$ac_objext conftest.$ac_ext
3696  cat >conftest.$ac_ext <<_ACEOF
3697#line 3697 "configure"
3698#include "confdefs.h"
3699#define _LARGE_FILES 1
3700#include <sys/types.h>
3701 /* Check that off_t can represent 2**63 - 1 correctly.
3702    We can't simply define LARGE_OFF_T to be 9223372036854775807,
3703    since some C++ compilers masquerading as C compilers
3704    incorrectly reject 9223372036854775807.  */
3705#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3706  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3707		       && LARGE_OFF_T % 2147483647 == 1)
3708		      ? 1 : -1];
3709int
3710main ()
3711{
3712
3713  ;
3714  return 0;
3715}
3716_ACEOF
3717rm -f conftest.$ac_objext
3718if { (eval echo "$as_me:3718: \"$ac_compile\"") >&5
3719  (eval $ac_compile) 2>&5
3720  ac_status=$?
3721  echo "$as_me:3721: \$? = $ac_status" >&5
3722  (exit $ac_status); } &&
3723         { ac_try='test -s conftest.$ac_objext'
3724  { (eval echo "$as_me:3724: \"$ac_try\"") >&5
3725  (eval $ac_try) 2>&5
3726  ac_status=$?
3727  echo "$as_me:3727: \$? = $ac_status" >&5
3728  (exit $ac_status); }; }; then
3729  ac_cv_sys_large_files=1; break
3730else
3731  echo "$as_me: failed program was:" >&5
3732cat conftest.$ac_ext >&5
3733fi
3734rm -f conftest.$ac_objext conftest.$ac_ext
3735  break
3736done
3737fi
3738echo "$as_me:3738: result: $ac_cv_sys_large_files" >&5
3739echo "${ECHO_T}$ac_cv_sys_large_files" >&6
3740if test "$ac_cv_sys_large_files" != no; then
3741
3742cat >>confdefs.h <<EOF
3743#define _LARGE_FILES $ac_cv_sys_large_files
3744EOF
3745
3746fi
3747rm -rf conftest*
3748fi
3749
3750    if test "$enable_largefile" != no ; then
3751	echo "$as_me:3751: checking for _LARGEFILE_SOURCE value needed for large files" >&5
3752echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
3753if test "${ac_cv_sys_largefile_source+set}" = set; then
3754  echo $ECHO_N "(cached) $ECHO_C" >&6
3755else
3756  while :; do
3757  ac_cv_sys_largefile_source=no
3758  cat >conftest.$ac_ext <<_ACEOF
3759#line 3759 "configure"
3760#include "confdefs.h"
3761#include <stdio.h>
3762int
3763main ()
3764{
3765return !fseeko;
3766  ;
3767  return 0;
3768}
3769_ACEOF
3770rm -f conftest.$ac_objext
3771if { (eval echo "$as_me:3771: \"$ac_compile\"") >&5
3772  (eval $ac_compile) 2>&5
3773  ac_status=$?
3774  echo "$as_me:3774: \$? = $ac_status" >&5
3775  (exit $ac_status); } &&
3776         { ac_try='test -s conftest.$ac_objext'
3777  { (eval echo "$as_me:3777: \"$ac_try\"") >&5
3778  (eval $ac_try) 2>&5
3779  ac_status=$?
3780  echo "$as_me:3780: \$? = $ac_status" >&5
3781  (exit $ac_status); }; }; then
3782  break
3783else
3784  echo "$as_me: failed program was:" >&5
3785cat conftest.$ac_ext >&5
3786fi
3787rm -f conftest.$ac_objext conftest.$ac_ext
3788  cat >conftest.$ac_ext <<_ACEOF
3789#line 3789 "configure"
3790#include "confdefs.h"
3791#define _LARGEFILE_SOURCE 1
3792#include <stdio.h>
3793int
3794main ()
3795{
3796return !fseeko;
3797  ;
3798  return 0;
3799}
3800_ACEOF
3801rm -f conftest.$ac_objext
3802if { (eval echo "$as_me:3802: \"$ac_compile\"") >&5
3803  (eval $ac_compile) 2>&5
3804  ac_status=$?
3805  echo "$as_me:3805: \$? = $ac_status" >&5
3806  (exit $ac_status); } &&
3807         { ac_try='test -s conftest.$ac_objext'
3808  { (eval echo "$as_me:3808: \"$ac_try\"") >&5
3809  (eval $ac_try) 2>&5
3810  ac_status=$?
3811  echo "$as_me:3811: \$? = $ac_status" >&5
3812  (exit $ac_status); }; }; then
3813  ac_cv_sys_largefile_source=1; break
3814else
3815  echo "$as_me: failed program was:" >&5
3816cat conftest.$ac_ext >&5
3817fi
3818rm -f conftest.$ac_objext conftest.$ac_ext
3819  break
3820done
3821fi
3822echo "$as_me:3822: result: $ac_cv_sys_largefile_source" >&5
3823echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
3824if test "$ac_cv_sys_largefile_source" != no; then
3825
3826cat >>confdefs.h <<EOF
3827#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
3828EOF
3829
3830fi
3831rm -rf conftest*
3832
3833# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
3834# in glibc 2.1.3, but that breaks too many other things.
3835# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
3836echo "$as_me:3836: checking for fseeko" >&5
3837echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
3838if test "${ac_cv_func_fseeko+set}" = set; then
3839  echo $ECHO_N "(cached) $ECHO_C" >&6
3840else
3841  cat >conftest.$ac_ext <<_ACEOF
3842#line 3842 "configure"
3843#include "confdefs.h"
3844#include <stdio.h>
3845int
3846main ()
3847{
3848return fseeko && fseeko (stdin, 0, 0);
3849  ;
3850  return 0;
3851}
3852_ACEOF
3853rm -f conftest.$ac_objext conftest$ac_exeext
3854if { (eval echo "$as_me:3854: \"$ac_link\"") >&5
3855  (eval $ac_link) 2>&5
3856  ac_status=$?
3857  echo "$as_me:3857: \$? = $ac_status" >&5
3858  (exit $ac_status); } &&
3859         { ac_try='test -s conftest$ac_exeext'
3860  { (eval echo "$as_me:3860: \"$ac_try\"") >&5
3861  (eval $ac_try) 2>&5
3862  ac_status=$?
3863  echo "$as_me:3863: \$? = $ac_status" >&5
3864  (exit $ac_status); }; }; then
3865  ac_cv_func_fseeko=yes
3866else
3867  echo "$as_me: failed program was:" >&5
3868cat conftest.$ac_ext >&5
3869ac_cv_func_fseeko=no
3870fi
3871rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3872fi
3873echo "$as_me:3873: result: $ac_cv_func_fseeko" >&5
3874echo "${ECHO_T}$ac_cv_func_fseeko" >&6
3875if test $ac_cv_func_fseeko = yes; then
3876
3877cat >>confdefs.h <<\EOF
3878#define HAVE_FSEEKO 1
3879EOF
3880
3881fi
3882
3883	# Normally we would collect these definitions in the config.h,
3884	# but (like _XOPEN_SOURCE), some environments rely on having these
3885	# defined before any of the system headers are included.  Another
3886	# case comes up with C++, e.g., on AIX the compiler compiles the
3887	# header files by themselves before looking at the body files it is
3888	# told to compile.  For ncurses, those header files do not include
3889	# the config.h
3890	test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
3891	test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
3892	test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
3893
3894	echo "$as_me:3894: checking whether to use struct dirent64" >&5
3895echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
3896if test "${cf_cv_struct_dirent64+set}" = set; then
3897  echo $ECHO_N "(cached) $ECHO_C" >&6
3898else
3899
3900		cat >conftest.$ac_ext <<_ACEOF
3901#line 3901 "configure"
3902#include "confdefs.h"
3903
3904#include <sys/types.h>
3905#include <dirent.h>
3906
3907int
3908main ()
3909{
3910
3911		/* if transitional largefile support is setup, this is true */
3912		extern struct dirent64 * readdir(DIR *);
3913		struct dirent64 *x = readdir((DIR *)0);
3914		struct dirent *y = readdir((DIR *)0);
3915		int z = x - y;
3916
3917  ;
3918  return 0;
3919}
3920_ACEOF
3921rm -f conftest.$ac_objext
3922if { (eval echo "$as_me:3922: \"$ac_compile\"") >&5
3923  (eval $ac_compile) 2>&5
3924  ac_status=$?
3925  echo "$as_me:3925: \$? = $ac_status" >&5
3926  (exit $ac_status); } &&
3927         { ac_try='test -s conftest.$ac_objext'
3928  { (eval echo "$as_me:3928: \"$ac_try\"") >&5
3929  (eval $ac_try) 2>&5
3930  ac_status=$?
3931  echo "$as_me:3931: \$? = $ac_status" >&5
3932  (exit $ac_status); }; }; then
3933  cf_cv_struct_dirent64=yes
3934else
3935  echo "$as_me: failed program was:" >&5
3936cat conftest.$ac_ext >&5
3937cf_cv_struct_dirent64=no
3938fi
3939rm -f conftest.$ac_objext conftest.$ac_ext
3940
3941fi
3942echo "$as_me:3942: result: $cf_cv_struct_dirent64" >&5
3943echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
3944	test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
3945#define HAVE_STRUCT_DIRENT64 1
3946EOF
3947
3948    fi
3949
3950GCC_VERSION=none
3951if test "$GCC" = yes ; then
3952	echo "$as_me:3952: checking version of $CC" >&5
3953echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
3954	GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3955	test -z "$GCC_VERSION" && GCC_VERSION=unknown
3956	echo "$as_me:3956: result: $GCC_VERSION" >&5
3957echo "${ECHO_T}$GCC_VERSION" >&6
3958fi
3959
3960if ( test "$GCC" = yes || test "$GXX" = yes )
3961then
3962echo "$as_me:3962: checking if you want to check for gcc warnings" >&5
3963echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6
3964
3965# Check whether --with-warnings or --without-warnings was given.
3966if test "${with_warnings+set}" = set; then
3967  withval="$with_warnings"
3968  cf_opt_with_warnings=$withval
3969else
3970  cf_opt_with_warnings=no
3971fi;
3972echo "$as_me:3972: result: $cf_opt_with_warnings" >&5
3973echo "${ECHO_T}$cf_opt_with_warnings" >&6
3974if test "$cf_opt_with_warnings" != no ; then
3975
3976if test "$GCC" = yes
3977then
3978cat > conftest.i <<EOF
3979#ifndef GCC_PRINTF
3980#define GCC_PRINTF 0
3981#endif
3982#ifndef GCC_SCANF
3983#define GCC_SCANF 0
3984#endif
3985#ifndef GCC_NORETURN
3986#define GCC_NORETURN /* nothing */
3987#endif
3988#ifndef GCC_UNUSED
3989#define GCC_UNUSED /* nothing */
3990#endif
3991EOF
3992if test "$GCC" = yes
3993then
3994	{ echo "$as_me:3994: checking for $CC __attribute__ directives..." >&5
3995echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3996cat > conftest.$ac_ext <<EOF
3997#line 3997 "${as_me:-configure}"
3998#include "confdefs.h"
3999#include "conftest.h"
4000#include "conftest.i"
4001#if	GCC_PRINTF
4002#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4003#else
4004#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
4005#endif
4006#if	GCC_SCANF
4007#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
4008#else
4009#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
4010#endif
4011extern void wow(char *,...) GCC_SCANFLIKE(1,2);
4012extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
4013extern void foo(void) GCC_NORETURN;
4014int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
4015EOF
4016	cf_printf_attribute=no
4017	cf_scanf_attribute=no
4018	for cf_attribute in scanf printf unused noreturn
4019	do
4020
4021cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4022
4023		cf_directive="__attribute__(($cf_attribute))"
4024		echo "checking for $CC $cf_directive" 1>&5
4025
4026		case $cf_attribute in #(vi
4027		printf) #(vi
4028			cf_printf_attribute=yes
4029			cat >conftest.h <<EOF
4030#define GCC_$cf_ATTRIBUTE 1
4031EOF
4032			;;
4033		scanf) #(vi
4034			cf_scanf_attribute=yes
4035			cat >conftest.h <<EOF
4036#define GCC_$cf_ATTRIBUTE 1
4037EOF
4038			;;
4039		*) #(vi
4040			cat >conftest.h <<EOF
4041#define GCC_$cf_ATTRIBUTE $cf_directive
4042EOF
4043			;;
4044		esac
4045
4046		if { (eval echo "$as_me:4046: \"$ac_compile\"") >&5
4047  (eval $ac_compile) 2>&5
4048  ac_status=$?
4049  echo "$as_me:4049: \$? = $ac_status" >&5
4050  (exit $ac_status); }; then
4051			test -n "$verbose" && echo "$as_me:4051: result: ... $cf_attribute" >&5
4052echo "${ECHO_T}... $cf_attribute" >&6
4053			cat conftest.h >>confdefs.h
4054			case $cf_attribute in #(vi
4055			printf) #(vi
4056				if test "$cf_printf_attribute" = no ; then
4057					cat >>confdefs.h <<EOF
4058#define GCC_PRINTFLIKE(fmt,var) /* nothing */
4059EOF
4060				else
4061					cat >>confdefs.h <<EOF
4062#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4063EOF
4064				fi
4065				;;
4066			scanf) #(vi
4067				if test "$cf_scanf_attribute" = no ; then
4068					cat >>confdefs.h <<EOF
4069#define GCC_SCANFLIKE(fmt,var) /* nothing */
4070EOF
4071				else
4072					cat >>confdefs.h <<EOF
4073#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
4074EOF
4075				fi
4076				;;
4077			esac
4078		fi
4079	done
4080else
4081	fgrep define conftest.i >>confdefs.h
4082fi
4083rm -rf conftest*
4084fi
4085
4086INTEL_COMPILER=no
4087
4088if test "$GCC" = yes ; then
4089	case $host_os in
4090	linux*|gnu*)
4091		echo "$as_me:4091: checking if this is really Intel C compiler" >&5
4092echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
4093		cf_save_CFLAGS="$CFLAGS"
4094		CFLAGS="$CFLAGS -no-gcc"
4095		cat >conftest.$ac_ext <<_ACEOF
4096#line 4096 "configure"
4097#include "confdefs.h"
4098
4099int
4100main ()
4101{
4102
4103#ifdef __INTEL_COMPILER
4104#else
4105make an error
4106#endif
4107
4108  ;
4109  return 0;
4110}
4111_ACEOF
4112rm -f conftest.$ac_objext
4113if { (eval echo "$as_me:4113: \"$ac_compile\"") >&5
4114  (eval $ac_compile) 2>&5
4115  ac_status=$?
4116  echo "$as_me:4116: \$? = $ac_status" >&5
4117  (exit $ac_status); } &&
4118         { ac_try='test -s conftest.$ac_objext'
4119  { (eval echo "$as_me:4119: \"$ac_try\"") >&5
4120  (eval $ac_try) 2>&5
4121  ac_status=$?
4122  echo "$as_me:4122: \$? = $ac_status" >&5
4123  (exit $ac_status); }; }; then
4124  INTEL_COMPILER=yes
4125cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
4126
4127else
4128  echo "$as_me: failed program was:" >&5
4129cat conftest.$ac_ext >&5
4130fi
4131rm -f conftest.$ac_objext conftest.$ac_ext
4132		CFLAGS="$cf_save_CFLAGS"
4133		echo "$as_me:4133: result: $INTEL_COMPILER" >&5
4134echo "${ECHO_T}$INTEL_COMPILER" >&6
4135		;;
4136	esac
4137fi
4138
4139cat > conftest.$ac_ext <<EOF
4140#line 4140 "${as_me:-configure}"
4141int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4142EOF
4143
4144if test "$INTEL_COMPILER" = yes
4145then
4146# The "-wdXXX" options suppress warnings:
4147# remark #1419: external declaration in primary source file
4148# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
4149# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
4150# remark #193: zero used for undefined preprocessing identifier
4151# remark #593: variable "curs_sb_left_arrow" was set but never used
4152# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
4153# remark #869: parameter "tw" was never referenced
4154# remark #981: operands are evaluated in unspecified order
4155# warning #279: controlling expression is constant
4156
4157	{ echo "$as_me:4157: checking for $CC warning options..." >&5
4158echo "$as_me: checking for $CC warning options..." >&6;}
4159	cf_save_CFLAGS="$CFLAGS"
4160	EXTRA_CFLAGS="-Wall"
4161	for cf_opt in \
4162		wd1419 \
4163		wd1683 \
4164		wd1684 \
4165		wd193 \
4166		wd593 \
4167		wd279 \
4168		wd810 \
4169		wd869 \
4170		wd981
4171	do
4172		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4173		if { (eval echo "$as_me:4173: \"$ac_compile\"") >&5
4174  (eval $ac_compile) 2>&5
4175  ac_status=$?
4176  echo "$as_me:4176: \$? = $ac_status" >&5
4177  (exit $ac_status); }; then
4178			test -n "$verbose" && echo "$as_me:4178: result: ... -$cf_opt" >&5
4179echo "${ECHO_T}... -$cf_opt" >&6
4180			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4181		fi
4182	done
4183	CFLAGS="$cf_save_CFLAGS"
4184
4185elif test "$GCC" = yes
4186then
4187	{ echo "$as_me:4187: checking for $CC warning options..." >&5
4188echo "$as_me: checking for $CC warning options..." >&6;}
4189	cf_save_CFLAGS="$CFLAGS"
4190	EXTRA_CFLAGS=
4191	cf_warn_CONST=""
4192	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4193	for cf_opt in W Wall \
4194		Wbad-function-cast \
4195		Wcast-align \
4196		Wcast-qual \
4197		Winline \
4198		Wmissing-declarations \
4199		Wmissing-prototypes \
4200		Wnested-externs \
4201		Wpointer-arith \
4202		Wshadow \
4203		Wstrict-prototypes \
4204		Wundef $cf_warn_CONST
4205	do
4206		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4207		if { (eval echo "$as_me:4207: \"$ac_compile\"") >&5
4208  (eval $ac_compile) 2>&5
4209  ac_status=$?
4210  echo "$as_me:4210: \$? = $ac_status" >&5
4211  (exit $ac_status); }; then
4212			test -n "$verbose" && echo "$as_me:4212: result: ... -$cf_opt" >&5
4213echo "${ECHO_T}... -$cf_opt" >&6
4214			case $cf_opt in #(vi
4215			Wcast-qual) #(vi
4216				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4217				;;
4218			Winline) #(vi
4219				case $GCC_VERSION in
4220				[34].*)
4221					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
4222
4223echo "${as_me:-configure}:4223: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4224
4225					continue;;
4226				esac
4227				;;
4228			esac
4229			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4230		fi
4231	done
4232	CFLAGS="$cf_save_CFLAGS"
4233fi
4234rm -rf conftest*
4235
4236fi
4237fi
4238
4239# Check whether --with-package or --without-package was given.
4240if test "${with_package+set}" = set; then
4241  withval="$with_package"
4242  PACKAGE=$withval
4243else
4244  PACKAGE=dialog
4245fi;
4246
4247if test -f $srcdir/VERSION ; then
4248	echo "$as_me:4248: checking for package version" >&5
4249echo $ECHO_N "checking for package version... $ECHO_C" >&6
4250
4251	# if there are not enough fields, cut returns the last one...
4252	cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
4253	cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
4254	cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
4255
4256	# this is how CF_BUNDLED_INTL uses $VERSION:
4257	VERSION="$cf_field1"
4258
4259	VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
4260	test -z "$VERSION_MAJOR" && { { echo "$as_me:4260: error: missing major-version" >&5
4261echo "$as_me: error: missing major-version" >&2;}
4262   { (exit 1); exit 1; }; }
4263
4264	VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
4265	test -z "$VERSION_MINOR" && { { echo "$as_me:4265: error: missing minor-version" >&5
4266echo "$as_me: error: missing minor-version" >&2;}
4267   { (exit 1); exit 1; }; }
4268
4269	echo "$as_me:4269: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
4270echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
4271
4272	echo "$as_me:4272: checking for package patch date" >&5
4273echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
4274	VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
4275	case .$VERSION_PATCH in
4276	.)
4277		{ { echo "$as_me:4277: error: missing patch-date $VERSION_PATCH" >&5
4278echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
4279   { (exit 1); exit 1; }; }
4280		;;
4281	.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
4282		;;
4283	*)
4284		{ { echo "$as_me:4284: error: illegal patch-date $VERSION_PATCH" >&5
4285echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
4286   { (exit 1); exit 1; }; }
4287		;;
4288	esac
4289	echo "$as_me:4289: result: $VERSION_PATCH" >&5
4290echo "${ECHO_T}$VERSION_PATCH" >&6
4291else
4292	{ { echo "$as_me:4292: error: did not find $srcdir/VERSION" >&5
4293echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
4294   { (exit 1); exit 1; }; }
4295fi
4296
4297# show the actual data that we have for versions:
4298test -n "$verbose" && echo "	VERSION $VERSION" 1>&6
4299
4300echo "${as_me:-configure}:4300: testing VERSION $VERSION ..." 1>&5
4301
4302test -n "$verbose" && echo "	VERSION_MAJOR $VERSION_MAJOR" 1>&6
4303
4304echo "${as_me:-configure}:4304: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
4305
4306test -n "$verbose" && echo "	VERSION_MINOR $VERSION_MINOR" 1>&6
4307
4308echo "${as_me:-configure}:4308: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
4309
4310test -n "$verbose" && echo "	VERSION_PATCH $VERSION_PATCH" 1>&6
4311
4312echo "${as_me:-configure}:4312: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
4313
4314	cf_PACKAGE=dialog
4315	PACKAGE=$PACKAGE
4316	cat >>confdefs.h <<EOF
4317#define PACKAGE "$PACKAGE"
4318EOF
4319
4320cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4321
4322	cat >>confdefs.h <<EOF
4323#define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
4324EOF
4325
4326	cat >>confdefs.h <<EOF
4327#define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
4328EOF
4329
4330# Check whether --enable-header-subdir or --disable-header-subdir was given.
4331if test "${enable_header_subdir+set}" = set; then
4332  enableval="$enable_header_subdir"
4333  SUB_INC=$enableval
4334else
4335  SUB_INC=no
4336fi;
4337
4338EXTRAOBJS=""
4339echo "$as_me:4339: checking for ANSI C header files" >&5
4340echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4341if test "${ac_cv_header_stdc+set}" = set; then
4342  echo $ECHO_N "(cached) $ECHO_C" >&6
4343else
4344  cat >conftest.$ac_ext <<_ACEOF
4345#line 4345 "configure"
4346#include "confdefs.h"
4347#include <stdlib.h>
4348#include <stdarg.h>
4349#include <string.h>
4350#include <float.h>
4351
4352_ACEOF
4353if { (eval echo "$as_me:4353: \"$ac_cpp conftest.$ac_ext\"") >&5
4354  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4355  ac_status=$?
4356  egrep -v '^ *\+' conftest.er1 >conftest.err
4357  rm -f conftest.er1
4358  cat conftest.err >&5
4359  echo "$as_me:4359: \$? = $ac_status" >&5
4360  (exit $ac_status); } >/dev/null; then
4361  if test -s conftest.err; then
4362    ac_cpp_err=$ac_c_preproc_warn_flag
4363  else
4364    ac_cpp_err=
4365  fi
4366else
4367  ac_cpp_err=yes
4368fi
4369if test -z "$ac_cpp_err"; then
4370  ac_cv_header_stdc=yes
4371else
4372  echo "$as_me: failed program was:" >&5
4373  cat conftest.$ac_ext >&5
4374  ac_cv_header_stdc=no
4375fi
4376rm -f conftest.err conftest.$ac_ext
4377
4378if test $ac_cv_header_stdc = yes; then
4379  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4380  cat >conftest.$ac_ext <<_ACEOF
4381#line 4381 "configure"
4382#include "confdefs.h"
4383#include <string.h>
4384
4385_ACEOF
4386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4387  egrep "memchr" >/dev/null 2>&1; then
4388  :
4389else
4390  ac_cv_header_stdc=no
4391fi
4392rm -rf conftest*
4393
4394fi
4395
4396if test $ac_cv_header_stdc = yes; then
4397  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4398  cat >conftest.$ac_ext <<_ACEOF
4399#line 4399 "configure"
4400#include "confdefs.h"
4401#include <stdlib.h>
4402
4403_ACEOF
4404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4405  egrep "free" >/dev/null 2>&1; then
4406  :
4407else
4408  ac_cv_header_stdc=no
4409fi
4410rm -rf conftest*
4411
4412fi
4413
4414if test $ac_cv_header_stdc = yes; then
4415  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4416  if test "$cross_compiling" = yes; then
4417  :
4418else
4419  cat >conftest.$ac_ext <<_ACEOF
4420#line 4420 "configure"
4421#include "confdefs.h"
4422#include <ctype.h>
4423#if ((' ' & 0x0FF) == 0x020)
4424# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4425# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4426#else
4427# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4428                     || ('j' <= (c) && (c) <= 'r') \
4429                     || ('s' <= (c) && (c) <= 'z'))
4430# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4431#endif
4432
4433#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4434int
4435main ()
4436{
4437  int i;
4438  for (i = 0; i < 256; i++)
4439    if (XOR (islower (i), ISLOWER (i))
4440        || toupper (i) != TOUPPER (i))
4441      $ac_main_return(2);
4442  $ac_main_return (0);
4443}
4444_ACEOF
4445rm -f conftest$ac_exeext
4446if { (eval echo "$as_me:4446: \"$ac_link\"") >&5
4447  (eval $ac_link) 2>&5
4448  ac_status=$?
4449  echo "$as_me:4449: \$? = $ac_status" >&5
4450  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4451  { (eval echo "$as_me:4451: \"$ac_try\"") >&5
4452  (eval $ac_try) 2>&5
4453  ac_status=$?
4454  echo "$as_me:4454: \$? = $ac_status" >&5
4455  (exit $ac_status); }; }; then
4456  :
4457else
4458  echo "$as_me: program exited with status $ac_status" >&5
4459echo "$as_me: failed program was:" >&5
4460cat conftest.$ac_ext >&5
4461ac_cv_header_stdc=no
4462fi
4463rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4464fi
4465fi
4466fi
4467echo "$as_me:4467: result: $ac_cv_header_stdc" >&5
4468echo "${ECHO_T}$ac_cv_header_stdc" >&6
4469if test $ac_cv_header_stdc = yes; then
4470
4471cat >>confdefs.h <<\EOF
4472#define STDC_HEADERS 1
4473EOF
4474
4475fi
4476
4477echo "$as_me:4477: checking for inline" >&5
4478echo $ECHO_N "checking for inline... $ECHO_C" >&6
4479if test "${ac_cv_c_inline+set}" = set; then
4480  echo $ECHO_N "(cached) $ECHO_C" >&6
4481else
4482  ac_cv_c_inline=no
4483for ac_kw in inline __inline__ __inline; do
4484  cat >conftest.$ac_ext <<_ACEOF
4485#line 4485 "configure"
4486#include "confdefs.h"
4487#ifndef __cplusplus
4488static $ac_kw int static_foo () {return 0; }
4489$ac_kw int foo () {return 0; }
4490#endif
4491
4492_ACEOF
4493rm -f conftest.$ac_objext
4494if { (eval echo "$as_me:4494: \"$ac_compile\"") >&5
4495  (eval $ac_compile) 2>&5
4496  ac_status=$?
4497  echo "$as_me:4497: \$? = $ac_status" >&5
4498  (exit $ac_status); } &&
4499         { ac_try='test -s conftest.$ac_objext'
4500  { (eval echo "$as_me:4500: \"$ac_try\"") >&5
4501  (eval $ac_try) 2>&5
4502  ac_status=$?
4503  echo "$as_me:4503: \$? = $ac_status" >&5
4504  (exit $ac_status); }; }; then
4505  ac_cv_c_inline=$ac_kw; break
4506else
4507  echo "$as_me: failed program was:" >&5
4508cat conftest.$ac_ext >&5
4509fi
4510rm -f conftest.$ac_objext conftest.$ac_ext
4511done
4512
4513fi
4514echo "$as_me:4514: result: $ac_cv_c_inline" >&5
4515echo "${ECHO_T}$ac_cv_c_inline" >&6
4516case $ac_cv_c_inline in
4517  inline | yes) ;;
4518  no)
4519cat >>confdefs.h <<\EOF
4520#define inline
4521EOF
4522 ;;
4523  *)  cat >>confdefs.h <<EOF
4524#define inline $ac_cv_c_inline
4525EOF
4526 ;;
4527esac
4528
4529# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4530
4531for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4532                  inttypes.h stdint.h unistd.h
4533do
4534as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4535echo "$as_me:4535: checking for $ac_header" >&5
4536echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4537if eval "test \"\${$as_ac_Header+set}\" = set"; then
4538  echo $ECHO_N "(cached) $ECHO_C" >&6
4539else
4540  cat >conftest.$ac_ext <<_ACEOF
4541#line 4541 "configure"
4542#include "confdefs.h"
4543$ac_includes_default
4544#include <$ac_header>
4545_ACEOF
4546rm -f conftest.$ac_objext
4547if { (eval echo "$as_me:4547: \"$ac_compile\"") >&5
4548  (eval $ac_compile) 2>&5
4549  ac_status=$?
4550  echo "$as_me:4550: \$? = $ac_status" >&5
4551  (exit $ac_status); } &&
4552         { ac_try='test -s conftest.$ac_objext'
4553  { (eval echo "$as_me:4553: \"$ac_try\"") >&5
4554  (eval $ac_try) 2>&5
4555  ac_status=$?
4556  echo "$as_me:4556: \$? = $ac_status" >&5
4557  (exit $ac_status); }; }; then
4558  eval "$as_ac_Header=yes"
4559else
4560  echo "$as_me: failed program was:" >&5
4561cat conftest.$ac_ext >&5
4562eval "$as_ac_Header=no"
4563fi
4564rm -f conftest.$ac_objext conftest.$ac_ext
4565fi
4566echo "$as_me:4566: result: `eval echo '${'$as_ac_Header'}'`" >&5
4567echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4568if test `eval echo '${'$as_ac_Header'}'` = yes; then
4569  cat >>confdefs.h <<EOF
4570#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4571EOF
4572
4573fi
4574done
4575
4576echo "$as_me:4576: checking for off_t" >&5
4577echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4578if test "${ac_cv_type_off_t+set}" = set; then
4579  echo $ECHO_N "(cached) $ECHO_C" >&6
4580else
4581  cat >conftest.$ac_ext <<_ACEOF
4582#line 4582 "configure"
4583#include "confdefs.h"
4584$ac_includes_default
4585int
4586main ()
4587{
4588if ((off_t *) 0)
4589  return 0;
4590if (sizeof (off_t))
4591  return 0;
4592  ;
4593  return 0;
4594}
4595_ACEOF
4596rm -f conftest.$ac_objext
4597if { (eval echo "$as_me:4597: \"$ac_compile\"") >&5
4598  (eval $ac_compile) 2>&5
4599  ac_status=$?
4600  echo "$as_me:4600: \$? = $ac_status" >&5
4601  (exit $ac_status); } &&
4602         { ac_try='test -s conftest.$ac_objext'
4603  { (eval echo "$as_me:4603: \"$ac_try\"") >&5
4604  (eval $ac_try) 2>&5
4605  ac_status=$?
4606  echo "$as_me:4606: \$? = $ac_status" >&5
4607  (exit $ac_status); }; }; then
4608  ac_cv_type_off_t=yes
4609else
4610  echo "$as_me: failed program was:" >&5
4611cat conftest.$ac_ext >&5
4612ac_cv_type_off_t=no
4613fi
4614rm -f conftest.$ac_objext conftest.$ac_ext
4615fi
4616echo "$as_me:4616: result: $ac_cv_type_off_t" >&5
4617echo "${ECHO_T}$ac_cv_type_off_t" >&6
4618if test $ac_cv_type_off_t = yes; then
4619  :
4620else
4621
4622cat >>confdefs.h <<EOF
4623#define off_t long
4624EOF
4625
4626fi
4627
4628echo "$as_me:4628: checking for size_t" >&5
4629echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4630if test "${ac_cv_type_size_t+set}" = set; then
4631  echo $ECHO_N "(cached) $ECHO_C" >&6
4632else
4633  cat >conftest.$ac_ext <<_ACEOF
4634#line 4634 "configure"
4635#include "confdefs.h"
4636$ac_includes_default
4637int
4638main ()
4639{
4640if ((size_t *) 0)
4641  return 0;
4642if (sizeof (size_t))
4643  return 0;
4644  ;
4645  return 0;
4646}
4647_ACEOF
4648rm -f conftest.$ac_objext
4649if { (eval echo "$as_me:4649: \"$ac_compile\"") >&5
4650  (eval $ac_compile) 2>&5
4651  ac_status=$?
4652  echo "$as_me:4652: \$? = $ac_status" >&5
4653  (exit $ac_status); } &&
4654         { ac_try='test -s conftest.$ac_objext'
4655  { (eval echo "$as_me:4655: \"$ac_try\"") >&5
4656  (eval $ac_try) 2>&5
4657  ac_status=$?
4658  echo "$as_me:4658: \$? = $ac_status" >&5
4659  (exit $ac_status); }; }; then
4660  ac_cv_type_size_t=yes
4661else
4662  echo "$as_me: failed program was:" >&5
4663cat conftest.$ac_ext >&5
4664ac_cv_type_size_t=no
4665fi
4666rm -f conftest.$ac_objext conftest.$ac_ext
4667fi
4668echo "$as_me:4668: result: $ac_cv_type_size_t" >&5
4669echo "${ECHO_T}$ac_cv_type_size_t" >&6
4670if test $ac_cv_type_size_t = yes; then
4671  :
4672else
4673
4674cat >>confdefs.h <<EOF
4675#define size_t unsigned
4676EOF
4677
4678fi
4679
4680# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4681# for constant arguments.  Useless!
4682echo "$as_me:4682: checking for working alloca.h" >&5
4683echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
4684if test "${ac_cv_working_alloca_h+set}" = set; then
4685  echo $ECHO_N "(cached) $ECHO_C" >&6
4686else
4687  cat >conftest.$ac_ext <<_ACEOF
4688#line 4688 "configure"
4689#include "confdefs.h"
4690#include <alloca.h>
4691int
4692main ()
4693{
4694char *p = (char *) alloca (2 * sizeof (int));
4695  ;
4696  return 0;
4697}
4698_ACEOF
4699rm -f conftest.$ac_objext conftest$ac_exeext
4700if { (eval echo "$as_me:4700: \"$ac_link\"") >&5
4701  (eval $ac_link) 2>&5
4702  ac_status=$?
4703  echo "$as_me:4703: \$? = $ac_status" >&5
4704  (exit $ac_status); } &&
4705         { ac_try='test -s conftest$ac_exeext'
4706  { (eval echo "$as_me:4706: \"$ac_try\"") >&5
4707  (eval $ac_try) 2>&5
4708  ac_status=$?
4709  echo "$as_me:4709: \$? = $ac_status" >&5
4710  (exit $ac_status); }; }; then
4711  ac_cv_working_alloca_h=yes
4712else
4713  echo "$as_me: failed program was:" >&5
4714cat conftest.$ac_ext >&5
4715ac_cv_working_alloca_h=no
4716fi
4717rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4718fi
4719echo "$as_me:4719: result: $ac_cv_working_alloca_h" >&5
4720echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
4721if test $ac_cv_working_alloca_h = yes; then
4722
4723cat >>confdefs.h <<\EOF
4724#define HAVE_ALLOCA_H 1
4725EOF
4726
4727fi
4728
4729echo "$as_me:4729: checking for alloca" >&5
4730echo $ECHO_N "checking for alloca... $ECHO_C" >&6
4731if test "${ac_cv_func_alloca_works+set}" = set; then
4732  echo $ECHO_N "(cached) $ECHO_C" >&6
4733else
4734  cat >conftest.$ac_ext <<_ACEOF
4735#line 4735 "configure"
4736#include "confdefs.h"
4737#ifdef __GNUC__
4738# define alloca __builtin_alloca
4739#else
4740# ifdef _MSC_VER
4741#  include <malloc.h>
4742#  define alloca _alloca
4743# else
4744#  if HAVE_ALLOCA_H
4745#   include <alloca.h>
4746#  else
4747#   ifdef _AIX
4748 #pragma alloca
4749#   else
4750#    ifndef alloca /* predefined by HP cc +Olibcalls */
4751char *alloca ();
4752#    endif
4753#   endif
4754#  endif
4755# endif
4756#endif
4757
4758int
4759main ()
4760{
4761char *p = (char *) alloca (1);
4762  ;
4763  return 0;
4764}
4765_ACEOF
4766rm -f conftest.$ac_objext conftest$ac_exeext
4767if { (eval echo "$as_me:4767: \"$ac_link\"") >&5
4768  (eval $ac_link) 2>&5
4769  ac_status=$?
4770  echo "$as_me:4770: \$? = $ac_status" >&5
4771  (exit $ac_status); } &&
4772         { ac_try='test -s conftest$ac_exeext'
4773  { (eval echo "$as_me:4773: \"$ac_try\"") >&5
4774  (eval $ac_try) 2>&5
4775  ac_status=$?
4776  echo "$as_me:4776: \$? = $ac_status" >&5
4777  (exit $ac_status); }; }; then
4778  ac_cv_func_alloca_works=yes
4779else
4780  echo "$as_me: failed program was:" >&5
4781cat conftest.$ac_ext >&5
4782ac_cv_func_alloca_works=no
4783fi
4784rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4785fi
4786echo "$as_me:4786: result: $ac_cv_func_alloca_works" >&5
4787echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
4788
4789if test $ac_cv_func_alloca_works = yes; then
4790
4791cat >>confdefs.h <<\EOF
4792#define HAVE_ALLOCA 1
4793EOF
4794
4795else
4796  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4797# that cause trouble.  Some versions do not even contain alloca or
4798# contain a buggy version.  If you still want to use their alloca,
4799# use ar to extract alloca.o from them instead of compiling alloca.c.
4800
4801ALLOCA=alloca.$ac_objext
4802
4803cat >>confdefs.h <<\EOF
4804#define C_ALLOCA 1
4805EOF
4806
4807echo "$as_me:4807: checking whether \`alloca.c' needs Cray hooks" >&5
4808echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
4809if test "${ac_cv_os_cray+set}" = set; then
4810  echo $ECHO_N "(cached) $ECHO_C" >&6
4811else
4812  cat >conftest.$ac_ext <<_ACEOF
4813#line 4813 "configure"
4814#include "confdefs.h"
4815#if defined(CRAY) && ! defined(CRAY2)
4816webecray
4817#else
4818wenotbecray
4819#endif
4820
4821_ACEOF
4822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4823  egrep "webecray" >/dev/null 2>&1; then
4824  ac_cv_os_cray=yes
4825else
4826  ac_cv_os_cray=no
4827fi
4828rm -rf conftest*
4829
4830fi
4831echo "$as_me:4831: result: $ac_cv_os_cray" >&5
4832echo "${ECHO_T}$ac_cv_os_cray" >&6
4833if test $ac_cv_os_cray = yes; then
4834  for ac_func in _getb67 GETB67 getb67; do
4835    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4836echo "$as_me:4836: checking for $ac_func" >&5
4837echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4838if eval "test \"\${$as_ac_var+set}\" = set"; then
4839  echo $ECHO_N "(cached) $ECHO_C" >&6
4840else
4841  cat >conftest.$ac_ext <<_ACEOF
4842#line 4842 "configure"
4843#include "confdefs.h"
4844/* System header to define __stub macros and hopefully few prototypes,
4845    which can conflict with char $ac_func (); below.  */
4846#include <assert.h>
4847/* Override any gcc2 internal prototype to avoid an error.  */
4848#ifdef __cplusplus
4849extern "C"
4850#endif
4851/* We use char because int might match the return type of a gcc2
4852   builtin and then its argument prototype would still apply.  */
4853char $ac_func ();
4854char (*f) ();
4855
4856int
4857main ()
4858{
4859/* The GNU C library defines this for functions which it implements
4860    to always fail with ENOSYS.  Some functions are actually named
4861    something starting with __ and the normal name is an alias.  */
4862#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4863choke me
4864#else
4865f = $ac_func;
4866#endif
4867
4868  ;
4869  return 0;
4870}
4871_ACEOF
4872rm -f conftest.$ac_objext conftest$ac_exeext
4873if { (eval echo "$as_me:4873: \"$ac_link\"") >&5
4874  (eval $ac_link) 2>&5
4875  ac_status=$?
4876  echo "$as_me:4876: \$? = $ac_status" >&5
4877  (exit $ac_status); } &&
4878         { ac_try='test -s conftest$ac_exeext'
4879  { (eval echo "$as_me:4879: \"$ac_try\"") >&5
4880  (eval $ac_try) 2>&5
4881  ac_status=$?
4882  echo "$as_me:4882: \$? = $ac_status" >&5
4883  (exit $ac_status); }; }; then
4884  eval "$as_ac_var=yes"
4885else
4886  echo "$as_me: failed program was:" >&5
4887cat conftest.$ac_ext >&5
4888eval "$as_ac_var=no"
4889fi
4890rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4891fi
4892echo "$as_me:4892: result: `eval echo '${'$as_ac_var'}'`" >&5
4893echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4894if test `eval echo '${'$as_ac_var'}'` = yes; then
4895
4896cat >>confdefs.h <<EOF
4897#define CRAY_STACKSEG_END $ac_func
4898EOF
4899
4900    break
4901fi
4902
4903  done
4904fi
4905
4906echo "$as_me:4906: checking stack direction for C alloca" >&5
4907echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
4908if test "${ac_cv_c_stack_direction+set}" = set; then
4909  echo $ECHO_N "(cached) $ECHO_C" >&6
4910else
4911  if test "$cross_compiling" = yes; then
4912  ac_cv_c_stack_direction=0
4913else
4914  cat >conftest.$ac_ext <<_ACEOF
4915#line 4915 "configure"
4916#include "confdefs.h"
4917int
4918find_stack_direction ()
4919{
4920  static char *addr = 0;
4921  auto char dummy;
4922  if (addr == 0)
4923    {
4924      addr = &dummy;
4925      return find_stack_direction ();
4926    }
4927  else
4928    return (&dummy > addr) ? 1 : -1;
4929}
4930
4931int
4932main ()
4933{
4934  $ac_main_return (find_stack_direction () < 0);
4935}
4936_ACEOF
4937rm -f conftest$ac_exeext
4938if { (eval echo "$as_me:4938: \"$ac_link\"") >&5
4939  (eval $ac_link) 2>&5
4940  ac_status=$?
4941  echo "$as_me:4941: \$? = $ac_status" >&5
4942  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4943  { (eval echo "$as_me:4943: \"$ac_try\"") >&5
4944  (eval $ac_try) 2>&5
4945  ac_status=$?
4946  echo "$as_me:4946: \$? = $ac_status" >&5
4947  (exit $ac_status); }; }; then
4948  ac_cv_c_stack_direction=1
4949else
4950  echo "$as_me: program exited with status $ac_status" >&5
4951echo "$as_me: failed program was:" >&5
4952cat conftest.$ac_ext >&5
4953ac_cv_c_stack_direction=-1
4954fi
4955rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4956fi
4957fi
4958echo "$as_me:4958: result: $ac_cv_c_stack_direction" >&5
4959echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
4960
4961cat >>confdefs.h <<EOF
4962#define STACK_DIRECTION $ac_cv_c_stack_direction
4963EOF
4964
4965fi
4966
4967for ac_header in stdlib.h unistd.h
4968do
4969as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4970echo "$as_me:4970: checking for $ac_header" >&5
4971echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4972if eval "test \"\${$as_ac_Header+set}\" = set"; then
4973  echo $ECHO_N "(cached) $ECHO_C" >&6
4974else
4975  cat >conftest.$ac_ext <<_ACEOF
4976#line 4976 "configure"
4977#include "confdefs.h"
4978#include <$ac_header>
4979_ACEOF
4980if { (eval echo "$as_me:4980: \"$ac_cpp conftest.$ac_ext\"") >&5
4981  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4982  ac_status=$?
4983  egrep -v '^ *\+' conftest.er1 >conftest.err
4984  rm -f conftest.er1
4985  cat conftest.err >&5
4986  echo "$as_me:4986: \$? = $ac_status" >&5
4987  (exit $ac_status); } >/dev/null; then
4988  if test -s conftest.err; then
4989    ac_cpp_err=$ac_c_preproc_warn_flag
4990  else
4991    ac_cpp_err=
4992  fi
4993else
4994  ac_cpp_err=yes
4995fi
4996if test -z "$ac_cpp_err"; then
4997  eval "$as_ac_Header=yes"
4998else
4999  echo "$as_me: failed program was:" >&5
5000  cat conftest.$ac_ext >&5
5001  eval "$as_ac_Header=no"
5002fi
5003rm -f conftest.err conftest.$ac_ext
5004fi
5005echo "$as_me:5005: result: `eval echo '${'$as_ac_Header'}'`" >&5
5006echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5007if test `eval echo '${'$as_ac_Header'}'` = yes; then
5008  cat >>confdefs.h <<EOF
5009#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5010EOF
5011
5012fi
5013done
5014
5015for ac_func in getpagesize
5016do
5017as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5018echo "$as_me:5018: checking for $ac_func" >&5
5019echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5020if eval "test \"\${$as_ac_var+set}\" = set"; then
5021  echo $ECHO_N "(cached) $ECHO_C" >&6
5022else
5023  cat >conftest.$ac_ext <<_ACEOF
5024#line 5024 "configure"
5025#include "confdefs.h"
5026/* System header to define __stub macros and hopefully few prototypes,
5027    which can conflict with char $ac_func (); below.  */
5028#include <assert.h>
5029/* Override any gcc2 internal prototype to avoid an error.  */
5030#ifdef __cplusplus
5031extern "C"
5032#endif
5033/* We use char because int might match the return type of a gcc2
5034   builtin and then its argument prototype would still apply.  */
5035char $ac_func ();
5036char (*f) ();
5037
5038int
5039main ()
5040{
5041/* The GNU C library defines this for functions which it implements
5042    to always fail with ENOSYS.  Some functions are actually named
5043    something starting with __ and the normal name is an alias.  */
5044#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5045choke me
5046#else
5047f = $ac_func;
5048#endif
5049
5050  ;
5051  return 0;
5052}
5053_ACEOF
5054rm -f conftest.$ac_objext conftest$ac_exeext
5055if { (eval echo "$as_me:5055: \"$ac_link\"") >&5
5056  (eval $ac_link) 2>&5
5057  ac_status=$?
5058  echo "$as_me:5058: \$? = $ac_status" >&5
5059  (exit $ac_status); } &&
5060         { ac_try='test -s conftest$ac_exeext'
5061  { (eval echo "$as_me:5061: \"$ac_try\"") >&5
5062  (eval $ac_try) 2>&5
5063  ac_status=$?
5064  echo "$as_me:5064: \$? = $ac_status" >&5
5065  (exit $ac_status); }; }; then
5066  eval "$as_ac_var=yes"
5067else
5068  echo "$as_me: failed program was:" >&5
5069cat conftest.$ac_ext >&5
5070eval "$as_ac_var=no"
5071fi
5072rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5073fi
5074echo "$as_me:5074: result: `eval echo '${'$as_ac_var'}'`" >&5
5075echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5076if test `eval echo '${'$as_ac_var'}'` = yes; then
5077  cat >>confdefs.h <<EOF
5078#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5079EOF
5080
5081fi
5082done
5083
5084echo "$as_me:5084: checking for working mmap" >&5
5085echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5086if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5087  echo $ECHO_N "(cached) $ECHO_C" >&6
5088else
5089  if test "$cross_compiling" = yes; then
5090  ac_cv_func_mmap_fixed_mapped=no
5091else
5092  cat >conftest.$ac_ext <<_ACEOF
5093#line 5093 "configure"
5094#include "confdefs.h"
5095$ac_includes_default
5096/* Thanks to Mike Haertel and Jim Avera for this test.
5097   Here is a matrix of mmap possibilities:
5098	mmap private not fixed
5099	mmap private fixed at somewhere currently unmapped
5100	mmap private fixed at somewhere already mapped
5101	mmap shared not fixed
5102	mmap shared fixed at somewhere currently unmapped
5103	mmap shared fixed at somewhere already mapped
5104   For private mappings, we should verify that changes cannot be read()
5105   back from the file, nor mmap's back from the file at a different
5106   address.  (There have been systems where private was not correctly
5107   implemented like the infamous i386 svr4.0, and systems where the
5108   VM page cache was not coherent with the file system buffer cache
5109   like early versions of FreeBSD and possibly contemporary NetBSD.)
5110   For shared mappings, we should conversely verify that changes get
5111   propogated back to all the places they're supposed to be.
5112
5113   Grep wants private fixed already mapped.
5114   The main things grep needs to know about mmap are:
5115   * does it exist and is it safe to write into the mmap'd area
5116   * how to use it (BSD variants)  */
5117
5118#include <fcntl.h>
5119#include <sys/mman.h>
5120
5121#if !STDC_HEADERS && !HAVE_STDLIB_H
5122char *malloc ();
5123#endif
5124
5125/* This mess was copied from the GNU getpagesize.h.  */
5126#if !HAVE_GETPAGESIZE
5127/* Assume that all systems that can run configure have sys/param.h.  */
5128# if !HAVE_SYS_PARAM_H
5129#  define HAVE_SYS_PARAM_H 1
5130# endif
5131
5132# ifdef _SC_PAGESIZE
5133#  define getpagesize() sysconf(_SC_PAGESIZE)
5134# else /* no _SC_PAGESIZE */
5135#  if HAVE_SYS_PARAM_H
5136#   include <sys/param.h>
5137#   ifdef EXEC_PAGESIZE
5138#    define getpagesize() EXEC_PAGESIZE
5139#   else /* no EXEC_PAGESIZE */
5140#    ifdef NBPG
5141#     define getpagesize() NBPG * CLSIZE
5142#     ifndef CLSIZE
5143#      define CLSIZE 1
5144#     endif /* no CLSIZE */
5145#    else /* no NBPG */
5146#     ifdef NBPC
5147#      define getpagesize() NBPC
5148#     else /* no NBPC */
5149#      ifdef PAGESIZE
5150#       define getpagesize() PAGESIZE
5151#      endif /* PAGESIZE */
5152#     endif /* no NBPC */
5153#    endif /* no NBPG */
5154#   endif /* no EXEC_PAGESIZE */
5155#  else /* no HAVE_SYS_PARAM_H */
5156#   define getpagesize() 8192	/* punt totally */
5157#  endif /* no HAVE_SYS_PARAM_H */
5158# endif /* no _SC_PAGESIZE */
5159
5160#endif /* no HAVE_GETPAGESIZE */
5161
5162int
5163main ()
5164{
5165  char *data, *data2, *data3;
5166  int i, pagesize;
5167  int fd;
5168
5169  pagesize = getpagesize ();
5170
5171  /* First, make a file with some known garbage in it. */
5172  data = (char *) malloc (pagesize);
5173  if (!data)
5174    $ac_main_return (1);
5175  for (i = 0; i < pagesize; ++i)
5176    *(data + i) = rand ();
5177  umask (0);
5178  fd = creat ("conftest.mmap", 0600);
5179  if (fd < 0)
5180    $ac_main_return (1);
5181  if (write (fd, data, pagesize) != pagesize)
5182    $ac_main_return (1);
5183  close (fd);
5184
5185  /* Next, try to mmap the file at a fixed address which already has
5186     something else allocated at it.  If we can, also make sure that
5187     we see the same garbage.  */
5188  fd = open ("conftest.mmap", O_RDWR);
5189  if (fd < 0)
5190    $ac_main_return (1);
5191  data2 = (char *) malloc (2 * pagesize);
5192  if (!data2)
5193    $ac_main_return (1);
5194  data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5195  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5196                     MAP_PRIVATE | MAP_FIXED, fd, 0L))
5197    $ac_main_return (1);
5198  for (i = 0; i < pagesize; ++i)
5199    if (*(data + i) != *(data2 + i))
5200      $ac_main_return (1);
5201
5202  /* Finally, make sure that changes to the mapped area do not
5203     percolate back to the file as seen by read().  (This is a bug on
5204     some variants of i386 svr4.0.)  */
5205  for (i = 0; i < pagesize; ++i)
5206    *(data2 + i) = *(data2 + i) + 1;
5207  data3 = (char *) malloc (pagesize);
5208  if (!data3)
5209    $ac_main_return (1);
5210  if (read (fd, data3, pagesize) != pagesize)
5211    $ac_main_return (1);
5212  for (i = 0; i < pagesize; ++i)
5213    if (*(data + i) != *(data3 + i))
5214      $ac_main_return (1);
5215  close (fd);
5216  $ac_main_return (0);
5217}
5218_ACEOF
5219rm -f conftest$ac_exeext
5220if { (eval echo "$as_me:5220: \"$ac_link\"") >&5
5221  (eval $ac_link) 2>&5
5222  ac_status=$?
5223  echo "$as_me:5223: \$? = $ac_status" >&5
5224  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5225  { (eval echo "$as_me:5225: \"$ac_try\"") >&5
5226  (eval $ac_try) 2>&5
5227  ac_status=$?
5228  echo "$as_me:5228: \$? = $ac_status" >&5
5229  (exit $ac_status); }; }; then
5230  ac_cv_func_mmap_fixed_mapped=yes
5231else
5232  echo "$as_me: program exited with status $ac_status" >&5
5233echo "$as_me: failed program was:" >&5
5234cat conftest.$ac_ext >&5
5235ac_cv_func_mmap_fixed_mapped=no
5236fi
5237rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5238fi
5239fi
5240echo "$as_me:5240: result: $ac_cv_func_mmap_fixed_mapped" >&5
5241echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
5242if test $ac_cv_func_mmap_fixed_mapped = yes; then
5243
5244cat >>confdefs.h <<\EOF
5245#define HAVE_MMAP 1
5246EOF
5247
5248fi
5249rm -f conftest.mmap
5250
5251    echo "$as_me:5251: checking whether we are using the GNU C Library 2.1 or newer" >&5
5252echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
5253if test "${ac_cv_gnu_library_2_1+set}" = set; then
5254  echo $ECHO_N "(cached) $ECHO_C" >&6
5255else
5256  cat >conftest.$ac_ext <<_ACEOF
5257#line 5257 "configure"
5258#include "confdefs.h"
5259
5260#include <features.h>
5261#ifdef __GNU_LIBRARY__
5262 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5263  Lucky GNU user
5264 #endif
5265#endif
5266
5267_ACEOF
5268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5269  egrep "Lucky GNU user" >/dev/null 2>&1; then
5270  ac_cv_gnu_library_2_1=yes
5271else
5272  ac_cv_gnu_library_2_1=no
5273fi
5274rm -rf conftest*
5275
5276fi
5277echo "$as_me:5277: result: $ac_cv_gnu_library_2_1" >&5
5278echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
5279
5280    GLIBC21="$ac_cv_gnu_library_2_1"
5281
5282cf_makefile=makefile
5283
5284test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
5285
5286# Allow override of "config.h" definition:
5287: ${CONFIG_H:=config.h}
5288
5289if test -z "$PACKAGE" ; then
5290	{ { echo "$as_me:5290: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
5291echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
5292   { (exit 1); exit 1; }; }
5293fi
5294
5295if test -z "$VERSION" ; then
5296if test -f $srcdir/VERSION ; then
5297	VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
5298else
5299	VERSION=unknown
5300fi
5301fi
5302
5303for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5304stdlib.h string.h unistd.h sys/param.h
5305do
5306as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5307echo "$as_me:5307: checking for $ac_header" >&5
5308echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5309if eval "test \"\${$as_ac_Header+set}\" = set"; then
5310  echo $ECHO_N "(cached) $ECHO_C" >&6
5311else
5312  cat >conftest.$ac_ext <<_ACEOF
5313#line 5313 "configure"
5314#include "confdefs.h"
5315#include <$ac_header>
5316_ACEOF
5317if { (eval echo "$as_me:5317: \"$ac_cpp conftest.$ac_ext\"") >&5
5318  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5319  ac_status=$?
5320  egrep -v '^ *\+' conftest.er1 >conftest.err
5321  rm -f conftest.er1
5322  cat conftest.err >&5
5323  echo "$as_me:5323: \$? = $ac_status" >&5
5324  (exit $ac_status); } >/dev/null; then
5325  if test -s conftest.err; then
5326    ac_cpp_err=$ac_c_preproc_warn_flag
5327  else
5328    ac_cpp_err=
5329  fi
5330else
5331  ac_cpp_err=yes
5332fi
5333if test -z "$ac_cpp_err"; then
5334  eval "$as_ac_Header=yes"
5335else
5336  echo "$as_me: failed program was:" >&5
5337  cat conftest.$ac_ext >&5
5338  eval "$as_ac_Header=no"
5339fi
5340rm -f conftest.err conftest.$ac_ext
5341fi
5342echo "$as_me:5342: result: `eval echo '${'$as_ac_Header'}'`" >&5
5343echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5344if test `eval echo '${'$as_ac_Header'}'` = yes; then
5345  cat >>confdefs.h <<EOF
5346#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5347EOF
5348
5349fi
5350done
5351
5352for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5353getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5354strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5355do
5356as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5357echo "$as_me:5357: checking for $ac_func" >&5
5358echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5359if eval "test \"\${$as_ac_var+set}\" = set"; then
5360  echo $ECHO_N "(cached) $ECHO_C" >&6
5361else
5362  cat >conftest.$ac_ext <<_ACEOF
5363#line 5363 "configure"
5364#include "confdefs.h"
5365/* System header to define __stub macros and hopefully few prototypes,
5366    which can conflict with char $ac_func (); below.  */
5367#include <assert.h>
5368/* Override any gcc2 internal prototype to avoid an error.  */
5369#ifdef __cplusplus
5370extern "C"
5371#endif
5372/* We use char because int might match the return type of a gcc2
5373   builtin and then its argument prototype would still apply.  */
5374char $ac_func ();
5375char (*f) ();
5376
5377int
5378main ()
5379{
5380/* The GNU C library defines this for functions which it implements
5381    to always fail with ENOSYS.  Some functions are actually named
5382    something starting with __ and the normal name is an alias.  */
5383#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5384choke me
5385#else
5386f = $ac_func;
5387#endif
5388
5389  ;
5390  return 0;
5391}
5392_ACEOF
5393rm -f conftest.$ac_objext conftest$ac_exeext
5394if { (eval echo "$as_me:5394: \"$ac_link\"") >&5
5395  (eval $ac_link) 2>&5
5396  ac_status=$?
5397  echo "$as_me:5397: \$? = $ac_status" >&5
5398  (exit $ac_status); } &&
5399         { ac_try='test -s conftest$ac_exeext'
5400  { (eval echo "$as_me:5400: \"$ac_try\"") >&5
5401  (eval $ac_try) 2>&5
5402  ac_status=$?
5403  echo "$as_me:5403: \$? = $ac_status" >&5
5404  (exit $ac_status); }; }; then
5405  eval "$as_ac_var=yes"
5406else
5407  echo "$as_me: failed program was:" >&5
5408cat conftest.$ac_ext >&5
5409eval "$as_ac_var=no"
5410fi
5411rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5412fi
5413echo "$as_me:5413: result: `eval echo '${'$as_ac_var'}'`" >&5
5414echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5415if test `eval echo '${'$as_ac_var'}'` = yes; then
5416  cat >>confdefs.h <<EOF
5417#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5418EOF
5419
5420fi
5421done
5422
5423# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5424if test "${with_libiconv_prefix+set}" = set; then
5425  withval="$with_libiconv_prefix"
5426
5427  case "$withval" in #(vi
5428  no) #(vi
5429      ;;
5430  yes) #(vi
5431      ;;
5432  *)
5433
5434for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
5435	if test -d $cf_searchpath/include; then
5436
5437if test -n "$cf_searchpath/include" ; then
5438  for cf_add_incdir in $cf_searchpath/include
5439  do
5440	while test $cf_add_incdir != /usr/include
5441	do
5442	  if test -d $cf_add_incdir
5443	  then
5444		cf_have_incdir=no
5445		if test -n "$CFLAGS$CPPFLAGS" ; then
5446		  # a loop is needed to ensure we can add subdirs of existing dirs
5447		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5448			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5449			  cf_have_incdir=yes; break
5450			fi
5451		  done
5452		fi
5453
5454		if test "$cf_have_incdir" = no ; then
5455		  if test "$cf_add_incdir" = /usr/local/include ; then
5456			if test "$GCC" = yes
5457			then
5458			  cf_save_CPPFLAGS=$CPPFLAGS
5459			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5460			  cat >conftest.$ac_ext <<_ACEOF
5461#line 5461 "configure"
5462#include "confdefs.h"
5463#include <stdio.h>
5464int
5465main ()
5466{
5467printf("Hello")
5468  ;
5469  return 0;
5470}
5471_ACEOF
5472rm -f conftest.$ac_objext
5473if { (eval echo "$as_me:5473: \"$ac_compile\"") >&5
5474  (eval $ac_compile) 2>&5
5475  ac_status=$?
5476  echo "$as_me:5476: \$? = $ac_status" >&5
5477  (exit $ac_status); } &&
5478         { ac_try='test -s conftest.$ac_objext'
5479  { (eval echo "$as_me:5479: \"$ac_try\"") >&5
5480  (eval $ac_try) 2>&5
5481  ac_status=$?
5482  echo "$as_me:5482: \$? = $ac_status" >&5
5483  (exit $ac_status); }; }; then
5484  :
5485else
5486  echo "$as_me: failed program was:" >&5
5487cat conftest.$ac_ext >&5
5488cf_have_incdir=yes
5489fi
5490rm -f conftest.$ac_objext conftest.$ac_ext
5491			  CPPFLAGS=$cf_save_CPPFLAGS
5492			fi
5493		  fi
5494		fi
5495
5496		if test "$cf_have_incdir" = no ; then
5497		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
5498
5499echo "${as_me:-configure}:5499: testing adding $cf_add_incdir to include-path ..." 1>&5
5500
5501		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5502
5503		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5504		  test "$cf_top_incdir" = "$cf_add_incdir" && break
5505		  cf_add_incdir="$cf_top_incdir"
5506		else
5507		  break
5508		fi
5509	  fi
5510	done
5511  done
5512fi
5513
5514	elif test -d $cf_searchpath/../include ; then
5515
5516if test -n "$cf_searchpath/../include" ; then
5517  for cf_add_incdir in $cf_searchpath/../include
5518  do
5519	while test $cf_add_incdir != /usr/include
5520	do
5521	  if test -d $cf_add_incdir
5522	  then
5523		cf_have_incdir=no
5524		if test -n "$CFLAGS$CPPFLAGS" ; then
5525		  # a loop is needed to ensure we can add subdirs of existing dirs
5526		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5527			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5528			  cf_have_incdir=yes; break
5529			fi
5530		  done
5531		fi
5532
5533		if test "$cf_have_incdir" = no ; then
5534		  if test "$cf_add_incdir" = /usr/local/include ; then
5535			if test "$GCC" = yes
5536			then
5537			  cf_save_CPPFLAGS=$CPPFLAGS
5538			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5539			  cat >conftest.$ac_ext <<_ACEOF
5540#line 5540 "configure"
5541#include "confdefs.h"
5542#include <stdio.h>
5543int
5544main ()
5545{
5546printf("Hello")
5547  ;
5548  return 0;
5549}
5550_ACEOF
5551rm -f conftest.$ac_objext
5552if { (eval echo "$as_me:5552: \"$ac_compile\"") >&5
5553  (eval $ac_compile) 2>&5
5554  ac_status=$?
5555  echo "$as_me:5555: \$? = $ac_status" >&5
5556  (exit $ac_status); } &&
5557         { ac_try='test -s conftest.$ac_objext'
5558  { (eval echo "$as_me:5558: \"$ac_try\"") >&5
5559  (eval $ac_try) 2>&5
5560  ac_status=$?
5561  echo "$as_me:5561: \$? = $ac_status" >&5
5562  (exit $ac_status); }; }; then
5563  :
5564else
5565  echo "$as_me: failed program was:" >&5
5566cat conftest.$ac_ext >&5
5567cf_have_incdir=yes
5568fi
5569rm -f conftest.$ac_objext conftest.$ac_ext
5570			  CPPFLAGS=$cf_save_CPPFLAGS
5571			fi
5572		  fi
5573		fi
5574
5575		if test "$cf_have_incdir" = no ; then
5576		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
5577
5578echo "${as_me:-configure}:5578: testing adding $cf_add_incdir to include-path ..." 1>&5
5579
5580		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5581
5582		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5583		  test "$cf_top_incdir" = "$cf_add_incdir" && break
5584		  cf_add_incdir="$cf_top_incdir"
5585		else
5586		  break
5587		fi
5588	  fi
5589	done
5590  done
5591fi
5592
5593	else
5594{ { echo "$as_me:5594: error: cannot find libiconv under $withval" >&5
5595echo "$as_me: error: cannot find libiconv under $withval" >&2;}
5596   { (exit 1); exit 1; }; }
5597	fi
5598	if test -d $cf_searchpath/lib; then
5599
5600if test -n "$cf_searchpath/lib" ; then
5601  for cf_add_libdir in $cf_searchpath/lib
5602  do
5603    if test $cf_add_libdir = /usr/lib ; then
5604      :
5605    elif test -d $cf_add_libdir
5606    then
5607      cf_have_libdir=no
5608      if test -n "$LDFLAGS$LIBS" ; then
5609        # a loop is needed to ensure we can add subdirs of existing dirs
5610        for cf_test_libdir in $LDFLAGS $LIBS ; do
5611          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5612            cf_have_libdir=yes; break
5613          fi
5614        done
5615      fi
5616      if test "$cf_have_libdir" = no ; then
5617        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
5618
5619echo "${as_me:-configure}:5619: testing adding $cf_add_libdir to library-path ..." 1>&5
5620
5621        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5622      fi
5623    fi
5624  done
5625fi
5626
5627	elif test -d $cf_searchpath ; then
5628
5629if test -n "$cf_searchpath" ; then
5630  for cf_add_libdir in $cf_searchpath
5631  do
5632    if test $cf_add_libdir = /usr/lib ; then
5633      :
5634    elif test -d $cf_add_libdir
5635    then
5636      cf_have_libdir=no
5637      if test -n "$LDFLAGS$LIBS" ; then
5638        # a loop is needed to ensure we can add subdirs of existing dirs
5639        for cf_test_libdir in $LDFLAGS $LIBS ; do
5640          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5641            cf_have_libdir=yes; break
5642          fi
5643        done
5644      fi
5645      if test "$cf_have_libdir" = no ; then
5646        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
5647
5648echo "${as_me:-configure}:5648: testing adding $cf_add_libdir to library-path ..." 1>&5
5649
5650        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5651      fi
5652    fi
5653  done
5654fi
5655
5656	else
5657{ { echo "$as_me:5657: error: cannot find libiconv under $withval" >&5
5658echo "$as_me: error: cannot find libiconv under $withval" >&2;}
5659   { (exit 1); exit 1; }; }
5660	fi
5661done
5662
5663      ;;
5664  esac
5665
5666fi;
5667
5668  echo "$as_me:5668: checking for iconv" >&5
5669echo $ECHO_N "checking for iconv... $ECHO_C" >&6
5670if test "${am_cv_func_iconv+set}" = set; then
5671  echo $ECHO_N "(cached) $ECHO_C" >&6
5672else
5673
5674# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5675# will be set on completion of the AC_TRY_LINK below.
5676cf_cv_header_path_iconv=
5677cf_cv_library_path_iconv=
5678
5679echo "${as_me:-configure}:5679: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
5680
5681cf_save_LIBS="$LIBS"
5682
5683cat >conftest.$ac_ext <<_ACEOF
5684#line 5684 "configure"
5685#include "confdefs.h"
5686
5687#include <stdlib.h>
5688#include <iconv.h>
5689
5690int
5691main ()
5692{
5693
5694	iconv_t cd = iconv_open("","");
5695	iconv(cd,NULL,NULL,NULL,NULL);
5696	iconv_close(cd);
5697
5698  ;
5699  return 0;
5700}
5701_ACEOF
5702rm -f conftest.$ac_objext conftest$ac_exeext
5703if { (eval echo "$as_me:5703: \"$ac_link\"") >&5
5704  (eval $ac_link) 2>&5
5705  ac_status=$?
5706  echo "$as_me:5706: \$? = $ac_status" >&5
5707  (exit $ac_status); } &&
5708         { ac_try='test -s conftest$ac_exeext'
5709  { (eval echo "$as_me:5709: \"$ac_try\"") >&5
5710  (eval $ac_try) 2>&5
5711  ac_status=$?
5712  echo "$as_me:5712: \$? = $ac_status" >&5
5713  (exit $ac_status); }; }; then
5714
5715	cf_cv_find_linkage_iconv=yes
5716	cf_cv_header_path_iconv=/usr/include
5717	cf_cv_library_path_iconv=/usr/lib
5718
5719else
5720  echo "$as_me: failed program was:" >&5
5721cat conftest.$ac_ext >&5
5722
5723LIBS="-liconv  $cf_save_LIBS"
5724
5725cat >conftest.$ac_ext <<_ACEOF
5726#line 5726 "configure"
5727#include "confdefs.h"
5728
5729#include <stdlib.h>
5730#include <iconv.h>
5731
5732int
5733main ()
5734{
5735
5736	iconv_t cd = iconv_open("","");
5737	iconv(cd,NULL,NULL,NULL,NULL);
5738	iconv_close(cd);
5739
5740  ;
5741  return 0;
5742}
5743_ACEOF
5744rm -f conftest.$ac_objext conftest$ac_exeext
5745if { (eval echo "$as_me:5745: \"$ac_link\"") >&5
5746  (eval $ac_link) 2>&5
5747  ac_status=$?
5748  echo "$as_me:5748: \$? = $ac_status" >&5
5749  (exit $ac_status); } &&
5750         { ac_try='test -s conftest$ac_exeext'
5751  { (eval echo "$as_me:5751: \"$ac_try\"") >&5
5752  (eval $ac_try) 2>&5
5753  ac_status=$?
5754  echo "$as_me:5754: \$? = $ac_status" >&5
5755  (exit $ac_status); }; }; then
5756
5757	cf_cv_find_linkage_iconv=yes
5758	cf_cv_header_path_iconv=/usr/include
5759	cf_cv_library_path_iconv=/usr/lib
5760	cf_cv_library_file_iconv="-liconv"
5761
5762else
5763  echo "$as_me: failed program was:" >&5
5764cat conftest.$ac_ext >&5
5765
5766	cf_cv_find_linkage_iconv=no
5767	LIBS="$cf_save_LIBS"
5768
5769    test -n "$verbose" && echo "	find linkage for iconv library" 1>&6
5770
5771echo "${as_me:-configure}:5771: testing find linkage for iconv library ..." 1>&5
5772
5773echo "${as_me:-configure}:5773: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
5774
5775    cf_save_CPPFLAGS="$CPPFLAGS"
5776    cf_test_CPPFLAGS="$CPPFLAGS"
5777
5778cf_search=
5779
5780# collect the current set of include-directories from compiler flags
5781cf_header_path_list=""
5782if test -n "${CFLAGS}${CPPFLAGS}" ; then
5783	for cf_header_path in $CPPFLAGS $CFLAGS
5784	do
5785		case $cf_header_path in #(vi
5786		-I*)
5787			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5788
5789test "$cf_header_path" != "NONE" && \
5790test -d "$cf_header_path" && \
5791 {
5792	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
5793	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
5794	test -d $cf_header_path/include/iconv &&       cf_search="$cf_search $cf_header_path/include/iconv"
5795	test -d $cf_header_path/include/iconv/include &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
5796	test -d $cf_header_path/iconv/include &&       cf_search="$cf_search $cf_header_path/iconv/include"
5797	test -d $cf_header_path/iconv/include/iconv &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
5798}
5799
5800			cf_header_path_list="$cf_header_path_list $cf_search"
5801			;;
5802		esac
5803	done
5804fi
5805
5806# add the variations for the package we are looking for
5807
5808cf_search=
5809
5810test "/usr" != "$prefix" && \
5811test -d "/usr" && \
5812(test $prefix = NONE || test "/usr" != "$prefix") && {
5813	test -n "$verbose" && echo "	... testing for include-directories under /usr"
5814	test -d /usr/include &&          cf_search="$cf_search /usr/include"
5815	test -d /usr/include/iconv &&       cf_search="$cf_search /usr/include/iconv"
5816	test -d /usr/include/iconv/include &&    cf_search="$cf_search /usr/include/iconv/include"
5817	test -d /usr/iconv/include &&       cf_search="$cf_search /usr/iconv/include"
5818	test -d /usr/iconv/include/iconv &&    cf_search="$cf_search /usr/iconv/include/iconv"
5819}
5820
5821test "$prefix" != "NONE" && \
5822test -d "$prefix" && \
5823 {
5824	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
5825	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
5826	test -d $prefix/include/iconv &&       cf_search="$cf_search $prefix/include/iconv"
5827	test -d $prefix/include/iconv/include &&    cf_search="$cf_search $prefix/include/iconv/include"
5828	test -d $prefix/iconv/include &&       cf_search="$cf_search $prefix/iconv/include"
5829	test -d $prefix/iconv/include/iconv &&    cf_search="$cf_search $prefix/iconv/include/iconv"
5830}
5831
5832test "/usr/local" != "$prefix" && \
5833test -d "/usr/local" && \
5834(test $prefix = NONE || test "/usr/local" != "$prefix") && {
5835	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
5836	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
5837	test -d /usr/local/include/iconv &&       cf_search="$cf_search /usr/local/include/iconv"
5838	test -d /usr/local/include/iconv/include &&    cf_search="$cf_search /usr/local/include/iconv/include"
5839	test -d /usr/local/iconv/include &&       cf_search="$cf_search /usr/local/iconv/include"
5840	test -d /usr/local/iconv/include/iconv &&    cf_search="$cf_search /usr/local/iconv/include/iconv"
5841}
5842
5843test "/opt" != "$prefix" && \
5844test -d "/opt" && \
5845(test $prefix = NONE || test "/opt" != "$prefix") && {
5846	test -n "$verbose" && echo "	... testing for include-directories under /opt"
5847	test -d /opt/include &&          cf_search="$cf_search /opt/include"
5848	test -d /opt/include/iconv &&       cf_search="$cf_search /opt/include/iconv"
5849	test -d /opt/include/iconv/include &&    cf_search="$cf_search /opt/include/iconv/include"
5850	test -d /opt/iconv/include &&       cf_search="$cf_search /opt/iconv/include"
5851	test -d /opt/iconv/include/iconv &&    cf_search="$cf_search /opt/iconv/include/iconv"
5852}
5853
5854test "$HOME" != "$prefix" && \
5855test -d "$HOME" && \
5856(test $prefix = NONE || test "$HOME" != "$prefix") && {
5857	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
5858	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
5859	test -d $HOME/include/iconv &&       cf_search="$cf_search $HOME/include/iconv"
5860	test -d $HOME/include/iconv/include &&    cf_search="$cf_search $HOME/include/iconv/include"
5861	test -d $HOME/iconv/include &&       cf_search="$cf_search $HOME/iconv/include"
5862	test -d $HOME/iconv/include/iconv &&    cf_search="$cf_search $HOME/iconv/include/iconv"
5863}
5864
5865test "$includedir" != NONE && \
5866test "$includedir" != "/usr/include" && \
5867test -d "$includedir" && {
5868	test -d $includedir &&    cf_search="$cf_search $includedir"
5869	test -d $includedir/iconv && cf_search="$cf_search $includedir/iconv"
5870}
5871
5872test "$oldincludedir" != NONE && \
5873test "$oldincludedir" != "/usr/include" && \
5874test -d "$oldincludedir" && {
5875	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
5876	test -d $oldincludedir/iconv && cf_search="$cf_search $oldincludedir/iconv"
5877}
5878
5879cf_search="$cf_search $cf_header_path_list"
5880
5881    for cf_cv_header_path_iconv in $cf_search
5882    do
5883      if test -d $cf_cv_header_path_iconv ; then
5884        test -n "$verbose" && echo "	... testing $cf_cv_header_path_iconv" 1>&6
5885
5886echo "${as_me:-configure}:5886: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
5887
5888        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_iconv"
5889        cat >conftest.$ac_ext <<_ACEOF
5890#line 5890 "configure"
5891#include "confdefs.h"
5892
5893#include <stdlib.h>
5894#include <iconv.h>
5895
5896int
5897main ()
5898{
5899
5900	iconv_t cd = iconv_open("","");
5901	iconv(cd,NULL,NULL,NULL,NULL);
5902	iconv_close(cd);
5903
5904  ;
5905  return 0;
5906}
5907_ACEOF
5908rm -f conftest.$ac_objext
5909if { (eval echo "$as_me:5909: \"$ac_compile\"") >&5
5910  (eval $ac_compile) 2>&5
5911  ac_status=$?
5912  echo "$as_me:5912: \$? = $ac_status" >&5
5913  (exit $ac_status); } &&
5914         { ac_try='test -s conftest.$ac_objext'
5915  { (eval echo "$as_me:5915: \"$ac_try\"") >&5
5916  (eval $ac_try) 2>&5
5917  ac_status=$?
5918  echo "$as_me:5918: \$? = $ac_status" >&5
5919  (exit $ac_status); }; }; then
5920
5921            test -n "$verbose" && echo "	... found iconv headers in $cf_cv_header_path_iconv" 1>&6
5922
5923echo "${as_me:-configure}:5923: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
5924
5925            cf_cv_find_linkage_iconv=maybe
5926            cf_test_CPPFLAGS="$CPPFLAGS"
5927            break
5928else
5929  echo "$as_me: failed program was:" >&5
5930cat conftest.$ac_ext >&5
5931
5932            CPPFLAGS="$cf_save_CPPFLAGS"
5933
5934fi
5935rm -f conftest.$ac_objext conftest.$ac_ext
5936      fi
5937    done
5938
5939    if test "$cf_cv_find_linkage_iconv" = maybe ; then
5940
5941echo "${as_me:-configure}:5941: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
5942
5943      cf_save_LIBS="$LIBS"
5944      cf_save_LDFLAGS="$LDFLAGS"
5945
5946      if test "$cf_cv_find_linkage_iconv" != yes ; then
5947
5948cf_search=
5949cf_library_path_list=""
5950if test -n "${LDFLAGS}${LIBS}" ; then
5951	for cf_library_path in $LDFLAGS $LIBS
5952	do
5953		case $cf_library_path in #(vi
5954		-L*)
5955			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5956
5957test "$cf_library_path" != "NONE" && \
5958test -d "$cf_library_path" && \
5959 {
5960	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
5961	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5962	test -d $cf_library_path/lib/iconv &&       cf_search="$cf_search $cf_library_path/lib/iconv"
5963	test -d $cf_library_path/lib/iconv/lib &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
5964	test -d $cf_library_path/iconv/lib &&       cf_search="$cf_search $cf_library_path/iconv/lib"
5965	test -d $cf_library_path/iconv/lib/iconv &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
5966}
5967
5968			cf_library_path_list="$cf_library_path_list $cf_search"
5969			;;
5970		esac
5971	done
5972fi
5973
5974cf_search=
5975
5976test "/usr" != "$prefix" && \
5977test -d "/usr" && \
5978(test $prefix = NONE || test "/usr" != "$prefix") && {
5979	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
5980	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5981	test -d /usr/lib/iconv &&       cf_search="$cf_search /usr/lib/iconv"
5982	test -d /usr/lib/iconv/lib &&    cf_search="$cf_search /usr/lib/iconv/lib"
5983	test -d /usr/iconv/lib &&       cf_search="$cf_search /usr/iconv/lib"
5984	test -d /usr/iconv/lib/iconv &&    cf_search="$cf_search /usr/iconv/lib/iconv"
5985}
5986
5987test "$prefix" != "NONE" && \
5988test -d "$prefix" && \
5989 {
5990	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
5991	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5992	test -d $prefix/lib/iconv &&       cf_search="$cf_search $prefix/lib/iconv"
5993	test -d $prefix/lib/iconv/lib &&    cf_search="$cf_search $prefix/lib/iconv/lib"
5994	test -d $prefix/iconv/lib &&       cf_search="$cf_search $prefix/iconv/lib"
5995	test -d $prefix/iconv/lib/iconv &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
5996}
5997
5998test "/usr/local" != "$prefix" && \
5999test -d "/usr/local" && \
6000(test $prefix = NONE || test "/usr/local" != "$prefix") && {
6001	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
6002	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6003	test -d /usr/local/lib/iconv &&       cf_search="$cf_search /usr/local/lib/iconv"
6004	test -d /usr/local/lib/iconv/lib &&    cf_search="$cf_search /usr/local/lib/iconv/lib"
6005	test -d /usr/local/iconv/lib &&       cf_search="$cf_search /usr/local/iconv/lib"
6006	test -d /usr/local/iconv/lib/iconv &&    cf_search="$cf_search /usr/local/iconv/lib/iconv"
6007}
6008
6009test "/opt" != "$prefix" && \
6010test -d "/opt" && \
6011(test $prefix = NONE || test "/opt" != "$prefix") && {
6012	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
6013	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6014	test -d /opt/lib/iconv &&       cf_search="$cf_search /opt/lib/iconv"
6015	test -d /opt/lib/iconv/lib &&    cf_search="$cf_search /opt/lib/iconv/lib"
6016	test -d /opt/iconv/lib &&       cf_search="$cf_search /opt/iconv/lib"
6017	test -d /opt/iconv/lib/iconv &&    cf_search="$cf_search /opt/iconv/lib/iconv"
6018}
6019
6020test "$HOME" != "$prefix" && \
6021test -d "$HOME" && \
6022(test $prefix = NONE || test "$HOME" != "$prefix") && {
6023	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
6024	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6025	test -d $HOME/lib/iconv &&       cf_search="$cf_search $HOME/lib/iconv"
6026	test -d $HOME/lib/iconv/lib &&    cf_search="$cf_search $HOME/lib/iconv/lib"
6027	test -d $HOME/iconv/lib &&       cf_search="$cf_search $HOME/iconv/lib"
6028	test -d $HOME/iconv/lib/iconv &&    cf_search="$cf_search $HOME/iconv/lib/iconv"
6029}
6030
6031cf_search="$cf_library_path_list $cf_search"
6032
6033        for cf_cv_library_path_iconv in $cf_search
6034        do
6035          if test -d $cf_cv_library_path_iconv ; then
6036            test -n "$verbose" && echo "	... testing $cf_cv_library_path_iconv" 1>&6
6037
6038echo "${as_me:-configure}:6038: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
6039
6040            CPPFLAGS="$cf_test_CPPFLAGS"
6041            LIBS="-liconv  $cf_save_LIBS"
6042            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
6043            cat >conftest.$ac_ext <<_ACEOF
6044#line 6044 "configure"
6045#include "confdefs.h"
6046
6047#include <stdlib.h>
6048#include <iconv.h>
6049
6050int
6051main ()
6052{
6053
6054	iconv_t cd = iconv_open("","");
6055	iconv(cd,NULL,NULL,NULL,NULL);
6056	iconv_close(cd);
6057
6058  ;
6059  return 0;
6060}
6061_ACEOF
6062rm -f conftest.$ac_objext conftest$ac_exeext
6063if { (eval echo "$as_me:6063: \"$ac_link\"") >&5
6064  (eval $ac_link) 2>&5
6065  ac_status=$?
6066  echo "$as_me:6066: \$? = $ac_status" >&5
6067  (exit $ac_status); } &&
6068         { ac_try='test -s conftest$ac_exeext'
6069  { (eval echo "$as_me:6069: \"$ac_try\"") >&5
6070  (eval $ac_try) 2>&5
6071  ac_status=$?
6072  echo "$as_me:6072: \$? = $ac_status" >&5
6073  (exit $ac_status); }; }; then
6074
6075                test -n "$verbose" && echo "	... found iconv library in $cf_cv_library_path_iconv" 1>&6
6076
6077echo "${as_me:-configure}:6077: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
6078
6079                cf_cv_find_linkage_iconv=yes
6080                cf_cv_library_file_iconv="-liconv"
6081                break
6082else
6083  echo "$as_me: failed program was:" >&5
6084cat conftest.$ac_ext >&5
6085
6086                CPPFLAGS="$cf_save_CPPFLAGS"
6087                LIBS="$cf_save_LIBS"
6088                LDFLAGS="$cf_save_LDFLAGS"
6089
6090fi
6091rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6092          fi
6093        done
6094        CPPFLAGS="$cf_save_CPPFLAGS"
6095        LDFLAGS="$cf_save_LDFLAGS"
6096      fi
6097
6098    else
6099      cf_cv_find_linkage_iconv=no
6100    fi
6101
6102fi
6103rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6104
6105fi
6106rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6107
6108LIBS="$cf_save_LIBS"
6109
6110if test "$cf_cv_find_linkage_iconv" = yes ; then
6111am_cv_func_iconv=yes
6112else
6113am_cv_func_iconv="no, consider installing GNU libiconv"
6114fi
6115
6116fi
6117echo "$as_me:6117: result: $am_cv_func_iconv" >&5
6118echo "${ECHO_T}$am_cv_func_iconv" >&6
6119
6120  if test "$am_cv_func_iconv" = yes; then
6121
6122cat >>confdefs.h <<\EOF
6123#define HAVE_ICONV 1
6124EOF
6125
6126    echo "$as_me:6126: checking if the declaration of iconv() needs const." >&5
6127echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
6128if test "${am_cv_proto_iconv_const+set}" = set; then
6129  echo $ECHO_N "(cached) $ECHO_C" >&6
6130else
6131
6132      cat >conftest.$ac_ext <<_ACEOF
6133#line 6133 "configure"
6134#include "confdefs.h"
6135
6136#include <stdlib.h>
6137#include <iconv.h>
6138
6139extern
6140#ifdef __cplusplus
6141"C"
6142#endif
6143#if defined(__STDC__) || defined(__cplusplus)
6144size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6145#else
6146size_t iconv();
6147#endif
6148
6149int
6150main ()
6151{
6152
6153  ;
6154  return 0;
6155}
6156_ACEOF
6157rm -f conftest.$ac_objext
6158if { (eval echo "$as_me:6158: \"$ac_compile\"") >&5
6159  (eval $ac_compile) 2>&5
6160  ac_status=$?
6161  echo "$as_me:6161: \$? = $ac_status" >&5
6162  (exit $ac_status); } &&
6163         { ac_try='test -s conftest.$ac_objext'
6164  { (eval echo "$as_me:6164: \"$ac_try\"") >&5
6165  (eval $ac_try) 2>&5
6166  ac_status=$?
6167  echo "$as_me:6167: \$? = $ac_status" >&5
6168  (exit $ac_status); }; }; then
6169  am_cv_proto_iconv_const=no
6170else
6171  echo "$as_me: failed program was:" >&5
6172cat conftest.$ac_ext >&5
6173am_cv_proto_iconv_const=yes
6174fi
6175rm -f conftest.$ac_objext conftest.$ac_ext
6176fi
6177echo "$as_me:6177: result: $am_cv_proto_iconv_const" >&5
6178echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
6179
6180    if test "$am_cv_proto_iconv_const" = yes ; then
6181      am_cv_proto_iconv_arg1="const"
6182    else
6183      am_cv_proto_iconv_arg1=""
6184    fi
6185
6186cat >>confdefs.h <<EOF
6187#define ICONV_CONST $am_cv_proto_iconv_arg1
6188EOF
6189
6190  fi
6191
6192  LIBICONV=
6193  if test "$cf_cv_find_linkage_iconv" = yes; then
6194
6195if test -n "$cf_cv_header_path_iconv" ; then
6196  for cf_add_incdir in $cf_cv_header_path_iconv
6197  do
6198	while test $cf_add_incdir != /usr/include
6199	do
6200	  if test -d $cf_add_incdir
6201	  then
6202		cf_have_incdir=no
6203		if test -n "$CFLAGS$CPPFLAGS" ; then
6204		  # a loop is needed to ensure we can add subdirs of existing dirs
6205		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6206			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6207			  cf_have_incdir=yes; break
6208			fi
6209		  done
6210		fi
6211
6212		if test "$cf_have_incdir" = no ; then
6213		  if test "$cf_add_incdir" = /usr/local/include ; then
6214			if test "$GCC" = yes
6215			then
6216			  cf_save_CPPFLAGS=$CPPFLAGS
6217			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6218			  cat >conftest.$ac_ext <<_ACEOF
6219#line 6219 "configure"
6220#include "confdefs.h"
6221#include <stdio.h>
6222int
6223main ()
6224{
6225printf("Hello")
6226  ;
6227  return 0;
6228}
6229_ACEOF
6230rm -f conftest.$ac_objext
6231if { (eval echo "$as_me:6231: \"$ac_compile\"") >&5
6232  (eval $ac_compile) 2>&5
6233  ac_status=$?
6234  echo "$as_me:6234: \$? = $ac_status" >&5
6235  (exit $ac_status); } &&
6236         { ac_try='test -s conftest.$ac_objext'
6237  { (eval echo "$as_me:6237: \"$ac_try\"") >&5
6238  (eval $ac_try) 2>&5
6239  ac_status=$?
6240  echo "$as_me:6240: \$? = $ac_status" >&5
6241  (exit $ac_status); }; }; then
6242  :
6243else
6244  echo "$as_me: failed program was:" >&5
6245cat conftest.$ac_ext >&5
6246cf_have_incdir=yes
6247fi
6248rm -f conftest.$ac_objext conftest.$ac_ext
6249			  CPPFLAGS=$cf_save_CPPFLAGS
6250			fi
6251		  fi
6252		fi
6253
6254		if test "$cf_have_incdir" = no ; then
6255		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
6256
6257echo "${as_me:-configure}:6257: testing adding $cf_add_incdir to include-path ..." 1>&5
6258
6259		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6260
6261		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6262		  test "$cf_top_incdir" = "$cf_add_incdir" && break
6263		  cf_add_incdir="$cf_top_incdir"
6264		else
6265		  break
6266		fi
6267	  fi
6268	done
6269  done
6270fi
6271
6272    if test -n "$cf_cv_library_file_iconv" ; then
6273      LIBICONV="-liconv"
6274
6275if test -n "$cf_cv_library_path_iconv" ; then
6276  for cf_add_libdir in $cf_cv_library_path_iconv
6277  do
6278    if test $cf_add_libdir = /usr/lib ; then
6279      :
6280    elif test -d $cf_add_libdir
6281    then
6282      cf_have_libdir=no
6283      if test -n "$LDFLAGS$LIBS" ; then
6284        # a loop is needed to ensure we can add subdirs of existing dirs
6285        for cf_test_libdir in $LDFLAGS $LIBS ; do
6286          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6287            cf_have_libdir=yes; break
6288          fi
6289        done
6290      fi
6291      if test "$cf_have_libdir" = no ; then
6292        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
6293
6294echo "${as_me:-configure}:6294: testing adding $cf_add_libdir to library-path ..." 1>&5
6295
6296        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6297      fi
6298    fi
6299  done
6300fi
6301
6302    fi
6303  fi
6304
6305  echo "$as_me:6305: checking for nl_langinfo and CODESET" >&5
6306echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6307if test "${am_cv_langinfo_codeset+set}" = set; then
6308  echo $ECHO_N "(cached) $ECHO_C" >&6
6309else
6310  cat >conftest.$ac_ext <<_ACEOF
6311#line 6311 "configure"
6312#include "confdefs.h"
6313#include <langinfo.h>
6314int
6315main ()
6316{
6317char* cs = nl_langinfo(CODESET);
6318  ;
6319  return 0;
6320}
6321_ACEOF
6322rm -f conftest.$ac_objext conftest$ac_exeext
6323if { (eval echo "$as_me:6323: \"$ac_link\"") >&5
6324  (eval $ac_link) 2>&5
6325  ac_status=$?
6326  echo "$as_me:6326: \$? = $ac_status" >&5
6327  (exit $ac_status); } &&
6328         { ac_try='test -s conftest$ac_exeext'
6329  { (eval echo "$as_me:6329: \"$ac_try\"") >&5
6330  (eval $ac_try) 2>&5
6331  ac_status=$?
6332  echo "$as_me:6332: \$? = $ac_status" >&5
6333  (exit $ac_status); }; }; then
6334  am_cv_langinfo_codeset=yes
6335else
6336  echo "$as_me: failed program was:" >&5
6337cat conftest.$ac_ext >&5
6338am_cv_langinfo_codeset=no
6339fi
6340rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6341
6342fi
6343echo "$as_me:6343: result: $am_cv_langinfo_codeset" >&5
6344echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6345  if test $am_cv_langinfo_codeset = yes; then
6346
6347cat >>confdefs.h <<\EOF
6348#define HAVE_LANGINFO_CODESET 1
6349EOF
6350
6351  fi
6352
6353   if test $ac_cv_header_locale_h = yes; then
6354    echo "$as_me:6354: checking for LC_MESSAGES" >&5
6355echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
6356if test "${am_cv_val_LC_MESSAGES+set}" = set; then
6357  echo $ECHO_N "(cached) $ECHO_C" >&6
6358else
6359  cat >conftest.$ac_ext <<_ACEOF
6360#line 6360 "configure"
6361#include "confdefs.h"
6362#include <locale.h>
6363int
6364main ()
6365{
6366return LC_MESSAGES
6367  ;
6368  return 0;
6369}
6370_ACEOF
6371rm -f conftest.$ac_objext conftest$ac_exeext
6372if { (eval echo "$as_me:6372: \"$ac_link\"") >&5
6373  (eval $ac_link) 2>&5
6374  ac_status=$?
6375  echo "$as_me:6375: \$? = $ac_status" >&5
6376  (exit $ac_status); } &&
6377         { ac_try='test -s conftest$ac_exeext'
6378  { (eval echo "$as_me:6378: \"$ac_try\"") >&5
6379  (eval $ac_try) 2>&5
6380  ac_status=$?
6381  echo "$as_me:6381: \$? = $ac_status" >&5
6382  (exit $ac_status); }; }; then
6383  am_cv_val_LC_MESSAGES=yes
6384else
6385  echo "$as_me: failed program was:" >&5
6386cat conftest.$ac_ext >&5
6387am_cv_val_LC_MESSAGES=no
6388fi
6389rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6390fi
6391echo "$as_me:6391: result: $am_cv_val_LC_MESSAGES" >&5
6392echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
6393    if test $am_cv_val_LC_MESSAGES = yes; then
6394
6395cat >>confdefs.h <<\EOF
6396#define HAVE_LC_MESSAGES 1
6397EOF
6398
6399    fi
6400  fi
6401   echo "$as_me:6401: checking whether NLS is requested" >&5
6402echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
6403
6404# Check whether --enable-nls or --disable-nls was given.
6405if test "${enable_nls+set}" = set; then
6406  enableval="$enable_nls"
6407  USE_NLS=$enableval
6408else
6409  USE_NLS=no
6410fi;
6411  echo "$as_me:6411: result: $USE_NLS" >&5
6412echo "${ECHO_T}$USE_NLS" >&6
6413
6414  BUILD_INCLUDED_LIBINTL=no
6415  USE_INCLUDED_LIBINTL=no
6416  INTLLIBS=
6417
6418    if test "$USE_NLS" = "yes"; then
6419
6420cat >>confdefs.h <<\EOF
6421#define ENABLE_NLS 1
6422EOF
6423
6424    echo "$as_me:6424: checking whether included gettext is requested" >&5
6425echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
6426
6427# Check whether --with-included-gettext or --without-included-gettext was given.
6428if test "${with_included_gettext+set}" = set; then
6429  withval="$with_included_gettext"
6430  nls_cv_force_use_gnu_gettext=$withval
6431else
6432  nls_cv_force_use_gnu_gettext=no
6433fi;
6434    echo "$as_me:6434: result: $nls_cv_force_use_gnu_gettext" >&5
6435echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
6436
6437    nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6438    if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6439                        CATOBJEXT=NONE
6440
6441      cf_save_LIBS_1="$LIBS"
6442      LIBS="$LIBICONV $LIBS"
6443      echo "$as_me:6443: checking for libintl.h and gettext()" >&5
6444echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
6445if test "${cf_cv_func_gettext+set}" = set; then
6446  echo $ECHO_N "(cached) $ECHO_C" >&6
6447else
6448
6449# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6450# will be set on completion of the AC_TRY_LINK below.
6451cf_cv_header_path_intl=
6452cf_cv_library_path_intl=
6453
6454echo "${as_me:-configure}:6454: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
6455
6456cf_save_LIBS="$LIBS"
6457
6458cat >conftest.$ac_ext <<_ACEOF
6459#line 6459 "configure"
6460#include "confdefs.h"
6461
6462#include <libintl.h>
6463extern int _nl_msg_cat_cntr;
6464
6465int
6466main ()
6467{
6468
6469    bindtextdomain ("", "");
6470    return (int) gettext ("")
6471
6472             + _nl_msg_cat_cntr
6473
6474  ;
6475  return 0;
6476}
6477_ACEOF
6478rm -f conftest.$ac_objext conftest$ac_exeext
6479if { (eval echo "$as_me:6479: \"$ac_link\"") >&5
6480  (eval $ac_link) 2>&5
6481  ac_status=$?
6482  echo "$as_me:6482: \$? = $ac_status" >&5
6483  (exit $ac_status); } &&
6484         { ac_try='test -s conftest$ac_exeext'
6485  { (eval echo "$as_me:6485: \"$ac_try\"") >&5
6486  (eval $ac_try) 2>&5
6487  ac_status=$?
6488  echo "$as_me:6488: \$? = $ac_status" >&5
6489  (exit $ac_status); }; }; then
6490
6491	cf_cv_find_linkage_intl=yes
6492	cf_cv_header_path_intl=/usr/include
6493	cf_cv_library_path_intl=/usr/lib
6494
6495else
6496  echo "$as_me: failed program was:" >&5
6497cat conftest.$ac_ext >&5
6498
6499LIBS="-lintl  $cf_save_LIBS"
6500
6501cat >conftest.$ac_ext <<_ACEOF
6502#line 6502 "configure"
6503#include "confdefs.h"
6504
6505#include <libintl.h>
6506extern int _nl_msg_cat_cntr;
6507
6508int
6509main ()
6510{
6511
6512    bindtextdomain ("", "");
6513    return (int) gettext ("")
6514
6515             + _nl_msg_cat_cntr
6516
6517  ;
6518  return 0;
6519}
6520_ACEOF
6521rm -f conftest.$ac_objext conftest$ac_exeext
6522if { (eval echo "$as_me:6522: \"$ac_link\"") >&5
6523  (eval $ac_link) 2>&5
6524  ac_status=$?
6525  echo "$as_me:6525: \$? = $ac_status" >&5
6526  (exit $ac_status); } &&
6527         { ac_try='test -s conftest$ac_exeext'
6528  { (eval echo "$as_me:6528: \"$ac_try\"") >&5
6529  (eval $ac_try) 2>&5
6530  ac_status=$?
6531  echo "$as_me:6531: \$? = $ac_status" >&5
6532  (exit $ac_status); }; }; then
6533
6534	cf_cv_find_linkage_intl=yes
6535	cf_cv_header_path_intl=/usr/include
6536	cf_cv_library_path_intl=/usr/lib
6537	cf_cv_library_file_intl="-lintl"
6538
6539else
6540  echo "$as_me: failed program was:" >&5
6541cat conftest.$ac_ext >&5
6542
6543	cf_cv_find_linkage_intl=no
6544	LIBS="$cf_save_LIBS"
6545
6546    test -n "$verbose" && echo "	find linkage for intl library" 1>&6
6547
6548echo "${as_me:-configure}:6548: testing find linkage for intl library ..." 1>&5
6549
6550echo "${as_me:-configure}:6550: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
6551
6552    cf_save_CPPFLAGS="$CPPFLAGS"
6553    cf_test_CPPFLAGS="$CPPFLAGS"
6554
6555cf_search=
6556
6557# collect the current set of include-directories from compiler flags
6558cf_header_path_list=""
6559if test -n "${CFLAGS}${CPPFLAGS}" ; then
6560	for cf_header_path in $CPPFLAGS $CFLAGS
6561	do
6562		case $cf_header_path in #(vi
6563		-I*)
6564			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6565
6566test "$cf_header_path" != "NONE" && \
6567test -d "$cf_header_path" && \
6568 {
6569	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
6570	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6571	test -d $cf_header_path/include/intl &&       cf_search="$cf_search $cf_header_path/include/intl"
6572	test -d $cf_header_path/include/intl/include &&    cf_search="$cf_search $cf_header_path/include/intl/include"
6573	test -d $cf_header_path/intl/include &&       cf_search="$cf_search $cf_header_path/intl/include"
6574	test -d $cf_header_path/intl/include/intl &&    cf_search="$cf_search $cf_header_path/intl/include/intl"
6575}
6576
6577			cf_header_path_list="$cf_header_path_list $cf_search"
6578			;;
6579		esac
6580	done
6581fi
6582
6583# add the variations for the package we are looking for
6584
6585cf_search=
6586
6587test "/usr" != "$prefix" && \
6588test -d "/usr" && \
6589(test $prefix = NONE || test "/usr" != "$prefix") && {
6590	test -n "$verbose" && echo "	... testing for include-directories under /usr"
6591	test -d /usr/include &&          cf_search="$cf_search /usr/include"
6592	test -d /usr/include/intl &&       cf_search="$cf_search /usr/include/intl"
6593	test -d /usr/include/intl/include &&    cf_search="$cf_search /usr/include/intl/include"
6594	test -d /usr/intl/include &&       cf_search="$cf_search /usr/intl/include"
6595	test -d /usr/intl/include/intl &&    cf_search="$cf_search /usr/intl/include/intl"
6596}
6597
6598test "$prefix" != "NONE" && \
6599test -d "$prefix" && \
6600 {
6601	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
6602	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6603	test -d $prefix/include/intl &&       cf_search="$cf_search $prefix/include/intl"
6604	test -d $prefix/include/intl/include &&    cf_search="$cf_search $prefix/include/intl/include"
6605	test -d $prefix/intl/include &&       cf_search="$cf_search $prefix/intl/include"
6606	test -d $prefix/intl/include/intl &&    cf_search="$cf_search $prefix/intl/include/intl"
6607}
6608
6609test "/usr/local" != "$prefix" && \
6610test -d "/usr/local" && \
6611(test $prefix = NONE || test "/usr/local" != "$prefix") && {
6612	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
6613	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6614	test -d /usr/local/include/intl &&       cf_search="$cf_search /usr/local/include/intl"
6615	test -d /usr/local/include/intl/include &&    cf_search="$cf_search /usr/local/include/intl/include"
6616	test -d /usr/local/intl/include &&       cf_search="$cf_search /usr/local/intl/include"
6617	test -d /usr/local/intl/include/intl &&    cf_search="$cf_search /usr/local/intl/include/intl"
6618}
6619
6620test "/opt" != "$prefix" && \
6621test -d "/opt" && \
6622(test $prefix = NONE || test "/opt" != "$prefix") && {
6623	test -n "$verbose" && echo "	... testing for include-directories under /opt"
6624	test -d /opt/include &&          cf_search="$cf_search /opt/include"
6625	test -d /opt/include/intl &&       cf_search="$cf_search /opt/include/intl"
6626	test -d /opt/include/intl/include &&    cf_search="$cf_search /opt/include/intl/include"
6627	test -d /opt/intl/include &&       cf_search="$cf_search /opt/intl/include"
6628	test -d /opt/intl/include/intl &&    cf_search="$cf_search /opt/intl/include/intl"
6629}
6630
6631test "$HOME" != "$prefix" && \
6632test -d "$HOME" && \
6633(test $prefix = NONE || test "$HOME" != "$prefix") && {
6634	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
6635	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6636	test -d $HOME/include/intl &&       cf_search="$cf_search $HOME/include/intl"
6637	test -d $HOME/include/intl/include &&    cf_search="$cf_search $HOME/include/intl/include"
6638	test -d $HOME/intl/include &&       cf_search="$cf_search $HOME/intl/include"
6639	test -d $HOME/intl/include/intl &&    cf_search="$cf_search $HOME/intl/include/intl"
6640}
6641
6642test "$includedir" != NONE && \
6643test "$includedir" != "/usr/include" && \
6644test -d "$includedir" && {
6645	test -d $includedir &&    cf_search="$cf_search $includedir"
6646	test -d $includedir/intl && cf_search="$cf_search $includedir/intl"
6647}
6648
6649test "$oldincludedir" != NONE && \
6650test "$oldincludedir" != "/usr/include" && \
6651test -d "$oldincludedir" && {
6652	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6653	test -d $oldincludedir/intl && cf_search="$cf_search $oldincludedir/intl"
6654}
6655
6656cf_search="$cf_search $cf_header_path_list"
6657
6658    for cf_cv_header_path_intl in $cf_search
6659    do
6660      if test -d $cf_cv_header_path_intl ; then
6661        test -n "$verbose" && echo "	... testing $cf_cv_header_path_intl" 1>&6
6662
6663echo "${as_me:-configure}:6663: testing ... testing $cf_cv_header_path_intl ..." 1>&5
6664
6665        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_intl"
6666        cat >conftest.$ac_ext <<_ACEOF
6667#line 6667 "configure"
6668#include "confdefs.h"
6669
6670#include <libintl.h>
6671extern int _nl_msg_cat_cntr;
6672
6673int
6674main ()
6675{
6676
6677    bindtextdomain ("", "");
6678    return (int) gettext ("")
6679
6680             + _nl_msg_cat_cntr
6681
6682  ;
6683  return 0;
6684}
6685_ACEOF
6686rm -f conftest.$ac_objext
6687if { (eval echo "$as_me:6687: \"$ac_compile\"") >&5
6688  (eval $ac_compile) 2>&5
6689  ac_status=$?
6690  echo "$as_me:6690: \$? = $ac_status" >&5
6691  (exit $ac_status); } &&
6692         { ac_try='test -s conftest.$ac_objext'
6693  { (eval echo "$as_me:6693: \"$ac_try\"") >&5
6694  (eval $ac_try) 2>&5
6695  ac_status=$?
6696  echo "$as_me:6696: \$? = $ac_status" >&5
6697  (exit $ac_status); }; }; then
6698
6699            test -n "$verbose" && echo "	... found intl headers in $cf_cv_header_path_intl" 1>&6
6700
6701echo "${as_me:-configure}:6701: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
6702
6703            cf_cv_find_linkage_intl=maybe
6704            cf_test_CPPFLAGS="$CPPFLAGS"
6705            break
6706else
6707  echo "$as_me: failed program was:" >&5
6708cat conftest.$ac_ext >&5
6709
6710            CPPFLAGS="$cf_save_CPPFLAGS"
6711
6712fi
6713rm -f conftest.$ac_objext conftest.$ac_ext
6714      fi
6715    done
6716
6717    if test "$cf_cv_find_linkage_intl" = maybe ; then
6718
6719echo "${as_me:-configure}:6719: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
6720
6721      cf_save_LIBS="$LIBS"
6722      cf_save_LDFLAGS="$LDFLAGS"
6723
6724      if test "$cf_cv_find_linkage_intl" != yes ; then
6725
6726cf_search=
6727cf_library_path_list=""
6728if test -n "${LDFLAGS}${LIBS}" ; then
6729	for cf_library_path in $LDFLAGS $LIBS
6730	do
6731		case $cf_library_path in #(vi
6732		-L*)
6733			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6734
6735test "$cf_library_path" != "NONE" && \
6736test -d "$cf_library_path" && \
6737 {
6738	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
6739	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6740	test -d $cf_library_path/lib/intl &&       cf_search="$cf_search $cf_library_path/lib/intl"
6741	test -d $cf_library_path/lib/intl/lib &&    cf_search="$cf_search $cf_library_path/lib/intl/lib"
6742	test -d $cf_library_path/intl/lib &&       cf_search="$cf_search $cf_library_path/intl/lib"
6743	test -d $cf_library_path/intl/lib/intl &&    cf_search="$cf_search $cf_library_path/intl/lib/intl"
6744}
6745
6746			cf_library_path_list="$cf_library_path_list $cf_search"
6747			;;
6748		esac
6749	done
6750fi
6751
6752cf_search=
6753
6754test "/usr" != "$prefix" && \
6755test -d "/usr" && \
6756(test $prefix = NONE || test "/usr" != "$prefix") && {
6757	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
6758	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6759	test -d /usr/lib/intl &&       cf_search="$cf_search /usr/lib/intl"
6760	test -d /usr/lib/intl/lib &&    cf_search="$cf_search /usr/lib/intl/lib"
6761	test -d /usr/intl/lib &&       cf_search="$cf_search /usr/intl/lib"
6762	test -d /usr/intl/lib/intl &&    cf_search="$cf_search /usr/intl/lib/intl"
6763}
6764
6765test "$prefix" != "NONE" && \
6766test -d "$prefix" && \
6767 {
6768	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
6769	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6770	test -d $prefix/lib/intl &&       cf_search="$cf_search $prefix/lib/intl"
6771	test -d $prefix/lib/intl/lib &&    cf_search="$cf_search $prefix/lib/intl/lib"
6772	test -d $prefix/intl/lib &&       cf_search="$cf_search $prefix/intl/lib"
6773	test -d $prefix/intl/lib/intl &&    cf_search="$cf_search $prefix/intl/lib/intl"
6774}
6775
6776test "/usr/local" != "$prefix" && \
6777test -d "/usr/local" && \
6778(test $prefix = NONE || test "/usr/local" != "$prefix") && {
6779	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
6780	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6781	test -d /usr/local/lib/intl &&       cf_search="$cf_search /usr/local/lib/intl"
6782	test -d /usr/local/lib/intl/lib &&    cf_search="$cf_search /usr/local/lib/intl/lib"
6783	test -d /usr/local/intl/lib &&       cf_search="$cf_search /usr/local/intl/lib"
6784	test -d /usr/local/intl/lib/intl &&    cf_search="$cf_search /usr/local/intl/lib/intl"
6785}
6786
6787test "/opt" != "$prefix" && \
6788test -d "/opt" && \
6789(test $prefix = NONE || test "/opt" != "$prefix") && {
6790	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
6791	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6792	test -d /opt/lib/intl &&       cf_search="$cf_search /opt/lib/intl"
6793	test -d /opt/lib/intl/lib &&    cf_search="$cf_search /opt/lib/intl/lib"
6794	test -d /opt/intl/lib &&       cf_search="$cf_search /opt/intl/lib"
6795	test -d /opt/intl/lib/intl &&    cf_search="$cf_search /opt/intl/lib/intl"
6796}
6797
6798test "$HOME" != "$prefix" && \
6799test -d "$HOME" && \
6800(test $prefix = NONE || test "$HOME" != "$prefix") && {
6801	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
6802	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6803	test -d $HOME/lib/intl &&       cf_search="$cf_search $HOME/lib/intl"
6804	test -d $HOME/lib/intl/lib &&    cf_search="$cf_search $HOME/lib/intl/lib"
6805	test -d $HOME/intl/lib &&       cf_search="$cf_search $HOME/intl/lib"
6806	test -d $HOME/intl/lib/intl &&    cf_search="$cf_search $HOME/intl/lib/intl"
6807}
6808
6809cf_search="$cf_library_path_list $cf_search"
6810
6811        for cf_cv_library_path_intl in $cf_search
6812        do
6813          if test -d $cf_cv_library_path_intl ; then
6814            test -n "$verbose" && echo "	... testing $cf_cv_library_path_intl" 1>&6
6815
6816echo "${as_me:-configure}:6816: testing ... testing $cf_cv_library_path_intl ..." 1>&5
6817
6818            CPPFLAGS="$cf_test_CPPFLAGS"
6819            LIBS="-lintl  $cf_save_LIBS"
6820            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
6821            cat >conftest.$ac_ext <<_ACEOF
6822#line 6822 "configure"
6823#include "confdefs.h"
6824
6825#include <libintl.h>
6826extern int _nl_msg_cat_cntr;
6827
6828int
6829main ()
6830{
6831
6832    bindtextdomain ("", "");
6833    return (int) gettext ("")
6834
6835             + _nl_msg_cat_cntr
6836
6837  ;
6838  return 0;
6839}
6840_ACEOF
6841rm -f conftest.$ac_objext conftest$ac_exeext
6842if { (eval echo "$as_me:6842: \"$ac_link\"") >&5
6843  (eval $ac_link) 2>&5
6844  ac_status=$?
6845  echo "$as_me:6845: \$? = $ac_status" >&5
6846  (exit $ac_status); } &&
6847         { ac_try='test -s conftest$ac_exeext'
6848  { (eval echo "$as_me:6848: \"$ac_try\"") >&5
6849  (eval $ac_try) 2>&5
6850  ac_status=$?
6851  echo "$as_me:6851: \$? = $ac_status" >&5
6852  (exit $ac_status); }; }; then
6853
6854                test -n "$verbose" && echo "	... found intl library in $cf_cv_library_path_intl" 1>&6
6855
6856echo "${as_me:-configure}:6856: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
6857
6858                cf_cv_find_linkage_intl=yes
6859                cf_cv_library_file_intl="-lintl"
6860                break
6861else
6862  echo "$as_me: failed program was:" >&5
6863cat conftest.$ac_ext >&5
6864
6865                CPPFLAGS="$cf_save_CPPFLAGS"
6866                LIBS="$cf_save_LIBS"
6867                LDFLAGS="$cf_save_LDFLAGS"
6868
6869fi
6870rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6871          fi
6872        done
6873        CPPFLAGS="$cf_save_CPPFLAGS"
6874        LDFLAGS="$cf_save_LDFLAGS"
6875      fi
6876
6877    else
6878      cf_cv_find_linkage_intl=no
6879    fi
6880
6881fi
6882rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6883
6884fi
6885rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6886
6887LIBS="$cf_save_LIBS"
6888
6889if test "$cf_cv_find_linkage_intl" = yes ; then
6890cf_cv_func_gettext=yes
6891else
6892cf_cv_func_gettext=no
6893fi
6894
6895fi
6896echo "$as_me:6896: result: $cf_cv_func_gettext" >&5
6897echo "${ECHO_T}$cf_cv_func_gettext" >&6
6898      LIBS="$cf_save_LIBS_1"
6899
6900      if test "$cf_cv_func_gettext" = yes ; then
6901        cat >>confdefs.h <<\EOF
6902#define HAVE_LIBINTL_H 1
6903EOF
6904
6905                                        if test "$PACKAGE" != gettext; then
6906
6907cat >>confdefs.h <<\EOF
6908#define HAVE_GETTEXT 1
6909EOF
6910
6911if test -n "$cf_cv_header_path_intl" ; then
6912  for cf_add_incdir in $cf_cv_header_path_intl
6913  do
6914	while test $cf_add_incdir != /usr/include
6915	do
6916	  if test -d $cf_add_incdir
6917	  then
6918		cf_have_incdir=no
6919		if test -n "$CFLAGS$CPPFLAGS" ; then
6920		  # a loop is needed to ensure we can add subdirs of existing dirs
6921		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6922			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6923			  cf_have_incdir=yes; break
6924			fi
6925		  done
6926		fi
6927
6928		if test "$cf_have_incdir" = no ; then
6929		  if test "$cf_add_incdir" = /usr/local/include ; then
6930			if test "$GCC" = yes
6931			then
6932			  cf_save_CPPFLAGS=$CPPFLAGS
6933			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6934			  cat >conftest.$ac_ext <<_ACEOF
6935#line 6935 "configure"
6936#include "confdefs.h"
6937#include <stdio.h>
6938int
6939main ()
6940{
6941printf("Hello")
6942  ;
6943  return 0;
6944}
6945_ACEOF
6946rm -f conftest.$ac_objext
6947if { (eval echo "$as_me:6947: \"$ac_compile\"") >&5
6948  (eval $ac_compile) 2>&5
6949  ac_status=$?
6950  echo "$as_me:6950: \$? = $ac_status" >&5
6951  (exit $ac_status); } &&
6952         { ac_try='test -s conftest.$ac_objext'
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  :
6959else
6960  echo "$as_me: failed program was:" >&5
6961cat conftest.$ac_ext >&5
6962cf_have_incdir=yes
6963fi
6964rm -f conftest.$ac_objext conftest.$ac_ext
6965			  CPPFLAGS=$cf_save_CPPFLAGS
6966			fi
6967		  fi
6968		fi
6969
6970		if test "$cf_have_incdir" = no ; then
6971		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
6972
6973echo "${as_me:-configure}:6973: testing adding $cf_add_incdir to include-path ..." 1>&5
6974
6975		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6976
6977		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6978		  test "$cf_top_incdir" = "$cf_add_incdir" && break
6979		  cf_add_incdir="$cf_top_incdir"
6980		else
6981		  break
6982		fi
6983	  fi
6984	done
6985  done
6986fi
6987
6988          if test -n "$cf_cv_library_file_intl" ; then
6989                                                INTLLIBS="$cf_cv_library_file_intl $LIBICONV"
6990
6991if test -n "$cf_cv_library_path_intl" ; then
6992  for cf_add_libdir in $cf_cv_library_path_intl
6993  do
6994    if test $cf_add_libdir = /usr/lib ; then
6995      :
6996    elif test -d $cf_add_libdir
6997    then
6998      cf_have_libdir=no
6999      if test -n "$LDFLAGS$LIBS" ; then
7000        # a loop is needed to ensure we can add subdirs of existing dirs
7001        for cf_test_libdir in $LDFLAGS $LIBS ; do
7002          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7003            cf_have_libdir=yes; break
7004          fi
7005        done
7006      fi
7007      if test "$cf_have_libdir" = no ; then
7008        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
7009
7010echo "${as_me:-configure}:7010: testing adding $cf_add_libdir to library-path ..." 1>&5
7011
7012        INTLLIBS="-L$cf_add_libdir $INTLLIBS"
7013      fi
7014    fi
7015  done
7016fi
7017
7018          fi
7019
7020          gt_save_LIBS="$LIBS"
7021          LIBS="$LIBS $INTLLIBS"
7022
7023for ac_func in dcgettext
7024do
7025as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7026echo "$as_me:7026: checking for $ac_func" >&5
7027echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7028if eval "test \"\${$as_ac_var+set}\" = set"; then
7029  echo $ECHO_N "(cached) $ECHO_C" >&6
7030else
7031  cat >conftest.$ac_ext <<_ACEOF
7032#line 7032 "configure"
7033#include "confdefs.h"
7034/* System header to define __stub macros and hopefully few prototypes,
7035    which can conflict with char $ac_func (); below.  */
7036#include <assert.h>
7037/* Override any gcc2 internal prototype to avoid an error.  */
7038#ifdef __cplusplus
7039extern "C"
7040#endif
7041/* We use char because int might match the return type of a gcc2
7042   builtin and then its argument prototype would still apply.  */
7043char $ac_func ();
7044char (*f) ();
7045
7046int
7047main ()
7048{
7049/* The GNU C library defines this for functions which it implements
7050    to always fail with ENOSYS.  Some functions are actually named
7051    something starting with __ and the normal name is an alias.  */
7052#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7053choke me
7054#else
7055f = $ac_func;
7056#endif
7057
7058  ;
7059  return 0;
7060}
7061_ACEOF
7062rm -f conftest.$ac_objext conftest$ac_exeext
7063if { (eval echo "$as_me:7063: \"$ac_link\"") >&5
7064  (eval $ac_link) 2>&5
7065  ac_status=$?
7066  echo "$as_me:7066: \$? = $ac_status" >&5
7067  (exit $ac_status); } &&
7068         { ac_try='test -s conftest$ac_exeext'
7069  { (eval echo "$as_me:7069: \"$ac_try\"") >&5
7070  (eval $ac_try) 2>&5
7071  ac_status=$?
7072  echo "$as_me:7072: \$? = $ac_status" >&5
7073  (exit $ac_status); }; }; then
7074  eval "$as_ac_var=yes"
7075else
7076  echo "$as_me: failed program was:" >&5
7077cat conftest.$ac_ext >&5
7078eval "$as_ac_var=no"
7079fi
7080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7081fi
7082echo "$as_me:7082: result: `eval echo '${'$as_ac_var'}'`" >&5
7083echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7084if test `eval echo '${'$as_ac_var'}'` = yes; then
7085  cat >>confdefs.h <<EOF
7086#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7087EOF
7088
7089fi
7090done
7091
7092          LIBS="$gt_save_LIBS"
7093
7094                    # Extract the first word of "msgfmt", so it can be a program name with args.
7095
7096set dummy msgfmt; ac_word=$2
7097echo "$as_me:7097: checking for $ac_word" >&5
7098echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7099if test "${ac_cv_path_MSGFMT+set}" = set; then
7100  echo $ECHO_N "(cached) $ECHO_C" >&6
7101else
7102  case "$MSGFMT" in
7103  [\\/]*|?:[\\/]*)
7104  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7105  ;;
7106  *)
7107  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7108  for ac_dir in $PATH; do
7109    test -z "$ac_dir" && ac_dir=.
7110    if test -f $ac_dir/$ac_word$ac_exeext; then
7111      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
7112	ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
7113	break
7114      fi
7115    fi
7116  done
7117  IFS="$ac_save_ifs"
7118  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
7119  ;;
7120esac
7121fi
7122MSGFMT="$ac_cv_path_MSGFMT"
7123if test "$MSGFMT" != ":"; then
7124  echo "$as_me:7124: result: $MSGFMT" >&5
7125echo "${ECHO_T}$MSGFMT" >&6
7126else
7127  echo "$as_me:7127: result: no" >&5
7128echo "${ECHO_T}no" >&6
7129fi
7130
7131          # Extract the first word of "gmsgfmt", so it can be a program name with args.
7132set dummy gmsgfmt; ac_word=$2
7133echo "$as_me:7133: checking for $ac_word" >&5
7134echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7135if test "${ac_cv_path_GMSGFMT+set}" = set; then
7136  echo $ECHO_N "(cached) $ECHO_C" >&6
7137else
7138  case $GMSGFMT in
7139  [\\/]* | ?:[\\/]*)
7140  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7141  ;;
7142  *)
7143  ac_save_IFS=$IFS; IFS=$ac_path_separator
7144ac_dummy="$PATH"
7145for ac_dir in $ac_dummy; do
7146  IFS=$ac_save_IFS
7147  test -z "$ac_dir" && ac_dir=.
7148  if $as_executable_p "$ac_dir/$ac_word"; then
7149   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7150   echo "$as_me:7150: found $ac_dir/$ac_word" >&5
7151   break
7152fi
7153done
7154
7155  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7156  ;;
7157esac
7158fi
7159GMSGFMT=$ac_cv_path_GMSGFMT
7160
7161if test -n "$GMSGFMT"; then
7162  echo "$as_me:7162: result: $GMSGFMT" >&5
7163echo "${ECHO_T}$GMSGFMT" >&6
7164else
7165  echo "$as_me:7165: result: no" >&5
7166echo "${ECHO_T}no" >&6
7167fi
7168
7169                    # Extract the first word of "xgettext", so it can be a program name with args.
7170
7171set dummy xgettext; ac_word=$2
7172echo "$as_me:7172: checking for $ac_word" >&5
7173echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7174if test "${ac_cv_path_XGETTEXT+set}" = set; then
7175  echo $ECHO_N "(cached) $ECHO_C" >&6
7176else
7177  case "$XGETTEXT" in
7178  [\\/]*|?:[\\/]*)
7179  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7180  ;;
7181  *)
7182  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7183  for ac_dir in $PATH; do
7184    test -z "$ac_dir" && ac_dir=.
7185    if test -f $ac_dir/$ac_word$ac_exeext; then
7186      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
7187	ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
7188	break
7189      fi
7190    fi
7191  done
7192  IFS="$ac_save_ifs"
7193  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7194  ;;
7195esac
7196fi
7197XGETTEXT="$ac_cv_path_XGETTEXT"
7198if test "$XGETTEXT" != ":"; then
7199  echo "$as_me:7199: result: $XGETTEXT" >&5
7200echo "${ECHO_T}$XGETTEXT" >&6
7201else
7202  echo "$as_me:7202: result: no" >&5
7203echo "${ECHO_T}no" >&6
7204fi
7205
7206          CATOBJEXT=.gmo
7207        fi
7208      fi
7209
7210      if test "$CATOBJEXT" = "NONE"; then
7211                        nls_cv_use_gnu_gettext=yes
7212      fi
7213    fi
7214
7215    if test "$nls_cv_use_gnu_gettext" = "yes"; then
7216      if test ! -d $srcdir/intl ; then
7217        { { echo "$as_me:7217: error: no NLS library is packaged with this application" >&5
7218echo "$as_me: error: no NLS library is packaged with this application" >&2;}
7219   { (exit 1); exit 1; }; }
7220      fi
7221            INTLOBJS="\$(GETTOBJS)"
7222      # Extract the first word of "msgfmt", so it can be a program name with args.
7223
7224set dummy msgfmt; ac_word=$2
7225echo "$as_me:7225: checking for $ac_word" >&5
7226echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7227if test "${ac_cv_path_MSGFMT+set}" = set; then
7228  echo $ECHO_N "(cached) $ECHO_C" >&6
7229else
7230  case "$MSGFMT" in
7231  [\\/]*|?:[\\/]*)
7232  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7233  ;;
7234  *)
7235  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7236  for ac_dir in $PATH; do
7237    test -z "$ac_dir" && ac_dir=.
7238    if test -f $ac_dir/$ac_word$ac_exeext; then
7239      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
7240	ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
7241	break
7242      fi
7243    fi
7244  done
7245  IFS="$ac_save_ifs"
7246  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
7247  ;;
7248esac
7249fi
7250MSGFMT="$ac_cv_path_MSGFMT"
7251if test "$MSGFMT" != ":"; then
7252  echo "$as_me:7252: result: $MSGFMT" >&5
7253echo "${ECHO_T}$MSGFMT" >&6
7254else
7255  echo "$as_me:7255: result: no" >&5
7256echo "${ECHO_T}no" >&6
7257fi
7258
7259      # Extract the first word of "gmsgfmt", so it can be a program name with args.
7260set dummy gmsgfmt; ac_word=$2
7261echo "$as_me:7261: checking for $ac_word" >&5
7262echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7263if test "${ac_cv_path_GMSGFMT+set}" = set; then
7264  echo $ECHO_N "(cached) $ECHO_C" >&6
7265else
7266  case $GMSGFMT in
7267  [\\/]* | ?:[\\/]*)
7268  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7269  ;;
7270  *)
7271  ac_save_IFS=$IFS; IFS=$ac_path_separator
7272ac_dummy="$PATH"
7273for ac_dir in $ac_dummy; do
7274  IFS=$ac_save_IFS
7275  test -z "$ac_dir" && ac_dir=.
7276  if $as_executable_p "$ac_dir/$ac_word"; then
7277   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7278   echo "$as_me:7278: found $ac_dir/$ac_word" >&5
7279   break
7280fi
7281done
7282
7283  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7284  ;;
7285esac
7286fi
7287GMSGFMT=$ac_cv_path_GMSGFMT
7288
7289if test -n "$GMSGFMT"; then
7290  echo "$as_me:7290: result: $GMSGFMT" >&5
7291echo "${ECHO_T}$GMSGFMT" >&6
7292else
7293  echo "$as_me:7293: result: no" >&5
7294echo "${ECHO_T}no" >&6
7295fi
7296
7297      # Extract the first word of "xgettext", so it can be a program name with args.
7298
7299set dummy xgettext; ac_word=$2
7300echo "$as_me:7300: checking for $ac_word" >&5
7301echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7302if test "${ac_cv_path_XGETTEXT+set}" = set; then
7303  echo $ECHO_N "(cached) $ECHO_C" >&6
7304else
7305  case "$XGETTEXT" in
7306  [\\/]*|?:[\\/]*)
7307  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7308  ;;
7309  *)
7310  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7311  for ac_dir in $PATH; do
7312    test -z "$ac_dir" && ac_dir=.
7313    if test -f $ac_dir/$ac_word$ac_exeext; then
7314      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
7315	ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
7316	break
7317      fi
7318    fi
7319  done
7320  IFS="$ac_save_ifs"
7321  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7322  ;;
7323esac
7324fi
7325XGETTEXT="$ac_cv_path_XGETTEXT"
7326if test "$XGETTEXT" != ":"; then
7327  echo "$as_me:7327: result: $XGETTEXT" >&5
7328echo "${ECHO_T}$XGETTEXT" >&6
7329else
7330  echo "$as_me:7330: result: no" >&5
7331echo "${ECHO_T}no" >&6
7332fi
7333
7334      BUILD_INCLUDED_LIBINTL=yes
7335      USE_INCLUDED_LIBINTL=yes
7336      CATOBJEXT=.gmo
7337      INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
7338      LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
7339    fi
7340
7341            if test "$GMSGFMT" != ":"; then
7342                  if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
7343        : ;
7344      else
7345        echo "$as_me:7345: result: found msgfmt program is not GNU msgfmt; ignore it" >&5
7346echo "${ECHO_T}found msgfmt program is not GNU msgfmt; ignore it" >&6
7347        GMSGFMT=":"
7348      fi
7349    fi
7350
7351            if test "$XGETTEXT" != ":"; then
7352                      if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
7353        : ;
7354      else
7355        echo "$as_me:7355: result: found xgettext program is not GNU xgettext; ignore it" >&5
7356echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
7357        XGETTEXT=":"
7358      fi
7359    fi
7360
7361        POSUB=po
7362  fi
7363
7364  ac_config_commands="$ac_config_commands default-1"
7365
7366      if test "$PACKAGE" = gettext; then
7367    BUILD_INCLUDED_LIBINTL=yes
7368  fi
7369
7370                      if test "$nls_cv_use_gnu_gettext" = "yes"; then
7371    for ac_prog in bison
7372do
7373  # Extract the first word of "$ac_prog", so it can be a program name with args.
7374set dummy $ac_prog; ac_word=$2
7375echo "$as_me:7375: checking for $ac_word" >&5
7376echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7377if test "${ac_cv_prog_INTLBISON+set}" = set; then
7378  echo $ECHO_N "(cached) $ECHO_C" >&6
7379else
7380  if test -n "$INTLBISON"; then
7381  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
7382else
7383  ac_save_IFS=$IFS; IFS=$ac_path_separator
7384ac_dummy="$PATH"
7385for ac_dir in $ac_dummy; do
7386  IFS=$ac_save_IFS
7387  test -z "$ac_dir" && ac_dir=.
7388  $as_executable_p "$ac_dir/$ac_word" || continue
7389ac_cv_prog_INTLBISON="$ac_prog"
7390echo "$as_me:7390: found $ac_dir/$ac_word" >&5
7391break
7392done
7393
7394fi
7395fi
7396INTLBISON=$ac_cv_prog_INTLBISON
7397if test -n "$INTLBISON"; then
7398  echo "$as_me:7398: result: $INTLBISON" >&5
7399echo "${ECHO_T}$INTLBISON" >&6
7400else
7401  echo "$as_me:7401: result: no" >&5
7402echo "${ECHO_T}no" >&6
7403fi
7404
7405  test -n "$INTLBISON" && break
7406done
7407
7408    if test -z "$INTLBISON"; then
7409      ac_verc_fail=yes
7410    else
7411            echo "$as_me:7411: checking version of bison" >&5
7412echo $ECHO_N "checking version of bison... $ECHO_C" >&6
7413      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
7414      case $ac_prog_version in
7415        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
7416        1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
7417           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
7418        *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
7419      esac
7420    echo "$as_me:7420: result: $ac_prog_version" >&5
7421echo "${ECHO_T}$ac_prog_version" >&6
7422    fi
7423    if test $ac_verc_fail = yes; then
7424      INTLBISON=:
7425    fi
7426  fi
7427
7428        for lang in $ALL_LINGUAS; do
7429    GMOFILES="$GMOFILES $lang.gmo"
7430    POFILES="$POFILES $lang.po"
7431  done
7432
7433    nls_cv_header_intl=
7434  nls_cv_header_libgt=
7435
7436    DATADIRNAME=share
7437
7438    INSTOBJEXT=.mo
7439
7440    GENCAT=gencat
7441
7442   if test "x$CATOBJEXT" != "x"; then
7443     if test "x$ALL_LINGUAS" = "x"; then
7444       LINGUAS=
7445     else
7446       echo "$as_me:7446: checking for catalogs to be installed" >&5
7447echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
7448       NEW_LINGUAS=
7449       for presentlang in $ALL_LINGUAS; do
7450         useit=no
7451         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
7452           # Use the presentlang catalog if desiredlang is
7453           #   a. equal to presentlang, or
7454           #   b. a variant of presentlang (because in this case,
7455           #      presentlang can be used as a fallback for messages
7456           #      which are not translated in the desiredlang catalog).
7457           case "$desiredlang" in
7458             "$presentlang"*) useit=yes;;
7459           esac
7460         done
7461         if test $useit = yes; then
7462           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
7463         fi
7464       done
7465       LINGUAS=$NEW_LINGUAS
7466       echo "$as_me:7466: result: $LINGUAS" >&5
7467echo "${ECHO_T}$LINGUAS" >&6
7468     fi
7469
7470          if test -n "$LINGUAS"; then
7471       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7472     fi
7473   fi
7474
7475      INTL_LIBTOOL_SUFFIX_PREFIX=
7476
7477if test "$USE_NLS" = yes ; then
7478
7479# Check whether --with-textdomain or --without-textdomain was given.
7480if test "${with_textdomain+set}" = set; then
7481  withval="$with_textdomain"
7482  NLS_TEXTDOMAIN=$withval
7483else
7484  NLS_TEXTDOMAIN=$PACKAGE
7485fi;
7486	cat >>confdefs.h <<EOF
7487#define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
7488EOF
7489
7490fi
7491
7492INTLDIR_MAKE=
7493MSG_DIR_MAKE=
7494SUB_MAKEFILE=
7495
7496cf_makefile=makefile
7497
7498use_our_messages=no
7499if test "$USE_NLS" = yes ; then
7500if test -d $srcdir/po ; then
7501echo "$as_me:7501: checking if we should use included message-library" >&5
7502echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
7503
7504# Check whether --enable-included-msgs or --disable-included-msgs was given.
7505if test "${enable_included_msgs+set}" = set; then
7506  enableval="$enable_included_msgs"
7507  use_our_messages=$enableval
7508else
7509  use_our_messages=yes
7510fi;
7511fi
7512echo "$as_me:7512: result: $use_our_messages" >&5
7513echo "${ECHO_T}$use_our_messages" >&6
7514fi
7515
7516MSG_DIR_MAKE="#"
7517if test "$use_our_messages" = yes
7518then
7519	SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
7520	MSG_DIR_MAKE=
7521fi
7522
7523if test "$USE_INCLUDED_LIBINTL" = yes ; then
7524        if test "$nls_cv_force_use_gnu_gettext" = yes ; then
7525		:
7526	elif test "$nls_cv_use_gnu_gettext" = yes ; then
7527		:
7528	else
7529		INTLDIR_MAKE="#"
7530	fi
7531	if test -z "$INTLDIR_MAKE"; then
7532		cat >>confdefs.h <<\EOF
7533#define HAVE_LIBGETTEXT_H 1
7534EOF
7535
7536		for cf_makefile in \
7537			$srcdir/intl/Makefile.in \
7538			$srcdir/intl/makefile.in
7539		do
7540			if test -f "$cf_makefile" ; then
7541				SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf_makefile}"
7542				break
7543			fi
7544		done
7545	fi
7546else
7547	INTLDIR_MAKE="#"
7548	if test "$USE_NLS" = yes ; then
7549
7550for ac_header in libintl.h
7551do
7552as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7553echo "$as_me:7553: checking for $ac_header" >&5
7554echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7555if eval "test \"\${$as_ac_Header+set}\" = set"; then
7556  echo $ECHO_N "(cached) $ECHO_C" >&6
7557else
7558  cat >conftest.$ac_ext <<_ACEOF
7559#line 7559 "configure"
7560#include "confdefs.h"
7561#include <$ac_header>
7562_ACEOF
7563if { (eval echo "$as_me:7563: \"$ac_cpp conftest.$ac_ext\"") >&5
7564  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7565  ac_status=$?
7566  egrep -v '^ *\+' conftest.er1 >conftest.err
7567  rm -f conftest.er1
7568  cat conftest.err >&5
7569  echo "$as_me:7569: \$? = $ac_status" >&5
7570  (exit $ac_status); } >/dev/null; then
7571  if test -s conftest.err; then
7572    ac_cpp_err=$ac_c_preproc_warn_flag
7573  else
7574    ac_cpp_err=
7575  fi
7576else
7577  ac_cpp_err=yes
7578fi
7579if test -z "$ac_cpp_err"; then
7580  eval "$as_ac_Header=yes"
7581else
7582  echo "$as_me: failed program was:" >&5
7583  cat conftest.$ac_ext >&5
7584  eval "$as_ac_Header=no"
7585fi
7586rm -f conftest.err conftest.$ac_ext
7587fi
7588echo "$as_me:7588: result: `eval echo '${'$as_ac_Header'}'`" >&5
7589echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7590if test `eval echo '${'$as_ac_Header'}'` = yes; then
7591  cat >>confdefs.h <<EOF
7592#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7593EOF
7594
7595fi
7596done
7597
7598	fi
7599fi
7600
7601if test -z "$INTLDIR_MAKE" ; then
7602	CPPFLAGS="$CPPFLAGS -I../intl"
7603fi
7604
7605if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
7606	GT_YES="#"
7607	GT_NO=
7608else
7609	GT_YES=
7610	GT_NO="#"
7611fi
7612
7613if test "$USE_INCLUDED_LIBINTL" = yes ; then
7614	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
7615		cat >>confdefs.h <<\EOF
7616#define HAVE_GETTEXT 1
7617EOF
7618
7619	elif test "$nls_cv_use_gnu_gettext" = yes ; then
7620		cat >>confdefs.h <<\EOF
7621#define HAVE_GETTEXT 1
7622EOF
7623
7624	fi
7625	if test -n "$nls_cv_header_intl" ; then
7626		cat >>confdefs.h <<\EOF
7627#define HAVE_LIBINTL_H 1
7628EOF
7629
7630	fi
7631fi
7632
7633echo "$as_me:7633: checking if -lm needed for math functions" >&5
7634echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
7635if test "${cf_cv_need_libm+set}" = set; then
7636  echo $ECHO_N "(cached) $ECHO_C" >&6
7637else
7638
7639	cat >conftest.$ac_ext <<_ACEOF
7640#line 7640 "configure"
7641#include "confdefs.h"
7642
7643	#include <stdio.h>
7644	#include <math.h>
7645
7646int
7647main ()
7648{
7649double x = rand(); printf("result = %g\n", sqrt(x))
7650  ;
7651  return 0;
7652}
7653_ACEOF
7654rm -f conftest.$ac_objext conftest$ac_exeext
7655if { (eval echo "$as_me:7655: \"$ac_link\"") >&5
7656  (eval $ac_link) 2>&5
7657  ac_status=$?
7658  echo "$as_me:7658: \$? = $ac_status" >&5
7659  (exit $ac_status); } &&
7660         { ac_try='test -s conftest$ac_exeext'
7661  { (eval echo "$as_me:7661: \"$ac_try\"") >&5
7662  (eval $ac_try) 2>&5
7663  ac_status=$?
7664  echo "$as_me:7664: \$? = $ac_status" >&5
7665  (exit $ac_status); }; }; then
7666  cf_cv_need_libm=no
7667else
7668  echo "$as_me: failed program was:" >&5
7669cat conftest.$ac_ext >&5
7670cf_cv_need_libm=yes
7671fi
7672rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7673fi
7674echo "$as_me:7674: result: $cf_cv_need_libm" >&5
7675echo "${ECHO_T}$cf_cv_need_libm" >&6
7676if test "$cf_cv_need_libm" = yes
7677then
7678
7679	LIBS="-lm $LIBS"
7680
7681fi
7682
7683echo "$as_me:7683: checking if you want to use dmalloc for testing" >&5
7684echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
7685
7686# Check whether --with-dmalloc or --without-dmalloc was given.
7687if test "${with_dmalloc+set}" = set; then
7688  withval="$with_dmalloc"
7689  cat >>confdefs.h <<\EOF
7690#define USE_DMALLOC 1
7691EOF
7692
7693	: ${with_cflags:=-g}
7694	: ${with_no_leaks:=yes}
7695	 with_dmalloc=yes
7696else
7697  with_dmalloc=
7698fi;
7699echo "$as_me:7699: result: ${with_dmalloc:-no}" >&5
7700echo "${ECHO_T}${with_dmalloc:-no}" >&6
7701
7702case .$with_cflags in #(vi
7703.*-g*)
7704	case .$CFLAGS in #(vi
7705	.*-g*) #(vi
7706		;;
7707	*)
7708
7709cf_fix_cppflags=no
7710cf_new_cflags=
7711cf_new_cppflags=
7712cf_new_extra_cppflags=
7713
7714for cf_add_cflags in -g
7715do
7716case $cf_fix_cppflags in
7717no)
7718	case $cf_add_cflags in #(vi
7719	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7720		case $cf_add_cflags in
7721		-D*)
7722			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7723
7724			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7725				&& test -z "${cf_tst_cflags}" \
7726				&& cf_fix_cppflags=yes
7727
7728			if test $cf_fix_cppflags = yes ; then
7729				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7730				continue
7731			elif test "${cf_tst_cflags}" = "\"'" ; then
7732				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7733				continue
7734			fi
7735			;;
7736		esac
7737		case "$CPPFLAGS" in
7738		*$cf_add_cflags) #(vi
7739			;;
7740		*) #(vi
7741			case $cf_add_cflags in #(vi
7742			-D*)
7743				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7744
7745CPPFLAGS=`echo "$CPPFLAGS" | \
7746	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
7747		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
7748
7749				;;
7750			esac
7751			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7752			;;
7753		esac
7754		;;
7755	*)
7756		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7757		;;
7758	esac
7759	;;
7760yes)
7761	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7762
7763	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7764
7765	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7766		&& test -z "${cf_tst_cflags}" \
7767		&& cf_fix_cppflags=no
7768	;;
7769esac
7770done
7771
7772if test -n "$cf_new_cflags" ; then
7773
7774	CFLAGS="$CFLAGS $cf_new_cflags"
7775fi
7776
7777if test -n "$cf_new_cppflags" ; then
7778
7779	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7780fi
7781
7782if test -n "$cf_new_extra_cppflags" ; then
7783
7784	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7785fi
7786
7787		;;
7788	esac
7789	;;
7790esac
7791
7792if test "$with_dmalloc" = yes ; then
7793	echo "$as_me:7793: checking for dmalloc.h" >&5
7794echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
7795if test "${ac_cv_header_dmalloc_h+set}" = set; then
7796  echo $ECHO_N "(cached) $ECHO_C" >&6
7797else
7798  cat >conftest.$ac_ext <<_ACEOF
7799#line 7799 "configure"
7800#include "confdefs.h"
7801#include <dmalloc.h>
7802_ACEOF
7803if { (eval echo "$as_me:7803: \"$ac_cpp conftest.$ac_ext\"") >&5
7804  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7805  ac_status=$?
7806  egrep -v '^ *\+' conftest.er1 >conftest.err
7807  rm -f conftest.er1
7808  cat conftest.err >&5
7809  echo "$as_me:7809: \$? = $ac_status" >&5
7810  (exit $ac_status); } >/dev/null; then
7811  if test -s conftest.err; then
7812    ac_cpp_err=$ac_c_preproc_warn_flag
7813  else
7814    ac_cpp_err=
7815  fi
7816else
7817  ac_cpp_err=yes
7818fi
7819if test -z "$ac_cpp_err"; then
7820  ac_cv_header_dmalloc_h=yes
7821else
7822  echo "$as_me: failed program was:" >&5
7823  cat conftest.$ac_ext >&5
7824  ac_cv_header_dmalloc_h=no
7825fi
7826rm -f conftest.err conftest.$ac_ext
7827fi
7828echo "$as_me:7828: result: $ac_cv_header_dmalloc_h" >&5
7829echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
7830if test $ac_cv_header_dmalloc_h = yes; then
7831
7832echo "$as_me:7832: checking for dmalloc_debug in -ldmalloc" >&5
7833echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
7834if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
7835  echo $ECHO_N "(cached) $ECHO_C" >&6
7836else
7837  ac_check_lib_save_LIBS=$LIBS
7838LIBS="-ldmalloc  $LIBS"
7839cat >conftest.$ac_ext <<_ACEOF
7840#line 7840 "configure"
7841#include "confdefs.h"
7842
7843/* Override any gcc2 internal prototype to avoid an error.  */
7844#ifdef __cplusplus
7845extern "C"
7846#endif
7847/* We use char because int might match the return type of a gcc2
7848   builtin and then its argument prototype would still apply.  */
7849char dmalloc_debug ();
7850int
7851main ()
7852{
7853dmalloc_debug ();
7854  ;
7855  return 0;
7856}
7857_ACEOF
7858rm -f conftest.$ac_objext conftest$ac_exeext
7859if { (eval echo "$as_me:7859: \"$ac_link\"") >&5
7860  (eval $ac_link) 2>&5
7861  ac_status=$?
7862  echo "$as_me:7862: \$? = $ac_status" >&5
7863  (exit $ac_status); } &&
7864         { ac_try='test -s conftest$ac_exeext'
7865  { (eval echo "$as_me:7865: \"$ac_try\"") >&5
7866  (eval $ac_try) 2>&5
7867  ac_status=$?
7868  echo "$as_me:7868: \$? = $ac_status" >&5
7869  (exit $ac_status); }; }; then
7870  ac_cv_lib_dmalloc_dmalloc_debug=yes
7871else
7872  echo "$as_me: failed program was:" >&5
7873cat conftest.$ac_ext >&5
7874ac_cv_lib_dmalloc_dmalloc_debug=no
7875fi
7876rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7877LIBS=$ac_check_lib_save_LIBS
7878fi
7879echo "$as_me:7879: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
7880echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
7881if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
7882  cat >>confdefs.h <<EOF
7883#define HAVE_LIBDMALLOC 1
7884EOF
7885
7886  LIBS="-ldmalloc $LIBS"
7887
7888fi
7889
7890fi
7891
7892fi
7893
7894echo "$as_me:7894: checking if you want to use dbmalloc for testing" >&5
7895echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
7896
7897# Check whether --with-dbmalloc or --without-dbmalloc was given.
7898if test "${with_dbmalloc+set}" = set; then
7899  withval="$with_dbmalloc"
7900  cat >>confdefs.h <<\EOF
7901#define USE_DBMALLOC 1
7902EOF
7903
7904	: ${with_cflags:=-g}
7905	: ${with_no_leaks:=yes}
7906	 with_dbmalloc=yes
7907else
7908  with_dbmalloc=
7909fi;
7910echo "$as_me:7910: result: ${with_dbmalloc:-no}" >&5
7911echo "${ECHO_T}${with_dbmalloc:-no}" >&6
7912
7913case .$with_cflags in #(vi
7914.*-g*)
7915	case .$CFLAGS in #(vi
7916	.*-g*) #(vi
7917		;;
7918	*)
7919
7920cf_fix_cppflags=no
7921cf_new_cflags=
7922cf_new_cppflags=
7923cf_new_extra_cppflags=
7924
7925for cf_add_cflags in -g
7926do
7927case $cf_fix_cppflags in
7928no)
7929	case $cf_add_cflags in #(vi
7930	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7931		case $cf_add_cflags in
7932		-D*)
7933			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7934
7935			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7936				&& test -z "${cf_tst_cflags}" \
7937				&& cf_fix_cppflags=yes
7938
7939			if test $cf_fix_cppflags = yes ; then
7940				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7941				continue
7942			elif test "${cf_tst_cflags}" = "\"'" ; then
7943				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7944				continue
7945			fi
7946			;;
7947		esac
7948		case "$CPPFLAGS" in
7949		*$cf_add_cflags) #(vi
7950			;;
7951		*) #(vi
7952			case $cf_add_cflags in #(vi
7953			-D*)
7954				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7955
7956CPPFLAGS=`echo "$CPPFLAGS" | \
7957	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
7958		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
7959
7960				;;
7961			esac
7962			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7963			;;
7964		esac
7965		;;
7966	*)
7967		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7968		;;
7969	esac
7970	;;
7971yes)
7972	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7973
7974	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7975
7976	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7977		&& test -z "${cf_tst_cflags}" \
7978		&& cf_fix_cppflags=no
7979	;;
7980esac
7981done
7982
7983if test -n "$cf_new_cflags" ; then
7984
7985	CFLAGS="$CFLAGS $cf_new_cflags"
7986fi
7987
7988if test -n "$cf_new_cppflags" ; then
7989
7990	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7991fi
7992
7993if test -n "$cf_new_extra_cppflags" ; then
7994
7995	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7996fi
7997
7998		;;
7999	esac
8000	;;
8001esac
8002
8003if test "$with_dbmalloc" = yes ; then
8004	echo "$as_me:8004: checking for dbmalloc.h" >&5
8005echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
8006if test "${ac_cv_header_dbmalloc_h+set}" = set; then
8007  echo $ECHO_N "(cached) $ECHO_C" >&6
8008else
8009  cat >conftest.$ac_ext <<_ACEOF
8010#line 8010 "configure"
8011#include "confdefs.h"
8012#include <dbmalloc.h>
8013_ACEOF
8014if { (eval echo "$as_me:8014: \"$ac_cpp conftest.$ac_ext\"") >&5
8015  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8016  ac_status=$?
8017  egrep -v '^ *\+' conftest.er1 >conftest.err
8018  rm -f conftest.er1
8019  cat conftest.err >&5
8020  echo "$as_me:8020: \$? = $ac_status" >&5
8021  (exit $ac_status); } >/dev/null; then
8022  if test -s conftest.err; then
8023    ac_cpp_err=$ac_c_preproc_warn_flag
8024  else
8025    ac_cpp_err=
8026  fi
8027else
8028  ac_cpp_err=yes
8029fi
8030if test -z "$ac_cpp_err"; then
8031  ac_cv_header_dbmalloc_h=yes
8032else
8033  echo "$as_me: failed program was:" >&5
8034  cat conftest.$ac_ext >&5
8035  ac_cv_header_dbmalloc_h=no
8036fi
8037rm -f conftest.err conftest.$ac_ext
8038fi
8039echo "$as_me:8039: result: $ac_cv_header_dbmalloc_h" >&5
8040echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
8041if test $ac_cv_header_dbmalloc_h = yes; then
8042
8043echo "$as_me:8043: checking for debug_malloc in -ldbmalloc" >&5
8044echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
8045if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
8046  echo $ECHO_N "(cached) $ECHO_C" >&6
8047else
8048  ac_check_lib_save_LIBS=$LIBS
8049LIBS="-ldbmalloc  $LIBS"
8050cat >conftest.$ac_ext <<_ACEOF
8051#line 8051 "configure"
8052#include "confdefs.h"
8053
8054/* Override any gcc2 internal prototype to avoid an error.  */
8055#ifdef __cplusplus
8056extern "C"
8057#endif
8058/* We use char because int might match the return type of a gcc2
8059   builtin and then its argument prototype would still apply.  */
8060char debug_malloc ();
8061int
8062main ()
8063{
8064debug_malloc ();
8065  ;
8066  return 0;
8067}
8068_ACEOF
8069rm -f conftest.$ac_objext conftest$ac_exeext
8070if { (eval echo "$as_me:8070: \"$ac_link\"") >&5
8071  (eval $ac_link) 2>&5
8072  ac_status=$?
8073  echo "$as_me:8073: \$? = $ac_status" >&5
8074  (exit $ac_status); } &&
8075         { ac_try='test -s conftest$ac_exeext'
8076  { (eval echo "$as_me:8076: \"$ac_try\"") >&5
8077  (eval $ac_try) 2>&5
8078  ac_status=$?
8079  echo "$as_me:8079: \$? = $ac_status" >&5
8080  (exit $ac_status); }; }; then
8081  ac_cv_lib_dbmalloc_debug_malloc=yes
8082else
8083  echo "$as_me: failed program was:" >&5
8084cat conftest.$ac_ext >&5
8085ac_cv_lib_dbmalloc_debug_malloc=no
8086fi
8087rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8088LIBS=$ac_check_lib_save_LIBS
8089fi
8090echo "$as_me:8090: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
8091echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
8092if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
8093  cat >>confdefs.h <<EOF
8094#define HAVE_LIBDBMALLOC 1
8095EOF
8096
8097  LIBS="-ldbmalloc $LIBS"
8098
8099fi
8100
8101fi
8102
8103fi
8104
8105echo "$as_me:8105: checking if you want to use purify for testing" >&5
8106echo $ECHO_N "checking if you want to use purify for testing... $ECHO_C" >&6
8107
8108# Check whether --with-purify or --without-purify was given.
8109if test "${with_purify+set}" = set; then
8110  withval="$with_purify"
8111  cat >>confdefs.h <<\EOF
8112#define USE_PURIFY 1
8113EOF
8114
8115	: ${with_cflags:=-g}
8116	: ${with_no_leaks:=yes}
8117	 with_purify=yes
8118else
8119  with_purify=
8120fi;
8121echo "$as_me:8121: result: ${with_purify:-no}" >&5
8122echo "${ECHO_T}${with_purify:-no}" >&6
8123
8124case .$with_cflags in #(vi
8125.*-g*)
8126	case .$CFLAGS in #(vi
8127	.*-g*) #(vi
8128		;;
8129	*)
8130
8131cf_fix_cppflags=no
8132cf_new_cflags=
8133cf_new_cppflags=
8134cf_new_extra_cppflags=
8135
8136for cf_add_cflags in -g
8137do
8138case $cf_fix_cppflags in
8139no)
8140	case $cf_add_cflags in #(vi
8141	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8142		case $cf_add_cflags in
8143		-D*)
8144			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8145
8146			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8147				&& test -z "${cf_tst_cflags}" \
8148				&& cf_fix_cppflags=yes
8149
8150			if test $cf_fix_cppflags = yes ; then
8151				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8152				continue
8153			elif test "${cf_tst_cflags}" = "\"'" ; then
8154				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8155				continue
8156			fi
8157			;;
8158		esac
8159		case "$CPPFLAGS" in
8160		*$cf_add_cflags) #(vi
8161			;;
8162		*) #(vi
8163			case $cf_add_cflags in #(vi
8164			-D*)
8165				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8166
8167CPPFLAGS=`echo "$CPPFLAGS" | \
8168	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8169		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8170
8171				;;
8172			esac
8173			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8174			;;
8175		esac
8176		;;
8177	*)
8178		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8179		;;
8180	esac
8181	;;
8182yes)
8183	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8184
8185	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8186
8187	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8188		&& test -z "${cf_tst_cflags}" \
8189		&& cf_fix_cppflags=no
8190	;;
8191esac
8192done
8193
8194if test -n "$cf_new_cflags" ; then
8195
8196	CFLAGS="$CFLAGS $cf_new_cflags"
8197fi
8198
8199if test -n "$cf_new_cppflags" ; then
8200
8201	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8202fi
8203
8204if test -n "$cf_new_extra_cppflags" ; then
8205
8206	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8207fi
8208
8209		;;
8210	esac
8211	;;
8212esac
8213
8214echo "$as_me:8214: checking if you want to use valgrind for testing" >&5
8215echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
8216
8217# Check whether --with-valgrind or --without-valgrind was given.
8218if test "${with_valgrind+set}" = set; then
8219  withval="$with_valgrind"
8220  cat >>confdefs.h <<\EOF
8221#define USE_VALGRIND 1
8222EOF
8223
8224	: ${with_cflags:=-g}
8225	: ${with_no_leaks:=yes}
8226	 with_valgrind=yes
8227else
8228  with_valgrind=
8229fi;
8230echo "$as_me:8230: result: ${with_valgrind:-no}" >&5
8231echo "${ECHO_T}${with_valgrind:-no}" >&6
8232
8233case .$with_cflags in #(vi
8234.*-g*)
8235	case .$CFLAGS in #(vi
8236	.*-g*) #(vi
8237		;;
8238	*)
8239
8240cf_fix_cppflags=no
8241cf_new_cflags=
8242cf_new_cppflags=
8243cf_new_extra_cppflags=
8244
8245for cf_add_cflags in -g
8246do
8247case $cf_fix_cppflags in
8248no)
8249	case $cf_add_cflags in #(vi
8250	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8251		case $cf_add_cflags in
8252		-D*)
8253			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8254
8255			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8256				&& test -z "${cf_tst_cflags}" \
8257				&& cf_fix_cppflags=yes
8258
8259			if test $cf_fix_cppflags = yes ; then
8260				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8261				continue
8262			elif test "${cf_tst_cflags}" = "\"'" ; then
8263				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8264				continue
8265			fi
8266			;;
8267		esac
8268		case "$CPPFLAGS" in
8269		*$cf_add_cflags) #(vi
8270			;;
8271		*) #(vi
8272			case $cf_add_cflags in #(vi
8273			-D*)
8274				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8275
8276CPPFLAGS=`echo "$CPPFLAGS" | \
8277	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8278		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8279
8280				;;
8281			esac
8282			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8283			;;
8284		esac
8285		;;
8286	*)
8287		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8288		;;
8289	esac
8290	;;
8291yes)
8292	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8293
8294	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8295
8296	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8297		&& test -z "${cf_tst_cflags}" \
8298		&& cf_fix_cppflags=no
8299	;;
8300esac
8301done
8302
8303if test -n "$cf_new_cflags" ; then
8304
8305	CFLAGS="$CFLAGS $cf_new_cflags"
8306fi
8307
8308if test -n "$cf_new_cppflags" ; then
8309
8310	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8311fi
8312
8313if test -n "$cf_new_extra_cppflags" ; then
8314
8315	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8316fi
8317
8318		;;
8319	esac
8320	;;
8321esac
8322
8323echo "$as_me:8323: checking if you want to perform memory-leak testing" >&5
8324echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
8325
8326# Check whether --with-no-leaks or --without-no-leaks was given.
8327if test "${with_no_leaks+set}" = set; then
8328  withval="$with_no_leaks"
8329  cat >>confdefs.h <<\EOF
8330#define NO_LEAKS 1
8331EOF
8332
8333	 cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
8334	 case ${cf_doalloc} in #(vi
8335	 *yes*) ;;
8336	 *) cat >>confdefs.h <<\EOF
8337#define DOALLOC 10000
8338EOF
8339 ;;
8340	 esac
8341	 with_no_leaks=yes
8342else
8343  with_no_leaks=
8344fi;
8345echo "$as_me:8345: result: $with_no_leaks" >&5
8346echo "${ECHO_T}$with_no_leaks" >&6
8347
8348echo "$as_me:8348: checking if you want --trace option" >&5
8349echo $ECHO_N "checking if you want --trace option... $ECHO_C" >&6
8350
8351# Check whether --enable-trace or --disable-trace was given.
8352if test "${enable_trace+set}" = set; then
8353  enableval="$enable_trace"
8354
8355else
8356  enableval=yes
8357fi;
8358echo "$as_me:8358: result: $enableval" >&5
8359echo "${ECHO_T}$enableval" >&6
8360if test "$enableval" != no ; then
8361EXTRAOBJS="$EXTRAOBJS trace\$o"
8362	 cat >>confdefs.h <<\EOF
8363#define HAVE_DLG_TRACE 1
8364EOF
8365
8366else
8367	:
8368fi
8369
8370LIBTOOL_MAKE="#"
8371
8372echo "$as_me:8372: checking if libtool -version-number should be used" >&5
8373echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
8374
8375# Check whether --enable-libtool-version or --disable-libtool-version was given.
8376if test "${enable_libtool_version+set}" = set; then
8377  enableval="$enable_libtool_version"
8378  test "$enableval" != no && enableval=yes
8379  if test "$enableval" != "yes" ; then
8380    cf_libtool_version=no
8381  else
8382    cf_libtool_version=yes
8383  fi
8384else
8385  enableval=yes
8386  cf_libtool_version=yes
8387
8388fi;
8389echo "$as_me:8389: result: $cf_libtool_version" >&5
8390echo "${ECHO_T}$cf_libtool_version" >&6
8391
8392if test "$cf_libtool_version" = yes ; then
8393	LIBTOOL_VERSION="-version-number"
8394else
8395	LIBTOOL_VERSION="-version-info"
8396fi
8397
8398LIBTOOL=
8399
8400# common library maintenance symbols that are convenient for libtool scripts:
8401LIB_CREATE='${AR} -cr'
8402LIB_OBJECT='${OBJECTS}'
8403LIB_SUFFIX=.a
8404LIB_PREP="$RANLIB"
8405
8406# symbols used to prop libtool up to enable it to determine what it should be
8407# doing:
8408LIB_CLEAN=
8409LIB_COMPILE=
8410LIB_LINK='${CC}'
8411LIB_INSTALL=
8412LIB_UNINSTALL=
8413
8414echo "$as_me:8414: checking if you want to build libraries with libtool" >&5
8415echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
8416
8417# Check whether --with-libtool or --without-libtool was given.
8418if test "${with_libtool+set}" = set; then
8419  withval="$with_libtool"
8420  with_libtool=$withval
8421else
8422  with_libtool=no
8423fi;
8424echo "$as_me:8424: result: $with_libtool" >&5
8425echo "${ECHO_T}$with_libtool" >&6
8426if test "$with_libtool" != "no"; then
8427
8428	if test "$with_libtool" != "yes" ; then
8429
8430if test "x$prefix" != xNONE; then
8431  cf_path_syntax="$prefix"
8432else
8433  cf_path_syntax="$ac_default_prefix"
8434fi
8435
8436case ".$with_libtool" in #(vi
8437.\$\(*\)*|.\'*\'*) #(vi
8438  ;;
8439..|./*|.\\*) #(vi
8440  ;;
8441.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
8442  ;;
8443.\${*prefix}*) #(vi
8444  eval with_libtool="$with_libtool"
8445  case ".$with_libtool" in #(vi
8446  .NONE/*)
8447    with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
8448    ;;
8449  esac
8450  ;; #(vi
8451.no|.NONE/*)
8452  with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
8453  ;;
8454*)
8455  { { echo "$as_me:8455: error: expected a pathname, not \"$with_libtool\"" >&5
8456echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
8457   { (exit 1); exit 1; }; }
8458  ;;
8459esac
8460
8461		LIBTOOL=$with_libtool
8462	else
8463		# Extract the first word of "libtool", so it can be a program name with args.
8464set dummy libtool; ac_word=$2
8465echo "$as_me:8465: checking for $ac_word" >&5
8466echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8467if test "${ac_cv_path_LIBTOOL+set}" = set; then
8468  echo $ECHO_N "(cached) $ECHO_C" >&6
8469else
8470  case $LIBTOOL in
8471  [\\/]* | ?:[\\/]*)
8472  ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
8473  ;;
8474  *)
8475  ac_save_IFS=$IFS; IFS=$ac_path_separator
8476ac_dummy="$PATH"
8477for ac_dir in $ac_dummy; do
8478  IFS=$ac_save_IFS
8479  test -z "$ac_dir" && ac_dir=.
8480  if $as_executable_p "$ac_dir/$ac_word"; then
8481   ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
8482   echo "$as_me:8482: found $ac_dir/$ac_word" >&5
8483   break
8484fi
8485done
8486
8487  ;;
8488esac
8489fi
8490LIBTOOL=$ac_cv_path_LIBTOOL
8491
8492if test -n "$LIBTOOL"; then
8493  echo "$as_me:8493: result: $LIBTOOL" >&5
8494echo "${ECHO_T}$LIBTOOL" >&6
8495else
8496  echo "$as_me:8496: result: no" >&5
8497echo "${ECHO_T}no" >&6
8498fi
8499
8500	fi
8501	if test -z "$LIBTOOL" ; then
8502		{ { echo "$as_me:8502: error: Cannot find libtool" >&5
8503echo "$as_me: error: Cannot find libtool" >&2;}
8504   { (exit 1); exit 1; }; }
8505	fi
8506	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
8507	LIB_OBJECT='${OBJECTS:.o=.lo}'
8508	LIB_SUFFIX=.la
8509	LIB_CLEAN='${LIBTOOL} --mode=clean'
8510	LIB_COMPILE='${LIBTOOL} --mode=compile'
8511	LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
8512	LIB_INSTALL='${LIBTOOL} --mode=install'
8513	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
8514	LIB_PREP=:
8515
8516	# Show the version of libtool
8517	echo "$as_me:8517: checking version of libtool" >&5
8518echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
8519
8520	# Save the version in a cache variable - this is not entirely a good
8521	# thing, but the version string from libtool is very ugly, and for
8522	# bug reports it might be useful to have the original string. "("
8523	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.].*//'`
8524	echo "$as_me:8524: result: $cf_cv_libtool_version" >&5
8525echo "${ECHO_T}$cf_cv_libtool_version" >&6
8526	if test -z "$cf_cv_libtool_version" ; then
8527		{ { echo "$as_me:8527: error: This is not GNU libtool" >&5
8528echo "$as_me: error: This is not GNU libtool" >&2;}
8529   { (exit 1); exit 1; }; }
8530	fi
8531
8532	# special hack to add -no-undefined (which libtool should do for itself)
8533	LT_UNDEF=
8534	case "$cf_cv_system_name" in #(vi
8535	cygwin*|mingw32*|uwin*|aix[456]) #(vi
8536		LT_UNDEF=-no-undefined
8537		;;
8538	esac
8539
8540	# special hack to add --tag option for C++ compiler
8541	case $cf_cv_libtool_version in #(vi
8542	1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
8543		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
8544		LIBTOOL="$LIBTOOL --tag=CC"
8545		;;
8546	*)
8547		LIBTOOL_CXX="$LIBTOOL"
8548		;;
8549	esac
8550else
8551	LIBTOOL=""
8552	LIBTOOL_CXX=""
8553fi
8554
8555test -z "$LIBTOOL" && ECHO_LT=
8556
8557if test "$with_libtool" = "yes" ; then
8558	OBJEXT="lo"
8559	LIBTOOL_MAKE=
8560
8561echo "$as_me:8561: checking for additional libtool options" >&5
8562echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
8563
8564# Check whether --with-libtool-opts or --without-libtool-opts was given.
8565if test "${with_libtool_opts+set}" = set; then
8566  withval="$with_libtool_opts"
8567  with_libtool_opts=$withval
8568else
8569  with_libtool_opts=no
8570fi;
8571echo "$as_me:8571: result: $with_libtool_opts" >&5
8572echo "${ECHO_T}$with_libtool_opts" >&6
8573
8574case .$with_libtool_opts in
8575.yes|.no|.)
8576	;;
8577*)
8578	LIBTOOL_OPTS=$with_libtool_opts
8579	;;
8580esac
8581
8582fi
8583
8584echo "$as_me:8584: checking for specific curses-directory" >&5
8585echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
8586
8587# Check whether --with-curses-dir or --without-curses-dir was given.
8588if test "${with_curses_dir+set}" = set; then
8589  withval="$with_curses_dir"
8590  cf_cv_curses_dir=$withval
8591else
8592  cf_cv_curses_dir=no
8593fi;
8594echo "$as_me:8594: result: $cf_cv_curses_dir" >&5
8595echo "${ECHO_T}$cf_cv_curses_dir" >&6
8596
8597if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8598then
8599
8600if test "x$prefix" != xNONE; then
8601  cf_path_syntax="$prefix"
8602else
8603  cf_path_syntax="$ac_default_prefix"
8604fi
8605
8606case ".$withval" in #(vi
8607.\$\(*\)*|.\'*\'*) #(vi
8608  ;;
8609..|./*|.\\*) #(vi
8610  ;;
8611.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
8612  ;;
8613.\${*prefix}*) #(vi
8614  eval withval="$withval"
8615  case ".$withval" in #(vi
8616  .NONE/*)
8617    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8618    ;;
8619  esac
8620  ;; #(vi
8621.no|.NONE/*)
8622  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8623  ;;
8624*)
8625  { { echo "$as_me:8625: error: expected a pathname, not \"$withval\"" >&5
8626echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8627   { (exit 1); exit 1; }; }
8628  ;;
8629esac
8630
8631	if test -d "$cf_cv_curses_dir"
8632	then
8633
8634if test -n "$cf_cv_curses_dir/include" ; then
8635  for cf_add_incdir in $cf_cv_curses_dir/include
8636  do
8637	while test $cf_add_incdir != /usr/include
8638	do
8639	  if test -d $cf_add_incdir
8640	  then
8641		cf_have_incdir=no
8642		if test -n "$CFLAGS$CPPFLAGS" ; then
8643		  # a loop is needed to ensure we can add subdirs of existing dirs
8644		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8645			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8646			  cf_have_incdir=yes; break
8647			fi
8648		  done
8649		fi
8650
8651		if test "$cf_have_incdir" = no ; then
8652		  if test "$cf_add_incdir" = /usr/local/include ; then
8653			if test "$GCC" = yes
8654			then
8655			  cf_save_CPPFLAGS=$CPPFLAGS
8656			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8657			  cat >conftest.$ac_ext <<_ACEOF
8658#line 8658 "configure"
8659#include "confdefs.h"
8660#include <stdio.h>
8661int
8662main ()
8663{
8664printf("Hello")
8665  ;
8666  return 0;
8667}
8668_ACEOF
8669rm -f conftest.$ac_objext
8670if { (eval echo "$as_me:8670: \"$ac_compile\"") >&5
8671  (eval $ac_compile) 2>&5
8672  ac_status=$?
8673  echo "$as_me:8673: \$? = $ac_status" >&5
8674  (exit $ac_status); } &&
8675         { ac_try='test -s conftest.$ac_objext'
8676  { (eval echo "$as_me:8676: \"$ac_try\"") >&5
8677  (eval $ac_try) 2>&5
8678  ac_status=$?
8679  echo "$as_me:8679: \$? = $ac_status" >&5
8680  (exit $ac_status); }; }; then
8681  :
8682else
8683  echo "$as_me: failed program was:" >&5
8684cat conftest.$ac_ext >&5
8685cf_have_incdir=yes
8686fi
8687rm -f conftest.$ac_objext conftest.$ac_ext
8688			  CPPFLAGS=$cf_save_CPPFLAGS
8689			fi
8690		  fi
8691		fi
8692
8693		if test "$cf_have_incdir" = no ; then
8694		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
8695
8696echo "${as_me:-configure}:8696: testing adding $cf_add_incdir to include-path ..." 1>&5
8697
8698		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8699
8700		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8701		  test "$cf_top_incdir" = "$cf_add_incdir" && break
8702		  cf_add_incdir="$cf_top_incdir"
8703		else
8704		  break
8705		fi
8706	  fi
8707	done
8708  done
8709fi
8710
8711if test -n "$cf_cv_curses_dir/lib" ; then
8712  for cf_add_libdir in $cf_cv_curses_dir/lib
8713  do
8714    if test $cf_add_libdir = /usr/lib ; then
8715      :
8716    elif test -d $cf_add_libdir
8717    then
8718      cf_have_libdir=no
8719      if test -n "$LDFLAGS$LIBS" ; then
8720        # a loop is needed to ensure we can add subdirs of existing dirs
8721        for cf_test_libdir in $LDFLAGS $LIBS ; do
8722          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8723            cf_have_libdir=yes; break
8724          fi
8725        done
8726      fi
8727      if test "$cf_have_libdir" = no ; then
8728        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
8729
8730echo "${as_me:-configure}:8730: testing adding $cf_add_libdir to library-path ..." 1>&5
8731
8732        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8733      fi
8734    fi
8735  done
8736fi
8737
8738	fi
8739fi
8740
8741use_ncurses=no
8742
8743# Check whether --with-ncurses or --without-ncurses was given.
8744if test "${with_ncurses+set}" = set; then
8745  withval="$with_ncurses"
8746  use_ncurses=ncurses
8747fi;
8748
8749# Check whether --with-ncursesw or --without-ncursesw was given.
8750if test "${with_ncursesw+set}" = set; then
8751  withval="$with_ncursesw"
8752  use_ncurses=ncursesw
8753fi;
8754if test $use_ncurses != no ; then
8755	cf_wide_curses=yes
8756	if test $use_ncurses = ncursesw ; then
8757
8758echo "$as_me:8758: checking for multibyte character support" >&5
8759echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8760if test "${cf_cv_utf8_lib+set}" = set; then
8761  echo $ECHO_N "(cached) $ECHO_C" >&6
8762else
8763
8764	cf_save_LIBS="$LIBS"
8765	cat >conftest.$ac_ext <<_ACEOF
8766#line 8766 "configure"
8767#include "confdefs.h"
8768
8769#include <stdlib.h>
8770int
8771main ()
8772{
8773putwc(0,0);
8774  ;
8775  return 0;
8776}
8777_ACEOF
8778rm -f conftest.$ac_objext conftest$ac_exeext
8779if { (eval echo "$as_me:8779: \"$ac_link\"") >&5
8780  (eval $ac_link) 2>&5
8781  ac_status=$?
8782  echo "$as_me:8782: \$? = $ac_status" >&5
8783  (exit $ac_status); } &&
8784         { ac_try='test -s conftest$ac_exeext'
8785  { (eval echo "$as_me:8785: \"$ac_try\"") >&5
8786  (eval $ac_try) 2>&5
8787  ac_status=$?
8788  echo "$as_me:8788: \$? = $ac_status" >&5
8789  (exit $ac_status); }; }; then
8790  cf_cv_utf8_lib=yes
8791else
8792  echo "$as_me: failed program was:" >&5
8793cat conftest.$ac_ext >&5
8794
8795# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8796# will be set on completion of the AC_TRY_LINK below.
8797cf_cv_header_path_utf8=
8798cf_cv_library_path_utf8=
8799
8800echo "${as_me:-configure}:8800: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8801
8802cf_save_LIBS="$LIBS"
8803
8804cat >conftest.$ac_ext <<_ACEOF
8805#line 8805 "configure"
8806#include "confdefs.h"
8807
8808#include <libutf8.h>
8809int
8810main ()
8811{
8812putwc(0,0);
8813  ;
8814  return 0;
8815}
8816_ACEOF
8817rm -f conftest.$ac_objext conftest$ac_exeext
8818if { (eval echo "$as_me:8818: \"$ac_link\"") >&5
8819  (eval $ac_link) 2>&5
8820  ac_status=$?
8821  echo "$as_me:8821: \$? = $ac_status" >&5
8822  (exit $ac_status); } &&
8823         { ac_try='test -s conftest$ac_exeext'
8824  { (eval echo "$as_me:8824: \"$ac_try\"") >&5
8825  (eval $ac_try) 2>&5
8826  ac_status=$?
8827  echo "$as_me:8827: \$? = $ac_status" >&5
8828  (exit $ac_status); }; }; then
8829
8830	cf_cv_find_linkage_utf8=yes
8831	cf_cv_header_path_utf8=/usr/include
8832	cf_cv_library_path_utf8=/usr/lib
8833
8834else
8835  echo "$as_me: failed program was:" >&5
8836cat conftest.$ac_ext >&5
8837
8838LIBS="-lutf8  $cf_save_LIBS"
8839
8840cat >conftest.$ac_ext <<_ACEOF
8841#line 8841 "configure"
8842#include "confdefs.h"
8843
8844#include <libutf8.h>
8845int
8846main ()
8847{
8848putwc(0,0);
8849  ;
8850  return 0;
8851}
8852_ACEOF
8853rm -f conftest.$ac_objext conftest$ac_exeext
8854if { (eval echo "$as_me:8854: \"$ac_link\"") >&5
8855  (eval $ac_link) 2>&5
8856  ac_status=$?
8857  echo "$as_me:8857: \$? = $ac_status" >&5
8858  (exit $ac_status); } &&
8859         { ac_try='test -s conftest$ac_exeext'
8860  { (eval echo "$as_me:8860: \"$ac_try\"") >&5
8861  (eval $ac_try) 2>&5
8862  ac_status=$?
8863  echo "$as_me:8863: \$? = $ac_status" >&5
8864  (exit $ac_status); }; }; then
8865
8866	cf_cv_find_linkage_utf8=yes
8867	cf_cv_header_path_utf8=/usr/include
8868	cf_cv_library_path_utf8=/usr/lib
8869	cf_cv_library_file_utf8="-lutf8"
8870
8871else
8872  echo "$as_me: failed program was:" >&5
8873cat conftest.$ac_ext >&5
8874
8875	cf_cv_find_linkage_utf8=no
8876	LIBS="$cf_save_LIBS"
8877
8878    test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6
8879
8880echo "${as_me:-configure}:8880: testing find linkage for utf8 library ..." 1>&5
8881
8882echo "${as_me:-configure}:8882: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8883
8884    cf_save_CPPFLAGS="$CPPFLAGS"
8885    cf_test_CPPFLAGS="$CPPFLAGS"
8886
8887cf_search=
8888
8889# collect the current set of include-directories from compiler flags
8890cf_header_path_list=""
8891if test -n "${CFLAGS}${CPPFLAGS}" ; then
8892	for cf_header_path in $CPPFLAGS $CFLAGS
8893	do
8894		case $cf_header_path in #(vi
8895		-I*)
8896			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8897
8898test "$cf_header_path" != "NONE" && \
8899test -d "$cf_header_path" && \
8900 {
8901	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
8902	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8903	test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8904	test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8905	test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8906	test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8907}
8908
8909			cf_header_path_list="$cf_header_path_list $cf_search"
8910			;;
8911		esac
8912	done
8913fi
8914
8915# add the variations for the package we are looking for
8916
8917cf_search=
8918
8919test "/usr" != "$prefix" && \
8920test -d "/usr" && \
8921(test $prefix = NONE || test "/usr" != "$prefix") && {
8922	test -n "$verbose" && echo "	... testing for include-directories under /usr"
8923	test -d /usr/include &&          cf_search="$cf_search /usr/include"
8924	test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8925	test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8926	test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8927	test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8928}
8929
8930test "$prefix" != "NONE" && \
8931test -d "$prefix" && \
8932 {
8933	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
8934	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8935	test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8936	test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8937	test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8938	test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8939}
8940
8941test "/usr/local" != "$prefix" && \
8942test -d "/usr/local" && \
8943(test $prefix = NONE || test "/usr/local" != "$prefix") && {
8944	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
8945	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8946	test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8947	test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8948	test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8949	test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8950}
8951
8952test "/opt" != "$prefix" && \
8953test -d "/opt" && \
8954(test $prefix = NONE || test "/opt" != "$prefix") && {
8955	test -n "$verbose" && echo "	... testing for include-directories under /opt"
8956	test -d /opt/include &&          cf_search="$cf_search /opt/include"
8957	test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8958	test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8959	test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8960	test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8961}
8962
8963test "$HOME" != "$prefix" && \
8964test -d "$HOME" && \
8965(test $prefix = NONE || test "$HOME" != "$prefix") && {
8966	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
8967	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8968	test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8969	test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8970	test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8971	test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8972}
8973
8974test "$includedir" != NONE && \
8975test "$includedir" != "/usr/include" && \
8976test -d "$includedir" && {
8977	test -d $includedir &&    cf_search="$cf_search $includedir"
8978	test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8979}
8980
8981test "$oldincludedir" != NONE && \
8982test "$oldincludedir" != "/usr/include" && \
8983test -d "$oldincludedir" && {
8984	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8985	test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8986}
8987
8988cf_search="$cf_search $cf_header_path_list"
8989
8990    for cf_cv_header_path_utf8 in $cf_search
8991    do
8992      if test -d $cf_cv_header_path_utf8 ; then
8993        test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6
8994
8995echo "${as_me:-configure}:8995: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8996
8997        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8998        cat >conftest.$ac_ext <<_ACEOF
8999#line 8999 "configure"
9000#include "confdefs.h"
9001
9002#include <libutf8.h>
9003int
9004main ()
9005{
9006putwc(0,0);
9007  ;
9008  return 0;
9009}
9010_ACEOF
9011rm -f conftest.$ac_objext
9012if { (eval echo "$as_me:9012: \"$ac_compile\"") >&5
9013  (eval $ac_compile) 2>&5
9014  ac_status=$?
9015  echo "$as_me:9015: \$? = $ac_status" >&5
9016  (exit $ac_status); } &&
9017         { ac_try='test -s conftest.$ac_objext'
9018  { (eval echo "$as_me:9018: \"$ac_try\"") >&5
9019  (eval $ac_try) 2>&5
9020  ac_status=$?
9021  echo "$as_me:9021: \$? = $ac_status" >&5
9022  (exit $ac_status); }; }; then
9023
9024            test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9025
9026echo "${as_me:-configure}:9026: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9027
9028            cf_cv_find_linkage_utf8=maybe
9029            cf_test_CPPFLAGS="$CPPFLAGS"
9030            break
9031else
9032  echo "$as_me: failed program was:" >&5
9033cat conftest.$ac_ext >&5
9034
9035            CPPFLAGS="$cf_save_CPPFLAGS"
9036
9037fi
9038rm -f conftest.$ac_objext conftest.$ac_ext
9039      fi
9040    done
9041
9042    if test "$cf_cv_find_linkage_utf8" = maybe ; then
9043
9044echo "${as_me:-configure}:9044: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9045
9046      cf_save_LIBS="$LIBS"
9047      cf_save_LDFLAGS="$LDFLAGS"
9048
9049      if test "$cf_cv_find_linkage_utf8" != yes ; then
9050
9051cf_search=
9052cf_library_path_list=""
9053if test -n "${LDFLAGS}${LIBS}" ; then
9054	for cf_library_path in $LDFLAGS $LIBS
9055	do
9056		case $cf_library_path in #(vi
9057		-L*)
9058			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9059
9060test "$cf_library_path" != "NONE" && \
9061test -d "$cf_library_path" && \
9062 {
9063	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
9064	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9065	test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9066	test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9067	test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9068	test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9069}
9070
9071			cf_library_path_list="$cf_library_path_list $cf_search"
9072			;;
9073		esac
9074	done
9075fi
9076
9077cf_search=
9078
9079test "/usr" != "$prefix" && \
9080test -d "/usr" && \
9081(test $prefix = NONE || test "/usr" != "$prefix") && {
9082	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
9083	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9084	test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9085	test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9086	test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9087	test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9088}
9089
9090test "$prefix" != "NONE" && \
9091test -d "$prefix" && \
9092 {
9093	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
9094	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9095	test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9096	test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9097	test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9098	test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9099}
9100
9101test "/usr/local" != "$prefix" && \
9102test -d "/usr/local" && \
9103(test $prefix = NONE || test "/usr/local" != "$prefix") && {
9104	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
9105	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9106	test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9107	test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9108	test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9109	test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9110}
9111
9112test "/opt" != "$prefix" && \
9113test -d "/opt" && \
9114(test $prefix = NONE || test "/opt" != "$prefix") && {
9115	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
9116	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9117	test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9118	test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9119	test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9120	test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9121}
9122
9123test "$HOME" != "$prefix" && \
9124test -d "$HOME" && \
9125(test $prefix = NONE || test "$HOME" != "$prefix") && {
9126	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
9127	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9128	test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9129	test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9130	test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9131	test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9132}
9133
9134cf_search="$cf_library_path_list $cf_search"
9135
9136        for cf_cv_library_path_utf8 in $cf_search
9137        do
9138          if test -d $cf_cv_library_path_utf8 ; then
9139            test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6
9140
9141echo "${as_me:-configure}:9141: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9142
9143            CPPFLAGS="$cf_test_CPPFLAGS"
9144            LIBS="-lutf8  $cf_save_LIBS"
9145            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9146            cat >conftest.$ac_ext <<_ACEOF
9147#line 9147 "configure"
9148#include "confdefs.h"
9149
9150#include <libutf8.h>
9151int
9152main ()
9153{
9154putwc(0,0);
9155  ;
9156  return 0;
9157}
9158_ACEOF
9159rm -f conftest.$ac_objext conftest$ac_exeext
9160if { (eval echo "$as_me:9160: \"$ac_link\"") >&5
9161  (eval $ac_link) 2>&5
9162  ac_status=$?
9163  echo "$as_me:9163: \$? = $ac_status" >&5
9164  (exit $ac_status); } &&
9165         { ac_try='test -s conftest$ac_exeext'
9166  { (eval echo "$as_me:9166: \"$ac_try\"") >&5
9167  (eval $ac_try) 2>&5
9168  ac_status=$?
9169  echo "$as_me:9169: \$? = $ac_status" >&5
9170  (exit $ac_status); }; }; then
9171
9172                test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9173
9174echo "${as_me:-configure}:9174: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9175
9176                cf_cv_find_linkage_utf8=yes
9177                cf_cv_library_file_utf8="-lutf8"
9178                break
9179else
9180  echo "$as_me: failed program was:" >&5
9181cat conftest.$ac_ext >&5
9182
9183                CPPFLAGS="$cf_save_CPPFLAGS"
9184                LIBS="$cf_save_LIBS"
9185                LDFLAGS="$cf_save_LDFLAGS"
9186
9187fi
9188rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9189          fi
9190        done
9191        CPPFLAGS="$cf_save_CPPFLAGS"
9192        LDFLAGS="$cf_save_LDFLAGS"
9193      fi
9194
9195    else
9196      cf_cv_find_linkage_utf8=no
9197    fi
9198
9199fi
9200rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9201
9202fi
9203rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9204
9205LIBS="$cf_save_LIBS"
9206
9207if test "$cf_cv_find_linkage_utf8" = yes ; then
9208cf_cv_utf8_lib=add-on
9209else
9210cf_cv_utf8_lib=no
9211fi
9212
9213fi
9214rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9215fi
9216echo "$as_me:9216: result: $cf_cv_utf8_lib" >&5
9217echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9218
9219# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9220# ncurses/ncursesw:
9221if test "$cf_cv_utf8_lib" = "add-on" ; then
9222	cat >>confdefs.h <<\EOF
9223#define HAVE_LIBUTF8_H 1
9224EOF
9225
9226if test -n "$cf_cv_header_path_utf8" ; then
9227  for cf_add_incdir in $cf_cv_header_path_utf8
9228  do
9229	while test $cf_add_incdir != /usr/include
9230	do
9231	  if test -d $cf_add_incdir
9232	  then
9233		cf_have_incdir=no
9234		if test -n "$CFLAGS$CPPFLAGS" ; then
9235		  # a loop is needed to ensure we can add subdirs of existing dirs
9236		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9237			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9238			  cf_have_incdir=yes; break
9239			fi
9240		  done
9241		fi
9242
9243		if test "$cf_have_incdir" = no ; then
9244		  if test "$cf_add_incdir" = /usr/local/include ; then
9245			if test "$GCC" = yes
9246			then
9247			  cf_save_CPPFLAGS=$CPPFLAGS
9248			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9249			  cat >conftest.$ac_ext <<_ACEOF
9250#line 9250 "configure"
9251#include "confdefs.h"
9252#include <stdio.h>
9253int
9254main ()
9255{
9256printf("Hello")
9257  ;
9258  return 0;
9259}
9260_ACEOF
9261rm -f conftest.$ac_objext
9262if { (eval echo "$as_me:9262: \"$ac_compile\"") >&5
9263  (eval $ac_compile) 2>&5
9264  ac_status=$?
9265  echo "$as_me:9265: \$? = $ac_status" >&5
9266  (exit $ac_status); } &&
9267         { ac_try='test -s conftest.$ac_objext'
9268  { (eval echo "$as_me:9268: \"$ac_try\"") >&5
9269  (eval $ac_try) 2>&5
9270  ac_status=$?
9271  echo "$as_me:9271: \$? = $ac_status" >&5
9272  (exit $ac_status); }; }; then
9273  :
9274else
9275  echo "$as_me: failed program was:" >&5
9276cat conftest.$ac_ext >&5
9277cf_have_incdir=yes
9278fi
9279rm -f conftest.$ac_objext conftest.$ac_ext
9280			  CPPFLAGS=$cf_save_CPPFLAGS
9281			fi
9282		  fi
9283		fi
9284
9285		if test "$cf_have_incdir" = no ; then
9286		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9287
9288echo "${as_me:-configure}:9288: testing adding $cf_add_incdir to include-path ..." 1>&5
9289
9290		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9291
9292		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9293		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9294		  cf_add_incdir="$cf_top_incdir"
9295		else
9296		  break
9297		fi
9298	  fi
9299	done
9300  done
9301fi
9302
9303if test -n "$cf_cv_library_path_utf8" ; then
9304  for cf_add_libdir in $cf_cv_library_path_utf8
9305  do
9306    if test $cf_add_libdir = /usr/lib ; then
9307      :
9308    elif test -d $cf_add_libdir
9309    then
9310      cf_have_libdir=no
9311      if test -n "$LDFLAGS$LIBS" ; then
9312        # a loop is needed to ensure we can add subdirs of existing dirs
9313        for cf_test_libdir in $LDFLAGS $LIBS ; do
9314          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9315            cf_have_libdir=yes; break
9316          fi
9317        done
9318      fi
9319      if test "$cf_have_libdir" = no ; then
9320        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
9321
9322echo "${as_me:-configure}:9322: testing adding $cf_add_libdir to library-path ..." 1>&5
9323
9324        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9325      fi
9326    fi
9327  done
9328fi
9329
9330	LIBS="$cf_cv_library_file_utf8 $LIBS"
9331fi
9332
9333	fi
9334
9335cf_ncuconfig_root=$use_ncurses
9336
9337echo "Looking for ${cf_ncuconfig_root}-config"
9338for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9339do
9340  # Extract the first word of "$ac_prog", so it can be a program name with args.
9341set dummy $ac_prog; ac_word=$2
9342echo "$as_me:9342: checking for $ac_word" >&5
9343echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9344if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
9345  echo $ECHO_N "(cached) $ECHO_C" >&6
9346else
9347  case $NCURSES_CONFIG in
9348  [\\/]* | ?:[\\/]*)
9349  ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
9350  ;;
9351  *)
9352  ac_save_IFS=$IFS; IFS=$ac_path_separator
9353ac_dummy="$PATH"
9354for ac_dir in $ac_dummy; do
9355  IFS=$ac_save_IFS
9356  test -z "$ac_dir" && ac_dir=.
9357  if $as_executable_p "$ac_dir/$ac_word"; then
9358   ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
9359   echo "$as_me:9359: found $ac_dir/$ac_word" >&5
9360   break
9361fi
9362done
9363
9364  ;;
9365esac
9366fi
9367NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
9368
9369if test -n "$NCURSES_CONFIG"; then
9370  echo "$as_me:9370: result: $NCURSES_CONFIG" >&5
9371echo "${ECHO_T}$NCURSES_CONFIG" >&6
9372else
9373  echo "$as_me:9373: result: no" >&5
9374echo "${ECHO_T}no" >&6
9375fi
9376
9377  test -n "$NCURSES_CONFIG" && break
9378done
9379test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
9380
9381if test "$NCURSES_CONFIG" != none ; then
9382
9383CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
9384LIBS="`$NCURSES_CONFIG --libs` $LIBS"
9385
9386# even with config script, some packages use no-override for curses.h
9387
9388echo "$as_me:9388: checking if we have identified curses headers" >&5
9389echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9390if test "${cf_cv_ncurses_header+set}" = set; then
9391  echo $ECHO_N "(cached) $ECHO_C" >&6
9392else
9393
9394cf_cv_ncurses_header=none
9395for cf_header in  \
9396    $use_ncurses/ncurses.h \
9397	$use_ncurses/curses.h \
9398	ncurses.h \
9399	curses.h
9400do
9401cat >conftest.$ac_ext <<_ACEOF
9402#line 9402 "configure"
9403#include "confdefs.h"
9404#include <${cf_header}>
9405int
9406main ()
9407{
9408initscr(); tgoto("?", 0,0)
9409  ;
9410  return 0;
9411}
9412_ACEOF
9413rm -f conftest.$ac_objext
9414if { (eval echo "$as_me:9414: \"$ac_compile\"") >&5
9415  (eval $ac_compile) 2>&5
9416  ac_status=$?
9417  echo "$as_me:9417: \$? = $ac_status" >&5
9418  (exit $ac_status); } &&
9419         { ac_try='test -s conftest.$ac_objext'
9420  { (eval echo "$as_me:9420: \"$ac_try\"") >&5
9421  (eval $ac_try) 2>&5
9422  ac_status=$?
9423  echo "$as_me:9423: \$? = $ac_status" >&5
9424  (exit $ac_status); }; }; then
9425  cf_cv_ncurses_header=$cf_header; break
9426else
9427  echo "$as_me: failed program was:" >&5
9428cat conftest.$ac_ext >&5
9429fi
9430rm -f conftest.$ac_objext conftest.$ac_ext
9431done
9432
9433fi
9434echo "$as_me:9434: result: $cf_cv_ncurses_header" >&5
9435echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9436
9437if test "$cf_cv_ncurses_header" = none ; then
9438	{ { echo "$as_me:9438: error: No curses header-files found" >&5
9439echo "$as_me: error: No curses header-files found" >&2;}
9440   { (exit 1); exit 1; }; }
9441fi
9442
9443# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9444
9445for ac_header in $cf_cv_ncurses_header
9446do
9447as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9448echo "$as_me:9448: checking for $ac_header" >&5
9449echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9450if eval "test \"\${$as_ac_Header+set}\" = set"; then
9451  echo $ECHO_N "(cached) $ECHO_C" >&6
9452else
9453  cat >conftest.$ac_ext <<_ACEOF
9454#line 9454 "configure"
9455#include "confdefs.h"
9456#include <$ac_header>
9457_ACEOF
9458if { (eval echo "$as_me:9458: \"$ac_cpp conftest.$ac_ext\"") >&5
9459  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9460  ac_status=$?
9461  egrep -v '^ *\+' conftest.er1 >conftest.err
9462  rm -f conftest.er1
9463  cat conftest.err >&5
9464  echo "$as_me:9464: \$? = $ac_status" >&5
9465  (exit $ac_status); } >/dev/null; then
9466  if test -s conftest.err; then
9467    ac_cpp_err=$ac_c_preproc_warn_flag
9468  else
9469    ac_cpp_err=
9470  fi
9471else
9472  ac_cpp_err=yes
9473fi
9474if test -z "$ac_cpp_err"; then
9475  eval "$as_ac_Header=yes"
9476else
9477  echo "$as_me: failed program was:" >&5
9478  cat conftest.$ac_ext >&5
9479  eval "$as_ac_Header=no"
9480fi
9481rm -f conftest.err conftest.$ac_ext
9482fi
9483echo "$as_me:9483: result: `eval echo '${'$as_ac_Header'}'`" >&5
9484echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9485if test `eval echo '${'$as_ac_Header'}'` = yes; then
9486  cat >>confdefs.h <<EOF
9487#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9488EOF
9489
9490fi
9491done
9492
9493cat >>confdefs.h <<\EOF
9494#define NCURSES 1
9495EOF
9496
9497cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9498
9499cat >>confdefs.h <<EOF
9500#define $cf_nculib_ROOT 1
9501EOF
9502
9503cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
9504
9505else
9506
9507cf_ncuhdr_root=$use_ncurses
9508
9509test -n "$cf_cv_curses_dir" && \
9510test "$cf_cv_curses_dir" != "no" && { \
9511
9512if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9513  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9514  do
9515	while test $cf_add_incdir != /usr/include
9516	do
9517	  if test -d $cf_add_incdir
9518	  then
9519		cf_have_incdir=no
9520		if test -n "$CFLAGS$CPPFLAGS" ; then
9521		  # a loop is needed to ensure we can add subdirs of existing dirs
9522		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9523			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9524			  cf_have_incdir=yes; break
9525			fi
9526		  done
9527		fi
9528
9529		if test "$cf_have_incdir" = no ; then
9530		  if test "$cf_add_incdir" = /usr/local/include ; then
9531			if test "$GCC" = yes
9532			then
9533			  cf_save_CPPFLAGS=$CPPFLAGS
9534			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9535			  cat >conftest.$ac_ext <<_ACEOF
9536#line 9536 "configure"
9537#include "confdefs.h"
9538#include <stdio.h>
9539int
9540main ()
9541{
9542printf("Hello")
9543  ;
9544  return 0;
9545}
9546_ACEOF
9547rm -f conftest.$ac_objext
9548if { (eval echo "$as_me:9548: \"$ac_compile\"") >&5
9549  (eval $ac_compile) 2>&5
9550  ac_status=$?
9551  echo "$as_me:9551: \$? = $ac_status" >&5
9552  (exit $ac_status); } &&
9553         { ac_try='test -s conftest.$ac_objext'
9554  { (eval echo "$as_me:9554: \"$ac_try\"") >&5
9555  (eval $ac_try) 2>&5
9556  ac_status=$?
9557  echo "$as_me:9557: \$? = $ac_status" >&5
9558  (exit $ac_status); }; }; then
9559  :
9560else
9561  echo "$as_me: failed program was:" >&5
9562cat conftest.$ac_ext >&5
9563cf_have_incdir=yes
9564fi
9565rm -f conftest.$ac_objext conftest.$ac_ext
9566			  CPPFLAGS=$cf_save_CPPFLAGS
9567			fi
9568		  fi
9569		fi
9570
9571		if test "$cf_have_incdir" = no ; then
9572		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9573
9574echo "${as_me:-configure}:9574: testing adding $cf_add_incdir to include-path ..." 1>&5
9575
9576		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9577
9578		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9579		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9580		  cf_add_incdir="$cf_top_incdir"
9581		else
9582		  break
9583		fi
9584	  fi
9585	done
9586  done
9587fi
9588
9589}
9590
9591echo "$as_me:9591: checking for $cf_ncuhdr_root header in include-path" >&5
9592echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9593if test "${cf_cv_ncurses_h+set}" = set; then
9594  echo $ECHO_N "(cached) $ECHO_C" >&6
9595else
9596
9597	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9598	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
9599	for cf_header in $cf_header_list
9600	do
9601
9602	cat >conftest.$ac_ext <<_ACEOF
9603#line 9603 "configure"
9604#include "confdefs.h"
9605
9606#include <$cf_header>
9607int
9608main ()
9609{
9610
9611#ifdef NCURSES_VERSION
9612
9613printf("%s\n", NCURSES_VERSION);
9614#else
9615#ifdef __NCURSES_H
9616printf("old\n");
9617#else
9618	make an error
9619#endif
9620#endif
9621
9622  ;
9623  return 0;
9624}
9625_ACEOF
9626rm -f conftest.$ac_objext
9627if { (eval echo "$as_me:9627: \"$ac_compile\"") >&5
9628  (eval $ac_compile) 2>&5
9629  ac_status=$?
9630  echo "$as_me:9630: \$? = $ac_status" >&5
9631  (exit $ac_status); } &&
9632         { ac_try='test -s conftest.$ac_objext'
9633  { (eval echo "$as_me:9633: \"$ac_try\"") >&5
9634  (eval $ac_try) 2>&5
9635  ac_status=$?
9636  echo "$as_me:9636: \$? = $ac_status" >&5
9637  (exit $ac_status); }; }; then
9638  cf_cv_ncurses_h=$cf_header
9639
9640else
9641  echo "$as_me: failed program was:" >&5
9642cat conftest.$ac_ext >&5
9643cf_cv_ncurses_h=no
9644fi
9645rm -f conftest.$ac_objext conftest.$ac_ext
9646
9647		test "$cf_cv_ncurses_h" != no && break
9648	done
9649
9650fi
9651echo "$as_me:9651: result: $cf_cv_ncurses_h" >&5
9652echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9653
9654if test "$cf_cv_ncurses_h" != no ; then
9655	cf_cv_ncurses_header=$cf_cv_ncurses_h
9656else
9657
9658echo "$as_me:9658: checking for $cf_ncuhdr_root include-path" >&5
9659echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9660if test "${cf_cv_ncurses_h2+set}" = set; then
9661  echo $ECHO_N "(cached) $ECHO_C" >&6
9662else
9663
9664	test -n "$verbose" && echo
9665
9666cf_search=
9667
9668# collect the current set of include-directories from compiler flags
9669cf_header_path_list=""
9670if test -n "${CFLAGS}${CPPFLAGS}" ; then
9671	for cf_header_path in $CPPFLAGS $CFLAGS
9672	do
9673		case $cf_header_path in #(vi
9674		-I*)
9675			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9676
9677test "$cf_header_path" != "NONE" && \
9678test -d "$cf_header_path" && \
9679 {
9680	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
9681	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9682	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9683	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9684	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9685	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"
9686}
9687
9688			cf_header_path_list="$cf_header_path_list $cf_search"
9689			;;
9690		esac
9691	done
9692fi
9693
9694# add the variations for the package we are looking for
9695
9696cf_search=
9697
9698test "/usr" != "$prefix" && \
9699test -d "/usr" && \
9700(test $prefix = NONE || test "/usr" != "$prefix") && {
9701	test -n "$verbose" && echo "	... testing for include-directories under /usr"
9702	test -d /usr/include &&          cf_search="$cf_search /usr/include"
9703	test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
9704	test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
9705	test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
9706	test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9707}
9708
9709test "$prefix" != "NONE" && \
9710test -d "$prefix" && \
9711 {
9712	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
9713	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9714	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9715	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9716	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9717	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9718}
9719
9720test "/usr/local" != "$prefix" && \
9721test -d "/usr/local" && \
9722(test $prefix = NONE || test "/usr/local" != "$prefix") && {
9723	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
9724	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9725	test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
9726	test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
9727	test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
9728	test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9729}
9730
9731test "/opt" != "$prefix" && \
9732test -d "/opt" && \
9733(test $prefix = NONE || test "/opt" != "$prefix") && {
9734	test -n "$verbose" && echo "	... testing for include-directories under /opt"
9735	test -d /opt/include &&          cf_search="$cf_search /opt/include"
9736	test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
9737	test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
9738	test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
9739	test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9740}
9741
9742test "$HOME" != "$prefix" && \
9743test -d "$HOME" && \
9744(test $prefix = NONE || test "$HOME" != "$prefix") && {
9745	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
9746	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9747	test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
9748	test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
9749	test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
9750	test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9751}
9752
9753test "$includedir" != NONE && \
9754test "$includedir" != "/usr/include" && \
9755test -d "$includedir" && {
9756	test -d $includedir &&    cf_search="$cf_search $includedir"
9757	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9758}
9759
9760test "$oldincludedir" != NONE && \
9761test "$oldincludedir" != "/usr/include" && \
9762test -d "$oldincludedir" && {
9763	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9764	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9765}
9766
9767cf_search="$cf_search $cf_header_path_list"
9768
9769	test -n "$verbose" && echo search path $cf_search
9770	cf_save2_CPPFLAGS="$CPPFLAGS"
9771	for cf_incdir in $cf_search
9772	do
9773
9774if test -n "$cf_incdir" ; then
9775  for cf_add_incdir in $cf_incdir
9776  do
9777	while test $cf_add_incdir != /usr/include
9778	do
9779	  if test -d $cf_add_incdir
9780	  then
9781		cf_have_incdir=no
9782		if test -n "$CFLAGS$CPPFLAGS" ; then
9783		  # a loop is needed to ensure we can add subdirs of existing dirs
9784		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9785			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9786			  cf_have_incdir=yes; break
9787			fi
9788		  done
9789		fi
9790
9791		if test "$cf_have_incdir" = no ; then
9792		  if test "$cf_add_incdir" = /usr/local/include ; then
9793			if test "$GCC" = yes
9794			then
9795			  cf_save_CPPFLAGS=$CPPFLAGS
9796			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9797			  cat >conftest.$ac_ext <<_ACEOF
9798#line 9798 "configure"
9799#include "confdefs.h"
9800#include <stdio.h>
9801int
9802main ()
9803{
9804printf("Hello")
9805  ;
9806  return 0;
9807}
9808_ACEOF
9809rm -f conftest.$ac_objext
9810if { (eval echo "$as_me:9810: \"$ac_compile\"") >&5
9811  (eval $ac_compile) 2>&5
9812  ac_status=$?
9813  echo "$as_me:9813: \$? = $ac_status" >&5
9814  (exit $ac_status); } &&
9815         { ac_try='test -s conftest.$ac_objext'
9816  { (eval echo "$as_me:9816: \"$ac_try\"") >&5
9817  (eval $ac_try) 2>&5
9818  ac_status=$?
9819  echo "$as_me:9819: \$? = $ac_status" >&5
9820  (exit $ac_status); }; }; then
9821  :
9822else
9823  echo "$as_me: failed program was:" >&5
9824cat conftest.$ac_ext >&5
9825cf_have_incdir=yes
9826fi
9827rm -f conftest.$ac_objext conftest.$ac_ext
9828			  CPPFLAGS=$cf_save_CPPFLAGS
9829			fi
9830		  fi
9831		fi
9832
9833		if test "$cf_have_incdir" = no ; then
9834		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9835
9836echo "${as_me:-configure}:9836: testing adding $cf_add_incdir to include-path ..." 1>&5
9837
9838		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9839
9840		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9841		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9842		  cf_add_incdir="$cf_top_incdir"
9843		else
9844		  break
9845		fi
9846	  fi
9847	done
9848  done
9849fi
9850
9851		for cf_header in \
9852			ncurses.h \
9853			curses.h
9854		do
9855
9856	cat >conftest.$ac_ext <<_ACEOF
9857#line 9857 "configure"
9858#include "confdefs.h"
9859
9860#include <$cf_header>
9861int
9862main ()
9863{
9864
9865#ifdef NCURSES_VERSION
9866
9867printf("%s\n", NCURSES_VERSION);
9868#else
9869#ifdef __NCURSES_H
9870printf("old\n");
9871#else
9872	make an error
9873#endif
9874#endif
9875
9876  ;
9877  return 0;
9878}
9879_ACEOF
9880rm -f conftest.$ac_objext
9881if { (eval echo "$as_me:9881: \"$ac_compile\"") >&5
9882  (eval $ac_compile) 2>&5
9883  ac_status=$?
9884  echo "$as_me:9884: \$? = $ac_status" >&5
9885  (exit $ac_status); } &&
9886         { ac_try='test -s conftest.$ac_objext'
9887  { (eval echo "$as_me:9887: \"$ac_try\"") >&5
9888  (eval $ac_try) 2>&5
9889  ac_status=$?
9890  echo "$as_me:9890: \$? = $ac_status" >&5
9891  (exit $ac_status); }; }; then
9892  cf_cv_ncurses_h2=$cf_header
9893
9894else
9895  echo "$as_me: failed program was:" >&5
9896cat conftest.$ac_ext >&5
9897cf_cv_ncurses_h2=no
9898fi
9899rm -f conftest.$ac_objext conftest.$ac_ext
9900
9901			if test "$cf_cv_ncurses_h2" != no ; then
9902				cf_cv_ncurses_h2=$cf_incdir/$cf_header
9903				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
9904				break
9905			fi
9906			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
9907		done
9908		CPPFLAGS="$cf_save2_CPPFLAGS"
9909		test "$cf_cv_ncurses_h2" != no && break
9910	done
9911	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9911: error: not found" >&5
9912echo "$as_me: error: not found" >&2;}
9913   { (exit 1); exit 1; }; }
9914
9915fi
9916echo "$as_me:9916: result: $cf_cv_ncurses_h2" >&5
9917echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9918
9919	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9920	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9921	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9922		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9923	fi
9924
9925if test -n "$cf_1st_incdir" ; then
9926  for cf_add_incdir in $cf_1st_incdir
9927  do
9928	while test $cf_add_incdir != /usr/include
9929	do
9930	  if test -d $cf_add_incdir
9931	  then
9932		cf_have_incdir=no
9933		if test -n "$CFLAGS$CPPFLAGS" ; then
9934		  # a loop is needed to ensure we can add subdirs of existing dirs
9935		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9936			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9937			  cf_have_incdir=yes; break
9938			fi
9939		  done
9940		fi
9941
9942		if test "$cf_have_incdir" = no ; then
9943		  if test "$cf_add_incdir" = /usr/local/include ; then
9944			if test "$GCC" = yes
9945			then
9946			  cf_save_CPPFLAGS=$CPPFLAGS
9947			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9948			  cat >conftest.$ac_ext <<_ACEOF
9949#line 9949 "configure"
9950#include "confdefs.h"
9951#include <stdio.h>
9952int
9953main ()
9954{
9955printf("Hello")
9956  ;
9957  return 0;
9958}
9959_ACEOF
9960rm -f conftest.$ac_objext
9961if { (eval echo "$as_me:9961: \"$ac_compile\"") >&5
9962  (eval $ac_compile) 2>&5
9963  ac_status=$?
9964  echo "$as_me:9964: \$? = $ac_status" >&5
9965  (exit $ac_status); } &&
9966         { ac_try='test -s conftest.$ac_objext'
9967  { (eval echo "$as_me:9967: \"$ac_try\"") >&5
9968  (eval $ac_try) 2>&5
9969  ac_status=$?
9970  echo "$as_me:9970: \$? = $ac_status" >&5
9971  (exit $ac_status); }; }; then
9972  :
9973else
9974  echo "$as_me: failed program was:" >&5
9975cat conftest.$ac_ext >&5
9976cf_have_incdir=yes
9977fi
9978rm -f conftest.$ac_objext conftest.$ac_ext
9979			  CPPFLAGS=$cf_save_CPPFLAGS
9980			fi
9981		  fi
9982		fi
9983
9984		if test "$cf_have_incdir" = no ; then
9985		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9986
9987echo "${as_me:-configure}:9987: testing adding $cf_add_incdir to include-path ..." 1>&5
9988
9989		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9990
9991		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9992		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9993		  cf_add_incdir="$cf_top_incdir"
9994		else
9995		  break
9996		fi
9997	  fi
9998	done
9999  done
10000fi
10001
10002fi
10003
10004# Set definitions to allow ifdef'ing for ncurses.h
10005
10006case $cf_cv_ncurses_header in # (vi
10007*ncurses.h)
10008	cat >>confdefs.h <<\EOF
10009#define HAVE_NCURSES_H 1
10010EOF
10011
10012	;;
10013esac
10014
10015case $cf_cv_ncurses_header in # (vi
10016ncurses/curses.h|ncurses/ncurses.h)
10017	cat >>confdefs.h <<\EOF
10018#define HAVE_NCURSES_NCURSES_H 1
10019EOF
10020
10021	;;
10022ncursesw/curses.h|ncursesw/ncurses.h)
10023	cat >>confdefs.h <<\EOF
10024#define HAVE_NCURSESW_NCURSES_H 1
10025EOF
10026
10027	;;
10028esac
10029
10030echo "$as_me:10030: checking for terminfo header" >&5
10031echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10032if test "${cf_cv_term_header+set}" = set; then
10033  echo $ECHO_N "(cached) $ECHO_C" >&6
10034else
10035
10036case ${cf_cv_ncurses_header} in #(vi
10037*/ncurses.h|*/ncursesw.h) #(vi
10038	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10039	;;
10040*)
10041	cf_term_header=term.h
10042	;;
10043esac
10044
10045for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10046do
10047cat >conftest.$ac_ext <<_ACEOF
10048#line 10048 "configure"
10049#include "confdefs.h"
10050#include <stdio.h>
10051#include <${cf_cv_ncurses_header:-curses.h}>
10052#include <$cf_test>
10053
10054int
10055main ()
10056{
10057int x = auto_left_margin
10058  ;
10059  return 0;
10060}
10061_ACEOF
10062rm -f conftest.$ac_objext
10063if { (eval echo "$as_me:10063: \"$ac_compile\"") >&5
10064  (eval $ac_compile) 2>&5
10065  ac_status=$?
10066  echo "$as_me:10066: \$? = $ac_status" >&5
10067  (exit $ac_status); } &&
10068         { ac_try='test -s conftest.$ac_objext'
10069  { (eval echo "$as_me:10069: \"$ac_try\"") >&5
10070  (eval $ac_try) 2>&5
10071  ac_status=$?
10072  echo "$as_me:10072: \$? = $ac_status" >&5
10073  (exit $ac_status); }; }; then
10074
10075	cf_cv_term_header="$cf_test"
10076else
10077  echo "$as_me: failed program was:" >&5
10078cat conftest.$ac_ext >&5
10079
10080	cf_cv_term_header=unknown
10081
10082fi
10083rm -f conftest.$ac_objext conftest.$ac_ext
10084	test "$cf_cv_term_header" != unknown && break
10085done
10086
10087fi
10088echo "$as_me:10088: result: $cf_cv_term_header" >&5
10089echo "${ECHO_T}$cf_cv_term_header" >&6
10090
10091# Set definitions to allow ifdef'ing to accommodate subdirectories
10092
10093case $cf_cv_term_header in # (vi
10094*term.h)
10095	cat >>confdefs.h <<\EOF
10096#define HAVE_TERM_H 1
10097EOF
10098
10099	;;
10100esac
10101
10102case $cf_cv_term_header in # (vi
10103ncurses/term.h) #(vi
10104	cat >>confdefs.h <<\EOF
10105#define HAVE_NCURSES_TERM_H 1
10106EOF
10107
10108	;;
10109ncursesw/term.h)
10110	cat >>confdefs.h <<\EOF
10111#define HAVE_NCURSESW_TERM_H 1
10112EOF
10113
10114	;;
10115esac
10116
10117# some applications need this, but should check for NCURSES_VERSION
10118cat >>confdefs.h <<\EOF
10119#define NCURSES 1
10120EOF
10121
10122echo "$as_me:10122: checking for ncurses version" >&5
10123echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10124if test "${cf_cv_ncurses_version+set}" = set; then
10125  echo $ECHO_N "(cached) $ECHO_C" >&6
10126else
10127
10128	cf_cv_ncurses_version=no
10129	cf_tempfile=out$$
10130	rm -f $cf_tempfile
10131	if test "$cross_compiling" = yes; then
10132
10133	# This will not work if the preprocessor splits the line after the
10134	# Autoconf token.  The 'unproto' program does that.
10135	cat > conftest.$ac_ext <<EOF
10136#include <${cf_cv_ncurses_header:-curses.h}>
10137#undef Autoconf
10138#ifdef NCURSES_VERSION
10139Autoconf NCURSES_VERSION
10140#else
10141#ifdef __NCURSES_H
10142Autoconf "old"
10143#endif
10144;
10145#endif
10146EOF
10147	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10148	{ (eval echo "$as_me:10148: \"$cf_try\"") >&5
10149  (eval $cf_try) 2>&5
10150  ac_status=$?
10151  echo "$as_me:10151: \$? = $ac_status" >&5
10152  (exit $ac_status); }
10153	if test -f conftest.out ; then
10154		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10155		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10156		rm -f conftest.out
10157	fi
10158
10159else
10160  cat >conftest.$ac_ext <<_ACEOF
10161#line 10161 "configure"
10162#include "confdefs.h"
10163
10164#include <${cf_cv_ncurses_header:-curses.h}>
10165#include <stdio.h>
10166int main()
10167{
10168	FILE *fp = fopen("$cf_tempfile", "w");
10169#ifdef NCURSES_VERSION
10170# ifdef NCURSES_VERSION_PATCH
10171	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10172# else
10173	fprintf(fp, "%s\n", NCURSES_VERSION);
10174# endif
10175#else
10176# ifdef __NCURSES_H
10177	fprintf(fp, "old\n");
10178# else
10179	make an error
10180# endif
10181#endif
10182	${cf_cv_main_return:-return}(0);
10183}
10184_ACEOF
10185rm -f conftest$ac_exeext
10186if { (eval echo "$as_me:10186: \"$ac_link\"") >&5
10187  (eval $ac_link) 2>&5
10188  ac_status=$?
10189  echo "$as_me:10189: \$? = $ac_status" >&5
10190  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10191  { (eval echo "$as_me:10191: \"$ac_try\"") >&5
10192  (eval $ac_try) 2>&5
10193  ac_status=$?
10194  echo "$as_me:10194: \$? = $ac_status" >&5
10195  (exit $ac_status); }; }; then
10196
10197	cf_cv_ncurses_version=`cat $cf_tempfile`
10198else
10199  echo "$as_me: program exited with status $ac_status" >&5
10200echo "$as_me: failed program was:" >&5
10201cat conftest.$ac_ext >&5
10202fi
10203rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10204fi
10205	rm -f $cf_tempfile
10206
10207fi
10208echo "$as_me:10208: result: $cf_cv_ncurses_version" >&5
10209echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10210test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
10211#define NCURSES 1
10212EOF
10213
10214cf_nculib_root=$use_ncurses
10215	# This works, except for the special case where we find gpm, but
10216	# ncurses is in a nonstandard location via $LIBS, and we really want
10217	# to link gpm.
10218cf_ncurses_LIBS=""
10219cf_ncurses_SAVE="$LIBS"
10220echo "$as_me:10220: checking for Gpm_Open in -lgpm" >&5
10221echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10222if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10223  echo $ECHO_N "(cached) $ECHO_C" >&6
10224else
10225  ac_check_lib_save_LIBS=$LIBS
10226LIBS="-lgpm  $LIBS"
10227cat >conftest.$ac_ext <<_ACEOF
10228#line 10228 "configure"
10229#include "confdefs.h"
10230
10231/* Override any gcc2 internal prototype to avoid an error.  */
10232#ifdef __cplusplus
10233extern "C"
10234#endif
10235/* We use char because int might match the return type of a gcc2
10236   builtin and then its argument prototype would still apply.  */
10237char Gpm_Open ();
10238int
10239main ()
10240{
10241Gpm_Open ();
10242  ;
10243  return 0;
10244}
10245_ACEOF
10246rm -f conftest.$ac_objext conftest$ac_exeext
10247if { (eval echo "$as_me:10247: \"$ac_link\"") >&5
10248  (eval $ac_link) 2>&5
10249  ac_status=$?
10250  echo "$as_me:10250: \$? = $ac_status" >&5
10251  (exit $ac_status); } &&
10252         { ac_try='test -s conftest$ac_exeext'
10253  { (eval echo "$as_me:10253: \"$ac_try\"") >&5
10254  (eval $ac_try) 2>&5
10255  ac_status=$?
10256  echo "$as_me:10256: \$? = $ac_status" >&5
10257  (exit $ac_status); }; }; then
10258  ac_cv_lib_gpm_Gpm_Open=yes
10259else
10260  echo "$as_me: failed program was:" >&5
10261cat conftest.$ac_ext >&5
10262ac_cv_lib_gpm_Gpm_Open=no
10263fi
10264rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10265LIBS=$ac_check_lib_save_LIBS
10266fi
10267echo "$as_me:10267: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10268echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10269if test $ac_cv_lib_gpm_Gpm_Open = yes; then
10270  echo "$as_me:10270: checking for initscr in -lgpm" >&5
10271echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10272if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10273  echo $ECHO_N "(cached) $ECHO_C" >&6
10274else
10275  ac_check_lib_save_LIBS=$LIBS
10276LIBS="-lgpm  $LIBS"
10277cat >conftest.$ac_ext <<_ACEOF
10278#line 10278 "configure"
10279#include "confdefs.h"
10280
10281/* Override any gcc2 internal prototype to avoid an error.  */
10282#ifdef __cplusplus
10283extern "C"
10284#endif
10285/* We use char because int might match the return type of a gcc2
10286   builtin and then its argument prototype would still apply.  */
10287char initscr ();
10288int
10289main ()
10290{
10291initscr ();
10292  ;
10293  return 0;
10294}
10295_ACEOF
10296rm -f conftest.$ac_objext conftest$ac_exeext
10297if { (eval echo "$as_me:10297: \"$ac_link\"") >&5
10298  (eval $ac_link) 2>&5
10299  ac_status=$?
10300  echo "$as_me:10300: \$? = $ac_status" >&5
10301  (exit $ac_status); } &&
10302         { ac_try='test -s conftest$ac_exeext'
10303  { (eval echo "$as_me:10303: \"$ac_try\"") >&5
10304  (eval $ac_try) 2>&5
10305  ac_status=$?
10306  echo "$as_me:10306: \$? = $ac_status" >&5
10307  (exit $ac_status); }; }; then
10308  ac_cv_lib_gpm_initscr=yes
10309else
10310  echo "$as_me: failed program was:" >&5
10311cat conftest.$ac_ext >&5
10312ac_cv_lib_gpm_initscr=no
10313fi
10314rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10315LIBS=$ac_check_lib_save_LIBS
10316fi
10317echo "$as_me:10317: result: $ac_cv_lib_gpm_initscr" >&5
10318echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10319if test $ac_cv_lib_gpm_initscr = yes; then
10320  LIBS="$cf_ncurses_SAVE"
10321else
10322  cf_ncurses_LIBS="-lgpm"
10323fi
10324
10325fi
10326
10327case $host_os in #(vi
10328freebsd*)
10329	# This is only necessary if you are linking against an obsolete
10330	# version of ncurses (but it should do no harm, since it's static).
10331	if test "$cf_nculib_root" = ncurses ; then
10332		echo "$as_me:10332: checking for tgoto in -lmytinfo" >&5
10333echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10334if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10335  echo $ECHO_N "(cached) $ECHO_C" >&6
10336else
10337  ac_check_lib_save_LIBS=$LIBS
10338LIBS="-lmytinfo  $LIBS"
10339cat >conftest.$ac_ext <<_ACEOF
10340#line 10340 "configure"
10341#include "confdefs.h"
10342
10343/* Override any gcc2 internal prototype to avoid an error.  */
10344#ifdef __cplusplus
10345extern "C"
10346#endif
10347/* We use char because int might match the return type of a gcc2
10348   builtin and then its argument prototype would still apply.  */
10349char tgoto ();
10350int
10351main ()
10352{
10353tgoto ();
10354  ;
10355  return 0;
10356}
10357_ACEOF
10358rm -f conftest.$ac_objext conftest$ac_exeext
10359if { (eval echo "$as_me:10359: \"$ac_link\"") >&5
10360  (eval $ac_link) 2>&5
10361  ac_status=$?
10362  echo "$as_me:10362: \$? = $ac_status" >&5
10363  (exit $ac_status); } &&
10364         { ac_try='test -s conftest$ac_exeext'
10365  { (eval echo "$as_me:10365: \"$ac_try\"") >&5
10366  (eval $ac_try) 2>&5
10367  ac_status=$?
10368  echo "$as_me:10368: \$? = $ac_status" >&5
10369  (exit $ac_status); }; }; then
10370  ac_cv_lib_mytinfo_tgoto=yes
10371else
10372  echo "$as_me: failed program was:" >&5
10373cat conftest.$ac_ext >&5
10374ac_cv_lib_mytinfo_tgoto=no
10375fi
10376rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10377LIBS=$ac_check_lib_save_LIBS
10378fi
10379echo "$as_me:10379: result: $ac_cv_lib_mytinfo_tgoto" >&5
10380echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10381if test $ac_cv_lib_mytinfo_tgoto = yes; then
10382  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10383fi
10384
10385	fi
10386	;;
10387esac
10388
10389LIBS="$cf_ncurses_LIBS $LIBS"
10390
10391if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10392then
10393	LIBS="-l$cf_nculib_root $LIBS"
10394else
10395
10396	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
10397	cf_libdir=""
10398	echo "$as_me:10398: checking for initscr" >&5
10399echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10400if test "${ac_cv_func_initscr+set}" = set; then
10401  echo $ECHO_N "(cached) $ECHO_C" >&6
10402else
10403  cat >conftest.$ac_ext <<_ACEOF
10404#line 10404 "configure"
10405#include "confdefs.h"
10406/* System header to define __stub macros and hopefully few prototypes,
10407    which can conflict with char initscr (); below.  */
10408#include <assert.h>
10409/* Override any gcc2 internal prototype to avoid an error.  */
10410#ifdef __cplusplus
10411extern "C"
10412#endif
10413/* We use char because int might match the return type of a gcc2
10414   builtin and then its argument prototype would still apply.  */
10415char initscr ();
10416char (*f) ();
10417
10418int
10419main ()
10420{
10421/* The GNU C library defines this for functions which it implements
10422    to always fail with ENOSYS.  Some functions are actually named
10423    something starting with __ and the normal name is an alias.  */
10424#if defined (__stub_initscr) || defined (__stub___initscr)
10425choke me
10426#else
10427f = initscr;
10428#endif
10429
10430  ;
10431  return 0;
10432}
10433_ACEOF
10434rm -f conftest.$ac_objext conftest$ac_exeext
10435if { (eval echo "$as_me:10435: \"$ac_link\"") >&5
10436  (eval $ac_link) 2>&5
10437  ac_status=$?
10438  echo "$as_me:10438: \$? = $ac_status" >&5
10439  (exit $ac_status); } &&
10440         { ac_try='test -s conftest$ac_exeext'
10441  { (eval echo "$as_me:10441: \"$ac_try\"") >&5
10442  (eval $ac_try) 2>&5
10443  ac_status=$?
10444  echo "$as_me:10444: \$? = $ac_status" >&5
10445  (exit $ac_status); }; }; then
10446  ac_cv_func_initscr=yes
10447else
10448  echo "$as_me: failed program was:" >&5
10449cat conftest.$ac_ext >&5
10450ac_cv_func_initscr=no
10451fi
10452rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10453fi
10454echo "$as_me:10454: result: $ac_cv_func_initscr" >&5
10455echo "${ECHO_T}$ac_cv_func_initscr" >&6
10456if test $ac_cv_func_initscr = yes; then
10457  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10458else
10459
10460		cf_save_LIBS="$LIBS"
10461		echo "$as_me:10461: checking for initscr in -l$cf_nculib_root" >&5
10462echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10463		LIBS="-l$cf_nculib_root $LIBS"
10464		cat >conftest.$ac_ext <<_ACEOF
10465#line 10465 "configure"
10466#include "confdefs.h"
10467#include <${cf_cv_ncurses_header:-curses.h}>
10468int
10469main ()
10470{
10471initscr()
10472  ;
10473  return 0;
10474}
10475_ACEOF
10476rm -f conftest.$ac_objext conftest$ac_exeext
10477if { (eval echo "$as_me:10477: \"$ac_link\"") >&5
10478  (eval $ac_link) 2>&5
10479  ac_status=$?
10480  echo "$as_me:10480: \$? = $ac_status" >&5
10481  (exit $ac_status); } &&
10482         { ac_try='test -s conftest$ac_exeext'
10483  { (eval echo "$as_me:10483: \"$ac_try\"") >&5
10484  (eval $ac_try) 2>&5
10485  ac_status=$?
10486  echo "$as_me:10486: \$? = $ac_status" >&5
10487  (exit $ac_status); }; }; then
10488  echo "$as_me:10488: result: yes" >&5
10489echo "${ECHO_T}yes" >&6
10490			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10491
10492else
10493  echo "$as_me: failed program was:" >&5
10494cat conftest.$ac_ext >&5
10495echo "$as_me:10495: result: no" >&5
10496echo "${ECHO_T}no" >&6
10497
10498cf_search=
10499cf_library_path_list=""
10500if test -n "${LDFLAGS}${LIBS}" ; then
10501	for cf_library_path in $LDFLAGS $LIBS
10502	do
10503		case $cf_library_path in #(vi
10504		-L*)
10505			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10506
10507test "$cf_library_path" != "NONE" && \
10508test -d "$cf_library_path" && \
10509 {
10510	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
10511	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10512	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10513	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10514	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10515	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"
10516}
10517
10518			cf_library_path_list="$cf_library_path_list $cf_search"
10519			;;
10520		esac
10521	done
10522fi
10523
10524cf_search=
10525
10526test "/usr" != "$prefix" && \
10527test -d "/usr" && \
10528(test $prefix = NONE || test "/usr" != "$prefix") && {
10529	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
10530	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
10531	test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
10532	test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
10533	test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
10534	test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
10535}
10536
10537test "$prefix" != "NONE" && \
10538test -d "$prefix" && \
10539 {
10540	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
10541	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10542	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10543	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10544	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10545	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10546}
10547
10548test "/usr/local" != "$prefix" && \
10549test -d "/usr/local" && \
10550(test $prefix = NONE || test "/usr/local" != "$prefix") && {
10551	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
10552	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
10553	test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
10554	test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
10555	test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
10556	test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
10557}
10558
10559test "/opt" != "$prefix" && \
10560test -d "/opt" && \
10561(test $prefix = NONE || test "/opt" != "$prefix") && {
10562	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
10563	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
10564	test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
10565	test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
10566	test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
10567	test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
10568}
10569
10570test "$HOME" != "$prefix" && \
10571test -d "$HOME" && \
10572(test $prefix = NONE || test "$HOME" != "$prefix") && {
10573	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
10574	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
10575	test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
10576	test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
10577	test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
10578	test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
10579}
10580
10581cf_search="$cf_library_path_list $cf_search"
10582
10583			for cf_libdir in $cf_search
10584			do
10585				echo "$as_me:10585: checking for -l$cf_nculib_root in $cf_libdir" >&5
10586echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10587				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10588				cat >conftest.$ac_ext <<_ACEOF
10589#line 10589 "configure"
10590#include "confdefs.h"
10591#include <${cf_cv_ncurses_header:-curses.h}>
10592int
10593main ()
10594{
10595initscr()
10596  ;
10597  return 0;
10598}
10599_ACEOF
10600rm -f conftest.$ac_objext conftest$ac_exeext
10601if { (eval echo "$as_me:10601: \"$ac_link\"") >&5
10602  (eval $ac_link) 2>&5
10603  ac_status=$?
10604  echo "$as_me:10604: \$? = $ac_status" >&5
10605  (exit $ac_status); } &&
10606         { ac_try='test -s conftest$ac_exeext'
10607  { (eval echo "$as_me:10607: \"$ac_try\"") >&5
10608  (eval $ac_try) 2>&5
10609  ac_status=$?
10610  echo "$as_me:10610: \$? = $ac_status" >&5
10611  (exit $ac_status); }; }; then
10612  echo "$as_me:10612: result: yes" >&5
10613echo "${ECHO_T}yes" >&6
10614			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10615					 break
10616else
10617  echo "$as_me: failed program was:" >&5
10618cat conftest.$ac_ext >&5
10619echo "$as_me:10619: result: no" >&5
10620echo "${ECHO_T}no" >&6
10621					 LIBS="$cf_save_LIBS"
10622fi
10623rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10624			done
10625
10626fi
10627rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10628
10629fi
10630
10631eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
10632
10633if test $cf_found_library = no ; then
10634	{ { echo "$as_me:10634: error: Cannot link $cf_nculib_root library" >&5
10635echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10636   { (exit 1); exit 1; }; }
10637fi
10638
10639fi
10640
10641if test -n "$cf_ncurses_LIBS" ; then
10642	echo "$as_me:10642: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10643echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10644	cf_ncurses_SAVE="$LIBS"
10645	for p in $cf_ncurses_LIBS ; do
10646		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10647		if test "$q" != "$LIBS" ; then
10648			LIBS="$q"
10649		fi
10650	done
10651	cat >conftest.$ac_ext <<_ACEOF
10652#line 10652 "configure"
10653#include "confdefs.h"
10654#include <${cf_cv_ncurses_header:-curses.h}>
10655int
10656main ()
10657{
10658initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10659  ;
10660  return 0;
10661}
10662_ACEOF
10663rm -f conftest.$ac_objext conftest$ac_exeext
10664if { (eval echo "$as_me:10664: \"$ac_link\"") >&5
10665  (eval $ac_link) 2>&5
10666  ac_status=$?
10667  echo "$as_me:10667: \$? = $ac_status" >&5
10668  (exit $ac_status); } &&
10669         { ac_try='test -s conftest$ac_exeext'
10670  { (eval echo "$as_me:10670: \"$ac_try\"") >&5
10671  (eval $ac_try) 2>&5
10672  ac_status=$?
10673  echo "$as_me:10673: \$? = $ac_status" >&5
10674  (exit $ac_status); }; }; then
10675  echo "$as_me:10675: result: yes" >&5
10676echo "${ECHO_T}yes" >&6
10677else
10678  echo "$as_me: failed program was:" >&5
10679cat conftest.$ac_ext >&5
10680echo "$as_me:10680: result: no" >&5
10681echo "${ECHO_T}no" >&6
10682		 LIBS="$cf_ncurses_SAVE"
10683fi
10684rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10685fi
10686
10687cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10688
10689cat >>confdefs.h <<EOF
10690#define $cf_nculib_ROOT 1
10691EOF
10692
10693fi
10694
10695else
10696	cf_wide_curses=no
10697
10698echo "$as_me:10698: checking for extra include directories" >&5
10699echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
10700if test "${cf_cv_curses_incdir+set}" = set; then
10701  echo $ECHO_N "(cached) $ECHO_C" >&6
10702else
10703
10704cf_cv_curses_incdir=no
10705case $host_os in #(vi
10706hpux10.*) #(vi
10707	if test "x$cf_cv_screen" = "xcurses_colr"
10708	then
10709		test -d /usr/include/curses_colr && \
10710		cf_cv_curses_incdir="-I/usr/include/curses_colr"
10711	fi
10712	;;
10713sunos3*|sunos4*)
10714	if test "x$cf_cv_screen" = "xcurses_5lib"
10715	then
10716		test -d /usr/5lib && \
10717		test -d /usr/5include && \
10718		cf_cv_curses_incdir="-I/usr/5include"
10719	fi
10720	;;
10721esac
10722
10723fi
10724echo "$as_me:10724: result: $cf_cv_curses_incdir" >&5
10725echo "${ECHO_T}$cf_cv_curses_incdir" >&6
10726test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
10727
10728echo "$as_me:10728: checking if we have identified curses headers" >&5
10729echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10730if test "${cf_cv_ncurses_header+set}" = set; then
10731  echo $ECHO_N "(cached) $ECHO_C" >&6
10732else
10733
10734cf_cv_ncurses_header=none
10735for cf_header in  \
10736	ncurses.h \
10737	curses.h ncurses/ncurses.h ncurses/curses.h
10738do
10739cat >conftest.$ac_ext <<_ACEOF
10740#line 10740 "configure"
10741#include "confdefs.h"
10742#include <${cf_header}>
10743int
10744main ()
10745{
10746initscr(); tgoto("?", 0,0)
10747  ;
10748  return 0;
10749}
10750_ACEOF
10751rm -f conftest.$ac_objext
10752if { (eval echo "$as_me:10752: \"$ac_compile\"") >&5
10753  (eval $ac_compile) 2>&5
10754  ac_status=$?
10755  echo "$as_me:10755: \$? = $ac_status" >&5
10756  (exit $ac_status); } &&
10757         { ac_try='test -s conftest.$ac_objext'
10758  { (eval echo "$as_me:10758: \"$ac_try\"") >&5
10759  (eval $ac_try) 2>&5
10760  ac_status=$?
10761  echo "$as_me:10761: \$? = $ac_status" >&5
10762  (exit $ac_status); }; }; then
10763  cf_cv_ncurses_header=$cf_header; break
10764else
10765  echo "$as_me: failed program was:" >&5
10766cat conftest.$ac_ext >&5
10767fi
10768rm -f conftest.$ac_objext conftest.$ac_ext
10769done
10770
10771fi
10772echo "$as_me:10772: result: $cf_cv_ncurses_header" >&5
10773echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10774
10775if test "$cf_cv_ncurses_header" = none ; then
10776	{ { echo "$as_me:10776: error: No curses header-files found" >&5
10777echo "$as_me: error: No curses header-files found" >&2;}
10778   { (exit 1); exit 1; }; }
10779fi
10780
10781# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10782
10783for ac_header in $cf_cv_ncurses_header
10784do
10785as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10786echo "$as_me:10786: checking for $ac_header" >&5
10787echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10788if eval "test \"\${$as_ac_Header+set}\" = set"; then
10789  echo $ECHO_N "(cached) $ECHO_C" >&6
10790else
10791  cat >conftest.$ac_ext <<_ACEOF
10792#line 10792 "configure"
10793#include "confdefs.h"
10794#include <$ac_header>
10795_ACEOF
10796if { (eval echo "$as_me:10796: \"$ac_cpp conftest.$ac_ext\"") >&5
10797  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10798  ac_status=$?
10799  egrep -v '^ *\+' conftest.er1 >conftest.err
10800  rm -f conftest.er1
10801  cat conftest.err >&5
10802  echo "$as_me:10802: \$? = $ac_status" >&5
10803  (exit $ac_status); } >/dev/null; then
10804  if test -s conftest.err; then
10805    ac_cpp_err=$ac_c_preproc_warn_flag
10806  else
10807    ac_cpp_err=
10808  fi
10809else
10810  ac_cpp_err=yes
10811fi
10812if test -z "$ac_cpp_err"; then
10813  eval "$as_ac_Header=yes"
10814else
10815  echo "$as_me: failed program was:" >&5
10816  cat conftest.$ac_ext >&5
10817  eval "$as_ac_Header=no"
10818fi
10819rm -f conftest.err conftest.$ac_ext
10820fi
10821echo "$as_me:10821: result: `eval echo '${'$as_ac_Header'}'`" >&5
10822echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10823if test `eval echo '${'$as_ac_Header'}'` = yes; then
10824  cat >>confdefs.h <<EOF
10825#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10826EOF
10827
10828fi
10829done
10830
10831echo "$as_me:10831: checking for terminfo header" >&5
10832echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10833if test "${cf_cv_term_header+set}" = set; then
10834  echo $ECHO_N "(cached) $ECHO_C" >&6
10835else
10836
10837case ${cf_cv_ncurses_header} in #(vi
10838*/ncurses.h|*/ncursesw.h) #(vi
10839	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10840	;;
10841*)
10842	cf_term_header=term.h
10843	;;
10844esac
10845
10846for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10847do
10848cat >conftest.$ac_ext <<_ACEOF
10849#line 10849 "configure"
10850#include "confdefs.h"
10851#include <stdio.h>
10852#include <${cf_cv_ncurses_header:-curses.h}>
10853#include <$cf_test>
10854
10855int
10856main ()
10857{
10858int x = auto_left_margin
10859  ;
10860  return 0;
10861}
10862_ACEOF
10863rm -f conftest.$ac_objext
10864if { (eval echo "$as_me:10864: \"$ac_compile\"") >&5
10865  (eval $ac_compile) 2>&5
10866  ac_status=$?
10867  echo "$as_me:10867: \$? = $ac_status" >&5
10868  (exit $ac_status); } &&
10869         { ac_try='test -s conftest.$ac_objext'
10870  { (eval echo "$as_me:10870: \"$ac_try\"") >&5
10871  (eval $ac_try) 2>&5
10872  ac_status=$?
10873  echo "$as_me:10873: \$? = $ac_status" >&5
10874  (exit $ac_status); }; }; then
10875
10876	cf_cv_term_header="$cf_test"
10877else
10878  echo "$as_me: failed program was:" >&5
10879cat conftest.$ac_ext >&5
10880
10881	cf_cv_term_header=unknown
10882
10883fi
10884rm -f conftest.$ac_objext conftest.$ac_ext
10885	test "$cf_cv_term_header" != unknown && break
10886done
10887
10888fi
10889echo "$as_me:10889: result: $cf_cv_term_header" >&5
10890echo "${ECHO_T}$cf_cv_term_header" >&6
10891
10892# Set definitions to allow ifdef'ing to accommodate subdirectories
10893
10894case $cf_cv_term_header in # (vi
10895*term.h)
10896	cat >>confdefs.h <<\EOF
10897#define HAVE_TERM_H 1
10898EOF
10899
10900	;;
10901esac
10902
10903case $cf_cv_term_header in # (vi
10904ncurses/term.h) #(vi
10905	cat >>confdefs.h <<\EOF
10906#define HAVE_NCURSES_TERM_H 1
10907EOF
10908
10909	;;
10910ncursesw/term.h)
10911	cat >>confdefs.h <<\EOF
10912#define HAVE_NCURSESW_TERM_H 1
10913EOF
10914
10915	;;
10916esac
10917
10918echo "$as_me:10918: checking for ncurses version" >&5
10919echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10920if test "${cf_cv_ncurses_version+set}" = set; then
10921  echo $ECHO_N "(cached) $ECHO_C" >&6
10922else
10923
10924	cf_cv_ncurses_version=no
10925	cf_tempfile=out$$
10926	rm -f $cf_tempfile
10927	if test "$cross_compiling" = yes; then
10928
10929	# This will not work if the preprocessor splits the line after the
10930	# Autoconf token.  The 'unproto' program does that.
10931	cat > conftest.$ac_ext <<EOF
10932#include <${cf_cv_ncurses_header:-curses.h}>
10933#undef Autoconf
10934#ifdef NCURSES_VERSION
10935Autoconf NCURSES_VERSION
10936#else
10937#ifdef __NCURSES_H
10938Autoconf "old"
10939#endif
10940;
10941#endif
10942EOF
10943	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10944	{ (eval echo "$as_me:10944: \"$cf_try\"") >&5
10945  (eval $cf_try) 2>&5
10946  ac_status=$?
10947  echo "$as_me:10947: \$? = $ac_status" >&5
10948  (exit $ac_status); }
10949	if test -f conftest.out ; then
10950		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10951		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10952		rm -f conftest.out
10953	fi
10954
10955else
10956  cat >conftest.$ac_ext <<_ACEOF
10957#line 10957 "configure"
10958#include "confdefs.h"
10959
10960#include <${cf_cv_ncurses_header:-curses.h}>
10961#include <stdio.h>
10962int main()
10963{
10964	FILE *fp = fopen("$cf_tempfile", "w");
10965#ifdef NCURSES_VERSION
10966# ifdef NCURSES_VERSION_PATCH
10967	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10968# else
10969	fprintf(fp, "%s\n", NCURSES_VERSION);
10970# endif
10971#else
10972# ifdef __NCURSES_H
10973	fprintf(fp, "old\n");
10974# else
10975	make an error
10976# endif
10977#endif
10978	${cf_cv_main_return:-return}(0);
10979}
10980_ACEOF
10981rm -f conftest$ac_exeext
10982if { (eval echo "$as_me:10982: \"$ac_link\"") >&5
10983  (eval $ac_link) 2>&5
10984  ac_status=$?
10985  echo "$as_me:10985: \$? = $ac_status" >&5
10986  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10987  { (eval echo "$as_me:10987: \"$ac_try\"") >&5
10988  (eval $ac_try) 2>&5
10989  ac_status=$?
10990  echo "$as_me:10990: \$? = $ac_status" >&5
10991  (exit $ac_status); }; }; then
10992
10993	cf_cv_ncurses_version=`cat $cf_tempfile`
10994else
10995  echo "$as_me: program exited with status $ac_status" >&5
10996echo "$as_me: failed program was:" >&5
10997cat conftest.$ac_ext >&5
10998fi
10999rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11000fi
11001	rm -f $cf_tempfile
11002
11003fi
11004echo "$as_me:11004: result: $cf_cv_ncurses_version" >&5
11005echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11006test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
11007#define NCURSES 1
11008EOF
11009
11010echo "$as_me:11010: checking if we have identified curses libraries" >&5
11011echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
11012cat >conftest.$ac_ext <<_ACEOF
11013#line 11013 "configure"
11014#include "confdefs.h"
11015#include <${cf_cv_ncurses_header:-curses.h}>
11016int
11017main ()
11018{
11019initscr(); tgoto("?", 0,0)
11020  ;
11021  return 0;
11022}
11023_ACEOF
11024rm -f conftest.$ac_objext conftest$ac_exeext
11025if { (eval echo "$as_me:11025: \"$ac_link\"") >&5
11026  (eval $ac_link) 2>&5
11027  ac_status=$?
11028  echo "$as_me:11028: \$? = $ac_status" >&5
11029  (exit $ac_status); } &&
11030         { ac_try='test -s conftest$ac_exeext'
11031  { (eval echo "$as_me:11031: \"$ac_try\"") >&5
11032  (eval $ac_try) 2>&5
11033  ac_status=$?
11034  echo "$as_me:11034: \$? = $ac_status" >&5
11035  (exit $ac_status); }; }; then
11036  cf_result=yes
11037else
11038  echo "$as_me: failed program was:" >&5
11039cat conftest.$ac_ext >&5
11040cf_result=no
11041fi
11042rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11043echo "$as_me:11043: result: $cf_result" >&5
11044echo "${ECHO_T}$cf_result" >&6
11045
11046if test "$cf_result" = no ; then
11047case $host_os in #(vi
11048freebsd*) #(vi
11049    echo "$as_me:11049: checking for tgoto in -lmytinfo" >&5
11050echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11051if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11052  echo $ECHO_N "(cached) $ECHO_C" >&6
11053else
11054  ac_check_lib_save_LIBS=$LIBS
11055LIBS="-lmytinfo  $LIBS"
11056cat >conftest.$ac_ext <<_ACEOF
11057#line 11057 "configure"
11058#include "confdefs.h"
11059
11060/* Override any gcc2 internal prototype to avoid an error.  */
11061#ifdef __cplusplus
11062extern "C"
11063#endif
11064/* We use char because int might match the return type of a gcc2
11065   builtin and then its argument prototype would still apply.  */
11066char tgoto ();
11067int
11068main ()
11069{
11070tgoto ();
11071  ;
11072  return 0;
11073}
11074_ACEOF
11075rm -f conftest.$ac_objext conftest$ac_exeext
11076if { (eval echo "$as_me:11076: \"$ac_link\"") >&5
11077  (eval $ac_link) 2>&5
11078  ac_status=$?
11079  echo "$as_me:11079: \$? = $ac_status" >&5
11080  (exit $ac_status); } &&
11081         { ac_try='test -s conftest$ac_exeext'
11082  { (eval echo "$as_me:11082: \"$ac_try\"") >&5
11083  (eval $ac_try) 2>&5
11084  ac_status=$?
11085  echo "$as_me:11085: \$? = $ac_status" >&5
11086  (exit $ac_status); }; }; then
11087  ac_cv_lib_mytinfo_tgoto=yes
11088else
11089  echo "$as_me: failed program was:" >&5
11090cat conftest.$ac_ext >&5
11091ac_cv_lib_mytinfo_tgoto=no
11092fi
11093rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11094LIBS=$ac_check_lib_save_LIBS
11095fi
11096echo "$as_me:11096: result: $ac_cv_lib_mytinfo_tgoto" >&5
11097echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11098if test $ac_cv_lib_mytinfo_tgoto = yes; then
11099  LIBS="-lmytinfo $LIBS"
11100fi
11101
11102    ;;
11103hpux10.*) #(vi
11104	# Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
11105	# next (1998), and xcurses "newer" (2000).  There is no header file for
11106	# Hcurses; the subdirectory curses_colr has the headers (curses.h and
11107	# term.h) for cur_colr
11108	if test "x$cf_cv_screen" = "xcurses_colr"
11109	then
11110		echo "$as_me:11110: checking for initscr in -lcur_colr" >&5
11111echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
11112if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
11113  echo $ECHO_N "(cached) $ECHO_C" >&6
11114else
11115  ac_check_lib_save_LIBS=$LIBS
11116LIBS="-lcur_colr  $LIBS"
11117cat >conftest.$ac_ext <<_ACEOF
11118#line 11118 "configure"
11119#include "confdefs.h"
11120
11121/* Override any gcc2 internal prototype to avoid an error.  */
11122#ifdef __cplusplus
11123extern "C"
11124#endif
11125/* We use char because int might match the return type of a gcc2
11126   builtin and then its argument prototype would still apply.  */
11127char initscr ();
11128int
11129main ()
11130{
11131initscr ();
11132  ;
11133  return 0;
11134}
11135_ACEOF
11136rm -f conftest.$ac_objext conftest$ac_exeext
11137if { (eval echo "$as_me:11137: \"$ac_link\"") >&5
11138  (eval $ac_link) 2>&5
11139  ac_status=$?
11140  echo "$as_me:11140: \$? = $ac_status" >&5
11141  (exit $ac_status); } &&
11142         { ac_try='test -s conftest$ac_exeext'
11143  { (eval echo "$as_me:11143: \"$ac_try\"") >&5
11144  (eval $ac_try) 2>&5
11145  ac_status=$?
11146  echo "$as_me:11146: \$? = $ac_status" >&5
11147  (exit $ac_status); }; }; then
11148  ac_cv_lib_cur_colr_initscr=yes
11149else
11150  echo "$as_me: failed program was:" >&5
11151cat conftest.$ac_ext >&5
11152ac_cv_lib_cur_colr_initscr=no
11153fi
11154rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11155LIBS=$ac_check_lib_save_LIBS
11156fi
11157echo "$as_me:11157: result: $ac_cv_lib_cur_colr_initscr" >&5
11158echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
11159if test $ac_cv_lib_cur_colr_initscr = yes; then
11160
11161			LIBS="-lcur_colr $LIBS"
11162			ac_cv_func_initscr=yes
11163
11164else
11165
11166		echo "$as_me:11166: checking for initscr in -lHcurses" >&5
11167echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
11168if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
11169  echo $ECHO_N "(cached) $ECHO_C" >&6
11170else
11171  ac_check_lib_save_LIBS=$LIBS
11172LIBS="-lHcurses  $LIBS"
11173cat >conftest.$ac_ext <<_ACEOF
11174#line 11174 "configure"
11175#include "confdefs.h"
11176
11177/* Override any gcc2 internal prototype to avoid an error.  */
11178#ifdef __cplusplus
11179extern "C"
11180#endif
11181/* We use char because int might match the return type of a gcc2
11182   builtin and then its argument prototype would still apply.  */
11183char initscr ();
11184int
11185main ()
11186{
11187initscr ();
11188  ;
11189  return 0;
11190}
11191_ACEOF
11192rm -f conftest.$ac_objext conftest$ac_exeext
11193if { (eval echo "$as_me:11193: \"$ac_link\"") >&5
11194  (eval $ac_link) 2>&5
11195  ac_status=$?
11196  echo "$as_me:11196: \$? = $ac_status" >&5
11197  (exit $ac_status); } &&
11198         { ac_try='test -s conftest$ac_exeext'
11199  { (eval echo "$as_me:11199: \"$ac_try\"") >&5
11200  (eval $ac_try) 2>&5
11201  ac_status=$?
11202  echo "$as_me:11202: \$? = $ac_status" >&5
11203  (exit $ac_status); }; }; then
11204  ac_cv_lib_Hcurses_initscr=yes
11205else
11206  echo "$as_me: failed program was:" >&5
11207cat conftest.$ac_ext >&5
11208ac_cv_lib_Hcurses_initscr=no
11209fi
11210rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11211LIBS=$ac_check_lib_save_LIBS
11212fi
11213echo "$as_me:11213: result: $ac_cv_lib_Hcurses_initscr" >&5
11214echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
11215if test $ac_cv_lib_Hcurses_initscr = yes; then
11216
11217			# HP's header uses __HP_CURSES, but user claims _HP_CURSES.
11218			LIBS="-lHcurses $LIBS"
11219			CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
11220			ac_cv_func_initscr=yes
11221
11222fi
11223
11224fi
11225
11226	fi
11227    ;;
11228linux*)
11229	case `arch 2>/dev/null` in
11230	x86_64)
11231		if test -d /lib64
11232		then
11233
11234if test -n "/lib64" ; then
11235  for cf_add_libdir in /lib64
11236  do
11237    if test $cf_add_libdir = /usr/lib ; then
11238      :
11239    elif test -d $cf_add_libdir
11240    then
11241      cf_have_libdir=no
11242      if test -n "$LDFLAGS$LIBS" ; then
11243        # a loop is needed to ensure we can add subdirs of existing dirs
11244        for cf_test_libdir in $LDFLAGS $LIBS ; do
11245          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11246            cf_have_libdir=yes; break
11247          fi
11248        done
11249      fi
11250      if test "$cf_have_libdir" = no ; then
11251        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11252
11253echo "${as_me:-configure}:11253: testing adding $cf_add_libdir to library-path ..." 1>&5
11254
11255        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11256      fi
11257    fi
11258  done
11259fi
11260
11261		else
11262
11263if test -n "/lib" ; then
11264  for cf_add_libdir in /lib
11265  do
11266    if test $cf_add_libdir = /usr/lib ; then
11267      :
11268    elif test -d $cf_add_libdir
11269    then
11270      cf_have_libdir=no
11271      if test -n "$LDFLAGS$LIBS" ; then
11272        # a loop is needed to ensure we can add subdirs of existing dirs
11273        for cf_test_libdir in $LDFLAGS $LIBS ; do
11274          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11275            cf_have_libdir=yes; break
11276          fi
11277        done
11278      fi
11279      if test "$cf_have_libdir" = no ; then
11280        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11281
11282echo "${as_me:-configure}:11282: testing adding $cf_add_libdir to library-path ..." 1>&5
11283
11284        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11285      fi
11286    fi
11287  done
11288fi
11289
11290		fi
11291		;;
11292	*)
11293
11294if test -n "/lib" ; then
11295  for cf_add_libdir in /lib
11296  do
11297    if test $cf_add_libdir = /usr/lib ; then
11298      :
11299    elif test -d $cf_add_libdir
11300    then
11301      cf_have_libdir=no
11302      if test -n "$LDFLAGS$LIBS" ; then
11303        # a loop is needed to ensure we can add subdirs of existing dirs
11304        for cf_test_libdir in $LDFLAGS $LIBS ; do
11305          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11306            cf_have_libdir=yes; break
11307          fi
11308        done
11309      fi
11310      if test "$cf_have_libdir" = no ; then
11311        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11312
11313echo "${as_me:-configure}:11313: testing adding $cf_add_libdir to library-path ..." 1>&5
11314
11315        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11316      fi
11317    fi
11318  done
11319fi
11320
11321		;;
11322	esac
11323    ;;
11324sunos3*|sunos4*)
11325	if test "x$cf_cv_screen" = "xcurses_5lib"
11326	then
11327		if test -d /usr/5lib ; then
11328
11329if test -n "/usr/5lib" ; then
11330  for cf_add_libdir in /usr/5lib
11331  do
11332    if test $cf_add_libdir = /usr/lib ; then
11333      :
11334    elif test -d $cf_add_libdir
11335    then
11336      cf_have_libdir=no
11337      if test -n "$LDFLAGS$LIBS" ; then
11338        # a loop is needed to ensure we can add subdirs of existing dirs
11339        for cf_test_libdir in $LDFLAGS $LIBS ; do
11340          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11341            cf_have_libdir=yes; break
11342          fi
11343        done
11344      fi
11345      if test "$cf_have_libdir" = no ; then
11346        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11347
11348echo "${as_me:-configure}:11348: testing adding $cf_add_libdir to library-path ..." 1>&5
11349
11350        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11351      fi
11352    fi
11353  done
11354fi
11355
11356			LIBS="-lcurses -ltermcap $LIBS"
11357		fi
11358    fi
11359    ac_cv_func_initscr=yes
11360    ;;
11361esac
11362
11363if test ".$ac_cv_func_initscr" != .yes ; then
11364    cf_save_LIBS="$LIBS"
11365    cf_term_lib=""
11366    cf_curs_lib=""
11367
11368    if test ".${cf_cv_ncurses_version:-no}" != .no
11369    then
11370        cf_check_list="ncurses curses cursesX"
11371    else
11372        cf_check_list="cursesX curses ncurses"
11373    fi
11374
11375    # Check for library containing tgoto.  Do this before curses library
11376    # because it may be needed to link the test-case for initscr.
11377    echo "$as_me:11377: checking for tgoto" >&5
11378echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
11379if test "${ac_cv_func_tgoto+set}" = set; then
11380  echo $ECHO_N "(cached) $ECHO_C" >&6
11381else
11382  cat >conftest.$ac_ext <<_ACEOF
11383#line 11383 "configure"
11384#include "confdefs.h"
11385/* System header to define __stub macros and hopefully few prototypes,
11386    which can conflict with char tgoto (); below.  */
11387#include <assert.h>
11388/* Override any gcc2 internal prototype to avoid an error.  */
11389#ifdef __cplusplus
11390extern "C"
11391#endif
11392/* We use char because int might match the return type of a gcc2
11393   builtin and then its argument prototype would still apply.  */
11394char tgoto ();
11395char (*f) ();
11396
11397int
11398main ()
11399{
11400/* The GNU C library defines this for functions which it implements
11401    to always fail with ENOSYS.  Some functions are actually named
11402    something starting with __ and the normal name is an alias.  */
11403#if defined (__stub_tgoto) || defined (__stub___tgoto)
11404choke me
11405#else
11406f = tgoto;
11407#endif
11408
11409  ;
11410  return 0;
11411}
11412_ACEOF
11413rm -f conftest.$ac_objext conftest$ac_exeext
11414if { (eval echo "$as_me:11414: \"$ac_link\"") >&5
11415  (eval $ac_link) 2>&5
11416  ac_status=$?
11417  echo "$as_me:11417: \$? = $ac_status" >&5
11418  (exit $ac_status); } &&
11419         { ac_try='test -s conftest$ac_exeext'
11420  { (eval echo "$as_me:11420: \"$ac_try\"") >&5
11421  (eval $ac_try) 2>&5
11422  ac_status=$?
11423  echo "$as_me:11423: \$? = $ac_status" >&5
11424  (exit $ac_status); }; }; then
11425  ac_cv_func_tgoto=yes
11426else
11427  echo "$as_me: failed program was:" >&5
11428cat conftest.$ac_ext >&5
11429ac_cv_func_tgoto=no
11430fi
11431rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11432fi
11433echo "$as_me:11433: result: $ac_cv_func_tgoto" >&5
11434echo "${ECHO_T}$ac_cv_func_tgoto" >&6
11435if test $ac_cv_func_tgoto = yes; then
11436  cf_term_lib=predefined
11437else
11438
11439        for cf_term_lib in $cf_check_list termcap termlib unknown
11440        do
11441            as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
11442echo "$as_me:11442: checking for tgoto in -l$cf_term_lib" >&5
11443echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
11444if eval "test \"\${$as_ac_Lib+set}\" = set"; then
11445  echo $ECHO_N "(cached) $ECHO_C" >&6
11446else
11447  ac_check_lib_save_LIBS=$LIBS
11448LIBS="-l$cf_term_lib  $LIBS"
11449cat >conftest.$ac_ext <<_ACEOF
11450#line 11450 "configure"
11451#include "confdefs.h"
11452
11453/* Override any gcc2 internal prototype to avoid an error.  */
11454#ifdef __cplusplus
11455extern "C"
11456#endif
11457/* We use char because int might match the return type of a gcc2
11458   builtin and then its argument prototype would still apply.  */
11459char tgoto ();
11460int
11461main ()
11462{
11463tgoto ();
11464  ;
11465  return 0;
11466}
11467_ACEOF
11468rm -f conftest.$ac_objext conftest$ac_exeext
11469if { (eval echo "$as_me:11469: \"$ac_link\"") >&5
11470  (eval $ac_link) 2>&5
11471  ac_status=$?
11472  echo "$as_me:11472: \$? = $ac_status" >&5
11473  (exit $ac_status); } &&
11474         { ac_try='test -s conftest$ac_exeext'
11475  { (eval echo "$as_me:11475: \"$ac_try\"") >&5
11476  (eval $ac_try) 2>&5
11477  ac_status=$?
11478  echo "$as_me:11478: \$? = $ac_status" >&5
11479  (exit $ac_status); }; }; then
11480  eval "$as_ac_Lib=yes"
11481else
11482  echo "$as_me: failed program was:" >&5
11483cat conftest.$ac_ext >&5
11484eval "$as_ac_Lib=no"
11485fi
11486rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11487LIBS=$ac_check_lib_save_LIBS
11488fi
11489echo "$as_me:11489: result: `eval echo '${'$as_ac_Lib'}'`" >&5
11490echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
11491if test `eval echo '${'$as_ac_Lib'}'` = yes; then
11492  break
11493fi
11494
11495        done
11496
11497fi
11498
11499    # Check for library containing initscr
11500    test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
11501 	for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
11502    do
11503        as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
11504echo "$as_me:11504: checking for initscr in -l$cf_curs_lib" >&5
11505echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
11506if eval "test \"\${$as_ac_Lib+set}\" = set"; then
11507  echo $ECHO_N "(cached) $ECHO_C" >&6
11508else
11509  ac_check_lib_save_LIBS=$LIBS
11510LIBS="-l$cf_curs_lib  $LIBS"
11511cat >conftest.$ac_ext <<_ACEOF
11512#line 11512 "configure"
11513#include "confdefs.h"
11514
11515/* Override any gcc2 internal prototype to avoid an error.  */
11516#ifdef __cplusplus
11517extern "C"
11518#endif
11519/* We use char because int might match the return type of a gcc2
11520   builtin and then its argument prototype would still apply.  */
11521char initscr ();
11522int
11523main ()
11524{
11525initscr ();
11526  ;
11527  return 0;
11528}
11529_ACEOF
11530rm -f conftest.$ac_objext conftest$ac_exeext
11531if { (eval echo "$as_me:11531: \"$ac_link\"") >&5
11532  (eval $ac_link) 2>&5
11533  ac_status=$?
11534  echo "$as_me:11534: \$? = $ac_status" >&5
11535  (exit $ac_status); } &&
11536         { ac_try='test -s conftest$ac_exeext'
11537  { (eval echo "$as_me:11537: \"$ac_try\"") >&5
11538  (eval $ac_try) 2>&5
11539  ac_status=$?
11540  echo "$as_me:11540: \$? = $ac_status" >&5
11541  (exit $ac_status); }; }; then
11542  eval "$as_ac_Lib=yes"
11543else
11544  echo "$as_me: failed program was:" >&5
11545cat conftest.$ac_ext >&5
11546eval "$as_ac_Lib=no"
11547fi
11548rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11549LIBS=$ac_check_lib_save_LIBS
11550fi
11551echo "$as_me:11551: result: `eval echo '${'$as_ac_Lib'}'`" >&5
11552echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
11553if test `eval echo '${'$as_ac_Lib'}'` = yes; then
11554  break
11555fi
11556
11557    done
11558    test $cf_curs_lib = unknown && { { echo "$as_me:11558: error: no curses library found" >&5
11559echo "$as_me: error: no curses library found" >&2;}
11560   { (exit 1); exit 1; }; }
11561
11562    LIBS="-l$cf_curs_lib $cf_save_LIBS"
11563    if test "$cf_term_lib" = unknown ; then
11564        echo "$as_me:11564: checking if we can link with $cf_curs_lib library" >&5
11565echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
11566        cat >conftest.$ac_ext <<_ACEOF
11567#line 11567 "configure"
11568#include "confdefs.h"
11569#include <${cf_cv_ncurses_header:-curses.h}>
11570int
11571main ()
11572{
11573initscr()
11574  ;
11575  return 0;
11576}
11577_ACEOF
11578rm -f conftest.$ac_objext conftest$ac_exeext
11579if { (eval echo "$as_me:11579: \"$ac_link\"") >&5
11580  (eval $ac_link) 2>&5
11581  ac_status=$?
11582  echo "$as_me:11582: \$? = $ac_status" >&5
11583  (exit $ac_status); } &&
11584         { ac_try='test -s conftest$ac_exeext'
11585  { (eval echo "$as_me:11585: \"$ac_try\"") >&5
11586  (eval $ac_try) 2>&5
11587  ac_status=$?
11588  echo "$as_me:11588: \$? = $ac_status" >&5
11589  (exit $ac_status); }; }; then
11590  cf_result=yes
11591else
11592  echo "$as_me: failed program was:" >&5
11593cat conftest.$ac_ext >&5
11594cf_result=no
11595fi
11596rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11597        echo "$as_me:11597: result: $cf_result" >&5
11598echo "${ECHO_T}$cf_result" >&6
11599        test $cf_result = no && { { echo "$as_me:11599: error: Cannot link curses library" >&5
11600echo "$as_me: error: Cannot link curses library" >&2;}
11601   { (exit 1); exit 1; }; }
11602    elif test "$cf_curs_lib" = "$cf_term_lib" ; then
11603        :
11604    elif test "$cf_term_lib" != predefined ; then
11605        echo "$as_me:11605: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
11606echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
11607        cat >conftest.$ac_ext <<_ACEOF
11608#line 11608 "configure"
11609#include "confdefs.h"
11610#include <${cf_cv_ncurses_header:-curses.h}>
11611int
11612main ()
11613{
11614initscr(); tgoto((char *)0, 0, 0);
11615  ;
11616  return 0;
11617}
11618_ACEOF
11619rm -f conftest.$ac_objext conftest$ac_exeext
11620if { (eval echo "$as_me:11620: \"$ac_link\"") >&5
11621  (eval $ac_link) 2>&5
11622  ac_status=$?
11623  echo "$as_me:11623: \$? = $ac_status" >&5
11624  (exit $ac_status); } &&
11625         { ac_try='test -s conftest$ac_exeext'
11626  { (eval echo "$as_me:11626: \"$ac_try\"") >&5
11627  (eval $ac_try) 2>&5
11628  ac_status=$?
11629  echo "$as_me:11629: \$? = $ac_status" >&5
11630  (exit $ac_status); }; }; then
11631  cf_result=no
11632else
11633  echo "$as_me: failed program was:" >&5
11634cat conftest.$ac_ext >&5
11635
11636            LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
11637            cat >conftest.$ac_ext <<_ACEOF
11638#line 11638 "configure"
11639#include "confdefs.h"
11640#include <${cf_cv_ncurses_header:-curses.h}>
11641int
11642main ()
11643{
11644initscr()
11645  ;
11646  return 0;
11647}
11648_ACEOF
11649rm -f conftest.$ac_objext conftest$ac_exeext
11650if { (eval echo "$as_me:11650: \"$ac_link\"") >&5
11651  (eval $ac_link) 2>&5
11652  ac_status=$?
11653  echo "$as_me:11653: \$? = $ac_status" >&5
11654  (exit $ac_status); } &&
11655         { ac_try='test -s conftest$ac_exeext'
11656  { (eval echo "$as_me:11656: \"$ac_try\"") >&5
11657  (eval $ac_try) 2>&5
11658  ac_status=$?
11659  echo "$as_me:11659: \$? = $ac_status" >&5
11660  (exit $ac_status); }; }; then
11661  cf_result=yes
11662else
11663  echo "$as_me: failed program was:" >&5
11664cat conftest.$ac_ext >&5
11665cf_result=error
11666fi
11667rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11668
11669fi
11670rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11671        echo "$as_me:11671: result: $cf_result" >&5
11672echo "${ECHO_T}$cf_result" >&6
11673    fi
11674fi
11675fi
11676
11677fi
11678
11679cf_all_widgets=yes
11680
11681echo "$as_me:11681: checking if you want extra dialogs" >&5
11682echo $ECHO_N "checking if you want extra dialogs... $ECHO_C" >&6
11683
11684# Check whether --enable-extras or --disable-extras was given.
11685if test "${enable_extras+set}" = set; then
11686  enableval="$enable_extras"
11687
11688else
11689  enableval=yes
11690fi;
11691echo "$as_me:11691: result: $enableval" >&5
11692echo "${ECHO_T}$enableval" >&6
11693if test "$enableval" != no ; then
11694cf_all_widgets=yes
11695else
11696cf_all_widgets=no
11697fi
11698
11699echo "$as_me:11699: checking if you want config-file support" >&5
11700echo $ECHO_N "checking if you want config-file support... $ECHO_C" >&6
11701
11702# Check whether --enable-rc-file or --disable-rc-file was given.
11703if test "${enable_rc_file+set}" = set; then
11704  enableval="$enable_rc_file"
11705
11706else
11707  enableval=$cf_all_widgets
11708fi;
11709echo "$as_me:11709: result: $enableval" >&5
11710echo "${ECHO_T}$enableval" >&6
11711if test "$enableval" != no ; then
11712EXTRAOBJS="$EXTRAOBJS rc\$o"
11713	 cat >>confdefs.h <<\EOF
11714#define HAVE_RC_FILE 1
11715EOF
11716
11717else
11718	:
11719fi
11720
11721echo "$as_me:11721: checking if you want Xdialog-style dialogs" >&5
11722echo $ECHO_N "checking if you want Xdialog-style dialogs... $ECHO_C" >&6
11723
11724# Check whether --enable-Xdialog or --disable-Xdialog was given.
11725if test "${enable_Xdialog+set}" = set; then
11726  enableval="$enable_Xdialog"
11727
11728else
11729  enableval=$cf_all_widgets
11730fi;
11731echo "$as_me:11731: result: $enableval" >&5
11732echo "${ECHO_T}$enableval" >&6
11733if test "$enableval" != no ; then
11734EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
11735	 cat >>confdefs.h <<\EOF
11736#define HAVE_XDIALOG 1
11737EOF
11738
11739else
11740	:
11741fi
11742
11743echo "$as_me:11743: checking if you want the form dialog" >&5
11744echo $ECHO_N "checking if you want the form dialog... $ECHO_C" >&6
11745
11746# Check whether --enable-form or --disable-form was given.
11747if test "${enable_form+set}" = set; then
11748  enableval="$enable_form"
11749
11750else
11751  enableval=$cf_all_widgets
11752fi;
11753echo "$as_me:11753: result: $enableval" >&5
11754echo "${ECHO_T}$enableval" >&6
11755if test "$enableval" != no ; then
11756EXTRAOBJS="$EXTRAOBJS formbox\$o"
11757	 cat >>confdefs.h <<\EOF
11758#define HAVE_DLG_FORMBOX 1
11759EOF
11760
11761else
11762	:
11763fi
11764
11765echo "$as_me:11765: checking if you want the gauge dialog" >&5
11766echo $ECHO_N "checking if you want the gauge dialog... $ECHO_C" >&6
11767
11768# Check whether --enable-gauge or --disable-gauge was given.
11769if test "${enable_gauge+set}" = set; then
11770  enableval="$enable_gauge"
11771
11772else
11773  enableval=$cf_all_widgets
11774fi;
11775echo "$as_me:11775: result: $enableval" >&5
11776echo "${ECHO_T}$enableval" >&6
11777if test "$enableval" != no ; then
11778EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
11779	 cat >>confdefs.h <<\EOF
11780#define HAVE_DLG_GAUGE 1
11781EOF
11782
11783else
11784	:
11785fi
11786
11787echo "$as_me:11787: checking if you want the tailbox dialog" >&5
11788echo $ECHO_N "checking if you want the tailbox dialog... $ECHO_C" >&6
11789
11790# Check whether --enable-tailbox or --disable-tailbox was given.
11791if test "${enable_tailbox+set}" = set; then
11792  enableval="$enable_tailbox"
11793
11794else
11795  enableval=$cf_all_widgets
11796fi;
11797echo "$as_me:11797: result: $enableval" >&5
11798echo "${ECHO_T}$enableval" >&6
11799if test "$enableval" != no ; then
11800EXTRAOBJS="$EXTRAOBJS tailbox\$o"
11801	 cat >>confdefs.h <<\EOF
11802#define HAVE_DLG_TAILBOX 1
11803EOF
11804
11805else
11806	:
11807fi
11808
11809echo "$as_me:11809: checking if you want the mixedform dialog" >&5
11810echo $ECHO_N "checking if you want the mixedform dialog... $ECHO_C" >&6
11811
11812# Check whether --enable-mixedform or --disable-mixedform was given.
11813if test "${enable_mixedform+set}" = set; then
11814  enableval="$enable_mixedform"
11815
11816else
11817  enableval=$cf_all_widgets
11818fi;
11819echo "$as_me:11819: result: $enableval" >&5
11820echo "${ECHO_T}$enableval" >&6
11821if test "$enableval" != no ; then
11822EXTRAOBJS="$EXTRAOBJS mixedform\$o"
11823	 cat >>confdefs.h <<\EOF
11824#define HAVE_DLG_MIXEDFORM 1
11825EOF
11826
11827else
11828	:
11829fi
11830
11831echo "$as_me:11831: checking if you want the mixedgauge dialog" >&5
11832echo $ECHO_N "checking if you want the mixedgauge dialog... $ECHO_C" >&6
11833
11834# Check whether --enable-mixedgauge or --disable-mixedgauge was given.
11835if test "${enable_mixedgauge+set}" = set; then
11836  enableval="$enable_mixedgauge"
11837
11838else
11839  enableval=$cf_all_widgets
11840fi;
11841echo "$as_me:11841: result: $enableval" >&5
11842echo "${ECHO_T}$enableval" >&6
11843if test "$enableval" != no ; then
11844EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
11845	 cat >>confdefs.h <<\EOF
11846#define HAVE_MIXEDGAUGE 1
11847EOF
11848
11849else
11850	:
11851fi
11852
11853echo "$as_me:11853: checking if you want the wide-curses features" >&5
11854echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
11855
11856# Check whether --enable-widec or --disable-widec was given.
11857if test "${enable_widec+set}" = set; then
11858  enableval="$enable_widec"
11859
11860else
11861  enableval=$cf_wide_curses
11862fi;
11863echo "$as_me:11863: result: $enableval" >&5
11864echo "${ECHO_T}$enableval" >&6
11865if test "$enableval" != no ; then
11866cat >>confdefs.h <<\EOF
11867#define USE_WIDE_CURSES 1
11868EOF
11869
11870else
11871	:
11872fi
11873
11874echo "$as_me:11874: checking for ANSI C header files" >&5
11875echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11876if test "${ac_cv_header_stdc+set}" = set; then
11877  echo $ECHO_N "(cached) $ECHO_C" >&6
11878else
11879  cat >conftest.$ac_ext <<_ACEOF
11880#line 11880 "configure"
11881#include "confdefs.h"
11882#include <stdlib.h>
11883#include <stdarg.h>
11884#include <string.h>
11885#include <float.h>
11886
11887_ACEOF
11888if { (eval echo "$as_me:11888: \"$ac_cpp conftest.$ac_ext\"") >&5
11889  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11890  ac_status=$?
11891  egrep -v '^ *\+' conftest.er1 >conftest.err
11892  rm -f conftest.er1
11893  cat conftest.err >&5
11894  echo "$as_me:11894: \$? = $ac_status" >&5
11895  (exit $ac_status); } >/dev/null; then
11896  if test -s conftest.err; then
11897    ac_cpp_err=$ac_c_preproc_warn_flag
11898  else
11899    ac_cpp_err=
11900  fi
11901else
11902  ac_cpp_err=yes
11903fi
11904if test -z "$ac_cpp_err"; then
11905  ac_cv_header_stdc=yes
11906else
11907  echo "$as_me: failed program was:" >&5
11908  cat conftest.$ac_ext >&5
11909  ac_cv_header_stdc=no
11910fi
11911rm -f conftest.err conftest.$ac_ext
11912
11913if test $ac_cv_header_stdc = yes; then
11914  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11915  cat >conftest.$ac_ext <<_ACEOF
11916#line 11916 "configure"
11917#include "confdefs.h"
11918#include <string.h>
11919
11920_ACEOF
11921if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11922  egrep "memchr" >/dev/null 2>&1; then
11923  :
11924else
11925  ac_cv_header_stdc=no
11926fi
11927rm -rf conftest*
11928
11929fi
11930
11931if test $ac_cv_header_stdc = yes; then
11932  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11933  cat >conftest.$ac_ext <<_ACEOF
11934#line 11934 "configure"
11935#include "confdefs.h"
11936#include <stdlib.h>
11937
11938_ACEOF
11939if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11940  egrep "free" >/dev/null 2>&1; then
11941  :
11942else
11943  ac_cv_header_stdc=no
11944fi
11945rm -rf conftest*
11946
11947fi
11948
11949if test $ac_cv_header_stdc = yes; then
11950  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11951  if test "$cross_compiling" = yes; then
11952  :
11953else
11954  cat >conftest.$ac_ext <<_ACEOF
11955#line 11955 "configure"
11956#include "confdefs.h"
11957#include <ctype.h>
11958#if ((' ' & 0x0FF) == 0x020)
11959# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11960# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11961#else
11962# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11963                     || ('j' <= (c) && (c) <= 'r') \
11964                     || ('s' <= (c) && (c) <= 'z'))
11965# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11966#endif
11967
11968#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11969int
11970main ()
11971{
11972  int i;
11973  for (i = 0; i < 256; i++)
11974    if (XOR (islower (i), ISLOWER (i))
11975        || toupper (i) != TOUPPER (i))
11976      $ac_main_return(2);
11977  $ac_main_return (0);
11978}
11979_ACEOF
11980rm -f conftest$ac_exeext
11981if { (eval echo "$as_me:11981: \"$ac_link\"") >&5
11982  (eval $ac_link) 2>&5
11983  ac_status=$?
11984  echo "$as_me:11984: \$? = $ac_status" >&5
11985  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11986  { (eval echo "$as_me:11986: \"$ac_try\"") >&5
11987  (eval $ac_try) 2>&5
11988  ac_status=$?
11989  echo "$as_me:11989: \$? = $ac_status" >&5
11990  (exit $ac_status); }; }; then
11991  :
11992else
11993  echo "$as_me: program exited with status $ac_status" >&5
11994echo "$as_me: failed program was:" >&5
11995cat conftest.$ac_ext >&5
11996ac_cv_header_stdc=no
11997fi
11998rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11999fi
12000fi
12001fi
12002echo "$as_me:12002: result: $ac_cv_header_stdc" >&5
12003echo "${ECHO_T}$ac_cv_header_stdc" >&6
12004if test $ac_cv_header_stdc = yes; then
12005
12006cat >>confdefs.h <<\EOF
12007#define STDC_HEADERS 1
12008EOF
12009
12010fi
12011
12012echo "$as_me:12012: checking whether time.h and sys/time.h may both be included" >&5
12013echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12014if test "${ac_cv_header_time+set}" = set; then
12015  echo $ECHO_N "(cached) $ECHO_C" >&6
12016else
12017  cat >conftest.$ac_ext <<_ACEOF
12018#line 12018 "configure"
12019#include "confdefs.h"
12020#include <sys/types.h>
12021#include <sys/time.h>
12022#include <time.h>
12023
12024int
12025main ()
12026{
12027if ((struct tm *) 0)
12028return 0;
12029  ;
12030  return 0;
12031}
12032_ACEOF
12033rm -f conftest.$ac_objext
12034if { (eval echo "$as_me:12034: \"$ac_compile\"") >&5
12035  (eval $ac_compile) 2>&5
12036  ac_status=$?
12037  echo "$as_me:12037: \$? = $ac_status" >&5
12038  (exit $ac_status); } &&
12039         { ac_try='test -s conftest.$ac_objext'
12040  { (eval echo "$as_me:12040: \"$ac_try\"") >&5
12041  (eval $ac_try) 2>&5
12042  ac_status=$?
12043  echo "$as_me:12043: \$? = $ac_status" >&5
12044  (exit $ac_status); }; }; then
12045  ac_cv_header_time=yes
12046else
12047  echo "$as_me: failed program was:" >&5
12048cat conftest.$ac_ext >&5
12049ac_cv_header_time=no
12050fi
12051rm -f conftest.$ac_objext conftest.$ac_ext
12052fi
12053echo "$as_me:12053: result: $ac_cv_header_time" >&5
12054echo "${ECHO_T}$ac_cv_header_time" >&6
12055if test $ac_cv_header_time = yes; then
12056
12057cat >>confdefs.h <<\EOF
12058#define TIME_WITH_SYS_TIME 1
12059EOF
12060
12061fi
12062
12063ac_header_dirent=no
12064for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12065  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12066echo "$as_me:12066: checking for $ac_hdr that defines DIR" >&5
12067echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12068if eval "test \"\${$as_ac_Header+set}\" = set"; then
12069  echo $ECHO_N "(cached) $ECHO_C" >&6
12070else
12071  cat >conftest.$ac_ext <<_ACEOF
12072#line 12072 "configure"
12073#include "confdefs.h"
12074#include <sys/types.h>
12075#include <$ac_hdr>
12076
12077int
12078main ()
12079{
12080if ((DIR *) 0)
12081return 0;
12082  ;
12083  return 0;
12084}
12085_ACEOF
12086rm -f conftest.$ac_objext
12087if { (eval echo "$as_me:12087: \"$ac_compile\"") >&5
12088  (eval $ac_compile) 2>&5
12089  ac_status=$?
12090  echo "$as_me:12090: \$? = $ac_status" >&5
12091  (exit $ac_status); } &&
12092         { ac_try='test -s conftest.$ac_objext'
12093  { (eval echo "$as_me:12093: \"$ac_try\"") >&5
12094  (eval $ac_try) 2>&5
12095  ac_status=$?
12096  echo "$as_me:12096: \$? = $ac_status" >&5
12097  (exit $ac_status); }; }; then
12098  eval "$as_ac_Header=yes"
12099else
12100  echo "$as_me: failed program was:" >&5
12101cat conftest.$ac_ext >&5
12102eval "$as_ac_Header=no"
12103fi
12104rm -f conftest.$ac_objext conftest.$ac_ext
12105fi
12106echo "$as_me:12106: result: `eval echo '${'$as_ac_Header'}'`" >&5
12107echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12108if test `eval echo '${'$as_ac_Header'}'` = yes; then
12109  cat >>confdefs.h <<EOF
12110#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12111EOF
12112
12113ac_header_dirent=$ac_hdr; break
12114fi
12115
12116done
12117# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12118if test $ac_header_dirent = dirent.h; then
12119  echo "$as_me:12119: checking for opendir in -ldir" >&5
12120echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12121if test "${ac_cv_lib_dir_opendir+set}" = set; then
12122  echo $ECHO_N "(cached) $ECHO_C" >&6
12123else
12124  ac_check_lib_save_LIBS=$LIBS
12125LIBS="-ldir  $LIBS"
12126cat >conftest.$ac_ext <<_ACEOF
12127#line 12127 "configure"
12128#include "confdefs.h"
12129
12130/* Override any gcc2 internal prototype to avoid an error.  */
12131#ifdef __cplusplus
12132extern "C"
12133#endif
12134/* We use char because int might match the return type of a gcc2
12135   builtin and then its argument prototype would still apply.  */
12136char opendir ();
12137int
12138main ()
12139{
12140opendir ();
12141  ;
12142  return 0;
12143}
12144_ACEOF
12145rm -f conftest.$ac_objext conftest$ac_exeext
12146if { (eval echo "$as_me:12146: \"$ac_link\"") >&5
12147  (eval $ac_link) 2>&5
12148  ac_status=$?
12149  echo "$as_me:12149: \$? = $ac_status" >&5
12150  (exit $ac_status); } &&
12151         { ac_try='test -s conftest$ac_exeext'
12152  { (eval echo "$as_me:12152: \"$ac_try\"") >&5
12153  (eval $ac_try) 2>&5
12154  ac_status=$?
12155  echo "$as_me:12155: \$? = $ac_status" >&5
12156  (exit $ac_status); }; }; then
12157  ac_cv_lib_dir_opendir=yes
12158else
12159  echo "$as_me: failed program was:" >&5
12160cat conftest.$ac_ext >&5
12161ac_cv_lib_dir_opendir=no
12162fi
12163rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12164LIBS=$ac_check_lib_save_LIBS
12165fi
12166echo "$as_me:12166: result: $ac_cv_lib_dir_opendir" >&5
12167echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12168if test $ac_cv_lib_dir_opendir = yes; then
12169  LIBS="$LIBS -ldir"
12170fi
12171
12172else
12173  echo "$as_me:12173: checking for opendir in -lx" >&5
12174echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12175if test "${ac_cv_lib_x_opendir+set}" = set; then
12176  echo $ECHO_N "(cached) $ECHO_C" >&6
12177else
12178  ac_check_lib_save_LIBS=$LIBS
12179LIBS="-lx  $LIBS"
12180cat >conftest.$ac_ext <<_ACEOF
12181#line 12181 "configure"
12182#include "confdefs.h"
12183
12184/* Override any gcc2 internal prototype to avoid an error.  */
12185#ifdef __cplusplus
12186extern "C"
12187#endif
12188/* We use char because int might match the return type of a gcc2
12189   builtin and then its argument prototype would still apply.  */
12190char opendir ();
12191int
12192main ()
12193{
12194opendir ();
12195  ;
12196  return 0;
12197}
12198_ACEOF
12199rm -f conftest.$ac_objext conftest$ac_exeext
12200if { (eval echo "$as_me:12200: \"$ac_link\"") >&5
12201  (eval $ac_link) 2>&5
12202  ac_status=$?
12203  echo "$as_me:12203: \$? = $ac_status" >&5
12204  (exit $ac_status); } &&
12205         { ac_try='test -s conftest$ac_exeext'
12206  { (eval echo "$as_me:12206: \"$ac_try\"") >&5
12207  (eval $ac_try) 2>&5
12208  ac_status=$?
12209  echo "$as_me:12209: \$? = $ac_status" >&5
12210  (exit $ac_status); }; }; then
12211  ac_cv_lib_x_opendir=yes
12212else
12213  echo "$as_me: failed program was:" >&5
12214cat conftest.$ac_ext >&5
12215ac_cv_lib_x_opendir=no
12216fi
12217rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12218LIBS=$ac_check_lib_save_LIBS
12219fi
12220echo "$as_me:12220: result: $ac_cv_lib_x_opendir" >&5
12221echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12222if test $ac_cv_lib_x_opendir = yes; then
12223  LIBS="$LIBS -lx"
12224fi
12225
12226fi
12227
12228for ac_header in search.h unctrl.h unistd.h
12229do
12230as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12231echo "$as_me:12231: checking for $ac_header" >&5
12232echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12233if eval "test \"\${$as_ac_Header+set}\" = set"; then
12234  echo $ECHO_N "(cached) $ECHO_C" >&6
12235else
12236  cat >conftest.$ac_ext <<_ACEOF
12237#line 12237 "configure"
12238#include "confdefs.h"
12239#include <$ac_header>
12240_ACEOF
12241if { (eval echo "$as_me:12241: \"$ac_cpp conftest.$ac_ext\"") >&5
12242  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12243  ac_status=$?
12244  egrep -v '^ *\+' conftest.er1 >conftest.err
12245  rm -f conftest.er1
12246  cat conftest.err >&5
12247  echo "$as_me:12247: \$? = $ac_status" >&5
12248  (exit $ac_status); } >/dev/null; then
12249  if test -s conftest.err; then
12250    ac_cpp_err=$ac_c_preproc_warn_flag
12251  else
12252    ac_cpp_err=
12253  fi
12254else
12255  ac_cpp_err=yes
12256fi
12257if test -z "$ac_cpp_err"; then
12258  eval "$as_ac_Header=yes"
12259else
12260  echo "$as_me: failed program was:" >&5
12261  cat conftest.$ac_ext >&5
12262  eval "$as_ac_Header=no"
12263fi
12264rm -f conftest.err conftest.$ac_ext
12265fi
12266echo "$as_me:12266: result: `eval echo '${'$as_ac_Header'}'`" >&5
12267echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12268if test `eval echo '${'$as_ac_Header'}'` = yes; then
12269  cat >>confdefs.h <<EOF
12270#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12271EOF
12272
12273fi
12274done
12275
12276echo "$as_me:12276: checking for term.h" >&5
12277echo $ECHO_N "checking for term.h... $ECHO_C" >&6
12278if test "${cf_cv_term_header+set}" = set; then
12279  echo $ECHO_N "(cached) $ECHO_C" >&6
12280else
12281
12282# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
12283# for <term.h> if we do not find the variant.
12284
12285cf_header_list="term.h ncurses/term.h ncursesw/term.h"
12286
12287case ${cf_cv_ncurses_header:-curses.h} in #(vi
12288*/*)
12289	cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
12290	cf_header_list="$cf_header_item $cf_header_list"
12291	;;
12292esac
12293
12294for cf_header in $cf_header_list
12295do
12296	cat >conftest.$ac_ext <<_ACEOF
12297#line 12297 "configure"
12298#include "confdefs.h"
12299
12300#include <${cf_cv_ncurses_header:-curses.h}>
12301#include <${cf_header}>
12302int
12303main ()
12304{
12305WINDOW *x
12306  ;
12307  return 0;
12308}
12309_ACEOF
12310rm -f conftest.$ac_objext
12311if { (eval echo "$as_me:12311: \"$ac_compile\"") >&5
12312  (eval $ac_compile) 2>&5
12313  ac_status=$?
12314  echo "$as_me:12314: \$? = $ac_status" >&5
12315  (exit $ac_status); } &&
12316         { ac_try='test -s conftest.$ac_objext'
12317  { (eval echo "$as_me:12317: \"$ac_try\"") >&5
12318  (eval $ac_try) 2>&5
12319  ac_status=$?
12320  echo "$as_me:12320: \$? = $ac_status" >&5
12321  (exit $ac_status); }; }; then
12322  cf_cv_term_header=$cf_header
12323	 break
12324else
12325  echo "$as_me: failed program was:" >&5
12326cat conftest.$ac_ext >&5
12327cf_cv_term_header=no
12328fi
12329rm -f conftest.$ac_objext conftest.$ac_ext
12330done
12331
12332case $cf_cv_term_header in #(vi
12333no)
12334	# If curses is ncurses, some packagers still mess it up by trying to make
12335	# us use GNU termcap.  This handles the most common case.
12336	for cf_header in ncurses/term.h ncursesw/term.h
12337	do
12338		cat >conftest.$ac_ext <<_ACEOF
12339#line 12339 "configure"
12340#include "confdefs.h"
12341
12342#include <${cf_cv_ncurses_header:-curses.h}>
12343#ifdef NCURSES_VERSION
12344#include <${cf_header}>
12345#else
12346make an error
12347#endif
12348int
12349main ()
12350{
12351WINDOW *x
12352  ;
12353  return 0;
12354}
12355_ACEOF
12356rm -f conftest.$ac_objext
12357if { (eval echo "$as_me:12357: \"$ac_compile\"") >&5
12358  (eval $ac_compile) 2>&5
12359  ac_status=$?
12360  echo "$as_me:12360: \$? = $ac_status" >&5
12361  (exit $ac_status); } &&
12362         { ac_try='test -s conftest.$ac_objext'
12363  { (eval echo "$as_me:12363: \"$ac_try\"") >&5
12364  (eval $ac_try) 2>&5
12365  ac_status=$?
12366  echo "$as_me:12366: \$? = $ac_status" >&5
12367  (exit $ac_status); }; }; then
12368  cf_cv_term_header=$cf_header
12369			 break
12370else
12371  echo "$as_me: failed program was:" >&5
12372cat conftest.$ac_ext >&5
12373cf_cv_term_header=no
12374fi
12375rm -f conftest.$ac_objext conftest.$ac_ext
12376	done
12377	;;
12378esac
12379
12380fi
12381echo "$as_me:12381: result: $cf_cv_term_header" >&5
12382echo "${ECHO_T}$cf_cv_term_header" >&6
12383
12384case $cf_cv_term_header in #(vi
12385term.h) #(vi
12386	cat >>confdefs.h <<\EOF
12387#define HAVE_TERM_H 1
12388EOF
12389
12390	;;
12391ncurses/term.h) #(vi
12392	cat >>confdefs.h <<\EOF
12393#define HAVE_NCURSES_TERM_H 1
12394EOF
12395
12396	;;
12397ncursesw/term.h)
12398	cat >>confdefs.h <<\EOF
12399#define HAVE_NCURSESW_TERM_H 1
12400EOF
12401
12402	;;
12403esac
12404
12405echo "$as_me:12405: checking return type of signal handlers" >&5
12406echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12407if test "${ac_cv_type_signal+set}" = set; then
12408  echo $ECHO_N "(cached) $ECHO_C" >&6
12409else
12410  cat >conftest.$ac_ext <<_ACEOF
12411#line 12411 "configure"
12412#include "confdefs.h"
12413#include <sys/types.h>
12414#include <signal.h>
12415#ifdef signal
12416# undef signal
12417#endif
12418#ifdef __cplusplus
12419extern "C" void (*signal (int, void (*)(int)))(int);
12420#else
12421void (*signal ()) ();
12422#endif
12423
12424int
12425main ()
12426{
12427int i;
12428  ;
12429  return 0;
12430}
12431_ACEOF
12432rm -f conftest.$ac_objext
12433if { (eval echo "$as_me:12433: \"$ac_compile\"") >&5
12434  (eval $ac_compile) 2>&5
12435  ac_status=$?
12436  echo "$as_me:12436: \$? = $ac_status" >&5
12437  (exit $ac_status); } &&
12438         { ac_try='test -s conftest.$ac_objext'
12439  { (eval echo "$as_me:12439: \"$ac_try\"") >&5
12440  (eval $ac_try) 2>&5
12441  ac_status=$?
12442  echo "$as_me:12442: \$? = $ac_status" >&5
12443  (exit $ac_status); }; }; then
12444  ac_cv_type_signal=void
12445else
12446  echo "$as_me: failed program was:" >&5
12447cat conftest.$ac_ext >&5
12448ac_cv_type_signal=int
12449fi
12450rm -f conftest.$ac_objext conftest.$ac_ext
12451fi
12452echo "$as_me:12452: result: $ac_cv_type_signal" >&5
12453echo "${ECHO_T}$ac_cv_type_signal" >&6
12454
12455cat >>confdefs.h <<EOF
12456#define RETSIGTYPE $ac_cv_type_signal
12457EOF
12458
12459for ac_func in \
12460_nc_free_and_exit \
12461btowc \
12462mblen \
12463mbrlen \
12464mbrtowc \
12465mbtowc \
12466strcasecmp \
12467strftime \
12468tsearch \
12469waitpid \
12470wcsrtombs \
12471wcstombs \
12472wctob \
12473wctomb \
12474
12475do
12476as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12477echo "$as_me:12477: checking for $ac_func" >&5
12478echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12479if eval "test \"\${$as_ac_var+set}\" = set"; then
12480  echo $ECHO_N "(cached) $ECHO_C" >&6
12481else
12482  cat >conftest.$ac_ext <<_ACEOF
12483#line 12483 "configure"
12484#include "confdefs.h"
12485/* System header to define __stub macros and hopefully few prototypes,
12486    which can conflict with char $ac_func (); below.  */
12487#include <assert.h>
12488/* Override any gcc2 internal prototype to avoid an error.  */
12489#ifdef __cplusplus
12490extern "C"
12491#endif
12492/* We use char because int might match the return type of a gcc2
12493   builtin and then its argument prototype would still apply.  */
12494char $ac_func ();
12495char (*f) ();
12496
12497int
12498main ()
12499{
12500/* The GNU C library defines this for functions which it implements
12501    to always fail with ENOSYS.  Some functions are actually named
12502    something starting with __ and the normal name is an alias.  */
12503#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12504choke me
12505#else
12506f = $ac_func;
12507#endif
12508
12509  ;
12510  return 0;
12511}
12512_ACEOF
12513rm -f conftest.$ac_objext conftest$ac_exeext
12514if { (eval echo "$as_me:12514: \"$ac_link\"") >&5
12515  (eval $ac_link) 2>&5
12516  ac_status=$?
12517  echo "$as_me:12517: \$? = $ac_status" >&5
12518  (exit $ac_status); } &&
12519         { ac_try='test -s conftest$ac_exeext'
12520  { (eval echo "$as_me:12520: \"$ac_try\"") >&5
12521  (eval $ac_try) 2>&5
12522  ac_status=$?
12523  echo "$as_me:12523: \$? = $ac_status" >&5
12524  (exit $ac_status); }; }; then
12525  eval "$as_ac_var=yes"
12526else
12527  echo "$as_me: failed program was:" >&5
12528cat conftest.$ac_ext >&5
12529eval "$as_ac_var=no"
12530fi
12531rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12532fi
12533echo "$as_me:12533: result: `eval echo '${'$as_ac_var'}'`" >&5
12534echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12535if test `eval echo '${'$as_ac_var'}'` = yes; then
12536  cat >>confdefs.h <<EOF
12537#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12538EOF
12539
12540fi
12541done
12542
12543echo "$as_me:12543: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12544echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12545if test "${cf_cv_need_xopen_extension+set}" = set; then
12546  echo $ECHO_N "(cached) $ECHO_C" >&6
12547else
12548
12549cat >conftest.$ac_ext <<_ACEOF
12550#line 12550 "configure"
12551#include "confdefs.h"
12552
12553#include <stdlib.h>
12554#include <${cf_cv_ncurses_header:-curses.h}>
12555int
12556main ()
12557{
12558
12559#if defined(NCURSES_VERSION_PATCH)
12560#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
12561	make an error
12562#endif
12563#endif
12564	long x = winnstr(stdscr, "", 0);
12565	int x1, y1;
12566	getbegyx(stdscr, y1, x1)
12567  ;
12568  return 0;
12569}
12570_ACEOF
12571rm -f conftest.$ac_objext conftest$ac_exeext
12572if { (eval echo "$as_me:12572: \"$ac_link\"") >&5
12573  (eval $ac_link) 2>&5
12574  ac_status=$?
12575  echo "$as_me:12575: \$? = $ac_status" >&5
12576  (exit $ac_status); } &&
12577         { ac_try='test -s conftest$ac_exeext'
12578  { (eval echo "$as_me:12578: \"$ac_try\"") >&5
12579  (eval $ac_try) 2>&5
12580  ac_status=$?
12581  echo "$as_me:12581: \$? = $ac_status" >&5
12582  (exit $ac_status); }; }; then
12583  cf_cv_need_xopen_extension=no
12584else
12585  echo "$as_me: failed program was:" >&5
12586cat conftest.$ac_ext >&5
12587cat >conftest.$ac_ext <<_ACEOF
12588#line 12588 "configure"
12589#include "confdefs.h"
12590
12591#define _XOPEN_SOURCE_EXTENDED
12592#include <stdlib.h>
12593#include <${cf_cv_ncurses_header:-curses.h}>
12594int
12595main ()
12596{
12597
12598#ifdef NCURSES_VERSION
12599	cchar_t check;
12600	int check2 = curs_set((int)sizeof(check));
12601#endif
12602	long x = winnstr(stdscr, "", 0);
12603	int x1, y1;
12604	getbegyx(stdscr, y1, x1)
12605  ;
12606  return 0;
12607}
12608_ACEOF
12609rm -f conftest.$ac_objext conftest$ac_exeext
12610if { (eval echo "$as_me:12610: \"$ac_link\"") >&5
12611  (eval $ac_link) 2>&5
12612  ac_status=$?
12613  echo "$as_me:12613: \$? = $ac_status" >&5
12614  (exit $ac_status); } &&
12615         { ac_try='test -s conftest$ac_exeext'
12616  { (eval echo "$as_me:12616: \"$ac_try\"") >&5
12617  (eval $ac_try) 2>&5
12618  ac_status=$?
12619  echo "$as_me:12619: \$? = $ac_status" >&5
12620  (exit $ac_status); }; }; then
12621  cf_cv_need_xopen_extension=yes
12622else
12623  echo "$as_me: failed program was:" >&5
12624cat conftest.$ac_ext >&5
12625cf_cv_need_xopen_extension=unknown
12626fi
12627rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12628fi
12629rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12630fi
12631echo "$as_me:12631: result: $cf_cv_need_xopen_extension" >&5
12632echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
12633test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12634
12635echo "$as_me:12635: checking for unctrl.h" >&5
12636echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
12637if test "${cf_cv_unctrl_header+set}" = set; then
12638  echo $ECHO_N "(cached) $ECHO_C" >&6
12639else
12640
12641# If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
12642# for <unctrl.h> if we do not find the variant.
12643
12644cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
12645
12646case ${cf_cv_ncurses_header:-curses.h} in #(vi
12647*/*)
12648	cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
12649	cf_header_list="$cf_header_item $cf_header_list"
12650	;;
12651esac
12652
12653for cf_header in $cf_header_list
12654do
12655	cat >conftest.$ac_ext <<_ACEOF
12656#line 12656 "configure"
12657#include "confdefs.h"
12658
12659#include <${cf_cv_ncurses_header:-curses.h}>
12660#include <${cf_header}>
12661int
12662main ()
12663{
12664WINDOW *x
12665  ;
12666  return 0;
12667}
12668_ACEOF
12669rm -f conftest.$ac_objext
12670if { (eval echo "$as_me:12670: \"$ac_compile\"") >&5
12671  (eval $ac_compile) 2>&5
12672  ac_status=$?
12673  echo "$as_me:12673: \$? = $ac_status" >&5
12674  (exit $ac_status); } &&
12675         { ac_try='test -s conftest.$ac_objext'
12676  { (eval echo "$as_me:12676: \"$ac_try\"") >&5
12677  (eval $ac_try) 2>&5
12678  ac_status=$?
12679  echo "$as_me:12679: \$? = $ac_status" >&5
12680  (exit $ac_status); }; }; then
12681  cf_cv_unctrl_header=$cf_header
12682	 break
12683else
12684  echo "$as_me: failed program was:" >&5
12685cat conftest.$ac_ext >&5
12686cf_cv_unctrl_header=no
12687fi
12688rm -f conftest.$ac_objext conftest.$ac_ext
12689done
12690
12691case $cf_cv_unctrl_header in #(vi
12692no)
12693	{ echo "$as_me:12693: WARNING: unctrl.h header not found" >&5
12694echo "$as_me: WARNING: unctrl.h header not found" >&2;}
12695	;;
12696esac
12697
12698fi
12699echo "$as_me:12699: result: $cf_cv_unctrl_header" >&5
12700echo "${ECHO_T}$cf_cv_unctrl_header" >&6
12701
12702case $cf_cv_unctrl_header in #(vi
12703unctrl.h) #(vi
12704	cat >>confdefs.h <<\EOF
12705#define HAVE_UNCTRL_H 1
12706EOF
12707
12708	;;
12709ncurses/unctrl.h) #(vi
12710	cat >>confdefs.h <<\EOF
12711#define HAVE_NCURSES_UNCTRL_H 1
12712EOF
12713
12714	;;
12715ncursesw/unctrl.h)
12716	cat >>confdefs.h <<\EOF
12717#define HAVE_NCURSESW_UNCTRL_H 1
12718EOF
12719
12720	;;
12721esac
12722
12723for cf_func in \
12724flushinp \
12725getattrs \
12726getbegx \
12727getbegy \
12728getbegyx \
12729getcurx \
12730getcury \
12731getmaxx \
12732getmaxy \
12733getmaxyx \
12734getparx \
12735getpary \
12736getparyx \
12737use_default_colors \
12738wchgat \
12739wget_wch \
12740
12741do
12742
12743cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12744
12745	echo "$as_me:12745: checking for ${cf_func}" >&5
12746echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
12747
12748echo "${as_me:-configure}:12748: testing ${cf_func} ..." 1>&5
12749
12750	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
12751  echo $ECHO_N "(cached) $ECHO_C" >&6
12752else
12753
12754		eval cf_result='$ac_cv_func_'$cf_func
12755		if test ".$cf_result" != ".no"; then
12756			cat >conftest.$ac_ext <<_ACEOF
12757#line 12757 "configure"
12758#include "confdefs.h"
12759
12760#ifdef HAVE_XCURSES
12761#include <xcurses.h>
12762char * XCursesProgramName = "test";
12763#else
12764#include <${cf_cv_ncurses_header:-curses.h}>
12765#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
12766#include <ncursesw/term.h>
12767#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
12768#include <ncurses/term.h>
12769#elif defined(HAVE_TERM_H)
12770#include <term.h>
12771#endif
12772#endif
12773
12774int
12775main ()
12776{
12777
12778#ifndef ${cf_func}
12779long foo = (long)(&${cf_func});
12780if (foo + 1234 > 5678)
12781	${cf_cv_main_return:-return}(foo);
12782#endif
12783
12784  ;
12785  return 0;
12786}
12787_ACEOF
12788rm -f conftest.$ac_objext conftest$ac_exeext
12789if { (eval echo "$as_me:12789: \"$ac_link\"") >&5
12790  (eval $ac_link) 2>&5
12791  ac_status=$?
12792  echo "$as_me:12792: \$? = $ac_status" >&5
12793  (exit $ac_status); } &&
12794         { ac_try='test -s conftest$ac_exeext'
12795  { (eval echo "$as_me:12795: \"$ac_try\"") >&5
12796  (eval $ac_try) 2>&5
12797  ac_status=$?
12798  echo "$as_me:12798: \$? = $ac_status" >&5
12799  (exit $ac_status); }; }; then
12800  cf_result=yes
12801else
12802  echo "$as_me: failed program was:" >&5
12803cat conftest.$ac_ext >&5
12804cf_result=no
12805fi
12806rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12807		fi
12808		eval 'cf_cv_func_'$cf_func'=$cf_result'
12809
12810fi
12811
12812	# use the computed/retrieved cache-value:
12813	eval 'cf_result=$cf_cv_func_'$cf_func
12814	echo "$as_me:12814: result: $cf_result" >&5
12815echo "${ECHO_T}$cf_result" >&6
12816	if test $cf_result != no; then
12817		cat >>confdefs.h <<EOF
12818#define HAVE_${cf_tr_func} 1
12819EOF
12820
12821	fi
12822done
12823
12824echo "$as_me:12824: checking for start_color" >&5
12825echo $ECHO_N "checking for start_color... $ECHO_C" >&6
12826if test "${ac_cv_func_start_color+set}" = set; then
12827  echo $ECHO_N "(cached) $ECHO_C" >&6
12828else
12829  cat >conftest.$ac_ext <<_ACEOF
12830#line 12830 "configure"
12831#include "confdefs.h"
12832/* System header to define __stub macros and hopefully few prototypes,
12833    which can conflict with char start_color (); below.  */
12834#include <assert.h>
12835/* Override any gcc2 internal prototype to avoid an error.  */
12836#ifdef __cplusplus
12837extern "C"
12838#endif
12839/* We use char because int might match the return type of a gcc2
12840   builtin and then its argument prototype would still apply.  */
12841char start_color ();
12842char (*f) ();
12843
12844int
12845main ()
12846{
12847/* The GNU C library defines this for functions which it implements
12848    to always fail with ENOSYS.  Some functions are actually named
12849    something starting with __ and the normal name is an alias.  */
12850#if defined (__stub_start_color) || defined (__stub___start_color)
12851choke me
12852#else
12853f = start_color;
12854#endif
12855
12856  ;
12857  return 0;
12858}
12859_ACEOF
12860rm -f conftest.$ac_objext conftest$ac_exeext
12861if { (eval echo "$as_me:12861: \"$ac_link\"") >&5
12862  (eval $ac_link) 2>&5
12863  ac_status=$?
12864  echo "$as_me:12864: \$? = $ac_status" >&5
12865  (exit $ac_status); } &&
12866         { ac_try='test -s conftest$ac_exeext'
12867  { (eval echo "$as_me:12867: \"$ac_try\"") >&5
12868  (eval $ac_try) 2>&5
12869  ac_status=$?
12870  echo "$as_me:12870: \$? = $ac_status" >&5
12871  (exit $ac_status); }; }; then
12872  ac_cv_func_start_color=yes
12873else
12874  echo "$as_me: failed program was:" >&5
12875cat conftest.$ac_ext >&5
12876ac_cv_func_start_color=no
12877fi
12878rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12879fi
12880echo "$as_me:12880: result: $ac_cv_func_start_color" >&5
12881echo "${ECHO_T}$ac_cv_func_start_color" >&6
12882if test $ac_cv_func_start_color = yes; then
12883  cat >>confdefs.h <<\EOF
12884#define HAVE_COLOR 1
12885EOF
12886
12887fi
12888
12889echo "$as_me:12889: checking for chtype typedef" >&5
12890echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
12891if test "${cf_cv_chtype_decl+set}" = set; then
12892  echo $ECHO_N "(cached) $ECHO_C" >&6
12893else
12894
12895	cat >conftest.$ac_ext <<_ACEOF
12896#line 12896 "configure"
12897#include "confdefs.h"
12898#include <${cf_cv_ncurses_header:-curses.h}>
12899int
12900main ()
12901{
12902chtype foo
12903  ;
12904  return 0;
12905}
12906_ACEOF
12907rm -f conftest.$ac_objext
12908if { (eval echo "$as_me:12908: \"$ac_compile\"") >&5
12909  (eval $ac_compile) 2>&5
12910  ac_status=$?
12911  echo "$as_me:12911: \$? = $ac_status" >&5
12912  (exit $ac_status); } &&
12913         { ac_try='test -s conftest.$ac_objext'
12914  { (eval echo "$as_me:12914: \"$ac_try\"") >&5
12915  (eval $ac_try) 2>&5
12916  ac_status=$?
12917  echo "$as_me:12917: \$? = $ac_status" >&5
12918  (exit $ac_status); }; }; then
12919  cf_cv_chtype_decl=yes
12920else
12921  echo "$as_me: failed program was:" >&5
12922cat conftest.$ac_ext >&5
12923cf_cv_chtype_decl=no
12924fi
12925rm -f conftest.$ac_objext conftest.$ac_ext
12926fi
12927echo "$as_me:12927: result: $cf_cv_chtype_decl" >&5
12928echo "${ECHO_T}$cf_cv_chtype_decl" >&6
12929if test $cf_cv_chtype_decl = yes ; then
12930	cat >>confdefs.h <<\EOF
12931#define HAVE_TYPE_CHTYPE 1
12932EOF
12933
12934	echo "$as_me:12934: checking if chtype is scalar or struct" >&5
12935echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
12936if test "${cf_cv_chtype_type+set}" = set; then
12937  echo $ECHO_N "(cached) $ECHO_C" >&6
12938else
12939
12940		cat >conftest.$ac_ext <<_ACEOF
12941#line 12941 "configure"
12942#include "confdefs.h"
12943#include <${cf_cv_ncurses_header:-curses.h}>
12944int
12945main ()
12946{
12947chtype foo; long x = foo
12948  ;
12949  return 0;
12950}
12951_ACEOF
12952rm -f conftest.$ac_objext
12953if { (eval echo "$as_me:12953: \"$ac_compile\"") >&5
12954  (eval $ac_compile) 2>&5
12955  ac_status=$?
12956  echo "$as_me:12956: \$? = $ac_status" >&5
12957  (exit $ac_status); } &&
12958         { ac_try='test -s conftest.$ac_objext'
12959  { (eval echo "$as_me:12959: \"$ac_try\"") >&5
12960  (eval $ac_try) 2>&5
12961  ac_status=$?
12962  echo "$as_me:12962: \$? = $ac_status" >&5
12963  (exit $ac_status); }; }; then
12964  cf_cv_chtype_type=scalar
12965else
12966  echo "$as_me: failed program was:" >&5
12967cat conftest.$ac_ext >&5
12968cf_cv_chtype_type=struct
12969fi
12970rm -f conftest.$ac_objext conftest.$ac_ext
12971fi
12972echo "$as_me:12972: result: $cf_cv_chtype_type" >&5
12973echo "${ECHO_T}$cf_cv_chtype_type" >&6
12974	if test $cf_cv_chtype_type = scalar ; then
12975		cat >>confdefs.h <<\EOF
12976#define TYPE_CHTYPE_IS_SCALAR 1
12977EOF
12978
12979	fi
12980fi
12981
12982echo "$as_me:12982: checking for wide alternate character set array" >&5
12983echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
12984if test "${cf_cv_curses_wacs_map+set}" = set; then
12985  echo $ECHO_N "(cached) $ECHO_C" >&6
12986else
12987
12988	cf_cv_curses_wacs_map=unknown
12989	for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
12990	do
12991	cat >conftest.$ac_ext <<_ACEOF
12992#line 12992 "configure"
12993#include "confdefs.h"
12994
12995#ifndef _XOPEN_SOURCE_EXTENDED
12996#define _XOPEN_SOURCE_EXTENDED
12997#endif
12998#include <${cf_cv_ncurses_header:-curses.h}>
12999int
13000main ()
13001{
13002void *foo = &($name['k'])
13003  ;
13004  return 0;
13005}
13006_ACEOF
13007rm -f conftest.$ac_objext conftest$ac_exeext
13008if { (eval echo "$as_me:13008: \"$ac_link\"") >&5
13009  (eval $ac_link) 2>&5
13010  ac_status=$?
13011  echo "$as_me:13011: \$? = $ac_status" >&5
13012  (exit $ac_status); } &&
13013         { ac_try='test -s conftest$ac_exeext'
13014  { (eval echo "$as_me:13014: \"$ac_try\"") >&5
13015  (eval $ac_try) 2>&5
13016  ac_status=$?
13017  echo "$as_me:13017: \$? = $ac_status" >&5
13018  (exit $ac_status); }; }; then
13019  cf_cv_curses_wacs_map=$name
13020	 break
13021else
13022  echo "$as_me: failed program was:" >&5
13023cat conftest.$ac_ext >&5
13024fi
13025rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13026	done
13027fi
13028echo "$as_me:13028: result: $cf_cv_curses_wacs_map" >&5
13029echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
13030
13031test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
13032#define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
13033EOF
13034
13035echo "$as_me:13035: checking for wide alternate character constants" >&5
13036echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
13037if test "${cf_cv_curses_wacs_symbols+set}" = set; then
13038  echo $ECHO_N "(cached) $ECHO_C" >&6
13039else
13040
13041cf_cv_curses_wacs_symbols=no
13042if test "$cf_cv_curses_wacs_map" != unknown
13043then
13044	cat >conftest.$ac_ext <<_ACEOF
13045#line 13045 "configure"
13046#include "confdefs.h"
13047
13048#ifndef _XOPEN_SOURCE_EXTENDED
13049#define _XOPEN_SOURCE_EXTENDED
13050#endif
13051#include <${cf_cv_ncurses_header:-curses.h}>
13052int
13053main ()
13054{
13055cchar_t *foo = WACS_PLUS;
13056	 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
13057  ;
13058  return 0;
13059}
13060_ACEOF
13061rm -f conftest.$ac_objext conftest$ac_exeext
13062if { (eval echo "$as_me:13062: \"$ac_link\"") >&5
13063  (eval $ac_link) 2>&5
13064  ac_status=$?
13065  echo "$as_me:13065: \$? = $ac_status" >&5
13066  (exit $ac_status); } &&
13067         { ac_try='test -s conftest$ac_exeext'
13068  { (eval echo "$as_me:13068: \"$ac_try\"") >&5
13069  (eval $ac_try) 2>&5
13070  ac_status=$?
13071  echo "$as_me:13071: \$? = $ac_status" >&5
13072  (exit $ac_status); }; }; then
13073  cf_cv_curses_wacs_symbols=yes
13074else
13075  echo "$as_me: failed program was:" >&5
13076cat conftest.$ac_ext >&5
13077fi
13078rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13079else
13080	cat >conftest.$ac_ext <<_ACEOF
13081#line 13081 "configure"
13082#include "confdefs.h"
13083
13084#ifndef _XOPEN_SOURCE_EXTENDED
13085#define _XOPEN_SOURCE_EXTENDED
13086#endif
13087#include <${cf_cv_ncurses_header:-curses.h}>
13088int
13089main ()
13090{
13091cchar_t *foo = WACS_PLUS
13092  ;
13093  return 0;
13094}
13095_ACEOF
13096rm -f conftest.$ac_objext conftest$ac_exeext
13097if { (eval echo "$as_me:13097: \"$ac_link\"") >&5
13098  (eval $ac_link) 2>&5
13099  ac_status=$?
13100  echo "$as_me:13100: \$? = $ac_status" >&5
13101  (exit $ac_status); } &&
13102         { ac_try='test -s conftest$ac_exeext'
13103  { (eval echo "$as_me:13103: \"$ac_try\"") >&5
13104  (eval $ac_try) 2>&5
13105  ac_status=$?
13106  echo "$as_me:13106: \$? = $ac_status" >&5
13107  (exit $ac_status); }; }; then
13108  cf_cv_curses_wacs_symbols=yes
13109else
13110  echo "$as_me: failed program was:" >&5
13111cat conftest.$ac_ext >&5
13112fi
13113rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13114fi
13115
13116fi
13117echo "$as_me:13117: result: $cf_cv_curses_wacs_symbols" >&5
13118echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
13119
13120test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
13121#define CURSES_WACS_SYMBOLS 1
13122EOF
13123
13124for ac_header in sys/wait.h
13125do
13126as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13127echo "$as_me:13127: checking for $ac_header" >&5
13128echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13129if eval "test \"\${$as_ac_Header+set}\" = set"; then
13130  echo $ECHO_N "(cached) $ECHO_C" >&6
13131else
13132  cat >conftest.$ac_ext <<_ACEOF
13133#line 13133 "configure"
13134#include "confdefs.h"
13135#include <$ac_header>
13136_ACEOF
13137if { (eval echo "$as_me:13137: \"$ac_cpp conftest.$ac_ext\"") >&5
13138  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13139  ac_status=$?
13140  egrep -v '^ *\+' conftest.er1 >conftest.err
13141  rm -f conftest.er1
13142  cat conftest.err >&5
13143  echo "$as_me:13143: \$? = $ac_status" >&5
13144  (exit $ac_status); } >/dev/null; then
13145  if test -s conftest.err; then
13146    ac_cpp_err=$ac_c_preproc_warn_flag
13147  else
13148    ac_cpp_err=
13149  fi
13150else
13151  ac_cpp_err=yes
13152fi
13153if test -z "$ac_cpp_err"; then
13154  eval "$as_ac_Header=yes"
13155else
13156  echo "$as_me: failed program was:" >&5
13157  cat conftest.$ac_ext >&5
13158  eval "$as_ac_Header=no"
13159fi
13160rm -f conftest.err conftest.$ac_ext
13161fi
13162echo "$as_me:13162: result: `eval echo '${'$as_ac_Header'}'`" >&5
13163echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13164if test `eval echo '${'$as_ac_Header'}'` = yes; then
13165  cat >>confdefs.h <<EOF
13166#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13167EOF
13168
13169fi
13170done
13171
13172cf_wait_headers="#include <sys/types.h>
13173"
13174if test $ac_cv_header_sys_wait_h = yes; then
13175cf_wait_headers="$cf_wait_headers
13176#include <sys/wait.h>
13177"
13178else
13179
13180for ac_header in wait.h
13181do
13182as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13183echo "$as_me:13183: checking for $ac_header" >&5
13184echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13185if eval "test \"\${$as_ac_Header+set}\" = set"; then
13186  echo $ECHO_N "(cached) $ECHO_C" >&6
13187else
13188  cat >conftest.$ac_ext <<_ACEOF
13189#line 13189 "configure"
13190#include "confdefs.h"
13191#include <$ac_header>
13192_ACEOF
13193if { (eval echo "$as_me:13193: \"$ac_cpp conftest.$ac_ext\"") >&5
13194  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13195  ac_status=$?
13196  egrep -v '^ *\+' conftest.er1 >conftest.err
13197  rm -f conftest.er1
13198  cat conftest.err >&5
13199  echo "$as_me:13199: \$? = $ac_status" >&5
13200  (exit $ac_status); } >/dev/null; then
13201  if test -s conftest.err; then
13202    ac_cpp_err=$ac_c_preproc_warn_flag
13203  else
13204    ac_cpp_err=
13205  fi
13206else
13207  ac_cpp_err=yes
13208fi
13209if test -z "$ac_cpp_err"; then
13210  eval "$as_ac_Header=yes"
13211else
13212  echo "$as_me: failed program was:" >&5
13213  cat conftest.$ac_ext >&5
13214  eval "$as_ac_Header=no"
13215fi
13216rm -f conftest.err conftest.$ac_ext
13217fi
13218echo "$as_me:13218: result: `eval echo '${'$as_ac_Header'}'`" >&5
13219echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13220if test `eval echo '${'$as_ac_Header'}'` = yes; then
13221  cat >>confdefs.h <<EOF
13222#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13223EOF
13224
13225fi
13226done
13227
13228for ac_header in waitstatus.h
13229do
13230as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13231echo "$as_me:13231: checking for $ac_header" >&5
13232echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13233if eval "test \"\${$as_ac_Header+set}\" = set"; then
13234  echo $ECHO_N "(cached) $ECHO_C" >&6
13235else
13236  cat >conftest.$ac_ext <<_ACEOF
13237#line 13237 "configure"
13238#include "confdefs.h"
13239#include <$ac_header>
13240_ACEOF
13241if { (eval echo "$as_me:13241: \"$ac_cpp conftest.$ac_ext\"") >&5
13242  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13243  ac_status=$?
13244  egrep -v '^ *\+' conftest.er1 >conftest.err
13245  rm -f conftest.er1
13246  cat conftest.err >&5
13247  echo "$as_me:13247: \$? = $ac_status" >&5
13248  (exit $ac_status); } >/dev/null; then
13249  if test -s conftest.err; then
13250    ac_cpp_err=$ac_c_preproc_warn_flag
13251  else
13252    ac_cpp_err=
13253  fi
13254else
13255  ac_cpp_err=yes
13256fi
13257if test -z "$ac_cpp_err"; then
13258  eval "$as_ac_Header=yes"
13259else
13260  echo "$as_me: failed program was:" >&5
13261  cat conftest.$ac_ext >&5
13262  eval "$as_ac_Header=no"
13263fi
13264rm -f conftest.err conftest.$ac_ext
13265fi
13266echo "$as_me:13266: result: `eval echo '${'$as_ac_Header'}'`" >&5
13267echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13268if test `eval echo '${'$as_ac_Header'}'` = yes; then
13269  cat >>confdefs.h <<EOF
13270#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13271EOF
13272
13273fi
13274done
13275
13276if test $ac_cv_header_wait_h = yes; then
13277cf_wait_headers="$cf_wait_headers
13278#include <wait.h>
13279"
13280fi
13281if test $ac_cv_header_waitstatus_h = yes; then
13282cf_wait_headers="$cf_wait_headers
13283#include <waitstatus.h>
13284"
13285fi
13286fi
13287
13288echo "$as_me:13288: checking for union wait" >&5
13289echo $ECHO_N "checking for union wait... $ECHO_C" >&6
13290if test "${cf_cv_type_unionwait+set}" = set; then
13291  echo $ECHO_N "(cached) $ECHO_C" >&6
13292else
13293
13294	cat >conftest.$ac_ext <<_ACEOF
13295#line 13295 "configure"
13296#include "confdefs.h"
13297$cf_wait_headers
13298int
13299main ()
13300{
13301int x;
13302	 int y = WEXITSTATUS(x);
13303	 int z = WTERMSIG(x);
13304	 wait(&x);
13305
13306  ;
13307  return 0;
13308}
13309_ACEOF
13310rm -f conftest.$ac_objext conftest$ac_exeext
13311if { (eval echo "$as_me:13311: \"$ac_link\"") >&5
13312  (eval $ac_link) 2>&5
13313  ac_status=$?
13314  echo "$as_me:13314: \$? = $ac_status" >&5
13315  (exit $ac_status); } &&
13316         { ac_try='test -s conftest$ac_exeext'
13317  { (eval echo "$as_me:13317: \"$ac_try\"") >&5
13318  (eval $ac_try) 2>&5
13319  ac_status=$?
13320  echo "$as_me:13320: \$? = $ac_status" >&5
13321  (exit $ac_status); }; }; then
13322  cf_cv_type_unionwait=no
13323	 echo compiles ok w/o union wait 1>&5
13324
13325else
13326  echo "$as_me: failed program was:" >&5
13327cat conftest.$ac_ext >&5
13328
13329	cat >conftest.$ac_ext <<_ACEOF
13330#line 13330 "configure"
13331#include "confdefs.h"
13332$cf_wait_headers
13333int
13334main ()
13335{
13336union wait x;
13337#ifdef WEXITSTATUS
13338	 int y = WEXITSTATUS(x);
13339#endif
13340#ifdef WTERMSIG
13341	 int z = WTERMSIG(x);
13342#endif
13343	 wait(&x);
13344
13345  ;
13346  return 0;
13347}
13348_ACEOF
13349rm -f conftest.$ac_objext conftest$ac_exeext
13350if { (eval echo "$as_me:13350: \"$ac_link\"") >&5
13351  (eval $ac_link) 2>&5
13352  ac_status=$?
13353  echo "$as_me:13353: \$? = $ac_status" >&5
13354  (exit $ac_status); } &&
13355         { ac_try='test -s conftest$ac_exeext'
13356  { (eval echo "$as_me:13356: \"$ac_try\"") >&5
13357  (eval $ac_try) 2>&5
13358  ac_status=$?
13359  echo "$as_me:13359: \$? = $ac_status" >&5
13360  (exit $ac_status); }; }; then
13361  cf_cv_type_unionwait=yes
13362	 echo compiles ok with union wait and possibly macros too 1>&5
13363
13364else
13365  echo "$as_me: failed program was:" >&5
13366cat conftest.$ac_ext >&5
13367cf_cv_type_unionwait=no
13368fi
13369rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13370fi
13371rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13372fi
13373
13374echo "$as_me:13374: result: $cf_cv_type_unionwait" >&5
13375echo "${ECHO_T}$cf_cv_type_unionwait" >&6
13376test $cf_cv_type_unionwait = yes && cat >>confdefs.h <<\EOF
13377#define HAVE_TYPE_UNIONWAIT 1
13378EOF
13379
13380if test $cf_cv_type_unionwait = yes; then
13381
13382	echo "$as_me:13382: checking if union wait can be used as wait-arg" >&5
13383echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
13384	if test "${cf_cv_arg_union_wait+set}" = set; then
13385  echo $ECHO_N "(cached) $ECHO_C" >&6
13386else
13387
13388		cat >conftest.$ac_ext <<_ACEOF
13389#line 13389 "configure"
13390#include "confdefs.h"
13391$cf_wait_headers
13392int
13393main ()
13394{
13395union wait x; wait(&x)
13396  ;
13397  return 0;
13398}
13399_ACEOF
13400rm -f conftest.$ac_objext
13401if { (eval echo "$as_me:13401: \"$ac_compile\"") >&5
13402  (eval $ac_compile) 2>&5
13403  ac_status=$?
13404  echo "$as_me:13404: \$? = $ac_status" >&5
13405  (exit $ac_status); } &&
13406         { ac_try='test -s conftest.$ac_objext'
13407  { (eval echo "$as_me:13407: \"$ac_try\"") >&5
13408  (eval $ac_try) 2>&5
13409  ac_status=$?
13410  echo "$as_me:13410: \$? = $ac_status" >&5
13411  (exit $ac_status); }; }; then
13412  cf_cv_arg_union_wait=yes
13413else
13414  echo "$as_me: failed program was:" >&5
13415cat conftest.$ac_ext >&5
13416cf_cv_arg_union_wait=no
13417fi
13418rm -f conftest.$ac_objext conftest.$ac_ext
13419
13420fi
13421
13422	echo "$as_me:13422: result: $cf_cv_arg_union_wait" >&5
13423echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
13424	test $cf_cv_arg_union_wait = yes && cat >>confdefs.h <<\EOF
13425#define WAIT_USES_UNION 1
13426EOF
13427
13428	echo "$as_me:13428: checking if union wait can be used as waitpid-arg" >&5
13429echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
13430	if test "${cf_cv_arg_union_waitpid+set}" = set; then
13431  echo $ECHO_N "(cached) $ECHO_C" >&6
13432else
13433
13434		cat >conftest.$ac_ext <<_ACEOF
13435#line 13435 "configure"
13436#include "confdefs.h"
13437$cf_wait_headers
13438int
13439main ()
13440{
13441union wait x; waitpid(0, &x, 0)
13442  ;
13443  return 0;
13444}
13445_ACEOF
13446rm -f conftest.$ac_objext
13447if { (eval echo "$as_me:13447: \"$ac_compile\"") >&5
13448  (eval $ac_compile) 2>&5
13449  ac_status=$?
13450  echo "$as_me:13450: \$? = $ac_status" >&5
13451  (exit $ac_status); } &&
13452         { ac_try='test -s conftest.$ac_objext'
13453  { (eval echo "$as_me:13453: \"$ac_try\"") >&5
13454  (eval $ac_try) 2>&5
13455  ac_status=$?
13456  echo "$as_me:13456: \$? = $ac_status" >&5
13457  (exit $ac_status); }; }; then
13458  cf_cv_arg_union_waitpid=yes
13459else
13460  echo "$as_me: failed program was:" >&5
13461cat conftest.$ac_ext >&5
13462cf_cv_arg_union_waitpid=no
13463fi
13464rm -f conftest.$ac_objext conftest.$ac_ext
13465
13466fi
13467
13468	echo "$as_me:13468: result: $cf_cv_arg_union_waitpid" >&5
13469echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
13470	test $cf_cv_arg_union_waitpid = yes && cat >>confdefs.h <<\EOF
13471#define WAITPID_USES_UNION 1
13472EOF
13473
13474fi
13475
13476echo "$as_me:13476: checking if we must include wchar.h to declare mbstate_t" >&5
13477echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13478if test "${cf_cv_mbstate_t+set}" = set; then
13479  echo $ECHO_N "(cached) $ECHO_C" >&6
13480else
13481
13482cat >conftest.$ac_ext <<_ACEOF
13483#line 13483 "configure"
13484#include "confdefs.h"
13485
13486#include <stdlib.h>
13487#include <stdio.h>
13488#ifdef HAVE_LIBUTF8_H
13489#include <libutf8.h>
13490#endif
13491int
13492main ()
13493{
13494mbstate_t state
13495  ;
13496  return 0;
13497}
13498_ACEOF
13499rm -f conftest.$ac_objext
13500if { (eval echo "$as_me:13500: \"$ac_compile\"") >&5
13501  (eval $ac_compile) 2>&5
13502  ac_status=$?
13503  echo "$as_me:13503: \$? = $ac_status" >&5
13504  (exit $ac_status); } &&
13505         { ac_try='test -s conftest.$ac_objext'
13506  { (eval echo "$as_me:13506: \"$ac_try\"") >&5
13507  (eval $ac_try) 2>&5
13508  ac_status=$?
13509  echo "$as_me:13509: \$? = $ac_status" >&5
13510  (exit $ac_status); }; }; then
13511  cf_cv_mbstate_t=no
13512else
13513  echo "$as_me: failed program was:" >&5
13514cat conftest.$ac_ext >&5
13515cat >conftest.$ac_ext <<_ACEOF
13516#line 13516 "configure"
13517#include "confdefs.h"
13518
13519#include <stdlib.h>
13520#include <stdio.h>
13521#include <wchar.h>
13522#ifdef HAVE_LIBUTF8_H
13523#include <libutf8.h>
13524#endif
13525int
13526main ()
13527{
13528mbstate_t value
13529  ;
13530  return 0;
13531}
13532_ACEOF
13533rm -f conftest.$ac_objext
13534if { (eval echo "$as_me:13534: \"$ac_compile\"") >&5
13535  (eval $ac_compile) 2>&5
13536  ac_status=$?
13537  echo "$as_me:13537: \$? = $ac_status" >&5
13538  (exit $ac_status); } &&
13539         { ac_try='test -s conftest.$ac_objext'
13540  { (eval echo "$as_me:13540: \"$ac_try\"") >&5
13541  (eval $ac_try) 2>&5
13542  ac_status=$?
13543  echo "$as_me:13543: \$? = $ac_status" >&5
13544  (exit $ac_status); }; }; then
13545  cf_cv_mbstate_t=yes
13546else
13547  echo "$as_me: failed program was:" >&5
13548cat conftest.$ac_ext >&5
13549cf_cv_mbstate_t=unknown
13550fi
13551rm -f conftest.$ac_objext conftest.$ac_ext
13552fi
13553rm -f conftest.$ac_objext conftest.$ac_ext
13554fi
13555echo "$as_me:13555: result: $cf_cv_mbstate_t" >&5
13556echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13557
13558if test "$cf_cv_mbstate_t" = yes ; then
13559	cat >>confdefs.h <<\EOF
13560#define NEED_WCHAR_H 1
13561EOF
13562
13563fi
13564
13565if test "$cf_cv_mbstate_t" != unknown ; then
13566	cat >>confdefs.h <<\EOF
13567#define HAVE_MBSTATE_T 1
13568EOF
13569
13570fi
13571
13572PACKAGE_PREFIX=DLG
13573PACKAGE_CONFIG=dlg_config.h
13574
13575EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
13576
13577cat >conftest.$ac_ext <<_ACEOF
13578#line 13578 "configure"
13579#include "confdefs.h"
13580#include <locale.h>
13581int
13582main ()
13583{
13584setlocale(LC_ALL, "")
13585  ;
13586  return 0;
13587}
13588_ACEOF
13589rm -f conftest.$ac_objext conftest$ac_exeext
13590if { (eval echo "$as_me:13590: \"$ac_link\"") >&5
13591  (eval $ac_link) 2>&5
13592  ac_status=$?
13593  echo "$as_me:13593: \$? = $ac_status" >&5
13594  (exit $ac_status); } &&
13595         { ac_try='test -s conftest$ac_exeext'
13596  { (eval echo "$as_me:13596: \"$ac_try\"") >&5
13597  (eval $ac_try) 2>&5
13598  ac_status=$?
13599  echo "$as_me:13599: \$? = $ac_status" >&5
13600  (exit $ac_status); }; }; then
13601  cat >>confdefs.h <<\EOF
13602#define HAVE_SETLOCALE 1
13603EOF
13604
13605else
13606  echo "$as_me: failed program was:" >&5
13607cat conftest.$ac_ext >&5
13608fi
13609rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13610
13611LD_RPATH_OPT=
13612echo "$as_me:13612: checking for an rpath option" >&5
13613echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
13614case $cf_cv_system_name in #(vi
13615irix*) #(vi
13616	if test "$GCC" = yes; then
13617		LD_RPATH_OPT="-Wl,-rpath,"
13618	else
13619		LD_RPATH_OPT="-rpath "
13620	fi
13621	;;
13622linux*|gnu*|k*bsd*-gnu) #(vi
13623	LD_RPATH_OPT="-Wl,-rpath,"
13624	;;
13625openbsd[2-9].*|mirbsd*) #(vi
13626	LD_RPATH_OPT="-Wl,-rpath,"
13627	;;
13628freebsd*) #(vi
13629	LD_RPATH_OPT="-rpath "
13630	;;
13631netbsd*) #(vi
13632	LD_RPATH_OPT="-Wl,-rpath,"
13633	;;
13634osf*|mls+*) #(vi
13635	LD_RPATH_OPT="-rpath "
13636	;;
13637solaris2*) #(vi
13638	LD_RPATH_OPT="-R"
13639	;;
13640*)
13641	;;
13642esac
13643echo "$as_me:13643: result: $LD_RPATH_OPT" >&5
13644echo "${ECHO_T}$LD_RPATH_OPT" >&6
13645
13646case "x$LD_RPATH_OPT" in #(vi
13647x-R*)
13648	echo "$as_me:13648: checking if we need a space after rpath option" >&5
13649echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
13650	cf_save_LIBS="$LIBS"
13651	LIBS="${LD_RPATH_OPT}$libdir $LIBS"
13652	cat >conftest.$ac_ext <<_ACEOF
13653#line 13653 "configure"
13654#include "confdefs.h"
13655
13656int
13657main ()
13658{
13659
13660  ;
13661  return 0;
13662}
13663_ACEOF
13664rm -f conftest.$ac_objext conftest$ac_exeext
13665if { (eval echo "$as_me:13665: \"$ac_link\"") >&5
13666  (eval $ac_link) 2>&5
13667  ac_status=$?
13668  echo "$as_me:13668: \$? = $ac_status" >&5
13669  (exit $ac_status); } &&
13670         { ac_try='test -s conftest$ac_exeext'
13671  { (eval echo "$as_me:13671: \"$ac_try\"") >&5
13672  (eval $ac_try) 2>&5
13673  ac_status=$?
13674  echo "$as_me:13674: \$? = $ac_status" >&5
13675  (exit $ac_status); }; }; then
13676  cf_rpath_space=no
13677else
13678  echo "$as_me: failed program was:" >&5
13679cat conftest.$ac_ext >&5
13680cf_rpath_space=yes
13681fi
13682rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13683	LIBS="$cf_save_LIBS"
13684	echo "$as_me:13684: result: $cf_rpath_space" >&5
13685echo "${ECHO_T}$cf_rpath_space" >&6
13686	test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
13687	;;
13688esac
13689
13690echo "$as_me:13690: checking if rpath-hack should be disabled" >&5
13691echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
13692
13693# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
13694if test "${enable_rpath_hack+set}" = set; then
13695  enableval="$enable_rpath_hack"
13696  test "$enableval" != no && enableval=yes
13697  if test "$enableval" != "yes" ; then
13698    cf_disable_rpath_hack=yes
13699  else
13700    cf_disable_rpath_hack=no
13701  fi
13702else
13703  enableval=yes
13704  cf_disable_rpath_hack=no
13705
13706fi;
13707echo "$as_me:13707: result: $cf_disable_rpath_hack" >&5
13708echo "${ECHO_T}$cf_disable_rpath_hack" >&6
13709if test "$cf_disable_rpath_hack" = no ; then
13710
13711echo "$as_me:13711: checking for updated LDFLAGS" >&5
13712echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
13713if test -n "$LD_RPATH_OPT" ; then
13714	echo "$as_me:13714: result: maybe" >&5
13715echo "${ECHO_T}maybe" >&6
13716
13717	for ac_prog in ldd
13718do
13719  # Extract the first word of "$ac_prog", so it can be a program name with args.
13720set dummy $ac_prog; ac_word=$2
13721echo "$as_me:13721: checking for $ac_word" >&5
13722echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13723if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
13724  echo $ECHO_N "(cached) $ECHO_C" >&6
13725else
13726  if test -n "$cf_ldd_prog"; then
13727  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
13728else
13729  ac_save_IFS=$IFS; IFS=$ac_path_separator
13730ac_dummy="$PATH"
13731for ac_dir in $ac_dummy; do
13732  IFS=$ac_save_IFS
13733  test -z "$ac_dir" && ac_dir=.
13734  $as_executable_p "$ac_dir/$ac_word" || continue
13735ac_cv_prog_cf_ldd_prog="$ac_prog"
13736echo "$as_me:13736: found $ac_dir/$ac_word" >&5
13737break
13738done
13739
13740fi
13741fi
13742cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
13743if test -n "$cf_ldd_prog"; then
13744  echo "$as_me:13744: result: $cf_ldd_prog" >&5
13745echo "${ECHO_T}$cf_ldd_prog" >&6
13746else
13747  echo "$as_me:13747: result: no" >&5
13748echo "${ECHO_T}no" >&6
13749fi
13750
13751  test -n "$cf_ldd_prog" && break
13752done
13753test -n "$cf_ldd_prog" || cf_ldd_prog="no"
13754
13755	cf_rpath_list="/usr/lib /lib"
13756	if test "$cf_ldd_prog" != no
13757	then
13758		cf_rpath_oops=
13759
13760cat >conftest.$ac_ext <<_ACEOF
13761#line 13761 "configure"
13762#include "confdefs.h"
13763#include <stdio.h>
13764int
13765main ()
13766{
13767printf("Hello");
13768  ;
13769  return 0;
13770}
13771_ACEOF
13772rm -f conftest.$ac_objext conftest$ac_exeext
13773if { (eval echo "$as_me:13773: \"$ac_link\"") >&5
13774  (eval $ac_link) 2>&5
13775  ac_status=$?
13776  echo "$as_me:13776: \$? = $ac_status" >&5
13777  (exit $ac_status); } &&
13778         { ac_try='test -s conftest$ac_exeext'
13779  { (eval echo "$as_me:13779: \"$ac_try\"") >&5
13780  (eval $ac_try) 2>&5
13781  ac_status=$?
13782  echo "$as_me:13782: \$? = $ac_status" >&5
13783  (exit $ac_status); }; }; then
13784  cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
13785		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
13786else
13787  echo "$as_me: failed program was:" >&5
13788cat conftest.$ac_ext >&5
13789fi
13790rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13791
13792		# If we passed the link-test, but get a "not found" on a given library,
13793		# this could be due to inept reconfiguration of gcc to make it only
13794		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
13795		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
13796		# /usr/local libraries.
13797		if test -n "$cf_rpath_oops"
13798		then
13799			for cf_rpath_src in $cf_rpath_oops
13800			do
13801				for cf_rpath_dir in \
13802					/usr/local \
13803					/usr/pkg \
13804					/opt/sfw
13805				do
13806					if test -f $cf_rpath_dir/lib/$cf_rpath_src
13807					then
13808						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
13809
13810echo "${as_me:-configure}:13810: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
13811
13812						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
13813						break
13814					fi
13815				done
13816			done
13817		fi
13818	fi
13819
13820	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
13821
13822echo "${as_me:-configure}:13822: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
13823
13824test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
13825
13826echo "${as_me:-configure}:13826: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
13827
13828cf_rpath_dst=
13829for cf_rpath_src in $LDFLAGS
13830do
13831	case $cf_rpath_src in #(vi
13832	-L*) #(vi
13833
13834		# check if this refers to a directory which we will ignore
13835		cf_rpath_skip=no
13836		if test -n "$cf_rpath_list"
13837		then
13838			for cf_rpath_item in $cf_rpath_list
13839			do
13840				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
13841				then
13842					cf_rpath_skip=yes
13843					break
13844				fi
13845			done
13846		fi
13847
13848		if test "$cf_rpath_skip" = no
13849		then
13850			# transform the option
13851			if test "$LD_RPATH_OPT" = "-R " ; then
13852				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
13853			else
13854				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
13855			fi
13856
13857			# if we have not already added this, add it now
13858			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
13859			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
13860			then
13861				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
13862
13863echo "${as_me:-configure}:13863: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
13864
13865				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
13866			fi
13867		fi
13868		;;
13869	esac
13870	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
13871done
13872LDFLAGS=$cf_rpath_dst
13873
13874test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
13875
13876echo "${as_me:-configure}:13876: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
13877
13878test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
13879
13880echo "${as_me:-configure}:13880: testing ...checking LIBS $LIBS ..." 1>&5
13881
13882cf_rpath_dst=
13883for cf_rpath_src in $LIBS
13884do
13885	case $cf_rpath_src in #(vi
13886	-L*) #(vi
13887
13888		# check if this refers to a directory which we will ignore
13889		cf_rpath_skip=no
13890		if test -n "$cf_rpath_list"
13891		then
13892			for cf_rpath_item in $cf_rpath_list
13893			do
13894				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
13895				then
13896					cf_rpath_skip=yes
13897					break
13898				fi
13899			done
13900		fi
13901
13902		if test "$cf_rpath_skip" = no
13903		then
13904			# transform the option
13905			if test "$LD_RPATH_OPT" = "-R " ; then
13906				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
13907			else
13908				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
13909			fi
13910
13911			# if we have not already added this, add it now
13912			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
13913			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
13914			then
13915				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
13916
13917echo "${as_me:-configure}:13917: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
13918
13919				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
13920			fi
13921		fi
13922		;;
13923	esac
13924	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
13925done
13926LIBS=$cf_rpath_dst
13927
13928test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
13929
13930echo "${as_me:-configure}:13930: testing ...checked LIBS $LIBS ..." 1>&5
13931
13932	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
13933
13934echo "${as_me:-configure}:13934: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
13935
13936fi
13937
13938fi
13939
13940ac_config_files="$ac_config_files dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE samples/install/makefile"
13941ac_config_commands="$ac_config_commands default"
13942cat >confcache <<\_ACEOF
13943# This file is a shell script that caches the results of configure
13944# tests run on this system so they can be shared between configure
13945# scripts and configure runs, see configure's option --config-cache.
13946# It is not useful on other systems.  If it contains results you don't
13947# want to keep, you may remove or edit it.
13948#
13949# config.status only pays attention to the cache file if you give it
13950# the --recheck option to rerun configure.
13951#
13952# `ac_cv_env_foo' variables (set or unset) will be overriden when
13953# loading this file, other *unset* `ac_cv_foo' will be assigned the
13954# following values.
13955
13956_ACEOF
13957
13958# The following way of writing the cache mishandles newlines in values,
13959# but we know of no workaround that is simple, portable, and efficient.
13960# So, don't put newlines in cache variables' values.
13961# Ultrix sh set writes to stderr and can't be redirected directly,
13962# and sets the high bit in the cache file unless we assign to the vars.
13963{
13964  (set) 2>&1 |
13965    case `(ac_space=' '; set | grep ac_space) 2>&1` in
13966    *ac_space=\ *)
13967      # `set' does not quote correctly, so add quotes (double-quote
13968      # substitution turns \\\\ into \\, and sed turns \\ into \).
13969      sed -n \
13970        "s/'/'\\\\''/g;
13971    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13972      ;;
13973    *)
13974      # `set' quotes correctly as required by POSIX, so do not add quotes.
13975      sed -n \
13976        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
13977      ;;
13978    esac;
13979} |
13980  sed '
13981     t clear
13982     : clear
13983     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13984     t end
13985     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13986     : end' >>confcache
13987if cmp -s $cache_file confcache; then :; else
13988  if test -w $cache_file; then
13989    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
13990    cat confcache >$cache_file
13991  else
13992    echo "not updating unwritable cache $cache_file"
13993  fi
13994fi
13995rm -f confcache
13996
13997test "x$prefix" = xNONE && prefix=$ac_default_prefix
13998# Let make expand exec_prefix.
13999test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14000
14001# VPATH may cause trouble with some makes, so we remove $(srcdir),
14002# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14003# trailing colons and then remove the whole line if VPATH becomes empty
14004# (actually we leave an empty line to preserve line numbers).
14005if test "x$srcdir" = x.; then
14006  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
14007s/:*\$(srcdir):*/:/;
14008s/:*\${srcdir}:*/:/;
14009s/:*@srcdir@:*/:/;
14010s/^\([^=]*=[ 	]*\):*/\1/;
14011s/:*$//;
14012s/^[^=]*=[ 	]*$//;
14013}'
14014fi
14015
14016DEFS=-DHAVE_CONFIG_H
14017
14018: ${CONFIG_STATUS=./config.status}
14019ac_clean_files_save=$ac_clean_files
14020ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14021{ echo "$as_me:14021: creating $CONFIG_STATUS" >&5
14022echo "$as_me: creating $CONFIG_STATUS" >&6;}
14023cat >$CONFIG_STATUS <<_ACEOF
14024#! $SHELL
14025# Generated automatically by configure.
14026# Run this file to recreate the current configuration.
14027# Compiler output produced by configure, useful for debugging
14028# configure, is in config.log if it exists.
14029
14030debug=false
14031SHELL=\${CONFIG_SHELL-$SHELL}
14032ac_cs_invocation="\$0 \$@"
14033
14034_ACEOF
14035
14036cat >>$CONFIG_STATUS <<\_ACEOF
14037# Be Bourne compatible
14038if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14039  emulate sh
14040  NULLCMD=:
14041elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14042  set -o posix
14043fi
14044
14045# Name of the executable.
14046as_me=`echo "$0" |sed 's,.*[\\/],,'`
14047
14048if expr a : '\(a\)' >/dev/null 2>&1; then
14049  as_expr=expr
14050else
14051  as_expr=false
14052fi
14053
14054rm -f conf$$ conf$$.exe conf$$.file
14055echo >conf$$.file
14056if ln -s conf$$.file conf$$ 2>/dev/null; then
14057  # We could just check for DJGPP; but this test a) works b) is more generic
14058  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14059  if test -f conf$$.exe; then
14060    # Don't use ln at all; we don't have any links
14061    as_ln_s='cp -p'
14062  else
14063    as_ln_s='ln -s'
14064  fi
14065elif ln conf$$.file conf$$ 2>/dev/null; then
14066  as_ln_s=ln
14067else
14068  as_ln_s='cp -p'
14069fi
14070rm -f conf$$ conf$$.exe conf$$.file
14071
14072as_executable_p="test -f"
14073
14074# Support unset when possible.
14075if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
14076  as_unset=unset
14077else
14078  as_unset=false
14079fi
14080
14081# NLS nuisances.
14082$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
14083$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
14084$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
14085$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
14086$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
14087$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
14088$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
14089$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
14090
14091# IFS
14092# We need space, tab and new line, in precisely that order.
14093as_nl='
14094'
14095IFS=" 	$as_nl"
14096
14097# CDPATH.
14098$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
14099
14100exec 6>&1
14101
14102_ACEOF
14103
14104# Files that config.status was made for.
14105if test -n "$ac_config_files"; then
14106  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14107fi
14108
14109if test -n "$ac_config_headers"; then
14110  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14111fi
14112
14113if test -n "$ac_config_links"; then
14114  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14115fi
14116
14117if test -n "$ac_config_commands"; then
14118  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14119fi
14120
14121cat >>$CONFIG_STATUS <<\EOF
14122
14123ac_cs_usage="\
14124\`$as_me' instantiates files from templates according to the
14125current configuration.
14126
14127Usage: $0 [OPTIONS] [FILE]...
14128
14129  -h, --help       print this help, then exit
14130  -V, --version    print version number, then exit
14131  -d, --debug      don't remove temporary files
14132      --recheck    update $as_me by reconfiguring in the same conditions
14133  --file=FILE[:TEMPLATE]
14134                   instantiate the configuration file FILE
14135  --header=FILE[:TEMPLATE]
14136                   instantiate the configuration header FILE
14137
14138Configuration files:
14139$config_files
14140
14141Configuration headers:
14142$config_headers
14143
14144Configuration commands:
14145$config_commands
14146
14147Report bugs to <dickey@invisible-island.net>."
14148EOF
14149
14150cat >>$CONFIG_STATUS <<EOF
14151ac_cs_version="\\
14152config.status
14153configured by $0, generated by GNU Autoconf 2.52.20101002,
14154  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14155
14156Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
14157Free Software Foundation, Inc.
14158This config.status script is free software; the Free Software Foundation
14159gives unlimited permission to copy, distribute and modify it."
14160srcdir=$srcdir
14161INSTALL="$INSTALL"
14162EOF
14163
14164cat >>$CONFIG_STATUS <<\EOF
14165# If no file are specified by the user, then we need to provide default
14166# value.  By we need to know if files were specified by the user.
14167ac_need_defaults=:
14168while test $# != 0
14169do
14170  case $1 in
14171  --*=*)
14172    ac_option=`expr "x$1" : 'x\([^=]*\)='`
14173    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14174    shift
14175    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
14176    shift
14177    ;;
14178  -*);;
14179  *) # This is not an option, so the user has probably given explicit
14180     # arguments.
14181     ac_need_defaults=false;;
14182  esac
14183
14184  case $1 in
14185  # Handling of the options.
14186EOF
14187cat >>$CONFIG_STATUS <<EOF
14188  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14189    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
14190    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
14191EOF
14192cat >>$CONFIG_STATUS <<\EOF
14193  --version | --vers* | -V )
14194    echo "$ac_cs_version"; exit 0 ;;
14195  --he | --h)
14196    # Conflict between --help and --header
14197    { { echo "$as_me:14197: error: ambiguous option: $1
14198Try \`$0 --help' for more information." >&5
14199echo "$as_me: error: ambiguous option: $1
14200Try \`$0 --help' for more information." >&2;}
14201   { (exit 1); exit 1; }; };;
14202  --help | --hel | -h )
14203    echo "$ac_cs_usage"; exit 0 ;;
14204  --debug | --d* | -d )
14205    debug=: ;;
14206  --file | --fil | --fi | --f )
14207    shift
14208    CONFIG_FILES="$CONFIG_FILES $1"
14209    ac_need_defaults=false;;
14210  --header | --heade | --head | --hea )
14211    shift
14212    CONFIG_HEADERS="$CONFIG_HEADERS $1"
14213    ac_need_defaults=false;;
14214
14215  # This is an error.
14216  -*) { { echo "$as_me:14216: error: unrecognized option: $1
14217Try \`$0 --help' for more information." >&5
14218echo "$as_me: error: unrecognized option: $1
14219Try \`$0 --help' for more information." >&2;}
14220   { (exit 1); exit 1; }; } ;;
14221
14222  *) ac_config_targets="$ac_config_targets $1" ;;
14223
14224  esac
14225  shift
14226done
14227
14228exec 5>>config.log
14229cat >&5 << _ACEOF
14230
14231## ----------------------- ##
14232## Running config.status.  ##
14233## ----------------------- ##
14234
14235This file was extended by $as_me 2.52.20101002, executed with
14236  CONFIG_FILES    = $CONFIG_FILES
14237  CONFIG_HEADERS  = $CONFIG_HEADERS
14238  CONFIG_LINKS    = $CONFIG_LINKS
14239  CONFIG_COMMANDS = $CONFIG_COMMANDS
14240  > $ac_cs_invocation
14241on `(hostname || uname -n) 2>/dev/null | sed 1q`
14242
14243_ACEOF
14244EOF
14245
14246cat >>$CONFIG_STATUS <<EOF
14247#
14248# INIT-COMMANDS section.
14249#
14250
14251EOF
14252
14253cat >>$CONFIG_STATUS <<\EOF
14254for ac_config_target in $ac_config_targets
14255do
14256  case "$ac_config_target" in
14257  # Handling of arguments.
14258  "dialog-config" ) CONFIG_FILES="$CONFIG_FILES dialog-config" ;;
14259  "makefile" ) CONFIG_FILES="$CONFIG_FILES makefile" ;;
14260  "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
14261  "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
14262  "samples/install/makefile" ) CONFIG_FILES="$CONFIG_FILES samples/install/makefile" ;;
14263  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
14264  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14265  "dlg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS dlg_config.h:config.hin" ;;
14266  *) { { echo "$as_me:14266: error: invalid argument: $ac_config_target" >&5
14267echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14268   { (exit 1); exit 1; }; };;
14269  esac
14270done
14271
14272# If the user did not use the arguments to specify the items to instantiate,
14273# then the envvar interface is used.  Set only those that are not.
14274# We use the long form for the default assignment because of an extremely
14275# bizarre bug on SunOS 4.1.3.
14276if $ac_need_defaults; then
14277  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14278  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14279  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14280fi
14281
14282# Create a temporary directory, and hook for its removal unless debugging.
14283$debug ||
14284{
14285  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
14286  trap '{ (exit 1); exit 1; }' 1 2 13 15
14287}
14288
14289# Create a (secure) tmp directory for tmp files.
14290: ${TMPDIR=/tmp}
14291{
14292  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
14293  test -n "$tmp" && test -d "$tmp"
14294}  ||
14295{
14296  tmp=$TMPDIR/cs$$-$RANDOM
14297  (umask 077 && mkdir $tmp)
14298} ||
14299{
14300   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
14301   { (exit 1); exit 1; }
14302}
14303
14304EOF
14305
14306cat >>$CONFIG_STATUS <<EOF
14307
14308#
14309# CONFIG_FILES section.
14310#
14311
14312# No need to generate the scripts if there are no CONFIG_FILES.
14313# This happens for instance when ./config.status config.h
14314if test -n "\$CONFIG_FILES"; then
14315  # Protect against being on the right side of a sed subst in config.status.
14316  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
14317   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
14318s,@SHELL@,$SHELL,;t t
14319s,@exec_prefix@,$exec_prefix,;t t
14320s,@prefix@,$prefix,;t t
14321s,@program_transform_name@,$program_transform_name,;t t
14322s,@bindir@,$bindir,;t t
14323s,@sbindir@,$sbindir,;t t
14324s,@libexecdir@,$libexecdir,;t t
14325s,@datadir@,$datadir,;t t
14326s,@sysconfdir@,$sysconfdir,;t t
14327s,@sharedstatedir@,$sharedstatedir,;t t
14328s,@localstatedir@,$localstatedir,;t t
14329s,@libdir@,$libdir,;t t
14330s,@includedir@,$includedir,;t t
14331s,@oldincludedir@,$oldincludedir,;t t
14332s,@infodir@,$infodir,;t t
14333s,@mandir@,$mandir,;t t
14334s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
14335s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
14336s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
14337s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
14338s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
14339s,@build_alias@,$build_alias,;t t
14340s,@host_alias@,$host_alias,;t t
14341s,@target_alias@,$target_alias,;t t
14342s,@ECHO_C@,$ECHO_C,;t t
14343s,@ECHO_N@,$ECHO_N,;t t
14344s,@ECHO_T@,$ECHO_T,;t t
14345s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
14346s,@DEFS@,$DEFS,;t t
14347s,@LIBS@,$LIBS,;t t
14348s,@DESTDIR@,$DESTDIR,;t t
14349s,@CC@,$CC,;t t
14350s,@CFLAGS@,$CFLAGS,;t t
14351s,@LDFLAGS@,$LDFLAGS,;t t
14352s,@CPPFLAGS@,$CPPFLAGS,;t t
14353s,@ac_ct_CC@,$ac_ct_CC,;t t
14354s,@EXEEXT@,$EXEEXT,;t t
14355s,@OBJEXT@,$OBJEXT,;t t
14356s,@CPP@,$CPP,;t t
14357s,@SET_MAKE@,$SET_MAKE,;t t
14358s,@RANLIB@,$RANLIB,;t t
14359s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
14360s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
14361s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
14362s,@INSTALL_DATA@,$INSTALL_DATA,;t t
14363s,@AR@,$AR,;t t
14364s,@ac_ct_AR@,$ac_ct_AR,;t t
14365s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
14366s,@CTAGS@,$CTAGS,;t t
14367s,@ETAGS@,$ETAGS,;t t
14368s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
14369s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
14370s,@ECHO_LT@,$ECHO_LT,;t t
14371s,@ECHO_LD@,$ECHO_LD,;t t
14372s,@RULE_CC@,$RULE_CC,;t t
14373s,@SHOW_CC@,$SHOW_CC,;t t
14374s,@ECHO_CC@,$ECHO_CC,;t t
14375s,@build@,$build,;t t
14376s,@build_cpu@,$build_cpu,;t t
14377s,@build_vendor@,$build_vendor,;t t
14378s,@build_os@,$build_os,;t t
14379s,@host@,$host,;t t
14380s,@host_cpu@,$host_cpu,;t t
14381s,@host_vendor@,$host_vendor,;t t
14382s,@host_os@,$host_os,;t t
14383s,@PROG_EXT@,$PROG_EXT,;t t
14384s,@LIB_PREFIX@,$LIB_PREFIX,;t t
14385s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
14386s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
14387s,@VERSION@,$VERSION,;t t
14388s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
14389s,@VERSION_MINOR@,$VERSION_MINOR,;t t
14390s,@VERSION_PATCH@,$VERSION_PATCH,;t t
14391s,@PACKAGE@,$PACKAGE,;t t
14392s,@SUB_INC@,$SUB_INC,;t t
14393s,@CONFIG_H@,$CONFIG_H,;t t
14394s,@ALLOCA@,$ALLOCA,;t t
14395s,@GLIBC21@,$GLIBC21,;t t
14396s,@LIBICONV@,$LIBICONV,;t t
14397s,@USE_NLS@,$USE_NLS,;t t
14398s,@MSGFMT@,$MSGFMT,;t t
14399s,@GMSGFMT@,$GMSGFMT,;t t
14400s,@XGETTEXT@,$XGETTEXT,;t t
14401s,@INTLBISON@,$INTLBISON,;t t
14402s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
14403s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
14404s,@CATALOGS@,$CATALOGS,;t t
14405s,@CATOBJEXT@,$CATOBJEXT,;t t
14406s,@GMOFILES@,$GMOFILES,;t t
14407s,@INTLLIBS@,$INTLLIBS,;t t
14408s,@INTLOBJS@,$INTLOBJS,;t t
14409s,@POFILES@,$POFILES,;t t
14410s,@POSUB@,$POSUB,;t t
14411s,@DATADIRNAME@,$DATADIRNAME,;t t
14412s,@INSTOBJEXT@,$INSTOBJEXT,;t t
14413s,@GENCAT@,$GENCAT,;t t
14414s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
14415s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
14416s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
14417s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
14418s,@INTLDIR_MAKE@,$INTLDIR_MAKE,;t t
14419s,@GT_YES@,$GT_YES,;t t
14420s,@GT_NO@,$GT_NO,;t t
14421s,@LINK_PREFIX@,$LINK_PREFIX,;t t
14422s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
14423s,@LIBTOOL@,$LIBTOOL,;t t
14424s,@LT_UNDEF@,$LT_UNDEF,;t t
14425s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
14426s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
14427s,@LIB_CREATE@,$LIB_CREATE,;t t
14428s,@LIB_OBJECT@,$LIB_OBJECT,;t t
14429s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
14430s,@LIB_PREP@,$LIB_PREP,;t t
14431s,@LIB_CLEAN@,$LIB_CLEAN,;t t
14432s,@LIB_COMPILE@,$LIB_COMPILE,;t t
14433s,@LIB_LINK@,$LIB_LINK,;t t
14434s,@LIB_INSTALL@,$LIB_INSTALL,;t t
14435s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
14436s,@LIBTOOL_MAKE@,$LIBTOOL_MAKE,;t t
14437s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
14438s,@EXTRAOBJS@,$EXTRAOBJS,;t t
14439s,@PACKAGE_PREFIX@,$PACKAGE_PREFIX,;t t
14440s,@PACKAGE_CONFIG@,$PACKAGE_CONFIG,;t t
14441s,@cf_ldd_prog@,$cf_ldd_prog,;t t
14442s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
14443CEOF
14444
14445EOF
14446
14447  cat >>$CONFIG_STATUS <<\EOF
14448  # Split the substitutions into bite-sized pieces for seds with
14449  # small command number limits, like on Digital OSF/1 and HP-UX.
14450  ac_max_sed_lines=48
14451  ac_sed_frag=1 # Number of current file.
14452  ac_beg=1 # First line for current file.
14453  ac_end=$ac_max_sed_lines # Line after last line for current file.
14454  ac_more_lines=:
14455  ac_sed_cmds=
14456  while $ac_more_lines; do
14457    if test $ac_beg -gt 1; then
14458      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14459    else
14460      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14461    fi
14462    if test ! -s $tmp/subs.frag; then
14463      ac_more_lines=false
14464    else
14465      # The purpose of the label and of the branching condition is to
14466      # speed up the sed processing (if there are no `@' at all, there
14467      # is no need to browse any of the substitutions).
14468      # These are the two extra sed commands mentioned above.
14469      (echo ':t
14470  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
14471      if test -z "$ac_sed_cmds"; then
14472  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
14473      else
14474  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
14475      fi
14476      ac_sed_frag=`expr $ac_sed_frag + 1`
14477      ac_beg=$ac_end
14478      ac_end=`expr $ac_end + $ac_max_sed_lines`
14479    fi
14480  done
14481  if test -z "$ac_sed_cmds"; then
14482    ac_sed_cmds=cat
14483  fi
14484fi # test -n "$CONFIG_FILES"
14485
14486EOF
14487cat >>$CONFIG_STATUS <<\EOF
14488for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
14489  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14490  case $ac_file in
14491  - | *:- | *:-:* ) # input from stdin
14492        cat >$tmp/stdin
14493        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14494        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14495  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14496        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14497  * )   ac_file_in=$ac_file.in ;;
14498  esac
14499
14500  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
14501  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14502         X"$ac_file" : 'X\(//\)[^/]' \| \
14503         X"$ac_file" : 'X\(//\)$' \| \
14504         X"$ac_file" : 'X\(/\)' \| \
14505         .     : '\(.\)' 2>/dev/null ||
14506echo X"$ac_file" |
14507    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14508  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14509  	  /^X\(\/\/\)$/{ s//\1/; q; }
14510  	  /^X\(\/\).*/{ s//\1/; q; }
14511  	  s/.*/./; q'`
14512  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14513    { case "$ac_dir" in
14514  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14515  *)                      as_incr_dir=.;;
14516esac
14517as_dummy="$ac_dir"
14518for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14519  case $as_mkdir_dir in
14520    # Skip DOS drivespec
14521    ?:) as_incr_dir=$as_mkdir_dir ;;
14522    *)
14523      as_incr_dir=$as_incr_dir/$as_mkdir_dir
14524      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14525    ;;
14526  esac
14527done; }
14528
14529    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
14530    # A "../" for each directory in $ac_dir_suffix.
14531    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
14532  else
14533    ac_dir_suffix= ac_dots=
14534  fi
14535
14536  case $srcdir in
14537  .)  ac_srcdir=.
14538      if test -z "$ac_dots"; then
14539         ac_top_srcdir=.
14540      else
14541         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
14542      fi ;;
14543  [\\/]* | ?:[\\/]* )
14544      ac_srcdir=$srcdir$ac_dir_suffix;
14545      ac_top_srcdir=$srcdir ;;
14546  *) # Relative path.
14547    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
14548    ac_top_srcdir=$ac_dots$srcdir ;;
14549  esac
14550
14551  case $INSTALL in
14552  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
14553  *) ac_INSTALL=$ac_dots$INSTALL ;;
14554  esac
14555
14556  if test x"$ac_file" != x-; then
14557    { echo "$as_me:14557: creating $ac_file" >&5
14558echo "$as_me: creating $ac_file" >&6;}
14559    rm -f "$ac_file"
14560  fi
14561  # Let's still pretend it is `configure' which instantiates (i.e., don't
14562  # use $as_me), people would be surprised to read:
14563  #    /* config.h.  Generated automatically by config.status.  */
14564  configure_input="Generated automatically from `echo $ac_file_in |
14565                                                 sed 's,.*/,,'` by configure."
14566
14567  # First look for the input files in the build tree, otherwise in the
14568  # src tree.
14569  ac_file_inputs=`IFS=:
14570    for f in $ac_file_in; do
14571      case $f in
14572      -) echo $tmp/stdin ;;
14573      [\\/$]*)
14574         # Absolute (can't be DOS-style, as IFS=:)
14575         test -f "$f" || { { echo "$as_me:14575: error: cannot find input file: $f" >&5
14576echo "$as_me: error: cannot find input file: $f" >&2;}
14577   { (exit 1); exit 1; }; }
14578         echo $f;;
14579      *) # Relative
14580         if test -f "$f"; then
14581           # Build tree
14582           echo $f
14583         elif test -f "$srcdir/$f"; then
14584           # Source tree
14585           echo $srcdir/$f
14586         else
14587           # /dev/null tree
14588           { { echo "$as_me:14588: error: cannot find input file: $f" >&5
14589echo "$as_me: error: cannot find input file: $f" >&2;}
14590   { (exit 1); exit 1; }; }
14591         fi;;
14592      esac
14593    done` || { (exit 1); exit 1; }
14594EOF
14595cat >>$CONFIG_STATUS <<EOF
14596  sed "$ac_vpsub
14597$extrasub
14598EOF
14599cat >>$CONFIG_STATUS <<\EOF
14600:t
14601/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14602s,@configure_input@,$configure_input,;t t
14603s,@srcdir@,$ac_srcdir,;t t
14604s,@top_srcdir@,$ac_top_srcdir,;t t
14605s,@INSTALL@,$ac_INSTALL,;t t
14606" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
14607  rm -f $tmp/stdin
14608  if test x"$ac_file" != x-; then
14609    mv $tmp/out $ac_file
14610  else
14611    cat $tmp/out
14612    rm -f $tmp/out
14613  fi
14614
14615done
14616EOF
14617cat >>$CONFIG_STATUS <<\EOF
14618
14619#
14620# CONFIG_HEADER section.
14621#
14622
14623# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14624# NAME is the cpp macro being defined and VALUE is the value it is being given.
14625#
14626# ac_d sets the value in "#define NAME VALUE" lines.
14627ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
14628ac_dB='[ 	].*$,\1#\2'
14629ac_dC=' '
14630ac_dD=',;t'
14631# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14632ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
14633ac_iB='\([ 	]\),\1#\2define\3'
14634ac_iC=' '
14635ac_iD='\4,;t'
14636# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14637ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
14638ac_uB='$,\1#\2define\3'
14639ac_uC=' '
14640ac_uD=',;t'
14641
14642for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
14643  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14644  case $ac_file in
14645  - | *:- | *:-:* ) # input from stdin
14646        cat >$tmp/stdin
14647        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14648        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14649  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14650        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14651  * )   ac_file_in=$ac_file.in ;;
14652  esac
14653
14654  test x"$ac_file" != x- && { echo "$as_me:14654: creating $ac_file" >&5
14655echo "$as_me: creating $ac_file" >&6;}
14656
14657  # First look for the input files in the build tree, otherwise in the
14658  # src tree.
14659  ac_file_inputs=`IFS=:
14660    for f in $ac_file_in; do
14661      case $f in
14662      -) echo $tmp/stdin ;;
14663      [\\/$]*)
14664         # Absolute (can't be DOS-style, as IFS=:)
14665         test -f "$f" || { { echo "$as_me:14665: error: cannot find input file: $f" >&5
14666echo "$as_me: error: cannot find input file: $f" >&2;}
14667   { (exit 1); exit 1; }; }
14668         echo $f;;
14669      *) # Relative
14670         if test -f "$f"; then
14671           # Build tree
14672           echo $f
14673         elif test -f "$srcdir/$f"; then
14674           # Source tree
14675           echo $srcdir/$f
14676         else
14677           # /dev/null tree
14678           { { echo "$as_me:14678: error: cannot find input file: $f" >&5
14679echo "$as_me: error: cannot find input file: $f" >&2;}
14680   { (exit 1); exit 1; }; }
14681         fi;;
14682      esac
14683    done` || { (exit 1); exit 1; }
14684  # Remove the trailing spaces.
14685  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
14686
14687EOF
14688
14689# Transform confdefs.h into a list of #define's.  We won't use it as a sed
14690# script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
14691# be either 'cat' or 'sort'.
14692sort -u confdefs.h | uniq >conftest.vals
14693
14694# Break up conftest.vals because some shells have a limit on
14695# the size of here documents, and old seds have small limits too.
14696
14697rm -f conftest.tail
14698echo '  rm -f conftest.frag' >> $CONFIG_STATUS
14699while grep . conftest.vals >/dev/null
14700do
14701  # Write chunks of a limited-size here document to conftest.frag.
14702  echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
14703  sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
14704  echo 'CEOF' >> $CONFIG_STATUS
14705  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14706  rm -f conftest.vals
14707  mv conftest.tail conftest.vals
14708done
14709rm -f conftest.vals
14710
14711# Run sed to substitute the contents of conftest.frag into $tmp/in at the
14712# marker @DEFS@.
14713echo '  cat >> conftest.edit <<CEOF
14714/@DEFS@/r conftest.frag
14715/@DEFS@/d
14716CEOF
14717sed -f conftest.edit $tmp/in > $tmp/out
14718rm -f $tmp/in
14719mv $tmp/out $tmp/in
14720rm -f conftest.edit conftest.frag
14721' >> $CONFIG_STATUS
14722
14723cat >>$CONFIG_STATUS <<\EOF
14724  # Let's still pretend it is `configure' which instantiates (i.e., don't
14725  # use $as_me), people would be surprised to read:
14726  #    /* config.h.  Generated automatically by config.status.  */
14727  if test x"$ac_file" = x-; then
14728    echo "/* Generated automatically by configure.  */" >$tmp/config.h
14729  else
14730    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
14731  fi
14732  cat $tmp/in >>$tmp/config.h
14733  rm -f $tmp/in
14734  if test x"$ac_file" != x-; then
14735    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
14736      { echo "$as_me:14736: $ac_file is unchanged" >&5
14737echo "$as_me: $ac_file is unchanged" >&6;}
14738    else
14739      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14740         X"$ac_file" : 'X\(//\)[^/]' \| \
14741         X"$ac_file" : 'X\(//\)$' \| \
14742         X"$ac_file" : 'X\(/\)' \| \
14743         .     : '\(.\)' 2>/dev/null ||
14744echo X"$ac_file" |
14745    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14746  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14747  	  /^X\(\/\/\)$/{ s//\1/; q; }
14748  	  /^X\(\/\).*/{ s//\1/; q; }
14749  	  s/.*/./; q'`
14750      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14751        { case "$ac_dir" in
14752  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14753  *)                      as_incr_dir=.;;
14754esac
14755as_dummy="$ac_dir"
14756for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14757  case $as_mkdir_dir in
14758    # Skip DOS drivespec
14759    ?:) as_incr_dir=$as_mkdir_dir ;;
14760    *)
14761      as_incr_dir=$as_incr_dir/$as_mkdir_dir
14762      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14763    ;;
14764  esac
14765done; }
14766
14767      fi
14768      rm -f $ac_file
14769      mv $tmp/config.h $ac_file
14770    fi
14771  else
14772    cat $tmp/config.h
14773    rm -f $tmp/config.h
14774  fi
14775done
14776EOF
14777cat >>$CONFIG_STATUS <<\EOF
14778#
14779# CONFIG_COMMANDS section.
14780#
14781for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
14782  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
14783  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
14784
14785  case $ac_dest in
14786    default-1 ) for ac_file in $CONFIG_FILES; do
14787
14788      # Support "outfile[:infile[:infile...]]"
14789      case "$ac_file" in
14790        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14791      esac
14792
14793      # PO directories have a Makefile.in generated from Makefile.inn.
14794      case "$ac_file" in */[Mm]akefile.in)
14795        # Adjust a relative srcdir.
14796        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
14797        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
14798        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
14799        ac_base=`basename $ac_file .in`
14800        # In autoconf-2.13 it is called $ac_given_srcdir.
14801        # In autoconf-2.50 it is called $srcdir.
14802        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
14803
14804        case "$ac_given_srcdir" in
14805          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
14806          /*) top_srcdir="$ac_given_srcdir" ;;
14807          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
14808        esac
14809
14810        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
14811          rm -f "$ac_dir/POTFILES"
14812          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
14813          sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
14814          test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
14815          sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
14816        fi
14817        ;;
14818      esac
14819    done ;;
14820  esac
14821done
14822EOF
14823
14824cat >>$CONFIG_STATUS <<\EOF
14825
14826{ (exit 0); exit 0; }
14827EOF
14828chmod +x $CONFIG_STATUS
14829ac_clean_files=$ac_clean_files_save
14830
14831# configure is writing to config.log, and then calls config.status.
14832# config.status does its own redirection, appending to config.log.
14833# Unfortunately, on DOS this fails, as config.log is still kept open
14834# by configure, so config.status won't be able to write to it; its
14835# output is simply discarded.  So we exec the FD to /dev/null,
14836# effectively closing config.log, so it can be properly (re)opened and
14837# appended to by config.status.  When coming back to configure, we
14838# need to make the FD available again.
14839if test "$no_create" != yes; then
14840  ac_cs_success=:
14841  exec 5>/dev/null
14842  $SHELL $CONFIG_STATUS || ac_cs_success=false
14843  exec 5>>config.log
14844  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14845  # would make configure fail if this is the last instruction.
14846  $ac_cs_success || { (exit 1); exit 1; }
14847fi
14848
14849