xref: /freebsd/contrib/dialog/configure (revision f05cddf9)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20121002.
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'
173datarootdir='${prefix}/share'
174datadir='${datarootdir}'
175sysconfdir='${prefix}/etc'
176sharedstatedir='${prefix}/com'
177localstatedir='${prefix}/var'
178libdir='${exec_prefix}/lib'
179includedir='${prefix}/include'
180oldincludedir='/usr/include'
181infodir='${datarootdir}/info'
182mandir='${datarootdir}/man'
183
184# Identity of this package.
185PACKAGE_NAME=
186PACKAGE_TARNAME=
187PACKAGE_VERSION=
188PACKAGE_STRING=
189PACKAGE_BUGREPORT=
190
191ac_prev=
192for ac_option
193do
194  # If the previous option needs an argument, assign it.
195  if test -n "$ac_prev"; then
196    eval "$ac_prev=\$ac_option"
197    ac_prev=
198    continue
199  fi
200
201  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203  # Accept the important Cygnus configure options, so we can diagnose typos.
204
205  case $ac_option in
206
207  -bindir | --bindir | --bindi | --bind | --bin | --bi)
208    ac_prev=bindir ;;
209  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210    bindir=$ac_optarg ;;
211
212  -build | --build | --buil | --bui | --bu)
213    ac_prev=build_alias ;;
214  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215    build_alias=$ac_optarg ;;
216
217  -cache-file | --cache-file | --cache-fil | --cache-fi \
218  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219    ac_prev=cache_file ;;
220  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222    cache_file=$ac_optarg ;;
223
224  --config-cache | -C)
225    cache_file=config.cache ;;
226
227  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228    ac_prev=datadir ;;
229  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230  | --da=*)
231    datadir=$ac_optarg ;;
232
233  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
234  | --dataroo | --dataro | --datar)
235    ac_prev=datarootdir ;;
236  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
237  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
238    datarootdir=$ac_optarg ;;
239
240  -disable-* | --disable-*)
241    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
242    # Reject names that are not valid shell variable names.
243    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
244      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
245   { (exit 1); exit 1; }; }
246    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
247    eval "enable_$ac_feature=no" ;;
248
249  -enable-* | --enable-*)
250    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
251    # Reject names that are not valid shell variable names.
252    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
253      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
254   { (exit 1); exit 1; }; }
255    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
256    case $ac_option in
257      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
258      *) ac_optarg=yes ;;
259    esac
260    eval "enable_$ac_feature='$ac_optarg'" ;;
261
262  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
263  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
264  | --exec | --exe | --ex)
265    ac_prev=exec_prefix ;;
266  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
267  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
268  | --exec=* | --exe=* | --ex=*)
269    exec_prefix=$ac_optarg ;;
270
271  -gas | --gas | --ga | --g)
272    # Obsolete; use --with-gas.
273    with_gas=yes ;;
274
275  -help | --help | --hel | --he | -h)
276    ac_init_help=long ;;
277  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
278    ac_init_help=recursive ;;
279  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
280    ac_init_help=short ;;
281
282  -host | --host | --hos | --ho)
283    ac_prev=host_alias ;;
284  -host=* | --host=* | --hos=* | --ho=*)
285    host_alias=$ac_optarg ;;
286
287  -includedir | --includedir | --includedi | --included | --include \
288  | --includ | --inclu | --incl | --inc)
289    ac_prev=includedir ;;
290  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
291  | --includ=* | --inclu=* | --incl=* | --inc=*)
292    includedir=$ac_optarg ;;
293
294  -infodir | --infodir | --infodi | --infod | --info | --inf)
295    ac_prev=infodir ;;
296  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
297    infodir=$ac_optarg ;;
298
299  -libdir | --libdir | --libdi | --libd)
300    ac_prev=libdir ;;
301  -libdir=* | --libdir=* | --libdi=* | --libd=*)
302    libdir=$ac_optarg ;;
303
304  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
305  | --libexe | --libex | --libe)
306    ac_prev=libexecdir ;;
307  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
308  | --libexe=* | --libex=* | --libe=*)
309    libexecdir=$ac_optarg ;;
310
311  -localstatedir | --localstatedir | --localstatedi | --localstated \
312  | --localstate | --localstat | --localsta | --localst \
313  | --locals | --local | --loca | --loc | --lo)
314    ac_prev=localstatedir ;;
315  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
316  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
317  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
318    localstatedir=$ac_optarg ;;
319
320  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
321    ac_prev=mandir ;;
322  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
323    mandir=$ac_optarg ;;
324
325  -nfp | --nfp | --nf)
326    # Obsolete; use --without-fp.
327    with_fp=no ;;
328
329  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
330  | --no-cr | --no-c)
331    no_create=yes ;;
332
333  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
334  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
335    no_recursion=yes ;;
336
337  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
338  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
339  | --oldin | --oldi | --old | --ol | --o)
340    ac_prev=oldincludedir ;;
341  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
342  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
343  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
344    oldincludedir=$ac_optarg ;;
345
346  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
347    ac_prev=prefix ;;
348  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
349    prefix=$ac_optarg ;;
350
351  -program-prefix | --program-prefix | --program-prefi | --program-pref \
352  | --program-pre | --program-pr | --program-p)
353    ac_prev=program_prefix ;;
354  -program-prefix=* | --program-prefix=* | --program-prefi=* \
355  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
356    program_prefix=$ac_optarg ;;
357
358  -program-suffix | --program-suffix | --program-suffi | --program-suff \
359  | --program-suf | --program-su | --program-s)
360    ac_prev=program_suffix ;;
361  -program-suffix=* | --program-suffix=* | --program-suffi=* \
362  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
363    program_suffix=$ac_optarg ;;
364
365  -program-transform-name | --program-transform-name \
366  | --program-transform-nam | --program-transform-na \
367  | --program-transform-n | --program-transform- \
368  | --program-transform | --program-transfor \
369  | --program-transfo | --program-transf \
370  | --program-trans | --program-tran \
371  | --progr-tra | --program-tr | --program-t)
372    ac_prev=program_transform_name ;;
373  -program-transform-name=* | --program-transform-name=* \
374  | --program-transform-nam=* | --program-transform-na=* \
375  | --program-transform-n=* | --program-transform-=* \
376  | --program-transform=* | --program-transfor=* \
377  | --program-transfo=* | --program-transf=* \
378  | --program-trans=* | --program-tran=* \
379  | --progr-tra=* | --program-tr=* | --program-t=*)
380    program_transform_name=$ac_optarg ;;
381
382  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
383  | -silent | --silent | --silen | --sile | --sil)
384    silent=yes ;;
385
386  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
387    ac_prev=sbindir ;;
388  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
389  | --sbi=* | --sb=*)
390    sbindir=$ac_optarg ;;
391
392  -sharedstatedir | --sharedstatedir | --sharedstatedi \
393  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
394  | --sharedst | --shareds | --shared | --share | --shar \
395  | --sha | --sh)
396    ac_prev=sharedstatedir ;;
397  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
398  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
399  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
400  | --sha=* | --sh=*)
401    sharedstatedir=$ac_optarg ;;
402
403  -site | --site | --sit)
404    ac_prev=site ;;
405  -site=* | --site=* | --sit=*)
406    site=$ac_optarg ;;
407
408  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
409    ac_prev=srcdir ;;
410  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
411    srcdir=$ac_optarg ;;
412
413  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
414  | --syscon | --sysco | --sysc | --sys | --sy)
415    ac_prev=sysconfdir ;;
416  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
417  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
418    sysconfdir=$ac_optarg ;;
419
420  -target | --target | --targe | --targ | --tar | --ta | --t)
421    ac_prev=target_alias ;;
422  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
423    target_alias=$ac_optarg ;;
424
425  -v | -verbose | --verbose | --verbos | --verbo | --verb)
426    verbose=yes ;;
427
428  -version | --version | --versio | --versi | --vers | -V)
429    ac_init_version=: ;;
430
431  -with-* | --with-*)
432    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
433    # Reject names that are not valid shell variable names.
434    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
435      { echo "$as_me: error: invalid package name: $ac_package" >&2
436   { (exit 1); exit 1; }; }
437    ac_package=`echo $ac_package| sed 's/-/_/g'`
438    case $ac_option in
439      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
440      *) ac_optarg=yes ;;
441    esac
442    eval "with_$ac_package='$ac_optarg'" ;;
443
444  -without-* | --without-*)
445    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
446    # Reject names that are not valid shell variable names.
447    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448      { echo "$as_me: error: invalid package name: $ac_package" >&2
449   { (exit 1); exit 1; }; }
450    ac_package=`echo $ac_package | sed 's/-/_/g'`
451    eval "with_$ac_package=no" ;;
452
453  --x)
454    # Obsolete; use --with-x.
455    with_x=yes ;;
456
457  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
458  | --x-incl | --x-inc | --x-in | --x-i)
459    ac_prev=x_includes ;;
460  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
461  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
462    x_includes=$ac_optarg ;;
463
464  -x-libraries | --x-libraries | --x-librarie | --x-librari \
465  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
466    ac_prev=x_libraries ;;
467  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
468  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
469    x_libraries=$ac_optarg ;;
470
471  -*) { echo "$as_me: error: unrecognized option: $ac_option
472Try \`$0 --help' for more information." >&2
473   { (exit 1); exit 1; }; }
474    ;;
475
476  *=*)
477    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
478    # Reject names that are not valid shell variable names.
479    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
480      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
481   { (exit 1); exit 1; }; }
482    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
483    eval "$ac_envvar='$ac_optarg'"
484    export $ac_envvar ;;
485
486  *)
487    # FIXME: should be removed in autoconf 3.0.
488    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
489    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
490      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
491    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
492    ;;
493
494  esac
495done
496
497if test -n "$ac_prev"; then
498  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
499  { echo "$as_me: error: missing argument to $ac_option" >&2
500   { (exit 1); exit 1; }; }
501fi
502
503# Be sure to have absolute paths.
504for ac_var in exec_prefix prefix
505do
506  eval ac_val=$`echo $ac_var`
507  case $ac_val in
508    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
509    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
510   { (exit 1); exit 1; }; };;
511  esac
512done
513
514# Be sure to have absolute paths.
515for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
516              localstatedir libdir includedir oldincludedir infodir mandir
517do
518  eval ac_val=$`echo $ac_var`
519  case $ac_val in
520    [\\/$]* | ?:[\\/]* ) ;;
521    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
522   { (exit 1); exit 1; }; };;
523  esac
524done
525
526# There might be people who depend on the old broken behavior: `$host'
527# used to hold the argument of --host etc.
528build=$build_alias
529host=$host_alias
530target=$target_alias
531
532# FIXME: should be removed in autoconf 3.0.
533if test "x$host_alias" != x; then
534  if test "x$build_alias" = x; then
535    cross_compiling=maybe
536    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
537    If a cross compiler is detected then cross compile mode will be used." >&2
538  elif test "x$build_alias" != "x$host_alias"; then
539    cross_compiling=yes
540  fi
541fi
542
543ac_tool_prefix=
544test -n "$host_alias" && ac_tool_prefix=$host_alias-
545
546test "$silent" = yes && exec 6>/dev/null
547
548# Find the source files, if location was not specified.
549if test -z "$srcdir"; then
550  ac_srcdir_defaulted=yes
551  # Try the directory containing this script, then its parent.
552  ac_prog=$0
553  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
554  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
555  srcdir=$ac_confdir
556  if test ! -r $srcdir/$ac_unique_file; then
557    srcdir=..
558  fi
559else
560  ac_srcdir_defaulted=no
561fi
562if test ! -r $srcdir/$ac_unique_file; then
563  if test "$ac_srcdir_defaulted" = yes; then
564    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
565   { (exit 1); exit 1; }; }
566  else
567    { echo "$as_me: error: cannot find sources in $srcdir" >&2
568   { (exit 1); exit 1; }; }
569  fi
570fi
571srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
572ac_env_build_alias_set=${build_alias+set}
573ac_env_build_alias_value=$build_alias
574ac_cv_env_build_alias_set=${build_alias+set}
575ac_cv_env_build_alias_value=$build_alias
576ac_env_host_alias_set=${host_alias+set}
577ac_env_host_alias_value=$host_alias
578ac_cv_env_host_alias_set=${host_alias+set}
579ac_cv_env_host_alias_value=$host_alias
580ac_env_target_alias_set=${target_alias+set}
581ac_env_target_alias_value=$target_alias
582ac_cv_env_target_alias_set=${target_alias+set}
583ac_cv_env_target_alias_value=$target_alias
584ac_env_CC_set=${CC+set}
585ac_env_CC_value=$CC
586ac_cv_env_CC_set=${CC+set}
587ac_cv_env_CC_value=$CC
588ac_env_CFLAGS_set=${CFLAGS+set}
589ac_env_CFLAGS_value=$CFLAGS
590ac_cv_env_CFLAGS_set=${CFLAGS+set}
591ac_cv_env_CFLAGS_value=$CFLAGS
592ac_env_LDFLAGS_set=${LDFLAGS+set}
593ac_env_LDFLAGS_value=$LDFLAGS
594ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
595ac_cv_env_LDFLAGS_value=$LDFLAGS
596ac_env_CPPFLAGS_set=${CPPFLAGS+set}
597ac_env_CPPFLAGS_value=$CPPFLAGS
598ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
599ac_cv_env_CPPFLAGS_value=$CPPFLAGS
600ac_env_CPP_set=${CPP+set}
601ac_env_CPP_value=$CPP
602ac_cv_env_CPP_set=${CPP+set}
603ac_cv_env_CPP_value=$CPP
604
605#
606# Report the --help message.
607#
608if test "$ac_init_help" = "long"; then
609  # Omit some internal or obsolete options to make the list less imposing.
610  # This message is too long to be a string in the A/UX 3.1 sh.
611  cat <<EOF
612\`configure' configures this package to adapt to many kinds of systems.
613
614Usage: $0 [OPTION]... [VAR=VALUE]...
615
616To assign environment variables (e.g., CC, CFLAGS...), specify them as
617VAR=VALUE.  See below for descriptions of some of the useful variables.
618
619Defaults for the options are specified in brackets.
620
621Configuration:
622  -h, --help              display this help and exit
623      --help=short        display options specific to this package
624      --help=recursive    display the short help of all the included packages
625  -V, --version           display version information and exit
626  -q, --quiet, --silent   do not print \`checking...' messages
627      --cache-file=FILE   cache test results in FILE [disabled]
628  -C, --config-cache      alias for \`--cache-file=config.cache'
629  -n, --no-create         do not create output files
630      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
631
632EOF
633
634  cat <<EOF
635Installation directories:
636  --prefix=PREFIX         install architecture-independent files in PREFIX
637                          [$ac_default_prefix]
638  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
639                          [PREFIX]
640
641By default, \`make install' will install all the files in
642\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
643an installation prefix other than \`$ac_default_prefix' using \`--prefix',
644for instance \`--prefix=\$HOME'.
645
646For better control, use the options below.
647
648Fine tuning of the installation directories:
649  --bindir=DIR            user executables [EPREFIX/bin]
650  --sbindir=DIR           system admin executables [EPREFIX/sbin]
651  --libexecdir=DIR        program executables [EPREFIX/libexec]
652  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
653  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
654  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
655  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
656  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
657  --libdir=DIR            object code libraries [EPREFIX/lib]
658  --includedir=DIR        C header files [PREFIX/include]
659  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
660  --infodir=DIR           info documentation [DATAROOTDIR/info]
661  --mandir=DIR            man documentation [DATAROOTDIR/man]
662EOF
663
664  cat <<\EOF
665
666Program names:
667  --program-prefix=PREFIX            prepend PREFIX to installed program names
668  --program-suffix=SUFFIX            append SUFFIX to installed program names
669  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
670
671System types:
672  --build=BUILD           configure for building on BUILD [guessed]
673  --host=HOST       build programs to run on HOST [BUILD]
674EOF
675fi
676
677if test -n "$ac_init_help"; then
678
679  cat <<\EOF
680
681Optional Features:
682  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
683  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
684
685Optional Packages:
686  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
687  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
688
689  --disable-echo          do not display "compiling" commands
690  --disable-largefile     omit support for large files
691  --with-warnings         test: turn on gcc warnings
692  --with-package=XXX      rename dialog to XXX, library to libXXX.a, etc
693  --enable-header-subdir  install dlg_XXX headers to subdirectory
694  --with-libiconv-prefix=DIR
695                          search for libiconv in DIR/include and DIR/lib
696  --enable-nls            use Native Language Support
697  --with-included-gettext use the GNU gettext library included here
698  --with-textdomain=PKG   NLS text-domain (default is package name)
699  --disable-included-msgs use included messages, for i18n support
700  --with-dmalloc          test: use Gray Watson's dmalloc library
701  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
702  --with-purify           test: use Purify
703  --with-valgrind         test: use valgrind
704  --with-no-leaks         test: free permanent memory, analyze leaks
705  --disable-trace         do not support --trace option
706  --disable-libtool-version  enable to use libtool's incompatible naming scheme
707  --with-libtool          generate libraries with libtool
708  --with-libtool-opts=XXX specify additional libtool options
709  --with-curses-dir=DIR   directory in which (n)curses is installed
710  --with-ncurses          compile/link with ncurses library
711  --with-ncursesw         compile/link with wide-char ncurses library
712  --disable-extras        do not include extra dialogs
713  --disable-rc-file       do not include config-file support
714  --disable-Xdialog       do not include Xdialog-style dialogs (1.1)
715  --disable-Xdialog2      do not include extra Xdialog-style dialogs (1.2)
716  --disable-whiptail      do not map extra whiptail options
717  --disable-form          do not include the form dialog
718  --disable-gauge         do not include the gauge dialogs
719  --disable-tailbox       do not include the tailbox dialog
720  --disable-mixedform     do not include the mixedform dialog
721  --disable-mixedgauge    do not include the mixedgauge dialog
722  --enable-widec          enable wide-curses features
723  --disable-rpath-hack    don't add rpath options for additional libraries
724
725Some influential environment variables:
726  CC          C compiler command
727  CFLAGS      C compiler flags
728  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
729              nonstandard directory <lib dir>
730  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
731              headers in a nonstandard directory <include dir>
732  CPP         C preprocessor
733
734Use these variables to override the choices made by `configure' or to help
735it to find libraries and programs with nonstandard names/locations.
736
737EOF
738fi
739
740if test "$ac_init_help" = "recursive"; then
741  # If there are subdirs, report their specific --help.
742  ac_popdir=`pwd`
743  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
744    cd $ac_subdir
745    # A "../" for each directory in /$ac_subdir.
746    ac_dots=`echo $ac_subdir |
747             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
748
749    case $srcdir in
750    .) # No --srcdir option.  We are building in place.
751      ac_sub_srcdir=$srcdir ;;
752    [\\/]* | ?:[\\/]* ) # Absolute path.
753      ac_sub_srcdir=$srcdir/$ac_subdir ;;
754    *) # Relative path.
755      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
756    esac
757
758    # Check for guested configure; otherwise get Cygnus style configure.
759    if test -f $ac_sub_srcdir/configure.gnu; then
760      echo
761      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
762    elif test -f $ac_sub_srcdir/configure; then
763      echo
764      $SHELL $ac_sub_srcdir/configure  --help=recursive
765    elif test -f $ac_sub_srcdir/configure.ac ||
766           test -f $ac_sub_srcdir/configure.in; then
767      echo
768      $ac_configure --help
769    else
770      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
771    fi
772    cd $ac_popdir
773  done
774fi
775
776test -n "$ac_init_help" && exit 0
777if $ac_init_version; then
778  cat <<\EOF
779
780Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
781Free Software Foundation, Inc.
782This configure script is free software; the Free Software Foundation
783gives unlimited permission to copy, distribute and modify it.
784EOF
785  exit 0
786fi
787exec 5>config.log
788cat >&5 <<EOF
789This file contains any messages produced by compilers while
790running configure, to aid debugging if configure makes a mistake.
791
792It was created by $as_me, which was
793generated by GNU Autoconf 2.52.20121002.  Invocation command line was
794
795  $ $0 $@
796
797EOF
798{
799cat <<_ASUNAME
800## ---------- ##
801## Platform.  ##
802## ---------- ##
803
804hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
805uname -m = `(uname -m) 2>/dev/null || echo unknown`
806uname -r = `(uname -r) 2>/dev/null || echo unknown`
807uname -s = `(uname -s) 2>/dev/null || echo unknown`
808uname -v = `(uname -v) 2>/dev/null || echo unknown`
809
810/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
811/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
812
813/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
814/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
815/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
816hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
817/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
818/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
819/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
820
821PATH = $PATH
822
823_ASUNAME
824} >&5
825
826cat >&5 <<EOF
827## ------------ ##
828## Core tests.  ##
829## ------------ ##
830
831EOF
832
833# Keep a trace of the command line.
834# Strip out --no-create and --no-recursion so they do not pile up.
835# Also quote any args containing shell meta-characters.
836ac_configure_args=
837ac_sep=
838for ac_arg
839do
840  case $ac_arg in
841  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
842  | --no-cr | --no-c) ;;
843  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
844  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
845  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
846    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
847    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
848    ac_sep=" " ;;
849  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
850     ac_sep=" " ;;
851  esac
852  # Get rid of the leading space.
853done
854
855# When interrupted or exit'd, cleanup temporary files, and complete
856# config.log.  We remove comments because anyway the quotes in there
857# would cause problems or look ugly.
858trap 'exit_status=$?
859  # Save into config.log some information that might help in debugging.
860  echo >&5
861  echo "## ----------------- ##" >&5
862  echo "## Cache variables.  ##" >&5
863  echo "## ----------------- ##" >&5
864  echo >&5
865  # The following way of writing the cache mishandles newlines in values,
866{
867  (set) 2>&1 |
868    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
869    *ac_space=\ *)
870      sed -n \
871        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
872    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
873      ;;
874    *)
875      sed -n \
876        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
877      ;;
878    esac;
879} >&5
880  sed "/^$/d" confdefs.h >conftest.log
881  if test -s conftest.log; then
882    echo >&5
883    echo "## ------------ ##" >&5
884    echo "## confdefs.h.  ##" >&5
885    echo "## ------------ ##" >&5
886    echo >&5
887    cat conftest.log >&5
888  fi
889  (echo; echo) >&5
890  test "$ac_signal" != 0 &&
891    echo "$as_me: caught signal $ac_signal" >&5
892  echo "$as_me: exit $exit_status" >&5
893  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
894    exit $exit_status
895     ' 0
896for ac_signal in 1 2 13 15; do
897  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
898done
899ac_signal=0
900
901# confdefs.h avoids OS command line length limits that DEFS can exceed.
902rm -rf conftest* confdefs.h
903# AIX cpp loses on an empty file, so make sure it contains at least a newline.
904echo >confdefs.h
905
906# Let the site file select an alternate cache file if it wants to.
907# Prefer explicitly selected file to automatically selected ones.
908if test -z "$CONFIG_SITE"; then
909  if test "x$prefix" != xNONE; then
910    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
911  else
912    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
913  fi
914fi
915for ac_site_file in $CONFIG_SITE; do
916  if test -r "$ac_site_file"; then
917    { echo "$as_me:917: loading site script $ac_site_file" >&5
918echo "$as_me: loading site script $ac_site_file" >&6;}
919    cat "$ac_site_file" >&5
920    . "$ac_site_file"
921  fi
922done
923
924if test -r "$cache_file"; then
925  # Some versions of bash will fail to source /dev/null (special
926  # files actually), so we avoid doing that.
927  if test -f "$cache_file"; then
928    { echo "$as_me:928: loading cache $cache_file" >&5
929echo "$as_me: loading cache $cache_file" >&6;}
930    case $cache_file in
931      [\\/]* | ?:[\\/]* ) . $cache_file;;
932      *)                      . ./$cache_file;;
933    esac
934  fi
935else
936  { echo "$as_me:936: creating cache $cache_file" >&5
937echo "$as_me: creating cache $cache_file" >&6;}
938  >$cache_file
939fi
940
941# Check that the precious variables saved in the cache have kept the same
942# value.
943ac_cache_corrupted=false
944for ac_var in `(set) 2>&1 |
945               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
946  eval ac_old_set=\$ac_cv_env_${ac_var}_set
947  eval ac_new_set=\$ac_env_${ac_var}_set
948  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
949  eval ac_new_val="\$ac_env_${ac_var}_value"
950  case $ac_old_set,$ac_new_set in
951    set,)
952      { echo "$as_me:952: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
953echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
954      ac_cache_corrupted=: ;;
955    ,set)
956      { echo "$as_me:956: error: \`$ac_var' was not set in the previous run" >&5
957echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
958      ac_cache_corrupted=: ;;
959    ,);;
960    *)
961      if test "x$ac_old_val" != "x$ac_new_val"; then
962        { echo "$as_me:962: error: \`$ac_var' has changed since the previous run:" >&5
963echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
964        { echo "$as_me:964:   former value:  $ac_old_val" >&5
965echo "$as_me:   former value:  $ac_old_val" >&2;}
966        { echo "$as_me:966:   current value: $ac_new_val" >&5
967echo "$as_me:   current value: $ac_new_val" >&2;}
968        ac_cache_corrupted=:
969      fi;;
970  esac
971  # Pass precious variables to config.status.  It doesn't matter if
972  # we pass some twice (in addition to the command line arguments).
973  if test "$ac_new_set" = set; then
974    case $ac_new_val in
975    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
976      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
977      ac_configure_args="$ac_configure_args '$ac_arg'"
978      ;;
979    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
980       ;;
981    esac
982  fi
983done
984if $ac_cache_corrupted; then
985  { echo "$as_me:985: error: changes in the environment can compromise the build" >&5
986echo "$as_me: error: changes in the environment can compromise the build" >&2;}
987  { { echo "$as_me:987: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
988echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
989   { (exit 1); exit 1; }; }
990fi
991
992ac_ext=c
993ac_cpp='$CPP $CPPFLAGS'
994ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
995ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
996ac_compiler_gnu=$ac_cv_c_compiler_gnu
997ac_main_return=return
998
999case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1000  *c*,-n*) ECHO_N= ECHO_C='
1001' ECHO_T='	' ;;
1002  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1003  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1004esac
1005echo "#! $SHELL" >conftest.sh
1006echo  "exit 0"   >>conftest.sh
1007chmod +x conftest.sh
1008if { (echo "$as_me:1008: PATH=\".;.\"; conftest.sh") >&5
1009  (PATH=".;."; conftest.sh) 2>&5
1010  ac_status=$?
1011  echo "$as_me:1011: \$? = $ac_status" >&5
1012  (exit $ac_status); }; then
1013  ac_path_separator=';'
1014else
1015  ac_path_separator=:
1016fi
1017PATH_SEPARATOR="$ac_path_separator"
1018rm -f conftest.sh
1019
1020ac_config_headers="$ac_config_headers dlg_config.h:config.hin"
1021
1022test "$program_prefix" != NONE &&
1023  program_transform_name="s,^,$program_prefix,;$program_transform_name"
1024# Use a double $ so make ignores it.
1025test "$program_suffix" != NONE &&
1026  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1027# Double any \ or $.  echo might interpret backslashes.
1028# By default was `s,x,x', remove it if useless.
1029cat <<\_ACEOF >conftest.sed
1030s/[\\$]/&&/g;s/;s,x,x,$//
1031_ACEOF
1032program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1033rm conftest.sed
1034
1035DESTDIR=
1036
1037ac_ext=c
1038ac_cpp='$CPP $CPPFLAGS'
1039ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1040ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1041ac_compiler_gnu=$ac_cv_c_compiler_gnu
1042ac_main_return=return
1043if test -n "$ac_tool_prefix"; then
1044  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1045set dummy ${ac_tool_prefix}gcc; ac_word=$2
1046echo "$as_me:1046: checking for $ac_word" >&5
1047echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1048if test "${ac_cv_prog_CC+set}" = set; then
1049  echo $ECHO_N "(cached) $ECHO_C" >&6
1050else
1051  if test -n "$CC"; then
1052  ac_cv_prog_CC="$CC" # Let the user override the test.
1053else
1054  ac_save_IFS=$IFS; IFS=$ac_path_separator
1055ac_dummy="$PATH"
1056for ac_dir in $ac_dummy; do
1057  IFS=$ac_save_IFS
1058  test -z "$ac_dir" && ac_dir=.
1059  $as_executable_p "$ac_dir/$ac_word" || continue
1060ac_cv_prog_CC="${ac_tool_prefix}gcc"
1061echo "$as_me:1061: found $ac_dir/$ac_word" >&5
1062break
1063done
1064
1065fi
1066fi
1067CC=$ac_cv_prog_CC
1068if test -n "$CC"; then
1069  echo "$as_me:1069: result: $CC" >&5
1070echo "${ECHO_T}$CC" >&6
1071else
1072  echo "$as_me:1072: result: no" >&5
1073echo "${ECHO_T}no" >&6
1074fi
1075
1076fi
1077if test -z "$ac_cv_prog_CC"; then
1078  ac_ct_CC=$CC
1079  # Extract the first word of "gcc", so it can be a program name with args.
1080set dummy gcc; ac_word=$2
1081echo "$as_me:1081: checking for $ac_word" >&5
1082echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1083if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1084  echo $ECHO_N "(cached) $ECHO_C" >&6
1085else
1086  if test -n "$ac_ct_CC"; then
1087  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1088else
1089  ac_save_IFS=$IFS; IFS=$ac_path_separator
1090ac_dummy="$PATH"
1091for ac_dir in $ac_dummy; do
1092  IFS=$ac_save_IFS
1093  test -z "$ac_dir" && ac_dir=.
1094  $as_executable_p "$ac_dir/$ac_word" || continue
1095ac_cv_prog_ac_ct_CC="gcc"
1096echo "$as_me:1096: found $ac_dir/$ac_word" >&5
1097break
1098done
1099
1100fi
1101fi
1102ac_ct_CC=$ac_cv_prog_ac_ct_CC
1103if test -n "$ac_ct_CC"; then
1104  echo "$as_me:1104: result: $ac_ct_CC" >&5
1105echo "${ECHO_T}$ac_ct_CC" >&6
1106else
1107  echo "$as_me:1107: result: no" >&5
1108echo "${ECHO_T}no" >&6
1109fi
1110
1111  CC=$ac_ct_CC
1112else
1113  CC="$ac_cv_prog_CC"
1114fi
1115
1116if test -z "$CC"; then
1117  if test -n "$ac_tool_prefix"; then
1118  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1119set dummy ${ac_tool_prefix}cc; ac_word=$2
1120echo "$as_me:1120: checking for $ac_word" >&5
1121echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1122if test "${ac_cv_prog_CC+set}" = set; then
1123  echo $ECHO_N "(cached) $ECHO_C" >&6
1124else
1125  if test -n "$CC"; then
1126  ac_cv_prog_CC="$CC" # Let the user override the test.
1127else
1128  ac_save_IFS=$IFS; IFS=$ac_path_separator
1129ac_dummy="$PATH"
1130for ac_dir in $ac_dummy; do
1131  IFS=$ac_save_IFS
1132  test -z "$ac_dir" && ac_dir=.
1133  $as_executable_p "$ac_dir/$ac_word" || continue
1134ac_cv_prog_CC="${ac_tool_prefix}cc"
1135echo "$as_me:1135: found $ac_dir/$ac_word" >&5
1136break
1137done
1138
1139fi
1140fi
1141CC=$ac_cv_prog_CC
1142if test -n "$CC"; then
1143  echo "$as_me:1143: result: $CC" >&5
1144echo "${ECHO_T}$CC" >&6
1145else
1146  echo "$as_me:1146: result: no" >&5
1147echo "${ECHO_T}no" >&6
1148fi
1149
1150fi
1151if test -z "$ac_cv_prog_CC"; then
1152  ac_ct_CC=$CC
1153  # Extract the first word of "cc", so it can be a program name with args.
1154set dummy cc; ac_word=$2
1155echo "$as_me:1155: checking for $ac_word" >&5
1156echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1157if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1158  echo $ECHO_N "(cached) $ECHO_C" >&6
1159else
1160  if test -n "$ac_ct_CC"; then
1161  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1162else
1163  ac_save_IFS=$IFS; IFS=$ac_path_separator
1164ac_dummy="$PATH"
1165for ac_dir in $ac_dummy; do
1166  IFS=$ac_save_IFS
1167  test -z "$ac_dir" && ac_dir=.
1168  $as_executable_p "$ac_dir/$ac_word" || continue
1169ac_cv_prog_ac_ct_CC="cc"
1170echo "$as_me:1170: found $ac_dir/$ac_word" >&5
1171break
1172done
1173
1174fi
1175fi
1176ac_ct_CC=$ac_cv_prog_ac_ct_CC
1177if test -n "$ac_ct_CC"; then
1178  echo "$as_me:1178: result: $ac_ct_CC" >&5
1179echo "${ECHO_T}$ac_ct_CC" >&6
1180else
1181  echo "$as_me:1181: result: no" >&5
1182echo "${ECHO_T}no" >&6
1183fi
1184
1185  CC=$ac_ct_CC
1186else
1187  CC="$ac_cv_prog_CC"
1188fi
1189
1190fi
1191if test -z "$CC"; then
1192  # Extract the first word of "cc", so it can be a program name with args.
1193set dummy cc; ac_word=$2
1194echo "$as_me:1194: checking for $ac_word" >&5
1195echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1196if test "${ac_cv_prog_CC+set}" = set; then
1197  echo $ECHO_N "(cached) $ECHO_C" >&6
1198else
1199  if test -n "$CC"; then
1200  ac_cv_prog_CC="$CC" # Let the user override the test.
1201else
1202  ac_prog_rejected=no
1203  ac_save_IFS=$IFS; IFS=$ac_path_separator
1204ac_dummy="$PATH"
1205for ac_dir in $ac_dummy; do
1206  IFS=$ac_save_IFS
1207  test -z "$ac_dir" && ac_dir=.
1208  $as_executable_p "$ac_dir/$ac_word" || continue
1209if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1210  ac_prog_rejected=yes
1211  continue
1212fi
1213ac_cv_prog_CC="cc"
1214echo "$as_me:1214: found $ac_dir/$ac_word" >&5
1215break
1216done
1217
1218if test $ac_prog_rejected = yes; then
1219  # We found a bogon in the path, so make sure we never use it.
1220  set dummy $ac_cv_prog_CC
1221  shift
1222  if test $# != 0; then
1223    # We chose a different compiler from the bogus one.
1224    # However, it has the same basename, so the bogon will be chosen
1225    # first if we set CC to just the basename; use the full file name.
1226    shift
1227    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1228    shift
1229    ac_cv_prog_CC="$@"
1230  fi
1231fi
1232fi
1233fi
1234CC=$ac_cv_prog_CC
1235if test -n "$CC"; then
1236  echo "$as_me:1236: result: $CC" >&5
1237echo "${ECHO_T}$CC" >&6
1238else
1239  echo "$as_me:1239: result: no" >&5
1240echo "${ECHO_T}no" >&6
1241fi
1242
1243fi
1244if test -z "$CC"; then
1245  if test -n "$ac_tool_prefix"; then
1246  for ac_prog in cl
1247  do
1248    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1249set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1250echo "$as_me:1250: checking for $ac_word" >&5
1251echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1252if test "${ac_cv_prog_CC+set}" = set; then
1253  echo $ECHO_N "(cached) $ECHO_C" >&6
1254else
1255  if test -n "$CC"; then
1256  ac_cv_prog_CC="$CC" # Let the user override the test.
1257else
1258  ac_save_IFS=$IFS; IFS=$ac_path_separator
1259ac_dummy="$PATH"
1260for ac_dir in $ac_dummy; do
1261  IFS=$ac_save_IFS
1262  test -z "$ac_dir" && ac_dir=.
1263  $as_executable_p "$ac_dir/$ac_word" || continue
1264ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1265echo "$as_me:1265: found $ac_dir/$ac_word" >&5
1266break
1267done
1268
1269fi
1270fi
1271CC=$ac_cv_prog_CC
1272if test -n "$CC"; then
1273  echo "$as_me:1273: result: $CC" >&5
1274echo "${ECHO_T}$CC" >&6
1275else
1276  echo "$as_me:1276: result: no" >&5
1277echo "${ECHO_T}no" >&6
1278fi
1279
1280    test -n "$CC" && break
1281  done
1282fi
1283if test -z "$CC"; then
1284  ac_ct_CC=$CC
1285  for ac_prog in cl
1286do
1287  # Extract the first word of "$ac_prog", so it can be a program name with args.
1288set dummy $ac_prog; ac_word=$2
1289echo "$as_me:1289: checking for $ac_word" >&5
1290echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1291if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1292  echo $ECHO_N "(cached) $ECHO_C" >&6
1293else
1294  if test -n "$ac_ct_CC"; then
1295  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1296else
1297  ac_save_IFS=$IFS; IFS=$ac_path_separator
1298ac_dummy="$PATH"
1299for ac_dir in $ac_dummy; do
1300  IFS=$ac_save_IFS
1301  test -z "$ac_dir" && ac_dir=.
1302  $as_executable_p "$ac_dir/$ac_word" || continue
1303ac_cv_prog_ac_ct_CC="$ac_prog"
1304echo "$as_me:1304: found $ac_dir/$ac_word" >&5
1305break
1306done
1307
1308fi
1309fi
1310ac_ct_CC=$ac_cv_prog_ac_ct_CC
1311if test -n "$ac_ct_CC"; then
1312  echo "$as_me:1312: result: $ac_ct_CC" >&5
1313echo "${ECHO_T}$ac_ct_CC" >&6
1314else
1315  echo "$as_me:1315: result: no" >&5
1316echo "${ECHO_T}no" >&6
1317fi
1318
1319  test -n "$ac_ct_CC" && break
1320done
1321
1322  CC=$ac_ct_CC
1323fi
1324
1325fi
1326
1327test -z "$CC" && { { echo "$as_me:1327: error: no acceptable cc found in \$PATH" >&5
1328echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1329   { (exit 1); exit 1; }; }
1330
1331# Provide some information about the compiler.
1332echo "$as_me:1332:" \
1333     "checking for C compiler version" >&5
1334ac_compiler=`set X $ac_compile; echo $2`
1335{ (eval echo "$as_me:1335: \"$ac_compiler --version </dev/null >&5\"") >&5
1336  (eval $ac_compiler --version </dev/null >&5) 2>&5
1337  ac_status=$?
1338  echo "$as_me:1338: \$? = $ac_status" >&5
1339  (exit $ac_status); }
1340{ (eval echo "$as_me:1340: \"$ac_compiler -v </dev/null >&5\"") >&5
1341  (eval $ac_compiler -v </dev/null >&5) 2>&5
1342  ac_status=$?
1343  echo "$as_me:1343: \$? = $ac_status" >&5
1344  (exit $ac_status); }
1345{ (eval echo "$as_me:1345: \"$ac_compiler -V </dev/null >&5\"") >&5
1346  (eval $ac_compiler -V </dev/null >&5) 2>&5
1347  ac_status=$?
1348  echo "$as_me:1348: \$? = $ac_status" >&5
1349  (exit $ac_status); }
1350
1351cat >conftest.$ac_ext <<_ACEOF
1352#line 1352 "configure"
1353#include "confdefs.h"
1354
1355int
1356main ()
1357{
1358
1359  ;
1360  return 0;
1361}
1362_ACEOF
1363ac_clean_files_save=$ac_clean_files
1364ac_clean_files="$ac_clean_files a.out a.exe"
1365# Try to create an executable without -o first, disregard a.out.
1366# It will help us diagnose broken compilers, and finding out an intuition
1367# of exeext.
1368echo "$as_me:1368: checking for C compiler default output" >&5
1369echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1370ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1371if { (eval echo "$as_me:1371: \"$ac_link_default\"") >&5
1372  (eval $ac_link_default) 2>&5
1373  ac_status=$?
1374  echo "$as_me:1374: \$? = $ac_status" >&5
1375  (exit $ac_status); }; then
1376  # Find the output, starting from the most likely.  This scheme is
1377# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1378# resort.
1379for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1380                ls a.out conftest 2>/dev/null;
1381                ls a.* conftest.* 2>/dev/null`; do
1382  case $ac_file in
1383    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1384    a.out ) # We found the default executable, but exeext='' is most
1385            # certainly right.
1386            break;;
1387    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1388          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1389          export ac_cv_exeext
1390          break;;
1391    * ) break;;
1392  esac
1393done
1394else
1395  echo "$as_me: failed program was:" >&5
1396cat conftest.$ac_ext >&5
1397{ { echo "$as_me:1397: error: C compiler cannot create executables" >&5
1398echo "$as_me: error: C compiler cannot create executables" >&2;}
1399   { (exit 77); exit 77; }; }
1400fi
1401
1402ac_exeext=$ac_cv_exeext
1403echo "$as_me:1403: result: $ac_file" >&5
1404echo "${ECHO_T}$ac_file" >&6
1405
1406# Check the compiler produces executables we can run.  If not, either
1407# the compiler is broken, or we cross compile.
1408echo "$as_me:1408: checking whether the C compiler works" >&5
1409echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1410# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1411# If not cross compiling, check that we can run a simple program.
1412if test "$cross_compiling" != yes; then
1413  if { ac_try='./$ac_file'
1414  { (eval echo "$as_me:1414: \"$ac_try\"") >&5
1415  (eval $ac_try) 2>&5
1416  ac_status=$?
1417  echo "$as_me:1417: \$? = $ac_status" >&5
1418  (exit $ac_status); }; }; then
1419    cross_compiling=no
1420  else
1421    if test "$cross_compiling" = maybe; then
1422	cross_compiling=yes
1423    else
1424	{ { echo "$as_me:1424: error: cannot run C compiled programs.
1425If you meant to cross compile, use \`--host'." >&5
1426echo "$as_me: error: cannot run C compiled programs.
1427If you meant to cross compile, use \`--host'." >&2;}
1428   { (exit 1); exit 1; }; }
1429    fi
1430  fi
1431fi
1432echo "$as_me:1432: result: yes" >&5
1433echo "${ECHO_T}yes" >&6
1434
1435rm -f a.out a.exe conftest$ac_cv_exeext
1436ac_clean_files=$ac_clean_files_save
1437# Check the compiler produces executables we can run.  If not, either
1438# the compiler is broken, or we cross compile.
1439echo "$as_me:1439: checking whether we are cross compiling" >&5
1440echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1441echo "$as_me:1441: result: $cross_compiling" >&5
1442echo "${ECHO_T}$cross_compiling" >&6
1443
1444echo "$as_me:1444: checking for executable suffix" >&5
1445echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1446if { (eval echo "$as_me:1446: \"$ac_link\"") >&5
1447  (eval $ac_link) 2>&5
1448  ac_status=$?
1449  echo "$as_me:1449: \$? = $ac_status" >&5
1450  (exit $ac_status); }; then
1451  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1452# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1453# work properly (i.e., refer to `conftest.exe'), while it won't with
1454# `rm'.
1455for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1456  case $ac_file in
1457    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1458    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1459          export ac_cv_exeext
1460          break;;
1461    * ) break;;
1462  esac
1463done
1464else
1465  { { echo "$as_me:1465: error: cannot compute EXEEXT: cannot compile and link" >&5
1466echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1467   { (exit 1); exit 1; }; }
1468fi
1469
1470rm -f conftest$ac_cv_exeext
1471echo "$as_me:1471: result: $ac_cv_exeext" >&5
1472echo "${ECHO_T}$ac_cv_exeext" >&6
1473
1474rm -f conftest.$ac_ext
1475EXEEXT=$ac_cv_exeext
1476ac_exeext=$EXEEXT
1477echo "$as_me:1477: checking for object suffix" >&5
1478echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1479if test "${ac_cv_objext+set}" = set; then
1480  echo $ECHO_N "(cached) $ECHO_C" >&6
1481else
1482  cat >conftest.$ac_ext <<_ACEOF
1483#line 1483 "configure"
1484#include "confdefs.h"
1485
1486int
1487main ()
1488{
1489
1490  ;
1491  return 0;
1492}
1493_ACEOF
1494rm -f conftest.o conftest.obj
1495if { (eval echo "$as_me:1495: \"$ac_compile\"") >&5
1496  (eval $ac_compile) 2>&5
1497  ac_status=$?
1498  echo "$as_me:1498: \$? = $ac_status" >&5
1499  (exit $ac_status); }; then
1500  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1501  case $ac_file in
1502    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1503    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1504       break;;
1505  esac
1506done
1507else
1508  echo "$as_me: failed program was:" >&5
1509cat conftest.$ac_ext >&5
1510{ { echo "$as_me:1510: error: cannot compute OBJEXT: cannot compile" >&5
1511echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1512   { (exit 1); exit 1; }; }
1513fi
1514
1515rm -f conftest.$ac_cv_objext conftest.$ac_ext
1516fi
1517echo "$as_me:1517: result: $ac_cv_objext" >&5
1518echo "${ECHO_T}$ac_cv_objext" >&6
1519OBJEXT=$ac_cv_objext
1520ac_objext=$OBJEXT
1521echo "$as_me:1521: checking whether we are using the GNU C compiler" >&5
1522echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1523if test "${ac_cv_c_compiler_gnu+set}" = set; then
1524  echo $ECHO_N "(cached) $ECHO_C" >&6
1525else
1526  cat >conftest.$ac_ext <<_ACEOF
1527#line 1527 "configure"
1528#include "confdefs.h"
1529
1530int
1531main ()
1532{
1533#ifndef __GNUC__
1534       choke me
1535#endif
1536
1537  ;
1538  return 0;
1539}
1540_ACEOF
1541rm -f conftest.$ac_objext
1542if { (eval echo "$as_me:1542: \"$ac_compile\"") >&5
1543  (eval $ac_compile) 2>&5
1544  ac_status=$?
1545  echo "$as_me:1545: \$? = $ac_status" >&5
1546  (exit $ac_status); } &&
1547         { ac_try='test -s conftest.$ac_objext'
1548  { (eval echo "$as_me:1548: \"$ac_try\"") >&5
1549  (eval $ac_try) 2>&5
1550  ac_status=$?
1551  echo "$as_me:1551: \$? = $ac_status" >&5
1552  (exit $ac_status); }; }; then
1553  ac_compiler_gnu=yes
1554else
1555  echo "$as_me: failed program was:" >&5
1556cat conftest.$ac_ext >&5
1557ac_compiler_gnu=no
1558fi
1559rm -f conftest.$ac_objext conftest.$ac_ext
1560ac_cv_c_compiler_gnu=$ac_compiler_gnu
1561
1562fi
1563echo "$as_me:1563: result: $ac_cv_c_compiler_gnu" >&5
1564echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1565GCC=`test $ac_compiler_gnu = yes && echo yes`
1566ac_test_CFLAGS=${CFLAGS+set}
1567ac_save_CFLAGS=$CFLAGS
1568CFLAGS="-g"
1569echo "$as_me:1569: checking whether $CC accepts -g" >&5
1570echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1571if test "${ac_cv_prog_cc_g+set}" = set; then
1572  echo $ECHO_N "(cached) $ECHO_C" >&6
1573else
1574  cat >conftest.$ac_ext <<_ACEOF
1575#line 1575 "configure"
1576#include "confdefs.h"
1577
1578int
1579main ()
1580{
1581
1582  ;
1583  return 0;
1584}
1585_ACEOF
1586rm -f conftest.$ac_objext
1587if { (eval echo "$as_me:1587: \"$ac_compile\"") >&5
1588  (eval $ac_compile) 2>&5
1589  ac_status=$?
1590  echo "$as_me:1590: \$? = $ac_status" >&5
1591  (exit $ac_status); } &&
1592         { ac_try='test -s conftest.$ac_objext'
1593  { (eval echo "$as_me:1593: \"$ac_try\"") >&5
1594  (eval $ac_try) 2>&5
1595  ac_status=$?
1596  echo "$as_me:1596: \$? = $ac_status" >&5
1597  (exit $ac_status); }; }; then
1598  ac_cv_prog_cc_g=yes
1599else
1600  echo "$as_me: failed program was:" >&5
1601cat conftest.$ac_ext >&5
1602ac_cv_prog_cc_g=no
1603fi
1604rm -f conftest.$ac_objext conftest.$ac_ext
1605fi
1606echo "$as_me:1606: result: $ac_cv_prog_cc_g" >&5
1607echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1608if test "$ac_test_CFLAGS" = set; then
1609  CFLAGS=$ac_save_CFLAGS
1610elif test $ac_cv_prog_cc_g = yes; then
1611  if test "$GCC" = yes; then
1612    CFLAGS="-g -O2"
1613  else
1614    CFLAGS="-g"
1615  fi
1616else
1617  if test "$GCC" = yes; then
1618    CFLAGS="-O2"
1619  else
1620    CFLAGS=
1621  fi
1622fi
1623# Some people use a C++ compiler to compile C.  Since we use `exit',
1624# in C++ we need to declare it.  In case someone uses the same compiler
1625# for both compiling C and C++ we need to have the C++ compiler decide
1626# the declaration of exit, since it's the most demanding environment.
1627cat >conftest.$ac_ext <<_ACEOF
1628#ifndef __cplusplus
1629  choke me
1630#endif
1631_ACEOF
1632rm -f conftest.$ac_objext
1633if { (eval echo "$as_me:1633: \"$ac_compile\"") >&5
1634  (eval $ac_compile) 2>&5
1635  ac_status=$?
1636  echo "$as_me:1636: \$? = $ac_status" >&5
1637  (exit $ac_status); } &&
1638         { ac_try='test -s conftest.$ac_objext'
1639  { (eval echo "$as_me:1639: \"$ac_try\"") >&5
1640  (eval $ac_try) 2>&5
1641  ac_status=$?
1642  echo "$as_me:1642: \$? = $ac_status" >&5
1643  (exit $ac_status); }; }; then
1644  for ac_declaration in \
1645   ''\
1646   '#include <stdlib.h>' \
1647   'extern "C" void std::exit (int) throw (); using std::exit;' \
1648   'extern "C" void std::exit (int); using std::exit;' \
1649   'extern "C" void exit (int) throw ();' \
1650   'extern "C" void exit (int);' \
1651   'void exit (int);'
1652do
1653  cat >conftest.$ac_ext <<_ACEOF
1654#line 1654 "configure"
1655#include "confdefs.h"
1656#include <stdlib.h>
1657$ac_declaration
1658int
1659main ()
1660{
1661exit (42);
1662  ;
1663  return 0;
1664}
1665_ACEOF
1666rm -f conftest.$ac_objext
1667if { (eval echo "$as_me:1667: \"$ac_compile\"") >&5
1668  (eval $ac_compile) 2>&5
1669  ac_status=$?
1670  echo "$as_me:1670: \$? = $ac_status" >&5
1671  (exit $ac_status); } &&
1672         { ac_try='test -s conftest.$ac_objext'
1673  { (eval echo "$as_me:1673: \"$ac_try\"") >&5
1674  (eval $ac_try) 2>&5
1675  ac_status=$?
1676  echo "$as_me:1676: \$? = $ac_status" >&5
1677  (exit $ac_status); }; }; then
1678  :
1679else
1680  echo "$as_me: failed program was:" >&5
1681cat conftest.$ac_ext >&5
1682continue
1683fi
1684rm -f conftest.$ac_objext conftest.$ac_ext
1685  cat >conftest.$ac_ext <<_ACEOF
1686#line 1686 "configure"
1687#include "confdefs.h"
1688$ac_declaration
1689int
1690main ()
1691{
1692exit (42);
1693  ;
1694  return 0;
1695}
1696_ACEOF
1697rm -f conftest.$ac_objext
1698if { (eval echo "$as_me:1698: \"$ac_compile\"") >&5
1699  (eval $ac_compile) 2>&5
1700  ac_status=$?
1701  echo "$as_me:1701: \$? = $ac_status" >&5
1702  (exit $ac_status); } &&
1703         { ac_try='test -s conftest.$ac_objext'
1704  { (eval echo "$as_me:1704: \"$ac_try\"") >&5
1705  (eval $ac_try) 2>&5
1706  ac_status=$?
1707  echo "$as_me:1707: \$? = $ac_status" >&5
1708  (exit $ac_status); }; }; then
1709  break
1710else
1711  echo "$as_me: failed program was:" >&5
1712cat conftest.$ac_ext >&5
1713fi
1714rm -f conftest.$ac_objext conftest.$ac_ext
1715done
1716rm -rf conftest*
1717if test -n "$ac_declaration"; then
1718  echo '#ifdef __cplusplus' >>confdefs.h
1719  echo $ac_declaration      >>confdefs.h
1720  echo '#endif'             >>confdefs.h
1721fi
1722
1723else
1724  echo "$as_me: failed program was:" >&5
1725cat conftest.$ac_ext >&5
1726fi
1727rm -f conftest.$ac_objext conftest.$ac_ext
1728ac_ext=c
1729ac_cpp='$CPP $CPPFLAGS'
1730ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1731ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1732ac_compiler_gnu=$ac_cv_c_compiler_gnu
1733ac_main_return=return
1734
1735GCC_VERSION=none
1736if test "$GCC" = yes ; then
1737	echo "$as_me:1737: checking version of $CC" >&5
1738echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1739	GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1740	test -z "$GCC_VERSION" && GCC_VERSION=unknown
1741	echo "$as_me:1741: result: $GCC_VERSION" >&5
1742echo "${ECHO_T}$GCC_VERSION" >&6
1743fi
1744
1745echo "$as_me:1745: checking for $CC option to accept ANSI C" >&5
1746echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1747if test "${ac_cv_prog_cc_stdc+set}" = set; then
1748  echo $ECHO_N "(cached) $ECHO_C" >&6
1749else
1750  ac_cv_prog_cc_stdc=no
1751ac_save_CC=$CC
1752cat >conftest.$ac_ext <<_ACEOF
1753#line 1753 "configure"
1754#include "confdefs.h"
1755#include <stdarg.h>
1756#include <stdio.h>
1757#include <sys/types.h>
1758#include <sys/stat.h>
1759/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1760struct buf { int x; };
1761FILE * (*rcsopen) (struct buf *, struct stat *, int);
1762static char *e (p, i)
1763     char **p;
1764     int i;
1765{
1766  return p[i];
1767}
1768static char *f (char * (*g) (char **, int), char **p, ...)
1769{
1770  char *s;
1771  va_list v;
1772  va_start (v,p);
1773  s = g (p, va_arg (v,int));
1774  va_end (v);
1775  return s;
1776}
1777int test (int i, double x);
1778struct s1 {int (*f) (int a);};
1779struct s2 {int (*f) (double a);};
1780int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1781int argc;
1782char **argv;
1783int
1784main ()
1785{
1786return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1787  ;
1788  return 0;
1789}
1790_ACEOF
1791# Don't try gcc -ansi; that turns off useful extensions and
1792# breaks some systems' header files.
1793# AIX			-qlanglvl=ansi
1794# Ultrix and OSF/1	-std1
1795# HP-UX 10.20 and later	-Ae
1796# HP-UX older versions	-Aa -D_HPUX_SOURCE
1797# SVR4			-Xc -D__EXTENSIONS__
1798for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1799do
1800  CC="$ac_save_CC $ac_arg"
1801  rm -f conftest.$ac_objext
1802if { (eval echo "$as_me:1802: \"$ac_compile\"") >&5
1803  (eval $ac_compile) 2>&5
1804  ac_status=$?
1805  echo "$as_me:1805: \$? = $ac_status" >&5
1806  (exit $ac_status); } &&
1807         { ac_try='test -s conftest.$ac_objext'
1808  { (eval echo "$as_me:1808: \"$ac_try\"") >&5
1809  (eval $ac_try) 2>&5
1810  ac_status=$?
1811  echo "$as_me:1811: \$? = $ac_status" >&5
1812  (exit $ac_status); }; }; then
1813  ac_cv_prog_cc_stdc=$ac_arg
1814break
1815else
1816  echo "$as_me: failed program was:" >&5
1817cat conftest.$ac_ext >&5
1818fi
1819rm -f conftest.$ac_objext
1820done
1821rm -f conftest.$ac_ext conftest.$ac_objext
1822CC=$ac_save_CC
1823
1824fi
1825
1826case "x$ac_cv_prog_cc_stdc" in
1827  x|xno)
1828    echo "$as_me:1828: result: none needed" >&5
1829echo "${ECHO_T}none needed" >&6 ;;
1830  *)
1831    echo "$as_me:1831: result: $ac_cv_prog_cc_stdc" >&5
1832echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1833    CC="$CC $ac_cv_prog_cc_stdc" ;;
1834esac
1835
1836# This should have been defined by AC_PROG_CC
1837: ${CC:=cc}
1838
1839echo "$as_me:1839: checking \$CC variable" >&5
1840echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1841case "$CC" in #(vi
1842*[\ \	]-[IUD]*)
1843	echo "$as_me:1843: result: broken" >&5
1844echo "${ECHO_T}broken" >&6
1845	{ echo "$as_me:1845: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1846echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1847	# humor him...
1848	cf_flags=`echo "$CC" | sed -e 's/^[^ 	]*[ 	]//'`
1849	CC=`echo "$CC" | sed -e 's/[ 	].*//'`
1850
1851cf_fix_cppflags=no
1852cf_new_cflags=
1853cf_new_cppflags=
1854cf_new_extra_cppflags=
1855
1856for cf_add_cflags in $cf_flags
1857do
1858case $cf_fix_cppflags in
1859no)
1860	case $cf_add_cflags in #(vi
1861	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1862		case $cf_add_cflags in
1863		-D*)
1864			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1865
1866			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1867				&& test -z "${cf_tst_cflags}" \
1868				&& cf_fix_cppflags=yes
1869
1870			if test $cf_fix_cppflags = yes ; then
1871				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1872				continue
1873			elif test "${cf_tst_cflags}" = "\"'" ; then
1874				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1875				continue
1876			fi
1877			;;
1878		esac
1879		case "$CPPFLAGS" in
1880		*$cf_add_cflags) #(vi
1881			;;
1882		*) #(vi
1883			case $cf_add_cflags in #(vi
1884			-D*)
1885				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1886
1887CPPFLAGS=`echo "$CPPFLAGS" | \
1888	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
1889		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
1890
1891				;;
1892			esac
1893			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1894			;;
1895		esac
1896		;;
1897	*)
1898		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1899		;;
1900	esac
1901	;;
1902yes)
1903	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1904
1905	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1906
1907	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1908		&& test -z "${cf_tst_cflags}" \
1909		&& cf_fix_cppflags=no
1910	;;
1911esac
1912done
1913
1914if test -n "$cf_new_cflags" ; then
1915
1916	CFLAGS="$CFLAGS $cf_new_cflags"
1917fi
1918
1919if test -n "$cf_new_cppflags" ; then
1920
1921	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1922fi
1923
1924if test -n "$cf_new_extra_cppflags" ; then
1925
1926	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1927fi
1928
1929	;;
1930*)
1931	echo "$as_me:1931: result: ok" >&5
1932echo "${ECHO_T}ok" >&6
1933	;;
1934esac
1935
1936ac_ext=c
1937ac_cpp='$CPP $CPPFLAGS'
1938ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1939ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1940ac_compiler_gnu=$ac_cv_c_compiler_gnu
1941ac_main_return=return
1942echo "$as_me:1942: checking how to run the C preprocessor" >&5
1943echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1944# On Suns, sometimes $CPP names a directory.
1945if test -n "$CPP" && test -d "$CPP"; then
1946  CPP=
1947fi
1948if test -z "$CPP"; then
1949  if test "${ac_cv_prog_CPP+set}" = set; then
1950  echo $ECHO_N "(cached) $ECHO_C" >&6
1951else
1952      # Double quotes because CPP needs to be expanded
1953    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1954    do
1955      ac_preproc_ok=false
1956for ac_c_preproc_warn_flag in '' yes
1957do
1958  # Use a header file that comes with gcc, so configuring glibc
1959  # with a fresh cross-compiler works.
1960  # On the NeXT, cc -E runs the code through the compiler's parser,
1961  # not just through cpp. "Syntax error" is here to catch this case.
1962  cat >conftest.$ac_ext <<_ACEOF
1963#line 1963 "configure"
1964#include "confdefs.h"
1965#include <assert.h>
1966                     Syntax error
1967_ACEOF
1968if { (eval echo "$as_me:1968: \"$ac_cpp conftest.$ac_ext\"") >&5
1969  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1970  ac_status=$?
1971  egrep -v '^ *\+' conftest.er1 >conftest.err
1972  rm -f conftest.er1
1973  cat conftest.err >&5
1974  echo "$as_me:1974: \$? = $ac_status" >&5
1975  (exit $ac_status); } >/dev/null; then
1976  if test -s conftest.err; then
1977    ac_cpp_err=$ac_c_preproc_warn_flag
1978  else
1979    ac_cpp_err=
1980  fi
1981else
1982  ac_cpp_err=yes
1983fi
1984if test -z "$ac_cpp_err"; then
1985  :
1986else
1987  echo "$as_me: failed program was:" >&5
1988  cat conftest.$ac_ext >&5
1989  # Broken: fails on valid input.
1990continue
1991fi
1992rm -f conftest.err conftest.$ac_ext
1993
1994  # OK, works on sane cases.  Now check whether non-existent headers
1995  # can be detected and how.
1996  cat >conftest.$ac_ext <<_ACEOF
1997#line 1997 "configure"
1998#include "confdefs.h"
1999#include <ac_nonexistent.h>
2000_ACEOF
2001if { (eval echo "$as_me:2001: \"$ac_cpp conftest.$ac_ext\"") >&5
2002  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2003  ac_status=$?
2004  egrep -v '^ *\+' conftest.er1 >conftest.err
2005  rm -f conftest.er1
2006  cat conftest.err >&5
2007  echo "$as_me:2007: \$? = $ac_status" >&5
2008  (exit $ac_status); } >/dev/null; then
2009  if test -s conftest.err; then
2010    ac_cpp_err=$ac_c_preproc_warn_flag
2011  else
2012    ac_cpp_err=
2013  fi
2014else
2015  ac_cpp_err=yes
2016fi
2017if test -z "$ac_cpp_err"; then
2018  # Broken: success on invalid input.
2019continue
2020else
2021  echo "$as_me: failed program was:" >&5
2022  cat conftest.$ac_ext >&5
2023  # Passes both tests.
2024ac_preproc_ok=:
2025break
2026fi
2027rm -f conftest.err conftest.$ac_ext
2028
2029done
2030# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2031rm -f conftest.err conftest.$ac_ext
2032if $ac_preproc_ok; then
2033  break
2034fi
2035
2036    done
2037    ac_cv_prog_CPP=$CPP
2038
2039fi
2040  CPP=$ac_cv_prog_CPP
2041else
2042  ac_cv_prog_CPP=$CPP
2043fi
2044echo "$as_me:2044: result: $CPP" >&5
2045echo "${ECHO_T}$CPP" >&6
2046ac_preproc_ok=false
2047for ac_c_preproc_warn_flag in '' yes
2048do
2049  # Use a header file that comes with gcc, so configuring glibc
2050  # with a fresh cross-compiler works.
2051  # On the NeXT, cc -E runs the code through the compiler's parser,
2052  # not just through cpp. "Syntax error" is here to catch this case.
2053  cat >conftest.$ac_ext <<_ACEOF
2054#line 2054 "configure"
2055#include "confdefs.h"
2056#include <assert.h>
2057                     Syntax error
2058_ACEOF
2059if { (eval echo "$as_me:2059: \"$ac_cpp conftest.$ac_ext\"") >&5
2060  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2061  ac_status=$?
2062  egrep -v '^ *\+' conftest.er1 >conftest.err
2063  rm -f conftest.er1
2064  cat conftest.err >&5
2065  echo "$as_me:2065: \$? = $ac_status" >&5
2066  (exit $ac_status); } >/dev/null; then
2067  if test -s conftest.err; then
2068    ac_cpp_err=$ac_c_preproc_warn_flag
2069  else
2070    ac_cpp_err=
2071  fi
2072else
2073  ac_cpp_err=yes
2074fi
2075if test -z "$ac_cpp_err"; then
2076  :
2077else
2078  echo "$as_me: failed program was:" >&5
2079  cat conftest.$ac_ext >&5
2080  # Broken: fails on valid input.
2081continue
2082fi
2083rm -f conftest.err conftest.$ac_ext
2084
2085  # OK, works on sane cases.  Now check whether non-existent headers
2086  # can be detected and how.
2087  cat >conftest.$ac_ext <<_ACEOF
2088#line 2088 "configure"
2089#include "confdefs.h"
2090#include <ac_nonexistent.h>
2091_ACEOF
2092if { (eval echo "$as_me:2092: \"$ac_cpp conftest.$ac_ext\"") >&5
2093  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2094  ac_status=$?
2095  egrep -v '^ *\+' conftest.er1 >conftest.err
2096  rm -f conftest.er1
2097  cat conftest.err >&5
2098  echo "$as_me:2098: \$? = $ac_status" >&5
2099  (exit $ac_status); } >/dev/null; then
2100  if test -s conftest.err; then
2101    ac_cpp_err=$ac_c_preproc_warn_flag
2102  else
2103    ac_cpp_err=
2104  fi
2105else
2106  ac_cpp_err=yes
2107fi
2108if test -z "$ac_cpp_err"; then
2109  # Broken: success on invalid input.
2110continue
2111else
2112  echo "$as_me: failed program was:" >&5
2113  cat conftest.$ac_ext >&5
2114  # Passes both tests.
2115ac_preproc_ok=:
2116break
2117fi
2118rm -f conftest.err conftest.$ac_ext
2119
2120done
2121# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2122rm -f conftest.err conftest.$ac_ext
2123if $ac_preproc_ok; then
2124  :
2125else
2126  { { echo "$as_me:2126: error: C preprocessor \"$CPP\" fails sanity check" >&5
2127echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2128   { (exit 1); exit 1; }; }
2129fi
2130
2131ac_ext=c
2132ac_cpp='$CPP $CPPFLAGS'
2133ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2134ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2135ac_compiler_gnu=$ac_cv_c_compiler_gnu
2136ac_main_return=return
2137
2138echo "$as_me:2138: checking whether ${MAKE-make} sets \${MAKE}" >&5
2139echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2140set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2141if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2142  echo $ECHO_N "(cached) $ECHO_C" >&6
2143else
2144  cat >conftest.make <<\EOF
2145all:
2146	@echo 'ac_maketemp="${MAKE}"'
2147EOF
2148# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2149eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2150if test -n "$ac_maketemp"; then
2151  eval ac_cv_prog_make_${ac_make}_set=yes
2152else
2153  eval ac_cv_prog_make_${ac_make}_set=no
2154fi
2155rm -f conftest.make
2156fi
2157if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2158  echo "$as_me:2158: result: yes" >&5
2159echo "${ECHO_T}yes" >&6
2160  SET_MAKE=
2161else
2162  echo "$as_me:2162: result: no" >&5
2163echo "${ECHO_T}no" >&6
2164  SET_MAKE="MAKE=${MAKE-make}"
2165fi
2166
2167if test -n "$ac_tool_prefix"; then
2168  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2169set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2170echo "$as_me:2170: checking for $ac_word" >&5
2171echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2172if test "${ac_cv_prog_RANLIB+set}" = set; then
2173  echo $ECHO_N "(cached) $ECHO_C" >&6
2174else
2175  if test -n "$RANLIB"; then
2176  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2177else
2178  ac_save_IFS=$IFS; IFS=$ac_path_separator
2179ac_dummy="$PATH"
2180for ac_dir in $ac_dummy; do
2181  IFS=$ac_save_IFS
2182  test -z "$ac_dir" && ac_dir=.
2183  $as_executable_p "$ac_dir/$ac_word" || continue
2184ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2185echo "$as_me:2185: found $ac_dir/$ac_word" >&5
2186break
2187done
2188
2189fi
2190fi
2191RANLIB=$ac_cv_prog_RANLIB
2192if test -n "$RANLIB"; then
2193  echo "$as_me:2193: result: $RANLIB" >&5
2194echo "${ECHO_T}$RANLIB" >&6
2195else
2196  echo "$as_me:2196: result: no" >&5
2197echo "${ECHO_T}no" >&6
2198fi
2199
2200fi
2201if test -z "$ac_cv_prog_RANLIB"; then
2202  ac_ct_RANLIB=$RANLIB
2203  # Extract the first word of "ranlib", so it can be a program name with args.
2204set dummy ranlib; ac_word=$2
2205echo "$as_me:2205: checking for $ac_word" >&5
2206echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2207if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2208  echo $ECHO_N "(cached) $ECHO_C" >&6
2209else
2210  if test -n "$ac_ct_RANLIB"; then
2211  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2212else
2213  ac_save_IFS=$IFS; IFS=$ac_path_separator
2214ac_dummy="$PATH"
2215for ac_dir in $ac_dummy; do
2216  IFS=$ac_save_IFS
2217  test -z "$ac_dir" && ac_dir=.
2218  $as_executable_p "$ac_dir/$ac_word" || continue
2219ac_cv_prog_ac_ct_RANLIB="ranlib"
2220echo "$as_me:2220: found $ac_dir/$ac_word" >&5
2221break
2222done
2223
2224  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2225fi
2226fi
2227ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2228if test -n "$ac_ct_RANLIB"; then
2229  echo "$as_me:2229: result: $ac_ct_RANLIB" >&5
2230echo "${ECHO_T}$ac_ct_RANLIB" >&6
2231else
2232  echo "$as_me:2232: result: no" >&5
2233echo "${ECHO_T}no" >&6
2234fi
2235
2236  RANLIB=$ac_ct_RANLIB
2237else
2238  RANLIB="$ac_cv_prog_RANLIB"
2239fi
2240
2241ac_aux_dir=
2242for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2243  if test -f $ac_dir/install-sh; then
2244    ac_aux_dir=$ac_dir
2245    ac_install_sh="$ac_aux_dir/install-sh -c"
2246    break
2247  elif test -f $ac_dir/install.sh; then
2248    ac_aux_dir=$ac_dir
2249    ac_install_sh="$ac_aux_dir/install.sh -c"
2250    break
2251  elif test -f $ac_dir/shtool; then
2252    ac_aux_dir=$ac_dir
2253    ac_install_sh="$ac_aux_dir/shtool install -c"
2254    break
2255  fi
2256done
2257if test -z "$ac_aux_dir"; then
2258  { { echo "$as_me:2258: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2259echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2260   { (exit 1); exit 1; }; }
2261fi
2262ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2263ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2264ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2265
2266# Find a good install program.  We prefer a C program (faster),
2267# so one script is as good as another.  But avoid the broken or
2268# incompatible versions:
2269# SysV /etc/install, /usr/sbin/install
2270# SunOS /usr/etc/install
2271# IRIX /sbin/install
2272# AIX /bin/install
2273# AmigaOS /C/install, which installs bootblocks on floppy discs
2274# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2275# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2276# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2277# ./install, which can be erroneously created by make from ./install.sh.
2278echo "$as_me:2278: checking for a BSD compatible install" >&5
2279echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2280if test -z "$INSTALL"; then
2281if test "${ac_cv_path_install+set}" = set; then
2282  echo $ECHO_N "(cached) $ECHO_C" >&6
2283else
2284    ac_save_IFS=$IFS; IFS=$ac_path_separator
2285  for ac_dir in $PATH; do
2286    IFS=$ac_save_IFS
2287    # Account for people who put trailing slashes in PATH elements.
2288    case $ac_dir/ in
2289    / | ./ | .// | /cC/* \
2290    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2291    | /usr/ucb/* ) ;;
2292    *)
2293      # OSF1 and SCO ODT 3.0 have their own names for install.
2294      # Don't use installbsd from OSF since it installs stuff as root
2295      # by default.
2296      for ac_prog in ginstall scoinst install; do
2297        if $as_executable_p "$ac_dir/$ac_prog"; then
2298	  if test $ac_prog = install &&
2299            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2300	    # AIX install.  It has an incompatible calling convention.
2301	    :
2302	  elif test $ac_prog = install &&
2303	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2304	    # program-specific install script used by HP pwplus--don't use.
2305	    :
2306	  else
2307	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2308	    break 2
2309	  fi
2310	fi
2311      done
2312      ;;
2313    esac
2314  done
2315
2316fi
2317  if test "${ac_cv_path_install+set}" = set; then
2318    INSTALL=$ac_cv_path_install
2319  else
2320    # As a last resort, use the slow shell script.  We don't cache a
2321    # path for INSTALL within a source directory, because that will
2322    # break other packages using the cache if that directory is
2323    # removed, or if the path is relative.
2324    INSTALL=$ac_install_sh
2325  fi
2326fi
2327echo "$as_me:2327: result: $INSTALL" >&5
2328echo "${ECHO_T}$INSTALL" >&6
2329
2330# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2331# It thinks the first close brace ends the variable substitution.
2332test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2333
2334test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2335
2336test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2337
2338for ac_prog in tdlint lint alint splint lclint
2339do
2340  # Extract the first word of "$ac_prog", so it can be a program name with args.
2341set dummy $ac_prog; ac_word=$2
2342echo "$as_me:2342: checking for $ac_word" >&5
2343echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2344if test "${ac_cv_prog_LINT+set}" = set; then
2345  echo $ECHO_N "(cached) $ECHO_C" >&6
2346else
2347  if test -n "$LINT"; then
2348  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2349else
2350  ac_save_IFS=$IFS; IFS=$ac_path_separator
2351ac_dummy="$PATH"
2352for ac_dir in $ac_dummy; do
2353  IFS=$ac_save_IFS
2354  test -z "$ac_dir" && ac_dir=.
2355  $as_executable_p "$ac_dir/$ac_word" || continue
2356ac_cv_prog_LINT="$ac_prog"
2357echo "$as_me:2357: found $ac_dir/$ac_word" >&5
2358break
2359done
2360
2361fi
2362fi
2363LINT=$ac_cv_prog_LINT
2364if test -n "$LINT"; then
2365  echo "$as_me:2365: result: $LINT" >&5
2366echo "${ECHO_T}$LINT" >&6
2367else
2368  echo "$as_me:2368: result: no" >&5
2369echo "${ECHO_T}no" >&6
2370fi
2371
2372  test -n "$LINT" && break
2373done
2374
2375if test -n "$ac_tool_prefix"; then
2376  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2377set dummy ${ac_tool_prefix}ar; ac_word=$2
2378echo "$as_me:2378: checking for $ac_word" >&5
2379echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2380if test "${ac_cv_prog_AR+set}" = set; then
2381  echo $ECHO_N "(cached) $ECHO_C" >&6
2382else
2383  if test -n "$AR"; then
2384  ac_cv_prog_AR="$AR" # Let the user override the test.
2385else
2386  ac_save_IFS=$IFS; IFS=$ac_path_separator
2387ac_dummy="$PATH"
2388for ac_dir in $ac_dummy; do
2389  IFS=$ac_save_IFS
2390  test -z "$ac_dir" && ac_dir=.
2391  $as_executable_p "$ac_dir/$ac_word" || continue
2392ac_cv_prog_AR="${ac_tool_prefix}ar"
2393echo "$as_me:2393: found $ac_dir/$ac_word" >&5
2394break
2395done
2396
2397fi
2398fi
2399AR=$ac_cv_prog_AR
2400if test -n "$AR"; then
2401  echo "$as_me:2401: result: $AR" >&5
2402echo "${ECHO_T}$AR" >&6
2403else
2404  echo "$as_me:2404: result: no" >&5
2405echo "${ECHO_T}no" >&6
2406fi
2407
2408fi
2409if test -z "$ac_cv_prog_AR"; then
2410  ac_ct_AR=$AR
2411  # Extract the first word of "ar", so it can be a program name with args.
2412set dummy ar; ac_word=$2
2413echo "$as_me:2413: checking for $ac_word" >&5
2414echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2415if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
2416  echo $ECHO_N "(cached) $ECHO_C" >&6
2417else
2418  if test -n "$ac_ct_AR"; then
2419  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
2420else
2421  ac_save_IFS=$IFS; IFS=$ac_path_separator
2422ac_dummy="$PATH"
2423for ac_dir in $ac_dummy; do
2424  IFS=$ac_save_IFS
2425  test -z "$ac_dir" && ac_dir=.
2426  $as_executable_p "$ac_dir/$ac_word" || continue
2427ac_cv_prog_ac_ct_AR="ar"
2428echo "$as_me:2428: found $ac_dir/$ac_word" >&5
2429break
2430done
2431
2432  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
2433fi
2434fi
2435ac_ct_AR=$ac_cv_prog_ac_ct_AR
2436if test -n "$ac_ct_AR"; then
2437  echo "$as_me:2437: result: $ac_ct_AR" >&5
2438echo "${ECHO_T}$ac_ct_AR" >&6
2439else
2440  echo "$as_me:2440: result: no" >&5
2441echo "${ECHO_T}no" >&6
2442fi
2443
2444  AR=$ac_ct_AR
2445else
2446  AR="$ac_cv_prog_AR"
2447fi
2448
2449echo "$as_me:2449: checking for makeflags variable" >&5
2450echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2451if test "${cf_cv_makeflags+set}" = set; then
2452  echo $ECHO_N "(cached) $ECHO_C" >&6
2453else
2454
2455	cf_cv_makeflags=''
2456	for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2457	do
2458		cat >cf_makeflags.tmp <<CF_EOF
2459SHELL = /bin/sh
2460all :
2461	@ echo '.$cf_option'
2462CF_EOF
2463		cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ 	]*$,,'`
2464		case "$cf_result" in
2465		.*k)
2466			cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2467			case "$cf_result" in
2468			.*CC=*)	cf_cv_makeflags=
2469				;;
2470			*)	cf_cv_makeflags=$cf_option
2471				;;
2472			esac
2473			break
2474			;;
2475		.-)	;;
2476		*)	echo "given option \"$cf_option\", no match \"$cf_result\""
2477			;;
2478		esac
2479	done
2480	rm -f cf_makeflags.tmp
2481
2482fi
2483echo "$as_me:2483: result: $cf_cv_makeflags" >&5
2484echo "${ECHO_T}$cf_cv_makeflags" >&6
2485
2486echo "$as_me:2486: checking if filesystem supports mixed-case filenames" >&5
2487echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2488if test "${cf_cv_mixedcase+set}" = set; then
2489  echo $ECHO_N "(cached) $ECHO_C" >&6
2490else
2491
2492if test "$cross_compiling" = yes ; then
2493	case $target_alias in #(vi
2494	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2495		cf_cv_mixedcase=no
2496		;;
2497	*)
2498		cf_cv_mixedcase=yes
2499		;;
2500	esac
2501else
2502	rm -f conftest CONFTEST
2503	echo test >conftest
2504	if test -f CONFTEST ; then
2505		cf_cv_mixedcase=no
2506	else
2507		cf_cv_mixedcase=yes
2508	fi
2509	rm -f conftest CONFTEST
2510fi
2511
2512fi
2513echo "$as_me:2513: result: $cf_cv_mixedcase" >&5
2514echo "${ECHO_T}$cf_cv_mixedcase" >&6
2515test "$cf_cv_mixedcase" = yes &&
2516cat >>confdefs.h <<\EOF
2517#define MIXEDCASE_FILENAMES 1
2518EOF
2519
2520for ac_prog in exctags ctags
2521do
2522  # Extract the first word of "$ac_prog", so it can be a program name with args.
2523set dummy $ac_prog; ac_word=$2
2524echo "$as_me:2524: checking for $ac_word" >&5
2525echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2526if test "${ac_cv_prog_CTAGS+set}" = set; then
2527  echo $ECHO_N "(cached) $ECHO_C" >&6
2528else
2529  if test -n "$CTAGS"; then
2530  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2531else
2532  ac_save_IFS=$IFS; IFS=$ac_path_separator
2533ac_dummy="$PATH"
2534for ac_dir in $ac_dummy; do
2535  IFS=$ac_save_IFS
2536  test -z "$ac_dir" && ac_dir=.
2537  $as_executable_p "$ac_dir/$ac_word" || continue
2538ac_cv_prog_CTAGS="$ac_prog"
2539echo "$as_me:2539: found $ac_dir/$ac_word" >&5
2540break
2541done
2542
2543fi
2544fi
2545CTAGS=$ac_cv_prog_CTAGS
2546if test -n "$CTAGS"; then
2547  echo "$as_me:2547: result: $CTAGS" >&5
2548echo "${ECHO_T}$CTAGS" >&6
2549else
2550  echo "$as_me:2550: result: no" >&5
2551echo "${ECHO_T}no" >&6
2552fi
2553
2554  test -n "$CTAGS" && break
2555done
2556
2557for ac_prog in exetags etags
2558do
2559  # Extract the first word of "$ac_prog", so it can be a program name with args.
2560set dummy $ac_prog; ac_word=$2
2561echo "$as_me:2561: checking for $ac_word" >&5
2562echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2563if test "${ac_cv_prog_ETAGS+set}" = set; then
2564  echo $ECHO_N "(cached) $ECHO_C" >&6
2565else
2566  if test -n "$ETAGS"; then
2567  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2568else
2569  ac_save_IFS=$IFS; IFS=$ac_path_separator
2570ac_dummy="$PATH"
2571for ac_dir in $ac_dummy; do
2572  IFS=$ac_save_IFS
2573  test -z "$ac_dir" && ac_dir=.
2574  $as_executable_p "$ac_dir/$ac_word" || continue
2575ac_cv_prog_ETAGS="$ac_prog"
2576echo "$as_me:2576: found $ac_dir/$ac_word" >&5
2577break
2578done
2579
2580fi
2581fi
2582ETAGS=$ac_cv_prog_ETAGS
2583if test -n "$ETAGS"; then
2584  echo "$as_me:2584: result: $ETAGS" >&5
2585echo "${ECHO_T}$ETAGS" >&6
2586else
2587  echo "$as_me:2587: result: no" >&5
2588echo "${ECHO_T}no" >&6
2589fi
2590
2591  test -n "$ETAGS" && break
2592done
2593
2594# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2595set dummy ${CTAGS:-ctags}; ac_word=$2
2596echo "$as_me:2596: checking for $ac_word" >&5
2597echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2598if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2599  echo $ECHO_N "(cached) $ECHO_C" >&6
2600else
2601  if test -n "$MAKE_LOWER_TAGS"; then
2602  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2603else
2604  ac_save_IFS=$IFS; IFS=$ac_path_separator
2605ac_dummy="$PATH"
2606for ac_dir in $ac_dummy; do
2607  IFS=$ac_save_IFS
2608  test -z "$ac_dir" && ac_dir=.
2609  $as_executable_p "$ac_dir/$ac_word" || continue
2610ac_cv_prog_MAKE_LOWER_TAGS="yes"
2611echo "$as_me:2611: found $ac_dir/$ac_word" >&5
2612break
2613done
2614
2615  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2616fi
2617fi
2618MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2619if test -n "$MAKE_LOWER_TAGS"; then
2620  echo "$as_me:2620: result: $MAKE_LOWER_TAGS" >&5
2621echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2622else
2623  echo "$as_me:2623: result: no" >&5
2624echo "${ECHO_T}no" >&6
2625fi
2626
2627if test "$cf_cv_mixedcase" = yes ; then
2628	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2629set dummy ${ETAGS:-etags}; ac_word=$2
2630echo "$as_me:2630: checking for $ac_word" >&5
2631echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2632if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2633  echo $ECHO_N "(cached) $ECHO_C" >&6
2634else
2635  if test -n "$MAKE_UPPER_TAGS"; then
2636  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2637else
2638  ac_save_IFS=$IFS; IFS=$ac_path_separator
2639ac_dummy="$PATH"
2640for ac_dir in $ac_dummy; do
2641  IFS=$ac_save_IFS
2642  test -z "$ac_dir" && ac_dir=.
2643  $as_executable_p "$ac_dir/$ac_word" || continue
2644ac_cv_prog_MAKE_UPPER_TAGS="yes"
2645echo "$as_me:2645: found $ac_dir/$ac_word" >&5
2646break
2647done
2648
2649  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2650fi
2651fi
2652MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2653if test -n "$MAKE_UPPER_TAGS"; then
2654  echo "$as_me:2654: result: $MAKE_UPPER_TAGS" >&5
2655echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2656else
2657  echo "$as_me:2657: result: no" >&5
2658echo "${ECHO_T}no" >&6
2659fi
2660
2661else
2662	MAKE_UPPER_TAGS=no
2663fi
2664
2665if test "$MAKE_UPPER_TAGS" = yes ; then
2666	MAKE_UPPER_TAGS=
2667else
2668	MAKE_UPPER_TAGS="#"
2669fi
2670
2671if test "$MAKE_LOWER_TAGS" = yes ; then
2672	MAKE_LOWER_TAGS=
2673else
2674	MAKE_LOWER_TAGS="#"
2675fi
2676
2677echo "$as_me:2677: checking if you want to see long compiling messages" >&5
2678echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
2679
2680# Check whether --enable-echo or --disable-echo was given.
2681if test "${enable_echo+set}" = set; then
2682  enableval="$enable_echo"
2683  test "$enableval" != no && enableval=yes
2684  if test "$enableval" != "yes" ; then
2685
2686    ECHO_LT='--silent'
2687    ECHO_LD='@echo linking $@;'
2688    RULE_CC='@echo compiling $<'
2689    SHOW_CC='@echo compiling $@'
2690    ECHO_CC='@'
2691
2692  else
2693
2694    ECHO_LT=''
2695    ECHO_LD=''
2696    RULE_CC=''
2697    SHOW_CC=''
2698    ECHO_CC=''
2699
2700  fi
2701else
2702  enableval=yes
2703
2704    ECHO_LT=''
2705    ECHO_LD=''
2706    RULE_CC=''
2707    SHOW_CC=''
2708    ECHO_CC=''
2709
2710fi;
2711echo "$as_me:2711: result: $enableval" >&5
2712echo "${ECHO_T}$enableval" >&6
2713
2714# Make sure we can run config.sub.
2715$ac_config_sub sun4 >/dev/null 2>&1 ||
2716  { { echo "$as_me:2716: error: cannot run $ac_config_sub" >&5
2717echo "$as_me: error: cannot run $ac_config_sub" >&2;}
2718   { (exit 1); exit 1; }; }
2719
2720echo "$as_me:2720: checking build system type" >&5
2721echo $ECHO_N "checking build system type... $ECHO_C" >&6
2722if test "${ac_cv_build+set}" = set; then
2723  echo $ECHO_N "(cached) $ECHO_C" >&6
2724else
2725  ac_cv_build_alias=$build_alias
2726test -z "$ac_cv_build_alias" &&
2727  ac_cv_build_alias=`$ac_config_guess`
2728test -z "$ac_cv_build_alias" &&
2729  { { echo "$as_me:2729: error: cannot guess build type; you must specify one" >&5
2730echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2731   { (exit 1); exit 1; }; }
2732ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
2733  { { echo "$as_me:2733: error: $ac_config_sub $ac_cv_build_alias failed." >&5
2734echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
2735   { (exit 1); exit 1; }; }
2736
2737fi
2738echo "$as_me:2738: result: $ac_cv_build" >&5
2739echo "${ECHO_T}$ac_cv_build" >&6
2740build=$ac_cv_build
2741build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2742build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2743build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2744
2745if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
2746	echo "$as_me:2746: checking host system type" >&5
2747echo $ECHO_N "checking host system type... $ECHO_C" >&6
2748if test "${ac_cv_host+set}" = set; then
2749  echo $ECHO_N "(cached) $ECHO_C" >&6
2750else
2751  ac_cv_host_alias=$host_alias
2752test -z "$ac_cv_host_alias" &&
2753  ac_cv_host_alias=$ac_cv_build_alias
2754ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
2755  { { echo "$as_me:2755: error: $ac_config_sub $ac_cv_host_alias failed" >&5
2756echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
2757   { (exit 1); exit 1; }; }
2758
2759fi
2760echo "$as_me:2760: result: $ac_cv_host" >&5
2761echo "${ECHO_T}$ac_cv_host" >&6
2762host=$ac_cv_host
2763host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2764host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2765host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2766
2767	system_name="$host_os"
2768else
2769	system_name="`(uname -s -r) 2>/dev/null`"
2770	if test -z "$system_name" ; then
2771		system_name="`(hostname) 2>/dev/null`"
2772	fi
2773fi
2774test -n "$system_name" &&
2775cat >>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" &&
2811cat >>confdefs.h <<EOF
2812#define PROG_EXT "$PROG_EXT"
2813EOF
2814
2815	echo "$as_me:2815: checking for PATH separator" >&5
2816echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
2817	case $cf_cv_system_name in
2818	os2*)	PATH_SEPARATOR=';'  ;;
2819	*)	${PATH_SEPARATOR:=':'}  ;;
2820	esac
2821
2822	echo "$as_me:2822: result: $PATH_SEPARATOR" >&5
2823echo "${ECHO_T}$PATH_SEPARATOR" >&6
2824
2825	case $cf_cv_system_name in #(vi
2826	OS/2*|os2*) #(vi
2827        LIB_PREFIX=''
2828        ;;
2829	*)	LIB_PREFIX='lib'
2830        ;;
2831	esac
2832
2833cf_XOPEN_SOURCE=500
2834cf_POSIX_C_SOURCE=199506L
2835cf_xopen_source=
2836
2837case $host_os in #(vi
2838aix[4-7]*) #(vi
2839	cf_xopen_source="-D_ALL_SOURCE"
2840	;;
2841cygwin) #(vi
2842	cf_XOPEN_SOURCE=600
2843	;;
2844darwin[0-8].*) #(vi
2845	cf_xopen_source="-D_APPLE_C_SOURCE"
2846	;;
2847darwin*) #(vi
2848	cf_xopen_source="-D_DARWIN_C_SOURCE"
2849	cf_XOPEN_SOURCE=
2850	;;
2851freebsd*|dragonfly*) #(vi
2852	# 5.x headers associate
2853	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2854	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2855	cf_POSIX_C_SOURCE=200112L
2856	cf_XOPEN_SOURCE=600
2857	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2858	;;
2859hpux11*) #(vi
2860	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2861	;;
2862hpux*) #(vi
2863	cf_xopen_source="-D_HPUX_SOURCE"
2864	;;
2865irix[56].*) #(vi
2866	cf_xopen_source="-D_SGI_SOURCE"
2867	cf_XOPEN_SOURCE=
2868	;;
2869linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2870
2871echo "$as_me:2871: checking if we must define _GNU_SOURCE" >&5
2872echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2873if test "${cf_cv_gnu_source+set}" = set; then
2874  echo $ECHO_N "(cached) $ECHO_C" >&6
2875else
2876
2877cat >conftest.$ac_ext <<_ACEOF
2878#line 2878 "configure"
2879#include "confdefs.h"
2880#include <sys/types.h>
2881int
2882main ()
2883{
2884
2885#ifndef _XOPEN_SOURCE
2886make an error
2887#endif
2888  ;
2889  return 0;
2890}
2891_ACEOF
2892rm -f conftest.$ac_objext
2893if { (eval echo "$as_me:2893: \"$ac_compile\"") >&5
2894  (eval $ac_compile) 2>&5
2895  ac_status=$?
2896  echo "$as_me:2896: \$? = $ac_status" >&5
2897  (exit $ac_status); } &&
2898         { ac_try='test -s conftest.$ac_objext'
2899  { (eval echo "$as_me:2899: \"$ac_try\"") >&5
2900  (eval $ac_try) 2>&5
2901  ac_status=$?
2902  echo "$as_me:2902: \$? = $ac_status" >&5
2903  (exit $ac_status); }; }; then
2904  cf_cv_gnu_source=no
2905else
2906  echo "$as_me: failed program was:" >&5
2907cat conftest.$ac_ext >&5
2908cf_save="$CPPFLAGS"
2909	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2910	 cat >conftest.$ac_ext <<_ACEOF
2911#line 2911 "configure"
2912#include "confdefs.h"
2913#include <sys/types.h>
2914int
2915main ()
2916{
2917
2918#ifdef _XOPEN_SOURCE
2919make an error
2920#endif
2921  ;
2922  return 0;
2923}
2924_ACEOF
2925rm -f conftest.$ac_objext
2926if { (eval echo "$as_me:2926: \"$ac_compile\"") >&5
2927  (eval $ac_compile) 2>&5
2928  ac_status=$?
2929  echo "$as_me:2929: \$? = $ac_status" >&5
2930  (exit $ac_status); } &&
2931         { ac_try='test -s conftest.$ac_objext'
2932  { (eval echo "$as_me:2932: \"$ac_try\"") >&5
2933  (eval $ac_try) 2>&5
2934  ac_status=$?
2935  echo "$as_me:2935: \$? = $ac_status" >&5
2936  (exit $ac_status); }; }; then
2937  cf_cv_gnu_source=no
2938else
2939  echo "$as_me: failed program was:" >&5
2940cat conftest.$ac_ext >&5
2941cf_cv_gnu_source=yes
2942fi
2943rm -f conftest.$ac_objext conftest.$ac_ext
2944	CPPFLAGS="$cf_save"
2945
2946fi
2947rm -f conftest.$ac_objext conftest.$ac_ext
2948
2949fi
2950echo "$as_me:2950: result: $cf_cv_gnu_source" >&5
2951echo "${ECHO_T}$cf_cv_gnu_source" >&6
2952test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2953
2954	;;
2955mirbsd*) #(vi
2956	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2957	cf_XOPEN_SOURCE=
2958
2959cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2960
2961cf_save_CFLAGS="$CFLAGS"
2962cf_save_CPPFLAGS="$CPPFLAGS"
2963
2964cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2965	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
2966		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
2967
2968cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2969	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
2970		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
2971
2972echo "$as_me:2972: checking if we should define _POSIX_C_SOURCE" >&5
2973echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
2974if test "${cf_cv_posix_c_source+set}" = set; then
2975  echo $ECHO_N "(cached) $ECHO_C" >&6
2976else
2977
2978echo "${as_me:-configure}:2978: testing if the symbol is already defined go no further ..." 1>&5
2979
2980	cat >conftest.$ac_ext <<_ACEOF
2981#line 2981 "configure"
2982#include "confdefs.h"
2983#include <sys/types.h>
2984int
2985main ()
2986{
2987
2988#ifndef _POSIX_C_SOURCE
2989make an error
2990#endif
2991  ;
2992  return 0;
2993}
2994_ACEOF
2995rm -f conftest.$ac_objext
2996if { (eval echo "$as_me:2996: \"$ac_compile\"") >&5
2997  (eval $ac_compile) 2>&5
2998  ac_status=$?
2999  echo "$as_me:2999: \$? = $ac_status" >&5
3000  (exit $ac_status); } &&
3001         { ac_try='test -s conftest.$ac_objext'
3002  { (eval echo "$as_me:3002: \"$ac_try\"") >&5
3003  (eval $ac_try) 2>&5
3004  ac_status=$?
3005  echo "$as_me:3005: \$? = $ac_status" >&5
3006  (exit $ac_status); }; }; then
3007  cf_cv_posix_c_source=no
3008else
3009  echo "$as_me: failed program was:" >&5
3010cat conftest.$ac_ext >&5
3011cf_want_posix_source=no
3012	 case .$cf_POSIX_C_SOURCE in #(vi
3013	 .[12]??*) #(vi
3014		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3015		;;
3016	 .2) #(vi
3017		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3018		cf_want_posix_source=yes
3019		;;
3020	 .*)
3021		cf_want_posix_source=yes
3022		;;
3023	 esac
3024	 if test "$cf_want_posix_source" = yes ; then
3025		cat >conftest.$ac_ext <<_ACEOF
3026#line 3026 "configure"
3027#include "confdefs.h"
3028#include <sys/types.h>
3029int
3030main ()
3031{
3032
3033#ifdef _POSIX_SOURCE
3034make an error
3035#endif
3036  ;
3037  return 0;
3038}
3039_ACEOF
3040rm -f conftest.$ac_objext
3041if { (eval echo "$as_me:3041: \"$ac_compile\"") >&5
3042  (eval $ac_compile) 2>&5
3043  ac_status=$?
3044  echo "$as_me:3044: \$? = $ac_status" >&5
3045  (exit $ac_status); } &&
3046         { ac_try='test -s conftest.$ac_objext'
3047  { (eval echo "$as_me:3047: \"$ac_try\"") >&5
3048  (eval $ac_try) 2>&5
3049  ac_status=$?
3050  echo "$as_me:3050: \$? = $ac_status" >&5
3051  (exit $ac_status); }; }; then
3052  :
3053else
3054  echo "$as_me: failed program was:" >&5
3055cat conftest.$ac_ext >&5
3056cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3057fi
3058rm -f conftest.$ac_objext conftest.$ac_ext
3059	 fi
3060
3061echo "${as_me:-configure}:3061: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3062
3063	 CFLAGS="$cf_trim_CFLAGS"
3064	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3065
3066echo "${as_me:-configure}:3066: testing if the second compile does not leave our definition intact error ..." 1>&5
3067
3068	 cat >conftest.$ac_ext <<_ACEOF
3069#line 3069 "configure"
3070#include "confdefs.h"
3071#include <sys/types.h>
3072int
3073main ()
3074{
3075
3076#ifndef _POSIX_C_SOURCE
3077make an error
3078#endif
3079  ;
3080  return 0;
3081}
3082_ACEOF
3083rm -f conftest.$ac_objext
3084if { (eval echo "$as_me:3084: \"$ac_compile\"") >&5
3085  (eval $ac_compile) 2>&5
3086  ac_status=$?
3087  echo "$as_me:3087: \$? = $ac_status" >&5
3088  (exit $ac_status); } &&
3089         { ac_try='test -s conftest.$ac_objext'
3090  { (eval echo "$as_me:3090: \"$ac_try\"") >&5
3091  (eval $ac_try) 2>&5
3092  ac_status=$?
3093  echo "$as_me:3093: \$? = $ac_status" >&5
3094  (exit $ac_status); }; }; then
3095  :
3096else
3097  echo "$as_me: failed program was:" >&5
3098cat conftest.$ac_ext >&5
3099cf_cv_posix_c_source=no
3100fi
3101rm -f conftest.$ac_objext conftest.$ac_ext
3102	 CFLAGS="$cf_save_CFLAGS"
3103	 CPPFLAGS="$cf_save_CPPFLAGS"
3104
3105fi
3106rm -f conftest.$ac_objext conftest.$ac_ext
3107
3108fi
3109echo "$as_me:3109: result: $cf_cv_posix_c_source" >&5
3110echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3111
3112if test "$cf_cv_posix_c_source" != no ; then
3113	CFLAGS="$cf_trim_CFLAGS"
3114	CPPFLAGS="$cf_trim_CPPFLAGS"
3115
3116cf_fix_cppflags=no
3117cf_new_cflags=
3118cf_new_cppflags=
3119cf_new_extra_cppflags=
3120
3121for cf_add_cflags in $cf_cv_posix_c_source
3122do
3123case $cf_fix_cppflags in
3124no)
3125	case $cf_add_cflags in #(vi
3126	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3127		case $cf_add_cflags in
3128		-D*)
3129			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3130
3131			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3132				&& test -z "${cf_tst_cflags}" \
3133				&& cf_fix_cppflags=yes
3134
3135			if test $cf_fix_cppflags = yes ; then
3136				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3137				continue
3138			elif test "${cf_tst_cflags}" = "\"'" ; then
3139				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3140				continue
3141			fi
3142			;;
3143		esac
3144		case "$CPPFLAGS" in
3145		*$cf_add_cflags) #(vi
3146			;;
3147		*) #(vi
3148			case $cf_add_cflags in #(vi
3149			-D*)
3150				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3151
3152CPPFLAGS=`echo "$CPPFLAGS" | \
3153	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3154		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3155
3156				;;
3157			esac
3158			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3159			;;
3160		esac
3161		;;
3162	*)
3163		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3164		;;
3165	esac
3166	;;
3167yes)
3168	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3169
3170	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3171
3172	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3173		&& test -z "${cf_tst_cflags}" \
3174		&& cf_fix_cppflags=no
3175	;;
3176esac
3177done
3178
3179if test -n "$cf_new_cflags" ; then
3180
3181	CFLAGS="$CFLAGS $cf_new_cflags"
3182fi
3183
3184if test -n "$cf_new_cppflags" ; then
3185
3186	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3187fi
3188
3189if test -n "$cf_new_extra_cppflags" ; then
3190
3191	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3192fi
3193
3194fi
3195
3196	;;
3197netbsd*) #(vi
3198	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3199	;;
3200openbsd[4-9]*) #(vi
3201	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3202	cf_xopen_source="-D_BSD_SOURCE"
3203	cf_XOPEN_SOURCE=600
3204	;;
3205openbsd*) #(vi
3206	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3207	;;
3208osf[45]*) #(vi
3209	cf_xopen_source="-D_OSF_SOURCE"
3210	;;
3211nto-qnx*) #(vi
3212	cf_xopen_source="-D_QNX_SOURCE"
3213	;;
3214sco*) #(vi
3215	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3216	;;
3217solaris2.*) #(vi
3218	cf_xopen_source="-D__EXTENSIONS__"
3219	;;
3220*)
3221
3222echo "$as_me:3222: checking if we should define _XOPEN_SOURCE" >&5
3223echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3224if test "${cf_cv_xopen_source+set}" = set; then
3225  echo $ECHO_N "(cached) $ECHO_C" >&6
3226else
3227
3228	cat >conftest.$ac_ext <<_ACEOF
3229#line 3229 "configure"
3230#include "confdefs.h"
3231
3232#include <stdlib.h>
3233#include <string.h>
3234#include <sys/types.h>
3235
3236int
3237main ()
3238{
3239
3240#ifndef _XOPEN_SOURCE
3241make an error
3242#endif
3243  ;
3244  return 0;
3245}
3246_ACEOF
3247rm -f conftest.$ac_objext
3248if { (eval echo "$as_me:3248: \"$ac_compile\"") >&5
3249  (eval $ac_compile) 2>&5
3250  ac_status=$?
3251  echo "$as_me:3251: \$? = $ac_status" >&5
3252  (exit $ac_status); } &&
3253         { ac_try='test -s conftest.$ac_objext'
3254  { (eval echo "$as_me:3254: \"$ac_try\"") >&5
3255  (eval $ac_try) 2>&5
3256  ac_status=$?
3257  echo "$as_me:3257: \$? = $ac_status" >&5
3258  (exit $ac_status); }; }; then
3259  cf_cv_xopen_source=no
3260else
3261  echo "$as_me: failed program was:" >&5
3262cat conftest.$ac_ext >&5
3263cf_save="$CPPFLAGS"
3264	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3265	 cat >conftest.$ac_ext <<_ACEOF
3266#line 3266 "configure"
3267#include "confdefs.h"
3268
3269#include <stdlib.h>
3270#include <string.h>
3271#include <sys/types.h>
3272
3273int
3274main ()
3275{
3276
3277#ifdef _XOPEN_SOURCE
3278make an error
3279#endif
3280  ;
3281  return 0;
3282}
3283_ACEOF
3284rm -f conftest.$ac_objext
3285if { (eval echo "$as_me:3285: \"$ac_compile\"") >&5
3286  (eval $ac_compile) 2>&5
3287  ac_status=$?
3288  echo "$as_me:3288: \$? = $ac_status" >&5
3289  (exit $ac_status); } &&
3290         { ac_try='test -s conftest.$ac_objext'
3291  { (eval echo "$as_me:3291: \"$ac_try\"") >&5
3292  (eval $ac_try) 2>&5
3293  ac_status=$?
3294  echo "$as_me:3294: \$? = $ac_status" >&5
3295  (exit $ac_status); }; }; then
3296  cf_cv_xopen_source=no
3297else
3298  echo "$as_me: failed program was:" >&5
3299cat conftest.$ac_ext >&5
3300cf_cv_xopen_source=$cf_XOPEN_SOURCE
3301fi
3302rm -f conftest.$ac_objext conftest.$ac_ext
3303	CPPFLAGS="$cf_save"
3304
3305fi
3306rm -f conftest.$ac_objext conftest.$ac_ext
3307
3308fi
3309echo "$as_me:3309: result: $cf_cv_xopen_source" >&5
3310echo "${ECHO_T}$cf_cv_xopen_source" >&6
3311
3312if test "$cf_cv_xopen_source" != no ; then
3313
3314CFLAGS=`echo "$CFLAGS" | \
3315	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3316		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3317
3318CPPFLAGS=`echo "$CPPFLAGS" | \
3319	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3320		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3321
3322	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3323
3324cf_fix_cppflags=no
3325cf_new_cflags=
3326cf_new_cppflags=
3327cf_new_extra_cppflags=
3328
3329for cf_add_cflags in $cf_temp_xopen_source
3330do
3331case $cf_fix_cppflags in
3332no)
3333	case $cf_add_cflags in #(vi
3334	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3335		case $cf_add_cflags in
3336		-D*)
3337			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3338
3339			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3340				&& test -z "${cf_tst_cflags}" \
3341				&& cf_fix_cppflags=yes
3342
3343			if test $cf_fix_cppflags = yes ; then
3344				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3345				continue
3346			elif test "${cf_tst_cflags}" = "\"'" ; then
3347				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3348				continue
3349			fi
3350			;;
3351		esac
3352		case "$CPPFLAGS" in
3353		*$cf_add_cflags) #(vi
3354			;;
3355		*) #(vi
3356			case $cf_add_cflags in #(vi
3357			-D*)
3358				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3359
3360CPPFLAGS=`echo "$CPPFLAGS" | \
3361	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3362		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3363
3364				;;
3365			esac
3366			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3367			;;
3368		esac
3369		;;
3370	*)
3371		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3372		;;
3373	esac
3374	;;
3375yes)
3376	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3377
3378	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3379
3380	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3381		&& test -z "${cf_tst_cflags}" \
3382		&& cf_fix_cppflags=no
3383	;;
3384esac
3385done
3386
3387if test -n "$cf_new_cflags" ; then
3388
3389	CFLAGS="$CFLAGS $cf_new_cflags"
3390fi
3391
3392if test -n "$cf_new_cppflags" ; then
3393
3394	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3395fi
3396
3397if test -n "$cf_new_extra_cppflags" ; then
3398
3399	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3400fi
3401
3402fi
3403
3404cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3405
3406cf_save_CFLAGS="$CFLAGS"
3407cf_save_CPPFLAGS="$CPPFLAGS"
3408
3409cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3410	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3411		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3412
3413cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3414	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3415		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3416
3417echo "$as_me:3417: checking if we should define _POSIX_C_SOURCE" >&5
3418echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3419if test "${cf_cv_posix_c_source+set}" = set; then
3420  echo $ECHO_N "(cached) $ECHO_C" >&6
3421else
3422
3423echo "${as_me:-configure}:3423: testing if the symbol is already defined go no further ..." 1>&5
3424
3425	cat >conftest.$ac_ext <<_ACEOF
3426#line 3426 "configure"
3427#include "confdefs.h"
3428#include <sys/types.h>
3429int
3430main ()
3431{
3432
3433#ifndef _POSIX_C_SOURCE
3434make an error
3435#endif
3436  ;
3437  return 0;
3438}
3439_ACEOF
3440rm -f conftest.$ac_objext
3441if { (eval echo "$as_me:3441: \"$ac_compile\"") >&5
3442  (eval $ac_compile) 2>&5
3443  ac_status=$?
3444  echo "$as_me:3444: \$? = $ac_status" >&5
3445  (exit $ac_status); } &&
3446         { ac_try='test -s conftest.$ac_objext'
3447  { (eval echo "$as_me:3447: \"$ac_try\"") >&5
3448  (eval $ac_try) 2>&5
3449  ac_status=$?
3450  echo "$as_me:3450: \$? = $ac_status" >&5
3451  (exit $ac_status); }; }; then
3452  cf_cv_posix_c_source=no
3453else
3454  echo "$as_me: failed program was:" >&5
3455cat conftest.$ac_ext >&5
3456cf_want_posix_source=no
3457	 case .$cf_POSIX_C_SOURCE in #(vi
3458	 .[12]??*) #(vi
3459		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3460		;;
3461	 .2) #(vi
3462		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3463		cf_want_posix_source=yes
3464		;;
3465	 .*)
3466		cf_want_posix_source=yes
3467		;;
3468	 esac
3469	 if test "$cf_want_posix_source" = yes ; then
3470		cat >conftest.$ac_ext <<_ACEOF
3471#line 3471 "configure"
3472#include "confdefs.h"
3473#include <sys/types.h>
3474int
3475main ()
3476{
3477
3478#ifdef _POSIX_SOURCE
3479make an error
3480#endif
3481  ;
3482  return 0;
3483}
3484_ACEOF
3485rm -f conftest.$ac_objext
3486if { (eval echo "$as_me:3486: \"$ac_compile\"") >&5
3487  (eval $ac_compile) 2>&5
3488  ac_status=$?
3489  echo "$as_me:3489: \$? = $ac_status" >&5
3490  (exit $ac_status); } &&
3491         { ac_try='test -s conftest.$ac_objext'
3492  { (eval echo "$as_me:3492: \"$ac_try\"") >&5
3493  (eval $ac_try) 2>&5
3494  ac_status=$?
3495  echo "$as_me:3495: \$? = $ac_status" >&5
3496  (exit $ac_status); }; }; then
3497  :
3498else
3499  echo "$as_me: failed program was:" >&5
3500cat conftest.$ac_ext >&5
3501cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3502fi
3503rm -f conftest.$ac_objext conftest.$ac_ext
3504	 fi
3505
3506echo "${as_me:-configure}:3506: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3507
3508	 CFLAGS="$cf_trim_CFLAGS"
3509	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3510
3511echo "${as_me:-configure}:3511: testing if the second compile does not leave our definition intact error ..." 1>&5
3512
3513	 cat >conftest.$ac_ext <<_ACEOF
3514#line 3514 "configure"
3515#include "confdefs.h"
3516#include <sys/types.h>
3517int
3518main ()
3519{
3520
3521#ifndef _POSIX_C_SOURCE
3522make an error
3523#endif
3524  ;
3525  return 0;
3526}
3527_ACEOF
3528rm -f conftest.$ac_objext
3529if { (eval echo "$as_me:3529: \"$ac_compile\"") >&5
3530  (eval $ac_compile) 2>&5
3531  ac_status=$?
3532  echo "$as_me:3532: \$? = $ac_status" >&5
3533  (exit $ac_status); } &&
3534         { ac_try='test -s conftest.$ac_objext'
3535  { (eval echo "$as_me:3535: \"$ac_try\"") >&5
3536  (eval $ac_try) 2>&5
3537  ac_status=$?
3538  echo "$as_me:3538: \$? = $ac_status" >&5
3539  (exit $ac_status); }; }; then
3540  :
3541else
3542  echo "$as_me: failed program was:" >&5
3543cat conftest.$ac_ext >&5
3544cf_cv_posix_c_source=no
3545fi
3546rm -f conftest.$ac_objext conftest.$ac_ext
3547	 CFLAGS="$cf_save_CFLAGS"
3548	 CPPFLAGS="$cf_save_CPPFLAGS"
3549
3550fi
3551rm -f conftest.$ac_objext conftest.$ac_ext
3552
3553fi
3554echo "$as_me:3554: result: $cf_cv_posix_c_source" >&5
3555echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3556
3557if test "$cf_cv_posix_c_source" != no ; then
3558	CFLAGS="$cf_trim_CFLAGS"
3559	CPPFLAGS="$cf_trim_CPPFLAGS"
3560
3561cf_fix_cppflags=no
3562cf_new_cflags=
3563cf_new_cppflags=
3564cf_new_extra_cppflags=
3565
3566for cf_add_cflags in $cf_cv_posix_c_source
3567do
3568case $cf_fix_cppflags in
3569no)
3570	case $cf_add_cflags in #(vi
3571	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3572		case $cf_add_cflags in
3573		-D*)
3574			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3575
3576			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3577				&& test -z "${cf_tst_cflags}" \
3578				&& cf_fix_cppflags=yes
3579
3580			if test $cf_fix_cppflags = yes ; then
3581				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3582				continue
3583			elif test "${cf_tst_cflags}" = "\"'" ; then
3584				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3585				continue
3586			fi
3587			;;
3588		esac
3589		case "$CPPFLAGS" in
3590		*$cf_add_cflags) #(vi
3591			;;
3592		*) #(vi
3593			case $cf_add_cflags in #(vi
3594			-D*)
3595				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3596
3597CPPFLAGS=`echo "$CPPFLAGS" | \
3598	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3599		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3600
3601				;;
3602			esac
3603			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3604			;;
3605		esac
3606		;;
3607	*)
3608		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3609		;;
3610	esac
3611	;;
3612yes)
3613	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3614
3615	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3616
3617	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3618		&& test -z "${cf_tst_cflags}" \
3619		&& cf_fix_cppflags=no
3620	;;
3621esac
3622done
3623
3624if test -n "$cf_new_cflags" ; then
3625
3626	CFLAGS="$CFLAGS $cf_new_cflags"
3627fi
3628
3629if test -n "$cf_new_cppflags" ; then
3630
3631	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3632fi
3633
3634if test -n "$cf_new_extra_cppflags" ; then
3635
3636	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3637fi
3638
3639fi
3640
3641	;;
3642esac
3643
3644if test -n "$cf_xopen_source" ; then
3645
3646cf_fix_cppflags=no
3647cf_new_cflags=
3648cf_new_cppflags=
3649cf_new_extra_cppflags=
3650
3651for cf_add_cflags in $cf_xopen_source
3652do
3653case $cf_fix_cppflags in
3654no)
3655	case $cf_add_cflags in #(vi
3656	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3657		case $cf_add_cflags in
3658		-D*)
3659			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3660
3661			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3662				&& test -z "${cf_tst_cflags}" \
3663				&& cf_fix_cppflags=yes
3664
3665			if test $cf_fix_cppflags = yes ; then
3666				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3667				continue
3668			elif test "${cf_tst_cflags}" = "\"'" ; then
3669				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3670				continue
3671			fi
3672			;;
3673		esac
3674		case "$CPPFLAGS" in
3675		*$cf_add_cflags) #(vi
3676			;;
3677		*) #(vi
3678			case $cf_add_cflags in #(vi
3679			-D*)
3680				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3681
3682CPPFLAGS=`echo "$CPPFLAGS" | \
3683	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3684		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3685
3686				;;
3687			esac
3688			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3689			;;
3690		esac
3691		;;
3692	*)
3693		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3694		;;
3695	esac
3696	;;
3697yes)
3698	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3699
3700	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3701
3702	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3703		&& test -z "${cf_tst_cflags}" \
3704		&& cf_fix_cppflags=no
3705	;;
3706esac
3707done
3708
3709if test -n "$cf_new_cflags" ; then
3710
3711	CFLAGS="$CFLAGS $cf_new_cflags"
3712fi
3713
3714if test -n "$cf_new_cppflags" ; then
3715
3716	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3717fi
3718
3719if test -n "$cf_new_extra_cppflags" ; then
3720
3721	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3722fi
3723
3724fi
3725
3726if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3727	echo "$as_me:3727: checking if _XOPEN_SOURCE really is set" >&5
3728echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3729	cat >conftest.$ac_ext <<_ACEOF
3730#line 3730 "configure"
3731#include "confdefs.h"
3732#include <stdlib.h>
3733int
3734main ()
3735{
3736
3737#ifndef _XOPEN_SOURCE
3738make an error
3739#endif
3740  ;
3741  return 0;
3742}
3743_ACEOF
3744rm -f conftest.$ac_objext
3745if { (eval echo "$as_me:3745: \"$ac_compile\"") >&5
3746  (eval $ac_compile) 2>&5
3747  ac_status=$?
3748  echo "$as_me:3748: \$? = $ac_status" >&5
3749  (exit $ac_status); } &&
3750         { ac_try='test -s conftest.$ac_objext'
3751  { (eval echo "$as_me:3751: \"$ac_try\"") >&5
3752  (eval $ac_try) 2>&5
3753  ac_status=$?
3754  echo "$as_me:3754: \$? = $ac_status" >&5
3755  (exit $ac_status); }; }; then
3756  cf_XOPEN_SOURCE_set=yes
3757else
3758  echo "$as_me: failed program was:" >&5
3759cat conftest.$ac_ext >&5
3760cf_XOPEN_SOURCE_set=no
3761fi
3762rm -f conftest.$ac_objext conftest.$ac_ext
3763	echo "$as_me:3763: result: $cf_XOPEN_SOURCE_set" >&5
3764echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3765	if test $cf_XOPEN_SOURCE_set = yes
3766	then
3767		cat >conftest.$ac_ext <<_ACEOF
3768#line 3768 "configure"
3769#include "confdefs.h"
3770#include <stdlib.h>
3771int
3772main ()
3773{
3774
3775#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3776make an error
3777#endif
3778  ;
3779  return 0;
3780}
3781_ACEOF
3782rm -f conftest.$ac_objext
3783if { (eval echo "$as_me:3783: \"$ac_compile\"") >&5
3784  (eval $ac_compile) 2>&5
3785  ac_status=$?
3786  echo "$as_me:3786: \$? = $ac_status" >&5
3787  (exit $ac_status); } &&
3788         { ac_try='test -s conftest.$ac_objext'
3789  { (eval echo "$as_me:3789: \"$ac_try\"") >&5
3790  (eval $ac_try) 2>&5
3791  ac_status=$?
3792  echo "$as_me:3792: \$? = $ac_status" >&5
3793  (exit $ac_status); }; }; then
3794  cf_XOPEN_SOURCE_set_ok=yes
3795else
3796  echo "$as_me: failed program was:" >&5
3797cat conftest.$ac_ext >&5
3798cf_XOPEN_SOURCE_set_ok=no
3799fi
3800rm -f conftest.$ac_objext conftest.$ac_ext
3801		if test $cf_XOPEN_SOURCE_set_ok = no
3802		then
3803			{ echo "$as_me:3803: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3804echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3805		fi
3806	else
3807
3808echo "$as_me:3808: checking if we should define _XOPEN_SOURCE" >&5
3809echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3810if test "${cf_cv_xopen_source+set}" = set; then
3811  echo $ECHO_N "(cached) $ECHO_C" >&6
3812else
3813
3814	cat >conftest.$ac_ext <<_ACEOF
3815#line 3815 "configure"
3816#include "confdefs.h"
3817
3818#include <stdlib.h>
3819#include <string.h>
3820#include <sys/types.h>
3821
3822int
3823main ()
3824{
3825
3826#ifndef _XOPEN_SOURCE
3827make an error
3828#endif
3829  ;
3830  return 0;
3831}
3832_ACEOF
3833rm -f conftest.$ac_objext
3834if { (eval echo "$as_me:3834: \"$ac_compile\"") >&5
3835  (eval $ac_compile) 2>&5
3836  ac_status=$?
3837  echo "$as_me:3837: \$? = $ac_status" >&5
3838  (exit $ac_status); } &&
3839         { ac_try='test -s conftest.$ac_objext'
3840  { (eval echo "$as_me:3840: \"$ac_try\"") >&5
3841  (eval $ac_try) 2>&5
3842  ac_status=$?
3843  echo "$as_me:3843: \$? = $ac_status" >&5
3844  (exit $ac_status); }; }; then
3845  cf_cv_xopen_source=no
3846else
3847  echo "$as_me: failed program was:" >&5
3848cat conftest.$ac_ext >&5
3849cf_save="$CPPFLAGS"
3850	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3851	 cat >conftest.$ac_ext <<_ACEOF
3852#line 3852 "configure"
3853#include "confdefs.h"
3854
3855#include <stdlib.h>
3856#include <string.h>
3857#include <sys/types.h>
3858
3859int
3860main ()
3861{
3862
3863#ifdef _XOPEN_SOURCE
3864make an error
3865#endif
3866  ;
3867  return 0;
3868}
3869_ACEOF
3870rm -f conftest.$ac_objext
3871if { (eval echo "$as_me:3871: \"$ac_compile\"") >&5
3872  (eval $ac_compile) 2>&5
3873  ac_status=$?
3874  echo "$as_me:3874: \$? = $ac_status" >&5
3875  (exit $ac_status); } &&
3876         { ac_try='test -s conftest.$ac_objext'
3877  { (eval echo "$as_me:3877: \"$ac_try\"") >&5
3878  (eval $ac_try) 2>&5
3879  ac_status=$?
3880  echo "$as_me:3880: \$? = $ac_status" >&5
3881  (exit $ac_status); }; }; then
3882  cf_cv_xopen_source=no
3883else
3884  echo "$as_me: failed program was:" >&5
3885cat conftest.$ac_ext >&5
3886cf_cv_xopen_source=$cf_XOPEN_SOURCE
3887fi
3888rm -f conftest.$ac_objext conftest.$ac_ext
3889	CPPFLAGS="$cf_save"
3890
3891fi
3892rm -f conftest.$ac_objext conftest.$ac_ext
3893
3894fi
3895echo "$as_me:3895: result: $cf_cv_xopen_source" >&5
3896echo "${ECHO_T}$cf_cv_xopen_source" >&6
3897
3898if test "$cf_cv_xopen_source" != no ; then
3899
3900CFLAGS=`echo "$CFLAGS" | \
3901	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3902		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3903
3904CPPFLAGS=`echo "$CPPFLAGS" | \
3905	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3906		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3907
3908	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3909
3910cf_fix_cppflags=no
3911cf_new_cflags=
3912cf_new_cppflags=
3913cf_new_extra_cppflags=
3914
3915for cf_add_cflags in $cf_temp_xopen_source
3916do
3917case $cf_fix_cppflags in
3918no)
3919	case $cf_add_cflags in #(vi
3920	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3921		case $cf_add_cflags in
3922		-D*)
3923			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3924
3925			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3926				&& test -z "${cf_tst_cflags}" \
3927				&& cf_fix_cppflags=yes
3928
3929			if test $cf_fix_cppflags = yes ; then
3930				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3931				continue
3932			elif test "${cf_tst_cflags}" = "\"'" ; then
3933				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3934				continue
3935			fi
3936			;;
3937		esac
3938		case "$CPPFLAGS" in
3939		*$cf_add_cflags) #(vi
3940			;;
3941		*) #(vi
3942			case $cf_add_cflags in #(vi
3943			-D*)
3944				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3945
3946CPPFLAGS=`echo "$CPPFLAGS" | \
3947	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3948		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3949
3950				;;
3951			esac
3952			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3953			;;
3954		esac
3955		;;
3956	*)
3957		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3958		;;
3959	esac
3960	;;
3961yes)
3962	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3963
3964	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3965
3966	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3967		&& test -z "${cf_tst_cflags}" \
3968		&& cf_fix_cppflags=no
3969	;;
3970esac
3971done
3972
3973if test -n "$cf_new_cflags" ; then
3974
3975	CFLAGS="$CFLAGS $cf_new_cflags"
3976fi
3977
3978if test -n "$cf_new_cppflags" ; then
3979
3980	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3981fi
3982
3983if test -n "$cf_new_extra_cppflags" ; then
3984
3985	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3986fi
3987
3988fi
3989
3990	fi
3991fi
3992
3993# Check whether --enable-largefile or --disable-largefile was given.
3994if test "${enable_largefile+set}" = set; then
3995  enableval="$enable_largefile"
3996
3997fi;
3998if test "$enable_largefile" != no; then
3999
4000  echo "$as_me:4000: checking for special C compiler options needed for large files" >&5
4001echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4002if test "${ac_cv_sys_largefile_CC+set}" = set; then
4003  echo $ECHO_N "(cached) $ECHO_C" >&6
4004else
4005  ac_cv_sys_largefile_CC=no
4006     if test "$GCC" != yes; then
4007       ac_save_CC=$CC
4008       while :; do
4009     	 # IRIX 6.2 and later do not support large files by default,
4010     	 # so use the C compiler's -n32 option if that helps.
4011         cat >conftest.$ac_ext <<_ACEOF
4012#line 4012 "configure"
4013#include "confdefs.h"
4014#include <sys/types.h>
4015 /* Check that off_t can represent 2**63 - 1 correctly.
4016    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4017    since some C++ compilers masquerading as C compilers
4018    incorrectly reject 9223372036854775807.  */
4019#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4020  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4021		       && LARGE_OFF_T % 2147483647 == 1)
4022		      ? 1 : -1];
4023int
4024main ()
4025{
4026
4027  ;
4028  return 0;
4029}
4030_ACEOF
4031     	 rm -f conftest.$ac_objext
4032if { (eval echo "$as_me:4032: \"$ac_compile\"") >&5
4033  (eval $ac_compile) 2>&5
4034  ac_status=$?
4035  echo "$as_me:4035: \$? = $ac_status" >&5
4036  (exit $ac_status); } &&
4037         { ac_try='test -s conftest.$ac_objext'
4038  { (eval echo "$as_me:4038: \"$ac_try\"") >&5
4039  (eval $ac_try) 2>&5
4040  ac_status=$?
4041  echo "$as_me:4041: \$? = $ac_status" >&5
4042  (exit $ac_status); }; }; then
4043  break
4044else
4045  echo "$as_me: failed program was:" >&5
4046cat conftest.$ac_ext >&5
4047fi
4048rm -f conftest.$ac_objext
4049     	 CC="$CC -n32"
4050     	 rm -f conftest.$ac_objext
4051if { (eval echo "$as_me:4051: \"$ac_compile\"") >&5
4052  (eval $ac_compile) 2>&5
4053  ac_status=$?
4054  echo "$as_me:4054: \$? = $ac_status" >&5
4055  (exit $ac_status); } &&
4056         { ac_try='test -s conftest.$ac_objext'
4057  { (eval echo "$as_me:4057: \"$ac_try\"") >&5
4058  (eval $ac_try) 2>&5
4059  ac_status=$?
4060  echo "$as_me:4060: \$? = $ac_status" >&5
4061  (exit $ac_status); }; }; then
4062  ac_cv_sys_largefile_CC=' -n32'; break
4063else
4064  echo "$as_me: failed program was:" >&5
4065cat conftest.$ac_ext >&5
4066fi
4067rm -f conftest.$ac_objext
4068         break
4069       done
4070       CC=$ac_save_CC
4071       rm -f conftest.$ac_ext
4072    fi
4073fi
4074echo "$as_me:4074: result: $ac_cv_sys_largefile_CC" >&5
4075echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4076  if test "$ac_cv_sys_largefile_CC" != no; then
4077    CC=$CC$ac_cv_sys_largefile_CC
4078  fi
4079
4080  echo "$as_me:4080: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4081echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4082if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4083  echo $ECHO_N "(cached) $ECHO_C" >&6
4084else
4085  while :; do
4086  ac_cv_sys_file_offset_bits=no
4087  cat >conftest.$ac_ext <<_ACEOF
4088#line 4088 "configure"
4089#include "confdefs.h"
4090#include <sys/types.h>
4091 /* Check that off_t can represent 2**63 - 1 correctly.
4092    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4093    since some C++ compilers masquerading as C compilers
4094    incorrectly reject 9223372036854775807.  */
4095#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4096  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4097		       && LARGE_OFF_T % 2147483647 == 1)
4098		      ? 1 : -1];
4099int
4100main ()
4101{
4102
4103  ;
4104  return 0;
4105}
4106_ACEOF
4107rm -f conftest.$ac_objext
4108if { (eval echo "$as_me:4108: \"$ac_compile\"") >&5
4109  (eval $ac_compile) 2>&5
4110  ac_status=$?
4111  echo "$as_me:4111: \$? = $ac_status" >&5
4112  (exit $ac_status); } &&
4113         { ac_try='test -s conftest.$ac_objext'
4114  { (eval echo "$as_me:4114: \"$ac_try\"") >&5
4115  (eval $ac_try) 2>&5
4116  ac_status=$?
4117  echo "$as_me:4117: \$? = $ac_status" >&5
4118  (exit $ac_status); }; }; then
4119  break
4120else
4121  echo "$as_me: failed program was:" >&5
4122cat conftest.$ac_ext >&5
4123fi
4124rm -f conftest.$ac_objext conftest.$ac_ext
4125  cat >conftest.$ac_ext <<_ACEOF
4126#line 4126 "configure"
4127#include "confdefs.h"
4128#define _FILE_OFFSET_BITS 64
4129#include <sys/types.h>
4130 /* Check that off_t can represent 2**63 - 1 correctly.
4131    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4132    since some C++ compilers masquerading as C compilers
4133    incorrectly reject 9223372036854775807.  */
4134#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4135  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4136		       && LARGE_OFF_T % 2147483647 == 1)
4137		      ? 1 : -1];
4138int
4139main ()
4140{
4141
4142  ;
4143  return 0;
4144}
4145_ACEOF
4146rm -f conftest.$ac_objext
4147if { (eval echo "$as_me:4147: \"$ac_compile\"") >&5
4148  (eval $ac_compile) 2>&5
4149  ac_status=$?
4150  echo "$as_me:4150: \$? = $ac_status" >&5
4151  (exit $ac_status); } &&
4152         { ac_try='test -s conftest.$ac_objext'
4153  { (eval echo "$as_me:4153: \"$ac_try\"") >&5
4154  (eval $ac_try) 2>&5
4155  ac_status=$?
4156  echo "$as_me:4156: \$? = $ac_status" >&5
4157  (exit $ac_status); }; }; then
4158  ac_cv_sys_file_offset_bits=64; break
4159else
4160  echo "$as_me: failed program was:" >&5
4161cat conftest.$ac_ext >&5
4162fi
4163rm -f conftest.$ac_objext conftest.$ac_ext
4164  break
4165done
4166fi
4167echo "$as_me:4167: result: $ac_cv_sys_file_offset_bits" >&5
4168echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
4169if test "$ac_cv_sys_file_offset_bits" != no; then
4170
4171cat >>confdefs.h <<EOF
4172#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4173EOF
4174
4175fi
4176rm -rf conftest*
4177  echo "$as_me:4177: checking for _LARGE_FILES value needed for large files" >&5
4178echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
4179if test "${ac_cv_sys_large_files+set}" = set; then
4180  echo $ECHO_N "(cached) $ECHO_C" >&6
4181else
4182  while :; do
4183  ac_cv_sys_large_files=no
4184  cat >conftest.$ac_ext <<_ACEOF
4185#line 4185 "configure"
4186#include "confdefs.h"
4187#include <sys/types.h>
4188 /* Check that off_t can represent 2**63 - 1 correctly.
4189    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4190    since some C++ compilers masquerading as C compilers
4191    incorrectly reject 9223372036854775807.  */
4192#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4193  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4194		       && LARGE_OFF_T % 2147483647 == 1)
4195		      ? 1 : -1];
4196int
4197main ()
4198{
4199
4200  ;
4201  return 0;
4202}
4203_ACEOF
4204rm -f conftest.$ac_objext
4205if { (eval echo "$as_me:4205: \"$ac_compile\"") >&5
4206  (eval $ac_compile) 2>&5
4207  ac_status=$?
4208  echo "$as_me:4208: \$? = $ac_status" >&5
4209  (exit $ac_status); } &&
4210         { ac_try='test -s conftest.$ac_objext'
4211  { (eval echo "$as_me:4211: \"$ac_try\"") >&5
4212  (eval $ac_try) 2>&5
4213  ac_status=$?
4214  echo "$as_me:4214: \$? = $ac_status" >&5
4215  (exit $ac_status); }; }; then
4216  break
4217else
4218  echo "$as_me: failed program was:" >&5
4219cat conftest.$ac_ext >&5
4220fi
4221rm -f conftest.$ac_objext conftest.$ac_ext
4222  cat >conftest.$ac_ext <<_ACEOF
4223#line 4223 "configure"
4224#include "confdefs.h"
4225#define _LARGE_FILES 1
4226#include <sys/types.h>
4227 /* Check that off_t can represent 2**63 - 1 correctly.
4228    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4229    since some C++ compilers masquerading as C compilers
4230    incorrectly reject 9223372036854775807.  */
4231#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4232  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4233		       && LARGE_OFF_T % 2147483647 == 1)
4234		      ? 1 : -1];
4235int
4236main ()
4237{
4238
4239  ;
4240  return 0;
4241}
4242_ACEOF
4243rm -f conftest.$ac_objext
4244if { (eval echo "$as_me:4244: \"$ac_compile\"") >&5
4245  (eval $ac_compile) 2>&5
4246  ac_status=$?
4247  echo "$as_me:4247: \$? = $ac_status" >&5
4248  (exit $ac_status); } &&
4249         { ac_try='test -s conftest.$ac_objext'
4250  { (eval echo "$as_me:4250: \"$ac_try\"") >&5
4251  (eval $ac_try) 2>&5
4252  ac_status=$?
4253  echo "$as_me:4253: \$? = $ac_status" >&5
4254  (exit $ac_status); }; }; then
4255  ac_cv_sys_large_files=1; break
4256else
4257  echo "$as_me: failed program was:" >&5
4258cat conftest.$ac_ext >&5
4259fi
4260rm -f conftest.$ac_objext conftest.$ac_ext
4261  break
4262done
4263fi
4264echo "$as_me:4264: result: $ac_cv_sys_large_files" >&5
4265echo "${ECHO_T}$ac_cv_sys_large_files" >&6
4266if test "$ac_cv_sys_large_files" != no; then
4267
4268cat >>confdefs.h <<EOF
4269#define _LARGE_FILES $ac_cv_sys_large_files
4270EOF
4271
4272fi
4273rm -rf conftest*
4274fi
4275
4276    if test "$enable_largefile" != no ; then
4277	echo "$as_me:4277: checking for _LARGEFILE_SOURCE value needed for large files" >&5
4278echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
4279if test "${ac_cv_sys_largefile_source+set}" = set; then
4280  echo $ECHO_N "(cached) $ECHO_C" >&6
4281else
4282  while :; do
4283  ac_cv_sys_largefile_source=no
4284  cat >conftest.$ac_ext <<_ACEOF
4285#line 4285 "configure"
4286#include "confdefs.h"
4287#include <stdio.h>
4288int
4289main ()
4290{
4291return !fseeko;
4292  ;
4293  return 0;
4294}
4295_ACEOF
4296rm -f conftest.$ac_objext
4297if { (eval echo "$as_me:4297: \"$ac_compile\"") >&5
4298  (eval $ac_compile) 2>&5
4299  ac_status=$?
4300  echo "$as_me:4300: \$? = $ac_status" >&5
4301  (exit $ac_status); } &&
4302         { ac_try='test -s conftest.$ac_objext'
4303  { (eval echo "$as_me:4303: \"$ac_try\"") >&5
4304  (eval $ac_try) 2>&5
4305  ac_status=$?
4306  echo "$as_me:4306: \$? = $ac_status" >&5
4307  (exit $ac_status); }; }; then
4308  break
4309else
4310  echo "$as_me: failed program was:" >&5
4311cat conftest.$ac_ext >&5
4312fi
4313rm -f conftest.$ac_objext conftest.$ac_ext
4314  cat >conftest.$ac_ext <<_ACEOF
4315#line 4315 "configure"
4316#include "confdefs.h"
4317#define _LARGEFILE_SOURCE 1
4318#include <stdio.h>
4319int
4320main ()
4321{
4322return !fseeko;
4323  ;
4324  return 0;
4325}
4326_ACEOF
4327rm -f conftest.$ac_objext
4328if { (eval echo "$as_me:4328: \"$ac_compile\"") >&5
4329  (eval $ac_compile) 2>&5
4330  ac_status=$?
4331  echo "$as_me:4331: \$? = $ac_status" >&5
4332  (exit $ac_status); } &&
4333         { ac_try='test -s conftest.$ac_objext'
4334  { (eval echo "$as_me:4334: \"$ac_try\"") >&5
4335  (eval $ac_try) 2>&5
4336  ac_status=$?
4337  echo "$as_me:4337: \$? = $ac_status" >&5
4338  (exit $ac_status); }; }; then
4339  ac_cv_sys_largefile_source=1; break
4340else
4341  echo "$as_me: failed program was:" >&5
4342cat conftest.$ac_ext >&5
4343fi
4344rm -f conftest.$ac_objext conftest.$ac_ext
4345  break
4346done
4347fi
4348echo "$as_me:4348: result: $ac_cv_sys_largefile_source" >&5
4349echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
4350if test "$ac_cv_sys_largefile_source" != no; then
4351
4352cat >>confdefs.h <<EOF
4353#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4354EOF
4355
4356fi
4357rm -rf conftest*
4358
4359# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
4360# in glibc 2.1.3, but that breaks too many other things.
4361# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
4362echo "$as_me:4362: checking for fseeko" >&5
4363echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
4364if test "${ac_cv_func_fseeko+set}" = set; then
4365  echo $ECHO_N "(cached) $ECHO_C" >&6
4366else
4367  cat >conftest.$ac_ext <<_ACEOF
4368#line 4368 "configure"
4369#include "confdefs.h"
4370#include <stdio.h>
4371int
4372main ()
4373{
4374return fseeko && fseeko (stdin, 0, 0);
4375  ;
4376  return 0;
4377}
4378_ACEOF
4379rm -f conftest.$ac_objext conftest$ac_exeext
4380if { (eval echo "$as_me:4380: \"$ac_link\"") >&5
4381  (eval $ac_link) 2>&5
4382  ac_status=$?
4383  echo "$as_me:4383: \$? = $ac_status" >&5
4384  (exit $ac_status); } &&
4385         { ac_try='test -s conftest$ac_exeext'
4386  { (eval echo "$as_me:4386: \"$ac_try\"") >&5
4387  (eval $ac_try) 2>&5
4388  ac_status=$?
4389  echo "$as_me:4389: \$? = $ac_status" >&5
4390  (exit $ac_status); }; }; then
4391  ac_cv_func_fseeko=yes
4392else
4393  echo "$as_me: failed program was:" >&5
4394cat conftest.$ac_ext >&5
4395ac_cv_func_fseeko=no
4396fi
4397rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4398fi
4399echo "$as_me:4399: result: $ac_cv_func_fseeko" >&5
4400echo "${ECHO_T}$ac_cv_func_fseeko" >&6
4401if test $ac_cv_func_fseeko = yes; then
4402
4403cat >>confdefs.h <<\EOF
4404#define HAVE_FSEEKO 1
4405EOF
4406
4407fi
4408
4409	# Normally we would collect these definitions in the config.h,
4410	# but (like _XOPEN_SOURCE), some environments rely on having these
4411	# defined before any of the system headers are included.  Another
4412	# case comes up with C++, e.g., on AIX the compiler compiles the
4413	# header files by themselves before looking at the body files it is
4414	# told to compile.  For ncurses, those header files do not include
4415	# the config.h
4416	test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
4417	test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
4418	test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
4419
4420	echo "$as_me:4420: checking whether to use struct dirent64" >&5
4421echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
4422if test "${cf_cv_struct_dirent64+set}" = set; then
4423  echo $ECHO_N "(cached) $ECHO_C" >&6
4424else
4425
4426		cat >conftest.$ac_ext <<_ACEOF
4427#line 4427 "configure"
4428#include "confdefs.h"
4429
4430#include <sys/types.h>
4431#include <dirent.h>
4432
4433int
4434main ()
4435{
4436
4437		/* if transitional largefile support is setup, this is true */
4438		extern struct dirent64 * readdir(DIR *);
4439		struct dirent64 *x = readdir((DIR *)0);
4440		struct dirent *y = readdir((DIR *)0);
4441		int z = x - y;
4442
4443  ;
4444  return 0;
4445}
4446_ACEOF
4447rm -f conftest.$ac_objext
4448if { (eval echo "$as_me:4448: \"$ac_compile\"") >&5
4449  (eval $ac_compile) 2>&5
4450  ac_status=$?
4451  echo "$as_me:4451: \$? = $ac_status" >&5
4452  (exit $ac_status); } &&
4453         { ac_try='test -s conftest.$ac_objext'
4454  { (eval echo "$as_me:4454: \"$ac_try\"") >&5
4455  (eval $ac_try) 2>&5
4456  ac_status=$?
4457  echo "$as_me:4457: \$? = $ac_status" >&5
4458  (exit $ac_status); }; }; then
4459  cf_cv_struct_dirent64=yes
4460else
4461  echo "$as_me: failed program was:" >&5
4462cat conftest.$ac_ext >&5
4463cf_cv_struct_dirent64=no
4464fi
4465rm -f conftest.$ac_objext conftest.$ac_ext
4466
4467fi
4468echo "$as_me:4468: result: $cf_cv_struct_dirent64" >&5
4469echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
4470	test "$cf_cv_struct_dirent64" = yes &&
4471cat >>confdefs.h <<\EOF
4472#define HAVE_STRUCT_DIRENT64 1
4473EOF
4474
4475    fi
4476
4477if ( test "$GCC" = yes || test "$GXX" = yes )
4478then
4479echo "$as_me:4479: checking if you want to check for gcc warnings" >&5
4480echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6
4481
4482# Check whether --with-warnings or --without-warnings was given.
4483if test "${with_warnings+set}" = set; then
4484  withval="$with_warnings"
4485  cf_opt_with_warnings=$withval
4486else
4487  cf_opt_with_warnings=no
4488fi;
4489echo "$as_me:4489: result: $cf_opt_with_warnings" >&5
4490echo "${ECHO_T}$cf_opt_with_warnings" >&6
4491if test "$cf_opt_with_warnings" != no ; then
4492
4493if test "$GCC" = yes
4494then
4495cat > conftest.i <<EOF
4496#ifndef GCC_PRINTF
4497#define GCC_PRINTF 0
4498#endif
4499#ifndef GCC_SCANF
4500#define GCC_SCANF 0
4501#endif
4502#ifndef GCC_NORETURN
4503#define GCC_NORETURN /* nothing */
4504#endif
4505#ifndef GCC_UNUSED
4506#define GCC_UNUSED /* nothing */
4507#endif
4508EOF
4509if test "$GCC" = yes
4510then
4511	{ echo "$as_me:4511: checking for $CC __attribute__ directives..." >&5
4512echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
4513cat > conftest.$ac_ext <<EOF
4514#line 4514 "${as_me:-configure}"
4515#include "confdefs.h"
4516#include "conftest.h"
4517#include "conftest.i"
4518#if	GCC_PRINTF
4519#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4520#else
4521#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
4522#endif
4523#if	GCC_SCANF
4524#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
4525#else
4526#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
4527#endif
4528extern void wow(char *,...) GCC_SCANFLIKE(1,2);
4529extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
4530extern void foo(void) GCC_NORETURN;
4531int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
4532EOF
4533	cf_printf_attribute=no
4534	cf_scanf_attribute=no
4535	for cf_attribute in scanf printf unused noreturn
4536	do
4537
4538cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4539
4540		cf_directive="__attribute__(($cf_attribute))"
4541		echo "checking for $CC $cf_directive" 1>&5
4542
4543		case $cf_attribute in #(vi
4544		printf) #(vi
4545			cf_printf_attribute=yes
4546			cat >conftest.h <<EOF
4547#define GCC_$cf_ATTRIBUTE 1
4548EOF
4549			;;
4550		scanf) #(vi
4551			cf_scanf_attribute=yes
4552			cat >conftest.h <<EOF
4553#define GCC_$cf_ATTRIBUTE 1
4554EOF
4555			;;
4556		*) #(vi
4557			cat >conftest.h <<EOF
4558#define GCC_$cf_ATTRIBUTE $cf_directive
4559EOF
4560			;;
4561		esac
4562
4563		if { (eval echo "$as_me:4563: \"$ac_compile\"") >&5
4564  (eval $ac_compile) 2>&5
4565  ac_status=$?
4566  echo "$as_me:4566: \$? = $ac_status" >&5
4567  (exit $ac_status); }; then
4568			test -n "$verbose" && echo "$as_me:4568: result: ... $cf_attribute" >&5
4569echo "${ECHO_T}... $cf_attribute" >&6
4570			cat conftest.h >>confdefs.h
4571			case $cf_attribute in #(vi
4572			noreturn) #(vi
4573
4574cat >>confdefs.h <<EOF
4575#define GCC_NORETURN $cf_directive
4576EOF
4577
4578				;;
4579			printf) #(vi
4580				cf_value='/* nothing */'
4581				if test "$cf_printf_attribute" != no ; then
4582					cf_value='__attribute__((format(printf,fmt,var)))'
4583
4584cat >>confdefs.h <<\EOF
4585#define GCC_PRINTF 1
4586EOF
4587
4588				fi
4589
4590cat >>confdefs.h <<EOF
4591#define GCC_PRINTFLIKE(fmt,var) $cf_value
4592EOF
4593
4594				;;
4595			scanf) #(vi
4596				cf_value='/* nothing */'
4597				if test "$cf_scanf_attribute" != no ; then
4598					cf_value='__attribute__((format(scanf,fmt,var)))'
4599
4600cat >>confdefs.h <<\EOF
4601#define GCC_SCANF 1
4602EOF
4603
4604				fi
4605
4606cat >>confdefs.h <<EOF
4607#define GCC_SCANFLIKE(fmt,var) $cf_value
4608EOF
4609
4610				;;
4611			unused) #(vi
4612
4613cat >>confdefs.h <<EOF
4614#define GCC_UNUSED $cf_directive
4615EOF
4616
4617				;;
4618			esac
4619		fi
4620	done
4621else
4622	fgrep define conftest.i >>confdefs.h
4623fi
4624rm -rf conftest*
4625fi
4626
4627INTEL_COMPILER=no
4628
4629if test "$GCC" = yes ; then
4630	case $host_os in
4631	linux*|gnu*)
4632		echo "$as_me:4632: checking if this is really Intel C compiler" >&5
4633echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
4634		cf_save_CFLAGS="$CFLAGS"
4635		CFLAGS="$CFLAGS -no-gcc"
4636		cat >conftest.$ac_ext <<_ACEOF
4637#line 4637 "configure"
4638#include "confdefs.h"
4639
4640int
4641main ()
4642{
4643
4644#ifdef __INTEL_COMPILER
4645#else
4646make an error
4647#endif
4648
4649  ;
4650  return 0;
4651}
4652_ACEOF
4653rm -f conftest.$ac_objext
4654if { (eval echo "$as_me:4654: \"$ac_compile\"") >&5
4655  (eval $ac_compile) 2>&5
4656  ac_status=$?
4657  echo "$as_me:4657: \$? = $ac_status" >&5
4658  (exit $ac_status); } &&
4659         { ac_try='test -s conftest.$ac_objext'
4660  { (eval echo "$as_me:4660: \"$ac_try\"") >&5
4661  (eval $ac_try) 2>&5
4662  ac_status=$?
4663  echo "$as_me:4663: \$? = $ac_status" >&5
4664  (exit $ac_status); }; }; then
4665  INTEL_COMPILER=yes
4666cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
4667
4668else
4669  echo "$as_me: failed program was:" >&5
4670cat conftest.$ac_ext >&5
4671fi
4672rm -f conftest.$ac_objext conftest.$ac_ext
4673		CFLAGS="$cf_save_CFLAGS"
4674		echo "$as_me:4674: result: $INTEL_COMPILER" >&5
4675echo "${ECHO_T}$INTEL_COMPILER" >&6
4676		;;
4677	esac
4678fi
4679
4680CLANG_COMPILER=no
4681
4682if test "$GCC" = yes ; then
4683	echo "$as_me:4683: checking if this is really Clang C compiler" >&5
4684echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
4685	cf_save_CFLAGS="$CFLAGS"
4686	CFLAGS="$CFLAGS -Qunused-arguments"
4687	cat >conftest.$ac_ext <<_ACEOF
4688#line 4688 "configure"
4689#include "confdefs.h"
4690
4691int
4692main ()
4693{
4694
4695#ifdef __clang__
4696#else
4697make an error
4698#endif
4699
4700  ;
4701  return 0;
4702}
4703_ACEOF
4704rm -f conftest.$ac_objext
4705if { (eval echo "$as_me:4705: \"$ac_compile\"") >&5
4706  (eval $ac_compile) 2>&5
4707  ac_status=$?
4708  echo "$as_me:4708: \$? = $ac_status" >&5
4709  (exit $ac_status); } &&
4710         { ac_try='test -s conftest.$ac_objext'
4711  { (eval echo "$as_me:4711: \"$ac_try\"") >&5
4712  (eval $ac_try) 2>&5
4713  ac_status=$?
4714  echo "$as_me:4714: \$? = $ac_status" >&5
4715  (exit $ac_status); }; }; then
4716  CLANG_COMPILER=yes
4717cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
4718
4719else
4720  echo "$as_me: failed program was:" >&5
4721cat conftest.$ac_ext >&5
4722fi
4723rm -f conftest.$ac_objext conftest.$ac_ext
4724	CFLAGS="$cf_save_CFLAGS"
4725	echo "$as_me:4725: result: $CLANG_COMPILER" >&5
4726echo "${ECHO_T}$CLANG_COMPILER" >&6
4727fi
4728
4729cat > conftest.$ac_ext <<EOF
4730#line 4730 "${as_me:-configure}"
4731int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4732EOF
4733
4734if test "$INTEL_COMPILER" = yes
4735then
4736# The "-wdXXX" options suppress warnings:
4737# remark #1419: external declaration in primary source file
4738# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
4739# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
4740# remark #193: zero used for undefined preprocessing identifier
4741# remark #593: variable "curs_sb_left_arrow" was set but never used
4742# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
4743# remark #869: parameter "tw" was never referenced
4744# remark #981: operands are evaluated in unspecified order
4745# warning #279: controlling expression is constant
4746
4747	{ echo "$as_me:4747: checking for $CC warning options..." >&5
4748echo "$as_me: checking for $CC warning options..." >&6;}
4749	cf_save_CFLAGS="$CFLAGS"
4750	EXTRA_CFLAGS="-Wall"
4751	for cf_opt in \
4752		wd1419 \
4753		wd1683 \
4754		wd1684 \
4755		wd193 \
4756		wd593 \
4757		wd279 \
4758		wd810 \
4759		wd869 \
4760		wd981
4761	do
4762		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4763		if { (eval echo "$as_me:4763: \"$ac_compile\"") >&5
4764  (eval $ac_compile) 2>&5
4765  ac_status=$?
4766  echo "$as_me:4766: \$? = $ac_status" >&5
4767  (exit $ac_status); }; then
4768			test -n "$verbose" && echo "$as_me:4768: result: ... -$cf_opt" >&5
4769echo "${ECHO_T}... -$cf_opt" >&6
4770			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4771		fi
4772	done
4773	CFLAGS="$cf_save_CFLAGS"
4774
4775elif test "$GCC" = yes
4776then
4777	{ echo "$as_me:4777: checking for $CC warning options..." >&5
4778echo "$as_me: checking for $CC warning options..." >&6;}
4779	cf_save_CFLAGS="$CFLAGS"
4780	EXTRA_CFLAGS=
4781	cf_warn_CONST=""
4782	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4783	for cf_opt in W Wall \
4784		Wbad-function-cast \
4785		Wcast-align \
4786		Wcast-qual \
4787		Winline \
4788		Wmissing-declarations \
4789		Wmissing-prototypes \
4790		Wnested-externs \
4791		Wpointer-arith \
4792		Wshadow \
4793		Wstrict-prototypes \
4794		Wundef $cf_warn_CONST
4795	do
4796		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4797		if { (eval echo "$as_me:4797: \"$ac_compile\"") >&5
4798  (eval $ac_compile) 2>&5
4799  ac_status=$?
4800  echo "$as_me:4800: \$? = $ac_status" >&5
4801  (exit $ac_status); }; then
4802			test -n "$verbose" && echo "$as_me:4802: result: ... -$cf_opt" >&5
4803echo "${ECHO_T}... -$cf_opt" >&6
4804			case $cf_opt in #(vi
4805			Wcast-qual) #(vi
4806				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4807				;;
4808			Winline) #(vi
4809				case $GCC_VERSION in
4810				[34].*)
4811					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
4812
4813echo "${as_me:-configure}:4813: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4814
4815					continue;;
4816				esac
4817				;;
4818			Wpointer-arith) #(vi
4819				case $GCC_VERSION in
4820				[12].*)
4821					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
4822
4823echo "${as_me:-configure}:4823: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4824
4825					continue;;
4826				esac
4827				;;
4828			esac
4829			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4830		fi
4831	done
4832	CFLAGS="$cf_save_CFLAGS"
4833fi
4834rm -rf conftest*
4835
4836fi
4837fi
4838
4839# Check whether --with-package or --without-package was given.
4840if test "${with_package+set}" = set; then
4841  withval="$with_package"
4842  PACKAGE=$withval
4843else
4844  PACKAGE=dialog
4845fi;
4846
4847if test -f $srcdir/VERSION ; then
4848	echo "$as_me:4848: checking for package version" >&5
4849echo $ECHO_N "checking for package version... $ECHO_C" >&6
4850
4851	# if there are not enough fields, cut returns the last one...
4852	cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
4853	cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
4854	cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
4855
4856	# this is how CF_BUNDLED_INTL uses $VERSION:
4857	VERSION="$cf_field1"
4858
4859	VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
4860	test -z "$VERSION_MAJOR" && { { echo "$as_me:4860: error: missing major-version" >&5
4861echo "$as_me: error: missing major-version" >&2;}
4862   { (exit 1); exit 1; }; }
4863
4864	VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
4865	test -z "$VERSION_MINOR" && { { echo "$as_me:4865: error: missing minor-version" >&5
4866echo "$as_me: error: missing minor-version" >&2;}
4867   { (exit 1); exit 1; }; }
4868
4869	echo "$as_me:4869: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
4870echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
4871
4872	echo "$as_me:4872: checking for package patch date" >&5
4873echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
4874	VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
4875	case .$VERSION_PATCH in
4876	.)
4877		{ { echo "$as_me:4877: error: missing patch-date $VERSION_PATCH" >&5
4878echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
4879   { (exit 1); exit 1; }; }
4880		;;
4881	.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
4882		;;
4883	*)
4884		{ { echo "$as_me:4884: error: illegal patch-date $VERSION_PATCH" >&5
4885echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
4886   { (exit 1); exit 1; }; }
4887		;;
4888	esac
4889	echo "$as_me:4889: result: $VERSION_PATCH" >&5
4890echo "${ECHO_T}$VERSION_PATCH" >&6
4891else
4892	{ { echo "$as_me:4892: error: did not find $srcdir/VERSION" >&5
4893echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
4894   { (exit 1); exit 1; }; }
4895fi
4896
4897# show the actual data that we have for versions:
4898test -n "$verbose" && echo "	VERSION $VERSION" 1>&6
4899
4900echo "${as_me:-configure}:4900: testing VERSION $VERSION ..." 1>&5
4901
4902test -n "$verbose" && echo "	VERSION_MAJOR $VERSION_MAJOR" 1>&6
4903
4904echo "${as_me:-configure}:4904: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
4905
4906test -n "$verbose" && echo "	VERSION_MINOR $VERSION_MINOR" 1>&6
4907
4908echo "${as_me:-configure}:4908: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
4909
4910test -n "$verbose" && echo "	VERSION_PATCH $VERSION_PATCH" 1>&6
4911
4912echo "${as_me:-configure}:4912: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
4913
4914	cf_PACKAGE=dialog
4915	PACKAGE=$PACKAGE
4916
4917cat >>confdefs.h <<EOF
4918#define PACKAGE "$PACKAGE"
4919EOF
4920
4921cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4922
4923	cat >>confdefs.h <<EOF
4924#define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
4925EOF
4926
4927	cat >>confdefs.h <<EOF
4928#define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
4929EOF
4930
4931# Check whether --enable-header-subdir or --disable-header-subdir was given.
4932if test "${enable_header_subdir+set}" = set; then
4933  enableval="$enable_header_subdir"
4934  SUB_INC=$enableval
4935else
4936  SUB_INC=no
4937fi;
4938
4939EXTRAOBJS=""
4940
4941echo "$as_me:4941: checking for ANSI C header files" >&5
4942echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4943if test "${ac_cv_header_stdc+set}" = set; then
4944  echo $ECHO_N "(cached) $ECHO_C" >&6
4945else
4946  cat >conftest.$ac_ext <<_ACEOF
4947#line 4947 "configure"
4948#include "confdefs.h"
4949#include <stdlib.h>
4950#include <stdarg.h>
4951#include <string.h>
4952#include <float.h>
4953
4954_ACEOF
4955if { (eval echo "$as_me:4955: \"$ac_cpp conftest.$ac_ext\"") >&5
4956  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4957  ac_status=$?
4958  egrep -v '^ *\+' conftest.er1 >conftest.err
4959  rm -f conftest.er1
4960  cat conftest.err >&5
4961  echo "$as_me:4961: \$? = $ac_status" >&5
4962  (exit $ac_status); } >/dev/null; then
4963  if test -s conftest.err; then
4964    ac_cpp_err=$ac_c_preproc_warn_flag
4965  else
4966    ac_cpp_err=
4967  fi
4968else
4969  ac_cpp_err=yes
4970fi
4971if test -z "$ac_cpp_err"; then
4972  ac_cv_header_stdc=yes
4973else
4974  echo "$as_me: failed program was:" >&5
4975  cat conftest.$ac_ext >&5
4976  ac_cv_header_stdc=no
4977fi
4978rm -f conftest.err conftest.$ac_ext
4979
4980if test $ac_cv_header_stdc = yes; then
4981  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4982  cat >conftest.$ac_ext <<_ACEOF
4983#line 4983 "configure"
4984#include "confdefs.h"
4985#include <string.h>
4986
4987_ACEOF
4988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4989  egrep "memchr" >/dev/null 2>&1; then
4990  :
4991else
4992  ac_cv_header_stdc=no
4993fi
4994rm -rf conftest*
4995
4996fi
4997
4998if test $ac_cv_header_stdc = yes; then
4999  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5000  cat >conftest.$ac_ext <<_ACEOF
5001#line 5001 "configure"
5002#include "confdefs.h"
5003#include <stdlib.h>
5004
5005_ACEOF
5006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5007  egrep "free" >/dev/null 2>&1; then
5008  :
5009else
5010  ac_cv_header_stdc=no
5011fi
5012rm -rf conftest*
5013
5014fi
5015
5016if test $ac_cv_header_stdc = yes; then
5017  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5018  if test "$cross_compiling" = yes; then
5019  :
5020else
5021  cat >conftest.$ac_ext <<_ACEOF
5022#line 5022 "configure"
5023#include "confdefs.h"
5024#include <ctype.h>
5025#if ((' ' & 0x0FF) == 0x020)
5026# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5027# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5028#else
5029# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
5030                     || ('j' <= (c) && (c) <= 'r') \
5031                     || ('s' <= (c) && (c) <= 'z'))
5032# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5033#endif
5034
5035#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5036int
5037main ()
5038{
5039  int i;
5040  for (i = 0; i < 256; i++)
5041    if (XOR (islower (i), ISLOWER (i))
5042        || toupper (i) != TOUPPER (i))
5043      $ac_main_return(2);
5044  $ac_main_return (0);
5045}
5046_ACEOF
5047rm -f conftest$ac_exeext
5048if { (eval echo "$as_me:5048: \"$ac_link\"") >&5
5049  (eval $ac_link) 2>&5
5050  ac_status=$?
5051  echo "$as_me:5051: \$? = $ac_status" >&5
5052  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5053  { (eval echo "$as_me:5053: \"$ac_try\"") >&5
5054  (eval $ac_try) 2>&5
5055  ac_status=$?
5056  echo "$as_me:5056: \$? = $ac_status" >&5
5057  (exit $ac_status); }; }; then
5058  :
5059else
5060  echo "$as_me: program exited with status $ac_status" >&5
5061echo "$as_me: failed program was:" >&5
5062cat conftest.$ac_ext >&5
5063ac_cv_header_stdc=no
5064fi
5065rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5066fi
5067fi
5068fi
5069echo "$as_me:5069: result: $ac_cv_header_stdc" >&5
5070echo "${ECHO_T}$ac_cv_header_stdc" >&6
5071if test $ac_cv_header_stdc = yes; then
5072
5073cat >>confdefs.h <<\EOF
5074#define STDC_HEADERS 1
5075EOF
5076
5077fi
5078
5079echo "$as_me:5079: checking for inline" >&5
5080echo $ECHO_N "checking for inline... $ECHO_C" >&6
5081if test "${ac_cv_c_inline+set}" = set; then
5082  echo $ECHO_N "(cached) $ECHO_C" >&6
5083else
5084  ac_cv_c_inline=no
5085for ac_kw in inline __inline__ __inline; do
5086  cat >conftest.$ac_ext <<_ACEOF
5087#line 5087 "configure"
5088#include "confdefs.h"
5089#ifndef __cplusplus
5090static $ac_kw int static_foo () {return 0; }
5091$ac_kw int foo () {return 0; }
5092#endif
5093
5094_ACEOF
5095rm -f conftest.$ac_objext
5096if { (eval echo "$as_me:5096: \"$ac_compile\"") >&5
5097  (eval $ac_compile) 2>&5
5098  ac_status=$?
5099  echo "$as_me:5099: \$? = $ac_status" >&5
5100  (exit $ac_status); } &&
5101         { ac_try='test -s conftest.$ac_objext'
5102  { (eval echo "$as_me:5102: \"$ac_try\"") >&5
5103  (eval $ac_try) 2>&5
5104  ac_status=$?
5105  echo "$as_me:5105: \$? = $ac_status" >&5
5106  (exit $ac_status); }; }; then
5107  ac_cv_c_inline=$ac_kw; break
5108else
5109  echo "$as_me: failed program was:" >&5
5110cat conftest.$ac_ext >&5
5111fi
5112rm -f conftest.$ac_objext conftest.$ac_ext
5113done
5114
5115fi
5116echo "$as_me:5116: result: $ac_cv_c_inline" >&5
5117echo "${ECHO_T}$ac_cv_c_inline" >&6
5118case $ac_cv_c_inline in
5119  inline | yes) ;;
5120  no)
5121cat >>confdefs.h <<\EOF
5122#define inline
5123EOF
5124 ;;
5125  *)  cat >>confdefs.h <<EOF
5126#define inline $ac_cv_c_inline
5127EOF
5128 ;;
5129esac
5130
5131# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5132
5133for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5134                  inttypes.h stdint.h unistd.h
5135do
5136as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5137echo "$as_me:5137: checking for $ac_header" >&5
5138echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5139if eval "test \"\${$as_ac_Header+set}\" = set"; then
5140  echo $ECHO_N "(cached) $ECHO_C" >&6
5141else
5142  cat >conftest.$ac_ext <<_ACEOF
5143#line 5143 "configure"
5144#include "confdefs.h"
5145$ac_includes_default
5146#include <$ac_header>
5147_ACEOF
5148rm -f conftest.$ac_objext
5149if { (eval echo "$as_me:5149: \"$ac_compile\"") >&5
5150  (eval $ac_compile) 2>&5
5151  ac_status=$?
5152  echo "$as_me:5152: \$? = $ac_status" >&5
5153  (exit $ac_status); } &&
5154         { ac_try='test -s conftest.$ac_objext'
5155  { (eval echo "$as_me:5155: \"$ac_try\"") >&5
5156  (eval $ac_try) 2>&5
5157  ac_status=$?
5158  echo "$as_me:5158: \$? = $ac_status" >&5
5159  (exit $ac_status); }; }; then
5160  eval "$as_ac_Header=yes"
5161else
5162  echo "$as_me: failed program was:" >&5
5163cat conftest.$ac_ext >&5
5164eval "$as_ac_Header=no"
5165fi
5166rm -f conftest.$ac_objext conftest.$ac_ext
5167fi
5168echo "$as_me:5168: result: `eval echo '${'$as_ac_Header'}'`" >&5
5169echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5170if test `eval echo '${'$as_ac_Header'}'` = yes; then
5171  cat >>confdefs.h <<EOF
5172#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5173EOF
5174
5175fi
5176done
5177
5178echo "$as_me:5178: checking for off_t" >&5
5179echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5180if test "${ac_cv_type_off_t+set}" = set; then
5181  echo $ECHO_N "(cached) $ECHO_C" >&6
5182else
5183  cat >conftest.$ac_ext <<_ACEOF
5184#line 5184 "configure"
5185#include "confdefs.h"
5186$ac_includes_default
5187int
5188main ()
5189{
5190if ((off_t *) 0)
5191  return 0;
5192if (sizeof (off_t))
5193  return 0;
5194  ;
5195  return 0;
5196}
5197_ACEOF
5198rm -f conftest.$ac_objext
5199if { (eval echo "$as_me:5199: \"$ac_compile\"") >&5
5200  (eval $ac_compile) 2>&5
5201  ac_status=$?
5202  echo "$as_me:5202: \$? = $ac_status" >&5
5203  (exit $ac_status); } &&
5204         { ac_try='test -s conftest.$ac_objext'
5205  { (eval echo "$as_me:5205: \"$ac_try\"") >&5
5206  (eval $ac_try) 2>&5
5207  ac_status=$?
5208  echo "$as_me:5208: \$? = $ac_status" >&5
5209  (exit $ac_status); }; }; then
5210  ac_cv_type_off_t=yes
5211else
5212  echo "$as_me: failed program was:" >&5
5213cat conftest.$ac_ext >&5
5214ac_cv_type_off_t=no
5215fi
5216rm -f conftest.$ac_objext conftest.$ac_ext
5217fi
5218echo "$as_me:5218: result: $ac_cv_type_off_t" >&5
5219echo "${ECHO_T}$ac_cv_type_off_t" >&6
5220if test $ac_cv_type_off_t = yes; then
5221  :
5222else
5223
5224cat >>confdefs.h <<EOF
5225#define off_t long
5226EOF
5227
5228fi
5229
5230echo "$as_me:5230: checking for size_t" >&5
5231echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5232if test "${ac_cv_type_size_t+set}" = set; then
5233  echo $ECHO_N "(cached) $ECHO_C" >&6
5234else
5235  cat >conftest.$ac_ext <<_ACEOF
5236#line 5236 "configure"
5237#include "confdefs.h"
5238$ac_includes_default
5239int
5240main ()
5241{
5242if ((size_t *) 0)
5243  return 0;
5244if (sizeof (size_t))
5245  return 0;
5246  ;
5247  return 0;
5248}
5249_ACEOF
5250rm -f conftest.$ac_objext
5251if { (eval echo "$as_me:5251: \"$ac_compile\"") >&5
5252  (eval $ac_compile) 2>&5
5253  ac_status=$?
5254  echo "$as_me:5254: \$? = $ac_status" >&5
5255  (exit $ac_status); } &&
5256         { ac_try='test -s conftest.$ac_objext'
5257  { (eval echo "$as_me:5257: \"$ac_try\"") >&5
5258  (eval $ac_try) 2>&5
5259  ac_status=$?
5260  echo "$as_me:5260: \$? = $ac_status" >&5
5261  (exit $ac_status); }; }; then
5262  ac_cv_type_size_t=yes
5263else
5264  echo "$as_me: failed program was:" >&5
5265cat conftest.$ac_ext >&5
5266ac_cv_type_size_t=no
5267fi
5268rm -f conftest.$ac_objext conftest.$ac_ext
5269fi
5270echo "$as_me:5270: result: $ac_cv_type_size_t" >&5
5271echo "${ECHO_T}$ac_cv_type_size_t" >&6
5272if test $ac_cv_type_size_t = yes; then
5273  :
5274else
5275
5276cat >>confdefs.h <<EOF
5277#define size_t unsigned
5278EOF
5279
5280fi
5281
5282# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5283# for constant arguments.  Useless!
5284echo "$as_me:5284: checking for working alloca.h" >&5
5285echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
5286if test "${ac_cv_working_alloca_h+set}" = set; then
5287  echo $ECHO_N "(cached) $ECHO_C" >&6
5288else
5289  cat >conftest.$ac_ext <<_ACEOF
5290#line 5290 "configure"
5291#include "confdefs.h"
5292#include <alloca.h>
5293int
5294main ()
5295{
5296char *p = (char *) alloca (2 * sizeof (int));
5297  ;
5298  return 0;
5299}
5300_ACEOF
5301rm -f conftest.$ac_objext conftest$ac_exeext
5302if { (eval echo "$as_me:5302: \"$ac_link\"") >&5
5303  (eval $ac_link) 2>&5
5304  ac_status=$?
5305  echo "$as_me:5305: \$? = $ac_status" >&5
5306  (exit $ac_status); } &&
5307         { ac_try='test -s conftest$ac_exeext'
5308  { (eval echo "$as_me:5308: \"$ac_try\"") >&5
5309  (eval $ac_try) 2>&5
5310  ac_status=$?
5311  echo "$as_me:5311: \$? = $ac_status" >&5
5312  (exit $ac_status); }; }; then
5313  ac_cv_working_alloca_h=yes
5314else
5315  echo "$as_me: failed program was:" >&5
5316cat conftest.$ac_ext >&5
5317ac_cv_working_alloca_h=no
5318fi
5319rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5320fi
5321echo "$as_me:5321: result: $ac_cv_working_alloca_h" >&5
5322echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
5323if test $ac_cv_working_alloca_h = yes; then
5324
5325cat >>confdefs.h <<\EOF
5326#define HAVE_ALLOCA_H 1
5327EOF
5328
5329fi
5330
5331echo "$as_me:5331: checking for alloca" >&5
5332echo $ECHO_N "checking for alloca... $ECHO_C" >&6
5333if test "${ac_cv_func_alloca_works+set}" = set; then
5334  echo $ECHO_N "(cached) $ECHO_C" >&6
5335else
5336  cat >conftest.$ac_ext <<_ACEOF
5337#line 5337 "configure"
5338#include "confdefs.h"
5339#ifdef __GNUC__
5340# define alloca __builtin_alloca
5341#else
5342# ifdef _MSC_VER
5343#  include <malloc.h>
5344#  define alloca _alloca
5345# else
5346#  if HAVE_ALLOCA_H
5347#   include <alloca.h>
5348#  else
5349#   ifdef _AIX
5350 #pragma alloca
5351#   else
5352#    ifndef alloca /* predefined by HP cc +Olibcalls */
5353char *alloca ();
5354#    endif
5355#   endif
5356#  endif
5357# endif
5358#endif
5359
5360int
5361main ()
5362{
5363char *p = (char *) alloca (1);
5364  ;
5365  return 0;
5366}
5367_ACEOF
5368rm -f conftest.$ac_objext conftest$ac_exeext
5369if { (eval echo "$as_me:5369: \"$ac_link\"") >&5
5370  (eval $ac_link) 2>&5
5371  ac_status=$?
5372  echo "$as_me:5372: \$? = $ac_status" >&5
5373  (exit $ac_status); } &&
5374         { ac_try='test -s conftest$ac_exeext'
5375  { (eval echo "$as_me:5375: \"$ac_try\"") >&5
5376  (eval $ac_try) 2>&5
5377  ac_status=$?
5378  echo "$as_me:5378: \$? = $ac_status" >&5
5379  (exit $ac_status); }; }; then
5380  ac_cv_func_alloca_works=yes
5381else
5382  echo "$as_me: failed program was:" >&5
5383cat conftest.$ac_ext >&5
5384ac_cv_func_alloca_works=no
5385fi
5386rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5387fi
5388echo "$as_me:5388: result: $ac_cv_func_alloca_works" >&5
5389echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
5390
5391if test $ac_cv_func_alloca_works = yes; then
5392
5393cat >>confdefs.h <<\EOF
5394#define HAVE_ALLOCA 1
5395EOF
5396
5397else
5398  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5399# that cause trouble.  Some versions do not even contain alloca or
5400# contain a buggy version.  If you still want to use their alloca,
5401# use ar to extract alloca.o from them instead of compiling alloca.c.
5402
5403ALLOCA=alloca.$ac_objext
5404
5405cat >>confdefs.h <<\EOF
5406#define C_ALLOCA 1
5407EOF
5408
5409echo "$as_me:5409: checking whether \`alloca.c' needs Cray hooks" >&5
5410echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
5411if test "${ac_cv_os_cray+set}" = set; then
5412  echo $ECHO_N "(cached) $ECHO_C" >&6
5413else
5414  cat >conftest.$ac_ext <<_ACEOF
5415#line 5415 "configure"
5416#include "confdefs.h"
5417#if defined(CRAY) && ! defined(CRAY2)
5418webecray
5419#else
5420wenotbecray
5421#endif
5422
5423_ACEOF
5424if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5425  egrep "webecray" >/dev/null 2>&1; then
5426  ac_cv_os_cray=yes
5427else
5428  ac_cv_os_cray=no
5429fi
5430rm -rf conftest*
5431
5432fi
5433echo "$as_me:5433: result: $ac_cv_os_cray" >&5
5434echo "${ECHO_T}$ac_cv_os_cray" >&6
5435if test $ac_cv_os_cray = yes; then
5436  for ac_func in _getb67 GETB67 getb67; do
5437    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5438echo "$as_me:5438: checking for $ac_func" >&5
5439echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5440if eval "test \"\${$as_ac_var+set}\" = set"; then
5441  echo $ECHO_N "(cached) $ECHO_C" >&6
5442else
5443  cat >conftest.$ac_ext <<_ACEOF
5444#line 5444 "configure"
5445#include "confdefs.h"
5446/* System header to define __stub macros and hopefully few prototypes,
5447    which can conflict with char $ac_func (); below.  */
5448#include <assert.h>
5449/* Override any gcc2 internal prototype to avoid an error.  */
5450#ifdef __cplusplus
5451extern "C"
5452#endif
5453/* We use char because int might match the return type of a gcc2
5454   builtin and then its argument prototype would still apply.  */
5455char $ac_func ();
5456char (*f) ();
5457
5458int
5459main ()
5460{
5461/* The GNU C library defines this for functions which it implements
5462    to always fail with ENOSYS.  Some functions are actually named
5463    something starting with __ and the normal name is an alias.  */
5464#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5465choke me
5466#else
5467f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5468#endif
5469
5470  ;
5471  return 0;
5472}
5473_ACEOF
5474rm -f conftest.$ac_objext conftest$ac_exeext
5475if { (eval echo "$as_me:5475: \"$ac_link\"") >&5
5476  (eval $ac_link) 2>&5
5477  ac_status=$?
5478  echo "$as_me:5478: \$? = $ac_status" >&5
5479  (exit $ac_status); } &&
5480         { ac_try='test -s conftest$ac_exeext'
5481  { (eval echo "$as_me:5481: \"$ac_try\"") >&5
5482  (eval $ac_try) 2>&5
5483  ac_status=$?
5484  echo "$as_me:5484: \$? = $ac_status" >&5
5485  (exit $ac_status); }; }; then
5486  eval "$as_ac_var=yes"
5487else
5488  echo "$as_me: failed program was:" >&5
5489cat conftest.$ac_ext >&5
5490eval "$as_ac_var=no"
5491fi
5492rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5493fi
5494echo "$as_me:5494: result: `eval echo '${'$as_ac_var'}'`" >&5
5495echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5496if test `eval echo '${'$as_ac_var'}'` = yes; then
5497
5498cat >>confdefs.h <<EOF
5499#define CRAY_STACKSEG_END $ac_func
5500EOF
5501
5502    break
5503fi
5504
5505  done
5506fi
5507
5508echo "$as_me:5508: checking stack direction for C alloca" >&5
5509echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
5510if test "${ac_cv_c_stack_direction+set}" = set; then
5511  echo $ECHO_N "(cached) $ECHO_C" >&6
5512else
5513  if test "$cross_compiling" = yes; then
5514  ac_cv_c_stack_direction=0
5515else
5516  cat >conftest.$ac_ext <<_ACEOF
5517#line 5517 "configure"
5518#include "confdefs.h"
5519int
5520find_stack_direction ()
5521{
5522  static char *addr = 0;
5523  auto char dummy;
5524  if (addr == 0)
5525    {
5526      addr = &dummy;
5527      return find_stack_direction ();
5528    }
5529  else
5530    return (&dummy > addr) ? 1 : -1;
5531}
5532
5533int
5534main ()
5535{
5536  $ac_main_return (find_stack_direction () < 0);
5537}
5538_ACEOF
5539rm -f conftest$ac_exeext
5540if { (eval echo "$as_me:5540: \"$ac_link\"") >&5
5541  (eval $ac_link) 2>&5
5542  ac_status=$?
5543  echo "$as_me:5543: \$? = $ac_status" >&5
5544  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5545  { (eval echo "$as_me:5545: \"$ac_try\"") >&5
5546  (eval $ac_try) 2>&5
5547  ac_status=$?
5548  echo "$as_me:5548: \$? = $ac_status" >&5
5549  (exit $ac_status); }; }; then
5550  ac_cv_c_stack_direction=1
5551else
5552  echo "$as_me: program exited with status $ac_status" >&5
5553echo "$as_me: failed program was:" >&5
5554cat conftest.$ac_ext >&5
5555ac_cv_c_stack_direction=-1
5556fi
5557rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5558fi
5559fi
5560echo "$as_me:5560: result: $ac_cv_c_stack_direction" >&5
5561echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
5562
5563cat >>confdefs.h <<EOF
5564#define STACK_DIRECTION $ac_cv_c_stack_direction
5565EOF
5566
5567fi
5568
5569for ac_header in stdlib.h unistd.h
5570do
5571as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5572echo "$as_me:5572: checking for $ac_header" >&5
5573echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5574if eval "test \"\${$as_ac_Header+set}\" = set"; then
5575  echo $ECHO_N "(cached) $ECHO_C" >&6
5576else
5577  cat >conftest.$ac_ext <<_ACEOF
5578#line 5578 "configure"
5579#include "confdefs.h"
5580#include <$ac_header>
5581_ACEOF
5582if { (eval echo "$as_me:5582: \"$ac_cpp conftest.$ac_ext\"") >&5
5583  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5584  ac_status=$?
5585  egrep -v '^ *\+' conftest.er1 >conftest.err
5586  rm -f conftest.er1
5587  cat conftest.err >&5
5588  echo "$as_me:5588: \$? = $ac_status" >&5
5589  (exit $ac_status); } >/dev/null; then
5590  if test -s conftest.err; then
5591    ac_cpp_err=$ac_c_preproc_warn_flag
5592  else
5593    ac_cpp_err=
5594  fi
5595else
5596  ac_cpp_err=yes
5597fi
5598if test -z "$ac_cpp_err"; then
5599  eval "$as_ac_Header=yes"
5600else
5601  echo "$as_me: failed program was:" >&5
5602  cat conftest.$ac_ext >&5
5603  eval "$as_ac_Header=no"
5604fi
5605rm -f conftest.err conftest.$ac_ext
5606fi
5607echo "$as_me:5607: result: `eval echo '${'$as_ac_Header'}'`" >&5
5608echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5609if test `eval echo '${'$as_ac_Header'}'` = yes; then
5610  cat >>confdefs.h <<EOF
5611#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5612EOF
5613
5614fi
5615done
5616
5617for ac_func in getpagesize
5618do
5619as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5620echo "$as_me:5620: checking for $ac_func" >&5
5621echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5622if eval "test \"\${$as_ac_var+set}\" = set"; then
5623  echo $ECHO_N "(cached) $ECHO_C" >&6
5624else
5625  cat >conftest.$ac_ext <<_ACEOF
5626#line 5626 "configure"
5627#include "confdefs.h"
5628/* System header to define __stub macros and hopefully few prototypes,
5629    which can conflict with char $ac_func (); below.  */
5630#include <assert.h>
5631/* Override any gcc2 internal prototype to avoid an error.  */
5632#ifdef __cplusplus
5633extern "C"
5634#endif
5635/* We use char because int might match the return type of a gcc2
5636   builtin and then its argument prototype would still apply.  */
5637char $ac_func ();
5638char (*f) ();
5639
5640int
5641main ()
5642{
5643/* The GNU C library defines this for functions which it implements
5644    to always fail with ENOSYS.  Some functions are actually named
5645    something starting with __ and the normal name is an alias.  */
5646#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5647choke me
5648#else
5649f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5650#endif
5651
5652  ;
5653  return 0;
5654}
5655_ACEOF
5656rm -f conftest.$ac_objext conftest$ac_exeext
5657if { (eval echo "$as_me:5657: \"$ac_link\"") >&5
5658  (eval $ac_link) 2>&5
5659  ac_status=$?
5660  echo "$as_me:5660: \$? = $ac_status" >&5
5661  (exit $ac_status); } &&
5662         { ac_try='test -s conftest$ac_exeext'
5663  { (eval echo "$as_me:5663: \"$ac_try\"") >&5
5664  (eval $ac_try) 2>&5
5665  ac_status=$?
5666  echo "$as_me:5666: \$? = $ac_status" >&5
5667  (exit $ac_status); }; }; then
5668  eval "$as_ac_var=yes"
5669else
5670  echo "$as_me: failed program was:" >&5
5671cat conftest.$ac_ext >&5
5672eval "$as_ac_var=no"
5673fi
5674rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5675fi
5676echo "$as_me:5676: result: `eval echo '${'$as_ac_var'}'`" >&5
5677echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5678if test `eval echo '${'$as_ac_var'}'` = yes; then
5679  cat >>confdefs.h <<EOF
5680#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5681EOF
5682
5683fi
5684done
5685
5686echo "$as_me:5686: checking for working mmap" >&5
5687echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5688if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5689  echo $ECHO_N "(cached) $ECHO_C" >&6
5690else
5691  if test "$cross_compiling" = yes; then
5692  ac_cv_func_mmap_fixed_mapped=no
5693else
5694  cat >conftest.$ac_ext <<_ACEOF
5695#line 5695 "configure"
5696#include "confdefs.h"
5697$ac_includes_default
5698/* Thanks to Mike Haertel and Jim Avera for this test.
5699   Here is a matrix of mmap possibilities:
5700	mmap private not fixed
5701	mmap private fixed at somewhere currently unmapped
5702	mmap private fixed at somewhere already mapped
5703	mmap shared not fixed
5704	mmap shared fixed at somewhere currently unmapped
5705	mmap shared fixed at somewhere already mapped
5706   For private mappings, we should verify that changes cannot be read()
5707   back from the file, nor mmap's back from the file at a different
5708   address.  (There have been systems where private was not correctly
5709   implemented like the infamous i386 svr4.0, and systems where the
5710   VM page cache was not coherent with the file system buffer cache
5711   like early versions of FreeBSD and possibly contemporary NetBSD.)
5712   For shared mappings, we should conversely verify that changes get
5713   propogated back to all the places they're supposed to be.
5714
5715   Grep wants private fixed already mapped.
5716   The main things grep needs to know about mmap are:
5717   * does it exist and is it safe to write into the mmap'd area
5718   * how to use it (BSD variants)  */
5719
5720#include <fcntl.h>
5721#include <sys/mman.h>
5722
5723#if !STDC_HEADERS && !HAVE_STDLIB_H
5724char *malloc ();
5725#endif
5726
5727/* This mess was copied from the GNU getpagesize.h.  */
5728#if !HAVE_GETPAGESIZE
5729/* Assume that all systems that can run configure have sys/param.h.  */
5730# if !HAVE_SYS_PARAM_H
5731#  define HAVE_SYS_PARAM_H 1
5732# endif
5733
5734# ifdef _SC_PAGESIZE
5735#  define getpagesize() sysconf(_SC_PAGESIZE)
5736# else /* no _SC_PAGESIZE */
5737#  if HAVE_SYS_PARAM_H
5738#   include <sys/param.h>
5739#   ifdef EXEC_PAGESIZE
5740#    define getpagesize() EXEC_PAGESIZE
5741#   else /* no EXEC_PAGESIZE */
5742#    ifdef NBPG
5743#     define getpagesize() NBPG * CLSIZE
5744#     ifndef CLSIZE
5745#      define CLSIZE 1
5746#     endif /* no CLSIZE */
5747#    else /* no NBPG */
5748#     ifdef NBPC
5749#      define getpagesize() NBPC
5750#     else /* no NBPC */
5751#      ifdef PAGESIZE
5752#       define getpagesize() PAGESIZE
5753#      endif /* PAGESIZE */
5754#     endif /* no NBPC */
5755#    endif /* no NBPG */
5756#   endif /* no EXEC_PAGESIZE */
5757#  else /* no HAVE_SYS_PARAM_H */
5758#   define getpagesize() 8192	/* punt totally */
5759#  endif /* no HAVE_SYS_PARAM_H */
5760# endif /* no _SC_PAGESIZE */
5761
5762#endif /* no HAVE_GETPAGESIZE */
5763
5764int
5765main ()
5766{
5767  char *data, *data2, *data3;
5768  int i, pagesize;
5769  int fd;
5770
5771  pagesize = getpagesize ();
5772
5773  /* First, make a file with some known garbage in it. */
5774  data = (char *) malloc (pagesize);
5775  if (!data)
5776    $ac_main_return (1);
5777  for (i = 0; i < pagesize; ++i)
5778    *(data + i) = rand ();
5779  umask (0);
5780  fd = creat ("conftest.mmap", 0600);
5781  if (fd < 0)
5782    $ac_main_return (1);
5783  if (write (fd, data, pagesize) != pagesize)
5784    $ac_main_return (1);
5785  close (fd);
5786
5787  /* Next, try to mmap the file at a fixed address which already has
5788     something else allocated at it.  If we can, also make sure that
5789     we see the same garbage.  */
5790  fd = open ("conftest.mmap", O_RDWR);
5791  if (fd < 0)
5792    $ac_main_return (1);
5793  data2 = (char *) malloc (2 * pagesize);
5794  if (!data2)
5795    $ac_main_return (1);
5796  data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5797  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5798                     MAP_PRIVATE | MAP_FIXED, fd, 0L))
5799    $ac_main_return (1);
5800  for (i = 0; i < pagesize; ++i)
5801    if (*(data + i) != *(data2 + i))
5802      $ac_main_return (1);
5803
5804  /* Finally, make sure that changes to the mapped area do not
5805     percolate back to the file as seen by read().  (This is a bug on
5806     some variants of i386 svr4.0.)  */
5807  for (i = 0; i < pagesize; ++i)
5808    *(data2 + i) = *(data2 + i) + 1;
5809  data3 = (char *) malloc (pagesize);
5810  if (!data3)
5811    $ac_main_return (1);
5812  if (read (fd, data3, pagesize) != pagesize)
5813    $ac_main_return (1);
5814  for (i = 0; i < pagesize; ++i)
5815    if (*(data + i) != *(data3 + i))
5816      $ac_main_return (1);
5817  close (fd);
5818  $ac_main_return (0);
5819}
5820_ACEOF
5821rm -f conftest$ac_exeext
5822if { (eval echo "$as_me:5822: \"$ac_link\"") >&5
5823  (eval $ac_link) 2>&5
5824  ac_status=$?
5825  echo "$as_me:5825: \$? = $ac_status" >&5
5826  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5827  { (eval echo "$as_me:5827: \"$ac_try\"") >&5
5828  (eval $ac_try) 2>&5
5829  ac_status=$?
5830  echo "$as_me:5830: \$? = $ac_status" >&5
5831  (exit $ac_status); }; }; then
5832  ac_cv_func_mmap_fixed_mapped=yes
5833else
5834  echo "$as_me: program exited with status $ac_status" >&5
5835echo "$as_me: failed program was:" >&5
5836cat conftest.$ac_ext >&5
5837ac_cv_func_mmap_fixed_mapped=no
5838fi
5839rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5840fi
5841fi
5842echo "$as_me:5842: result: $ac_cv_func_mmap_fixed_mapped" >&5
5843echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
5844if test $ac_cv_func_mmap_fixed_mapped = yes; then
5845
5846cat >>confdefs.h <<\EOF
5847#define HAVE_MMAP 1
5848EOF
5849
5850fi
5851rm -f conftest.mmap
5852
5853    echo "$as_me:5853: checking whether we are using the GNU C Library 2.1 or newer" >&5
5854echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
5855if test "${ac_cv_gnu_library_2_1+set}" = set; then
5856  echo $ECHO_N "(cached) $ECHO_C" >&6
5857else
5858  cat >conftest.$ac_ext <<_ACEOF
5859#line 5859 "configure"
5860#include "confdefs.h"
5861
5862#include <features.h>
5863#ifdef __GNU_LIBRARY__
5864 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5865  Lucky GNU user
5866 #endif
5867#endif
5868
5869_ACEOF
5870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5871  egrep "Lucky GNU user" >/dev/null 2>&1; then
5872  ac_cv_gnu_library_2_1=yes
5873else
5874  ac_cv_gnu_library_2_1=no
5875fi
5876rm -rf conftest*
5877
5878fi
5879echo "$as_me:5879: result: $ac_cv_gnu_library_2_1" >&5
5880echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
5881
5882    GLIBC21="$ac_cv_gnu_library_2_1"
5883
5884cf_makefile=makefile
5885
5886test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
5887
5888# Allow override of "config.h" definition:
5889: ${CONFIG_H:=config.h}
5890
5891if test -z "$PACKAGE" ; then
5892	{ { echo "$as_me:5892: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
5893echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
5894   { (exit 1); exit 1; }; }
5895fi
5896
5897if test -z "$VERSION" ; then
5898if test -f $srcdir/VERSION ; then
5899	VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
5900else
5901	VERSION=unknown
5902fi
5903fi
5904
5905for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5906stdlib.h string.h unistd.h sys/param.h
5907do
5908as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5909echo "$as_me:5909: checking for $ac_header" >&5
5910echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5911if eval "test \"\${$as_ac_Header+set}\" = set"; then
5912  echo $ECHO_N "(cached) $ECHO_C" >&6
5913else
5914  cat >conftest.$ac_ext <<_ACEOF
5915#line 5915 "configure"
5916#include "confdefs.h"
5917#include <$ac_header>
5918_ACEOF
5919if { (eval echo "$as_me:5919: \"$ac_cpp conftest.$ac_ext\"") >&5
5920  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5921  ac_status=$?
5922  egrep -v '^ *\+' conftest.er1 >conftest.err
5923  rm -f conftest.er1
5924  cat conftest.err >&5
5925  echo "$as_me:5925: \$? = $ac_status" >&5
5926  (exit $ac_status); } >/dev/null; then
5927  if test -s conftest.err; then
5928    ac_cpp_err=$ac_c_preproc_warn_flag
5929  else
5930    ac_cpp_err=
5931  fi
5932else
5933  ac_cpp_err=yes
5934fi
5935if test -z "$ac_cpp_err"; then
5936  eval "$as_ac_Header=yes"
5937else
5938  echo "$as_me: failed program was:" >&5
5939  cat conftest.$ac_ext >&5
5940  eval "$as_ac_Header=no"
5941fi
5942rm -f conftest.err conftest.$ac_ext
5943fi
5944echo "$as_me:5944: result: `eval echo '${'$as_ac_Header'}'`" >&5
5945echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5946if test `eval echo '${'$as_ac_Header'}'` = yes; then
5947  cat >>confdefs.h <<EOF
5948#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5949EOF
5950
5951fi
5952done
5953
5954for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5955getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5956strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5957do
5958as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5959echo "$as_me:5959: checking for $ac_func" >&5
5960echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5961if eval "test \"\${$as_ac_var+set}\" = set"; then
5962  echo $ECHO_N "(cached) $ECHO_C" >&6
5963else
5964  cat >conftest.$ac_ext <<_ACEOF
5965#line 5965 "configure"
5966#include "confdefs.h"
5967/* System header to define __stub macros and hopefully few prototypes,
5968    which can conflict with char $ac_func (); below.  */
5969#include <assert.h>
5970/* Override any gcc2 internal prototype to avoid an error.  */
5971#ifdef __cplusplus
5972extern "C"
5973#endif
5974/* We use char because int might match the return type of a gcc2
5975   builtin and then its argument prototype would still apply.  */
5976char $ac_func ();
5977char (*f) ();
5978
5979int
5980main ()
5981{
5982/* The GNU C library defines this for functions which it implements
5983    to always fail with ENOSYS.  Some functions are actually named
5984    something starting with __ and the normal name is an alias.  */
5985#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5986choke me
5987#else
5988f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5989#endif
5990
5991  ;
5992  return 0;
5993}
5994_ACEOF
5995rm -f conftest.$ac_objext conftest$ac_exeext
5996if { (eval echo "$as_me:5996: \"$ac_link\"") >&5
5997  (eval $ac_link) 2>&5
5998  ac_status=$?
5999  echo "$as_me:5999: \$? = $ac_status" >&5
6000  (exit $ac_status); } &&
6001         { ac_try='test -s conftest$ac_exeext'
6002  { (eval echo "$as_me:6002: \"$ac_try\"") >&5
6003  (eval $ac_try) 2>&5
6004  ac_status=$?
6005  echo "$as_me:6005: \$? = $ac_status" >&5
6006  (exit $ac_status); }; }; then
6007  eval "$as_ac_var=yes"
6008else
6009  echo "$as_me: failed program was:" >&5
6010cat conftest.$ac_ext >&5
6011eval "$as_ac_var=no"
6012fi
6013rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6014fi
6015echo "$as_me:6015: result: `eval echo '${'$as_ac_var'}'`" >&5
6016echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6017if test `eval echo '${'$as_ac_var'}'` = yes; then
6018  cat >>confdefs.h <<EOF
6019#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6020EOF
6021
6022fi
6023done
6024
6025# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
6026if test "${with_libiconv_prefix+set}" = set; then
6027  withval="$with_libiconv_prefix"
6028
6029  case "$withval" in #(vi
6030  no) #(vi
6031      ;;
6032  yes) #(vi
6033      ;;
6034  *)
6035
6036for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
6037	if test -d $cf_searchpath/include; then
6038
6039if test -n "$cf_searchpath/include" ; then
6040  for cf_add_incdir in $cf_searchpath/include
6041  do
6042	while test $cf_add_incdir != /usr/include
6043	do
6044	  if test -d $cf_add_incdir
6045	  then
6046		cf_have_incdir=no
6047		if test -n "$CFLAGS$CPPFLAGS" ; then
6048		  # a loop is needed to ensure we can add subdirs of existing dirs
6049		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6050			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6051			  cf_have_incdir=yes; break
6052			fi
6053		  done
6054		fi
6055
6056		if test "$cf_have_incdir" = no ; then
6057		  if test "$cf_add_incdir" = /usr/local/include ; then
6058			if test "$GCC" = yes
6059			then
6060			  cf_save_CPPFLAGS=$CPPFLAGS
6061			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6062			  cat >conftest.$ac_ext <<_ACEOF
6063#line 6063 "configure"
6064#include "confdefs.h"
6065#include <stdio.h>
6066int
6067main ()
6068{
6069printf("Hello")
6070  ;
6071  return 0;
6072}
6073_ACEOF
6074rm -f conftest.$ac_objext
6075if { (eval echo "$as_me:6075: \"$ac_compile\"") >&5
6076  (eval $ac_compile) 2>&5
6077  ac_status=$?
6078  echo "$as_me:6078: \$? = $ac_status" >&5
6079  (exit $ac_status); } &&
6080         { ac_try='test -s conftest.$ac_objext'
6081  { (eval echo "$as_me:6081: \"$ac_try\"") >&5
6082  (eval $ac_try) 2>&5
6083  ac_status=$?
6084  echo "$as_me:6084: \$? = $ac_status" >&5
6085  (exit $ac_status); }; }; then
6086  :
6087else
6088  echo "$as_me: failed program was:" >&5
6089cat conftest.$ac_ext >&5
6090cf_have_incdir=yes
6091fi
6092rm -f conftest.$ac_objext conftest.$ac_ext
6093			  CPPFLAGS=$cf_save_CPPFLAGS
6094			fi
6095		  fi
6096		fi
6097
6098		if test "$cf_have_incdir" = no ; then
6099		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
6100
6101echo "${as_me:-configure}:6101: testing adding $cf_add_incdir to include-path ..." 1>&5
6102
6103		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6104
6105		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6106		  test "$cf_top_incdir" = "$cf_add_incdir" && break
6107		  cf_add_incdir="$cf_top_incdir"
6108		else
6109		  break
6110		fi
6111	  fi
6112	done
6113  done
6114fi
6115
6116	elif test -d $cf_searchpath/../include ; then
6117
6118if test -n "$cf_searchpath/../include" ; then
6119  for cf_add_incdir in $cf_searchpath/../include
6120  do
6121	while test $cf_add_incdir != /usr/include
6122	do
6123	  if test -d $cf_add_incdir
6124	  then
6125		cf_have_incdir=no
6126		if test -n "$CFLAGS$CPPFLAGS" ; then
6127		  # a loop is needed to ensure we can add subdirs of existing dirs
6128		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6129			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6130			  cf_have_incdir=yes; break
6131			fi
6132		  done
6133		fi
6134
6135		if test "$cf_have_incdir" = no ; then
6136		  if test "$cf_add_incdir" = /usr/local/include ; then
6137			if test "$GCC" = yes
6138			then
6139			  cf_save_CPPFLAGS=$CPPFLAGS
6140			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6141			  cat >conftest.$ac_ext <<_ACEOF
6142#line 6142 "configure"
6143#include "confdefs.h"
6144#include <stdio.h>
6145int
6146main ()
6147{
6148printf("Hello")
6149  ;
6150  return 0;
6151}
6152_ACEOF
6153rm -f conftest.$ac_objext
6154if { (eval echo "$as_me:6154: \"$ac_compile\"") >&5
6155  (eval $ac_compile) 2>&5
6156  ac_status=$?
6157  echo "$as_me:6157: \$? = $ac_status" >&5
6158  (exit $ac_status); } &&
6159         { ac_try='test -s conftest.$ac_objext'
6160  { (eval echo "$as_me:6160: \"$ac_try\"") >&5
6161  (eval $ac_try) 2>&5
6162  ac_status=$?
6163  echo "$as_me:6163: \$? = $ac_status" >&5
6164  (exit $ac_status); }; }; then
6165  :
6166else
6167  echo "$as_me: failed program was:" >&5
6168cat conftest.$ac_ext >&5
6169cf_have_incdir=yes
6170fi
6171rm -f conftest.$ac_objext conftest.$ac_ext
6172			  CPPFLAGS=$cf_save_CPPFLAGS
6173			fi
6174		  fi
6175		fi
6176
6177		if test "$cf_have_incdir" = no ; then
6178		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
6179
6180echo "${as_me:-configure}:6180: testing adding $cf_add_incdir to include-path ..." 1>&5
6181
6182		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6183
6184		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6185		  test "$cf_top_incdir" = "$cf_add_incdir" && break
6186		  cf_add_incdir="$cf_top_incdir"
6187		else
6188		  break
6189		fi
6190	  fi
6191	done
6192  done
6193fi
6194
6195	else
6196{ { echo "$as_me:6196: error: cannot find libiconv under $withval" >&5
6197echo "$as_me: error: cannot find libiconv under $withval" >&2;}
6198   { (exit 1); exit 1; }; }
6199	fi
6200	if test -d $cf_searchpath/lib; then
6201
6202if test -n "$cf_searchpath/lib" ; then
6203  for cf_add_libdir in $cf_searchpath/lib
6204  do
6205    if test $cf_add_libdir = /usr/lib ; then
6206      :
6207    elif test -d $cf_add_libdir
6208    then
6209      cf_have_libdir=no
6210      if test -n "$LDFLAGS$LIBS" ; then
6211        # a loop is needed to ensure we can add subdirs of existing dirs
6212        for cf_test_libdir in $LDFLAGS $LIBS ; do
6213          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6214            cf_have_libdir=yes; break
6215          fi
6216        done
6217      fi
6218      if test "$cf_have_libdir" = no ; then
6219        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
6220
6221echo "${as_me:-configure}:6221: testing adding $cf_add_libdir to library-path ..." 1>&5
6222
6223        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6224      fi
6225    fi
6226  done
6227fi
6228
6229	elif test -d $cf_searchpath ; then
6230
6231if test -n "$cf_searchpath" ; then
6232  for cf_add_libdir in $cf_searchpath
6233  do
6234    if test $cf_add_libdir = /usr/lib ; then
6235      :
6236    elif test -d $cf_add_libdir
6237    then
6238      cf_have_libdir=no
6239      if test -n "$LDFLAGS$LIBS" ; then
6240        # a loop is needed to ensure we can add subdirs of existing dirs
6241        for cf_test_libdir in $LDFLAGS $LIBS ; do
6242          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6243            cf_have_libdir=yes; break
6244          fi
6245        done
6246      fi
6247      if test "$cf_have_libdir" = no ; then
6248        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
6249
6250echo "${as_me:-configure}:6250: testing adding $cf_add_libdir to library-path ..." 1>&5
6251
6252        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6253      fi
6254    fi
6255  done
6256fi
6257
6258	else
6259{ { echo "$as_me:6259: error: cannot find libiconv under $withval" >&5
6260echo "$as_me: error: cannot find libiconv under $withval" >&2;}
6261   { (exit 1); exit 1; }; }
6262	fi
6263done
6264
6265      ;;
6266  esac
6267
6268fi;
6269
6270  echo "$as_me:6270: checking for iconv" >&5
6271echo $ECHO_N "checking for iconv... $ECHO_C" >&6
6272if test "${am_cv_func_iconv+set}" = set; then
6273  echo $ECHO_N "(cached) $ECHO_C" >&6
6274else
6275
6276# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6277# will be set on completion of the AC_TRY_LINK below.
6278cf_cv_header_path_iconv=
6279cf_cv_library_path_iconv=
6280
6281echo "${as_me:-configure}:6281: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
6282
6283cf_save_LIBS="$LIBS"
6284
6285cat >conftest.$ac_ext <<_ACEOF
6286#line 6286 "configure"
6287#include "confdefs.h"
6288
6289#include <stdlib.h>
6290#include <iconv.h>
6291
6292int
6293main ()
6294{
6295
6296	iconv_t cd = iconv_open("","");
6297	iconv(cd,NULL,NULL,NULL,NULL);
6298	iconv_close(cd);
6299
6300  ;
6301  return 0;
6302}
6303_ACEOF
6304rm -f conftest.$ac_objext conftest$ac_exeext
6305if { (eval echo "$as_me:6305: \"$ac_link\"") >&5
6306  (eval $ac_link) 2>&5
6307  ac_status=$?
6308  echo "$as_me:6308: \$? = $ac_status" >&5
6309  (exit $ac_status); } &&
6310         { ac_try='test -s conftest$ac_exeext'
6311  { (eval echo "$as_me:6311: \"$ac_try\"") >&5
6312  (eval $ac_try) 2>&5
6313  ac_status=$?
6314  echo "$as_me:6314: \$? = $ac_status" >&5
6315  (exit $ac_status); }; }; then
6316
6317	cf_cv_find_linkage_iconv=yes
6318	cf_cv_header_path_iconv=/usr/include
6319	cf_cv_library_path_iconv=/usr/lib
6320
6321else
6322  echo "$as_me: failed program was:" >&5
6323cat conftest.$ac_ext >&5
6324
6325LIBS="-liconv  $cf_save_LIBS"
6326
6327cat >conftest.$ac_ext <<_ACEOF
6328#line 6328 "configure"
6329#include "confdefs.h"
6330
6331#include <stdlib.h>
6332#include <iconv.h>
6333
6334int
6335main ()
6336{
6337
6338	iconv_t cd = iconv_open("","");
6339	iconv(cd,NULL,NULL,NULL,NULL);
6340	iconv_close(cd);
6341
6342  ;
6343  return 0;
6344}
6345_ACEOF
6346rm -f conftest.$ac_objext conftest$ac_exeext
6347if { (eval echo "$as_me:6347: \"$ac_link\"") >&5
6348  (eval $ac_link) 2>&5
6349  ac_status=$?
6350  echo "$as_me:6350: \$? = $ac_status" >&5
6351  (exit $ac_status); } &&
6352         { ac_try='test -s conftest$ac_exeext'
6353  { (eval echo "$as_me:6353: \"$ac_try\"") >&5
6354  (eval $ac_try) 2>&5
6355  ac_status=$?
6356  echo "$as_me:6356: \$? = $ac_status" >&5
6357  (exit $ac_status); }; }; then
6358
6359	cf_cv_find_linkage_iconv=yes
6360	cf_cv_header_path_iconv=/usr/include
6361	cf_cv_library_path_iconv=/usr/lib
6362	cf_cv_library_file_iconv="-liconv"
6363
6364else
6365  echo "$as_me: failed program was:" >&5
6366cat conftest.$ac_ext >&5
6367
6368	cf_cv_find_linkage_iconv=no
6369	LIBS="$cf_save_LIBS"
6370
6371    test -n "$verbose" && echo "	find linkage for iconv library" 1>&6
6372
6373echo "${as_me:-configure}:6373: testing find linkage for iconv library ..." 1>&5
6374
6375echo "${as_me:-configure}:6375: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
6376
6377    cf_save_CPPFLAGS="$CPPFLAGS"
6378    cf_test_CPPFLAGS="$CPPFLAGS"
6379
6380cf_search=
6381
6382# collect the current set of include-directories from compiler flags
6383cf_header_path_list=""
6384if test -n "${CFLAGS}${CPPFLAGS}" ; then
6385	for cf_header_path in $CPPFLAGS $CFLAGS
6386	do
6387		case $cf_header_path in #(vi
6388		-I*)
6389			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6390
6391test "$cf_header_path" != "NONE" && \
6392test -d "$cf_header_path" && \
6393 {
6394	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
6395	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6396	test -d $cf_header_path/include/iconv &&       cf_search="$cf_search $cf_header_path/include/iconv"
6397	test -d $cf_header_path/include/iconv/include &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
6398	test -d $cf_header_path/iconv/include &&       cf_search="$cf_search $cf_header_path/iconv/include"
6399	test -d $cf_header_path/iconv/include/iconv &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
6400}
6401
6402			cf_header_path_list="$cf_header_path_list $cf_search"
6403			;;
6404		esac
6405	done
6406fi
6407
6408# add the variations for the package we are looking for
6409
6410cf_search=
6411
6412test "/usr" != "$prefix" && \
6413test -d "/usr" && \
6414(test $prefix = NONE || test "/usr" != "$prefix") && {
6415	test -n "$verbose" && echo "	... testing for include-directories under /usr"
6416	test -d /usr/include &&          cf_search="$cf_search /usr/include"
6417	test -d /usr/include/iconv &&       cf_search="$cf_search /usr/include/iconv"
6418	test -d /usr/include/iconv/include &&    cf_search="$cf_search /usr/include/iconv/include"
6419	test -d /usr/iconv/include &&       cf_search="$cf_search /usr/iconv/include"
6420	test -d /usr/iconv/include/iconv &&    cf_search="$cf_search /usr/iconv/include/iconv"
6421}
6422
6423test "$prefix" != "NONE" && \
6424test -d "$prefix" && \
6425 {
6426	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
6427	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6428	test -d $prefix/include/iconv &&       cf_search="$cf_search $prefix/include/iconv"
6429	test -d $prefix/include/iconv/include &&    cf_search="$cf_search $prefix/include/iconv/include"
6430	test -d $prefix/iconv/include &&       cf_search="$cf_search $prefix/iconv/include"
6431	test -d $prefix/iconv/include/iconv &&    cf_search="$cf_search $prefix/iconv/include/iconv"
6432}
6433
6434test "/usr/local" != "$prefix" && \
6435test -d "/usr/local" && \
6436(test $prefix = NONE || test "/usr/local" != "$prefix") && {
6437	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
6438	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6439	test -d /usr/local/include/iconv &&       cf_search="$cf_search /usr/local/include/iconv"
6440	test -d /usr/local/include/iconv/include &&    cf_search="$cf_search /usr/local/include/iconv/include"
6441	test -d /usr/local/iconv/include &&       cf_search="$cf_search /usr/local/iconv/include"
6442	test -d /usr/local/iconv/include/iconv &&    cf_search="$cf_search /usr/local/iconv/include/iconv"
6443}
6444
6445test "/opt" != "$prefix" && \
6446test -d "/opt" && \
6447(test $prefix = NONE || test "/opt" != "$prefix") && {
6448	test -n "$verbose" && echo "	... testing for include-directories under /opt"
6449	test -d /opt/include &&          cf_search="$cf_search /opt/include"
6450	test -d /opt/include/iconv &&       cf_search="$cf_search /opt/include/iconv"
6451	test -d /opt/include/iconv/include &&    cf_search="$cf_search /opt/include/iconv/include"
6452	test -d /opt/iconv/include &&       cf_search="$cf_search /opt/iconv/include"
6453	test -d /opt/iconv/include/iconv &&    cf_search="$cf_search /opt/iconv/include/iconv"
6454}
6455
6456test "$HOME" != "$prefix" && \
6457test -d "$HOME" && \
6458(test $prefix = NONE || test "$HOME" != "$prefix") && {
6459	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
6460	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6461	test -d $HOME/include/iconv &&       cf_search="$cf_search $HOME/include/iconv"
6462	test -d $HOME/include/iconv/include &&    cf_search="$cf_search $HOME/include/iconv/include"
6463	test -d $HOME/iconv/include &&       cf_search="$cf_search $HOME/iconv/include"
6464	test -d $HOME/iconv/include/iconv &&    cf_search="$cf_search $HOME/iconv/include/iconv"
6465}
6466
6467test "$includedir" != NONE && \
6468test "$includedir" != "/usr/include" && \
6469test -d "$includedir" && {
6470	test -d $includedir &&    cf_search="$cf_search $includedir"
6471	test -d $includedir/iconv && cf_search="$cf_search $includedir/iconv"
6472}
6473
6474test "$oldincludedir" != NONE && \
6475test "$oldincludedir" != "/usr/include" && \
6476test -d "$oldincludedir" && {
6477	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6478	test -d $oldincludedir/iconv && cf_search="$cf_search $oldincludedir/iconv"
6479}
6480
6481cf_search="$cf_search $cf_header_path_list"
6482
6483    for cf_cv_header_path_iconv in $cf_search
6484    do
6485      if test -d $cf_cv_header_path_iconv ; then
6486        test -n "$verbose" && echo "	... testing $cf_cv_header_path_iconv" 1>&6
6487
6488echo "${as_me:-configure}:6488: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
6489
6490        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_iconv"
6491        cat >conftest.$ac_ext <<_ACEOF
6492#line 6492 "configure"
6493#include "confdefs.h"
6494
6495#include <stdlib.h>
6496#include <iconv.h>
6497
6498int
6499main ()
6500{
6501
6502	iconv_t cd = iconv_open("","");
6503	iconv(cd,NULL,NULL,NULL,NULL);
6504	iconv_close(cd);
6505
6506  ;
6507  return 0;
6508}
6509_ACEOF
6510rm -f conftest.$ac_objext
6511if { (eval echo "$as_me:6511: \"$ac_compile\"") >&5
6512  (eval $ac_compile) 2>&5
6513  ac_status=$?
6514  echo "$as_me:6514: \$? = $ac_status" >&5
6515  (exit $ac_status); } &&
6516         { ac_try='test -s conftest.$ac_objext'
6517  { (eval echo "$as_me:6517: \"$ac_try\"") >&5
6518  (eval $ac_try) 2>&5
6519  ac_status=$?
6520  echo "$as_me:6520: \$? = $ac_status" >&5
6521  (exit $ac_status); }; }; then
6522
6523            test -n "$verbose" && echo "	... found iconv headers in $cf_cv_header_path_iconv" 1>&6
6524
6525echo "${as_me:-configure}:6525: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
6526
6527            cf_cv_find_linkage_iconv=maybe
6528            cf_test_CPPFLAGS="$CPPFLAGS"
6529            break
6530else
6531  echo "$as_me: failed program was:" >&5
6532cat conftest.$ac_ext >&5
6533
6534            CPPFLAGS="$cf_save_CPPFLAGS"
6535
6536fi
6537rm -f conftest.$ac_objext conftest.$ac_ext
6538      fi
6539    done
6540
6541    if test "$cf_cv_find_linkage_iconv" = maybe ; then
6542
6543echo "${as_me:-configure}:6543: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
6544
6545      cf_save_LIBS="$LIBS"
6546      cf_save_LDFLAGS="$LDFLAGS"
6547
6548      if test "$cf_cv_find_linkage_iconv" != yes ; then
6549
6550cf_search=
6551cf_library_path_list=""
6552if test -n "${LDFLAGS}${LIBS}" ; then
6553	for cf_library_path in $LDFLAGS $LIBS
6554	do
6555		case $cf_library_path in #(vi
6556		-L*)
6557			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6558
6559test "$cf_library_path" != "NONE" && \
6560test -d "$cf_library_path" && \
6561 {
6562	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
6563	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6564	test -d $cf_library_path/lib/iconv &&       cf_search="$cf_search $cf_library_path/lib/iconv"
6565	test -d $cf_library_path/lib/iconv/lib &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
6566	test -d $cf_library_path/iconv/lib &&       cf_search="$cf_search $cf_library_path/iconv/lib"
6567	test -d $cf_library_path/iconv/lib/iconv &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
6568}
6569
6570			cf_library_path_list="$cf_library_path_list $cf_search"
6571			;;
6572		esac
6573	done
6574fi
6575
6576cf_search=
6577
6578test "/usr" != "$prefix" && \
6579test -d "/usr" && \
6580(test $prefix = NONE || test "/usr" != "$prefix") && {
6581	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
6582	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6583	test -d /usr/lib/iconv &&       cf_search="$cf_search /usr/lib/iconv"
6584	test -d /usr/lib/iconv/lib &&    cf_search="$cf_search /usr/lib/iconv/lib"
6585	test -d /usr/iconv/lib &&       cf_search="$cf_search /usr/iconv/lib"
6586	test -d /usr/iconv/lib/iconv &&    cf_search="$cf_search /usr/iconv/lib/iconv"
6587}
6588
6589test "$prefix" != "NONE" && \
6590test -d "$prefix" && \
6591 {
6592	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
6593	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6594	test -d $prefix/lib/iconv &&       cf_search="$cf_search $prefix/lib/iconv"
6595	test -d $prefix/lib/iconv/lib &&    cf_search="$cf_search $prefix/lib/iconv/lib"
6596	test -d $prefix/iconv/lib &&       cf_search="$cf_search $prefix/iconv/lib"
6597	test -d $prefix/iconv/lib/iconv &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
6598}
6599
6600test "/usr/local" != "$prefix" && \
6601test -d "/usr/local" && \
6602(test $prefix = NONE || test "/usr/local" != "$prefix") && {
6603	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
6604	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6605	test -d /usr/local/lib/iconv &&       cf_search="$cf_search /usr/local/lib/iconv"
6606	test -d /usr/local/lib/iconv/lib &&    cf_search="$cf_search /usr/local/lib/iconv/lib"
6607	test -d /usr/local/iconv/lib &&       cf_search="$cf_search /usr/local/iconv/lib"
6608	test -d /usr/local/iconv/lib/iconv &&    cf_search="$cf_search /usr/local/iconv/lib/iconv"
6609}
6610
6611test "/opt" != "$prefix" && \
6612test -d "/opt" && \
6613(test $prefix = NONE || test "/opt" != "$prefix") && {
6614	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
6615	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6616	test -d /opt/lib/iconv &&       cf_search="$cf_search /opt/lib/iconv"
6617	test -d /opt/lib/iconv/lib &&    cf_search="$cf_search /opt/lib/iconv/lib"
6618	test -d /opt/iconv/lib &&       cf_search="$cf_search /opt/iconv/lib"
6619	test -d /opt/iconv/lib/iconv &&    cf_search="$cf_search /opt/iconv/lib/iconv"
6620}
6621
6622test "$HOME" != "$prefix" && \
6623test -d "$HOME" && \
6624(test $prefix = NONE || test "$HOME" != "$prefix") && {
6625	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
6626	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6627	test -d $HOME/lib/iconv &&       cf_search="$cf_search $HOME/lib/iconv"
6628	test -d $HOME/lib/iconv/lib &&    cf_search="$cf_search $HOME/lib/iconv/lib"
6629	test -d $HOME/iconv/lib &&       cf_search="$cf_search $HOME/iconv/lib"
6630	test -d $HOME/iconv/lib/iconv &&    cf_search="$cf_search $HOME/iconv/lib/iconv"
6631}
6632
6633cf_search="$cf_library_path_list $cf_search"
6634
6635        for cf_cv_library_path_iconv in $cf_search
6636        do
6637          if test -d $cf_cv_library_path_iconv ; then
6638            test -n "$verbose" && echo "	... testing $cf_cv_library_path_iconv" 1>&6
6639
6640echo "${as_me:-configure}:6640: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
6641
6642            CPPFLAGS="$cf_test_CPPFLAGS"
6643            LIBS="-liconv  $cf_save_LIBS"
6644            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
6645            cat >conftest.$ac_ext <<_ACEOF
6646#line 6646 "configure"
6647#include "confdefs.h"
6648
6649#include <stdlib.h>
6650#include <iconv.h>
6651
6652int
6653main ()
6654{
6655
6656	iconv_t cd = iconv_open("","");
6657	iconv(cd,NULL,NULL,NULL,NULL);
6658	iconv_close(cd);
6659
6660  ;
6661  return 0;
6662}
6663_ACEOF
6664rm -f conftest.$ac_objext conftest$ac_exeext
6665if { (eval echo "$as_me:6665: \"$ac_link\"") >&5
6666  (eval $ac_link) 2>&5
6667  ac_status=$?
6668  echo "$as_me:6668: \$? = $ac_status" >&5
6669  (exit $ac_status); } &&
6670         { ac_try='test -s conftest$ac_exeext'
6671  { (eval echo "$as_me:6671: \"$ac_try\"") >&5
6672  (eval $ac_try) 2>&5
6673  ac_status=$?
6674  echo "$as_me:6674: \$? = $ac_status" >&5
6675  (exit $ac_status); }; }; then
6676
6677                test -n "$verbose" && echo "	... found iconv library in $cf_cv_library_path_iconv" 1>&6
6678
6679echo "${as_me:-configure}:6679: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
6680
6681                cf_cv_find_linkage_iconv=yes
6682                cf_cv_library_file_iconv="-liconv"
6683                break
6684else
6685  echo "$as_me: failed program was:" >&5
6686cat conftest.$ac_ext >&5
6687
6688                CPPFLAGS="$cf_save_CPPFLAGS"
6689                LIBS="$cf_save_LIBS"
6690                LDFLAGS="$cf_save_LDFLAGS"
6691
6692fi
6693rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6694          fi
6695        done
6696        CPPFLAGS="$cf_save_CPPFLAGS"
6697        LDFLAGS="$cf_save_LDFLAGS"
6698      fi
6699
6700    else
6701      cf_cv_find_linkage_iconv=no
6702    fi
6703
6704fi
6705rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6706
6707fi
6708rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6709
6710LIBS="$cf_save_LIBS"
6711
6712if test "$cf_cv_find_linkage_iconv" = yes ; then
6713am_cv_func_iconv=yes
6714else
6715am_cv_func_iconv="no, consider installing GNU libiconv"
6716fi
6717
6718fi
6719echo "$as_me:6719: result: $am_cv_func_iconv" >&5
6720echo "${ECHO_T}$am_cv_func_iconv" >&6
6721
6722  if test "$am_cv_func_iconv" = yes; then
6723
6724cat >>confdefs.h <<\EOF
6725#define HAVE_ICONV 1
6726EOF
6727
6728    echo "$as_me:6728: checking if the declaration of iconv() needs const." >&5
6729echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
6730if test "${am_cv_proto_iconv_const+set}" = set; then
6731  echo $ECHO_N "(cached) $ECHO_C" >&6
6732else
6733
6734      cat >conftest.$ac_ext <<_ACEOF
6735#line 6735 "configure"
6736#include "confdefs.h"
6737
6738#include <stdlib.h>
6739#include <iconv.h>
6740
6741extern
6742#ifdef __cplusplus
6743"C"
6744#endif
6745#if defined(__STDC__) || defined(__cplusplus)
6746size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6747#else
6748size_t iconv();
6749#endif
6750
6751int
6752main ()
6753{
6754
6755  ;
6756  return 0;
6757}
6758_ACEOF
6759rm -f conftest.$ac_objext
6760if { (eval echo "$as_me:6760: \"$ac_compile\"") >&5
6761  (eval $ac_compile) 2>&5
6762  ac_status=$?
6763  echo "$as_me:6763: \$? = $ac_status" >&5
6764  (exit $ac_status); } &&
6765         { ac_try='test -s conftest.$ac_objext'
6766  { (eval echo "$as_me:6766: \"$ac_try\"") >&5
6767  (eval $ac_try) 2>&5
6768  ac_status=$?
6769  echo "$as_me:6769: \$? = $ac_status" >&5
6770  (exit $ac_status); }; }; then
6771  am_cv_proto_iconv_const=no
6772else
6773  echo "$as_me: failed program was:" >&5
6774cat conftest.$ac_ext >&5
6775am_cv_proto_iconv_const=yes
6776fi
6777rm -f conftest.$ac_objext conftest.$ac_ext
6778fi
6779echo "$as_me:6779: result: $am_cv_proto_iconv_const" >&5
6780echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
6781
6782    if test "$am_cv_proto_iconv_const" = yes ; then
6783      am_cv_proto_iconv_arg1="const"
6784    else
6785      am_cv_proto_iconv_arg1=""
6786    fi
6787
6788cat >>confdefs.h <<EOF
6789#define ICONV_CONST $am_cv_proto_iconv_arg1
6790EOF
6791
6792  fi
6793
6794  LIBICONV=
6795  if test "$cf_cv_find_linkage_iconv" = yes; then
6796
6797if test -n "$cf_cv_header_path_iconv" ; then
6798  for cf_add_incdir in $cf_cv_header_path_iconv
6799  do
6800	while test $cf_add_incdir != /usr/include
6801	do
6802	  if test -d $cf_add_incdir
6803	  then
6804		cf_have_incdir=no
6805		if test -n "$CFLAGS$CPPFLAGS" ; then
6806		  # a loop is needed to ensure we can add subdirs of existing dirs
6807		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6808			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6809			  cf_have_incdir=yes; break
6810			fi
6811		  done
6812		fi
6813
6814		if test "$cf_have_incdir" = no ; then
6815		  if test "$cf_add_incdir" = /usr/local/include ; then
6816			if test "$GCC" = yes
6817			then
6818			  cf_save_CPPFLAGS=$CPPFLAGS
6819			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6820			  cat >conftest.$ac_ext <<_ACEOF
6821#line 6821 "configure"
6822#include "confdefs.h"
6823#include <stdio.h>
6824int
6825main ()
6826{
6827printf("Hello")
6828  ;
6829  return 0;
6830}
6831_ACEOF
6832rm -f conftest.$ac_objext
6833if { (eval echo "$as_me:6833: \"$ac_compile\"") >&5
6834  (eval $ac_compile) 2>&5
6835  ac_status=$?
6836  echo "$as_me:6836: \$? = $ac_status" >&5
6837  (exit $ac_status); } &&
6838         { ac_try='test -s conftest.$ac_objext'
6839  { (eval echo "$as_me:6839: \"$ac_try\"") >&5
6840  (eval $ac_try) 2>&5
6841  ac_status=$?
6842  echo "$as_me:6842: \$? = $ac_status" >&5
6843  (exit $ac_status); }; }; then
6844  :
6845else
6846  echo "$as_me: failed program was:" >&5
6847cat conftest.$ac_ext >&5
6848cf_have_incdir=yes
6849fi
6850rm -f conftest.$ac_objext conftest.$ac_ext
6851			  CPPFLAGS=$cf_save_CPPFLAGS
6852			fi
6853		  fi
6854		fi
6855
6856		if test "$cf_have_incdir" = no ; then
6857		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
6858
6859echo "${as_me:-configure}:6859: testing adding $cf_add_incdir to include-path ..." 1>&5
6860
6861		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6862
6863		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6864		  test "$cf_top_incdir" = "$cf_add_incdir" && break
6865		  cf_add_incdir="$cf_top_incdir"
6866		else
6867		  break
6868		fi
6869	  fi
6870	done
6871  done
6872fi
6873
6874    if test -n "$cf_cv_library_file_iconv" ; then
6875      LIBICONV="-liconv"
6876
6877if test -n "$cf_cv_library_path_iconv" ; then
6878  for cf_add_libdir in $cf_cv_library_path_iconv
6879  do
6880    if test $cf_add_libdir = /usr/lib ; then
6881      :
6882    elif test -d $cf_add_libdir
6883    then
6884      cf_have_libdir=no
6885      if test -n "$LDFLAGS$LIBS" ; then
6886        # a loop is needed to ensure we can add subdirs of existing dirs
6887        for cf_test_libdir in $LDFLAGS $LIBS ; do
6888          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6889            cf_have_libdir=yes; break
6890          fi
6891        done
6892      fi
6893      if test "$cf_have_libdir" = no ; then
6894        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
6895
6896echo "${as_me:-configure}:6896: testing adding $cf_add_libdir to library-path ..." 1>&5
6897
6898        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6899      fi
6900    fi
6901  done
6902fi
6903
6904    fi
6905  fi
6906
6907  echo "$as_me:6907: checking for nl_langinfo and CODESET" >&5
6908echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6909if test "${am_cv_langinfo_codeset+set}" = set; then
6910  echo $ECHO_N "(cached) $ECHO_C" >&6
6911else
6912  cat >conftest.$ac_ext <<_ACEOF
6913#line 6913 "configure"
6914#include "confdefs.h"
6915#include <langinfo.h>
6916int
6917main ()
6918{
6919char* cs = nl_langinfo(CODESET);
6920  ;
6921  return 0;
6922}
6923_ACEOF
6924rm -f conftest.$ac_objext conftest$ac_exeext
6925if { (eval echo "$as_me:6925: \"$ac_link\"") >&5
6926  (eval $ac_link) 2>&5
6927  ac_status=$?
6928  echo "$as_me:6928: \$? = $ac_status" >&5
6929  (exit $ac_status); } &&
6930         { ac_try='test -s conftest$ac_exeext'
6931  { (eval echo "$as_me:6931: \"$ac_try\"") >&5
6932  (eval $ac_try) 2>&5
6933  ac_status=$?
6934  echo "$as_me:6934: \$? = $ac_status" >&5
6935  (exit $ac_status); }; }; then
6936  am_cv_langinfo_codeset=yes
6937else
6938  echo "$as_me: failed program was:" >&5
6939cat conftest.$ac_ext >&5
6940am_cv_langinfo_codeset=no
6941fi
6942rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6943
6944fi
6945echo "$as_me:6945: result: $am_cv_langinfo_codeset" >&5
6946echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6947  if test $am_cv_langinfo_codeset = yes; then
6948
6949cat >>confdefs.h <<\EOF
6950#define HAVE_LANGINFO_CODESET 1
6951EOF
6952
6953  fi
6954
6955   if test $ac_cv_header_locale_h = yes; then
6956    echo "$as_me:6956: checking for LC_MESSAGES" >&5
6957echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
6958if test "${am_cv_val_LC_MESSAGES+set}" = set; then
6959  echo $ECHO_N "(cached) $ECHO_C" >&6
6960else
6961  cat >conftest.$ac_ext <<_ACEOF
6962#line 6962 "configure"
6963#include "confdefs.h"
6964#include <locale.h>
6965int
6966main ()
6967{
6968return LC_MESSAGES
6969  ;
6970  return 0;
6971}
6972_ACEOF
6973rm -f conftest.$ac_objext conftest$ac_exeext
6974if { (eval echo "$as_me:6974: \"$ac_link\"") >&5
6975  (eval $ac_link) 2>&5
6976  ac_status=$?
6977  echo "$as_me:6977: \$? = $ac_status" >&5
6978  (exit $ac_status); } &&
6979         { ac_try='test -s conftest$ac_exeext'
6980  { (eval echo "$as_me:6980: \"$ac_try\"") >&5
6981  (eval $ac_try) 2>&5
6982  ac_status=$?
6983  echo "$as_me:6983: \$? = $ac_status" >&5
6984  (exit $ac_status); }; }; then
6985  am_cv_val_LC_MESSAGES=yes
6986else
6987  echo "$as_me: failed program was:" >&5
6988cat conftest.$ac_ext >&5
6989am_cv_val_LC_MESSAGES=no
6990fi
6991rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6992fi
6993echo "$as_me:6993: result: $am_cv_val_LC_MESSAGES" >&5
6994echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
6995    if test $am_cv_val_LC_MESSAGES = yes; then
6996
6997cat >>confdefs.h <<\EOF
6998#define HAVE_LC_MESSAGES 1
6999EOF
7000
7001    fi
7002  fi
7003   echo "$as_me:7003: checking whether NLS is requested" >&5
7004echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
7005
7006# Check whether --enable-nls or --disable-nls was given.
7007if test "${enable_nls+set}" = set; then
7008  enableval="$enable_nls"
7009  USE_NLS=$enableval
7010else
7011  USE_NLS=no
7012fi;
7013  echo "$as_me:7013: result: $USE_NLS" >&5
7014echo "${ECHO_T}$USE_NLS" >&6
7015
7016  BUILD_INCLUDED_LIBINTL=no
7017  USE_INCLUDED_LIBINTL=no
7018  INTLLIBS=
7019
7020    if test "$USE_NLS" = "yes"; then
7021
7022cat >>confdefs.h <<\EOF
7023#define ENABLE_NLS 1
7024EOF
7025
7026    echo "$as_me:7026: checking whether included gettext is requested" >&5
7027echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
7028
7029# Check whether --with-included-gettext or --without-included-gettext was given.
7030if test "${with_included_gettext+set}" = set; then
7031  withval="$with_included_gettext"
7032  nls_cv_force_use_gnu_gettext=$withval
7033else
7034  nls_cv_force_use_gnu_gettext=no
7035fi;
7036    echo "$as_me:7036: result: $nls_cv_force_use_gnu_gettext" >&5
7037echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
7038
7039    nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7040    if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7041                        CATOBJEXT=NONE
7042
7043      cf_save_LIBS_1="$LIBS"
7044      LIBS="$LIBICONV $LIBS"
7045      echo "$as_me:7045: checking for libintl.h and gettext()" >&5
7046echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
7047if test "${cf_cv_func_gettext+set}" = set; then
7048  echo $ECHO_N "(cached) $ECHO_C" >&6
7049else
7050
7051# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7052# will be set on completion of the AC_TRY_LINK below.
7053cf_cv_header_path_intl=
7054cf_cv_library_path_intl=
7055
7056echo "${as_me:-configure}:7056: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
7057
7058cf_save_LIBS="$LIBS"
7059
7060cat >conftest.$ac_ext <<_ACEOF
7061#line 7061 "configure"
7062#include "confdefs.h"
7063
7064#include <libintl.h>
7065extern int _nl_msg_cat_cntr;
7066
7067int
7068main ()
7069{
7070
7071    bindtextdomain ("", "");
7072    return (int) gettext ("")
7073
7074             + _nl_msg_cat_cntr
7075
7076  ;
7077  return 0;
7078}
7079_ACEOF
7080rm -f conftest.$ac_objext conftest$ac_exeext
7081if { (eval echo "$as_me:7081: \"$ac_link\"") >&5
7082  (eval $ac_link) 2>&5
7083  ac_status=$?
7084  echo "$as_me:7084: \$? = $ac_status" >&5
7085  (exit $ac_status); } &&
7086         { ac_try='test -s conftest$ac_exeext'
7087  { (eval echo "$as_me:7087: \"$ac_try\"") >&5
7088  (eval $ac_try) 2>&5
7089  ac_status=$?
7090  echo "$as_me:7090: \$? = $ac_status" >&5
7091  (exit $ac_status); }; }; then
7092
7093	cf_cv_find_linkage_intl=yes
7094	cf_cv_header_path_intl=/usr/include
7095	cf_cv_library_path_intl=/usr/lib
7096
7097else
7098  echo "$as_me: failed program was:" >&5
7099cat conftest.$ac_ext >&5
7100
7101LIBS="-lintl  $cf_save_LIBS"
7102
7103cat >conftest.$ac_ext <<_ACEOF
7104#line 7104 "configure"
7105#include "confdefs.h"
7106
7107#include <libintl.h>
7108extern int _nl_msg_cat_cntr;
7109
7110int
7111main ()
7112{
7113
7114    bindtextdomain ("", "");
7115    return (int) gettext ("")
7116
7117             + _nl_msg_cat_cntr
7118
7119  ;
7120  return 0;
7121}
7122_ACEOF
7123rm -f conftest.$ac_objext conftest$ac_exeext
7124if { (eval echo "$as_me:7124: \"$ac_link\"") >&5
7125  (eval $ac_link) 2>&5
7126  ac_status=$?
7127  echo "$as_me:7127: \$? = $ac_status" >&5
7128  (exit $ac_status); } &&
7129         { ac_try='test -s conftest$ac_exeext'
7130  { (eval echo "$as_me:7130: \"$ac_try\"") >&5
7131  (eval $ac_try) 2>&5
7132  ac_status=$?
7133  echo "$as_me:7133: \$? = $ac_status" >&5
7134  (exit $ac_status); }; }; then
7135
7136	cf_cv_find_linkage_intl=yes
7137	cf_cv_header_path_intl=/usr/include
7138	cf_cv_library_path_intl=/usr/lib
7139	cf_cv_library_file_intl="-lintl"
7140
7141else
7142  echo "$as_me: failed program was:" >&5
7143cat conftest.$ac_ext >&5
7144
7145	cf_cv_find_linkage_intl=no
7146	LIBS="$cf_save_LIBS"
7147
7148    test -n "$verbose" && echo "	find linkage for intl library" 1>&6
7149
7150echo "${as_me:-configure}:7150: testing find linkage for intl library ..." 1>&5
7151
7152echo "${as_me:-configure}:7152: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
7153
7154    cf_save_CPPFLAGS="$CPPFLAGS"
7155    cf_test_CPPFLAGS="$CPPFLAGS"
7156
7157cf_search=
7158
7159# collect the current set of include-directories from compiler flags
7160cf_header_path_list=""
7161if test -n "${CFLAGS}${CPPFLAGS}" ; then
7162	for cf_header_path in $CPPFLAGS $CFLAGS
7163	do
7164		case $cf_header_path in #(vi
7165		-I*)
7166			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7167
7168test "$cf_header_path" != "NONE" && \
7169test -d "$cf_header_path" && \
7170 {
7171	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
7172	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7173	test -d $cf_header_path/include/intl &&       cf_search="$cf_search $cf_header_path/include/intl"
7174	test -d $cf_header_path/include/intl/include &&    cf_search="$cf_search $cf_header_path/include/intl/include"
7175	test -d $cf_header_path/intl/include &&       cf_search="$cf_search $cf_header_path/intl/include"
7176	test -d $cf_header_path/intl/include/intl &&    cf_search="$cf_search $cf_header_path/intl/include/intl"
7177}
7178
7179			cf_header_path_list="$cf_header_path_list $cf_search"
7180			;;
7181		esac
7182	done
7183fi
7184
7185# add the variations for the package we are looking for
7186
7187cf_search=
7188
7189test "/usr" != "$prefix" && \
7190test -d "/usr" && \
7191(test $prefix = NONE || test "/usr" != "$prefix") && {
7192	test -n "$verbose" && echo "	... testing for include-directories under /usr"
7193	test -d /usr/include &&          cf_search="$cf_search /usr/include"
7194	test -d /usr/include/intl &&       cf_search="$cf_search /usr/include/intl"
7195	test -d /usr/include/intl/include &&    cf_search="$cf_search /usr/include/intl/include"
7196	test -d /usr/intl/include &&       cf_search="$cf_search /usr/intl/include"
7197	test -d /usr/intl/include/intl &&    cf_search="$cf_search /usr/intl/include/intl"
7198}
7199
7200test "$prefix" != "NONE" && \
7201test -d "$prefix" && \
7202 {
7203	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
7204	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7205	test -d $prefix/include/intl &&       cf_search="$cf_search $prefix/include/intl"
7206	test -d $prefix/include/intl/include &&    cf_search="$cf_search $prefix/include/intl/include"
7207	test -d $prefix/intl/include &&       cf_search="$cf_search $prefix/intl/include"
7208	test -d $prefix/intl/include/intl &&    cf_search="$cf_search $prefix/intl/include/intl"
7209}
7210
7211test "/usr/local" != "$prefix" && \
7212test -d "/usr/local" && \
7213(test $prefix = NONE || test "/usr/local" != "$prefix") && {
7214	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
7215	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7216	test -d /usr/local/include/intl &&       cf_search="$cf_search /usr/local/include/intl"
7217	test -d /usr/local/include/intl/include &&    cf_search="$cf_search /usr/local/include/intl/include"
7218	test -d /usr/local/intl/include &&       cf_search="$cf_search /usr/local/intl/include"
7219	test -d /usr/local/intl/include/intl &&    cf_search="$cf_search /usr/local/intl/include/intl"
7220}
7221
7222test "/opt" != "$prefix" && \
7223test -d "/opt" && \
7224(test $prefix = NONE || test "/opt" != "$prefix") && {
7225	test -n "$verbose" && echo "	... testing for include-directories under /opt"
7226	test -d /opt/include &&          cf_search="$cf_search /opt/include"
7227	test -d /opt/include/intl &&       cf_search="$cf_search /opt/include/intl"
7228	test -d /opt/include/intl/include &&    cf_search="$cf_search /opt/include/intl/include"
7229	test -d /opt/intl/include &&       cf_search="$cf_search /opt/intl/include"
7230	test -d /opt/intl/include/intl &&    cf_search="$cf_search /opt/intl/include/intl"
7231}
7232
7233test "$HOME" != "$prefix" && \
7234test -d "$HOME" && \
7235(test $prefix = NONE || test "$HOME" != "$prefix") && {
7236	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
7237	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7238	test -d $HOME/include/intl &&       cf_search="$cf_search $HOME/include/intl"
7239	test -d $HOME/include/intl/include &&    cf_search="$cf_search $HOME/include/intl/include"
7240	test -d $HOME/intl/include &&       cf_search="$cf_search $HOME/intl/include"
7241	test -d $HOME/intl/include/intl &&    cf_search="$cf_search $HOME/intl/include/intl"
7242}
7243
7244test "$includedir" != NONE && \
7245test "$includedir" != "/usr/include" && \
7246test -d "$includedir" && {
7247	test -d $includedir &&    cf_search="$cf_search $includedir"
7248	test -d $includedir/intl && cf_search="$cf_search $includedir/intl"
7249}
7250
7251test "$oldincludedir" != NONE && \
7252test "$oldincludedir" != "/usr/include" && \
7253test -d "$oldincludedir" && {
7254	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7255	test -d $oldincludedir/intl && cf_search="$cf_search $oldincludedir/intl"
7256}
7257
7258cf_search="$cf_search $cf_header_path_list"
7259
7260    for cf_cv_header_path_intl in $cf_search
7261    do
7262      if test -d $cf_cv_header_path_intl ; then
7263        test -n "$verbose" && echo "	... testing $cf_cv_header_path_intl" 1>&6
7264
7265echo "${as_me:-configure}:7265: testing ... testing $cf_cv_header_path_intl ..." 1>&5
7266
7267        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_intl"
7268        cat >conftest.$ac_ext <<_ACEOF
7269#line 7269 "configure"
7270#include "confdefs.h"
7271
7272#include <libintl.h>
7273extern int _nl_msg_cat_cntr;
7274
7275int
7276main ()
7277{
7278
7279    bindtextdomain ("", "");
7280    return (int) gettext ("")
7281
7282             + _nl_msg_cat_cntr
7283
7284  ;
7285  return 0;
7286}
7287_ACEOF
7288rm -f conftest.$ac_objext
7289if { (eval echo "$as_me:7289: \"$ac_compile\"") >&5
7290  (eval $ac_compile) 2>&5
7291  ac_status=$?
7292  echo "$as_me:7292: \$? = $ac_status" >&5
7293  (exit $ac_status); } &&
7294         { ac_try='test -s conftest.$ac_objext'
7295  { (eval echo "$as_me:7295: \"$ac_try\"") >&5
7296  (eval $ac_try) 2>&5
7297  ac_status=$?
7298  echo "$as_me:7298: \$? = $ac_status" >&5
7299  (exit $ac_status); }; }; then
7300
7301            test -n "$verbose" && echo "	... found intl headers in $cf_cv_header_path_intl" 1>&6
7302
7303echo "${as_me:-configure}:7303: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
7304
7305            cf_cv_find_linkage_intl=maybe
7306            cf_test_CPPFLAGS="$CPPFLAGS"
7307            break
7308else
7309  echo "$as_me: failed program was:" >&5
7310cat conftest.$ac_ext >&5
7311
7312            CPPFLAGS="$cf_save_CPPFLAGS"
7313
7314fi
7315rm -f conftest.$ac_objext conftest.$ac_ext
7316      fi
7317    done
7318
7319    if test "$cf_cv_find_linkage_intl" = maybe ; then
7320
7321echo "${as_me:-configure}:7321: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
7322
7323      cf_save_LIBS="$LIBS"
7324      cf_save_LDFLAGS="$LDFLAGS"
7325
7326      if test "$cf_cv_find_linkage_intl" != yes ; then
7327
7328cf_search=
7329cf_library_path_list=""
7330if test -n "${LDFLAGS}${LIBS}" ; then
7331	for cf_library_path in $LDFLAGS $LIBS
7332	do
7333		case $cf_library_path in #(vi
7334		-L*)
7335			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7336
7337test "$cf_library_path" != "NONE" && \
7338test -d "$cf_library_path" && \
7339 {
7340	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
7341	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7342	test -d $cf_library_path/lib/intl &&       cf_search="$cf_search $cf_library_path/lib/intl"
7343	test -d $cf_library_path/lib/intl/lib &&    cf_search="$cf_search $cf_library_path/lib/intl/lib"
7344	test -d $cf_library_path/intl/lib &&       cf_search="$cf_search $cf_library_path/intl/lib"
7345	test -d $cf_library_path/intl/lib/intl &&    cf_search="$cf_search $cf_library_path/intl/lib/intl"
7346}
7347
7348			cf_library_path_list="$cf_library_path_list $cf_search"
7349			;;
7350		esac
7351	done
7352fi
7353
7354cf_search=
7355
7356test "/usr" != "$prefix" && \
7357test -d "/usr" && \
7358(test $prefix = NONE || test "/usr" != "$prefix") && {
7359	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
7360	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7361	test -d /usr/lib/intl &&       cf_search="$cf_search /usr/lib/intl"
7362	test -d /usr/lib/intl/lib &&    cf_search="$cf_search /usr/lib/intl/lib"
7363	test -d /usr/intl/lib &&       cf_search="$cf_search /usr/intl/lib"
7364	test -d /usr/intl/lib/intl &&    cf_search="$cf_search /usr/intl/lib/intl"
7365}
7366
7367test "$prefix" != "NONE" && \
7368test -d "$prefix" && \
7369 {
7370	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
7371	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7372	test -d $prefix/lib/intl &&       cf_search="$cf_search $prefix/lib/intl"
7373	test -d $prefix/lib/intl/lib &&    cf_search="$cf_search $prefix/lib/intl/lib"
7374	test -d $prefix/intl/lib &&       cf_search="$cf_search $prefix/intl/lib"
7375	test -d $prefix/intl/lib/intl &&    cf_search="$cf_search $prefix/intl/lib/intl"
7376}
7377
7378test "/usr/local" != "$prefix" && \
7379test -d "/usr/local" && \
7380(test $prefix = NONE || test "/usr/local" != "$prefix") && {
7381	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
7382	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7383	test -d /usr/local/lib/intl &&       cf_search="$cf_search /usr/local/lib/intl"
7384	test -d /usr/local/lib/intl/lib &&    cf_search="$cf_search /usr/local/lib/intl/lib"
7385	test -d /usr/local/intl/lib &&       cf_search="$cf_search /usr/local/intl/lib"
7386	test -d /usr/local/intl/lib/intl &&    cf_search="$cf_search /usr/local/intl/lib/intl"
7387}
7388
7389test "/opt" != "$prefix" && \
7390test -d "/opt" && \
7391(test $prefix = NONE || test "/opt" != "$prefix") && {
7392	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
7393	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7394	test -d /opt/lib/intl &&       cf_search="$cf_search /opt/lib/intl"
7395	test -d /opt/lib/intl/lib &&    cf_search="$cf_search /opt/lib/intl/lib"
7396	test -d /opt/intl/lib &&       cf_search="$cf_search /opt/intl/lib"
7397	test -d /opt/intl/lib/intl &&    cf_search="$cf_search /opt/intl/lib/intl"
7398}
7399
7400test "$HOME" != "$prefix" && \
7401test -d "$HOME" && \
7402(test $prefix = NONE || test "$HOME" != "$prefix") && {
7403	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
7404	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7405	test -d $HOME/lib/intl &&       cf_search="$cf_search $HOME/lib/intl"
7406	test -d $HOME/lib/intl/lib &&    cf_search="$cf_search $HOME/lib/intl/lib"
7407	test -d $HOME/intl/lib &&       cf_search="$cf_search $HOME/intl/lib"
7408	test -d $HOME/intl/lib/intl &&    cf_search="$cf_search $HOME/intl/lib/intl"
7409}
7410
7411cf_search="$cf_library_path_list $cf_search"
7412
7413        for cf_cv_library_path_intl in $cf_search
7414        do
7415          if test -d $cf_cv_library_path_intl ; then
7416            test -n "$verbose" && echo "	... testing $cf_cv_library_path_intl" 1>&6
7417
7418echo "${as_me:-configure}:7418: testing ... testing $cf_cv_library_path_intl ..." 1>&5
7419
7420            CPPFLAGS="$cf_test_CPPFLAGS"
7421            LIBS="-lintl  $cf_save_LIBS"
7422            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
7423            cat >conftest.$ac_ext <<_ACEOF
7424#line 7424 "configure"
7425#include "confdefs.h"
7426
7427#include <libintl.h>
7428extern int _nl_msg_cat_cntr;
7429
7430int
7431main ()
7432{
7433
7434    bindtextdomain ("", "");
7435    return (int) gettext ("")
7436
7437             + _nl_msg_cat_cntr
7438
7439  ;
7440  return 0;
7441}
7442_ACEOF
7443rm -f conftest.$ac_objext conftest$ac_exeext
7444if { (eval echo "$as_me:7444: \"$ac_link\"") >&5
7445  (eval $ac_link) 2>&5
7446  ac_status=$?
7447  echo "$as_me:7447: \$? = $ac_status" >&5
7448  (exit $ac_status); } &&
7449         { ac_try='test -s conftest$ac_exeext'
7450  { (eval echo "$as_me:7450: \"$ac_try\"") >&5
7451  (eval $ac_try) 2>&5
7452  ac_status=$?
7453  echo "$as_me:7453: \$? = $ac_status" >&5
7454  (exit $ac_status); }; }; then
7455
7456                test -n "$verbose" && echo "	... found intl library in $cf_cv_library_path_intl" 1>&6
7457
7458echo "${as_me:-configure}:7458: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
7459
7460                cf_cv_find_linkage_intl=yes
7461                cf_cv_library_file_intl="-lintl"
7462                break
7463else
7464  echo "$as_me: failed program was:" >&5
7465cat conftest.$ac_ext >&5
7466
7467                CPPFLAGS="$cf_save_CPPFLAGS"
7468                LIBS="$cf_save_LIBS"
7469                LDFLAGS="$cf_save_LDFLAGS"
7470
7471fi
7472rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7473          fi
7474        done
7475        CPPFLAGS="$cf_save_CPPFLAGS"
7476        LDFLAGS="$cf_save_LDFLAGS"
7477      fi
7478
7479    else
7480      cf_cv_find_linkage_intl=no
7481    fi
7482
7483fi
7484rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7485
7486fi
7487rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7488
7489LIBS="$cf_save_LIBS"
7490
7491if test "$cf_cv_find_linkage_intl" = yes ; then
7492cf_cv_func_gettext=yes
7493else
7494cf_cv_func_gettext=no
7495fi
7496
7497fi
7498echo "$as_me:7498: result: $cf_cv_func_gettext" >&5
7499echo "${ECHO_T}$cf_cv_func_gettext" >&6
7500      LIBS="$cf_save_LIBS_1"
7501
7502      if test "$cf_cv_func_gettext" = yes ; then
7503
7504cat >>confdefs.h <<\EOF
7505#define HAVE_LIBINTL_H 1
7506EOF
7507
7508                                        if test "$PACKAGE" != gettext; then
7509
7510cat >>confdefs.h <<\EOF
7511#define HAVE_GETTEXT 1
7512EOF
7513
7514if test -n "$cf_cv_header_path_intl" ; then
7515  for cf_add_incdir in $cf_cv_header_path_intl
7516  do
7517	while test $cf_add_incdir != /usr/include
7518	do
7519	  if test -d $cf_add_incdir
7520	  then
7521		cf_have_incdir=no
7522		if test -n "$CFLAGS$CPPFLAGS" ; then
7523		  # a loop is needed to ensure we can add subdirs of existing dirs
7524		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7525			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7526			  cf_have_incdir=yes; break
7527			fi
7528		  done
7529		fi
7530
7531		if test "$cf_have_incdir" = no ; then
7532		  if test "$cf_add_incdir" = /usr/local/include ; then
7533			if test "$GCC" = yes
7534			then
7535			  cf_save_CPPFLAGS=$CPPFLAGS
7536			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7537			  cat >conftest.$ac_ext <<_ACEOF
7538#line 7538 "configure"
7539#include "confdefs.h"
7540#include <stdio.h>
7541int
7542main ()
7543{
7544printf("Hello")
7545  ;
7546  return 0;
7547}
7548_ACEOF
7549rm -f conftest.$ac_objext
7550if { (eval echo "$as_me:7550: \"$ac_compile\"") >&5
7551  (eval $ac_compile) 2>&5
7552  ac_status=$?
7553  echo "$as_me:7553: \$? = $ac_status" >&5
7554  (exit $ac_status); } &&
7555         { ac_try='test -s conftest.$ac_objext'
7556  { (eval echo "$as_me:7556: \"$ac_try\"") >&5
7557  (eval $ac_try) 2>&5
7558  ac_status=$?
7559  echo "$as_me:7559: \$? = $ac_status" >&5
7560  (exit $ac_status); }; }; then
7561  :
7562else
7563  echo "$as_me: failed program was:" >&5
7564cat conftest.$ac_ext >&5
7565cf_have_incdir=yes
7566fi
7567rm -f conftest.$ac_objext conftest.$ac_ext
7568			  CPPFLAGS=$cf_save_CPPFLAGS
7569			fi
7570		  fi
7571		fi
7572
7573		if test "$cf_have_incdir" = no ; then
7574		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
7575
7576echo "${as_me:-configure}:7576: testing adding $cf_add_incdir to include-path ..." 1>&5
7577
7578		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7579
7580		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7581		  test "$cf_top_incdir" = "$cf_add_incdir" && break
7582		  cf_add_incdir="$cf_top_incdir"
7583		else
7584		  break
7585		fi
7586	  fi
7587	done
7588  done
7589fi
7590
7591          if test -n "$cf_cv_library_file_intl" ; then
7592                                                INTLLIBS="$cf_cv_library_file_intl $LIBICONV"
7593
7594if test -n "$cf_cv_library_path_intl" ; then
7595  for cf_add_libdir in $cf_cv_library_path_intl
7596  do
7597    if test $cf_add_libdir = /usr/lib ; then
7598      :
7599    elif test -d $cf_add_libdir
7600    then
7601      cf_have_libdir=no
7602      if test -n "$LDFLAGS$LIBS" ; then
7603        # a loop is needed to ensure we can add subdirs of existing dirs
7604        for cf_test_libdir in $LDFLAGS $LIBS ; do
7605          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7606            cf_have_libdir=yes; break
7607          fi
7608        done
7609      fi
7610      if test "$cf_have_libdir" = no ; then
7611        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
7612
7613echo "${as_me:-configure}:7613: testing adding $cf_add_libdir to library-path ..." 1>&5
7614
7615        INTLLIBS="-L$cf_add_libdir $INTLLIBS"
7616      fi
7617    fi
7618  done
7619fi
7620
7621          fi
7622
7623          gt_save_LIBS="$LIBS"
7624          LIBS="$LIBS $INTLLIBS"
7625
7626for ac_func in dcgettext
7627do
7628as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7629echo "$as_me:7629: checking for $ac_func" >&5
7630echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7631if eval "test \"\${$as_ac_var+set}\" = set"; then
7632  echo $ECHO_N "(cached) $ECHO_C" >&6
7633else
7634  cat >conftest.$ac_ext <<_ACEOF
7635#line 7635 "configure"
7636#include "confdefs.h"
7637/* System header to define __stub macros and hopefully few prototypes,
7638    which can conflict with char $ac_func (); below.  */
7639#include <assert.h>
7640/* Override any gcc2 internal prototype to avoid an error.  */
7641#ifdef __cplusplus
7642extern "C"
7643#endif
7644/* We use char because int might match the return type of a gcc2
7645   builtin and then its argument prototype would still apply.  */
7646char $ac_func ();
7647char (*f) ();
7648
7649int
7650main ()
7651{
7652/* The GNU C library defines this for functions which it implements
7653    to always fail with ENOSYS.  Some functions are actually named
7654    something starting with __ and the normal name is an alias.  */
7655#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7656choke me
7657#else
7658f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7659#endif
7660
7661  ;
7662  return 0;
7663}
7664_ACEOF
7665rm -f conftest.$ac_objext conftest$ac_exeext
7666if { (eval echo "$as_me:7666: \"$ac_link\"") >&5
7667  (eval $ac_link) 2>&5
7668  ac_status=$?
7669  echo "$as_me:7669: \$? = $ac_status" >&5
7670  (exit $ac_status); } &&
7671         { ac_try='test -s conftest$ac_exeext'
7672  { (eval echo "$as_me:7672: \"$ac_try\"") >&5
7673  (eval $ac_try) 2>&5
7674  ac_status=$?
7675  echo "$as_me:7675: \$? = $ac_status" >&5
7676  (exit $ac_status); }; }; then
7677  eval "$as_ac_var=yes"
7678else
7679  echo "$as_me: failed program was:" >&5
7680cat conftest.$ac_ext >&5
7681eval "$as_ac_var=no"
7682fi
7683rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7684fi
7685echo "$as_me:7685: result: `eval echo '${'$as_ac_var'}'`" >&5
7686echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7687if test `eval echo '${'$as_ac_var'}'` = yes; then
7688  cat >>confdefs.h <<EOF
7689#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7690EOF
7691
7692fi
7693done
7694
7695          LIBS="$gt_save_LIBS"
7696
7697                    # Extract the first word of "msgfmt", so it can be a program name with args.
7698
7699set dummy msgfmt; ac_word=$2
7700echo "$as_me:7700: checking for $ac_word" >&5
7701echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7702if test "${ac_cv_path_MSGFMT+set}" = set; then
7703  echo $ECHO_N "(cached) $ECHO_C" >&6
7704else
7705  case "$MSGFMT" in
7706  [\\/]*|?:[\\/]*)
7707  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7708  ;;
7709  *)
7710  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7711  for ac_dir in $PATH; do
7712    test -z "$ac_dir" && ac_dir=.
7713    if test -f $ac_dir/$ac_word$ac_exeext; then
7714      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
7715	ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
7716	break
7717      fi
7718    fi
7719  done
7720  IFS="$ac_save_ifs"
7721  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
7722  ;;
7723esac
7724fi
7725MSGFMT="$ac_cv_path_MSGFMT"
7726if test "$MSGFMT" != ":"; then
7727  echo "$as_me:7727: result: $MSGFMT" >&5
7728echo "${ECHO_T}$MSGFMT" >&6
7729else
7730  echo "$as_me:7730: result: no" >&5
7731echo "${ECHO_T}no" >&6
7732fi
7733
7734          # Extract the first word of "gmsgfmt", so it can be a program name with args.
7735set dummy gmsgfmt; ac_word=$2
7736echo "$as_me:7736: checking for $ac_word" >&5
7737echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7738if test "${ac_cv_path_GMSGFMT+set}" = set; then
7739  echo $ECHO_N "(cached) $ECHO_C" >&6
7740else
7741  case $GMSGFMT in
7742  [\\/]* | ?:[\\/]*)
7743  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7744  ;;
7745  *)
7746  ac_save_IFS=$IFS; IFS=$ac_path_separator
7747ac_dummy="$PATH"
7748for ac_dir in $ac_dummy; do
7749  IFS=$ac_save_IFS
7750  test -z "$ac_dir" && ac_dir=.
7751  if $as_executable_p "$ac_dir/$ac_word"; then
7752   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7753   echo "$as_me:7753: found $ac_dir/$ac_word" >&5
7754   break
7755fi
7756done
7757
7758  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7759  ;;
7760esac
7761fi
7762GMSGFMT=$ac_cv_path_GMSGFMT
7763
7764if test -n "$GMSGFMT"; then
7765  echo "$as_me:7765: result: $GMSGFMT" >&5
7766echo "${ECHO_T}$GMSGFMT" >&6
7767else
7768  echo "$as_me:7768: result: no" >&5
7769echo "${ECHO_T}no" >&6
7770fi
7771
7772                    # Extract the first word of "xgettext", so it can be a program name with args.
7773
7774set dummy xgettext; ac_word=$2
7775echo "$as_me:7775: checking for $ac_word" >&5
7776echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7777if test "${ac_cv_path_XGETTEXT+set}" = set; then
7778  echo $ECHO_N "(cached) $ECHO_C" >&6
7779else
7780  case "$XGETTEXT" in
7781  [\\/]*|?:[\\/]*)
7782  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7783  ;;
7784  *)
7785  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7786  for ac_dir in $PATH; do
7787    test -z "$ac_dir" && ac_dir=.
7788    if test -f $ac_dir/$ac_word$ac_exeext; then
7789      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
7790	ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
7791	break
7792      fi
7793    fi
7794  done
7795  IFS="$ac_save_ifs"
7796  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7797  ;;
7798esac
7799fi
7800XGETTEXT="$ac_cv_path_XGETTEXT"
7801if test "$XGETTEXT" != ":"; then
7802  echo "$as_me:7802: result: $XGETTEXT" >&5
7803echo "${ECHO_T}$XGETTEXT" >&6
7804else
7805  echo "$as_me:7805: result: no" >&5
7806echo "${ECHO_T}no" >&6
7807fi
7808
7809          CATOBJEXT=.gmo
7810        fi
7811      fi
7812
7813      if test "$CATOBJEXT" = "NONE"; then
7814                        nls_cv_use_gnu_gettext=yes
7815      fi
7816    fi
7817
7818    if test "$nls_cv_use_gnu_gettext" = "yes"; then
7819      if test ! -d $srcdir/intl ; then
7820        { { echo "$as_me:7820: error: no NLS library is packaged with this application" >&5
7821echo "$as_me: error: no NLS library is packaged with this application" >&2;}
7822   { (exit 1); exit 1; }; }
7823      fi
7824            INTLOBJS="\$(GETTOBJS)"
7825      # Extract the first word of "msgfmt", so it can be a program name with args.
7826
7827set dummy msgfmt; ac_word=$2
7828echo "$as_me:7828: checking for $ac_word" >&5
7829echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7830if test "${ac_cv_path_MSGFMT+set}" = set; then
7831  echo $ECHO_N "(cached) $ECHO_C" >&6
7832else
7833  case "$MSGFMT" in
7834  [\\/]*|?:[\\/]*)
7835  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7836  ;;
7837  *)
7838  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7839  for ac_dir in $PATH; do
7840    test -z "$ac_dir" && ac_dir=.
7841    if test -f $ac_dir/$ac_word$ac_exeext; then
7842      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
7843	ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
7844	break
7845      fi
7846    fi
7847  done
7848  IFS="$ac_save_ifs"
7849  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
7850  ;;
7851esac
7852fi
7853MSGFMT="$ac_cv_path_MSGFMT"
7854if test "$MSGFMT" != ":"; then
7855  echo "$as_me:7855: result: $MSGFMT" >&5
7856echo "${ECHO_T}$MSGFMT" >&6
7857else
7858  echo "$as_me:7858: result: no" >&5
7859echo "${ECHO_T}no" >&6
7860fi
7861
7862      # Extract the first word of "gmsgfmt", so it can be a program name with args.
7863set dummy gmsgfmt; ac_word=$2
7864echo "$as_me:7864: checking for $ac_word" >&5
7865echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7866if test "${ac_cv_path_GMSGFMT+set}" = set; then
7867  echo $ECHO_N "(cached) $ECHO_C" >&6
7868else
7869  case $GMSGFMT in
7870  [\\/]* | ?:[\\/]*)
7871  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7872  ;;
7873  *)
7874  ac_save_IFS=$IFS; IFS=$ac_path_separator
7875ac_dummy="$PATH"
7876for ac_dir in $ac_dummy; do
7877  IFS=$ac_save_IFS
7878  test -z "$ac_dir" && ac_dir=.
7879  if $as_executable_p "$ac_dir/$ac_word"; then
7880   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7881   echo "$as_me:7881: found $ac_dir/$ac_word" >&5
7882   break
7883fi
7884done
7885
7886  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7887  ;;
7888esac
7889fi
7890GMSGFMT=$ac_cv_path_GMSGFMT
7891
7892if test -n "$GMSGFMT"; then
7893  echo "$as_me:7893: result: $GMSGFMT" >&5
7894echo "${ECHO_T}$GMSGFMT" >&6
7895else
7896  echo "$as_me:7896: result: no" >&5
7897echo "${ECHO_T}no" >&6
7898fi
7899
7900      # Extract the first word of "xgettext", so it can be a program name with args.
7901
7902set dummy xgettext; ac_word=$2
7903echo "$as_me:7903: checking for $ac_word" >&5
7904echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7905if test "${ac_cv_path_XGETTEXT+set}" = set; then
7906  echo $ECHO_N "(cached) $ECHO_C" >&6
7907else
7908  case "$XGETTEXT" in
7909  [\\/]*|?:[\\/]*)
7910  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7911  ;;
7912  *)
7913  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7914  for ac_dir in $PATH; do
7915    test -z "$ac_dir" && ac_dir=.
7916    if test -f $ac_dir/$ac_word$ac_exeext; then
7917      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
7918	ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
7919	break
7920      fi
7921    fi
7922  done
7923  IFS="$ac_save_ifs"
7924  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7925  ;;
7926esac
7927fi
7928XGETTEXT="$ac_cv_path_XGETTEXT"
7929if test "$XGETTEXT" != ":"; then
7930  echo "$as_me:7930: result: $XGETTEXT" >&5
7931echo "${ECHO_T}$XGETTEXT" >&6
7932else
7933  echo "$as_me:7933: result: no" >&5
7934echo "${ECHO_T}no" >&6
7935fi
7936
7937      BUILD_INCLUDED_LIBINTL=yes
7938      USE_INCLUDED_LIBINTL=yes
7939      CATOBJEXT=.gmo
7940      INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
7941      LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
7942    fi
7943
7944            if test "$GMSGFMT" != ":"; then
7945                  if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
7946        : ;
7947      else
7948        echo "$as_me:7948: result: found msgfmt program is not GNU msgfmt; ignore it" >&5
7949echo "${ECHO_T}found msgfmt program is not GNU msgfmt; ignore it" >&6
7950        GMSGFMT=":"
7951      fi
7952    fi
7953
7954            if test "$XGETTEXT" != ":"; then
7955                      if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
7956        : ;
7957      else
7958        echo "$as_me:7958: result: found xgettext program is not GNU xgettext; ignore it" >&5
7959echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
7960        XGETTEXT=":"
7961      fi
7962    fi
7963
7964        POSUB=po
7965  fi
7966
7967  ac_config_commands="$ac_config_commands default-1"
7968
7969      if test "$PACKAGE" = gettext; then
7970    BUILD_INCLUDED_LIBINTL=yes
7971  fi
7972
7973                      if test "$nls_cv_use_gnu_gettext" = "yes"; then
7974    for ac_prog in bison
7975do
7976  # Extract the first word of "$ac_prog", so it can be a program name with args.
7977set dummy $ac_prog; ac_word=$2
7978echo "$as_me:7978: checking for $ac_word" >&5
7979echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7980if test "${ac_cv_prog_INTLBISON+set}" = set; then
7981  echo $ECHO_N "(cached) $ECHO_C" >&6
7982else
7983  if test -n "$INTLBISON"; then
7984  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
7985else
7986  ac_save_IFS=$IFS; IFS=$ac_path_separator
7987ac_dummy="$PATH"
7988for ac_dir in $ac_dummy; do
7989  IFS=$ac_save_IFS
7990  test -z "$ac_dir" && ac_dir=.
7991  $as_executable_p "$ac_dir/$ac_word" || continue
7992ac_cv_prog_INTLBISON="$ac_prog"
7993echo "$as_me:7993: found $ac_dir/$ac_word" >&5
7994break
7995done
7996
7997fi
7998fi
7999INTLBISON=$ac_cv_prog_INTLBISON
8000if test -n "$INTLBISON"; then
8001  echo "$as_me:8001: result: $INTLBISON" >&5
8002echo "${ECHO_T}$INTLBISON" >&6
8003else
8004  echo "$as_me:8004: result: no" >&5
8005echo "${ECHO_T}no" >&6
8006fi
8007
8008  test -n "$INTLBISON" && break
8009done
8010
8011    if test -z "$INTLBISON"; then
8012      ac_verc_fail=yes
8013    else
8014            echo "$as_me:8014: checking version of bison" >&5
8015echo $ECHO_N "checking version of bison... $ECHO_C" >&6
8016      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
8017      case $ac_prog_version in
8018        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
8019        1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
8020           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
8021        *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
8022      esac
8023    echo "$as_me:8023: result: $ac_prog_version" >&5
8024echo "${ECHO_T}$ac_prog_version" >&6
8025    fi
8026    if test $ac_verc_fail = yes; then
8027      INTLBISON=:
8028    fi
8029  fi
8030
8031        for lang in $ALL_LINGUAS; do
8032    GMOFILES="$GMOFILES $lang.gmo"
8033    POFILES="$POFILES $lang.po"
8034  done
8035
8036    nls_cv_header_intl=
8037  nls_cv_header_libgt=
8038
8039    DATADIRNAME=share
8040
8041    INSTOBJEXT=.mo
8042
8043    GENCAT=gencat
8044
8045   if test "x$CATOBJEXT" != "x"; then
8046     if test "x$ALL_LINGUAS" = "x"; then
8047       LINGUAS=
8048     else
8049       echo "$as_me:8049: checking for catalogs to be installed" >&5
8050echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
8051       NEW_LINGUAS=
8052       for presentlang in $ALL_LINGUAS; do
8053         useit=no
8054         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
8055           # Use the presentlang catalog if desiredlang is
8056           #   a. equal to presentlang, or
8057           #   b. a variant of presentlang (because in this case,
8058           #      presentlang can be used as a fallback for messages
8059           #      which are not translated in the desiredlang catalog).
8060           case "$desiredlang" in
8061             "$presentlang"*) useit=yes;;
8062           esac
8063         done
8064         if test $useit = yes; then
8065           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8066         fi
8067       done
8068       LINGUAS=$NEW_LINGUAS
8069       echo "$as_me:8069: result: $LINGUAS" >&5
8070echo "${ECHO_T}$LINGUAS" >&6
8071     fi
8072
8073          if test -n "$LINGUAS"; then
8074       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8075     fi
8076   fi
8077
8078      INTL_LIBTOOL_SUFFIX_PREFIX=
8079
8080if test "$USE_NLS" = yes ; then
8081
8082# Check whether --with-textdomain or --without-textdomain was given.
8083if test "${with_textdomain+set}" = set; then
8084  withval="$with_textdomain"
8085  NLS_TEXTDOMAIN=$withval
8086else
8087  NLS_TEXTDOMAIN=$PACKAGE
8088fi;
8089
8090cat >>confdefs.h <<EOF
8091#define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
8092EOF
8093
8094fi
8095
8096INTLDIR_MAKE=
8097MSG_DIR_MAKE=
8098SUB_MAKEFILE=
8099
8100cf_makefile=makefile
8101
8102use_our_messages=no
8103if test "$USE_NLS" = yes ; then
8104if test -d $srcdir/po ; then
8105echo "$as_me:8105: checking if we should use included message-library" >&5
8106echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
8107
8108# Check whether --enable-included-msgs or --disable-included-msgs was given.
8109if test "${enable_included_msgs+set}" = set; then
8110  enableval="$enable_included_msgs"
8111  use_our_messages=$enableval
8112else
8113  use_our_messages=yes
8114fi;
8115fi
8116echo "$as_me:8116: result: $use_our_messages" >&5
8117echo "${ECHO_T}$use_our_messages" >&6
8118fi
8119
8120MSG_DIR_MAKE="#"
8121if test "$use_our_messages" = yes
8122then
8123	SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
8124	MSG_DIR_MAKE=
8125fi
8126
8127if test "$USE_INCLUDED_LIBINTL" = yes ; then
8128        if test "$nls_cv_force_use_gnu_gettext" = yes ; then
8129		:
8130	elif test "$nls_cv_use_gnu_gettext" = yes ; then
8131		:
8132	else
8133		INTLDIR_MAKE="#"
8134	fi
8135	if test -z "$INTLDIR_MAKE"; then
8136
8137cat >>confdefs.h <<\EOF
8138#define HAVE_LIBGETTEXT_H 1
8139EOF
8140
8141		for cf_makefile in \
8142			$srcdir/intl/Makefile.in \
8143			$srcdir/intl/makefile.in
8144		do
8145			if test -f "$cf_makefile" ; then
8146				SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf_makefile}"
8147				break
8148			fi
8149		done
8150	fi
8151else
8152	INTLDIR_MAKE="#"
8153	if test "$USE_NLS" = yes ; then
8154
8155for ac_header in libintl.h
8156do
8157as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8158echo "$as_me:8158: checking for $ac_header" >&5
8159echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8160if eval "test \"\${$as_ac_Header+set}\" = set"; then
8161  echo $ECHO_N "(cached) $ECHO_C" >&6
8162else
8163  cat >conftest.$ac_ext <<_ACEOF
8164#line 8164 "configure"
8165#include "confdefs.h"
8166#include <$ac_header>
8167_ACEOF
8168if { (eval echo "$as_me:8168: \"$ac_cpp conftest.$ac_ext\"") >&5
8169  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8170  ac_status=$?
8171  egrep -v '^ *\+' conftest.er1 >conftest.err
8172  rm -f conftest.er1
8173  cat conftest.err >&5
8174  echo "$as_me:8174: \$? = $ac_status" >&5
8175  (exit $ac_status); } >/dev/null; then
8176  if test -s conftest.err; then
8177    ac_cpp_err=$ac_c_preproc_warn_flag
8178  else
8179    ac_cpp_err=
8180  fi
8181else
8182  ac_cpp_err=yes
8183fi
8184if test -z "$ac_cpp_err"; then
8185  eval "$as_ac_Header=yes"
8186else
8187  echo "$as_me: failed program was:" >&5
8188  cat conftest.$ac_ext >&5
8189  eval "$as_ac_Header=no"
8190fi
8191rm -f conftest.err conftest.$ac_ext
8192fi
8193echo "$as_me:8193: result: `eval echo '${'$as_ac_Header'}'`" >&5
8194echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8195if test `eval echo '${'$as_ac_Header'}'` = yes; then
8196  cat >>confdefs.h <<EOF
8197#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8198EOF
8199
8200fi
8201done
8202
8203	fi
8204fi
8205
8206if test -z "$INTLDIR_MAKE" ; then
8207	CPPFLAGS="$CPPFLAGS -I../intl"
8208fi
8209
8210if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
8211	GT_YES="#"
8212	GT_NO=
8213else
8214	GT_YES=
8215	GT_NO="#"
8216fi
8217
8218if test "$USE_INCLUDED_LIBINTL" = yes ; then
8219	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
8220
8221cat >>confdefs.h <<\EOF
8222#define HAVE_GETTEXT 1
8223EOF
8224
8225	elif test "$nls_cv_use_gnu_gettext" = yes ; then
8226
8227cat >>confdefs.h <<\EOF
8228#define HAVE_GETTEXT 1
8229EOF
8230
8231	fi
8232	if test -n "$nls_cv_header_intl" ; then
8233
8234cat >>confdefs.h <<\EOF
8235#define HAVE_LIBINTL_H 1
8236EOF
8237
8238	fi
8239fi
8240
8241echo "$as_me:8241: checking if -lm needed for math functions" >&5
8242echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
8243if test "${cf_cv_need_libm+set}" = set; then
8244  echo $ECHO_N "(cached) $ECHO_C" >&6
8245else
8246
8247	cat >conftest.$ac_ext <<_ACEOF
8248#line 8248 "configure"
8249#include "confdefs.h"
8250
8251	#include <stdio.h>
8252	#include <math.h>
8253
8254int
8255main ()
8256{
8257double x = rand(); printf("result = %g\n", sqrt(x))
8258  ;
8259  return 0;
8260}
8261_ACEOF
8262rm -f conftest.$ac_objext conftest$ac_exeext
8263if { (eval echo "$as_me:8263: \"$ac_link\"") >&5
8264  (eval $ac_link) 2>&5
8265  ac_status=$?
8266  echo "$as_me:8266: \$? = $ac_status" >&5
8267  (exit $ac_status); } &&
8268         { ac_try='test -s conftest$ac_exeext'
8269  { (eval echo "$as_me:8269: \"$ac_try\"") >&5
8270  (eval $ac_try) 2>&5
8271  ac_status=$?
8272  echo "$as_me:8272: \$? = $ac_status" >&5
8273  (exit $ac_status); }; }; then
8274  cf_cv_need_libm=no
8275else
8276  echo "$as_me: failed program was:" >&5
8277cat conftest.$ac_ext >&5
8278cf_cv_need_libm=yes
8279fi
8280rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8281fi
8282echo "$as_me:8282: result: $cf_cv_need_libm" >&5
8283echo "${ECHO_T}$cf_cv_need_libm" >&6
8284if test "$cf_cv_need_libm" = yes
8285then
8286
8287	LIBS="-lm $LIBS"
8288
8289fi
8290
8291echo "$as_me:8291: checking if you want to use dmalloc for testing" >&5
8292echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
8293
8294# Check whether --with-dmalloc or --without-dmalloc was given.
8295if test "${with_dmalloc+set}" = set; then
8296  withval="$with_dmalloc"
8297
8298cat >>confdefs.h <<EOF
8299#define USE_DMALLOC 1
8300EOF
8301
8302	: ${with_cflags:=-g}
8303	: ${with_no_leaks:=yes}
8304	 with_dmalloc=yes
8305else
8306  with_dmalloc=
8307fi;
8308echo "$as_me:8308: result: ${with_dmalloc:-no}" >&5
8309echo "${ECHO_T}${with_dmalloc:-no}" >&6
8310
8311case .$with_cflags in #(vi
8312.*-g*)
8313	case .$CFLAGS in #(vi
8314	.*-g*) #(vi
8315		;;
8316	*)
8317
8318cf_fix_cppflags=no
8319cf_new_cflags=
8320cf_new_cppflags=
8321cf_new_extra_cppflags=
8322
8323for cf_add_cflags in -g
8324do
8325case $cf_fix_cppflags in
8326no)
8327	case $cf_add_cflags in #(vi
8328	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8329		case $cf_add_cflags in
8330		-D*)
8331			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8332
8333			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8334				&& test -z "${cf_tst_cflags}" \
8335				&& cf_fix_cppflags=yes
8336
8337			if test $cf_fix_cppflags = yes ; then
8338				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8339				continue
8340			elif test "${cf_tst_cflags}" = "\"'" ; then
8341				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8342				continue
8343			fi
8344			;;
8345		esac
8346		case "$CPPFLAGS" in
8347		*$cf_add_cflags) #(vi
8348			;;
8349		*) #(vi
8350			case $cf_add_cflags in #(vi
8351			-D*)
8352				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8353
8354CPPFLAGS=`echo "$CPPFLAGS" | \
8355	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8356		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8357
8358				;;
8359			esac
8360			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8361			;;
8362		esac
8363		;;
8364	*)
8365		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8366		;;
8367	esac
8368	;;
8369yes)
8370	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8371
8372	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8373
8374	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8375		&& test -z "${cf_tst_cflags}" \
8376		&& cf_fix_cppflags=no
8377	;;
8378esac
8379done
8380
8381if test -n "$cf_new_cflags" ; then
8382
8383	CFLAGS="$CFLAGS $cf_new_cflags"
8384fi
8385
8386if test -n "$cf_new_cppflags" ; then
8387
8388	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8389fi
8390
8391if test -n "$cf_new_extra_cppflags" ; then
8392
8393	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8394fi
8395
8396		;;
8397	esac
8398	;;
8399esac
8400
8401if test "$with_dmalloc" = yes ; then
8402	echo "$as_me:8402: checking for dmalloc.h" >&5
8403echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
8404if test "${ac_cv_header_dmalloc_h+set}" = set; then
8405  echo $ECHO_N "(cached) $ECHO_C" >&6
8406else
8407  cat >conftest.$ac_ext <<_ACEOF
8408#line 8408 "configure"
8409#include "confdefs.h"
8410#include <dmalloc.h>
8411_ACEOF
8412if { (eval echo "$as_me:8412: \"$ac_cpp conftest.$ac_ext\"") >&5
8413  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8414  ac_status=$?
8415  egrep -v '^ *\+' conftest.er1 >conftest.err
8416  rm -f conftest.er1
8417  cat conftest.err >&5
8418  echo "$as_me:8418: \$? = $ac_status" >&5
8419  (exit $ac_status); } >/dev/null; then
8420  if test -s conftest.err; then
8421    ac_cpp_err=$ac_c_preproc_warn_flag
8422  else
8423    ac_cpp_err=
8424  fi
8425else
8426  ac_cpp_err=yes
8427fi
8428if test -z "$ac_cpp_err"; then
8429  ac_cv_header_dmalloc_h=yes
8430else
8431  echo "$as_me: failed program was:" >&5
8432  cat conftest.$ac_ext >&5
8433  ac_cv_header_dmalloc_h=no
8434fi
8435rm -f conftest.err conftest.$ac_ext
8436fi
8437echo "$as_me:8437: result: $ac_cv_header_dmalloc_h" >&5
8438echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
8439if test $ac_cv_header_dmalloc_h = yes; then
8440
8441echo "$as_me:8441: checking for dmalloc_debug in -ldmalloc" >&5
8442echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
8443if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
8444  echo $ECHO_N "(cached) $ECHO_C" >&6
8445else
8446  ac_check_lib_save_LIBS=$LIBS
8447LIBS="-ldmalloc  $LIBS"
8448cat >conftest.$ac_ext <<_ACEOF
8449#line 8449 "configure"
8450#include "confdefs.h"
8451
8452/* Override any gcc2 internal prototype to avoid an error.  */
8453#ifdef __cplusplus
8454extern "C"
8455#endif
8456/* We use char because int might match the return type of a gcc2
8457   builtin and then its argument prototype would still apply.  */
8458char dmalloc_debug ();
8459int
8460main ()
8461{
8462dmalloc_debug ();
8463  ;
8464  return 0;
8465}
8466_ACEOF
8467rm -f conftest.$ac_objext conftest$ac_exeext
8468if { (eval echo "$as_me:8468: \"$ac_link\"") >&5
8469  (eval $ac_link) 2>&5
8470  ac_status=$?
8471  echo "$as_me:8471: \$? = $ac_status" >&5
8472  (exit $ac_status); } &&
8473         { ac_try='test -s conftest$ac_exeext'
8474  { (eval echo "$as_me:8474: \"$ac_try\"") >&5
8475  (eval $ac_try) 2>&5
8476  ac_status=$?
8477  echo "$as_me:8477: \$? = $ac_status" >&5
8478  (exit $ac_status); }; }; then
8479  ac_cv_lib_dmalloc_dmalloc_debug=yes
8480else
8481  echo "$as_me: failed program was:" >&5
8482cat conftest.$ac_ext >&5
8483ac_cv_lib_dmalloc_dmalloc_debug=no
8484fi
8485rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8486LIBS=$ac_check_lib_save_LIBS
8487fi
8488echo "$as_me:8488: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
8489echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
8490if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
8491  cat >>confdefs.h <<EOF
8492#define HAVE_LIBDMALLOC 1
8493EOF
8494
8495  LIBS="-ldmalloc $LIBS"
8496
8497fi
8498
8499fi
8500
8501fi
8502
8503echo "$as_me:8503: checking if you want to use dbmalloc for testing" >&5
8504echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
8505
8506# Check whether --with-dbmalloc or --without-dbmalloc was given.
8507if test "${with_dbmalloc+set}" = set; then
8508  withval="$with_dbmalloc"
8509
8510cat >>confdefs.h <<EOF
8511#define USE_DBMALLOC 1
8512EOF
8513
8514	: ${with_cflags:=-g}
8515	: ${with_no_leaks:=yes}
8516	 with_dbmalloc=yes
8517else
8518  with_dbmalloc=
8519fi;
8520echo "$as_me:8520: result: ${with_dbmalloc:-no}" >&5
8521echo "${ECHO_T}${with_dbmalloc:-no}" >&6
8522
8523case .$with_cflags in #(vi
8524.*-g*)
8525	case .$CFLAGS in #(vi
8526	.*-g*) #(vi
8527		;;
8528	*)
8529
8530cf_fix_cppflags=no
8531cf_new_cflags=
8532cf_new_cppflags=
8533cf_new_extra_cppflags=
8534
8535for cf_add_cflags in -g
8536do
8537case $cf_fix_cppflags in
8538no)
8539	case $cf_add_cflags in #(vi
8540	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8541		case $cf_add_cflags in
8542		-D*)
8543			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8544
8545			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8546				&& test -z "${cf_tst_cflags}" \
8547				&& cf_fix_cppflags=yes
8548
8549			if test $cf_fix_cppflags = yes ; then
8550				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8551				continue
8552			elif test "${cf_tst_cflags}" = "\"'" ; then
8553				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8554				continue
8555			fi
8556			;;
8557		esac
8558		case "$CPPFLAGS" in
8559		*$cf_add_cflags) #(vi
8560			;;
8561		*) #(vi
8562			case $cf_add_cflags in #(vi
8563			-D*)
8564				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8565
8566CPPFLAGS=`echo "$CPPFLAGS" | \
8567	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8568		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8569
8570				;;
8571			esac
8572			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8573			;;
8574		esac
8575		;;
8576	*)
8577		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8578		;;
8579	esac
8580	;;
8581yes)
8582	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8583
8584	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8585
8586	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8587		&& test -z "${cf_tst_cflags}" \
8588		&& cf_fix_cppflags=no
8589	;;
8590esac
8591done
8592
8593if test -n "$cf_new_cflags" ; then
8594
8595	CFLAGS="$CFLAGS $cf_new_cflags"
8596fi
8597
8598if test -n "$cf_new_cppflags" ; then
8599
8600	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8601fi
8602
8603if test -n "$cf_new_extra_cppflags" ; then
8604
8605	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8606fi
8607
8608		;;
8609	esac
8610	;;
8611esac
8612
8613if test "$with_dbmalloc" = yes ; then
8614	echo "$as_me:8614: checking for dbmalloc.h" >&5
8615echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
8616if test "${ac_cv_header_dbmalloc_h+set}" = set; then
8617  echo $ECHO_N "(cached) $ECHO_C" >&6
8618else
8619  cat >conftest.$ac_ext <<_ACEOF
8620#line 8620 "configure"
8621#include "confdefs.h"
8622#include <dbmalloc.h>
8623_ACEOF
8624if { (eval echo "$as_me:8624: \"$ac_cpp conftest.$ac_ext\"") >&5
8625  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8626  ac_status=$?
8627  egrep -v '^ *\+' conftest.er1 >conftest.err
8628  rm -f conftest.er1
8629  cat conftest.err >&5
8630  echo "$as_me:8630: \$? = $ac_status" >&5
8631  (exit $ac_status); } >/dev/null; then
8632  if test -s conftest.err; then
8633    ac_cpp_err=$ac_c_preproc_warn_flag
8634  else
8635    ac_cpp_err=
8636  fi
8637else
8638  ac_cpp_err=yes
8639fi
8640if test -z "$ac_cpp_err"; then
8641  ac_cv_header_dbmalloc_h=yes
8642else
8643  echo "$as_me: failed program was:" >&5
8644  cat conftest.$ac_ext >&5
8645  ac_cv_header_dbmalloc_h=no
8646fi
8647rm -f conftest.err conftest.$ac_ext
8648fi
8649echo "$as_me:8649: result: $ac_cv_header_dbmalloc_h" >&5
8650echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
8651if test $ac_cv_header_dbmalloc_h = yes; then
8652
8653echo "$as_me:8653: checking for debug_malloc in -ldbmalloc" >&5
8654echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
8655if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
8656  echo $ECHO_N "(cached) $ECHO_C" >&6
8657else
8658  ac_check_lib_save_LIBS=$LIBS
8659LIBS="-ldbmalloc  $LIBS"
8660cat >conftest.$ac_ext <<_ACEOF
8661#line 8661 "configure"
8662#include "confdefs.h"
8663
8664/* Override any gcc2 internal prototype to avoid an error.  */
8665#ifdef __cplusplus
8666extern "C"
8667#endif
8668/* We use char because int might match the return type of a gcc2
8669   builtin and then its argument prototype would still apply.  */
8670char debug_malloc ();
8671int
8672main ()
8673{
8674debug_malloc ();
8675  ;
8676  return 0;
8677}
8678_ACEOF
8679rm -f conftest.$ac_objext conftest$ac_exeext
8680if { (eval echo "$as_me:8680: \"$ac_link\"") >&5
8681  (eval $ac_link) 2>&5
8682  ac_status=$?
8683  echo "$as_me:8683: \$? = $ac_status" >&5
8684  (exit $ac_status); } &&
8685         { ac_try='test -s conftest$ac_exeext'
8686  { (eval echo "$as_me:8686: \"$ac_try\"") >&5
8687  (eval $ac_try) 2>&5
8688  ac_status=$?
8689  echo "$as_me:8689: \$? = $ac_status" >&5
8690  (exit $ac_status); }; }; then
8691  ac_cv_lib_dbmalloc_debug_malloc=yes
8692else
8693  echo "$as_me: failed program was:" >&5
8694cat conftest.$ac_ext >&5
8695ac_cv_lib_dbmalloc_debug_malloc=no
8696fi
8697rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8698LIBS=$ac_check_lib_save_LIBS
8699fi
8700echo "$as_me:8700: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
8701echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
8702if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
8703  cat >>confdefs.h <<EOF
8704#define HAVE_LIBDBMALLOC 1
8705EOF
8706
8707  LIBS="-ldbmalloc $LIBS"
8708
8709fi
8710
8711fi
8712
8713fi
8714
8715echo "$as_me:8715: checking if you want to use purify for testing" >&5
8716echo $ECHO_N "checking if you want to use purify for testing... $ECHO_C" >&6
8717
8718# Check whether --with-purify or --without-purify was given.
8719if test "${with_purify+set}" = set; then
8720  withval="$with_purify"
8721
8722cat >>confdefs.h <<EOF
8723#define USE_PURIFY 1
8724EOF
8725
8726	: ${with_cflags:=-g}
8727	: ${with_no_leaks:=yes}
8728	 with_purify=yes
8729else
8730  with_purify=
8731fi;
8732echo "$as_me:8732: result: ${with_purify:-no}" >&5
8733echo "${ECHO_T}${with_purify:-no}" >&6
8734
8735case .$with_cflags in #(vi
8736.*-g*)
8737	case .$CFLAGS in #(vi
8738	.*-g*) #(vi
8739		;;
8740	*)
8741
8742cf_fix_cppflags=no
8743cf_new_cflags=
8744cf_new_cppflags=
8745cf_new_extra_cppflags=
8746
8747for cf_add_cflags in -g
8748do
8749case $cf_fix_cppflags in
8750no)
8751	case $cf_add_cflags in #(vi
8752	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8753		case $cf_add_cflags in
8754		-D*)
8755			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8756
8757			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8758				&& test -z "${cf_tst_cflags}" \
8759				&& cf_fix_cppflags=yes
8760
8761			if test $cf_fix_cppflags = yes ; then
8762				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8763				continue
8764			elif test "${cf_tst_cflags}" = "\"'" ; then
8765				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8766				continue
8767			fi
8768			;;
8769		esac
8770		case "$CPPFLAGS" in
8771		*$cf_add_cflags) #(vi
8772			;;
8773		*) #(vi
8774			case $cf_add_cflags in #(vi
8775			-D*)
8776				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8777
8778CPPFLAGS=`echo "$CPPFLAGS" | \
8779	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8780		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8781
8782				;;
8783			esac
8784			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8785			;;
8786		esac
8787		;;
8788	*)
8789		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8790		;;
8791	esac
8792	;;
8793yes)
8794	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8795
8796	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8797
8798	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8799		&& test -z "${cf_tst_cflags}" \
8800		&& cf_fix_cppflags=no
8801	;;
8802esac
8803done
8804
8805if test -n "$cf_new_cflags" ; then
8806
8807	CFLAGS="$CFLAGS $cf_new_cflags"
8808fi
8809
8810if test -n "$cf_new_cppflags" ; then
8811
8812	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8813fi
8814
8815if test -n "$cf_new_extra_cppflags" ; then
8816
8817	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8818fi
8819
8820		;;
8821	esac
8822	;;
8823esac
8824
8825echo "$as_me:8825: checking if you want to use valgrind for testing" >&5
8826echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
8827
8828# Check whether --with-valgrind or --without-valgrind was given.
8829if test "${with_valgrind+set}" = set; then
8830  withval="$with_valgrind"
8831
8832cat >>confdefs.h <<EOF
8833#define USE_VALGRIND 1
8834EOF
8835
8836	: ${with_cflags:=-g}
8837	: ${with_no_leaks:=yes}
8838	 with_valgrind=yes
8839else
8840  with_valgrind=
8841fi;
8842echo "$as_me:8842: result: ${with_valgrind:-no}" >&5
8843echo "${ECHO_T}${with_valgrind:-no}" >&6
8844
8845case .$with_cflags in #(vi
8846.*-g*)
8847	case .$CFLAGS in #(vi
8848	.*-g*) #(vi
8849		;;
8850	*)
8851
8852cf_fix_cppflags=no
8853cf_new_cflags=
8854cf_new_cppflags=
8855cf_new_extra_cppflags=
8856
8857for cf_add_cflags in -g
8858do
8859case $cf_fix_cppflags in
8860no)
8861	case $cf_add_cflags in #(vi
8862	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8863		case $cf_add_cflags in
8864		-D*)
8865			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8866
8867			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8868				&& test -z "${cf_tst_cflags}" \
8869				&& cf_fix_cppflags=yes
8870
8871			if test $cf_fix_cppflags = yes ; then
8872				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8873				continue
8874			elif test "${cf_tst_cflags}" = "\"'" ; then
8875				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8876				continue
8877			fi
8878			;;
8879		esac
8880		case "$CPPFLAGS" in
8881		*$cf_add_cflags) #(vi
8882			;;
8883		*) #(vi
8884			case $cf_add_cflags in #(vi
8885			-D*)
8886				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8887
8888CPPFLAGS=`echo "$CPPFLAGS" | \
8889	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8890		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8891
8892				;;
8893			esac
8894			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8895			;;
8896		esac
8897		;;
8898	*)
8899		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8900		;;
8901	esac
8902	;;
8903yes)
8904	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8905
8906	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8907
8908	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8909		&& test -z "${cf_tst_cflags}" \
8910		&& cf_fix_cppflags=no
8911	;;
8912esac
8913done
8914
8915if test -n "$cf_new_cflags" ; then
8916
8917	CFLAGS="$CFLAGS $cf_new_cflags"
8918fi
8919
8920if test -n "$cf_new_cppflags" ; then
8921
8922	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8923fi
8924
8925if test -n "$cf_new_extra_cppflags" ; then
8926
8927	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8928fi
8929
8930		;;
8931	esac
8932	;;
8933esac
8934
8935echo "$as_me:8935: checking if you want to perform memory-leak testing" >&5
8936echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
8937
8938# Check whether --with-no-leaks or --without-no-leaks was given.
8939if test "${with_no_leaks+set}" = set; then
8940  withval="$with_no_leaks"
8941
8942cat >>confdefs.h <<\EOF
8943#define NO_LEAKS 1
8944EOF
8945
8946	 cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
8947	 case ${cf_doalloc} in #(vi
8948	 *yes*) ;;
8949	 *)
8950cat >>confdefs.h <<\EOF
8951#define DOALLOC 10000
8952EOF
8953 ;;
8954	 esac
8955	 with_no_leaks=yes
8956else
8957  with_no_leaks=
8958fi;
8959echo "$as_me:8959: result: $with_no_leaks" >&5
8960echo "${ECHO_T}$with_no_leaks" >&6
8961
8962echo "$as_me:8962: checking if you want --trace option" >&5
8963echo $ECHO_N "checking if you want --trace option... $ECHO_C" >&6
8964
8965# Check whether --enable-trace or --disable-trace was given.
8966if test "${enable_trace+set}" = set; then
8967  enableval="$enable_trace"
8968
8969else
8970  enableval=yes
8971fi;
8972echo "$as_me:8972: result: $enableval" >&5
8973echo "${ECHO_T}$enableval" >&6
8974if test "$enableval" != no ; then
8975EXTRAOBJS="$EXTRAOBJS trace\$o"
8976
8977cat >>confdefs.h <<\EOF
8978#define HAVE_DLG_TRACE 1
8979EOF
8980
8981else
8982	:
8983fi
8984
8985LIBTOOL_MAKE="#"
8986
8987echo "$as_me:8987: checking if libtool -version-number should be used" >&5
8988echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
8989
8990# Check whether --enable-libtool-version or --disable-libtool-version was given.
8991if test "${enable_libtool_version+set}" = set; then
8992  enableval="$enable_libtool_version"
8993  test "$enableval" != no && enableval=yes
8994  if test "$enableval" != "yes" ; then
8995    cf_libtool_version=no
8996  else
8997    cf_libtool_version=yes
8998  fi
8999else
9000  enableval=yes
9001  cf_libtool_version=yes
9002
9003fi;
9004echo "$as_me:9004: result: $cf_libtool_version" >&5
9005echo "${ECHO_T}$cf_libtool_version" >&6
9006
9007if test "$cf_libtool_version" = yes ; then
9008	LIBTOOL_VERSION="-version-number"
9009else
9010	LIBTOOL_VERSION="-version-info"
9011fi
9012
9013LIBTOOL=
9014
9015# common library maintenance symbols that are convenient for libtool scripts:
9016LIB_CREATE='${AR} -cr'
9017LIB_OBJECT='${OBJECTS}'
9018LIB_SUFFIX=.a
9019LIB_PREP="$RANLIB"
9020
9021# symbols used to prop libtool up to enable it to determine what it should be
9022# doing:
9023LIB_CLEAN=
9024LIB_COMPILE=
9025LIB_LINK='${CC}'
9026LIB_INSTALL=
9027LIB_UNINSTALL=
9028
9029echo "$as_me:9029: checking if you want to build libraries with libtool" >&5
9030echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
9031
9032# Check whether --with-libtool or --without-libtool was given.
9033if test "${with_libtool+set}" = set; then
9034  withval="$with_libtool"
9035  with_libtool=$withval
9036else
9037  with_libtool=no
9038fi;
9039echo "$as_me:9039: result: $with_libtool" >&5
9040echo "${ECHO_T}$with_libtool" >&6
9041if test "$with_libtool" != "no"; then
9042
9043	if test "$with_libtool" != "yes" ; then
9044
9045if test "x$prefix" != xNONE; then
9046  cf_path_syntax="$prefix"
9047else
9048  cf_path_syntax="$ac_default_prefix"
9049fi
9050
9051case ".$with_libtool" in #(vi
9052.\$\(*\)*|.\'*\'*) #(vi
9053  ;;
9054..|./*|.\\*) #(vi
9055  ;;
9056.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9057  ;;
9058.\${*prefix}*|.\${*dir}*) #(vi
9059  eval with_libtool="$with_libtool"
9060  case ".$with_libtool" in #(vi
9061  .NONE/*)
9062    with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
9063    ;;
9064  esac
9065  ;; #(vi
9066.no|.NONE/*)
9067  with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
9068  ;;
9069*)
9070  { { echo "$as_me:9070: error: expected a pathname, not \"$with_libtool\"" >&5
9071echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
9072   { (exit 1); exit 1; }; }
9073  ;;
9074esac
9075
9076		LIBTOOL=$with_libtool
9077	else
9078		# Extract the first word of "libtool", so it can be a program name with args.
9079set dummy libtool; ac_word=$2
9080echo "$as_me:9080: checking for $ac_word" >&5
9081echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9082if test "${ac_cv_path_LIBTOOL+set}" = set; then
9083  echo $ECHO_N "(cached) $ECHO_C" >&6
9084else
9085  case $LIBTOOL in
9086  [\\/]* | ?:[\\/]*)
9087  ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
9088  ;;
9089  *)
9090  ac_save_IFS=$IFS; IFS=$ac_path_separator
9091ac_dummy="$PATH"
9092for ac_dir in $ac_dummy; do
9093  IFS=$ac_save_IFS
9094  test -z "$ac_dir" && ac_dir=.
9095  if $as_executable_p "$ac_dir/$ac_word"; then
9096   ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
9097   echo "$as_me:9097: found $ac_dir/$ac_word" >&5
9098   break
9099fi
9100done
9101
9102  ;;
9103esac
9104fi
9105LIBTOOL=$ac_cv_path_LIBTOOL
9106
9107if test -n "$LIBTOOL"; then
9108  echo "$as_me:9108: result: $LIBTOOL" >&5
9109echo "${ECHO_T}$LIBTOOL" >&6
9110else
9111  echo "$as_me:9111: result: no" >&5
9112echo "${ECHO_T}no" >&6
9113fi
9114
9115	fi
9116	if test -z "$LIBTOOL" ; then
9117		{ { echo "$as_me:9117: error: Cannot find libtool" >&5
9118echo "$as_me: error: Cannot find libtool" >&2;}
9119   { (exit 1); exit 1; }; }
9120	fi
9121	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
9122	LIB_OBJECT='${OBJECTS:.o=.lo}'
9123	LIB_SUFFIX=.la
9124	LIB_CLEAN='${LIBTOOL} --mode=clean'
9125	LIB_COMPILE='${LIBTOOL} --mode=compile'
9126	LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
9127	LIB_INSTALL='${LIBTOOL} --mode=install'
9128	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
9129	LIB_PREP=:
9130
9131	# Show the version of libtool
9132	echo "$as_me:9132: checking version of libtool" >&5
9133echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
9134
9135	# Save the version in a cache variable - this is not entirely a good
9136	# thing, but the version string from libtool is very ugly, and for
9137	# bug reports it might be useful to have the original string. "("
9138	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.].*//'`
9139	echo "$as_me:9139: result: $cf_cv_libtool_version" >&5
9140echo "${ECHO_T}$cf_cv_libtool_version" >&6
9141	if test -z "$cf_cv_libtool_version" ; then
9142		{ { echo "$as_me:9142: error: This is not GNU libtool" >&5
9143echo "$as_me: error: This is not GNU libtool" >&2;}
9144   { (exit 1); exit 1; }; }
9145	fi
9146
9147	# special hack to add -no-undefined (which libtool should do for itself)
9148	LT_UNDEF=
9149	case "$cf_cv_system_name" in #(vi
9150	cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
9151		LT_UNDEF=-no-undefined
9152		;;
9153	esac
9154
9155	# special hack to add --tag option for C++ compiler
9156	case $cf_cv_libtool_version in #(vi
9157	1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
9158		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
9159		LIBTOOL="$LIBTOOL --tag=CC"
9160		;;
9161	*)
9162		LIBTOOL_CXX="$LIBTOOL"
9163		;;
9164	esac
9165else
9166	LIBTOOL=""
9167	LIBTOOL_CXX=""
9168fi
9169
9170test -z "$LIBTOOL" && ECHO_LT=
9171
9172if test "$with_libtool" = "yes" ; then
9173	OBJEXT="lo"
9174	LIBTOOL_MAKE=
9175
9176echo "$as_me:9176: checking for additional libtool options" >&5
9177echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
9178
9179# Check whether --with-libtool-opts or --without-libtool-opts was given.
9180if test "${with_libtool_opts+set}" = set; then
9181  withval="$with_libtool_opts"
9182  with_libtool_opts=$withval
9183else
9184  with_libtool_opts=no
9185fi;
9186echo "$as_me:9186: result: $with_libtool_opts" >&5
9187echo "${ECHO_T}$with_libtool_opts" >&6
9188
9189case .$with_libtool_opts in
9190.yes|.no|.)
9191	;;
9192*)
9193	LIBTOOL_OPTS=$with_libtool_opts
9194	;;
9195esac
9196
9197fi
9198
9199echo "$as_me:9199: checking for specific curses-directory" >&5
9200echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
9201
9202# Check whether --with-curses-dir or --without-curses-dir was given.
9203if test "${with_curses_dir+set}" = set; then
9204  withval="$with_curses_dir"
9205  cf_cv_curses_dir=$withval
9206else
9207  cf_cv_curses_dir=no
9208fi;
9209echo "$as_me:9209: result: $cf_cv_curses_dir" >&5
9210echo "${ECHO_T}$cf_cv_curses_dir" >&6
9211
9212if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9213then
9214
9215if test "x$prefix" != xNONE; then
9216  cf_path_syntax="$prefix"
9217else
9218  cf_path_syntax="$ac_default_prefix"
9219fi
9220
9221case ".$withval" in #(vi
9222.\$\(*\)*|.\'*\'*) #(vi
9223  ;;
9224..|./*|.\\*) #(vi
9225  ;;
9226.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9227  ;;
9228.\${*prefix}*|.\${*dir}*) #(vi
9229  eval withval="$withval"
9230  case ".$withval" in #(vi
9231  .NONE/*)
9232    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
9233    ;;
9234  esac
9235  ;; #(vi
9236.no|.NONE/*)
9237  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
9238  ;;
9239*)
9240  { { echo "$as_me:9240: error: expected a pathname, not \"$withval\"" >&5
9241echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9242   { (exit 1); exit 1; }; }
9243  ;;
9244esac
9245
9246	if test -d "$cf_cv_curses_dir"
9247	then
9248
9249if test -n "$cf_cv_curses_dir/include" ; then
9250  for cf_add_incdir in $cf_cv_curses_dir/include
9251  do
9252	while test $cf_add_incdir != /usr/include
9253	do
9254	  if test -d $cf_add_incdir
9255	  then
9256		cf_have_incdir=no
9257		if test -n "$CFLAGS$CPPFLAGS" ; then
9258		  # a loop is needed to ensure we can add subdirs of existing dirs
9259		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9260			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9261			  cf_have_incdir=yes; break
9262			fi
9263		  done
9264		fi
9265
9266		if test "$cf_have_incdir" = no ; then
9267		  if test "$cf_add_incdir" = /usr/local/include ; then
9268			if test "$GCC" = yes
9269			then
9270			  cf_save_CPPFLAGS=$CPPFLAGS
9271			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9272			  cat >conftest.$ac_ext <<_ACEOF
9273#line 9273 "configure"
9274#include "confdefs.h"
9275#include <stdio.h>
9276int
9277main ()
9278{
9279printf("Hello")
9280  ;
9281  return 0;
9282}
9283_ACEOF
9284rm -f conftest.$ac_objext
9285if { (eval echo "$as_me:9285: \"$ac_compile\"") >&5
9286  (eval $ac_compile) 2>&5
9287  ac_status=$?
9288  echo "$as_me:9288: \$? = $ac_status" >&5
9289  (exit $ac_status); } &&
9290         { ac_try='test -s conftest.$ac_objext'
9291  { (eval echo "$as_me:9291: \"$ac_try\"") >&5
9292  (eval $ac_try) 2>&5
9293  ac_status=$?
9294  echo "$as_me:9294: \$? = $ac_status" >&5
9295  (exit $ac_status); }; }; then
9296  :
9297else
9298  echo "$as_me: failed program was:" >&5
9299cat conftest.$ac_ext >&5
9300cf_have_incdir=yes
9301fi
9302rm -f conftest.$ac_objext conftest.$ac_ext
9303			  CPPFLAGS=$cf_save_CPPFLAGS
9304			fi
9305		  fi
9306		fi
9307
9308		if test "$cf_have_incdir" = no ; then
9309		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9310
9311echo "${as_me:-configure}:9311: testing adding $cf_add_incdir to include-path ..." 1>&5
9312
9313		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9314
9315		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9316		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9317		  cf_add_incdir="$cf_top_incdir"
9318		else
9319		  break
9320		fi
9321	  fi
9322	done
9323  done
9324fi
9325
9326if test -n "$cf_cv_curses_dir/lib" ; then
9327  for cf_add_libdir in $cf_cv_curses_dir/lib
9328  do
9329    if test $cf_add_libdir = /usr/lib ; then
9330      :
9331    elif test -d $cf_add_libdir
9332    then
9333      cf_have_libdir=no
9334      if test -n "$LDFLAGS$LIBS" ; then
9335        # a loop is needed to ensure we can add subdirs of existing dirs
9336        for cf_test_libdir in $LDFLAGS $LIBS ; do
9337          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9338            cf_have_libdir=yes; break
9339          fi
9340        done
9341      fi
9342      if test "$cf_have_libdir" = no ; then
9343        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
9344
9345echo "${as_me:-configure}:9345: testing adding $cf_add_libdir to library-path ..." 1>&5
9346
9347        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9348      fi
9349    fi
9350  done
9351fi
9352
9353	fi
9354fi
9355
9356use_ncurses=no
9357
9358# Check whether --with-ncurses or --without-ncurses was given.
9359if test "${with_ncurses+set}" = set; then
9360  withval="$with_ncurses"
9361  use_ncurses=ncurses
9362fi;
9363
9364# Check whether --with-ncursesw or --without-ncursesw was given.
9365if test "${with_ncursesw+set}" = set; then
9366  withval="$with_ncursesw"
9367  use_ncurses=ncursesw
9368fi;
9369if test $use_ncurses != no ; then
9370	cf_wide_curses=yes
9371	if test $use_ncurses = ncursesw ; then
9372
9373echo "$as_me:9373: checking for multibyte character support" >&5
9374echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9375if test "${cf_cv_utf8_lib+set}" = set; then
9376  echo $ECHO_N "(cached) $ECHO_C" >&6
9377else
9378
9379	cf_save_LIBS="$LIBS"
9380	cat >conftest.$ac_ext <<_ACEOF
9381#line 9381 "configure"
9382#include "confdefs.h"
9383
9384#include <stdlib.h>
9385int
9386main ()
9387{
9388putwc(0,0);
9389  ;
9390  return 0;
9391}
9392_ACEOF
9393rm -f conftest.$ac_objext conftest$ac_exeext
9394if { (eval echo "$as_me:9394: \"$ac_link\"") >&5
9395  (eval $ac_link) 2>&5
9396  ac_status=$?
9397  echo "$as_me:9397: \$? = $ac_status" >&5
9398  (exit $ac_status); } &&
9399         { ac_try='test -s conftest$ac_exeext'
9400  { (eval echo "$as_me:9400: \"$ac_try\"") >&5
9401  (eval $ac_try) 2>&5
9402  ac_status=$?
9403  echo "$as_me:9403: \$? = $ac_status" >&5
9404  (exit $ac_status); }; }; then
9405  cf_cv_utf8_lib=yes
9406else
9407  echo "$as_me: failed program was:" >&5
9408cat conftest.$ac_ext >&5
9409
9410# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9411# will be set on completion of the AC_TRY_LINK below.
9412cf_cv_header_path_utf8=
9413cf_cv_library_path_utf8=
9414
9415echo "${as_me:-configure}:9415: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9416
9417cf_save_LIBS="$LIBS"
9418
9419cat >conftest.$ac_ext <<_ACEOF
9420#line 9420 "configure"
9421#include "confdefs.h"
9422
9423#include <libutf8.h>
9424int
9425main ()
9426{
9427putwc(0,0);
9428  ;
9429  return 0;
9430}
9431_ACEOF
9432rm -f conftest.$ac_objext conftest$ac_exeext
9433if { (eval echo "$as_me:9433: \"$ac_link\"") >&5
9434  (eval $ac_link) 2>&5
9435  ac_status=$?
9436  echo "$as_me:9436: \$? = $ac_status" >&5
9437  (exit $ac_status); } &&
9438         { ac_try='test -s conftest$ac_exeext'
9439  { (eval echo "$as_me:9439: \"$ac_try\"") >&5
9440  (eval $ac_try) 2>&5
9441  ac_status=$?
9442  echo "$as_me:9442: \$? = $ac_status" >&5
9443  (exit $ac_status); }; }; then
9444
9445	cf_cv_find_linkage_utf8=yes
9446	cf_cv_header_path_utf8=/usr/include
9447	cf_cv_library_path_utf8=/usr/lib
9448
9449else
9450  echo "$as_me: failed program was:" >&5
9451cat conftest.$ac_ext >&5
9452
9453LIBS="-lutf8  $cf_save_LIBS"
9454
9455cat >conftest.$ac_ext <<_ACEOF
9456#line 9456 "configure"
9457#include "confdefs.h"
9458
9459#include <libutf8.h>
9460int
9461main ()
9462{
9463putwc(0,0);
9464  ;
9465  return 0;
9466}
9467_ACEOF
9468rm -f conftest.$ac_objext conftest$ac_exeext
9469if { (eval echo "$as_me:9469: \"$ac_link\"") >&5
9470  (eval $ac_link) 2>&5
9471  ac_status=$?
9472  echo "$as_me:9472: \$? = $ac_status" >&5
9473  (exit $ac_status); } &&
9474         { ac_try='test -s conftest$ac_exeext'
9475  { (eval echo "$as_me:9475: \"$ac_try\"") >&5
9476  (eval $ac_try) 2>&5
9477  ac_status=$?
9478  echo "$as_me:9478: \$? = $ac_status" >&5
9479  (exit $ac_status); }; }; then
9480
9481	cf_cv_find_linkage_utf8=yes
9482	cf_cv_header_path_utf8=/usr/include
9483	cf_cv_library_path_utf8=/usr/lib
9484	cf_cv_library_file_utf8="-lutf8"
9485
9486else
9487  echo "$as_me: failed program was:" >&5
9488cat conftest.$ac_ext >&5
9489
9490	cf_cv_find_linkage_utf8=no
9491	LIBS="$cf_save_LIBS"
9492
9493    test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6
9494
9495echo "${as_me:-configure}:9495: testing find linkage for utf8 library ..." 1>&5
9496
9497echo "${as_me:-configure}:9497: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9498
9499    cf_save_CPPFLAGS="$CPPFLAGS"
9500    cf_test_CPPFLAGS="$CPPFLAGS"
9501
9502cf_search=
9503
9504# collect the current set of include-directories from compiler flags
9505cf_header_path_list=""
9506if test -n "${CFLAGS}${CPPFLAGS}" ; then
9507	for cf_header_path in $CPPFLAGS $CFLAGS
9508	do
9509		case $cf_header_path in #(vi
9510		-I*)
9511			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9512
9513test "$cf_header_path" != "NONE" && \
9514test -d "$cf_header_path" && \
9515 {
9516	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
9517	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9518	test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9519	test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9520	test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9521	test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9522}
9523
9524			cf_header_path_list="$cf_header_path_list $cf_search"
9525			;;
9526		esac
9527	done
9528fi
9529
9530# add the variations for the package we are looking for
9531
9532cf_search=
9533
9534test "/usr" != "$prefix" && \
9535test -d "/usr" && \
9536(test $prefix = NONE || test "/usr" != "$prefix") && {
9537	test -n "$verbose" && echo "	... testing for include-directories under /usr"
9538	test -d /usr/include &&          cf_search="$cf_search /usr/include"
9539	test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
9540	test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
9541	test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
9542	test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
9543}
9544
9545test "$prefix" != "NONE" && \
9546test -d "$prefix" && \
9547 {
9548	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
9549	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9550	test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9551	test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9552	test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9553	test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9554}
9555
9556test "/usr/local" != "$prefix" && \
9557test -d "/usr/local" && \
9558(test $prefix = NONE || test "/usr/local" != "$prefix") && {
9559	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
9560	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9561	test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
9562	test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
9563	test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
9564	test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
9565}
9566
9567test "/opt" != "$prefix" && \
9568test -d "/opt" && \
9569(test $prefix = NONE || test "/opt" != "$prefix") && {
9570	test -n "$verbose" && echo "	... testing for include-directories under /opt"
9571	test -d /opt/include &&          cf_search="$cf_search /opt/include"
9572	test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
9573	test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
9574	test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
9575	test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
9576}
9577
9578test "$HOME" != "$prefix" && \
9579test -d "$HOME" && \
9580(test $prefix = NONE || test "$HOME" != "$prefix") && {
9581	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
9582	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9583	test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9584	test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9585	test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9586	test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9587}
9588
9589test "$includedir" != NONE && \
9590test "$includedir" != "/usr/include" && \
9591test -d "$includedir" && {
9592	test -d $includedir &&    cf_search="$cf_search $includedir"
9593	test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9594}
9595
9596test "$oldincludedir" != NONE && \
9597test "$oldincludedir" != "/usr/include" && \
9598test -d "$oldincludedir" && {
9599	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9600	test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9601}
9602
9603cf_search="$cf_search $cf_header_path_list"
9604
9605    for cf_cv_header_path_utf8 in $cf_search
9606    do
9607      if test -d $cf_cv_header_path_utf8 ; then
9608        test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6
9609
9610echo "${as_me:-configure}:9610: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9611
9612        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9613        cat >conftest.$ac_ext <<_ACEOF
9614#line 9614 "configure"
9615#include "confdefs.h"
9616
9617#include <libutf8.h>
9618int
9619main ()
9620{
9621putwc(0,0);
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
9639            test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9640
9641echo "${as_me:-configure}:9641: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9642
9643            cf_cv_find_linkage_utf8=maybe
9644            cf_test_CPPFLAGS="$CPPFLAGS"
9645            break
9646else
9647  echo "$as_me: failed program was:" >&5
9648cat conftest.$ac_ext >&5
9649
9650            CPPFLAGS="$cf_save_CPPFLAGS"
9651
9652fi
9653rm -f conftest.$ac_objext conftest.$ac_ext
9654      fi
9655    done
9656
9657    if test "$cf_cv_find_linkage_utf8" = maybe ; then
9658
9659echo "${as_me:-configure}:9659: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9660
9661      cf_save_LIBS="$LIBS"
9662      cf_save_LDFLAGS="$LDFLAGS"
9663
9664      if test "$cf_cv_find_linkage_utf8" != yes ; then
9665
9666cf_search=
9667cf_library_path_list=""
9668if test -n "${LDFLAGS}${LIBS}" ; then
9669	for cf_library_path in $LDFLAGS $LIBS
9670	do
9671		case $cf_library_path in #(vi
9672		-L*)
9673			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9674
9675test "$cf_library_path" != "NONE" && \
9676test -d "$cf_library_path" && \
9677 {
9678	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
9679	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9680	test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9681	test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9682	test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9683	test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9684}
9685
9686			cf_library_path_list="$cf_library_path_list $cf_search"
9687			;;
9688		esac
9689	done
9690fi
9691
9692cf_search=
9693
9694test "/usr" != "$prefix" && \
9695test -d "/usr" && \
9696(test $prefix = NONE || test "/usr" != "$prefix") && {
9697	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
9698	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9699	test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9700	test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9701	test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9702	test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9703}
9704
9705test "$prefix" != "NONE" && \
9706test -d "$prefix" && \
9707 {
9708	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
9709	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9710	test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9711	test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9712	test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9713	test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9714}
9715
9716test "/usr/local" != "$prefix" && \
9717test -d "/usr/local" && \
9718(test $prefix = NONE || test "/usr/local" != "$prefix") && {
9719	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
9720	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9721	test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9722	test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9723	test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9724	test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9725}
9726
9727test "/opt" != "$prefix" && \
9728test -d "/opt" && \
9729(test $prefix = NONE || test "/opt" != "$prefix") && {
9730	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
9731	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9732	test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9733	test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9734	test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9735	test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9736}
9737
9738test "$HOME" != "$prefix" && \
9739test -d "$HOME" && \
9740(test $prefix = NONE || test "$HOME" != "$prefix") && {
9741	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
9742	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9743	test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9744	test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9745	test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9746	test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9747}
9748
9749cf_search="$cf_library_path_list $cf_search"
9750
9751        for cf_cv_library_path_utf8 in $cf_search
9752        do
9753          if test -d $cf_cv_library_path_utf8 ; then
9754            test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6
9755
9756echo "${as_me:-configure}:9756: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9757
9758            CPPFLAGS="$cf_test_CPPFLAGS"
9759            LIBS="-lutf8  $cf_save_LIBS"
9760            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9761            cat >conftest.$ac_ext <<_ACEOF
9762#line 9762 "configure"
9763#include "confdefs.h"
9764
9765#include <libutf8.h>
9766int
9767main ()
9768{
9769putwc(0,0);
9770  ;
9771  return 0;
9772}
9773_ACEOF
9774rm -f conftest.$ac_objext conftest$ac_exeext
9775if { (eval echo "$as_me:9775: \"$ac_link\"") >&5
9776  (eval $ac_link) 2>&5
9777  ac_status=$?
9778  echo "$as_me:9778: \$? = $ac_status" >&5
9779  (exit $ac_status); } &&
9780         { ac_try='test -s conftest$ac_exeext'
9781  { (eval echo "$as_me:9781: \"$ac_try\"") >&5
9782  (eval $ac_try) 2>&5
9783  ac_status=$?
9784  echo "$as_me:9784: \$? = $ac_status" >&5
9785  (exit $ac_status); }; }; then
9786
9787                test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9788
9789echo "${as_me:-configure}:9789: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9790
9791                cf_cv_find_linkage_utf8=yes
9792                cf_cv_library_file_utf8="-lutf8"
9793                break
9794else
9795  echo "$as_me: failed program was:" >&5
9796cat conftest.$ac_ext >&5
9797
9798                CPPFLAGS="$cf_save_CPPFLAGS"
9799                LIBS="$cf_save_LIBS"
9800                LDFLAGS="$cf_save_LDFLAGS"
9801
9802fi
9803rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9804          fi
9805        done
9806        CPPFLAGS="$cf_save_CPPFLAGS"
9807        LDFLAGS="$cf_save_LDFLAGS"
9808      fi
9809
9810    else
9811      cf_cv_find_linkage_utf8=no
9812    fi
9813
9814fi
9815rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9816
9817fi
9818rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9819
9820LIBS="$cf_save_LIBS"
9821
9822if test "$cf_cv_find_linkage_utf8" = yes ; then
9823cf_cv_utf8_lib=add-on
9824else
9825cf_cv_utf8_lib=no
9826fi
9827
9828fi
9829rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9830fi
9831echo "$as_me:9831: result: $cf_cv_utf8_lib" >&5
9832echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9833
9834# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9835# ncurses/ncursesw:
9836if test "$cf_cv_utf8_lib" = "add-on" ; then
9837
9838cat >>confdefs.h <<\EOF
9839#define HAVE_LIBUTF8_H 1
9840EOF
9841
9842if test -n "$cf_cv_header_path_utf8" ; then
9843  for cf_add_incdir in $cf_cv_header_path_utf8
9844  do
9845	while test $cf_add_incdir != /usr/include
9846	do
9847	  if test -d $cf_add_incdir
9848	  then
9849		cf_have_incdir=no
9850		if test -n "$CFLAGS$CPPFLAGS" ; then
9851		  # a loop is needed to ensure we can add subdirs of existing dirs
9852		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9853			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9854			  cf_have_incdir=yes; break
9855			fi
9856		  done
9857		fi
9858
9859		if test "$cf_have_incdir" = no ; then
9860		  if test "$cf_add_incdir" = /usr/local/include ; then
9861			if test "$GCC" = yes
9862			then
9863			  cf_save_CPPFLAGS=$CPPFLAGS
9864			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9865			  cat >conftest.$ac_ext <<_ACEOF
9866#line 9866 "configure"
9867#include "confdefs.h"
9868#include <stdio.h>
9869int
9870main ()
9871{
9872printf("Hello")
9873  ;
9874  return 0;
9875}
9876_ACEOF
9877rm -f conftest.$ac_objext
9878if { (eval echo "$as_me:9878: \"$ac_compile\"") >&5
9879  (eval $ac_compile) 2>&5
9880  ac_status=$?
9881  echo "$as_me:9881: \$? = $ac_status" >&5
9882  (exit $ac_status); } &&
9883         { ac_try='test -s conftest.$ac_objext'
9884  { (eval echo "$as_me:9884: \"$ac_try\"") >&5
9885  (eval $ac_try) 2>&5
9886  ac_status=$?
9887  echo "$as_me:9887: \$? = $ac_status" >&5
9888  (exit $ac_status); }; }; then
9889  :
9890else
9891  echo "$as_me: failed program was:" >&5
9892cat conftest.$ac_ext >&5
9893cf_have_incdir=yes
9894fi
9895rm -f conftest.$ac_objext conftest.$ac_ext
9896			  CPPFLAGS=$cf_save_CPPFLAGS
9897			fi
9898		  fi
9899		fi
9900
9901		if test "$cf_have_incdir" = no ; then
9902		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9903
9904echo "${as_me:-configure}:9904: testing adding $cf_add_incdir to include-path ..." 1>&5
9905
9906		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9907
9908		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9909		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9910		  cf_add_incdir="$cf_top_incdir"
9911		else
9912		  break
9913		fi
9914	  fi
9915	done
9916  done
9917fi
9918
9919if test -n "$cf_cv_library_path_utf8" ; then
9920  for cf_add_libdir in $cf_cv_library_path_utf8
9921  do
9922    if test $cf_add_libdir = /usr/lib ; then
9923      :
9924    elif test -d $cf_add_libdir
9925    then
9926      cf_have_libdir=no
9927      if test -n "$LDFLAGS$LIBS" ; then
9928        # a loop is needed to ensure we can add subdirs of existing dirs
9929        for cf_test_libdir in $LDFLAGS $LIBS ; do
9930          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9931            cf_have_libdir=yes; break
9932          fi
9933        done
9934      fi
9935      if test "$cf_have_libdir" = no ; then
9936        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
9937
9938echo "${as_me:-configure}:9938: testing adding $cf_add_libdir to library-path ..." 1>&5
9939
9940        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9941      fi
9942    fi
9943  done
9944fi
9945
9946	LIBS="$cf_cv_library_file_utf8 $LIBS"
9947fi
9948
9949	fi
9950
9951cf_ncuconfig_root=$use_ncurses
9952
9953echo "Looking for ${cf_ncuconfig_root}-config"
9954
9955if test -n "$ac_tool_prefix"; then
9956  for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9957  do
9958    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9959set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9960echo "$as_me:9960: checking for $ac_word" >&5
9961echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9962if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9963  echo $ECHO_N "(cached) $ECHO_C" >&6
9964else
9965  if test -n "$NCURSES_CONFIG"; then
9966  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9967else
9968  ac_save_IFS=$IFS; IFS=$ac_path_separator
9969ac_dummy="$PATH"
9970for ac_dir in $ac_dummy; do
9971  IFS=$ac_save_IFS
9972  test -z "$ac_dir" && ac_dir=.
9973  $as_executable_p "$ac_dir/$ac_word" || continue
9974ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9975echo "$as_me:9975: found $ac_dir/$ac_word" >&5
9976break
9977done
9978
9979fi
9980fi
9981NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9982if test -n "$NCURSES_CONFIG"; then
9983  echo "$as_me:9983: result: $NCURSES_CONFIG" >&5
9984echo "${ECHO_T}$NCURSES_CONFIG" >&6
9985else
9986  echo "$as_me:9986: result: no" >&5
9987echo "${ECHO_T}no" >&6
9988fi
9989
9990    test -n "$NCURSES_CONFIG" && break
9991  done
9992fi
9993if test -z "$NCURSES_CONFIG"; then
9994  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9995  for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9996do
9997  # Extract the first word of "$ac_prog", so it can be a program name with args.
9998set dummy $ac_prog; ac_word=$2
9999echo "$as_me:9999: checking for $ac_word" >&5
10000echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10001if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10002  echo $ECHO_N "(cached) $ECHO_C" >&6
10003else
10004  if test -n "$ac_ct_NCURSES_CONFIG"; then
10005  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10006else
10007  ac_save_IFS=$IFS; IFS=$ac_path_separator
10008ac_dummy="$PATH"
10009for ac_dir in $ac_dummy; do
10010  IFS=$ac_save_IFS
10011  test -z "$ac_dir" && ac_dir=.
10012  $as_executable_p "$ac_dir/$ac_word" || continue
10013ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10014echo "$as_me:10014: found $ac_dir/$ac_word" >&5
10015break
10016done
10017
10018fi
10019fi
10020ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10021if test -n "$ac_ct_NCURSES_CONFIG"; then
10022  echo "$as_me:10022: result: $ac_ct_NCURSES_CONFIG" >&5
10023echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10024else
10025  echo "$as_me:10025: result: no" >&5
10026echo "${ECHO_T}no" >&6
10027fi
10028
10029  test -n "$ac_ct_NCURSES_CONFIG" && break
10030done
10031test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10032
10033  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10034fi
10035
10036if test "$NCURSES_CONFIG" != none ; then
10037
10038CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
10039LIBS="`$NCURSES_CONFIG --libs` $LIBS"
10040
10041# even with config script, some packages use no-override for curses.h
10042
10043echo "$as_me:10043: checking if we have identified curses headers" >&5
10044echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10045if test "${cf_cv_ncurses_header+set}" = set; then
10046  echo $ECHO_N "(cached) $ECHO_C" >&6
10047else
10048
10049cf_cv_ncurses_header=none
10050for cf_header in  \
10051    $use_ncurses/ncurses.h \
10052	$use_ncurses/curses.h \
10053	ncurses.h \
10054	curses.h
10055do
10056cat >conftest.$ac_ext <<_ACEOF
10057#line 10057 "configure"
10058#include "confdefs.h"
10059#include <${cf_header}>
10060int
10061main ()
10062{
10063initscr(); tgoto("?", 0,0)
10064  ;
10065  return 0;
10066}
10067_ACEOF
10068rm -f conftest.$ac_objext
10069if { (eval echo "$as_me:10069: \"$ac_compile\"") >&5
10070  (eval $ac_compile) 2>&5
10071  ac_status=$?
10072  echo "$as_me:10072: \$? = $ac_status" >&5
10073  (exit $ac_status); } &&
10074         { ac_try='test -s conftest.$ac_objext'
10075  { (eval echo "$as_me:10075: \"$ac_try\"") >&5
10076  (eval $ac_try) 2>&5
10077  ac_status=$?
10078  echo "$as_me:10078: \$? = $ac_status" >&5
10079  (exit $ac_status); }; }; then
10080  cf_cv_ncurses_header=$cf_header; break
10081else
10082  echo "$as_me: failed program was:" >&5
10083cat conftest.$ac_ext >&5
10084fi
10085rm -f conftest.$ac_objext conftest.$ac_ext
10086done
10087
10088fi
10089echo "$as_me:10089: result: $cf_cv_ncurses_header" >&5
10090echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10091
10092if test "$cf_cv_ncurses_header" = none ; then
10093	{ { echo "$as_me:10093: error: No curses header-files found" >&5
10094echo "$as_me: error: No curses header-files found" >&2;}
10095   { (exit 1); exit 1; }; }
10096fi
10097
10098# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10099
10100for ac_header in $cf_cv_ncurses_header
10101do
10102as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10103echo "$as_me:10103: checking for $ac_header" >&5
10104echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10105if eval "test \"\${$as_ac_Header+set}\" = set"; then
10106  echo $ECHO_N "(cached) $ECHO_C" >&6
10107else
10108  cat >conftest.$ac_ext <<_ACEOF
10109#line 10109 "configure"
10110#include "confdefs.h"
10111#include <$ac_header>
10112_ACEOF
10113if { (eval echo "$as_me:10113: \"$ac_cpp conftest.$ac_ext\"") >&5
10114  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10115  ac_status=$?
10116  egrep -v '^ *\+' conftest.er1 >conftest.err
10117  rm -f conftest.er1
10118  cat conftest.err >&5
10119  echo "$as_me:10119: \$? = $ac_status" >&5
10120  (exit $ac_status); } >/dev/null; then
10121  if test -s conftest.err; then
10122    ac_cpp_err=$ac_c_preproc_warn_flag
10123  else
10124    ac_cpp_err=
10125  fi
10126else
10127  ac_cpp_err=yes
10128fi
10129if test -z "$ac_cpp_err"; then
10130  eval "$as_ac_Header=yes"
10131else
10132  echo "$as_me: failed program was:" >&5
10133  cat conftest.$ac_ext >&5
10134  eval "$as_ac_Header=no"
10135fi
10136rm -f conftest.err conftest.$ac_ext
10137fi
10138echo "$as_me:10138: result: `eval echo '${'$as_ac_Header'}'`" >&5
10139echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10140if test `eval echo '${'$as_ac_Header'}'` = yes; then
10141  cat >>confdefs.h <<EOF
10142#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10143EOF
10144
10145fi
10146done
10147
10148cat >>confdefs.h <<\EOF
10149#define NCURSES 1
10150EOF
10151
10152cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10153
10154cat >>confdefs.h <<EOF
10155#define $cf_nculib_ROOT 1
10156EOF
10157
10158cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
10159
10160else
10161
10162cf_ncuhdr_root=$use_ncurses
10163
10164test -n "$cf_cv_curses_dir" && \
10165test "$cf_cv_curses_dir" != "no" && { \
10166
10167if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10168  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10169  do
10170	while test $cf_add_incdir != /usr/include
10171	do
10172	  if test -d $cf_add_incdir
10173	  then
10174		cf_have_incdir=no
10175		if test -n "$CFLAGS$CPPFLAGS" ; then
10176		  # a loop is needed to ensure we can add subdirs of existing dirs
10177		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10178			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10179			  cf_have_incdir=yes; break
10180			fi
10181		  done
10182		fi
10183
10184		if test "$cf_have_incdir" = no ; then
10185		  if test "$cf_add_incdir" = /usr/local/include ; then
10186			if test "$GCC" = yes
10187			then
10188			  cf_save_CPPFLAGS=$CPPFLAGS
10189			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10190			  cat >conftest.$ac_ext <<_ACEOF
10191#line 10191 "configure"
10192#include "confdefs.h"
10193#include <stdio.h>
10194int
10195main ()
10196{
10197printf("Hello")
10198  ;
10199  return 0;
10200}
10201_ACEOF
10202rm -f conftest.$ac_objext
10203if { (eval echo "$as_me:10203: \"$ac_compile\"") >&5
10204  (eval $ac_compile) 2>&5
10205  ac_status=$?
10206  echo "$as_me:10206: \$? = $ac_status" >&5
10207  (exit $ac_status); } &&
10208         { ac_try='test -s conftest.$ac_objext'
10209  { (eval echo "$as_me:10209: \"$ac_try\"") >&5
10210  (eval $ac_try) 2>&5
10211  ac_status=$?
10212  echo "$as_me:10212: \$? = $ac_status" >&5
10213  (exit $ac_status); }; }; then
10214  :
10215else
10216  echo "$as_me: failed program was:" >&5
10217cat conftest.$ac_ext >&5
10218cf_have_incdir=yes
10219fi
10220rm -f conftest.$ac_objext conftest.$ac_ext
10221			  CPPFLAGS=$cf_save_CPPFLAGS
10222			fi
10223		  fi
10224		fi
10225
10226		if test "$cf_have_incdir" = no ; then
10227		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
10228
10229echo "${as_me:-configure}:10229: testing adding $cf_add_incdir to include-path ..." 1>&5
10230
10231		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10232
10233		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10234		  test "$cf_top_incdir" = "$cf_add_incdir" && break
10235		  cf_add_incdir="$cf_top_incdir"
10236		else
10237		  break
10238		fi
10239	  fi
10240	done
10241  done
10242fi
10243
10244}
10245
10246echo "$as_me:10246: checking for $cf_ncuhdr_root header in include-path" >&5
10247echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10248if test "${cf_cv_ncurses_h+set}" = set; then
10249  echo $ECHO_N "(cached) $ECHO_C" >&6
10250else
10251
10252	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10253	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
10254	for cf_header in $cf_header_list
10255	do
10256
10257	cat >conftest.$ac_ext <<_ACEOF
10258#line 10258 "configure"
10259#include "confdefs.h"
10260
10261#include <$cf_header>
10262int
10263main ()
10264{
10265
10266#ifdef NCURSES_VERSION
10267
10268printf("%s\n", NCURSES_VERSION);
10269#else
10270#ifdef __NCURSES_H
10271printf("old\n");
10272#else
10273	make an error
10274#endif
10275#endif
10276
10277  ;
10278  return 0;
10279}
10280_ACEOF
10281rm -f conftest.$ac_objext
10282if { (eval echo "$as_me:10282: \"$ac_compile\"") >&5
10283  (eval $ac_compile) 2>&5
10284  ac_status=$?
10285  echo "$as_me:10285: \$? = $ac_status" >&5
10286  (exit $ac_status); } &&
10287         { ac_try='test -s conftest.$ac_objext'
10288  { (eval echo "$as_me:10288: \"$ac_try\"") >&5
10289  (eval $ac_try) 2>&5
10290  ac_status=$?
10291  echo "$as_me:10291: \$? = $ac_status" >&5
10292  (exit $ac_status); }; }; then
10293  cf_cv_ncurses_h=$cf_header
10294
10295else
10296  echo "$as_me: failed program was:" >&5
10297cat conftest.$ac_ext >&5
10298cf_cv_ncurses_h=no
10299fi
10300rm -f conftest.$ac_objext conftest.$ac_ext
10301
10302		test "$cf_cv_ncurses_h" != no && break
10303	done
10304
10305fi
10306echo "$as_me:10306: result: $cf_cv_ncurses_h" >&5
10307echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10308
10309if test "$cf_cv_ncurses_h" != no ; then
10310	cf_cv_ncurses_header=$cf_cv_ncurses_h
10311else
10312
10313echo "$as_me:10313: checking for $cf_ncuhdr_root include-path" >&5
10314echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10315if test "${cf_cv_ncurses_h2+set}" = set; then
10316  echo $ECHO_N "(cached) $ECHO_C" >&6
10317else
10318
10319	test -n "$verbose" && echo
10320
10321cf_search=
10322
10323# collect the current set of include-directories from compiler flags
10324cf_header_path_list=""
10325if test -n "${CFLAGS}${CPPFLAGS}" ; then
10326	for cf_header_path in $CPPFLAGS $CFLAGS
10327	do
10328		case $cf_header_path in #(vi
10329		-I*)
10330			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10331
10332test "$cf_header_path" != "NONE" && \
10333test -d "$cf_header_path" && \
10334 {
10335	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
10336	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10337	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10338	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10339	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10340	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"
10341}
10342
10343			cf_header_path_list="$cf_header_path_list $cf_search"
10344			;;
10345		esac
10346	done
10347fi
10348
10349# add the variations for the package we are looking for
10350
10351cf_search=
10352
10353test "/usr" != "$prefix" && \
10354test -d "/usr" && \
10355(test $prefix = NONE || test "/usr" != "$prefix") && {
10356	test -n "$verbose" && echo "	... testing for include-directories under /usr"
10357	test -d /usr/include &&          cf_search="$cf_search /usr/include"
10358	test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
10359	test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
10360	test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
10361	test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10362}
10363
10364test "$prefix" != "NONE" && \
10365test -d "$prefix" && \
10366 {
10367	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
10368	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10369	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10370	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10371	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10372	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10373}
10374
10375test "/usr/local" != "$prefix" && \
10376test -d "/usr/local" && \
10377(test $prefix = NONE || test "/usr/local" != "$prefix") && {
10378	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
10379	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
10380	test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
10381	test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
10382	test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
10383	test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10384}
10385
10386test "/opt" != "$prefix" && \
10387test -d "/opt" && \
10388(test $prefix = NONE || test "/opt" != "$prefix") && {
10389	test -n "$verbose" && echo "	... testing for include-directories under /opt"
10390	test -d /opt/include &&          cf_search="$cf_search /opt/include"
10391	test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
10392	test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
10393	test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
10394	test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10395}
10396
10397test "$HOME" != "$prefix" && \
10398test -d "$HOME" && \
10399(test $prefix = NONE || test "$HOME" != "$prefix") && {
10400	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
10401	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
10402	test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
10403	test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
10404	test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
10405	test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10406}
10407
10408test "$includedir" != NONE && \
10409test "$includedir" != "/usr/include" && \
10410test -d "$includedir" && {
10411	test -d $includedir &&    cf_search="$cf_search $includedir"
10412	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10413}
10414
10415test "$oldincludedir" != NONE && \
10416test "$oldincludedir" != "/usr/include" && \
10417test -d "$oldincludedir" && {
10418	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10419	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10420}
10421
10422cf_search="$cf_search $cf_header_path_list"
10423
10424	test -n "$verbose" && echo search path $cf_search
10425	cf_save2_CPPFLAGS="$CPPFLAGS"
10426	for cf_incdir in $cf_search
10427	do
10428
10429if test -n "$cf_incdir" ; then
10430  for cf_add_incdir in $cf_incdir
10431  do
10432	while test $cf_add_incdir != /usr/include
10433	do
10434	  if test -d $cf_add_incdir
10435	  then
10436		cf_have_incdir=no
10437		if test -n "$CFLAGS$CPPFLAGS" ; then
10438		  # a loop is needed to ensure we can add subdirs of existing dirs
10439		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10440			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10441			  cf_have_incdir=yes; break
10442			fi
10443		  done
10444		fi
10445
10446		if test "$cf_have_incdir" = no ; then
10447		  if test "$cf_add_incdir" = /usr/local/include ; then
10448			if test "$GCC" = yes
10449			then
10450			  cf_save_CPPFLAGS=$CPPFLAGS
10451			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10452			  cat >conftest.$ac_ext <<_ACEOF
10453#line 10453 "configure"
10454#include "confdefs.h"
10455#include <stdio.h>
10456int
10457main ()
10458{
10459printf("Hello")
10460  ;
10461  return 0;
10462}
10463_ACEOF
10464rm -f conftest.$ac_objext
10465if { (eval echo "$as_me:10465: \"$ac_compile\"") >&5
10466  (eval $ac_compile) 2>&5
10467  ac_status=$?
10468  echo "$as_me:10468: \$? = $ac_status" >&5
10469  (exit $ac_status); } &&
10470         { ac_try='test -s conftest.$ac_objext'
10471  { (eval echo "$as_me:10471: \"$ac_try\"") >&5
10472  (eval $ac_try) 2>&5
10473  ac_status=$?
10474  echo "$as_me:10474: \$? = $ac_status" >&5
10475  (exit $ac_status); }; }; then
10476  :
10477else
10478  echo "$as_me: failed program was:" >&5
10479cat conftest.$ac_ext >&5
10480cf_have_incdir=yes
10481fi
10482rm -f conftest.$ac_objext conftest.$ac_ext
10483			  CPPFLAGS=$cf_save_CPPFLAGS
10484			fi
10485		  fi
10486		fi
10487
10488		if test "$cf_have_incdir" = no ; then
10489		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
10490
10491echo "${as_me:-configure}:10491: testing adding $cf_add_incdir to include-path ..." 1>&5
10492
10493		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10494
10495		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10496		  test "$cf_top_incdir" = "$cf_add_incdir" && break
10497		  cf_add_incdir="$cf_top_incdir"
10498		else
10499		  break
10500		fi
10501	  fi
10502	done
10503  done
10504fi
10505
10506		for cf_header in \
10507			ncurses.h \
10508			curses.h
10509		do
10510
10511	cat >conftest.$ac_ext <<_ACEOF
10512#line 10512 "configure"
10513#include "confdefs.h"
10514
10515#include <$cf_header>
10516int
10517main ()
10518{
10519
10520#ifdef NCURSES_VERSION
10521
10522printf("%s\n", NCURSES_VERSION);
10523#else
10524#ifdef __NCURSES_H
10525printf("old\n");
10526#else
10527	make an error
10528#endif
10529#endif
10530
10531  ;
10532  return 0;
10533}
10534_ACEOF
10535rm -f conftest.$ac_objext
10536if { (eval echo "$as_me:10536: \"$ac_compile\"") >&5
10537  (eval $ac_compile) 2>&5
10538  ac_status=$?
10539  echo "$as_me:10539: \$? = $ac_status" >&5
10540  (exit $ac_status); } &&
10541         { ac_try='test -s conftest.$ac_objext'
10542  { (eval echo "$as_me:10542: \"$ac_try\"") >&5
10543  (eval $ac_try) 2>&5
10544  ac_status=$?
10545  echo "$as_me:10545: \$? = $ac_status" >&5
10546  (exit $ac_status); }; }; then
10547  cf_cv_ncurses_h2=$cf_header
10548
10549else
10550  echo "$as_me: failed program was:" >&5
10551cat conftest.$ac_ext >&5
10552cf_cv_ncurses_h2=no
10553fi
10554rm -f conftest.$ac_objext conftest.$ac_ext
10555
10556			if test "$cf_cv_ncurses_h2" != no ; then
10557				cf_cv_ncurses_h2=$cf_incdir/$cf_header
10558				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
10559				break
10560			fi
10561			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
10562		done
10563		CPPFLAGS="$cf_save2_CPPFLAGS"
10564		test "$cf_cv_ncurses_h2" != no && break
10565	done
10566	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10566: error: not found" >&5
10567echo "$as_me: error: not found" >&2;}
10568   { (exit 1); exit 1; }; }
10569
10570fi
10571echo "$as_me:10571: result: $cf_cv_ncurses_h2" >&5
10572echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10573
10574	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10575	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10576	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10577		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10578	fi
10579
10580if test -n "$cf_1st_incdir" ; then
10581  for cf_add_incdir in $cf_1st_incdir
10582  do
10583	while test $cf_add_incdir != /usr/include
10584	do
10585	  if test -d $cf_add_incdir
10586	  then
10587		cf_have_incdir=no
10588		if test -n "$CFLAGS$CPPFLAGS" ; then
10589		  # a loop is needed to ensure we can add subdirs of existing dirs
10590		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10591			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10592			  cf_have_incdir=yes; break
10593			fi
10594		  done
10595		fi
10596
10597		if test "$cf_have_incdir" = no ; then
10598		  if test "$cf_add_incdir" = /usr/local/include ; then
10599			if test "$GCC" = yes
10600			then
10601			  cf_save_CPPFLAGS=$CPPFLAGS
10602			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10603			  cat >conftest.$ac_ext <<_ACEOF
10604#line 10604 "configure"
10605#include "confdefs.h"
10606#include <stdio.h>
10607int
10608main ()
10609{
10610printf("Hello")
10611  ;
10612  return 0;
10613}
10614_ACEOF
10615rm -f conftest.$ac_objext
10616if { (eval echo "$as_me:10616: \"$ac_compile\"") >&5
10617  (eval $ac_compile) 2>&5
10618  ac_status=$?
10619  echo "$as_me:10619: \$? = $ac_status" >&5
10620  (exit $ac_status); } &&
10621         { ac_try='test -s conftest.$ac_objext'
10622  { (eval echo "$as_me:10622: \"$ac_try\"") >&5
10623  (eval $ac_try) 2>&5
10624  ac_status=$?
10625  echo "$as_me:10625: \$? = $ac_status" >&5
10626  (exit $ac_status); }; }; then
10627  :
10628else
10629  echo "$as_me: failed program was:" >&5
10630cat conftest.$ac_ext >&5
10631cf_have_incdir=yes
10632fi
10633rm -f conftest.$ac_objext conftest.$ac_ext
10634			  CPPFLAGS=$cf_save_CPPFLAGS
10635			fi
10636		  fi
10637		fi
10638
10639		if test "$cf_have_incdir" = no ; then
10640		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
10641
10642echo "${as_me:-configure}:10642: testing adding $cf_add_incdir to include-path ..." 1>&5
10643
10644		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10645
10646		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10647		  test "$cf_top_incdir" = "$cf_add_incdir" && break
10648		  cf_add_incdir="$cf_top_incdir"
10649		else
10650		  break
10651		fi
10652	  fi
10653	done
10654  done
10655fi
10656
10657fi
10658
10659# Set definitions to allow ifdef'ing for ncurses.h
10660
10661case $cf_cv_ncurses_header in # (vi
10662*ncurses.h)
10663
10664cat >>confdefs.h <<\EOF
10665#define HAVE_NCURSES_H 1
10666EOF
10667
10668	;;
10669esac
10670
10671case $cf_cv_ncurses_header in # (vi
10672ncurses/curses.h|ncurses/ncurses.h)
10673
10674cat >>confdefs.h <<\EOF
10675#define HAVE_NCURSES_NCURSES_H 1
10676EOF
10677
10678	;;
10679ncursesw/curses.h|ncursesw/ncurses.h)
10680
10681cat >>confdefs.h <<\EOF
10682#define HAVE_NCURSESW_NCURSES_H 1
10683EOF
10684
10685	;;
10686esac
10687
10688echo "$as_me:10688: checking for terminfo header" >&5
10689echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10690if test "${cf_cv_term_header+set}" = set; then
10691  echo $ECHO_N "(cached) $ECHO_C" >&6
10692else
10693
10694case ${cf_cv_ncurses_header} in #(vi
10695*/ncurses.h|*/ncursesw.h) #(vi
10696	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10697	;;
10698*)
10699	cf_term_header=term.h
10700	;;
10701esac
10702
10703for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10704do
10705cat >conftest.$ac_ext <<_ACEOF
10706#line 10706 "configure"
10707#include "confdefs.h"
10708#include <stdio.h>
10709#include <${cf_cv_ncurses_header:-curses.h}>
10710#include <$cf_test>
10711
10712int
10713main ()
10714{
10715int x = auto_left_margin
10716  ;
10717  return 0;
10718}
10719_ACEOF
10720rm -f conftest.$ac_objext
10721if { (eval echo "$as_me:10721: \"$ac_compile\"") >&5
10722  (eval $ac_compile) 2>&5
10723  ac_status=$?
10724  echo "$as_me:10724: \$? = $ac_status" >&5
10725  (exit $ac_status); } &&
10726         { ac_try='test -s conftest.$ac_objext'
10727  { (eval echo "$as_me:10727: \"$ac_try\"") >&5
10728  (eval $ac_try) 2>&5
10729  ac_status=$?
10730  echo "$as_me:10730: \$? = $ac_status" >&5
10731  (exit $ac_status); }; }; then
10732
10733	cf_cv_term_header="$cf_test"
10734else
10735  echo "$as_me: failed program was:" >&5
10736cat conftest.$ac_ext >&5
10737
10738	cf_cv_term_header=unknown
10739
10740fi
10741rm -f conftest.$ac_objext conftest.$ac_ext
10742	test "$cf_cv_term_header" != unknown && break
10743done
10744
10745fi
10746echo "$as_me:10746: result: $cf_cv_term_header" >&5
10747echo "${ECHO_T}$cf_cv_term_header" >&6
10748
10749# Set definitions to allow ifdef'ing to accommodate subdirectories
10750
10751case $cf_cv_term_header in # (vi
10752*term.h)
10753
10754cat >>confdefs.h <<\EOF
10755#define HAVE_TERM_H 1
10756EOF
10757
10758	;;
10759esac
10760
10761case $cf_cv_term_header in # (vi
10762ncurses/term.h) #(vi
10763
10764cat >>confdefs.h <<\EOF
10765#define HAVE_NCURSES_TERM_H 1
10766EOF
10767
10768	;;
10769ncursesw/term.h)
10770
10771cat >>confdefs.h <<\EOF
10772#define HAVE_NCURSESW_TERM_H 1
10773EOF
10774
10775	;;
10776esac
10777
10778# some applications need this, but should check for NCURSES_VERSION
10779
10780cat >>confdefs.h <<\EOF
10781#define NCURSES 1
10782EOF
10783
10784echo "$as_me:10784: checking for ncurses version" >&5
10785echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10786if test "${cf_cv_ncurses_version+set}" = set; then
10787  echo $ECHO_N "(cached) $ECHO_C" >&6
10788else
10789
10790	cf_cv_ncurses_version=no
10791	cf_tempfile=out$$
10792	rm -f $cf_tempfile
10793	if test "$cross_compiling" = yes; then
10794
10795	# This will not work if the preprocessor splits the line after the
10796	# Autoconf token.  The 'unproto' program does that.
10797	cat > conftest.$ac_ext <<EOF
10798#include <${cf_cv_ncurses_header:-curses.h}>
10799#undef Autoconf
10800#ifdef NCURSES_VERSION
10801Autoconf NCURSES_VERSION
10802#else
10803#ifdef __NCURSES_H
10804Autoconf "old"
10805#endif
10806;
10807#endif
10808EOF
10809	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10810	{ (eval echo "$as_me:10810: \"$cf_try\"") >&5
10811  (eval $cf_try) 2>&5
10812  ac_status=$?
10813  echo "$as_me:10813: \$? = $ac_status" >&5
10814  (exit $ac_status); }
10815	if test -f conftest.out ; then
10816		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10817		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10818		rm -f conftest.out
10819	fi
10820
10821else
10822  cat >conftest.$ac_ext <<_ACEOF
10823#line 10823 "configure"
10824#include "confdefs.h"
10825
10826#include <${cf_cv_ncurses_header:-curses.h}>
10827#include <stdio.h>
10828int main()
10829{
10830	FILE *fp = fopen("$cf_tempfile", "w");
10831#ifdef NCURSES_VERSION
10832# ifdef NCURSES_VERSION_PATCH
10833	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10834# else
10835	fprintf(fp, "%s\n", NCURSES_VERSION);
10836# endif
10837#else
10838# ifdef __NCURSES_H
10839	fprintf(fp, "old\n");
10840# else
10841	make an error
10842# endif
10843#endif
10844	${cf_cv_main_return:-return}(0);
10845}
10846_ACEOF
10847rm -f conftest$ac_exeext
10848if { (eval echo "$as_me:10848: \"$ac_link\"") >&5
10849  (eval $ac_link) 2>&5
10850  ac_status=$?
10851  echo "$as_me:10851: \$? = $ac_status" >&5
10852  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10853  { (eval echo "$as_me:10853: \"$ac_try\"") >&5
10854  (eval $ac_try) 2>&5
10855  ac_status=$?
10856  echo "$as_me:10856: \$? = $ac_status" >&5
10857  (exit $ac_status); }; }; then
10858
10859	cf_cv_ncurses_version=`cat $cf_tempfile`
10860else
10861  echo "$as_me: program exited with status $ac_status" >&5
10862echo "$as_me: failed program was:" >&5
10863cat conftest.$ac_ext >&5
10864fi
10865rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10866fi
10867	rm -f $cf_tempfile
10868
10869fi
10870echo "$as_me:10870: result: $cf_cv_ncurses_version" >&5
10871echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10872test "$cf_cv_ncurses_version" = no ||
10873cat >>confdefs.h <<\EOF
10874#define NCURSES 1
10875EOF
10876
10877cf_nculib_root=$use_ncurses
10878	# This works, except for the special case where we find gpm, but
10879	# ncurses is in a nonstandard location via $LIBS, and we really want
10880	# to link gpm.
10881cf_ncurses_LIBS=""
10882cf_ncurses_SAVE="$LIBS"
10883echo "$as_me:10883: checking for Gpm_Open in -lgpm" >&5
10884echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10885if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10886  echo $ECHO_N "(cached) $ECHO_C" >&6
10887else
10888  ac_check_lib_save_LIBS=$LIBS
10889LIBS="-lgpm  $LIBS"
10890cat >conftest.$ac_ext <<_ACEOF
10891#line 10891 "configure"
10892#include "confdefs.h"
10893
10894/* Override any gcc2 internal prototype to avoid an error.  */
10895#ifdef __cplusplus
10896extern "C"
10897#endif
10898/* We use char because int might match the return type of a gcc2
10899   builtin and then its argument prototype would still apply.  */
10900char Gpm_Open ();
10901int
10902main ()
10903{
10904Gpm_Open ();
10905  ;
10906  return 0;
10907}
10908_ACEOF
10909rm -f conftest.$ac_objext conftest$ac_exeext
10910if { (eval echo "$as_me:10910: \"$ac_link\"") >&5
10911  (eval $ac_link) 2>&5
10912  ac_status=$?
10913  echo "$as_me:10913: \$? = $ac_status" >&5
10914  (exit $ac_status); } &&
10915         { ac_try='test -s conftest$ac_exeext'
10916  { (eval echo "$as_me:10916: \"$ac_try\"") >&5
10917  (eval $ac_try) 2>&5
10918  ac_status=$?
10919  echo "$as_me:10919: \$? = $ac_status" >&5
10920  (exit $ac_status); }; }; then
10921  ac_cv_lib_gpm_Gpm_Open=yes
10922else
10923  echo "$as_me: failed program was:" >&5
10924cat conftest.$ac_ext >&5
10925ac_cv_lib_gpm_Gpm_Open=no
10926fi
10927rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10928LIBS=$ac_check_lib_save_LIBS
10929fi
10930echo "$as_me:10930: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10931echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10932if test $ac_cv_lib_gpm_Gpm_Open = yes; then
10933  echo "$as_me:10933: checking for initscr in -lgpm" >&5
10934echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10935if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10936  echo $ECHO_N "(cached) $ECHO_C" >&6
10937else
10938  ac_check_lib_save_LIBS=$LIBS
10939LIBS="-lgpm  $LIBS"
10940cat >conftest.$ac_ext <<_ACEOF
10941#line 10941 "configure"
10942#include "confdefs.h"
10943
10944/* Override any gcc2 internal prototype to avoid an error.  */
10945#ifdef __cplusplus
10946extern "C"
10947#endif
10948/* We use char because int might match the return type of a gcc2
10949   builtin and then its argument prototype would still apply.  */
10950char initscr ();
10951int
10952main ()
10953{
10954initscr ();
10955  ;
10956  return 0;
10957}
10958_ACEOF
10959rm -f conftest.$ac_objext conftest$ac_exeext
10960if { (eval echo "$as_me:10960: \"$ac_link\"") >&5
10961  (eval $ac_link) 2>&5
10962  ac_status=$?
10963  echo "$as_me:10963: \$? = $ac_status" >&5
10964  (exit $ac_status); } &&
10965         { ac_try='test -s conftest$ac_exeext'
10966  { (eval echo "$as_me:10966: \"$ac_try\"") >&5
10967  (eval $ac_try) 2>&5
10968  ac_status=$?
10969  echo "$as_me:10969: \$? = $ac_status" >&5
10970  (exit $ac_status); }; }; then
10971  ac_cv_lib_gpm_initscr=yes
10972else
10973  echo "$as_me: failed program was:" >&5
10974cat conftest.$ac_ext >&5
10975ac_cv_lib_gpm_initscr=no
10976fi
10977rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10978LIBS=$ac_check_lib_save_LIBS
10979fi
10980echo "$as_me:10980: result: $ac_cv_lib_gpm_initscr" >&5
10981echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10982if test $ac_cv_lib_gpm_initscr = yes; then
10983  LIBS="$cf_ncurses_SAVE"
10984else
10985  cf_ncurses_LIBS="-lgpm"
10986fi
10987
10988fi
10989
10990case $host_os in #(vi
10991freebsd*)
10992	# This is only necessary if you are linking against an obsolete
10993	# version of ncurses (but it should do no harm, since it's static).
10994	if test "$cf_nculib_root" = ncurses ; then
10995		echo "$as_me:10995: checking for tgoto in -lmytinfo" >&5
10996echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10997if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10998  echo $ECHO_N "(cached) $ECHO_C" >&6
10999else
11000  ac_check_lib_save_LIBS=$LIBS
11001LIBS="-lmytinfo  $LIBS"
11002cat >conftest.$ac_ext <<_ACEOF
11003#line 11003 "configure"
11004#include "confdefs.h"
11005
11006/* Override any gcc2 internal prototype to avoid an error.  */
11007#ifdef __cplusplus
11008extern "C"
11009#endif
11010/* We use char because int might match the return type of a gcc2
11011   builtin and then its argument prototype would still apply.  */
11012char tgoto ();
11013int
11014main ()
11015{
11016tgoto ();
11017  ;
11018  return 0;
11019}
11020_ACEOF
11021rm -f conftest.$ac_objext conftest$ac_exeext
11022if { (eval echo "$as_me:11022: \"$ac_link\"") >&5
11023  (eval $ac_link) 2>&5
11024  ac_status=$?
11025  echo "$as_me:11025: \$? = $ac_status" >&5
11026  (exit $ac_status); } &&
11027         { ac_try='test -s conftest$ac_exeext'
11028  { (eval echo "$as_me:11028: \"$ac_try\"") >&5
11029  (eval $ac_try) 2>&5
11030  ac_status=$?
11031  echo "$as_me:11031: \$? = $ac_status" >&5
11032  (exit $ac_status); }; }; then
11033  ac_cv_lib_mytinfo_tgoto=yes
11034else
11035  echo "$as_me: failed program was:" >&5
11036cat conftest.$ac_ext >&5
11037ac_cv_lib_mytinfo_tgoto=no
11038fi
11039rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11040LIBS=$ac_check_lib_save_LIBS
11041fi
11042echo "$as_me:11042: result: $ac_cv_lib_mytinfo_tgoto" >&5
11043echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11044if test $ac_cv_lib_mytinfo_tgoto = yes; then
11045  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11046fi
11047
11048	fi
11049	;;
11050esac
11051
11052LIBS="$cf_ncurses_LIBS $LIBS"
11053
11054if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
11055then
11056	LIBS="-l$cf_nculib_root $LIBS"
11057else
11058
11059	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
11060	cf_libdir=""
11061	echo "$as_me:11061: checking for initscr" >&5
11062echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11063if test "${ac_cv_func_initscr+set}" = set; then
11064  echo $ECHO_N "(cached) $ECHO_C" >&6
11065else
11066  cat >conftest.$ac_ext <<_ACEOF
11067#line 11067 "configure"
11068#include "confdefs.h"
11069/* System header to define __stub macros and hopefully few prototypes,
11070    which can conflict with char initscr (); below.  */
11071#include <assert.h>
11072/* Override any gcc2 internal prototype to avoid an error.  */
11073#ifdef __cplusplus
11074extern "C"
11075#endif
11076/* We use char because int might match the return type of a gcc2
11077   builtin and then its argument prototype would still apply.  */
11078char initscr ();
11079char (*f) ();
11080
11081int
11082main ()
11083{
11084/* The GNU C library defines this for functions which it implements
11085    to always fail with ENOSYS.  Some functions are actually named
11086    something starting with __ and the normal name is an alias.  */
11087#if defined (__stub_initscr) || defined (__stub___initscr)
11088choke me
11089#else
11090f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11091#endif
11092
11093  ;
11094  return 0;
11095}
11096_ACEOF
11097rm -f conftest.$ac_objext conftest$ac_exeext
11098if { (eval echo "$as_me:11098: \"$ac_link\"") >&5
11099  (eval $ac_link) 2>&5
11100  ac_status=$?
11101  echo "$as_me:11101: \$? = $ac_status" >&5
11102  (exit $ac_status); } &&
11103         { ac_try='test -s conftest$ac_exeext'
11104  { (eval echo "$as_me:11104: \"$ac_try\"") >&5
11105  (eval $ac_try) 2>&5
11106  ac_status=$?
11107  echo "$as_me:11107: \$? = $ac_status" >&5
11108  (exit $ac_status); }; }; then
11109  ac_cv_func_initscr=yes
11110else
11111  echo "$as_me: failed program was:" >&5
11112cat conftest.$ac_ext >&5
11113ac_cv_func_initscr=no
11114fi
11115rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11116fi
11117echo "$as_me:11117: result: $ac_cv_func_initscr" >&5
11118echo "${ECHO_T}$ac_cv_func_initscr" >&6
11119if test $ac_cv_func_initscr = yes; then
11120  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11121else
11122
11123		cf_save_LIBS="$LIBS"
11124		echo "$as_me:11124: checking for initscr in -l$cf_nculib_root" >&5
11125echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11126		LIBS="-l$cf_nculib_root $LIBS"
11127		cat >conftest.$ac_ext <<_ACEOF
11128#line 11128 "configure"
11129#include "confdefs.h"
11130#include <${cf_cv_ncurses_header:-curses.h}>
11131int
11132main ()
11133{
11134initscr()
11135  ;
11136  return 0;
11137}
11138_ACEOF
11139rm -f conftest.$ac_objext conftest$ac_exeext
11140if { (eval echo "$as_me:11140: \"$ac_link\"") >&5
11141  (eval $ac_link) 2>&5
11142  ac_status=$?
11143  echo "$as_me:11143: \$? = $ac_status" >&5
11144  (exit $ac_status); } &&
11145         { ac_try='test -s conftest$ac_exeext'
11146  { (eval echo "$as_me:11146: \"$ac_try\"") >&5
11147  (eval $ac_try) 2>&5
11148  ac_status=$?
11149  echo "$as_me:11149: \$? = $ac_status" >&5
11150  (exit $ac_status); }; }; then
11151  echo "$as_me:11151: result: yes" >&5
11152echo "${ECHO_T}yes" >&6
11153			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11154
11155else
11156  echo "$as_me: failed program was:" >&5
11157cat conftest.$ac_ext >&5
11158echo "$as_me:11158: result: no" >&5
11159echo "${ECHO_T}no" >&6
11160
11161cf_search=
11162cf_library_path_list=""
11163if test -n "${LDFLAGS}${LIBS}" ; then
11164	for cf_library_path in $LDFLAGS $LIBS
11165	do
11166		case $cf_library_path in #(vi
11167		-L*)
11168			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11169
11170test "$cf_library_path" != "NONE" && \
11171test -d "$cf_library_path" && \
11172 {
11173	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
11174	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11175	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11176	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11177	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11178	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"
11179}
11180
11181			cf_library_path_list="$cf_library_path_list $cf_search"
11182			;;
11183		esac
11184	done
11185fi
11186
11187cf_search=
11188
11189test "/usr" != "$prefix" && \
11190test -d "/usr" && \
11191(test $prefix = NONE || test "/usr" != "$prefix") && {
11192	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
11193	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
11194	test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
11195	test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
11196	test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
11197	test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
11198}
11199
11200test "$prefix" != "NONE" && \
11201test -d "$prefix" && \
11202 {
11203	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
11204	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11205	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11206	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11207	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11208	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11209}
11210
11211test "/usr/local" != "$prefix" && \
11212test -d "/usr/local" && \
11213(test $prefix = NONE || test "/usr/local" != "$prefix") && {
11214	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
11215	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
11216	test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
11217	test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
11218	test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
11219	test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
11220}
11221
11222test "/opt" != "$prefix" && \
11223test -d "/opt" && \
11224(test $prefix = NONE || test "/opt" != "$prefix") && {
11225	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
11226	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
11227	test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
11228	test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
11229	test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
11230	test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
11231}
11232
11233test "$HOME" != "$prefix" && \
11234test -d "$HOME" && \
11235(test $prefix = NONE || test "$HOME" != "$prefix") && {
11236	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
11237	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
11238	test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
11239	test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
11240	test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
11241	test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
11242}
11243
11244cf_search="$cf_library_path_list $cf_search"
11245
11246			for cf_libdir in $cf_search
11247			do
11248				echo "$as_me:11248: checking for -l$cf_nculib_root in $cf_libdir" >&5
11249echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11250				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11251				cat >conftest.$ac_ext <<_ACEOF
11252#line 11252 "configure"
11253#include "confdefs.h"
11254#include <${cf_cv_ncurses_header:-curses.h}>
11255int
11256main ()
11257{
11258initscr()
11259  ;
11260  return 0;
11261}
11262_ACEOF
11263rm -f conftest.$ac_objext conftest$ac_exeext
11264if { (eval echo "$as_me:11264: \"$ac_link\"") >&5
11265  (eval $ac_link) 2>&5
11266  ac_status=$?
11267  echo "$as_me:11267: \$? = $ac_status" >&5
11268  (exit $ac_status); } &&
11269         { ac_try='test -s conftest$ac_exeext'
11270  { (eval echo "$as_me:11270: \"$ac_try\"") >&5
11271  (eval $ac_try) 2>&5
11272  ac_status=$?
11273  echo "$as_me:11273: \$? = $ac_status" >&5
11274  (exit $ac_status); }; }; then
11275  echo "$as_me:11275: result: yes" >&5
11276echo "${ECHO_T}yes" >&6
11277			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
11278					 break
11279else
11280  echo "$as_me: failed program was:" >&5
11281cat conftest.$ac_ext >&5
11282echo "$as_me:11282: result: no" >&5
11283echo "${ECHO_T}no" >&6
11284					 LIBS="$cf_save_LIBS"
11285fi
11286rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11287			done
11288
11289fi
11290rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11291
11292fi
11293
11294eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
11295
11296if test $cf_found_library = no ; then
11297	{ { echo "$as_me:11297: error: Cannot link $cf_nculib_root library" >&5
11298echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11299   { (exit 1); exit 1; }; }
11300fi
11301
11302fi
11303
11304if test -n "$cf_ncurses_LIBS" ; then
11305	echo "$as_me:11305: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11306echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11307	cf_ncurses_SAVE="$LIBS"
11308	for p in $cf_ncurses_LIBS ; do
11309		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
11310		if test "$q" != "$LIBS" ; then
11311			LIBS="$q"
11312		fi
11313	done
11314	cat >conftest.$ac_ext <<_ACEOF
11315#line 11315 "configure"
11316#include "confdefs.h"
11317#include <${cf_cv_ncurses_header:-curses.h}>
11318int
11319main ()
11320{
11321initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
11322  ;
11323  return 0;
11324}
11325_ACEOF
11326rm -f conftest.$ac_objext conftest$ac_exeext
11327if { (eval echo "$as_me:11327: \"$ac_link\"") >&5
11328  (eval $ac_link) 2>&5
11329  ac_status=$?
11330  echo "$as_me:11330: \$? = $ac_status" >&5
11331  (exit $ac_status); } &&
11332         { ac_try='test -s conftest$ac_exeext'
11333  { (eval echo "$as_me:11333: \"$ac_try\"") >&5
11334  (eval $ac_try) 2>&5
11335  ac_status=$?
11336  echo "$as_me:11336: \$? = $ac_status" >&5
11337  (exit $ac_status); }; }; then
11338  echo "$as_me:11338: result: yes" >&5
11339echo "${ECHO_T}yes" >&6
11340else
11341  echo "$as_me: failed program was:" >&5
11342cat conftest.$ac_ext >&5
11343echo "$as_me:11343: result: no" >&5
11344echo "${ECHO_T}no" >&6
11345		 LIBS="$cf_ncurses_SAVE"
11346fi
11347rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11348fi
11349
11350cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11351
11352cat >>confdefs.h <<EOF
11353#define $cf_nculib_ROOT 1
11354EOF
11355
11356fi
11357
11358else
11359	cf_wide_curses=no
11360
11361echo "$as_me:11361: checking for extra include directories" >&5
11362echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
11363if test "${cf_cv_curses_incdir+set}" = set; then
11364  echo $ECHO_N "(cached) $ECHO_C" >&6
11365else
11366
11367cf_cv_curses_incdir=no
11368case $host_os in #(vi
11369hpux10.*) #(vi
11370	if test "x$cf_cv_screen" = "xcurses_colr"
11371	then
11372		test -d /usr/include/curses_colr && \
11373		cf_cv_curses_incdir="-I/usr/include/curses_colr"
11374	fi
11375	;;
11376sunos3*|sunos4*)
11377	if test "x$cf_cv_screen" = "xcurses_5lib"
11378	then
11379		test -d /usr/5lib && \
11380		test -d /usr/5include && \
11381		cf_cv_curses_incdir="-I/usr/5include"
11382	fi
11383	;;
11384esac
11385
11386fi
11387echo "$as_me:11387: result: $cf_cv_curses_incdir" >&5
11388echo "${ECHO_T}$cf_cv_curses_incdir" >&6
11389test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
11390
11391echo "$as_me:11391: checking if we have identified curses headers" >&5
11392echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
11393if test "${cf_cv_ncurses_header+set}" = set; then
11394  echo $ECHO_N "(cached) $ECHO_C" >&6
11395else
11396
11397cf_cv_ncurses_header=none
11398for cf_header in  \
11399	ncurses.h \
11400	curses.h ncurses/ncurses.h ncurses/curses.h
11401do
11402cat >conftest.$ac_ext <<_ACEOF
11403#line 11403 "configure"
11404#include "confdefs.h"
11405#include <${cf_header}>
11406int
11407main ()
11408{
11409initscr(); tgoto("?", 0,0)
11410  ;
11411  return 0;
11412}
11413_ACEOF
11414rm -f conftest.$ac_objext
11415if { (eval echo "$as_me:11415: \"$ac_compile\"") >&5
11416  (eval $ac_compile) 2>&5
11417  ac_status=$?
11418  echo "$as_me:11418: \$? = $ac_status" >&5
11419  (exit $ac_status); } &&
11420         { ac_try='test -s conftest.$ac_objext'
11421  { (eval echo "$as_me:11421: \"$ac_try\"") >&5
11422  (eval $ac_try) 2>&5
11423  ac_status=$?
11424  echo "$as_me:11424: \$? = $ac_status" >&5
11425  (exit $ac_status); }; }; then
11426  cf_cv_ncurses_header=$cf_header; break
11427else
11428  echo "$as_me: failed program was:" >&5
11429cat conftest.$ac_ext >&5
11430fi
11431rm -f conftest.$ac_objext conftest.$ac_ext
11432done
11433
11434fi
11435echo "$as_me:11435: result: $cf_cv_ncurses_header" >&5
11436echo "${ECHO_T}$cf_cv_ncurses_header" >&6
11437
11438if test "$cf_cv_ncurses_header" = none ; then
11439	{ { echo "$as_me:11439: error: No curses header-files found" >&5
11440echo "$as_me: error: No curses header-files found" >&2;}
11441   { (exit 1); exit 1; }; }
11442fi
11443
11444# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
11445
11446for ac_header in $cf_cv_ncurses_header
11447do
11448as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11449echo "$as_me:11449: checking for $ac_header" >&5
11450echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11451if eval "test \"\${$as_ac_Header+set}\" = set"; then
11452  echo $ECHO_N "(cached) $ECHO_C" >&6
11453else
11454  cat >conftest.$ac_ext <<_ACEOF
11455#line 11455 "configure"
11456#include "confdefs.h"
11457#include <$ac_header>
11458_ACEOF
11459if { (eval echo "$as_me:11459: \"$ac_cpp conftest.$ac_ext\"") >&5
11460  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11461  ac_status=$?
11462  egrep -v '^ *\+' conftest.er1 >conftest.err
11463  rm -f conftest.er1
11464  cat conftest.err >&5
11465  echo "$as_me:11465: \$? = $ac_status" >&5
11466  (exit $ac_status); } >/dev/null; then
11467  if test -s conftest.err; then
11468    ac_cpp_err=$ac_c_preproc_warn_flag
11469  else
11470    ac_cpp_err=
11471  fi
11472else
11473  ac_cpp_err=yes
11474fi
11475if test -z "$ac_cpp_err"; then
11476  eval "$as_ac_Header=yes"
11477else
11478  echo "$as_me: failed program was:" >&5
11479  cat conftest.$ac_ext >&5
11480  eval "$as_ac_Header=no"
11481fi
11482rm -f conftest.err conftest.$ac_ext
11483fi
11484echo "$as_me:11484: result: `eval echo '${'$as_ac_Header'}'`" >&5
11485echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11486if test `eval echo '${'$as_ac_Header'}'` = yes; then
11487  cat >>confdefs.h <<EOF
11488#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11489EOF
11490
11491fi
11492done
11493
11494echo "$as_me:11494: checking for terminfo header" >&5
11495echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11496if test "${cf_cv_term_header+set}" = set; then
11497  echo $ECHO_N "(cached) $ECHO_C" >&6
11498else
11499
11500case ${cf_cv_ncurses_header} in #(vi
11501*/ncurses.h|*/ncursesw.h) #(vi
11502	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11503	;;
11504*)
11505	cf_term_header=term.h
11506	;;
11507esac
11508
11509for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11510do
11511cat >conftest.$ac_ext <<_ACEOF
11512#line 11512 "configure"
11513#include "confdefs.h"
11514#include <stdio.h>
11515#include <${cf_cv_ncurses_header:-curses.h}>
11516#include <$cf_test>
11517
11518int
11519main ()
11520{
11521int x = auto_left_margin
11522  ;
11523  return 0;
11524}
11525_ACEOF
11526rm -f conftest.$ac_objext
11527if { (eval echo "$as_me:11527: \"$ac_compile\"") >&5
11528  (eval $ac_compile) 2>&5
11529  ac_status=$?
11530  echo "$as_me:11530: \$? = $ac_status" >&5
11531  (exit $ac_status); } &&
11532         { ac_try='test -s conftest.$ac_objext'
11533  { (eval echo "$as_me:11533: \"$ac_try\"") >&5
11534  (eval $ac_try) 2>&5
11535  ac_status=$?
11536  echo "$as_me:11536: \$? = $ac_status" >&5
11537  (exit $ac_status); }; }; then
11538
11539	cf_cv_term_header="$cf_test"
11540else
11541  echo "$as_me: failed program was:" >&5
11542cat conftest.$ac_ext >&5
11543
11544	cf_cv_term_header=unknown
11545
11546fi
11547rm -f conftest.$ac_objext conftest.$ac_ext
11548	test "$cf_cv_term_header" != unknown && break
11549done
11550
11551fi
11552echo "$as_me:11552: result: $cf_cv_term_header" >&5
11553echo "${ECHO_T}$cf_cv_term_header" >&6
11554
11555# Set definitions to allow ifdef'ing to accommodate subdirectories
11556
11557case $cf_cv_term_header in # (vi
11558*term.h)
11559
11560cat >>confdefs.h <<\EOF
11561#define HAVE_TERM_H 1
11562EOF
11563
11564	;;
11565esac
11566
11567case $cf_cv_term_header in # (vi
11568ncurses/term.h) #(vi
11569
11570cat >>confdefs.h <<\EOF
11571#define HAVE_NCURSES_TERM_H 1
11572EOF
11573
11574	;;
11575ncursesw/term.h)
11576
11577cat >>confdefs.h <<\EOF
11578#define HAVE_NCURSESW_TERM_H 1
11579EOF
11580
11581	;;
11582esac
11583
11584echo "$as_me:11584: checking for ncurses version" >&5
11585echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11586if test "${cf_cv_ncurses_version+set}" = set; then
11587  echo $ECHO_N "(cached) $ECHO_C" >&6
11588else
11589
11590	cf_cv_ncurses_version=no
11591	cf_tempfile=out$$
11592	rm -f $cf_tempfile
11593	if test "$cross_compiling" = yes; then
11594
11595	# This will not work if the preprocessor splits the line after the
11596	# Autoconf token.  The 'unproto' program does that.
11597	cat > conftest.$ac_ext <<EOF
11598#include <${cf_cv_ncurses_header:-curses.h}>
11599#undef Autoconf
11600#ifdef NCURSES_VERSION
11601Autoconf NCURSES_VERSION
11602#else
11603#ifdef __NCURSES_H
11604Autoconf "old"
11605#endif
11606;
11607#endif
11608EOF
11609	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11610	{ (eval echo "$as_me:11610: \"$cf_try\"") >&5
11611  (eval $cf_try) 2>&5
11612  ac_status=$?
11613  echo "$as_me:11613: \$? = $ac_status" >&5
11614  (exit $ac_status); }
11615	if test -f conftest.out ; then
11616		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
11617		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11618		rm -f conftest.out
11619	fi
11620
11621else
11622  cat >conftest.$ac_ext <<_ACEOF
11623#line 11623 "configure"
11624#include "confdefs.h"
11625
11626#include <${cf_cv_ncurses_header:-curses.h}>
11627#include <stdio.h>
11628int main()
11629{
11630	FILE *fp = fopen("$cf_tempfile", "w");
11631#ifdef NCURSES_VERSION
11632# ifdef NCURSES_VERSION_PATCH
11633	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11634# else
11635	fprintf(fp, "%s\n", NCURSES_VERSION);
11636# endif
11637#else
11638# ifdef __NCURSES_H
11639	fprintf(fp, "old\n");
11640# else
11641	make an error
11642# endif
11643#endif
11644	${cf_cv_main_return:-return}(0);
11645}
11646_ACEOF
11647rm -f conftest$ac_exeext
11648if { (eval echo "$as_me:11648: \"$ac_link\"") >&5
11649  (eval $ac_link) 2>&5
11650  ac_status=$?
11651  echo "$as_me:11651: \$? = $ac_status" >&5
11652  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11653  { (eval echo "$as_me:11653: \"$ac_try\"") >&5
11654  (eval $ac_try) 2>&5
11655  ac_status=$?
11656  echo "$as_me:11656: \$? = $ac_status" >&5
11657  (exit $ac_status); }; }; then
11658
11659	cf_cv_ncurses_version=`cat $cf_tempfile`
11660else
11661  echo "$as_me: program exited with status $ac_status" >&5
11662echo "$as_me: failed program was:" >&5
11663cat conftest.$ac_ext >&5
11664fi
11665rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11666fi
11667	rm -f $cf_tempfile
11668
11669fi
11670echo "$as_me:11670: result: $cf_cv_ncurses_version" >&5
11671echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11672test "$cf_cv_ncurses_version" = no ||
11673cat >>confdefs.h <<\EOF
11674#define NCURSES 1
11675EOF
11676
11677echo "$as_me:11677: checking if we have identified curses libraries" >&5
11678echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
11679cat >conftest.$ac_ext <<_ACEOF
11680#line 11680 "configure"
11681#include "confdefs.h"
11682#include <${cf_cv_ncurses_header:-curses.h}>
11683int
11684main ()
11685{
11686initscr(); tgoto("?", 0,0)
11687  ;
11688  return 0;
11689}
11690_ACEOF
11691rm -f conftest.$ac_objext conftest$ac_exeext
11692if { (eval echo "$as_me:11692: \"$ac_link\"") >&5
11693  (eval $ac_link) 2>&5
11694  ac_status=$?
11695  echo "$as_me:11695: \$? = $ac_status" >&5
11696  (exit $ac_status); } &&
11697         { ac_try='test -s conftest$ac_exeext'
11698  { (eval echo "$as_me:11698: \"$ac_try\"") >&5
11699  (eval $ac_try) 2>&5
11700  ac_status=$?
11701  echo "$as_me:11701: \$? = $ac_status" >&5
11702  (exit $ac_status); }; }; then
11703  cf_result=yes
11704else
11705  echo "$as_me: failed program was:" >&5
11706cat conftest.$ac_ext >&5
11707cf_result=no
11708fi
11709rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11710echo "$as_me:11710: result: $cf_result" >&5
11711echo "${ECHO_T}$cf_result" >&6
11712
11713if test "$cf_result" = no ; then
11714case $host_os in #(vi
11715freebsd*) #(vi
11716    echo "$as_me:11716: checking for tgoto in -lmytinfo" >&5
11717echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11718if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11719  echo $ECHO_N "(cached) $ECHO_C" >&6
11720else
11721  ac_check_lib_save_LIBS=$LIBS
11722LIBS="-lmytinfo  $LIBS"
11723cat >conftest.$ac_ext <<_ACEOF
11724#line 11724 "configure"
11725#include "confdefs.h"
11726
11727/* Override any gcc2 internal prototype to avoid an error.  */
11728#ifdef __cplusplus
11729extern "C"
11730#endif
11731/* We use char because int might match the return type of a gcc2
11732   builtin and then its argument prototype would still apply.  */
11733char tgoto ();
11734int
11735main ()
11736{
11737tgoto ();
11738  ;
11739  return 0;
11740}
11741_ACEOF
11742rm -f conftest.$ac_objext conftest$ac_exeext
11743if { (eval echo "$as_me:11743: \"$ac_link\"") >&5
11744  (eval $ac_link) 2>&5
11745  ac_status=$?
11746  echo "$as_me:11746: \$? = $ac_status" >&5
11747  (exit $ac_status); } &&
11748         { ac_try='test -s conftest$ac_exeext'
11749  { (eval echo "$as_me:11749: \"$ac_try\"") >&5
11750  (eval $ac_try) 2>&5
11751  ac_status=$?
11752  echo "$as_me:11752: \$? = $ac_status" >&5
11753  (exit $ac_status); }; }; then
11754  ac_cv_lib_mytinfo_tgoto=yes
11755else
11756  echo "$as_me: failed program was:" >&5
11757cat conftest.$ac_ext >&5
11758ac_cv_lib_mytinfo_tgoto=no
11759fi
11760rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11761LIBS=$ac_check_lib_save_LIBS
11762fi
11763echo "$as_me:11763: result: $ac_cv_lib_mytinfo_tgoto" >&5
11764echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11765if test $ac_cv_lib_mytinfo_tgoto = yes; then
11766  LIBS="-lmytinfo $LIBS"
11767fi
11768
11769    ;;
11770hpux10.*) #(vi
11771	# Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
11772	# next (1998), and xcurses "newer" (2000).  There is no header file for
11773	# Hcurses; the subdirectory curses_colr has the headers (curses.h and
11774	# term.h) for cur_colr
11775	if test "x$cf_cv_screen" = "xcurses_colr"
11776	then
11777		echo "$as_me:11777: checking for initscr in -lcur_colr" >&5
11778echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
11779if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
11780  echo $ECHO_N "(cached) $ECHO_C" >&6
11781else
11782  ac_check_lib_save_LIBS=$LIBS
11783LIBS="-lcur_colr  $LIBS"
11784cat >conftest.$ac_ext <<_ACEOF
11785#line 11785 "configure"
11786#include "confdefs.h"
11787
11788/* Override any gcc2 internal prototype to avoid an error.  */
11789#ifdef __cplusplus
11790extern "C"
11791#endif
11792/* We use char because int might match the return type of a gcc2
11793   builtin and then its argument prototype would still apply.  */
11794char initscr ();
11795int
11796main ()
11797{
11798initscr ();
11799  ;
11800  return 0;
11801}
11802_ACEOF
11803rm -f conftest.$ac_objext conftest$ac_exeext
11804if { (eval echo "$as_me:11804: \"$ac_link\"") >&5
11805  (eval $ac_link) 2>&5
11806  ac_status=$?
11807  echo "$as_me:11807: \$? = $ac_status" >&5
11808  (exit $ac_status); } &&
11809         { ac_try='test -s conftest$ac_exeext'
11810  { (eval echo "$as_me:11810: \"$ac_try\"") >&5
11811  (eval $ac_try) 2>&5
11812  ac_status=$?
11813  echo "$as_me:11813: \$? = $ac_status" >&5
11814  (exit $ac_status); }; }; then
11815  ac_cv_lib_cur_colr_initscr=yes
11816else
11817  echo "$as_me: failed program was:" >&5
11818cat conftest.$ac_ext >&5
11819ac_cv_lib_cur_colr_initscr=no
11820fi
11821rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11822LIBS=$ac_check_lib_save_LIBS
11823fi
11824echo "$as_me:11824: result: $ac_cv_lib_cur_colr_initscr" >&5
11825echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
11826if test $ac_cv_lib_cur_colr_initscr = yes; then
11827
11828			LIBS="-lcur_colr $LIBS"
11829			ac_cv_func_initscr=yes
11830
11831else
11832
11833		echo "$as_me:11833: checking for initscr in -lHcurses" >&5
11834echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
11835if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
11836  echo $ECHO_N "(cached) $ECHO_C" >&6
11837else
11838  ac_check_lib_save_LIBS=$LIBS
11839LIBS="-lHcurses  $LIBS"
11840cat >conftest.$ac_ext <<_ACEOF
11841#line 11841 "configure"
11842#include "confdefs.h"
11843
11844/* Override any gcc2 internal prototype to avoid an error.  */
11845#ifdef __cplusplus
11846extern "C"
11847#endif
11848/* We use char because int might match the return type of a gcc2
11849   builtin and then its argument prototype would still apply.  */
11850char initscr ();
11851int
11852main ()
11853{
11854initscr ();
11855  ;
11856  return 0;
11857}
11858_ACEOF
11859rm -f conftest.$ac_objext conftest$ac_exeext
11860if { (eval echo "$as_me:11860: \"$ac_link\"") >&5
11861  (eval $ac_link) 2>&5
11862  ac_status=$?
11863  echo "$as_me:11863: \$? = $ac_status" >&5
11864  (exit $ac_status); } &&
11865         { ac_try='test -s conftest$ac_exeext'
11866  { (eval echo "$as_me:11866: \"$ac_try\"") >&5
11867  (eval $ac_try) 2>&5
11868  ac_status=$?
11869  echo "$as_me:11869: \$? = $ac_status" >&5
11870  (exit $ac_status); }; }; then
11871  ac_cv_lib_Hcurses_initscr=yes
11872else
11873  echo "$as_me: failed program was:" >&5
11874cat conftest.$ac_ext >&5
11875ac_cv_lib_Hcurses_initscr=no
11876fi
11877rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11878LIBS=$ac_check_lib_save_LIBS
11879fi
11880echo "$as_me:11880: result: $ac_cv_lib_Hcurses_initscr" >&5
11881echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
11882if test $ac_cv_lib_Hcurses_initscr = yes; then
11883
11884			# HP's header uses __HP_CURSES, but user claims _HP_CURSES.
11885			LIBS="-lHcurses $LIBS"
11886			CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
11887			ac_cv_func_initscr=yes
11888
11889fi
11890
11891fi
11892
11893	fi
11894    ;;
11895linux*)
11896	case `arch 2>/dev/null` in
11897	x86_64)
11898		if test -d /lib64
11899		then
11900
11901if test -n "/lib64" ; then
11902  for cf_add_libdir in /lib64
11903  do
11904    if test $cf_add_libdir = /usr/lib ; then
11905      :
11906    elif test -d $cf_add_libdir
11907    then
11908      cf_have_libdir=no
11909      if test -n "$LDFLAGS$LIBS" ; then
11910        # a loop is needed to ensure we can add subdirs of existing dirs
11911        for cf_test_libdir in $LDFLAGS $LIBS ; do
11912          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11913            cf_have_libdir=yes; break
11914          fi
11915        done
11916      fi
11917      if test "$cf_have_libdir" = no ; then
11918        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11919
11920echo "${as_me:-configure}:11920: testing adding $cf_add_libdir to library-path ..." 1>&5
11921
11922        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11923      fi
11924    fi
11925  done
11926fi
11927
11928		else
11929
11930if test -n "/lib" ; then
11931  for cf_add_libdir in /lib
11932  do
11933    if test $cf_add_libdir = /usr/lib ; then
11934      :
11935    elif test -d $cf_add_libdir
11936    then
11937      cf_have_libdir=no
11938      if test -n "$LDFLAGS$LIBS" ; then
11939        # a loop is needed to ensure we can add subdirs of existing dirs
11940        for cf_test_libdir in $LDFLAGS $LIBS ; do
11941          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11942            cf_have_libdir=yes; break
11943          fi
11944        done
11945      fi
11946      if test "$cf_have_libdir" = no ; then
11947        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11948
11949echo "${as_me:-configure}:11949: testing adding $cf_add_libdir to library-path ..." 1>&5
11950
11951        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11952      fi
11953    fi
11954  done
11955fi
11956
11957		fi
11958		;;
11959	*)
11960
11961if test -n "/lib" ; then
11962  for cf_add_libdir in /lib
11963  do
11964    if test $cf_add_libdir = /usr/lib ; then
11965      :
11966    elif test -d $cf_add_libdir
11967    then
11968      cf_have_libdir=no
11969      if test -n "$LDFLAGS$LIBS" ; then
11970        # a loop is needed to ensure we can add subdirs of existing dirs
11971        for cf_test_libdir in $LDFLAGS $LIBS ; do
11972          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11973            cf_have_libdir=yes; break
11974          fi
11975        done
11976      fi
11977      if test "$cf_have_libdir" = no ; then
11978        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11979
11980echo "${as_me:-configure}:11980: testing adding $cf_add_libdir to library-path ..." 1>&5
11981
11982        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11983      fi
11984    fi
11985  done
11986fi
11987
11988		;;
11989	esac
11990    ;;
11991sunos3*|sunos4*)
11992	if test "x$cf_cv_screen" = "xcurses_5lib"
11993	then
11994		if test -d /usr/5lib ; then
11995
11996if test -n "/usr/5lib" ; then
11997  for cf_add_libdir in /usr/5lib
11998  do
11999    if test $cf_add_libdir = /usr/lib ; then
12000      :
12001    elif test -d $cf_add_libdir
12002    then
12003      cf_have_libdir=no
12004      if test -n "$LDFLAGS$LIBS" ; then
12005        # a loop is needed to ensure we can add subdirs of existing dirs
12006        for cf_test_libdir in $LDFLAGS $LIBS ; do
12007          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12008            cf_have_libdir=yes; break
12009          fi
12010        done
12011      fi
12012      if test "$cf_have_libdir" = no ; then
12013        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
12014
12015echo "${as_me:-configure}:12015: testing adding $cf_add_libdir to library-path ..." 1>&5
12016
12017        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12018      fi
12019    fi
12020  done
12021fi
12022
12023			LIBS="-lcurses -ltermcap $LIBS"
12024		fi
12025    fi
12026    ac_cv_func_initscr=yes
12027    ;;
12028esac
12029
12030if test ".$ac_cv_func_initscr" != .yes ; then
12031    cf_save_LIBS="$LIBS"
12032    cf_term_lib=""
12033    cf_curs_lib=""
12034
12035    if test ".${cf_cv_ncurses_version:-no}" != .no
12036    then
12037        cf_check_list="ncurses curses cursesX"
12038    else
12039        cf_check_list="cursesX curses ncurses"
12040    fi
12041
12042    # Check for library containing tgoto.  Do this before curses library
12043    # because it may be needed to link the test-case for initscr.
12044    echo "$as_me:12044: checking for tgoto" >&5
12045echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
12046if test "${ac_cv_func_tgoto+set}" = set; then
12047  echo $ECHO_N "(cached) $ECHO_C" >&6
12048else
12049  cat >conftest.$ac_ext <<_ACEOF
12050#line 12050 "configure"
12051#include "confdefs.h"
12052/* System header to define __stub macros and hopefully few prototypes,
12053    which can conflict with char tgoto (); below.  */
12054#include <assert.h>
12055/* Override any gcc2 internal prototype to avoid an error.  */
12056#ifdef __cplusplus
12057extern "C"
12058#endif
12059/* We use char because int might match the return type of a gcc2
12060   builtin and then its argument prototype would still apply.  */
12061char tgoto ();
12062char (*f) ();
12063
12064int
12065main ()
12066{
12067/* The GNU C library defines this for functions which it implements
12068    to always fail with ENOSYS.  Some functions are actually named
12069    something starting with __ and the normal name is an alias.  */
12070#if defined (__stub_tgoto) || defined (__stub___tgoto)
12071choke me
12072#else
12073f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12074#endif
12075
12076  ;
12077  return 0;
12078}
12079_ACEOF
12080rm -f conftest.$ac_objext conftest$ac_exeext
12081if { (eval echo "$as_me:12081: \"$ac_link\"") >&5
12082  (eval $ac_link) 2>&5
12083  ac_status=$?
12084  echo "$as_me:12084: \$? = $ac_status" >&5
12085  (exit $ac_status); } &&
12086         { ac_try='test -s conftest$ac_exeext'
12087  { (eval echo "$as_me:12087: \"$ac_try\"") >&5
12088  (eval $ac_try) 2>&5
12089  ac_status=$?
12090  echo "$as_me:12090: \$? = $ac_status" >&5
12091  (exit $ac_status); }; }; then
12092  ac_cv_func_tgoto=yes
12093else
12094  echo "$as_me: failed program was:" >&5
12095cat conftest.$ac_ext >&5
12096ac_cv_func_tgoto=no
12097fi
12098rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12099fi
12100echo "$as_me:12100: result: $ac_cv_func_tgoto" >&5
12101echo "${ECHO_T}$ac_cv_func_tgoto" >&6
12102if test $ac_cv_func_tgoto = yes; then
12103  cf_term_lib=predefined
12104else
12105
12106        for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
12107        do
12108            as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
12109echo "$as_me:12109: checking for tgoto in -l$cf_term_lib" >&5
12110echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
12111if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12112  echo $ECHO_N "(cached) $ECHO_C" >&6
12113else
12114  ac_check_lib_save_LIBS=$LIBS
12115LIBS="-l$cf_term_lib  $LIBS"
12116cat >conftest.$ac_ext <<_ACEOF
12117#line 12117 "configure"
12118#include "confdefs.h"
12119
12120/* Override any gcc2 internal prototype to avoid an error.  */
12121#ifdef __cplusplus
12122extern "C"
12123#endif
12124/* We use char because int might match the return type of a gcc2
12125   builtin and then its argument prototype would still apply.  */
12126char tgoto ();
12127int
12128main ()
12129{
12130tgoto ();
12131  ;
12132  return 0;
12133}
12134_ACEOF
12135rm -f conftest.$ac_objext conftest$ac_exeext
12136if { (eval echo "$as_me:12136: \"$ac_link\"") >&5
12137  (eval $ac_link) 2>&5
12138  ac_status=$?
12139  echo "$as_me:12139: \$? = $ac_status" >&5
12140  (exit $ac_status); } &&
12141         { ac_try='test -s conftest$ac_exeext'
12142  { (eval echo "$as_me:12142: \"$ac_try\"") >&5
12143  (eval $ac_try) 2>&5
12144  ac_status=$?
12145  echo "$as_me:12145: \$? = $ac_status" >&5
12146  (exit $ac_status); }; }; then
12147  eval "$as_ac_Lib=yes"
12148else
12149  echo "$as_me: failed program was:" >&5
12150cat conftest.$ac_ext >&5
12151eval "$as_ac_Lib=no"
12152fi
12153rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12154LIBS=$ac_check_lib_save_LIBS
12155fi
12156echo "$as_me:12156: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12157echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12158if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12159  break
12160fi
12161
12162        done
12163
12164fi
12165
12166    # Check for library containing initscr
12167    test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
12168 	for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
12169    do
12170        as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
12171echo "$as_me:12171: checking for initscr in -l$cf_curs_lib" >&5
12172echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
12173if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12174  echo $ECHO_N "(cached) $ECHO_C" >&6
12175else
12176  ac_check_lib_save_LIBS=$LIBS
12177LIBS="-l$cf_curs_lib  $LIBS"
12178cat >conftest.$ac_ext <<_ACEOF
12179#line 12179 "configure"
12180#include "confdefs.h"
12181
12182/* Override any gcc2 internal prototype to avoid an error.  */
12183#ifdef __cplusplus
12184extern "C"
12185#endif
12186/* We use char because int might match the return type of a gcc2
12187   builtin and then its argument prototype would still apply.  */
12188char initscr ();
12189int
12190main ()
12191{
12192initscr ();
12193  ;
12194  return 0;
12195}
12196_ACEOF
12197rm -f conftest.$ac_objext conftest$ac_exeext
12198if { (eval echo "$as_me:12198: \"$ac_link\"") >&5
12199  (eval $ac_link) 2>&5
12200  ac_status=$?
12201  echo "$as_me:12201: \$? = $ac_status" >&5
12202  (exit $ac_status); } &&
12203         { ac_try='test -s conftest$ac_exeext'
12204  { (eval echo "$as_me:12204: \"$ac_try\"") >&5
12205  (eval $ac_try) 2>&5
12206  ac_status=$?
12207  echo "$as_me:12207: \$? = $ac_status" >&5
12208  (exit $ac_status); }; }; then
12209  eval "$as_ac_Lib=yes"
12210else
12211  echo "$as_me: failed program was:" >&5
12212cat conftest.$ac_ext >&5
12213eval "$as_ac_Lib=no"
12214fi
12215rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12216LIBS=$ac_check_lib_save_LIBS
12217fi
12218echo "$as_me:12218: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12219echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12220if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12221  break
12222fi
12223
12224    done
12225    test $cf_curs_lib = unknown && { { echo "$as_me:12225: error: no curses library found" >&5
12226echo "$as_me: error: no curses library found" >&2;}
12227   { (exit 1); exit 1; }; }
12228
12229    LIBS="-l$cf_curs_lib $cf_save_LIBS"
12230    if test "$cf_term_lib" = unknown ; then
12231        echo "$as_me:12231: checking if we can link with $cf_curs_lib library" >&5
12232echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
12233        cat >conftest.$ac_ext <<_ACEOF
12234#line 12234 "configure"
12235#include "confdefs.h"
12236#include <${cf_cv_ncurses_header:-curses.h}>
12237int
12238main ()
12239{
12240initscr()
12241  ;
12242  return 0;
12243}
12244_ACEOF
12245rm -f conftest.$ac_objext conftest$ac_exeext
12246if { (eval echo "$as_me:12246: \"$ac_link\"") >&5
12247  (eval $ac_link) 2>&5
12248  ac_status=$?
12249  echo "$as_me:12249: \$? = $ac_status" >&5
12250  (exit $ac_status); } &&
12251         { ac_try='test -s conftest$ac_exeext'
12252  { (eval echo "$as_me:12252: \"$ac_try\"") >&5
12253  (eval $ac_try) 2>&5
12254  ac_status=$?
12255  echo "$as_me:12255: \$? = $ac_status" >&5
12256  (exit $ac_status); }; }; then
12257  cf_result=yes
12258else
12259  echo "$as_me: failed program was:" >&5
12260cat conftest.$ac_ext >&5
12261cf_result=no
12262fi
12263rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12264        echo "$as_me:12264: result: $cf_result" >&5
12265echo "${ECHO_T}$cf_result" >&6
12266        test $cf_result = no && { { echo "$as_me:12266: error: Cannot link curses library" >&5
12267echo "$as_me: error: Cannot link curses library" >&2;}
12268   { (exit 1); exit 1; }; }
12269    elif test "$cf_curs_lib" = "$cf_term_lib" ; then
12270        :
12271    elif test "$cf_term_lib" != predefined ; then
12272        echo "$as_me:12272: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
12273echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
12274        cat >conftest.$ac_ext <<_ACEOF
12275#line 12275 "configure"
12276#include "confdefs.h"
12277#include <${cf_cv_ncurses_header:-curses.h}>
12278int
12279main ()
12280{
12281initscr(); tgoto((char *)0, 0, 0);
12282  ;
12283  return 0;
12284}
12285_ACEOF
12286rm -f conftest.$ac_objext conftest$ac_exeext
12287if { (eval echo "$as_me:12287: \"$ac_link\"") >&5
12288  (eval $ac_link) 2>&5
12289  ac_status=$?
12290  echo "$as_me:12290: \$? = $ac_status" >&5
12291  (exit $ac_status); } &&
12292         { ac_try='test -s conftest$ac_exeext'
12293  { (eval echo "$as_me:12293: \"$ac_try\"") >&5
12294  (eval $ac_try) 2>&5
12295  ac_status=$?
12296  echo "$as_me:12296: \$? = $ac_status" >&5
12297  (exit $ac_status); }; }; then
12298  cf_result=no
12299else
12300  echo "$as_me: failed program was:" >&5
12301cat conftest.$ac_ext >&5
12302
12303            LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
12304            cat >conftest.$ac_ext <<_ACEOF
12305#line 12305 "configure"
12306#include "confdefs.h"
12307#include <${cf_cv_ncurses_header:-curses.h}>
12308int
12309main ()
12310{
12311initscr()
12312  ;
12313  return 0;
12314}
12315_ACEOF
12316rm -f conftest.$ac_objext conftest$ac_exeext
12317if { (eval echo "$as_me:12317: \"$ac_link\"") >&5
12318  (eval $ac_link) 2>&5
12319  ac_status=$?
12320  echo "$as_me:12320: \$? = $ac_status" >&5
12321  (exit $ac_status); } &&
12322         { ac_try='test -s conftest$ac_exeext'
12323  { (eval echo "$as_me:12323: \"$ac_try\"") >&5
12324  (eval $ac_try) 2>&5
12325  ac_status=$?
12326  echo "$as_me:12326: \$? = $ac_status" >&5
12327  (exit $ac_status); }; }; then
12328  cf_result=yes
12329else
12330  echo "$as_me: failed program was:" >&5
12331cat conftest.$ac_ext >&5
12332cf_result=error
12333fi
12334rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12335
12336fi
12337rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12338        echo "$as_me:12338: result: $cf_result" >&5
12339echo "${ECHO_T}$cf_result" >&6
12340    fi
12341fi
12342fi
12343
12344fi
12345
12346cf_all_widgets=yes
12347
12348echo "$as_me:12348: checking if you want extra dialogs" >&5
12349echo $ECHO_N "checking if you want extra dialogs... $ECHO_C" >&6
12350
12351# Check whether --enable-extras or --disable-extras was given.
12352if test "${enable_extras+set}" = set; then
12353  enableval="$enable_extras"
12354
12355else
12356  enableval=yes
12357fi;
12358echo "$as_me:12358: result: $enableval" >&5
12359echo "${ECHO_T}$enableval" >&6
12360if test "$enableval" != no ; then
12361cf_all_widgets=yes
12362else
12363cf_all_widgets=no
12364fi
12365
12366echo "$as_me:12366: checking if you want config-file support" >&5
12367echo $ECHO_N "checking if you want config-file support... $ECHO_C" >&6
12368
12369# Check whether --enable-rc-file or --disable-rc-file was given.
12370if test "${enable_rc_file+set}" = set; then
12371  enableval="$enable_rc_file"
12372
12373else
12374  enableval=$cf_all_widgets
12375fi;
12376echo "$as_me:12376: result: $enableval" >&5
12377echo "${ECHO_T}$enableval" >&6
12378if test "$enableval" != no ; then
12379EXTRAOBJS="$EXTRAOBJS rc\$o"
12380
12381cat >>confdefs.h <<\EOF
12382#define HAVE_RC_FILE 1
12383EOF
12384
12385else
12386	:
12387fi
12388
12389echo "$as_me:12389: checking if you want Xdialog-style dialogs" >&5
12390echo $ECHO_N "checking if you want Xdialog-style dialogs... $ECHO_C" >&6
12391
12392# Check whether --enable-Xdialog or --disable-Xdialog was given.
12393if test "${enable_Xdialog+set}" = set; then
12394  enableval="$enable_Xdialog"
12395
12396else
12397  enableval=$cf_all_widgets
12398fi;
12399echo "$as_me:12399: result: $enableval" >&5
12400echo "${ECHO_T}$enableval" >&6
12401if test "$enableval" != no ; then
12402EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
12403
12404cat >>confdefs.h <<\EOF
12405#define HAVE_XDIALOG 1
12406EOF
12407
12408else
12409	:
12410fi
12411
12412echo "$as_me:12412: checking if you want extra Xdialog-style dialogs (1.2)" >&5
12413echo $ECHO_N "checking if you want extra Xdialog-style dialogs (1.2)... $ECHO_C" >&6
12414
12415# Check whether --enable-Xdialog2 or --disable-Xdialog2 was given.
12416if test "${enable_Xdialog2+set}" = set; then
12417  enableval="$enable_Xdialog2"
12418
12419else
12420  enableval=$cf_all_widgets
12421fi;
12422echo "$as_me:12422: result: $enableval" >&5
12423echo "${ECHO_T}$enableval" >&6
12424if test "$enableval" != no ; then
12425EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
12426
12427cat >>confdefs.h <<\EOF
12428#define HAVE_XDIALOG2 1
12429EOF
12430
12431else
12432	:
12433fi
12434
12435echo "$as_me:12435: checking if you want compatibility with whiptail options" >&5
12436echo $ECHO_N "checking if you want compatibility with whiptail options... $ECHO_C" >&6
12437
12438# Check whether --enable-whiptail or --disable-whiptail was given.
12439if test "${enable_whiptail+set}" = set; then
12440  enableval="$enable_whiptail"
12441
12442else
12443  enableval=$cf_all_widgets
12444fi;
12445echo "$as_me:12445: result: $enableval" >&5
12446echo "${ECHO_T}$enableval" >&6
12447if test "$enableval" != no ; then
12448
12449cat >>confdefs.h <<\EOF
12450#define HAVE_WHIPTAIL 1
12451EOF
12452
12453else
12454	:
12455fi
12456
12457echo "$as_me:12457: checking if you want the form dialog" >&5
12458echo $ECHO_N "checking if you want the form dialog... $ECHO_C" >&6
12459
12460# Check whether --enable-form or --disable-form was given.
12461if test "${enable_form+set}" = set; then
12462  enableval="$enable_form"
12463
12464else
12465  enableval=$cf_all_widgets
12466fi;
12467echo "$as_me:12467: result: $enableval" >&5
12468echo "${ECHO_T}$enableval" >&6
12469if test "$enableval" != no ; then
12470EXTRAOBJS="$EXTRAOBJS formbox\$o"
12471
12472cat >>confdefs.h <<\EOF
12473#define HAVE_DLG_FORMBOX 1
12474EOF
12475
12476else
12477	:
12478fi
12479
12480echo "$as_me:12480: checking if you want the gauge dialog" >&5
12481echo $ECHO_N "checking if you want the gauge dialog... $ECHO_C" >&6
12482
12483# Check whether --enable-gauge or --disable-gauge was given.
12484if test "${enable_gauge+set}" = set; then
12485  enableval="$enable_gauge"
12486
12487else
12488  enableval=$cf_all_widgets
12489fi;
12490echo "$as_me:12490: result: $enableval" >&5
12491echo "${ECHO_T}$enableval" >&6
12492if test "$enableval" != no ; then
12493EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
12494
12495cat >>confdefs.h <<\EOF
12496#define HAVE_DLG_GAUGE 1
12497EOF
12498
12499else
12500	:
12501fi
12502
12503echo "$as_me:12503: checking if you want the tailbox dialog" >&5
12504echo $ECHO_N "checking if you want the tailbox dialog... $ECHO_C" >&6
12505
12506# Check whether --enable-tailbox or --disable-tailbox was given.
12507if test "${enable_tailbox+set}" = set; then
12508  enableval="$enable_tailbox"
12509
12510else
12511  enableval=$cf_all_widgets
12512fi;
12513echo "$as_me:12513: result: $enableval" >&5
12514echo "${ECHO_T}$enableval" >&6
12515if test "$enableval" != no ; then
12516EXTRAOBJS="$EXTRAOBJS tailbox\$o"
12517
12518cat >>confdefs.h <<\EOF
12519#define HAVE_DLG_TAILBOX 1
12520EOF
12521
12522else
12523	:
12524fi
12525
12526echo "$as_me:12526: checking if you want the mixedform dialog" >&5
12527echo $ECHO_N "checking if you want the mixedform dialog... $ECHO_C" >&6
12528
12529# Check whether --enable-mixedform or --disable-mixedform was given.
12530if test "${enable_mixedform+set}" = set; then
12531  enableval="$enable_mixedform"
12532
12533else
12534  enableval=$cf_all_widgets
12535fi;
12536echo "$as_me:12536: result: $enableval" >&5
12537echo "${ECHO_T}$enableval" >&6
12538if test "$enableval" != no ; then
12539EXTRAOBJS="$EXTRAOBJS mixedform\$o"
12540
12541cat >>confdefs.h <<\EOF
12542#define HAVE_DLG_MIXEDFORM 1
12543EOF
12544
12545else
12546	:
12547fi
12548
12549echo "$as_me:12549: checking if you want the mixedgauge dialog" >&5
12550echo $ECHO_N "checking if you want the mixedgauge dialog... $ECHO_C" >&6
12551
12552# Check whether --enable-mixedgauge or --disable-mixedgauge was given.
12553if test "${enable_mixedgauge+set}" = set; then
12554  enableval="$enable_mixedgauge"
12555
12556else
12557  enableval=$cf_all_widgets
12558fi;
12559echo "$as_me:12559: result: $enableval" >&5
12560echo "${ECHO_T}$enableval" >&6
12561if test "$enableval" != no ; then
12562EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
12563
12564cat >>confdefs.h <<\EOF
12565#define HAVE_MIXEDGAUGE 1
12566EOF
12567
12568else
12569	:
12570fi
12571
12572echo "$as_me:12572: checking if you want the wide-curses features" >&5
12573echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
12574
12575# Check whether --enable-widec or --disable-widec was given.
12576if test "${enable_widec+set}" = set; then
12577  enableval="$enable_widec"
12578
12579else
12580  enableval=$cf_wide_curses
12581fi;
12582echo "$as_me:12582: result: $enableval" >&5
12583echo "${ECHO_T}$enableval" >&6
12584if test "$enableval" != no ; then
12585
12586cat >>confdefs.h <<\EOF
12587#define USE_WIDE_CURSES 1
12588EOF
12589
12590else
12591	:
12592fi
12593
12594echo "$as_me:12594: checking for ANSI C header files" >&5
12595echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12596if test "${ac_cv_header_stdc+set}" = set; then
12597  echo $ECHO_N "(cached) $ECHO_C" >&6
12598else
12599  cat >conftest.$ac_ext <<_ACEOF
12600#line 12600 "configure"
12601#include "confdefs.h"
12602#include <stdlib.h>
12603#include <stdarg.h>
12604#include <string.h>
12605#include <float.h>
12606
12607_ACEOF
12608if { (eval echo "$as_me:12608: \"$ac_cpp conftest.$ac_ext\"") >&5
12609  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12610  ac_status=$?
12611  egrep -v '^ *\+' conftest.er1 >conftest.err
12612  rm -f conftest.er1
12613  cat conftest.err >&5
12614  echo "$as_me:12614: \$? = $ac_status" >&5
12615  (exit $ac_status); } >/dev/null; then
12616  if test -s conftest.err; then
12617    ac_cpp_err=$ac_c_preproc_warn_flag
12618  else
12619    ac_cpp_err=
12620  fi
12621else
12622  ac_cpp_err=yes
12623fi
12624if test -z "$ac_cpp_err"; then
12625  ac_cv_header_stdc=yes
12626else
12627  echo "$as_me: failed program was:" >&5
12628  cat conftest.$ac_ext >&5
12629  ac_cv_header_stdc=no
12630fi
12631rm -f conftest.err conftest.$ac_ext
12632
12633if test $ac_cv_header_stdc = yes; then
12634  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12635  cat >conftest.$ac_ext <<_ACEOF
12636#line 12636 "configure"
12637#include "confdefs.h"
12638#include <string.h>
12639
12640_ACEOF
12641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12642  egrep "memchr" >/dev/null 2>&1; then
12643  :
12644else
12645  ac_cv_header_stdc=no
12646fi
12647rm -rf conftest*
12648
12649fi
12650
12651if test $ac_cv_header_stdc = yes; then
12652  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12653  cat >conftest.$ac_ext <<_ACEOF
12654#line 12654 "configure"
12655#include "confdefs.h"
12656#include <stdlib.h>
12657
12658_ACEOF
12659if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12660  egrep "free" >/dev/null 2>&1; then
12661  :
12662else
12663  ac_cv_header_stdc=no
12664fi
12665rm -rf conftest*
12666
12667fi
12668
12669if test $ac_cv_header_stdc = yes; then
12670  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12671  if test "$cross_compiling" = yes; then
12672  :
12673else
12674  cat >conftest.$ac_ext <<_ACEOF
12675#line 12675 "configure"
12676#include "confdefs.h"
12677#include <ctype.h>
12678#if ((' ' & 0x0FF) == 0x020)
12679# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12680# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12681#else
12682# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12683                     || ('j' <= (c) && (c) <= 'r') \
12684                     || ('s' <= (c) && (c) <= 'z'))
12685# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12686#endif
12687
12688#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12689int
12690main ()
12691{
12692  int i;
12693  for (i = 0; i < 256; i++)
12694    if (XOR (islower (i), ISLOWER (i))
12695        || toupper (i) != TOUPPER (i))
12696      $ac_main_return(2);
12697  $ac_main_return (0);
12698}
12699_ACEOF
12700rm -f conftest$ac_exeext
12701if { (eval echo "$as_me:12701: \"$ac_link\"") >&5
12702  (eval $ac_link) 2>&5
12703  ac_status=$?
12704  echo "$as_me:12704: \$? = $ac_status" >&5
12705  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12706  { (eval echo "$as_me:12706: \"$ac_try\"") >&5
12707  (eval $ac_try) 2>&5
12708  ac_status=$?
12709  echo "$as_me:12709: \$? = $ac_status" >&5
12710  (exit $ac_status); }; }; then
12711  :
12712else
12713  echo "$as_me: program exited with status $ac_status" >&5
12714echo "$as_me: failed program was:" >&5
12715cat conftest.$ac_ext >&5
12716ac_cv_header_stdc=no
12717fi
12718rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12719fi
12720fi
12721fi
12722echo "$as_me:12722: result: $ac_cv_header_stdc" >&5
12723echo "${ECHO_T}$ac_cv_header_stdc" >&6
12724if test $ac_cv_header_stdc = yes; then
12725
12726cat >>confdefs.h <<\EOF
12727#define STDC_HEADERS 1
12728EOF
12729
12730fi
12731
12732echo "$as_me:12732: checking whether time.h and sys/time.h may both be included" >&5
12733echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12734if test "${ac_cv_header_time+set}" = set; then
12735  echo $ECHO_N "(cached) $ECHO_C" >&6
12736else
12737  cat >conftest.$ac_ext <<_ACEOF
12738#line 12738 "configure"
12739#include "confdefs.h"
12740#include <sys/types.h>
12741#include <sys/time.h>
12742#include <time.h>
12743
12744int
12745main ()
12746{
12747if ((struct tm *) 0)
12748return 0;
12749  ;
12750  return 0;
12751}
12752_ACEOF
12753rm -f conftest.$ac_objext
12754if { (eval echo "$as_me:12754: \"$ac_compile\"") >&5
12755  (eval $ac_compile) 2>&5
12756  ac_status=$?
12757  echo "$as_me:12757: \$? = $ac_status" >&5
12758  (exit $ac_status); } &&
12759         { ac_try='test -s conftest.$ac_objext'
12760  { (eval echo "$as_me:12760: \"$ac_try\"") >&5
12761  (eval $ac_try) 2>&5
12762  ac_status=$?
12763  echo "$as_me:12763: \$? = $ac_status" >&5
12764  (exit $ac_status); }; }; then
12765  ac_cv_header_time=yes
12766else
12767  echo "$as_me: failed program was:" >&5
12768cat conftest.$ac_ext >&5
12769ac_cv_header_time=no
12770fi
12771rm -f conftest.$ac_objext conftest.$ac_ext
12772fi
12773echo "$as_me:12773: result: $ac_cv_header_time" >&5
12774echo "${ECHO_T}$ac_cv_header_time" >&6
12775if test $ac_cv_header_time = yes; then
12776
12777cat >>confdefs.h <<\EOF
12778#define TIME_WITH_SYS_TIME 1
12779EOF
12780
12781fi
12782
12783ac_header_dirent=no
12784for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12785  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12786echo "$as_me:12786: checking for $ac_hdr that defines DIR" >&5
12787echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12788if eval "test \"\${$as_ac_Header+set}\" = set"; then
12789  echo $ECHO_N "(cached) $ECHO_C" >&6
12790else
12791  cat >conftest.$ac_ext <<_ACEOF
12792#line 12792 "configure"
12793#include "confdefs.h"
12794#include <sys/types.h>
12795#include <$ac_hdr>
12796
12797int
12798main ()
12799{
12800if ((DIR *) 0)
12801return 0;
12802  ;
12803  return 0;
12804}
12805_ACEOF
12806rm -f conftest.$ac_objext
12807if { (eval echo "$as_me:12807: \"$ac_compile\"") >&5
12808  (eval $ac_compile) 2>&5
12809  ac_status=$?
12810  echo "$as_me:12810: \$? = $ac_status" >&5
12811  (exit $ac_status); } &&
12812         { ac_try='test -s conftest.$ac_objext'
12813  { (eval echo "$as_me:12813: \"$ac_try\"") >&5
12814  (eval $ac_try) 2>&5
12815  ac_status=$?
12816  echo "$as_me:12816: \$? = $ac_status" >&5
12817  (exit $ac_status); }; }; then
12818  eval "$as_ac_Header=yes"
12819else
12820  echo "$as_me: failed program was:" >&5
12821cat conftest.$ac_ext >&5
12822eval "$as_ac_Header=no"
12823fi
12824rm -f conftest.$ac_objext conftest.$ac_ext
12825fi
12826echo "$as_me:12826: result: `eval echo '${'$as_ac_Header'}'`" >&5
12827echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12828if test `eval echo '${'$as_ac_Header'}'` = yes; then
12829  cat >>confdefs.h <<EOF
12830#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12831EOF
12832
12833ac_header_dirent=$ac_hdr; break
12834fi
12835
12836done
12837# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12838if test $ac_header_dirent = dirent.h; then
12839  echo "$as_me:12839: checking for opendir in -ldir" >&5
12840echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12841if test "${ac_cv_lib_dir_opendir+set}" = set; then
12842  echo $ECHO_N "(cached) $ECHO_C" >&6
12843else
12844  ac_check_lib_save_LIBS=$LIBS
12845LIBS="-ldir  $LIBS"
12846cat >conftest.$ac_ext <<_ACEOF
12847#line 12847 "configure"
12848#include "confdefs.h"
12849
12850/* Override any gcc2 internal prototype to avoid an error.  */
12851#ifdef __cplusplus
12852extern "C"
12853#endif
12854/* We use char because int might match the return type of a gcc2
12855   builtin and then its argument prototype would still apply.  */
12856char opendir ();
12857int
12858main ()
12859{
12860opendir ();
12861  ;
12862  return 0;
12863}
12864_ACEOF
12865rm -f conftest.$ac_objext conftest$ac_exeext
12866if { (eval echo "$as_me:12866: \"$ac_link\"") >&5
12867  (eval $ac_link) 2>&5
12868  ac_status=$?
12869  echo "$as_me:12869: \$? = $ac_status" >&5
12870  (exit $ac_status); } &&
12871         { ac_try='test -s conftest$ac_exeext'
12872  { (eval echo "$as_me:12872: \"$ac_try\"") >&5
12873  (eval $ac_try) 2>&5
12874  ac_status=$?
12875  echo "$as_me:12875: \$? = $ac_status" >&5
12876  (exit $ac_status); }; }; then
12877  ac_cv_lib_dir_opendir=yes
12878else
12879  echo "$as_me: failed program was:" >&5
12880cat conftest.$ac_ext >&5
12881ac_cv_lib_dir_opendir=no
12882fi
12883rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12884LIBS=$ac_check_lib_save_LIBS
12885fi
12886echo "$as_me:12886: result: $ac_cv_lib_dir_opendir" >&5
12887echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12888if test $ac_cv_lib_dir_opendir = yes; then
12889  LIBS="$LIBS -ldir"
12890fi
12891
12892else
12893  echo "$as_me:12893: checking for opendir in -lx" >&5
12894echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12895if test "${ac_cv_lib_x_opendir+set}" = set; then
12896  echo $ECHO_N "(cached) $ECHO_C" >&6
12897else
12898  ac_check_lib_save_LIBS=$LIBS
12899LIBS="-lx  $LIBS"
12900cat >conftest.$ac_ext <<_ACEOF
12901#line 12901 "configure"
12902#include "confdefs.h"
12903
12904/* Override any gcc2 internal prototype to avoid an error.  */
12905#ifdef __cplusplus
12906extern "C"
12907#endif
12908/* We use char because int might match the return type of a gcc2
12909   builtin and then its argument prototype would still apply.  */
12910char opendir ();
12911int
12912main ()
12913{
12914opendir ();
12915  ;
12916  return 0;
12917}
12918_ACEOF
12919rm -f conftest.$ac_objext conftest$ac_exeext
12920if { (eval echo "$as_me:12920: \"$ac_link\"") >&5
12921  (eval $ac_link) 2>&5
12922  ac_status=$?
12923  echo "$as_me:12923: \$? = $ac_status" >&5
12924  (exit $ac_status); } &&
12925         { ac_try='test -s conftest$ac_exeext'
12926  { (eval echo "$as_me:12926: \"$ac_try\"") >&5
12927  (eval $ac_try) 2>&5
12928  ac_status=$?
12929  echo "$as_me:12929: \$? = $ac_status" >&5
12930  (exit $ac_status); }; }; then
12931  ac_cv_lib_x_opendir=yes
12932else
12933  echo "$as_me: failed program was:" >&5
12934cat conftest.$ac_ext >&5
12935ac_cv_lib_x_opendir=no
12936fi
12937rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12938LIBS=$ac_check_lib_save_LIBS
12939fi
12940echo "$as_me:12940: result: $ac_cv_lib_x_opendir" >&5
12941echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12942if test $ac_cv_lib_x_opendir = yes; then
12943  LIBS="$LIBS -lx"
12944fi
12945
12946fi
12947
12948for ac_header in search.h unctrl.h unistd.h
12949do
12950as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12951echo "$as_me:12951: checking for $ac_header" >&5
12952echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12953if eval "test \"\${$as_ac_Header+set}\" = set"; then
12954  echo $ECHO_N "(cached) $ECHO_C" >&6
12955else
12956  cat >conftest.$ac_ext <<_ACEOF
12957#line 12957 "configure"
12958#include "confdefs.h"
12959#include <$ac_header>
12960_ACEOF
12961if { (eval echo "$as_me:12961: \"$ac_cpp conftest.$ac_ext\"") >&5
12962  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12963  ac_status=$?
12964  egrep -v '^ *\+' conftest.er1 >conftest.err
12965  rm -f conftest.er1
12966  cat conftest.err >&5
12967  echo "$as_me:12967: \$? = $ac_status" >&5
12968  (exit $ac_status); } >/dev/null; then
12969  if test -s conftest.err; then
12970    ac_cpp_err=$ac_c_preproc_warn_flag
12971  else
12972    ac_cpp_err=
12973  fi
12974else
12975  ac_cpp_err=yes
12976fi
12977if test -z "$ac_cpp_err"; then
12978  eval "$as_ac_Header=yes"
12979else
12980  echo "$as_me: failed program was:" >&5
12981  cat conftest.$ac_ext >&5
12982  eval "$as_ac_Header=no"
12983fi
12984rm -f conftest.err conftest.$ac_ext
12985fi
12986echo "$as_me:12986: result: `eval echo '${'$as_ac_Header'}'`" >&5
12987echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12988if test `eval echo '${'$as_ac_Header'}'` = yes; then
12989  cat >>confdefs.h <<EOF
12990#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12991EOF
12992
12993fi
12994done
12995
12996echo "$as_me:12996: checking for term.h" >&5
12997echo $ECHO_N "checking for term.h... $ECHO_C" >&6
12998if test "${cf_cv_term_header+set}" = set; then
12999  echo $ECHO_N "(cached) $ECHO_C" >&6
13000else
13001
13002# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
13003# for <term.h> if we do not find the variant.
13004
13005cf_header_list="term.h ncurses/term.h ncursesw/term.h"
13006
13007case ${cf_cv_ncurses_header:-curses.h} in #(vi
13008*/*)
13009	cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
13010	cf_header_list="$cf_header_item $cf_header_list"
13011	;;
13012esac
13013
13014for cf_header in $cf_header_list
13015do
13016	cat >conftest.$ac_ext <<_ACEOF
13017#line 13017 "configure"
13018#include "confdefs.h"
13019
13020#include <${cf_cv_ncurses_header:-curses.h}>
13021#include <${cf_header}>
13022int
13023main ()
13024{
13025WINDOW *x
13026  ;
13027  return 0;
13028}
13029_ACEOF
13030rm -f conftest.$ac_objext
13031if { (eval echo "$as_me:13031: \"$ac_compile\"") >&5
13032  (eval $ac_compile) 2>&5
13033  ac_status=$?
13034  echo "$as_me:13034: \$? = $ac_status" >&5
13035  (exit $ac_status); } &&
13036         { ac_try='test -s conftest.$ac_objext'
13037  { (eval echo "$as_me:13037: \"$ac_try\"") >&5
13038  (eval $ac_try) 2>&5
13039  ac_status=$?
13040  echo "$as_me:13040: \$? = $ac_status" >&5
13041  (exit $ac_status); }; }; then
13042  cf_cv_term_header=$cf_header
13043	 break
13044else
13045  echo "$as_me: failed program was:" >&5
13046cat conftest.$ac_ext >&5
13047cf_cv_term_header=no
13048fi
13049rm -f conftest.$ac_objext conftest.$ac_ext
13050done
13051
13052case $cf_cv_term_header in #(vi
13053no)
13054	# If curses is ncurses, some packagers still mess it up by trying to make
13055	# us use GNU termcap.  This handles the most common case.
13056	for cf_header in ncurses/term.h ncursesw/term.h
13057	do
13058		cat >conftest.$ac_ext <<_ACEOF
13059#line 13059 "configure"
13060#include "confdefs.h"
13061
13062#include <${cf_cv_ncurses_header:-curses.h}>
13063#ifdef NCURSES_VERSION
13064#include <${cf_header}>
13065#else
13066make an error
13067#endif
13068int
13069main ()
13070{
13071WINDOW *x
13072  ;
13073  return 0;
13074}
13075_ACEOF
13076rm -f conftest.$ac_objext
13077if { (eval echo "$as_me:13077: \"$ac_compile\"") >&5
13078  (eval $ac_compile) 2>&5
13079  ac_status=$?
13080  echo "$as_me:13080: \$? = $ac_status" >&5
13081  (exit $ac_status); } &&
13082         { ac_try='test -s conftest.$ac_objext'
13083  { (eval echo "$as_me:13083: \"$ac_try\"") >&5
13084  (eval $ac_try) 2>&5
13085  ac_status=$?
13086  echo "$as_me:13086: \$? = $ac_status" >&5
13087  (exit $ac_status); }; }; then
13088  cf_cv_term_header=$cf_header
13089			 break
13090else
13091  echo "$as_me: failed program was:" >&5
13092cat conftest.$ac_ext >&5
13093cf_cv_term_header=no
13094fi
13095rm -f conftest.$ac_objext conftest.$ac_ext
13096	done
13097	;;
13098esac
13099
13100fi
13101echo "$as_me:13101: result: $cf_cv_term_header" >&5
13102echo "${ECHO_T}$cf_cv_term_header" >&6
13103
13104case $cf_cv_term_header in #(vi
13105term.h) #(vi
13106
13107cat >>confdefs.h <<\EOF
13108#define HAVE_TERM_H 1
13109EOF
13110
13111	;;
13112ncurses/term.h) #(vi
13113
13114cat >>confdefs.h <<\EOF
13115#define HAVE_NCURSES_TERM_H 1
13116EOF
13117
13118	;;
13119ncursesw/term.h)
13120
13121cat >>confdefs.h <<\EOF
13122#define HAVE_NCURSESW_TERM_H 1
13123EOF
13124
13125	;;
13126esac
13127
13128echo "$as_me:13128: checking return type of signal handlers" >&5
13129echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13130if test "${ac_cv_type_signal+set}" = set; then
13131  echo $ECHO_N "(cached) $ECHO_C" >&6
13132else
13133  cat >conftest.$ac_ext <<_ACEOF
13134#line 13134 "configure"
13135#include "confdefs.h"
13136#include <sys/types.h>
13137#include <signal.h>
13138#ifdef signal
13139# undef signal
13140#endif
13141#ifdef __cplusplus
13142extern "C" void (*signal (int, void (*)(int)))(int);
13143#else
13144void (*signal ()) ();
13145#endif
13146
13147int
13148main ()
13149{
13150int i;
13151  ;
13152  return 0;
13153}
13154_ACEOF
13155rm -f conftest.$ac_objext
13156if { (eval echo "$as_me:13156: \"$ac_compile\"") >&5
13157  (eval $ac_compile) 2>&5
13158  ac_status=$?
13159  echo "$as_me:13159: \$? = $ac_status" >&5
13160  (exit $ac_status); } &&
13161         { ac_try='test -s conftest.$ac_objext'
13162  { (eval echo "$as_me:13162: \"$ac_try\"") >&5
13163  (eval $ac_try) 2>&5
13164  ac_status=$?
13165  echo "$as_me:13165: \$? = $ac_status" >&5
13166  (exit $ac_status); }; }; then
13167  ac_cv_type_signal=void
13168else
13169  echo "$as_me: failed program was:" >&5
13170cat conftest.$ac_ext >&5
13171ac_cv_type_signal=int
13172fi
13173rm -f conftest.$ac_objext conftest.$ac_ext
13174fi
13175echo "$as_me:13175: result: $ac_cv_type_signal" >&5
13176echo "${ECHO_T}$ac_cv_type_signal" >&6
13177
13178cat >>confdefs.h <<EOF
13179#define RETSIGTYPE $ac_cv_type_signal
13180EOF
13181
13182for ac_func in \
13183_nc_free_and_exit \
13184btowc \
13185mblen \
13186mbrlen \
13187mbrtowc \
13188mbtowc \
13189strcasecmp \
13190strftime \
13191tsearch \
13192waitpid \
13193wcsrtombs \
13194wcstombs \
13195wctob \
13196wctomb \
13197
13198do
13199as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13200echo "$as_me:13200: checking for $ac_func" >&5
13201echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13202if eval "test \"\${$as_ac_var+set}\" = set"; then
13203  echo $ECHO_N "(cached) $ECHO_C" >&6
13204else
13205  cat >conftest.$ac_ext <<_ACEOF
13206#line 13206 "configure"
13207#include "confdefs.h"
13208/* System header to define __stub macros and hopefully few prototypes,
13209    which can conflict with char $ac_func (); below.  */
13210#include <assert.h>
13211/* Override any gcc2 internal prototype to avoid an error.  */
13212#ifdef __cplusplus
13213extern "C"
13214#endif
13215/* We use char because int might match the return type of a gcc2
13216   builtin and then its argument prototype would still apply.  */
13217char $ac_func ();
13218char (*f) ();
13219
13220int
13221main ()
13222{
13223/* The GNU C library defines this for functions which it implements
13224    to always fail with ENOSYS.  Some functions are actually named
13225    something starting with __ and the normal name is an alias.  */
13226#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13227choke me
13228#else
13229f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13230#endif
13231
13232  ;
13233  return 0;
13234}
13235_ACEOF
13236rm -f conftest.$ac_objext conftest$ac_exeext
13237if { (eval echo "$as_me:13237: \"$ac_link\"") >&5
13238  (eval $ac_link) 2>&5
13239  ac_status=$?
13240  echo "$as_me:13240: \$? = $ac_status" >&5
13241  (exit $ac_status); } &&
13242         { ac_try='test -s conftest$ac_exeext'
13243  { (eval echo "$as_me:13243: \"$ac_try\"") >&5
13244  (eval $ac_try) 2>&5
13245  ac_status=$?
13246  echo "$as_me:13246: \$? = $ac_status" >&5
13247  (exit $ac_status); }; }; then
13248  eval "$as_ac_var=yes"
13249else
13250  echo "$as_me: failed program was:" >&5
13251cat conftest.$ac_ext >&5
13252eval "$as_ac_var=no"
13253fi
13254rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13255fi
13256echo "$as_me:13256: result: `eval echo '${'$as_ac_var'}'`" >&5
13257echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13258if test `eval echo '${'$as_ac_var'}'` = yes; then
13259  cat >>confdefs.h <<EOF
13260#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13261EOF
13262
13263fi
13264done
13265
13266echo "$as_me:13266: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13267echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13268if test "${cf_cv_need_xopen_extension+set}" = set; then
13269  echo $ECHO_N "(cached) $ECHO_C" >&6
13270else
13271
13272cat >conftest.$ac_ext <<_ACEOF
13273#line 13273 "configure"
13274#include "confdefs.h"
13275
13276#include <stdlib.h>
13277#include <${cf_cv_ncurses_header:-curses.h}>
13278int
13279main ()
13280{
13281
13282#if defined(NCURSES_VERSION_PATCH)
13283#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13284	make an error
13285#endif
13286#endif
13287	long x = winnstr(stdscr, "", 0);
13288	int x1, y1;
13289	getbegyx(stdscr, y1, x1)
13290  ;
13291  return 0;
13292}
13293_ACEOF
13294rm -f conftest.$ac_objext conftest$ac_exeext
13295if { (eval echo "$as_me:13295: \"$ac_link\"") >&5
13296  (eval $ac_link) 2>&5
13297  ac_status=$?
13298  echo "$as_me:13298: \$? = $ac_status" >&5
13299  (exit $ac_status); } &&
13300         { ac_try='test -s conftest$ac_exeext'
13301  { (eval echo "$as_me:13301: \"$ac_try\"") >&5
13302  (eval $ac_try) 2>&5
13303  ac_status=$?
13304  echo "$as_me:13304: \$? = $ac_status" >&5
13305  (exit $ac_status); }; }; then
13306  cf_cv_need_xopen_extension=no
13307else
13308  echo "$as_me: failed program was:" >&5
13309cat conftest.$ac_ext >&5
13310cat >conftest.$ac_ext <<_ACEOF
13311#line 13311 "configure"
13312#include "confdefs.h"
13313
13314#define _XOPEN_SOURCE_EXTENDED
13315#include <stdlib.h>
13316#include <${cf_cv_ncurses_header:-curses.h}>
13317int
13318main ()
13319{
13320
13321#ifdef NCURSES_VERSION
13322	cchar_t check;
13323	int check2 = curs_set((int)sizeof(check));
13324#endif
13325	long x = winnstr(stdscr, "", 0);
13326	int x1, y1;
13327	getbegyx(stdscr, y1, x1)
13328  ;
13329  return 0;
13330}
13331_ACEOF
13332rm -f conftest.$ac_objext conftest$ac_exeext
13333if { (eval echo "$as_me:13333: \"$ac_link\"") >&5
13334  (eval $ac_link) 2>&5
13335  ac_status=$?
13336  echo "$as_me:13336: \$? = $ac_status" >&5
13337  (exit $ac_status); } &&
13338         { ac_try='test -s conftest$ac_exeext'
13339  { (eval echo "$as_me:13339: \"$ac_try\"") >&5
13340  (eval $ac_try) 2>&5
13341  ac_status=$?
13342  echo "$as_me:13342: \$? = $ac_status" >&5
13343  (exit $ac_status); }; }; then
13344  cf_cv_need_xopen_extension=yes
13345else
13346  echo "$as_me: failed program was:" >&5
13347cat conftest.$ac_ext >&5
13348cf_cv_need_xopen_extension=unknown
13349fi
13350rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13351fi
13352rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13353fi
13354echo "$as_me:13354: result: $cf_cv_need_xopen_extension" >&5
13355echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
13356test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
13357
13358echo "$as_me:13358: checking for unctrl.h" >&5
13359echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
13360if test "${cf_cv_unctrl_header+set}" = set; then
13361  echo $ECHO_N "(cached) $ECHO_C" >&6
13362else
13363
13364# If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
13365# for <unctrl.h> if we do not find the variant.
13366
13367cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
13368
13369case ${cf_cv_ncurses_header:-curses.h} in #(vi
13370*/*)
13371	cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
13372	cf_header_list="$cf_header_item $cf_header_list"
13373	;;
13374esac
13375
13376for cf_header in $cf_header_list
13377do
13378	cat >conftest.$ac_ext <<_ACEOF
13379#line 13379 "configure"
13380#include "confdefs.h"
13381
13382#include <${cf_cv_ncurses_header:-curses.h}>
13383#include <${cf_header}>
13384int
13385main ()
13386{
13387WINDOW *x
13388  ;
13389  return 0;
13390}
13391_ACEOF
13392rm -f conftest.$ac_objext
13393if { (eval echo "$as_me:13393: \"$ac_compile\"") >&5
13394  (eval $ac_compile) 2>&5
13395  ac_status=$?
13396  echo "$as_me:13396: \$? = $ac_status" >&5
13397  (exit $ac_status); } &&
13398         { ac_try='test -s conftest.$ac_objext'
13399  { (eval echo "$as_me:13399: \"$ac_try\"") >&5
13400  (eval $ac_try) 2>&5
13401  ac_status=$?
13402  echo "$as_me:13402: \$? = $ac_status" >&5
13403  (exit $ac_status); }; }; then
13404  cf_cv_unctrl_header=$cf_header
13405	 break
13406else
13407  echo "$as_me: failed program was:" >&5
13408cat conftest.$ac_ext >&5
13409cf_cv_unctrl_header=no
13410fi
13411rm -f conftest.$ac_objext conftest.$ac_ext
13412done
13413
13414case $cf_cv_unctrl_header in #(vi
13415no)
13416	{ echo "$as_me:13416: WARNING: unctrl.h header not found" >&5
13417echo "$as_me: WARNING: unctrl.h header not found" >&2;}
13418	;;
13419esac
13420
13421fi
13422echo "$as_me:13422: result: $cf_cv_unctrl_header" >&5
13423echo "${ECHO_T}$cf_cv_unctrl_header" >&6
13424
13425case $cf_cv_unctrl_header in #(vi
13426unctrl.h) #(vi
13427
13428cat >>confdefs.h <<\EOF
13429#define HAVE_UNCTRL_H 1
13430EOF
13431
13432	;;
13433ncurses/unctrl.h) #(vi
13434
13435cat >>confdefs.h <<\EOF
13436#define HAVE_NCURSES_UNCTRL_H 1
13437EOF
13438
13439	;;
13440ncursesw/unctrl.h)
13441
13442cat >>confdefs.h <<\EOF
13443#define HAVE_NCURSESW_UNCTRL_H 1
13444EOF
13445
13446	;;
13447esac
13448
13449for cf_func in \
13450flushinp \
13451getattrs \
13452getbegx \
13453getbegy \
13454getbegyx \
13455getcurx \
13456getcury \
13457getmaxx \
13458getmaxy \
13459getmaxyx \
13460getparx \
13461getpary \
13462getparyx \
13463use_default_colors \
13464wchgat \
13465wcursyncup \
13466wget_wch \
13467wsyncup \
13468
13469do
13470
13471cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13472
13473	echo "$as_me:13473: checking for ${cf_func}" >&5
13474echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
13475
13476echo "${as_me:-configure}:13476: testing ${cf_func} ..." 1>&5
13477
13478	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
13479  echo $ECHO_N "(cached) $ECHO_C" >&6
13480else
13481
13482		eval cf_result='$ac_cv_func_'$cf_func
13483		if test ".$cf_result" != ".no"; then
13484			cat >conftest.$ac_ext <<_ACEOF
13485#line 13485 "configure"
13486#include "confdefs.h"
13487
13488#ifdef HAVE_XCURSES
13489#include <xcurses.h>
13490char * XCursesProgramName = "test";
13491#else
13492#include <${cf_cv_ncurses_header:-curses.h}>
13493#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13494#include <ncursesw/term.h>
13495#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13496#include <ncurses/term.h>
13497#elif defined(HAVE_TERM_H)
13498#include <term.h>
13499#endif
13500#endif
13501
13502int
13503main ()
13504{
13505
13506#ifndef ${cf_func}
13507long foo = (long)(&${cf_func});
13508if (foo + 1234 > 5678)
13509	${cf_cv_main_return:-return}(foo);
13510#endif
13511
13512  ;
13513  return 0;
13514}
13515_ACEOF
13516rm -f conftest.$ac_objext conftest$ac_exeext
13517if { (eval echo "$as_me:13517: \"$ac_link\"") >&5
13518  (eval $ac_link) 2>&5
13519  ac_status=$?
13520  echo "$as_me:13520: \$? = $ac_status" >&5
13521  (exit $ac_status); } &&
13522         { ac_try='test -s conftest$ac_exeext'
13523  { (eval echo "$as_me:13523: \"$ac_try\"") >&5
13524  (eval $ac_try) 2>&5
13525  ac_status=$?
13526  echo "$as_me:13526: \$? = $ac_status" >&5
13527  (exit $ac_status); }; }; then
13528  cf_result=yes
13529else
13530  echo "$as_me: failed program was:" >&5
13531cat conftest.$ac_ext >&5
13532cf_result=no
13533fi
13534rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13535		fi
13536		eval 'cf_cv_func_'$cf_func'=$cf_result'
13537
13538fi
13539
13540	# use the computed/retrieved cache-value:
13541	eval 'cf_result=$cf_cv_func_'$cf_func
13542	echo "$as_me:13542: result: $cf_result" >&5
13543echo "${ECHO_T}$cf_result" >&6
13544	if test $cf_result != no; then
13545		cat >>confdefs.h <<EOF
13546#define HAVE_${cf_tr_func} 1
13547EOF
13548
13549	fi
13550done
13551
13552echo "$as_me:13552: checking for start_color" >&5
13553echo $ECHO_N "checking for start_color... $ECHO_C" >&6
13554if test "${ac_cv_func_start_color+set}" = set; then
13555  echo $ECHO_N "(cached) $ECHO_C" >&6
13556else
13557  cat >conftest.$ac_ext <<_ACEOF
13558#line 13558 "configure"
13559#include "confdefs.h"
13560/* System header to define __stub macros and hopefully few prototypes,
13561    which can conflict with char start_color (); below.  */
13562#include <assert.h>
13563/* Override any gcc2 internal prototype to avoid an error.  */
13564#ifdef __cplusplus
13565extern "C"
13566#endif
13567/* We use char because int might match the return type of a gcc2
13568   builtin and then its argument prototype would still apply.  */
13569char start_color ();
13570char (*f) ();
13571
13572int
13573main ()
13574{
13575/* The GNU C library defines this for functions which it implements
13576    to always fail with ENOSYS.  Some functions are actually named
13577    something starting with __ and the normal name is an alias.  */
13578#if defined (__stub_start_color) || defined (__stub___start_color)
13579choke me
13580#else
13581f = start_color; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13582#endif
13583
13584  ;
13585  return 0;
13586}
13587_ACEOF
13588rm -f conftest.$ac_objext conftest$ac_exeext
13589if { (eval echo "$as_me:13589: \"$ac_link\"") >&5
13590  (eval $ac_link) 2>&5
13591  ac_status=$?
13592  echo "$as_me:13592: \$? = $ac_status" >&5
13593  (exit $ac_status); } &&
13594         { ac_try='test -s conftest$ac_exeext'
13595  { (eval echo "$as_me:13595: \"$ac_try\"") >&5
13596  (eval $ac_try) 2>&5
13597  ac_status=$?
13598  echo "$as_me:13598: \$? = $ac_status" >&5
13599  (exit $ac_status); }; }; then
13600  ac_cv_func_start_color=yes
13601else
13602  echo "$as_me: failed program was:" >&5
13603cat conftest.$ac_ext >&5
13604ac_cv_func_start_color=no
13605fi
13606rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13607fi
13608echo "$as_me:13608: result: $ac_cv_func_start_color" >&5
13609echo "${ECHO_T}$ac_cv_func_start_color" >&6
13610if test $ac_cv_func_start_color = yes; then
13611
13612cat >>confdefs.h <<\EOF
13613#define HAVE_COLOR 1
13614EOF
13615
13616fi
13617
13618echo "$as_me:13618: checking for chtype typedef" >&5
13619echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
13620if test "${cf_cv_chtype_decl+set}" = set; then
13621  echo $ECHO_N "(cached) $ECHO_C" >&6
13622else
13623
13624	cat >conftest.$ac_ext <<_ACEOF
13625#line 13625 "configure"
13626#include "confdefs.h"
13627#include <${cf_cv_ncurses_header:-curses.h}>
13628int
13629main ()
13630{
13631chtype foo
13632  ;
13633  return 0;
13634}
13635_ACEOF
13636rm -f conftest.$ac_objext
13637if { (eval echo "$as_me:13637: \"$ac_compile\"") >&5
13638  (eval $ac_compile) 2>&5
13639  ac_status=$?
13640  echo "$as_me:13640: \$? = $ac_status" >&5
13641  (exit $ac_status); } &&
13642         { ac_try='test -s conftest.$ac_objext'
13643  { (eval echo "$as_me:13643: \"$ac_try\"") >&5
13644  (eval $ac_try) 2>&5
13645  ac_status=$?
13646  echo "$as_me:13646: \$? = $ac_status" >&5
13647  (exit $ac_status); }; }; then
13648  cf_cv_chtype_decl=yes
13649else
13650  echo "$as_me: failed program was:" >&5
13651cat conftest.$ac_ext >&5
13652cf_cv_chtype_decl=no
13653fi
13654rm -f conftest.$ac_objext conftest.$ac_ext
13655fi
13656echo "$as_me:13656: result: $cf_cv_chtype_decl" >&5
13657echo "${ECHO_T}$cf_cv_chtype_decl" >&6
13658if test $cf_cv_chtype_decl = yes ; then
13659
13660cat >>confdefs.h <<\EOF
13661#define HAVE_TYPE_CHTYPE 1
13662EOF
13663
13664	echo "$as_me:13664: checking if chtype is scalar or struct" >&5
13665echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
13666if test "${cf_cv_chtype_type+set}" = set; then
13667  echo $ECHO_N "(cached) $ECHO_C" >&6
13668else
13669
13670		cat >conftest.$ac_ext <<_ACEOF
13671#line 13671 "configure"
13672#include "confdefs.h"
13673#include <${cf_cv_ncurses_header:-curses.h}>
13674int
13675main ()
13676{
13677chtype foo; long x = foo
13678  ;
13679  return 0;
13680}
13681_ACEOF
13682rm -f conftest.$ac_objext
13683if { (eval echo "$as_me:13683: \"$ac_compile\"") >&5
13684  (eval $ac_compile) 2>&5
13685  ac_status=$?
13686  echo "$as_me:13686: \$? = $ac_status" >&5
13687  (exit $ac_status); } &&
13688         { ac_try='test -s conftest.$ac_objext'
13689  { (eval echo "$as_me:13689: \"$ac_try\"") >&5
13690  (eval $ac_try) 2>&5
13691  ac_status=$?
13692  echo "$as_me:13692: \$? = $ac_status" >&5
13693  (exit $ac_status); }; }; then
13694  cf_cv_chtype_type=scalar
13695else
13696  echo "$as_me: failed program was:" >&5
13697cat conftest.$ac_ext >&5
13698cf_cv_chtype_type=struct
13699fi
13700rm -f conftest.$ac_objext conftest.$ac_ext
13701fi
13702echo "$as_me:13702: result: $cf_cv_chtype_type" >&5
13703echo "${ECHO_T}$cf_cv_chtype_type" >&6
13704	if test $cf_cv_chtype_type = scalar ; then
13705
13706cat >>confdefs.h <<\EOF
13707#define TYPE_CHTYPE_IS_SCALAR 1
13708EOF
13709
13710	fi
13711fi
13712
13713echo "$as_me:13713: checking for wide alternate character set array" >&5
13714echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
13715if test "${cf_cv_curses_wacs_map+set}" = set; then
13716  echo $ECHO_N "(cached) $ECHO_C" >&6
13717else
13718
13719	cf_cv_curses_wacs_map=unknown
13720	for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
13721	do
13722	cat >conftest.$ac_ext <<_ACEOF
13723#line 13723 "configure"
13724#include "confdefs.h"
13725
13726#ifndef _XOPEN_SOURCE_EXTENDED
13727#define _XOPEN_SOURCE_EXTENDED
13728#endif
13729#include <${cf_cv_ncurses_header:-curses.h}>
13730int
13731main ()
13732{
13733void *foo = &($name['k'])
13734  ;
13735  return 0;
13736}
13737_ACEOF
13738rm -f conftest.$ac_objext conftest$ac_exeext
13739if { (eval echo "$as_me:13739: \"$ac_link\"") >&5
13740  (eval $ac_link) 2>&5
13741  ac_status=$?
13742  echo "$as_me:13742: \$? = $ac_status" >&5
13743  (exit $ac_status); } &&
13744         { ac_try='test -s conftest$ac_exeext'
13745  { (eval echo "$as_me:13745: \"$ac_try\"") >&5
13746  (eval $ac_try) 2>&5
13747  ac_status=$?
13748  echo "$as_me:13748: \$? = $ac_status" >&5
13749  (exit $ac_status); }; }; then
13750  cf_cv_curses_wacs_map=$name
13751	 break
13752else
13753  echo "$as_me: failed program was:" >&5
13754cat conftest.$ac_ext >&5
13755fi
13756rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13757	done
13758fi
13759echo "$as_me:13759: result: $cf_cv_curses_wacs_map" >&5
13760echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
13761
13762test "$cf_cv_curses_wacs_map" != unknown &&
13763cat >>confdefs.h <<EOF
13764#define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
13765EOF
13766
13767echo "$as_me:13767: checking for wide alternate character constants" >&5
13768echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
13769if test "${cf_cv_curses_wacs_symbols+set}" = set; then
13770  echo $ECHO_N "(cached) $ECHO_C" >&6
13771else
13772
13773cf_cv_curses_wacs_symbols=no
13774if test "$cf_cv_curses_wacs_map" != unknown
13775then
13776	cat >conftest.$ac_ext <<_ACEOF
13777#line 13777 "configure"
13778#include "confdefs.h"
13779
13780#ifndef _XOPEN_SOURCE_EXTENDED
13781#define _XOPEN_SOURCE_EXTENDED
13782#endif
13783#include <${cf_cv_ncurses_header:-curses.h}>
13784int
13785main ()
13786{
13787cchar_t *foo = WACS_PLUS;
13788	 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
13789  ;
13790  return 0;
13791}
13792_ACEOF
13793rm -f conftest.$ac_objext conftest$ac_exeext
13794if { (eval echo "$as_me:13794: \"$ac_link\"") >&5
13795  (eval $ac_link) 2>&5
13796  ac_status=$?
13797  echo "$as_me:13797: \$? = $ac_status" >&5
13798  (exit $ac_status); } &&
13799         { ac_try='test -s conftest$ac_exeext'
13800  { (eval echo "$as_me:13800: \"$ac_try\"") >&5
13801  (eval $ac_try) 2>&5
13802  ac_status=$?
13803  echo "$as_me:13803: \$? = $ac_status" >&5
13804  (exit $ac_status); }; }; then
13805  cf_cv_curses_wacs_symbols=yes
13806else
13807  echo "$as_me: failed program was:" >&5
13808cat conftest.$ac_ext >&5
13809fi
13810rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13811else
13812	cat >conftest.$ac_ext <<_ACEOF
13813#line 13813 "configure"
13814#include "confdefs.h"
13815
13816#ifndef _XOPEN_SOURCE_EXTENDED
13817#define _XOPEN_SOURCE_EXTENDED
13818#endif
13819#include <${cf_cv_ncurses_header:-curses.h}>
13820int
13821main ()
13822{
13823cchar_t *foo = WACS_PLUS
13824  ;
13825  return 0;
13826}
13827_ACEOF
13828rm -f conftest.$ac_objext conftest$ac_exeext
13829if { (eval echo "$as_me:13829: \"$ac_link\"") >&5
13830  (eval $ac_link) 2>&5
13831  ac_status=$?
13832  echo "$as_me:13832: \$? = $ac_status" >&5
13833  (exit $ac_status); } &&
13834         { ac_try='test -s conftest$ac_exeext'
13835  { (eval echo "$as_me:13835: \"$ac_try\"") >&5
13836  (eval $ac_try) 2>&5
13837  ac_status=$?
13838  echo "$as_me:13838: \$? = $ac_status" >&5
13839  (exit $ac_status); }; }; then
13840  cf_cv_curses_wacs_symbols=yes
13841else
13842  echo "$as_me: failed program was:" >&5
13843cat conftest.$ac_ext >&5
13844fi
13845rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13846fi
13847
13848fi
13849echo "$as_me:13849: result: $cf_cv_curses_wacs_symbols" >&5
13850echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
13851
13852test "$cf_cv_curses_wacs_symbols" != no &&
13853cat >>confdefs.h <<\EOF
13854#define CURSES_WACS_SYMBOLS 1
13855EOF
13856
13857for cf_func in wgetparent
13858do
13859
13860cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13861
13862	echo "$as_me:13862: checking for ${cf_func}" >&5
13863echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
13864
13865echo "${as_me:-configure}:13865: testing ${cf_func} ..." 1>&5
13866
13867	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
13868  echo $ECHO_N "(cached) $ECHO_C" >&6
13869else
13870
13871		eval cf_result='$ac_cv_func_'$cf_func
13872		if test ".$cf_result" != ".no"; then
13873			cat >conftest.$ac_ext <<_ACEOF
13874#line 13874 "configure"
13875#include "confdefs.h"
13876
13877#ifdef HAVE_XCURSES
13878#include <xcurses.h>
13879char * XCursesProgramName = "test";
13880#else
13881#include <${cf_cv_ncurses_header:-curses.h}>
13882#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13883#include <ncursesw/term.h>
13884#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13885#include <ncurses/term.h>
13886#elif defined(HAVE_TERM_H)
13887#include <term.h>
13888#endif
13889#endif
13890
13891int
13892main ()
13893{
13894
13895#ifndef ${cf_func}
13896long foo = (long)(&${cf_func});
13897if (foo + 1234 > 5678)
13898	${cf_cv_main_return:-return}(foo);
13899#endif
13900
13901  ;
13902  return 0;
13903}
13904_ACEOF
13905rm -f conftest.$ac_objext conftest$ac_exeext
13906if { (eval echo "$as_me:13906: \"$ac_link\"") >&5
13907  (eval $ac_link) 2>&5
13908  ac_status=$?
13909  echo "$as_me:13909: \$? = $ac_status" >&5
13910  (exit $ac_status); } &&
13911         { ac_try='test -s conftest$ac_exeext'
13912  { (eval echo "$as_me:13912: \"$ac_try\"") >&5
13913  (eval $ac_try) 2>&5
13914  ac_status=$?
13915  echo "$as_me:13915: \$? = $ac_status" >&5
13916  (exit $ac_status); }; }; then
13917  cf_result=yes
13918else
13919  echo "$as_me: failed program was:" >&5
13920cat conftest.$ac_ext >&5
13921cf_result=no
13922fi
13923rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13924		fi
13925		eval 'cf_cv_func_'$cf_func'=$cf_result'
13926
13927fi
13928
13929	# use the computed/retrieved cache-value:
13930	eval 'cf_result=$cf_cv_func_'$cf_func
13931	echo "$as_me:13931: result: $cf_result" >&5
13932echo "${ECHO_T}$cf_result" >&6
13933	if test $cf_result != no; then
13934		cat >>confdefs.h <<EOF
13935#define HAVE_${cf_tr_func} 1
13936EOF
13937
13938	fi
13939done
13940
13941if test "x$cf_cv_func_wgetparent" != xyes
13942then
13943	echo "$as_me:13943: checking if WINDOW has _parent member" >&5
13944echo $ECHO_N "checking if WINDOW has _parent member... $ECHO_C" >&6
13945	cat >conftest.$ac_ext <<_ACEOF
13946#line 13946 "configure"
13947#include "confdefs.h"
13948#include <${cf_cv_ncurses_header:-curses.h}>
13949int
13950main ()
13951{
13952WINDOW *p = stdscr->_parent
13953  ;
13954  return 0;
13955}
13956_ACEOF
13957rm -f conftest.$ac_objext
13958if { (eval echo "$as_me:13958: \"$ac_compile\"") >&5
13959  (eval $ac_compile) 2>&5
13960  ac_status=$?
13961  echo "$as_me:13961: \$? = $ac_status" >&5
13962  (exit $ac_status); } &&
13963         { ac_try='test -s conftest.$ac_objext'
13964  { (eval echo "$as_me:13964: \"$ac_try\"") >&5
13965  (eval $ac_try) 2>&5
13966  ac_status=$?
13967  echo "$as_me:13967: \$? = $ac_status" >&5
13968  (exit $ac_status); }; }; then
13969  cf_window__parent=yes
13970else
13971  echo "$as_me: failed program was:" >&5
13972cat conftest.$ac_ext >&5
13973cf_window__parent=no
13974fi
13975rm -f conftest.$ac_objext conftest.$ac_ext
13976	echo "$as_me:13976: result: $cf_window__parent" >&5
13977echo "${ECHO_T}$cf_window__parent" >&6
13978	if test "$cf_window__parent" = yes
13979	then
13980
13981cat >>confdefs.h <<\EOF
13982#define HAVE_WINDOW__PARENT 1
13983EOF
13984
13985	fi
13986fi
13987
13988for ac_header in sys/wait.h
13989do
13990as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13991echo "$as_me:13991: checking for $ac_header" >&5
13992echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13993if eval "test \"\${$as_ac_Header+set}\" = set"; then
13994  echo $ECHO_N "(cached) $ECHO_C" >&6
13995else
13996  cat >conftest.$ac_ext <<_ACEOF
13997#line 13997 "configure"
13998#include "confdefs.h"
13999#include <$ac_header>
14000_ACEOF
14001if { (eval echo "$as_me:14001: \"$ac_cpp conftest.$ac_ext\"") >&5
14002  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14003  ac_status=$?
14004  egrep -v '^ *\+' conftest.er1 >conftest.err
14005  rm -f conftest.er1
14006  cat conftest.err >&5
14007  echo "$as_me:14007: \$? = $ac_status" >&5
14008  (exit $ac_status); } >/dev/null; then
14009  if test -s conftest.err; then
14010    ac_cpp_err=$ac_c_preproc_warn_flag
14011  else
14012    ac_cpp_err=
14013  fi
14014else
14015  ac_cpp_err=yes
14016fi
14017if test -z "$ac_cpp_err"; then
14018  eval "$as_ac_Header=yes"
14019else
14020  echo "$as_me: failed program was:" >&5
14021  cat conftest.$ac_ext >&5
14022  eval "$as_ac_Header=no"
14023fi
14024rm -f conftest.err conftest.$ac_ext
14025fi
14026echo "$as_me:14026: result: `eval echo '${'$as_ac_Header'}'`" >&5
14027echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14028if test `eval echo '${'$as_ac_Header'}'` = yes; then
14029  cat >>confdefs.h <<EOF
14030#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14031EOF
14032
14033fi
14034done
14035
14036cf_wait_headers="#include <sys/types.h>
14037"
14038if test $ac_cv_header_sys_wait_h = yes; then
14039cf_wait_headers="$cf_wait_headers
14040#include <sys/wait.h>
14041"
14042else
14043
14044for ac_header in wait.h
14045do
14046as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14047echo "$as_me:14047: checking for $ac_header" >&5
14048echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14049if eval "test \"\${$as_ac_Header+set}\" = set"; then
14050  echo $ECHO_N "(cached) $ECHO_C" >&6
14051else
14052  cat >conftest.$ac_ext <<_ACEOF
14053#line 14053 "configure"
14054#include "confdefs.h"
14055#include <$ac_header>
14056_ACEOF
14057if { (eval echo "$as_me:14057: \"$ac_cpp conftest.$ac_ext\"") >&5
14058  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14059  ac_status=$?
14060  egrep -v '^ *\+' conftest.er1 >conftest.err
14061  rm -f conftest.er1
14062  cat conftest.err >&5
14063  echo "$as_me:14063: \$? = $ac_status" >&5
14064  (exit $ac_status); } >/dev/null; then
14065  if test -s conftest.err; then
14066    ac_cpp_err=$ac_c_preproc_warn_flag
14067  else
14068    ac_cpp_err=
14069  fi
14070else
14071  ac_cpp_err=yes
14072fi
14073if test -z "$ac_cpp_err"; then
14074  eval "$as_ac_Header=yes"
14075else
14076  echo "$as_me: failed program was:" >&5
14077  cat conftest.$ac_ext >&5
14078  eval "$as_ac_Header=no"
14079fi
14080rm -f conftest.err conftest.$ac_ext
14081fi
14082echo "$as_me:14082: result: `eval echo '${'$as_ac_Header'}'`" >&5
14083echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14084if test `eval echo '${'$as_ac_Header'}'` = yes; then
14085  cat >>confdefs.h <<EOF
14086#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14087EOF
14088
14089fi
14090done
14091
14092for ac_header in waitstatus.h
14093do
14094as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14095echo "$as_me:14095: checking for $ac_header" >&5
14096echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14097if eval "test \"\${$as_ac_Header+set}\" = set"; then
14098  echo $ECHO_N "(cached) $ECHO_C" >&6
14099else
14100  cat >conftest.$ac_ext <<_ACEOF
14101#line 14101 "configure"
14102#include "confdefs.h"
14103#include <$ac_header>
14104_ACEOF
14105if { (eval echo "$as_me:14105: \"$ac_cpp conftest.$ac_ext\"") >&5
14106  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14107  ac_status=$?
14108  egrep -v '^ *\+' conftest.er1 >conftest.err
14109  rm -f conftest.er1
14110  cat conftest.err >&5
14111  echo "$as_me:14111: \$? = $ac_status" >&5
14112  (exit $ac_status); } >/dev/null; then
14113  if test -s conftest.err; then
14114    ac_cpp_err=$ac_c_preproc_warn_flag
14115  else
14116    ac_cpp_err=
14117  fi
14118else
14119  ac_cpp_err=yes
14120fi
14121if test -z "$ac_cpp_err"; then
14122  eval "$as_ac_Header=yes"
14123else
14124  echo "$as_me: failed program was:" >&5
14125  cat conftest.$ac_ext >&5
14126  eval "$as_ac_Header=no"
14127fi
14128rm -f conftest.err conftest.$ac_ext
14129fi
14130echo "$as_me:14130: result: `eval echo '${'$as_ac_Header'}'`" >&5
14131echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14132if test `eval echo '${'$as_ac_Header'}'` = yes; then
14133  cat >>confdefs.h <<EOF
14134#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14135EOF
14136
14137fi
14138done
14139
14140if test $ac_cv_header_wait_h = yes; then
14141cf_wait_headers="$cf_wait_headers
14142#include <wait.h>
14143"
14144fi
14145if test $ac_cv_header_waitstatus_h = yes; then
14146cf_wait_headers="$cf_wait_headers
14147#include <waitstatus.h>
14148"
14149fi
14150fi
14151
14152echo "$as_me:14152: checking for union wait" >&5
14153echo $ECHO_N "checking for union wait... $ECHO_C" >&6
14154if test "${cf_cv_type_unionwait+set}" = set; then
14155  echo $ECHO_N "(cached) $ECHO_C" >&6
14156else
14157
14158	cat >conftest.$ac_ext <<_ACEOF
14159#line 14159 "configure"
14160#include "confdefs.h"
14161$cf_wait_headers
14162int
14163main ()
14164{
14165int x;
14166	 int y = WEXITSTATUS(x);
14167	 int z = WTERMSIG(x);
14168	 wait(&x);
14169
14170  ;
14171  return 0;
14172}
14173_ACEOF
14174rm -f conftest.$ac_objext conftest$ac_exeext
14175if { (eval echo "$as_me:14175: \"$ac_link\"") >&5
14176  (eval $ac_link) 2>&5
14177  ac_status=$?
14178  echo "$as_me:14178: \$? = $ac_status" >&5
14179  (exit $ac_status); } &&
14180         { ac_try='test -s conftest$ac_exeext'
14181  { (eval echo "$as_me:14181: \"$ac_try\"") >&5
14182  (eval $ac_try) 2>&5
14183  ac_status=$?
14184  echo "$as_me:14184: \$? = $ac_status" >&5
14185  (exit $ac_status); }; }; then
14186  cf_cv_type_unionwait=no
14187	 echo compiles ok w/o union wait 1>&5
14188
14189else
14190  echo "$as_me: failed program was:" >&5
14191cat conftest.$ac_ext >&5
14192
14193	cat >conftest.$ac_ext <<_ACEOF
14194#line 14194 "configure"
14195#include "confdefs.h"
14196$cf_wait_headers
14197int
14198main ()
14199{
14200union wait x;
14201#ifdef WEXITSTATUS
14202	 int y = WEXITSTATUS(x);
14203#endif
14204#ifdef WTERMSIG
14205	 int z = WTERMSIG(x);
14206#endif
14207	 wait(&x);
14208
14209  ;
14210  return 0;
14211}
14212_ACEOF
14213rm -f conftest.$ac_objext conftest$ac_exeext
14214if { (eval echo "$as_me:14214: \"$ac_link\"") >&5
14215  (eval $ac_link) 2>&5
14216  ac_status=$?
14217  echo "$as_me:14217: \$? = $ac_status" >&5
14218  (exit $ac_status); } &&
14219         { ac_try='test -s conftest$ac_exeext'
14220  { (eval echo "$as_me:14220: \"$ac_try\"") >&5
14221  (eval $ac_try) 2>&5
14222  ac_status=$?
14223  echo "$as_me:14223: \$? = $ac_status" >&5
14224  (exit $ac_status); }; }; then
14225  cf_cv_type_unionwait=yes
14226	 echo compiles ok with union wait and possibly macros too 1>&5
14227
14228else
14229  echo "$as_me: failed program was:" >&5
14230cat conftest.$ac_ext >&5
14231cf_cv_type_unionwait=no
14232fi
14233rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14234fi
14235rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14236fi
14237
14238echo "$as_me:14238: result: $cf_cv_type_unionwait" >&5
14239echo "${ECHO_T}$cf_cv_type_unionwait" >&6
14240test $cf_cv_type_unionwait = yes &&
14241cat >>confdefs.h <<\EOF
14242#define HAVE_TYPE_UNIONWAIT 1
14243EOF
14244
14245if test $cf_cv_type_unionwait = yes; then
14246
14247	echo "$as_me:14247: checking if union wait can be used as wait-arg" >&5
14248echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
14249	if test "${cf_cv_arg_union_wait+set}" = set; then
14250  echo $ECHO_N "(cached) $ECHO_C" >&6
14251else
14252
14253		cat >conftest.$ac_ext <<_ACEOF
14254#line 14254 "configure"
14255#include "confdefs.h"
14256$cf_wait_headers
14257int
14258main ()
14259{
14260union wait x; wait(&x)
14261  ;
14262  return 0;
14263}
14264_ACEOF
14265rm -f conftest.$ac_objext
14266if { (eval echo "$as_me:14266: \"$ac_compile\"") >&5
14267  (eval $ac_compile) 2>&5
14268  ac_status=$?
14269  echo "$as_me:14269: \$? = $ac_status" >&5
14270  (exit $ac_status); } &&
14271         { ac_try='test -s conftest.$ac_objext'
14272  { (eval echo "$as_me:14272: \"$ac_try\"") >&5
14273  (eval $ac_try) 2>&5
14274  ac_status=$?
14275  echo "$as_me:14275: \$? = $ac_status" >&5
14276  (exit $ac_status); }; }; then
14277  cf_cv_arg_union_wait=yes
14278else
14279  echo "$as_me: failed program was:" >&5
14280cat conftest.$ac_ext >&5
14281cf_cv_arg_union_wait=no
14282fi
14283rm -f conftest.$ac_objext conftest.$ac_ext
14284
14285fi
14286
14287	echo "$as_me:14287: result: $cf_cv_arg_union_wait" >&5
14288echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
14289	test $cf_cv_arg_union_wait = yes &&
14290cat >>confdefs.h <<\EOF
14291#define WAIT_USES_UNION 1
14292EOF
14293
14294	echo "$as_me:14294: checking if union wait can be used as waitpid-arg" >&5
14295echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
14296	if test "${cf_cv_arg_union_waitpid+set}" = set; then
14297  echo $ECHO_N "(cached) $ECHO_C" >&6
14298else
14299
14300		cat >conftest.$ac_ext <<_ACEOF
14301#line 14301 "configure"
14302#include "confdefs.h"
14303$cf_wait_headers
14304int
14305main ()
14306{
14307union wait x; waitpid(0, &x, 0)
14308  ;
14309  return 0;
14310}
14311_ACEOF
14312rm -f conftest.$ac_objext
14313if { (eval echo "$as_me:14313: \"$ac_compile\"") >&5
14314  (eval $ac_compile) 2>&5
14315  ac_status=$?
14316  echo "$as_me:14316: \$? = $ac_status" >&5
14317  (exit $ac_status); } &&
14318         { ac_try='test -s conftest.$ac_objext'
14319  { (eval echo "$as_me:14319: \"$ac_try\"") >&5
14320  (eval $ac_try) 2>&5
14321  ac_status=$?
14322  echo "$as_me:14322: \$? = $ac_status" >&5
14323  (exit $ac_status); }; }; then
14324  cf_cv_arg_union_waitpid=yes
14325else
14326  echo "$as_me: failed program was:" >&5
14327cat conftest.$ac_ext >&5
14328cf_cv_arg_union_waitpid=no
14329fi
14330rm -f conftest.$ac_objext conftest.$ac_ext
14331
14332fi
14333
14334	echo "$as_me:14334: result: $cf_cv_arg_union_waitpid" >&5
14335echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
14336	test $cf_cv_arg_union_waitpid = yes &&
14337cat >>confdefs.h <<\EOF
14338#define WAITPID_USES_UNION 1
14339EOF
14340
14341fi
14342
14343echo "$as_me:14343: checking if we must include wchar.h to declare mbstate_t" >&5
14344echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
14345if test "${cf_cv_mbstate_t+set}" = set; then
14346  echo $ECHO_N "(cached) $ECHO_C" >&6
14347else
14348
14349cat >conftest.$ac_ext <<_ACEOF
14350#line 14350 "configure"
14351#include "confdefs.h"
14352
14353#include <stdlib.h>
14354#include <stdio.h>
14355#ifdef HAVE_LIBUTF8_H
14356#include <libutf8.h>
14357#endif
14358int
14359main ()
14360{
14361mbstate_t state
14362  ;
14363  return 0;
14364}
14365_ACEOF
14366rm -f conftest.$ac_objext
14367if { (eval echo "$as_me:14367: \"$ac_compile\"") >&5
14368  (eval $ac_compile) 2>&5
14369  ac_status=$?
14370  echo "$as_me:14370: \$? = $ac_status" >&5
14371  (exit $ac_status); } &&
14372         { ac_try='test -s conftest.$ac_objext'
14373  { (eval echo "$as_me:14373: \"$ac_try\"") >&5
14374  (eval $ac_try) 2>&5
14375  ac_status=$?
14376  echo "$as_me:14376: \$? = $ac_status" >&5
14377  (exit $ac_status); }; }; then
14378  cf_cv_mbstate_t=no
14379else
14380  echo "$as_me: failed program was:" >&5
14381cat conftest.$ac_ext >&5
14382cat >conftest.$ac_ext <<_ACEOF
14383#line 14383 "configure"
14384#include "confdefs.h"
14385
14386#include <stdlib.h>
14387#include <stdio.h>
14388#include <wchar.h>
14389#ifdef HAVE_LIBUTF8_H
14390#include <libutf8.h>
14391#endif
14392int
14393main ()
14394{
14395mbstate_t value
14396  ;
14397  return 0;
14398}
14399_ACEOF
14400rm -f conftest.$ac_objext
14401if { (eval echo "$as_me:14401: \"$ac_compile\"") >&5
14402  (eval $ac_compile) 2>&5
14403  ac_status=$?
14404  echo "$as_me:14404: \$? = $ac_status" >&5
14405  (exit $ac_status); } &&
14406         { ac_try='test -s conftest.$ac_objext'
14407  { (eval echo "$as_me:14407: \"$ac_try\"") >&5
14408  (eval $ac_try) 2>&5
14409  ac_status=$?
14410  echo "$as_me:14410: \$? = $ac_status" >&5
14411  (exit $ac_status); }; }; then
14412  cf_cv_mbstate_t=yes
14413else
14414  echo "$as_me: failed program was:" >&5
14415cat conftest.$ac_ext >&5
14416cf_cv_mbstate_t=unknown
14417fi
14418rm -f conftest.$ac_objext conftest.$ac_ext
14419fi
14420rm -f conftest.$ac_objext conftest.$ac_ext
14421fi
14422echo "$as_me:14422: result: $cf_cv_mbstate_t" >&5
14423echo "${ECHO_T}$cf_cv_mbstate_t" >&6
14424
14425if test "$cf_cv_mbstate_t" = yes ; then
14426
14427cat >>confdefs.h <<\EOF
14428#define NEED_WCHAR_H 1
14429EOF
14430
14431fi
14432
14433if test "$cf_cv_mbstate_t" != unknown ; then
14434
14435cat >>confdefs.h <<\EOF
14436#define HAVE_MBSTATE_T 1
14437EOF
14438
14439fi
14440
14441PACKAGE_PREFIX=DLG
14442PACKAGE_CONFIG=dlg_config.h
14443
14444EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
14445
14446cat >conftest.$ac_ext <<_ACEOF
14447#line 14447 "configure"
14448#include "confdefs.h"
14449#include <locale.h>
14450int
14451main ()
14452{
14453setlocale(LC_ALL, "")
14454  ;
14455  return 0;
14456}
14457_ACEOF
14458rm -f conftest.$ac_objext conftest$ac_exeext
14459if { (eval echo "$as_me:14459: \"$ac_link\"") >&5
14460  (eval $ac_link) 2>&5
14461  ac_status=$?
14462  echo "$as_me:14462: \$? = $ac_status" >&5
14463  (exit $ac_status); } &&
14464         { ac_try='test -s conftest$ac_exeext'
14465  { (eval echo "$as_me:14465: \"$ac_try\"") >&5
14466  (eval $ac_try) 2>&5
14467  ac_status=$?
14468  echo "$as_me:14468: \$? = $ac_status" >&5
14469  (exit $ac_status); }; }; then
14470
14471cat >>confdefs.h <<\EOF
14472#define HAVE_SETLOCALE 1
14473EOF
14474
14475else
14476  echo "$as_me: failed program was:" >&5
14477cat conftest.$ac_ext >&5
14478fi
14479rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14480
14481LD_RPATH_OPT=
14482echo "$as_me:14482: checking for an rpath option" >&5
14483echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
14484case $cf_cv_system_name in #(vi
14485irix*) #(vi
14486	if test "$GCC" = yes; then
14487		LD_RPATH_OPT="-Wl,-rpath,"
14488	else
14489		LD_RPATH_OPT="-rpath "
14490	fi
14491	;;
14492linux*|gnu*|k*bsd*-gnu) #(vi
14493	LD_RPATH_OPT="-Wl,-rpath,"
14494	;;
14495openbsd[2-9].*|mirbsd*) #(vi
14496	LD_RPATH_OPT="-Wl,-rpath,"
14497	;;
14498dragonfly*|freebsd*) #(vi
14499	LD_RPATH_OPT="-rpath "
14500	;;
14501netbsd*) #(vi
14502	LD_RPATH_OPT="-Wl,-rpath,"
14503	;;
14504osf*|mls+*) #(vi
14505	LD_RPATH_OPT="-rpath "
14506	;;
14507solaris2*) #(vi
14508	LD_RPATH_OPT="-R"
14509	;;
14510*)
14511	;;
14512esac
14513echo "$as_me:14513: result: $LD_RPATH_OPT" >&5
14514echo "${ECHO_T}$LD_RPATH_OPT" >&6
14515
14516case "x$LD_RPATH_OPT" in #(vi
14517x-R*)
14518	echo "$as_me:14518: checking if we need a space after rpath option" >&5
14519echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
14520	cf_save_LIBS="$LIBS"
14521	LIBS="${LD_RPATH_OPT}$libdir $LIBS"
14522	cat >conftest.$ac_ext <<_ACEOF
14523#line 14523 "configure"
14524#include "confdefs.h"
14525
14526int
14527main ()
14528{
14529
14530  ;
14531  return 0;
14532}
14533_ACEOF
14534rm -f conftest.$ac_objext conftest$ac_exeext
14535if { (eval echo "$as_me:14535: \"$ac_link\"") >&5
14536  (eval $ac_link) 2>&5
14537  ac_status=$?
14538  echo "$as_me:14538: \$? = $ac_status" >&5
14539  (exit $ac_status); } &&
14540         { ac_try='test -s conftest$ac_exeext'
14541  { (eval echo "$as_me:14541: \"$ac_try\"") >&5
14542  (eval $ac_try) 2>&5
14543  ac_status=$?
14544  echo "$as_me:14544: \$? = $ac_status" >&5
14545  (exit $ac_status); }; }; then
14546  cf_rpath_space=no
14547else
14548  echo "$as_me: failed program was:" >&5
14549cat conftest.$ac_ext >&5
14550cf_rpath_space=yes
14551fi
14552rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14553	LIBS="$cf_save_LIBS"
14554	echo "$as_me:14554: result: $cf_rpath_space" >&5
14555echo "${ECHO_T}$cf_rpath_space" >&6
14556	test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
14557	;;
14558esac
14559
14560echo "$as_me:14560: checking if rpath-hack should be disabled" >&5
14561echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
14562
14563# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
14564if test "${enable_rpath_hack+set}" = set; then
14565  enableval="$enable_rpath_hack"
14566  test "$enableval" != no && enableval=yes
14567  if test "$enableval" != "yes" ; then
14568    cf_disable_rpath_hack=yes
14569  else
14570    cf_disable_rpath_hack=no
14571  fi
14572else
14573  enableval=yes
14574  cf_disable_rpath_hack=no
14575
14576fi;
14577echo "$as_me:14577: result: $cf_disable_rpath_hack" >&5
14578echo "${ECHO_T}$cf_disable_rpath_hack" >&6
14579if test "$cf_disable_rpath_hack" = no ; then
14580
14581echo "$as_me:14581: checking for updated LDFLAGS" >&5
14582echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
14583if test -n "$LD_RPATH_OPT" ; then
14584	echo "$as_me:14584: result: maybe" >&5
14585echo "${ECHO_T}maybe" >&6
14586
14587	for ac_prog in ldd
14588do
14589  # Extract the first word of "$ac_prog", so it can be a program name with args.
14590set dummy $ac_prog; ac_word=$2
14591echo "$as_me:14591: checking for $ac_word" >&5
14592echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14593if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
14594  echo $ECHO_N "(cached) $ECHO_C" >&6
14595else
14596  if test -n "$cf_ldd_prog"; then
14597  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
14598else
14599  ac_save_IFS=$IFS; IFS=$ac_path_separator
14600ac_dummy="$PATH"
14601for ac_dir in $ac_dummy; do
14602  IFS=$ac_save_IFS
14603  test -z "$ac_dir" && ac_dir=.
14604  $as_executable_p "$ac_dir/$ac_word" || continue
14605ac_cv_prog_cf_ldd_prog="$ac_prog"
14606echo "$as_me:14606: found $ac_dir/$ac_word" >&5
14607break
14608done
14609
14610fi
14611fi
14612cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
14613if test -n "$cf_ldd_prog"; then
14614  echo "$as_me:14614: result: $cf_ldd_prog" >&5
14615echo "${ECHO_T}$cf_ldd_prog" >&6
14616else
14617  echo "$as_me:14617: result: no" >&5
14618echo "${ECHO_T}no" >&6
14619fi
14620
14621  test -n "$cf_ldd_prog" && break
14622done
14623test -n "$cf_ldd_prog" || cf_ldd_prog="no"
14624
14625	cf_rpath_list="/usr/lib /lib"
14626	if test "$cf_ldd_prog" != no
14627	then
14628		cf_rpath_oops=
14629
14630cat >conftest.$ac_ext <<_ACEOF
14631#line 14631 "configure"
14632#include "confdefs.h"
14633#include <stdio.h>
14634int
14635main ()
14636{
14637printf("Hello");
14638  ;
14639  return 0;
14640}
14641_ACEOF
14642rm -f conftest.$ac_objext conftest$ac_exeext
14643if { (eval echo "$as_me:14643: \"$ac_link\"") >&5
14644  (eval $ac_link) 2>&5
14645  ac_status=$?
14646  echo "$as_me:14646: \$? = $ac_status" >&5
14647  (exit $ac_status); } &&
14648         { ac_try='test -s conftest$ac_exeext'
14649  { (eval echo "$as_me:14649: \"$ac_try\"") >&5
14650  (eval $ac_try) 2>&5
14651  ac_status=$?
14652  echo "$as_me:14652: \$? = $ac_status" >&5
14653  (exit $ac_status); }; }; then
14654  cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
14655		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
14656else
14657  echo "$as_me: failed program was:" >&5
14658cat conftest.$ac_ext >&5
14659fi
14660rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14661
14662		# If we passed the link-test, but get a "not found" on a given library,
14663		# this could be due to inept reconfiguration of gcc to make it only
14664		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
14665		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
14666		# /usr/local libraries.
14667		if test -n "$cf_rpath_oops"
14668		then
14669			for cf_rpath_src in $cf_rpath_oops
14670			do
14671				for cf_rpath_dir in \
14672					/usr/local \
14673					/usr/pkg \
14674					/opt/sfw
14675				do
14676					if test -f $cf_rpath_dir/lib/$cf_rpath_src
14677					then
14678						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
14679
14680echo "${as_me:-configure}:14680: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
14681
14682						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
14683						break
14684					fi
14685				done
14686			done
14687		fi
14688	fi
14689
14690	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
14691
14692echo "${as_me:-configure}:14692: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
14693
14694test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
14695
14696echo "${as_me:-configure}:14696: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
14697
14698cf_rpath_dst=
14699for cf_rpath_src in $LDFLAGS
14700do
14701	case $cf_rpath_src in #(vi
14702	-L*) #(vi
14703
14704		# check if this refers to a directory which we will ignore
14705		cf_rpath_skip=no
14706		if test -n "$cf_rpath_list"
14707		then
14708			for cf_rpath_item in $cf_rpath_list
14709			do
14710				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
14711				then
14712					cf_rpath_skip=yes
14713					break
14714				fi
14715			done
14716		fi
14717
14718		if test "$cf_rpath_skip" = no
14719		then
14720			# transform the option
14721			if test "$LD_RPATH_OPT" = "-R " ; then
14722				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
14723			else
14724				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
14725			fi
14726
14727			# if we have not already added this, add it now
14728			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
14729			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
14730			then
14731				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
14732
14733echo "${as_me:-configure}:14733: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
14734
14735				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
14736			fi
14737		fi
14738		;;
14739	esac
14740	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
14741done
14742LDFLAGS=$cf_rpath_dst
14743
14744test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
14745
14746echo "${as_me:-configure}:14746: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
14747
14748test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
14749
14750echo "${as_me:-configure}:14750: testing ...checking LIBS $LIBS ..." 1>&5
14751
14752cf_rpath_dst=
14753for cf_rpath_src in $LIBS
14754do
14755	case $cf_rpath_src in #(vi
14756	-L*) #(vi
14757
14758		# check if this refers to a directory which we will ignore
14759		cf_rpath_skip=no
14760		if test -n "$cf_rpath_list"
14761		then
14762			for cf_rpath_item in $cf_rpath_list
14763			do
14764				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
14765				then
14766					cf_rpath_skip=yes
14767					break
14768				fi
14769			done
14770		fi
14771
14772		if test "$cf_rpath_skip" = no
14773		then
14774			# transform the option
14775			if test "$LD_RPATH_OPT" = "-R " ; then
14776				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
14777			else
14778				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
14779			fi
14780
14781			# if we have not already added this, add it now
14782			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
14783			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
14784			then
14785				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
14786
14787echo "${as_me:-configure}:14787: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
14788
14789				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
14790			fi
14791		fi
14792		;;
14793	esac
14794	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
14795done
14796LIBS=$cf_rpath_dst
14797
14798test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
14799
14800echo "${as_me:-configure}:14800: testing ...checked LIBS $LIBS ..." 1>&5
14801
14802	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
14803
14804echo "${as_me:-configure}:14804: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
14805
14806fi
14807
14808fi
14809
14810ac_config_files="$ac_config_files dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE"
14811ac_config_commands="$ac_config_commands default"
14812cat >confcache <<\_ACEOF
14813# This file is a shell script that caches the results of configure
14814# tests run on this system so they can be shared between configure
14815# scripts and configure runs, see configure's option --config-cache.
14816# It is not useful on other systems.  If it contains results you don't
14817# want to keep, you may remove or edit it.
14818#
14819# config.status only pays attention to the cache file if you give it
14820# the --recheck option to rerun configure.
14821#
14822# `ac_cv_env_foo' variables (set or unset) will be overriden when
14823# loading this file, other *unset* `ac_cv_foo' will be assigned the
14824# following values.
14825
14826_ACEOF
14827
14828# The following way of writing the cache mishandles newlines in values,
14829# but we know of no workaround that is simple, portable, and efficient.
14830# So, don't put newlines in cache variables' values.
14831# Ultrix sh set writes to stderr and can't be redirected directly,
14832# and sets the high bit in the cache file unless we assign to the vars.
14833{
14834  (set) 2>&1 |
14835    case `(ac_space=' '; set | grep ac_space) 2>&1` in
14836    *ac_space=\ *)
14837      # `set' does not quote correctly, so add quotes (double-quote
14838      # substitution turns \\\\ into \\, and sed turns \\ into \).
14839      sed -n \
14840        "s/'/'\\\\''/g;
14841    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14842      ;;
14843    *)
14844      # `set' quotes correctly as required by POSIX, so do not add quotes.
14845      sed -n \
14846        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
14847      ;;
14848    esac;
14849} |
14850  sed '
14851     t clear
14852     : clear
14853     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14854     t end
14855     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14856     : end' >>confcache
14857if cmp -s $cache_file confcache; then :; else
14858  if test -w $cache_file; then
14859    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
14860    cat confcache >$cache_file
14861  else
14862    echo "not updating unwritable cache $cache_file"
14863  fi
14864fi
14865rm -f confcache
14866
14867test "x$prefix" = xNONE && prefix=$ac_default_prefix
14868# Let make expand exec_prefix.
14869test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14870
14871# VPATH may cause trouble with some makes, so we remove $(srcdir),
14872# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14873# trailing colons and then remove the whole line if VPATH becomes empty
14874# (actually we leave an empty line to preserve line numbers).
14875if test "x$srcdir" = x.; then
14876  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
14877s/:*\$(srcdir):*/:/;
14878s/:*\${srcdir}:*/:/;
14879s/:*@srcdir@:*/:/;
14880s/^\([^=]*=[ 	]*\):*/\1/;
14881s/:*$//;
14882s/^[^=]*=[ 	]*$//;
14883}'
14884fi
14885
14886DEFS=-DHAVE_CONFIG_H
14887
14888: ${CONFIG_STATUS=./config.status}
14889ac_clean_files_save=$ac_clean_files
14890ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14891{ echo "$as_me:14891: creating $CONFIG_STATUS" >&5
14892echo "$as_me: creating $CONFIG_STATUS" >&6;}
14893cat >$CONFIG_STATUS <<_ACEOF
14894#! $SHELL
14895# Generated automatically by configure.
14896# Run this file to recreate the current configuration.
14897# Compiler output produced by configure, useful for debugging
14898# configure, is in config.log if it exists.
14899
14900debug=false
14901SHELL=\${CONFIG_SHELL-$SHELL}
14902ac_cs_invocation="\$0 \$@"
14903
14904_ACEOF
14905
14906cat >>$CONFIG_STATUS <<\_ACEOF
14907# Be Bourne compatible
14908if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14909  emulate sh
14910  NULLCMD=:
14911elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14912  set -o posix
14913fi
14914
14915# Name of the executable.
14916as_me=`echo "$0" |sed 's,.*[\\/],,'`
14917
14918if expr a : '\(a\)' >/dev/null 2>&1; then
14919  as_expr=expr
14920else
14921  as_expr=false
14922fi
14923
14924rm -f conf$$ conf$$.exe conf$$.file
14925echo >conf$$.file
14926if ln -s conf$$.file conf$$ 2>/dev/null; then
14927  # We could just check for DJGPP; but this test a) works b) is more generic
14928  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14929  if test -f conf$$.exe; then
14930    # Don't use ln at all; we don't have any links
14931    as_ln_s='cp -p'
14932  else
14933    as_ln_s='ln -s'
14934  fi
14935elif ln conf$$.file conf$$ 2>/dev/null; then
14936  as_ln_s=ln
14937else
14938  as_ln_s='cp -p'
14939fi
14940rm -f conf$$ conf$$.exe conf$$.file
14941
14942as_executable_p="test -f"
14943
14944# Support unset when possible.
14945if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
14946  as_unset=unset
14947else
14948  as_unset=false
14949fi
14950
14951# NLS nuisances.
14952$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
14953$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
14954$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
14955$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
14956$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
14957$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
14958$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
14959$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
14960
14961# IFS
14962# We need space, tab and new line, in precisely that order.
14963as_nl='
14964'
14965IFS=" 	$as_nl"
14966
14967# CDPATH.
14968$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
14969
14970exec 6>&1
14971
14972_ACEOF
14973
14974# Files that config.status was made for.
14975if test -n "$ac_config_files"; then
14976  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14977fi
14978
14979if test -n "$ac_config_headers"; then
14980  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14981fi
14982
14983if test -n "$ac_config_links"; then
14984  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14985fi
14986
14987if test -n "$ac_config_commands"; then
14988  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14989fi
14990
14991cat >>$CONFIG_STATUS <<\EOF
14992
14993ac_cs_usage="\
14994\`$as_me' instantiates files from templates according to the
14995current configuration.
14996
14997Usage: $0 [OPTIONS] [FILE]...
14998
14999  -h, --help       print this help, then exit
15000  -V, --version    print version number, then exit
15001  -d, --debug      don't remove temporary files
15002      --recheck    update $as_me by reconfiguring in the same conditions
15003  --file=FILE[:TEMPLATE]
15004                   instantiate the configuration file FILE
15005  --header=FILE[:TEMPLATE]
15006                   instantiate the configuration header FILE
15007
15008Configuration files:
15009$config_files
15010
15011Configuration headers:
15012$config_headers
15013
15014Configuration commands:
15015$config_commands
15016
15017Report bugs to <dickey@invisible-island.net>."
15018EOF
15019
15020cat >>$CONFIG_STATUS <<EOF
15021ac_cs_version="\\
15022config.status
15023configured by $0, generated by GNU Autoconf 2.52.20121002,
15024  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15025
15026Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15027Free Software Foundation, Inc.
15028This config.status script is free software; the Free Software Foundation
15029gives unlimited permission to copy, distribute and modify it."
15030srcdir=$srcdir
15031INSTALL="$INSTALL"
15032EOF
15033
15034cat >>$CONFIG_STATUS <<\EOF
15035# If no file are specified by the user, then we need to provide default
15036# value.  By we need to know if files were specified by the user.
15037ac_need_defaults=:
15038while test $# != 0
15039do
15040  case $1 in
15041  --*=*)
15042    ac_option=`expr "x$1" : 'x\([^=]*\)='`
15043    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15044    shift
15045    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15046    shift
15047    ;;
15048  -*);;
15049  *) # This is not an option, so the user has probably given explicit
15050     # arguments.
15051     ac_need_defaults=false;;
15052  esac
15053
15054  case $1 in
15055  # Handling of the options.
15056EOF
15057cat >>$CONFIG_STATUS <<EOF
15058  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15059    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15060    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15061EOF
15062cat >>$CONFIG_STATUS <<\EOF
15063  --version | --vers* | -V )
15064    echo "$ac_cs_version"; exit 0 ;;
15065  --he | --h)
15066    # Conflict between --help and --header
15067    { { echo "$as_me:15067: error: ambiguous option: $1
15068Try \`$0 --help' for more information." >&5
15069echo "$as_me: error: ambiguous option: $1
15070Try \`$0 --help' for more information." >&2;}
15071   { (exit 1); exit 1; }; };;
15072  --help | --hel | -h )
15073    echo "$ac_cs_usage"; exit 0 ;;
15074  --debug | --d* | -d )
15075    debug=: ;;
15076  --file | --fil | --fi | --f )
15077    shift
15078    CONFIG_FILES="$CONFIG_FILES $1"
15079    ac_need_defaults=false;;
15080  --header | --heade | --head | --hea )
15081    shift
15082    CONFIG_HEADERS="$CONFIG_HEADERS $1"
15083    ac_need_defaults=false;;
15084
15085  # This is an error.
15086  -*) { { echo "$as_me:15086: error: unrecognized option: $1
15087Try \`$0 --help' for more information." >&5
15088echo "$as_me: error: unrecognized option: $1
15089Try \`$0 --help' for more information." >&2;}
15090   { (exit 1); exit 1; }; } ;;
15091
15092  *) ac_config_targets="$ac_config_targets $1" ;;
15093
15094  esac
15095  shift
15096done
15097
15098exec 5>>config.log
15099cat >&5 << _ACEOF
15100
15101## ----------------------- ##
15102## Running config.status.  ##
15103## ----------------------- ##
15104
15105This file was extended by $as_me 2.52.20121002, executed with
15106  CONFIG_FILES    = $CONFIG_FILES
15107  CONFIG_HEADERS  = $CONFIG_HEADERS
15108  CONFIG_LINKS    = $CONFIG_LINKS
15109  CONFIG_COMMANDS = $CONFIG_COMMANDS
15110  > $ac_cs_invocation
15111on `(hostname || uname -n) 2>/dev/null | sed 1q`
15112
15113_ACEOF
15114EOF
15115
15116cat >>$CONFIG_STATUS <<EOF
15117#
15118# INIT-COMMANDS section.
15119#
15120
15121EOF
15122
15123cat >>$CONFIG_STATUS <<\EOF
15124for ac_config_target in $ac_config_targets
15125do
15126  case "$ac_config_target" in
15127  # Handling of arguments.
15128  "dialog-config" ) CONFIG_FILES="$CONFIG_FILES dialog-config" ;;
15129  "makefile" ) CONFIG_FILES="$CONFIG_FILES makefile" ;;
15130  "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
15131  "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
15132  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
15133  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15134  "dlg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS dlg_config.h:config.hin" ;;
15135  *) { { echo "$as_me:15135: error: invalid argument: $ac_config_target" >&5
15136echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15137   { (exit 1); exit 1; }; };;
15138  esac
15139done
15140
15141# If the user did not use the arguments to specify the items to instantiate,
15142# then the envvar interface is used.  Set only those that are not.
15143# We use the long form for the default assignment because of an extremely
15144# bizarre bug on SunOS 4.1.3.
15145if $ac_need_defaults; then
15146  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15147  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15148  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15149fi
15150
15151# Create a temporary directory, and hook for its removal unless debugging.
15152$debug ||
15153{
15154  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15155  trap '{ (exit 1); exit 1; }' 1 2 13 15
15156}
15157
15158# Create a (secure) tmp directory for tmp files.
15159: ${TMPDIR=/tmp}
15160{
15161  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15162  test -n "$tmp" && test -d "$tmp"
15163}  ||
15164{
15165  tmp=$TMPDIR/cs$$-$RANDOM
15166  (umask 077 && mkdir $tmp)
15167} ||
15168{
15169   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15170   { (exit 1); exit 1; }
15171}
15172
15173EOF
15174
15175cat >>$CONFIG_STATUS <<EOF
15176
15177#
15178# CONFIG_FILES section.
15179#
15180
15181# No need to generate the scripts if there are no CONFIG_FILES.
15182# This happens for instance when ./config.status config.h
15183if test -n "\$CONFIG_FILES"; then
15184  # Protect against being on the right side of a sed subst in config.status.
15185  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15186   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15187s,@SHELL@,$SHELL,;t t
15188s,@exec_prefix@,$exec_prefix,;t t
15189s,@prefix@,$prefix,;t t
15190s,@program_transform_name@,$program_transform_name,;t t
15191s,@bindir@,$bindir,;t t
15192s,@sbindir@,$sbindir,;t t
15193s,@libexecdir@,$libexecdir,;t t
15194s,@datarootdir@,$datarootdir,;t t
15195s,@datadir@,$datadir,;t t
15196s,@sysconfdir@,$sysconfdir,;t t
15197s,@sharedstatedir@,$sharedstatedir,;t t
15198s,@localstatedir@,$localstatedir,;t t
15199s,@libdir@,$libdir,;t t
15200s,@includedir@,$includedir,;t t
15201s,@oldincludedir@,$oldincludedir,;t t
15202s,@infodir@,$infodir,;t t
15203s,@mandir@,$mandir,;t t
15204s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15205s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15206s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15207s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15208s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15209s,@build_alias@,$build_alias,;t t
15210s,@host_alias@,$host_alias,;t t
15211s,@target_alias@,$target_alias,;t t
15212s,@ECHO_C@,$ECHO_C,;t t
15213s,@ECHO_N@,$ECHO_N,;t t
15214s,@ECHO_T@,$ECHO_T,;t t
15215s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15216s,@DEFS@,$DEFS,;t t
15217s,@LIBS@,$LIBS,;t t
15218s,@DESTDIR@,$DESTDIR,;t t
15219s,@CC@,$CC,;t t
15220s,@CFLAGS@,$CFLAGS,;t t
15221s,@LDFLAGS@,$LDFLAGS,;t t
15222s,@CPPFLAGS@,$CPPFLAGS,;t t
15223s,@ac_ct_CC@,$ac_ct_CC,;t t
15224s,@EXEEXT@,$EXEEXT,;t t
15225s,@OBJEXT@,$OBJEXT,;t t
15226s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15227s,@CPP@,$CPP,;t t
15228s,@SET_MAKE@,$SET_MAKE,;t t
15229s,@RANLIB@,$RANLIB,;t t
15230s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15231s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15232s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15233s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15234s,@LINT@,$LINT,;t t
15235s,@LINT_OPTS@,$LINT_OPTS,;t t
15236s,@AR@,$AR,;t t
15237s,@ac_ct_AR@,$ac_ct_AR,;t t
15238s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
15239s,@CTAGS@,$CTAGS,;t t
15240s,@ETAGS@,$ETAGS,;t t
15241s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15242s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15243s,@ECHO_LT@,$ECHO_LT,;t t
15244s,@ECHO_LD@,$ECHO_LD,;t t
15245s,@RULE_CC@,$RULE_CC,;t t
15246s,@SHOW_CC@,$SHOW_CC,;t t
15247s,@ECHO_CC@,$ECHO_CC,;t t
15248s,@build@,$build,;t t
15249s,@build_cpu@,$build_cpu,;t t
15250s,@build_vendor@,$build_vendor,;t t
15251s,@build_os@,$build_os,;t t
15252s,@host@,$host,;t t
15253s,@host_cpu@,$host_cpu,;t t
15254s,@host_vendor@,$host_vendor,;t t
15255s,@host_os@,$host_os,;t t
15256s,@PROG_EXT@,$PROG_EXT,;t t
15257s,@LIB_PREFIX@,$LIB_PREFIX,;t t
15258s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15259s,@VERSION@,$VERSION,;t t
15260s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
15261s,@VERSION_MINOR@,$VERSION_MINOR,;t t
15262s,@VERSION_PATCH@,$VERSION_PATCH,;t t
15263s,@PACKAGE@,$PACKAGE,;t t
15264s,@SUB_INC@,$SUB_INC,;t t
15265s,@CONFIG_H@,$CONFIG_H,;t t
15266s,@ALLOCA@,$ALLOCA,;t t
15267s,@GLIBC21@,$GLIBC21,;t t
15268s,@LIBICONV@,$LIBICONV,;t t
15269s,@USE_NLS@,$USE_NLS,;t t
15270s,@MSGFMT@,$MSGFMT,;t t
15271s,@GMSGFMT@,$GMSGFMT,;t t
15272s,@XGETTEXT@,$XGETTEXT,;t t
15273s,@INTLBISON@,$INTLBISON,;t t
15274s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
15275s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
15276s,@CATALOGS@,$CATALOGS,;t t
15277s,@CATOBJEXT@,$CATOBJEXT,;t t
15278s,@GMOFILES@,$GMOFILES,;t t
15279s,@INTLLIBS@,$INTLLIBS,;t t
15280s,@INTLOBJS@,$INTLOBJS,;t t
15281s,@POFILES@,$POFILES,;t t
15282s,@POSUB@,$POSUB,;t t
15283s,@DATADIRNAME@,$DATADIRNAME,;t t
15284s,@INSTOBJEXT@,$INSTOBJEXT,;t t
15285s,@GENCAT@,$GENCAT,;t t
15286s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
15287s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
15288s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
15289s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
15290s,@INTLDIR_MAKE@,$INTLDIR_MAKE,;t t
15291s,@GT_YES@,$GT_YES,;t t
15292s,@GT_NO@,$GT_NO,;t t
15293s,@LINK_PREFIX@,$LINK_PREFIX,;t t
15294s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
15295s,@LIBTOOL@,$LIBTOOL,;t t
15296s,@LT_UNDEF@,$LT_UNDEF,;t t
15297s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
15298s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
15299s,@LIB_CREATE@,$LIB_CREATE,;t t
15300s,@LIB_OBJECT@,$LIB_OBJECT,;t t
15301s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
15302s,@LIB_PREP@,$LIB_PREP,;t t
15303s,@LIB_CLEAN@,$LIB_CLEAN,;t t
15304s,@LIB_COMPILE@,$LIB_COMPILE,;t t
15305s,@LIB_LINK@,$LIB_LINK,;t t
15306s,@LIB_INSTALL@,$LIB_INSTALL,;t t
15307s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
15308s,@LIBTOOL_MAKE@,$LIBTOOL_MAKE,;t t
15309s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
15310s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
15311s,@EXTRAOBJS@,$EXTRAOBJS,;t t
15312s,@PACKAGE_PREFIX@,$PACKAGE_PREFIX,;t t
15313s,@PACKAGE_CONFIG@,$PACKAGE_CONFIG,;t t
15314s,@cf_ldd_prog@,$cf_ldd_prog,;t t
15315s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
15316CEOF
15317
15318EOF
15319
15320  cat >>$CONFIG_STATUS <<\EOF
15321  # Split the substitutions into bite-sized pieces for seds with
15322  # small command number limits, like on Digital OSF/1 and HP-UX.
15323  ac_max_sed_lines=48
15324  ac_sed_frag=1 # Number of current file.
15325  ac_beg=1 # First line for current file.
15326  ac_end=$ac_max_sed_lines # Line after last line for current file.
15327  ac_more_lines=:
15328  ac_sed_cmds=
15329  while $ac_more_lines; do
15330    if test $ac_beg -gt 1; then
15331      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15332    else
15333      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15334    fi
15335    if test ! -s $tmp/subs.frag; then
15336      ac_more_lines=false
15337    else
15338      # The purpose of the label and of the branching condition is to
15339      # speed up the sed processing (if there are no `@' at all, there
15340      # is no need to browse any of the substitutions).
15341      # These are the two extra sed commands mentioned above.
15342      (echo ':t
15343  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15344      if test -z "$ac_sed_cmds"; then
15345  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15346      else
15347  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15348      fi
15349      ac_sed_frag=`expr $ac_sed_frag + 1`
15350      ac_beg=$ac_end
15351      ac_end=`expr $ac_end + $ac_max_sed_lines`
15352    fi
15353  done
15354  if test -z "$ac_sed_cmds"; then
15355    ac_sed_cmds=cat
15356  fi
15357fi # test -n "$CONFIG_FILES"
15358
15359EOF
15360cat >>$CONFIG_STATUS <<\EOF
15361for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15362  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15363  case $ac_file in
15364  - | *:- | *:-:* ) # input from stdin
15365        cat >$tmp/stdin
15366        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15367        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15368  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15369        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15370  * )   ac_file_in=$ac_file.in ;;
15371  esac
15372
15373  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15374  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15375         X"$ac_file" : 'X\(//\)[^/]' \| \
15376         X"$ac_file" : 'X\(//\)$' \| \
15377         X"$ac_file" : 'X\(/\)' \| \
15378         .     : '\(.\)' 2>/dev/null ||
15379echo X"$ac_file" |
15380    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15381  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15382  	  /^X\(\/\/\)$/{ s//\1/; q; }
15383  	  /^X\(\/\).*/{ s//\1/; q; }
15384  	  s/.*/./; q'`
15385  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15386    { case "$ac_dir" in
15387  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15388  *)                      as_incr_dir=.;;
15389esac
15390as_dummy="$ac_dir"
15391for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15392  case $as_mkdir_dir in
15393    # Skip DOS drivespec
15394    ?:) as_incr_dir=$as_mkdir_dir ;;
15395    *)
15396      as_incr_dir=$as_incr_dir/$as_mkdir_dir
15397      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15398    ;;
15399  esac
15400done; }
15401
15402    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
15403    # A "../" for each directory in $ac_dir_suffix.
15404    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
15405  else
15406    ac_dir_suffix= ac_dots=
15407  fi
15408
15409  case $srcdir in
15410  .)  ac_srcdir=.
15411      if test -z "$ac_dots"; then
15412         ac_top_srcdir=.
15413      else
15414         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
15415      fi ;;
15416  [\\/]* | ?:[\\/]* )
15417      ac_srcdir=$srcdir$ac_dir_suffix;
15418      ac_top_srcdir=$srcdir ;;
15419  *) # Relative path.
15420    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
15421    ac_top_srcdir=$ac_dots$srcdir ;;
15422  esac
15423
15424  case $INSTALL in
15425  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15426  *) ac_INSTALL=$ac_dots$INSTALL ;;
15427  esac
15428
15429  if test x"$ac_file" != x-; then
15430    { echo "$as_me:15430: creating $ac_file" >&5
15431echo "$as_me: creating $ac_file" >&6;}
15432    rm -f "$ac_file"
15433  fi
15434  # Let's still pretend it is `configure' which instantiates (i.e., don't
15435  # use $as_me), people would be surprised to read:
15436  #    /* config.h.  Generated automatically by config.status.  */
15437  configure_input="Generated automatically from `echo $ac_file_in |
15438                                                 sed 's,.*/,,'` by configure."
15439
15440  # First look for the input files in the build tree, otherwise in the
15441  # src tree.
15442  ac_file_inputs=`IFS=:
15443    for f in $ac_file_in; do
15444      case $f in
15445      -) echo $tmp/stdin ;;
15446      [\\/$]*)
15447         # Absolute (can't be DOS-style, as IFS=:)
15448         test -f "$f" || { { echo "$as_me:15448: error: cannot find input file: $f" >&5
15449echo "$as_me: error: cannot find input file: $f" >&2;}
15450   { (exit 1); exit 1; }; }
15451         echo $f;;
15452      *) # Relative
15453         if test -f "$f"; then
15454           # Build tree
15455           echo $f
15456         elif test -f "$srcdir/$f"; then
15457           # Source tree
15458           echo $srcdir/$f
15459         else
15460           # /dev/null tree
15461           { { echo "$as_me:15461: error: cannot find input file: $f" >&5
15462echo "$as_me: error: cannot find input file: $f" >&2;}
15463   { (exit 1); exit 1; }; }
15464         fi;;
15465      esac
15466    done` || { (exit 1); exit 1; }
15467EOF
15468cat >>$CONFIG_STATUS <<\EOF
15469  ac_warn_datarootdir=no
15470  if test x"$ac_file" != x-; then
15471    for ac_item in $ac_file_inputs
15472    do
15473      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
15474      if test -n "$ac_seen"; then
15475        ac_used=`grep '@datarootdir@' $ac_item`
15476        if test -z "$ac_used"; then
15477          { echo "$as_me:15477: WARNING: datarootdir was used implicitly but not set:
15478$ac_seen" >&5
15479echo "$as_me: WARNING: datarootdir was used implicitly but not set:
15480$ac_seen" >&2;}
15481          ac_warn_datarootdir=yes
15482        fi
15483      fi
15484      ac_seen=`grep '${datarootdir}' $ac_item`
15485      if test -n "$ac_seen"; then
15486        { echo "$as_me:15486: WARNING: datarootdir was used explicitly but not set:
15487$ac_seen" >&5
15488echo "$as_me: WARNING: datarootdir was used explicitly but not set:
15489$ac_seen" >&2;}
15490        ac_warn_datarootdir=yes
15491      fi
15492    done
15493  fi
15494
15495if test "x$ac_warn_datarootdir" = xyes; then
15496  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
15497fi
15498
15499EOF
15500cat >>$CONFIG_STATUS <<EOF
15501  sed "$ac_vpsub
15502$extrasub
15503EOF
15504cat >>$CONFIG_STATUS <<\EOF
15505:t
15506/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15507s,@configure_input@,$configure_input,;t t
15508s,@srcdir@,$ac_srcdir,;t t
15509s,@top_srcdir@,$ac_top_srcdir,;t t
15510s,@INSTALL@,$ac_INSTALL,;t t
15511" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15512  rm -f $tmp/stdin
15513  if test x"$ac_file" != x-; then
15514    cp $tmp/out $ac_file
15515
15516    for ac_name in prefix exec_prefix datarootdir
15517    do
15518        ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
15519        if test -n "$ac_seen"; then
15520            ac_init=`egrep '[ 	]*'$ac_name'[ 	]*=' $ac_file`
15521            if test -z "$ac_init"; then
15522              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
15523              { echo "$as_me:15523: WARNING: Variable $ac_name is used but was not set:
15524$ac_seen" >&5
15525echo "$as_me: WARNING: Variable $ac_name is used but was not set:
15526$ac_seen" >&2;}
15527            fi
15528        fi
15529    done
15530    egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
15531    egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
15532    if test -s $tmp/out; then
15533      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
15534      { echo "$as_me:15534: WARNING: Some variables may not be substituted:
15535$ac_seen" >&5
15536echo "$as_me: WARNING: Some variables may not be substituted:
15537$ac_seen" >&2;}
15538    fi
15539  else
15540    cat $tmp/out
15541  fi
15542  rm -f $tmp/out
15543
15544done
15545EOF
15546cat >>$CONFIG_STATUS <<\EOF
15547
15548#
15549# CONFIG_HEADER section.
15550#
15551
15552# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15553# NAME is the cpp macro being defined and VALUE is the value it is being given.
15554#
15555# ac_d sets the value in "#define NAME VALUE" lines.
15556ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
15557ac_dB='[ 	].*$,\1#\2'
15558ac_dC=' '
15559ac_dD=',;t'
15560# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15561ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
15562ac_iB='\([ 	]\),\1#\2define\3'
15563ac_iC=' '
15564ac_iD='\4,;t'
15565# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15566ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
15567ac_uB='$,\1#\2define\3'
15568ac_uC=' '
15569ac_uD=',;t'
15570
15571for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
15572  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15573  case $ac_file in
15574  - | *:- | *:-:* ) # input from stdin
15575        cat >$tmp/stdin
15576        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15577        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15578  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15579        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15580  * )   ac_file_in=$ac_file.in ;;
15581  esac
15582
15583  test x"$ac_file" != x- && { echo "$as_me:15583: creating $ac_file" >&5
15584echo "$as_me: creating $ac_file" >&6;}
15585
15586  # First look for the input files in the build tree, otherwise in the
15587  # src tree.
15588  ac_file_inputs=`IFS=:
15589    for f in $ac_file_in; do
15590      case $f in
15591      -) echo $tmp/stdin ;;
15592      [\\/$]*)
15593         # Absolute (can't be DOS-style, as IFS=:)
15594         test -f "$f" || { { echo "$as_me:15594: error: cannot find input file: $f" >&5
15595echo "$as_me: error: cannot find input file: $f" >&2;}
15596   { (exit 1); exit 1; }; }
15597         echo $f;;
15598      *) # Relative
15599         if test -f "$f"; then
15600           # Build tree
15601           echo $f
15602         elif test -f "$srcdir/$f"; then
15603           # Source tree
15604           echo $srcdir/$f
15605         else
15606           # /dev/null tree
15607           { { echo "$as_me:15607: error: cannot find input file: $f" >&5
15608echo "$as_me: error: cannot find input file: $f" >&2;}
15609   { (exit 1); exit 1; }; }
15610         fi;;
15611      esac
15612    done` || { (exit 1); exit 1; }
15613  # Remove the trailing spaces.
15614  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
15615
15616EOF
15617
15618# Transform confdefs.h into a list of #define's.  We won't use it as a sed
15619# script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
15620# be either 'cat' or 'sort'.
15621sort -u confdefs.h | uniq >conftest.vals
15622
15623# Break up conftest.vals because some shells have a limit on
15624# the size of here documents, and old seds have small limits too.
15625
15626rm -f conftest.tail
15627echo '  rm -f conftest.frag' >> $CONFIG_STATUS
15628while grep . conftest.vals >/dev/null
15629do
15630  # Write chunks of a limited-size here document to conftest.frag.
15631  echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
15632  sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
15633  echo 'CEOF' >> $CONFIG_STATUS
15634  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15635  rm -f conftest.vals
15636  mv conftest.tail conftest.vals
15637done
15638rm -f conftest.vals
15639
15640# Run sed to substitute the contents of conftest.frag into $tmp/in at the
15641# marker @DEFS@.
15642echo '  cat >> conftest.edit <<CEOF
15643/@DEFS@/r conftest.frag
15644/@DEFS@/d
15645CEOF
15646sed -f conftest.edit $tmp/in > $tmp/out
15647rm -f $tmp/in
15648mv $tmp/out $tmp/in
15649rm -f conftest.edit conftest.frag
15650' >> $CONFIG_STATUS
15651
15652cat >>$CONFIG_STATUS <<\EOF
15653  # Let's still pretend it is `configure' which instantiates (i.e., don't
15654  # use $as_me), people would be surprised to read:
15655  #    /* config.h.  Generated automatically by config.status.  */
15656  if test x"$ac_file" = x-; then
15657    echo "/* Generated automatically by configure.  */" >$tmp/config.h
15658  else
15659    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
15660  fi
15661  cat $tmp/in >>$tmp/config.h
15662  rm -f $tmp/in
15663  if test x"$ac_file" != x-; then
15664    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
15665      { echo "$as_me:15665: $ac_file is unchanged" >&5
15666echo "$as_me: $ac_file is unchanged" >&6;}
15667    else
15668      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15669         X"$ac_file" : 'X\(//\)[^/]' \| \
15670         X"$ac_file" : 'X\(//\)$' \| \
15671         X"$ac_file" : 'X\(/\)' \| \
15672         .     : '\(.\)' 2>/dev/null ||
15673echo X"$ac_file" |
15674    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15675  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15676  	  /^X\(\/\/\)$/{ s//\1/; q; }
15677  	  /^X\(\/\).*/{ s//\1/; q; }
15678  	  s/.*/./; q'`
15679      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15680        { case "$ac_dir" in
15681  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15682  *)                      as_incr_dir=.;;
15683esac
15684as_dummy="$ac_dir"
15685for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15686  case $as_mkdir_dir in
15687    # Skip DOS drivespec
15688    ?:) as_incr_dir=$as_mkdir_dir ;;
15689    *)
15690      as_incr_dir=$as_incr_dir/$as_mkdir_dir
15691      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15692    ;;
15693  esac
15694done; }
15695
15696      fi
15697      rm -f $ac_file
15698      mv $tmp/config.h $ac_file
15699    fi
15700  else
15701    cat $tmp/config.h
15702    rm -f $tmp/config.h
15703  fi
15704done
15705EOF
15706cat >>$CONFIG_STATUS <<\EOF
15707#
15708# CONFIG_COMMANDS section.
15709#
15710for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
15711  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
15712  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
15713
15714  case $ac_dest in
15715    default-1 ) for ac_file in $CONFIG_FILES; do
15716
15717      # Support "outfile[:infile[:infile...]]"
15718      case "$ac_file" in
15719        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15720      esac
15721
15722      # PO directories have a Makefile.in generated from Makefile.inn.
15723      case "$ac_file" in */[Mm]akefile.in)
15724        # Adjust a relative srcdir.
15725        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
15726        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
15727        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
15728        ac_base=`basename $ac_file .in`
15729        # In autoconf-2.13 it is called $ac_given_srcdir.
15730        # In autoconf-2.50 it is called $srcdir.
15731        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
15732
15733        case "$ac_given_srcdir" in
15734          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
15735          /*) top_srcdir="$ac_given_srcdir" ;;
15736          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
15737        esac
15738
15739        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
15740          rm -f "$ac_dir/POTFILES"
15741          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
15742          sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
15743          test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
15744          sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
15745        fi
15746        ;;
15747      esac
15748    done ;;
15749  esac
15750done
15751EOF
15752
15753cat >>$CONFIG_STATUS <<\EOF
15754
15755{ (exit 0); exit 0; }
15756EOF
15757chmod +x $CONFIG_STATUS
15758ac_clean_files=$ac_clean_files_save
15759
15760# configure is writing to config.log, and then calls config.status.
15761# config.status does its own redirection, appending to config.log.
15762# Unfortunately, on DOS this fails, as config.log is still kept open
15763# by configure, so config.status won't be able to write to it; its
15764# output is simply discarded.  So we exec the FD to /dev/null,
15765# effectively closing config.log, so it can be properly (re)opened and
15766# appended to by config.status.  When coming back to configure, we
15767# need to make the FD available again.
15768if test "$no_create" != yes; then
15769  ac_cs_success=:
15770  exec 5>/dev/null
15771  $SHELL $CONFIG_STATUS || ac_cs_success=false
15772  exec 5>>config.log
15773  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15774  # would make configure fail if this is the last instruction.
15775  $ac_cs_success || { (exit 1); exit 1; }
15776fi
15777
15778