xref: /freebsd/contrib/dialog/configure (revision f4b37ed0f8b307b1f3f0f630ca725d68f1dff30d)
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-pkg-config{=path} enable/disable use of pkg-config
693  --with-package=XXX      rename dialog to XXX, library to libXXX.a, etc
694  --enable-header-subdir  install dlg_XXX headers to subdirectory
695  --with-libiconv-prefix=DIR
696                          search for libiconv in DIR/include and DIR/lib
697  --enable-nls            use Native Language Support
698  --with-included-gettext use the GNU gettext library included here
699  --with-textdomain=PKG   NLS text-domain (default is package name)
700  --disable-included-msgs use included messages, for i18n support
701  --with-dmalloc          test: use Gray Watson's dmalloc library
702  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
703  --with-purify           test: use Purify
704  --with-valgrind         test: use valgrind
705  --with-no-leaks         test: free permanent memory, analyze leaks
706  --disable-trace         do not support --trace option
707  --with-rel-version=XXX  override derived release version
708  --with-abi-version=XXX  override derived ABI version
709  --disable-libtool-version  enable to use libtool's incompatible naming scheme
710  --with-libtool          generate libraries with libtool
711  --with-libtool-opts=XXX specify additional libtool options
712  --with-shared           generate shared-libraries
713  --with-shlib-version=X  Specify rel or abi version for shared libs
714  --with-curses-dir=DIR   directory in which (n)curses is installed
715  --enable-rpath          use rpath option when generating shared libraries
716  --with-ncurses          compile/link with ncurses library
717  --with-ncursesw         compile/link with wide-char ncurses library
718  --disable-extras        do not include extra dialogs
719  --disable-rc-file       do not include config-file support
720  --disable-Xdialog       do not include Xdialog-style dialogs (1.1)
721  --disable-Xdialog2      do not include extra Xdialog-style dialogs (1.2)
722  --disable-whiptail      do not map extra whiptail options
723  --disable-form          do not include the form dialog
724  --disable-gauge         do not include the gauge dialogs
725  --disable-tailbox       do not include the tailbox dialog
726  --disable-mixedform     do not include the mixedform dialog
727  --disable-mixedgauge    do not include the mixedgauge dialog
728  --enable-widec          enable wide-curses features
729  --disable-rpath-hack    don't add rpath options for additional libraries
730
731Some influential environment variables:
732  CC          C compiler command
733  CFLAGS      C compiler flags
734  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
735              nonstandard directory <lib dir>
736  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
737              headers in a nonstandard directory <include dir>
738  CPP         C preprocessor
739
740Use these variables to override the choices made by `configure' or to help
741it to find libraries and programs with nonstandard names/locations.
742
743EOF
744fi
745
746if test "$ac_init_help" = "recursive"; then
747  # If there are subdirs, report their specific --help.
748  ac_popdir=`pwd`
749  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
750    cd $ac_subdir
751    # A "../" for each directory in /$ac_subdir.
752    ac_dots=`echo $ac_subdir |
753             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
754
755    case $srcdir in
756    .) # No --srcdir option.  We are building in place.
757      ac_sub_srcdir=$srcdir ;;
758    [\\/]* | ?:[\\/]* ) # Absolute path.
759      ac_sub_srcdir=$srcdir/$ac_subdir ;;
760    *) # Relative path.
761      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
762    esac
763
764    # Check for guested configure; otherwise get Cygnus style configure.
765    if test -f $ac_sub_srcdir/configure.gnu; then
766      echo
767      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
768    elif test -f $ac_sub_srcdir/configure; then
769      echo
770      $SHELL $ac_sub_srcdir/configure  --help=recursive
771    elif test -f $ac_sub_srcdir/configure.ac ||
772           test -f $ac_sub_srcdir/configure.in; then
773      echo
774      $ac_configure --help
775    else
776      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
777    fi
778    cd $ac_popdir
779  done
780fi
781
782test -n "$ac_init_help" && exit 0
783if $ac_init_version; then
784  cat <<\EOF
785
786Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
787Free Software Foundation, Inc.
788This configure script is free software; the Free Software Foundation
789gives unlimited permission to copy, distribute and modify it.
790EOF
791  exit 0
792fi
793exec 5>config.log
794cat >&5 <<EOF
795This file contains any messages produced by compilers while
796running configure, to aid debugging if configure makes a mistake.
797
798It was created by $as_me, which was
799generated by GNU Autoconf 2.52.20121002.  Invocation command line was
800
801  $ $0 $@
802
803EOF
804{
805cat <<_ASUNAME
806## ---------- ##
807## Platform.  ##
808## ---------- ##
809
810hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
811uname -m = `(uname -m) 2>/dev/null || echo unknown`
812uname -r = `(uname -r) 2>/dev/null || echo unknown`
813uname -s = `(uname -s) 2>/dev/null || echo unknown`
814uname -v = `(uname -v) 2>/dev/null || echo unknown`
815
816/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
817/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
818
819/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
820/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
821/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
822hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
823/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
824/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
825/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
826
827PATH = $PATH
828
829_ASUNAME
830} >&5
831
832cat >&5 <<EOF
833## ------------ ##
834## Core tests.  ##
835## ------------ ##
836
837EOF
838
839# Keep a trace of the command line.
840# Strip out --no-create and --no-recursion so they do not pile up.
841# Also quote any args containing shell meta-characters.
842ac_configure_args=
843ac_sep=
844for ac_arg
845do
846  case $ac_arg in
847  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
848  | --no-cr | --no-c) ;;
849  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
850  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
851  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
852    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
853    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
854    ac_sep=" " ;;
855  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
856     ac_sep=" " ;;
857  esac
858  # Get rid of the leading space.
859done
860
861# When interrupted or exit'd, cleanup temporary files, and complete
862# config.log.  We remove comments because anyway the quotes in there
863# would cause problems or look ugly.
864trap 'exit_status=$?
865  # Save into config.log some information that might help in debugging.
866  echo >&5
867  echo "## ----------------- ##" >&5
868  echo "## Cache variables.  ##" >&5
869  echo "## ----------------- ##" >&5
870  echo >&5
871  # The following way of writing the cache mishandles newlines in values,
872{
873  (set) 2>&1 |
874    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
875    *ac_space=\ *)
876      sed -n \
877        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
878    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
879      ;;
880    *)
881      sed -n \
882        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
883      ;;
884    esac;
885} >&5
886  sed "/^$/d" confdefs.h >conftest.log
887  if test -s conftest.log; then
888    echo >&5
889    echo "## ------------ ##" >&5
890    echo "## confdefs.h.  ##" >&5
891    echo "## ------------ ##" >&5
892    echo >&5
893    cat conftest.log >&5
894  fi
895  (echo; echo) >&5
896  test "$ac_signal" != 0 &&
897    echo "$as_me: caught signal $ac_signal" >&5
898  echo "$as_me: exit $exit_status" >&5
899  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
900    exit $exit_status
901     ' 0
902for ac_signal in 1 2 13 15; do
903  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
904done
905ac_signal=0
906
907# confdefs.h avoids OS command line length limits that DEFS can exceed.
908rm -rf conftest* confdefs.h
909# AIX cpp loses on an empty file, so make sure it contains at least a newline.
910echo >confdefs.h
911
912# Let the site file select an alternate cache file if it wants to.
913# Prefer explicitly selected file to automatically selected ones.
914if test -z "$CONFIG_SITE"; then
915  if test "x$prefix" != xNONE; then
916    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
917  else
918    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
919  fi
920fi
921for ac_site_file in $CONFIG_SITE; do
922  if test -r "$ac_site_file"; then
923    { echo "$as_me:923: loading site script $ac_site_file" >&5
924echo "$as_me: loading site script $ac_site_file" >&6;}
925    cat "$ac_site_file" >&5
926    . "$ac_site_file"
927  fi
928done
929
930if test -r "$cache_file"; then
931  # Some versions of bash will fail to source /dev/null (special
932  # files actually), so we avoid doing that.
933  if test -f "$cache_file"; then
934    { echo "$as_me:934: loading cache $cache_file" >&5
935echo "$as_me: loading cache $cache_file" >&6;}
936    case $cache_file in
937      [\\/]* | ?:[\\/]* ) . $cache_file;;
938      *)                      . ./$cache_file;;
939    esac
940  fi
941else
942  { echo "$as_me:942: creating cache $cache_file" >&5
943echo "$as_me: creating cache $cache_file" >&6;}
944  >$cache_file
945fi
946
947# Check that the precious variables saved in the cache have kept the same
948# value.
949ac_cache_corrupted=false
950for ac_var in `(set) 2>&1 |
951               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
952  eval ac_old_set=\$ac_cv_env_${ac_var}_set
953  eval ac_new_set=\$ac_env_${ac_var}_set
954  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
955  eval ac_new_val="\$ac_env_${ac_var}_value"
956  case $ac_old_set,$ac_new_set in
957    set,)
958      { echo "$as_me:958: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
959echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
960      ac_cache_corrupted=: ;;
961    ,set)
962      { echo "$as_me:962: error: \`$ac_var' was not set in the previous run" >&5
963echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
964      ac_cache_corrupted=: ;;
965    ,);;
966    *)
967      if test "x$ac_old_val" != "x$ac_new_val"; then
968        { echo "$as_me:968: error: \`$ac_var' has changed since the previous run:" >&5
969echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
970        { echo "$as_me:970:   former value:  $ac_old_val" >&5
971echo "$as_me:   former value:  $ac_old_val" >&2;}
972        { echo "$as_me:972:   current value: $ac_new_val" >&5
973echo "$as_me:   current value: $ac_new_val" >&2;}
974        ac_cache_corrupted=:
975      fi;;
976  esac
977  # Pass precious variables to config.status.  It doesn't matter if
978  # we pass some twice (in addition to the command line arguments).
979  if test "$ac_new_set" = set; then
980    case $ac_new_val in
981    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
982      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
983      ac_configure_args="$ac_configure_args '$ac_arg'"
984      ;;
985    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
986       ;;
987    esac
988  fi
989done
990if $ac_cache_corrupted; then
991  { echo "$as_me:991: error: changes in the environment can compromise the build" >&5
992echo "$as_me: error: changes in the environment can compromise the build" >&2;}
993  { { echo "$as_me:993: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
994echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
995   { (exit 1); exit 1; }; }
996fi
997
998ac_ext=c
999ac_cpp='$CPP $CPPFLAGS'
1000ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1001ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1002ac_compiler_gnu=$ac_cv_c_compiler_gnu
1003ac_main_return=return
1004
1005case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1006  *c*,-n*) ECHO_N= ECHO_C='
1007' ECHO_T='	' ;;
1008  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1009  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1010esac
1011echo "#! $SHELL" >conftest.sh
1012echo  "exit 0"   >>conftest.sh
1013chmod +x conftest.sh
1014if { (echo "$as_me:1014: PATH=\".;.\"; conftest.sh") >&5
1015  (PATH=".;."; conftest.sh) 2>&5
1016  ac_status=$?
1017  echo "$as_me:1017: \$? = $ac_status" >&5
1018  (exit $ac_status); }; then
1019  ac_path_separator=';'
1020else
1021  ac_path_separator=:
1022fi
1023PATH_SEPARATOR="$ac_path_separator"
1024rm -f conftest.sh
1025
1026ac_config_headers="$ac_config_headers dlg_config.h:config.hin"
1027
1028test "$program_prefix" != NONE &&
1029  program_transform_name="s,^,$program_prefix,;$program_transform_name"
1030# Use a double $ so make ignores it.
1031test "$program_suffix" != NONE &&
1032  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1033# Double any \ or $.  echo might interpret backslashes.
1034# By default was `s,x,x', remove it if useless.
1035cat <<\_ACEOF >conftest.sed
1036s/[\\$]/&&/g;s/;s,x,x,$//
1037_ACEOF
1038program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1039rm conftest.sed
1040
1041DESTDIR=
1042
1043ac_ext=c
1044ac_cpp='$CPP $CPPFLAGS'
1045ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1046ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1047ac_compiler_gnu=$ac_cv_c_compiler_gnu
1048ac_main_return=return
1049if test -n "$ac_tool_prefix"; then
1050  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1051set dummy ${ac_tool_prefix}gcc; ac_word=$2
1052echo "$as_me:1052: checking for $ac_word" >&5
1053echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1054if test "${ac_cv_prog_CC+set}" = set; then
1055  echo $ECHO_N "(cached) $ECHO_C" >&6
1056else
1057  if test -n "$CC"; then
1058  ac_cv_prog_CC="$CC" # Let the user override the test.
1059else
1060  ac_save_IFS=$IFS; IFS=$ac_path_separator
1061ac_dummy="$PATH"
1062for ac_dir in $ac_dummy; do
1063  IFS=$ac_save_IFS
1064  test -z "$ac_dir" && ac_dir=.
1065  $as_executable_p "$ac_dir/$ac_word" || continue
1066ac_cv_prog_CC="${ac_tool_prefix}gcc"
1067echo "$as_me:1067: found $ac_dir/$ac_word" >&5
1068break
1069done
1070
1071fi
1072fi
1073CC=$ac_cv_prog_CC
1074if test -n "$CC"; then
1075  echo "$as_me:1075: result: $CC" >&5
1076echo "${ECHO_T}$CC" >&6
1077else
1078  echo "$as_me:1078: result: no" >&5
1079echo "${ECHO_T}no" >&6
1080fi
1081
1082fi
1083if test -z "$ac_cv_prog_CC"; then
1084  ac_ct_CC=$CC
1085  # Extract the first word of "gcc", so it can be a program name with args.
1086set dummy gcc; ac_word=$2
1087echo "$as_me:1087: checking for $ac_word" >&5
1088echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1089if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1090  echo $ECHO_N "(cached) $ECHO_C" >&6
1091else
1092  if test -n "$ac_ct_CC"; then
1093  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1094else
1095  ac_save_IFS=$IFS; IFS=$ac_path_separator
1096ac_dummy="$PATH"
1097for ac_dir in $ac_dummy; do
1098  IFS=$ac_save_IFS
1099  test -z "$ac_dir" && ac_dir=.
1100  $as_executable_p "$ac_dir/$ac_word" || continue
1101ac_cv_prog_ac_ct_CC="gcc"
1102echo "$as_me:1102: found $ac_dir/$ac_word" >&5
1103break
1104done
1105
1106fi
1107fi
1108ac_ct_CC=$ac_cv_prog_ac_ct_CC
1109if test -n "$ac_ct_CC"; then
1110  echo "$as_me:1110: result: $ac_ct_CC" >&5
1111echo "${ECHO_T}$ac_ct_CC" >&6
1112else
1113  echo "$as_me:1113: result: no" >&5
1114echo "${ECHO_T}no" >&6
1115fi
1116
1117  CC=$ac_ct_CC
1118else
1119  CC="$ac_cv_prog_CC"
1120fi
1121
1122if test -z "$CC"; then
1123  if test -n "$ac_tool_prefix"; then
1124  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1125set dummy ${ac_tool_prefix}cc; ac_word=$2
1126echo "$as_me:1126: checking for $ac_word" >&5
1127echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1128if test "${ac_cv_prog_CC+set}" = set; then
1129  echo $ECHO_N "(cached) $ECHO_C" >&6
1130else
1131  if test -n "$CC"; then
1132  ac_cv_prog_CC="$CC" # Let the user override the test.
1133else
1134  ac_save_IFS=$IFS; IFS=$ac_path_separator
1135ac_dummy="$PATH"
1136for ac_dir in $ac_dummy; do
1137  IFS=$ac_save_IFS
1138  test -z "$ac_dir" && ac_dir=.
1139  $as_executable_p "$ac_dir/$ac_word" || continue
1140ac_cv_prog_CC="${ac_tool_prefix}cc"
1141echo "$as_me:1141: found $ac_dir/$ac_word" >&5
1142break
1143done
1144
1145fi
1146fi
1147CC=$ac_cv_prog_CC
1148if test -n "$CC"; then
1149  echo "$as_me:1149: result: $CC" >&5
1150echo "${ECHO_T}$CC" >&6
1151else
1152  echo "$as_me:1152: result: no" >&5
1153echo "${ECHO_T}no" >&6
1154fi
1155
1156fi
1157if test -z "$ac_cv_prog_CC"; then
1158  ac_ct_CC=$CC
1159  # Extract the first word of "cc", so it can be a program name with args.
1160set dummy cc; ac_word=$2
1161echo "$as_me:1161: checking for $ac_word" >&5
1162echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1163if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1164  echo $ECHO_N "(cached) $ECHO_C" >&6
1165else
1166  if test -n "$ac_ct_CC"; then
1167  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1168else
1169  ac_save_IFS=$IFS; IFS=$ac_path_separator
1170ac_dummy="$PATH"
1171for ac_dir in $ac_dummy; do
1172  IFS=$ac_save_IFS
1173  test -z "$ac_dir" && ac_dir=.
1174  $as_executable_p "$ac_dir/$ac_word" || continue
1175ac_cv_prog_ac_ct_CC="cc"
1176echo "$as_me:1176: found $ac_dir/$ac_word" >&5
1177break
1178done
1179
1180fi
1181fi
1182ac_ct_CC=$ac_cv_prog_ac_ct_CC
1183if test -n "$ac_ct_CC"; then
1184  echo "$as_me:1184: result: $ac_ct_CC" >&5
1185echo "${ECHO_T}$ac_ct_CC" >&6
1186else
1187  echo "$as_me:1187: result: no" >&5
1188echo "${ECHO_T}no" >&6
1189fi
1190
1191  CC=$ac_ct_CC
1192else
1193  CC="$ac_cv_prog_CC"
1194fi
1195
1196fi
1197if test -z "$CC"; then
1198  # Extract the first word of "cc", so it can be a program name with args.
1199set dummy cc; ac_word=$2
1200echo "$as_me:1200: checking for $ac_word" >&5
1201echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1202if test "${ac_cv_prog_CC+set}" = set; then
1203  echo $ECHO_N "(cached) $ECHO_C" >&6
1204else
1205  if test -n "$CC"; then
1206  ac_cv_prog_CC="$CC" # Let the user override the test.
1207else
1208  ac_prog_rejected=no
1209  ac_save_IFS=$IFS; IFS=$ac_path_separator
1210ac_dummy="$PATH"
1211for ac_dir in $ac_dummy; do
1212  IFS=$ac_save_IFS
1213  test -z "$ac_dir" && ac_dir=.
1214  $as_executable_p "$ac_dir/$ac_word" || continue
1215if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1216  ac_prog_rejected=yes
1217  continue
1218fi
1219ac_cv_prog_CC="cc"
1220echo "$as_me:1220: found $ac_dir/$ac_word" >&5
1221break
1222done
1223
1224if test $ac_prog_rejected = yes; then
1225  # We found a bogon in the path, so make sure we never use it.
1226  set dummy $ac_cv_prog_CC
1227  shift
1228  if test $# != 0; then
1229    # We chose a different compiler from the bogus one.
1230    # However, it has the same basename, so the bogon will be chosen
1231    # first if we set CC to just the basename; use the full file name.
1232    shift
1233    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1234    shift
1235    ac_cv_prog_CC="$@"
1236  fi
1237fi
1238fi
1239fi
1240CC=$ac_cv_prog_CC
1241if test -n "$CC"; then
1242  echo "$as_me:1242: result: $CC" >&5
1243echo "${ECHO_T}$CC" >&6
1244else
1245  echo "$as_me:1245: result: no" >&5
1246echo "${ECHO_T}no" >&6
1247fi
1248
1249fi
1250if test -z "$CC"; then
1251  if test -n "$ac_tool_prefix"; then
1252  for ac_prog in cl
1253  do
1254    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1255set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1256echo "$as_me:1256: checking for $ac_word" >&5
1257echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1258if test "${ac_cv_prog_CC+set}" = set; then
1259  echo $ECHO_N "(cached) $ECHO_C" >&6
1260else
1261  if test -n "$CC"; then
1262  ac_cv_prog_CC="$CC" # Let the user override the test.
1263else
1264  ac_save_IFS=$IFS; IFS=$ac_path_separator
1265ac_dummy="$PATH"
1266for ac_dir in $ac_dummy; do
1267  IFS=$ac_save_IFS
1268  test -z "$ac_dir" && ac_dir=.
1269  $as_executable_p "$ac_dir/$ac_word" || continue
1270ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1271echo "$as_me:1271: found $ac_dir/$ac_word" >&5
1272break
1273done
1274
1275fi
1276fi
1277CC=$ac_cv_prog_CC
1278if test -n "$CC"; then
1279  echo "$as_me:1279: result: $CC" >&5
1280echo "${ECHO_T}$CC" >&6
1281else
1282  echo "$as_me:1282: result: no" >&5
1283echo "${ECHO_T}no" >&6
1284fi
1285
1286    test -n "$CC" && break
1287  done
1288fi
1289if test -z "$CC"; then
1290  ac_ct_CC=$CC
1291  for ac_prog in cl
1292do
1293  # Extract the first word of "$ac_prog", so it can be a program name with args.
1294set dummy $ac_prog; ac_word=$2
1295echo "$as_me:1295: checking for $ac_word" >&5
1296echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1297if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1298  echo $ECHO_N "(cached) $ECHO_C" >&6
1299else
1300  if test -n "$ac_ct_CC"; then
1301  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1302else
1303  ac_save_IFS=$IFS; IFS=$ac_path_separator
1304ac_dummy="$PATH"
1305for ac_dir in $ac_dummy; do
1306  IFS=$ac_save_IFS
1307  test -z "$ac_dir" && ac_dir=.
1308  $as_executable_p "$ac_dir/$ac_word" || continue
1309ac_cv_prog_ac_ct_CC="$ac_prog"
1310echo "$as_me:1310: found $ac_dir/$ac_word" >&5
1311break
1312done
1313
1314fi
1315fi
1316ac_ct_CC=$ac_cv_prog_ac_ct_CC
1317if test -n "$ac_ct_CC"; then
1318  echo "$as_me:1318: result: $ac_ct_CC" >&5
1319echo "${ECHO_T}$ac_ct_CC" >&6
1320else
1321  echo "$as_me:1321: result: no" >&5
1322echo "${ECHO_T}no" >&6
1323fi
1324
1325  test -n "$ac_ct_CC" && break
1326done
1327
1328  CC=$ac_ct_CC
1329fi
1330
1331fi
1332
1333test -z "$CC" && { { echo "$as_me:1333: error: no acceptable cc found in \$PATH" >&5
1334echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1335   { (exit 1); exit 1; }; }
1336
1337# Provide some information about the compiler.
1338echo "$as_me:1338:" \
1339     "checking for C compiler version" >&5
1340ac_compiler=`set X $ac_compile; echo $2`
1341{ (eval echo "$as_me:1341: \"$ac_compiler --version </dev/null >&5\"") >&5
1342  (eval $ac_compiler --version </dev/null >&5) 2>&5
1343  ac_status=$?
1344  echo "$as_me:1344: \$? = $ac_status" >&5
1345  (exit $ac_status); }
1346{ (eval echo "$as_me:1346: \"$ac_compiler -v </dev/null >&5\"") >&5
1347  (eval $ac_compiler -v </dev/null >&5) 2>&5
1348  ac_status=$?
1349  echo "$as_me:1349: \$? = $ac_status" >&5
1350  (exit $ac_status); }
1351{ (eval echo "$as_me:1351: \"$ac_compiler -V </dev/null >&5\"") >&5
1352  (eval $ac_compiler -V </dev/null >&5) 2>&5
1353  ac_status=$?
1354  echo "$as_me:1354: \$? = $ac_status" >&5
1355  (exit $ac_status); }
1356
1357cat >conftest.$ac_ext <<_ACEOF
1358#line 1358 "configure"
1359#include "confdefs.h"
1360
1361int
1362main ()
1363{
1364
1365  ;
1366  return 0;
1367}
1368_ACEOF
1369ac_clean_files_save=$ac_clean_files
1370ac_clean_files="$ac_clean_files a.out a.exe"
1371# Try to create an executable without -o first, disregard a.out.
1372# It will help us diagnose broken compilers, and finding out an intuition
1373# of exeext.
1374echo "$as_me:1374: checking for C compiler default output" >&5
1375echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1376ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1377if { (eval echo "$as_me:1377: \"$ac_link_default\"") >&5
1378  (eval $ac_link_default) 2>&5
1379  ac_status=$?
1380  echo "$as_me:1380: \$? = $ac_status" >&5
1381  (exit $ac_status); }; then
1382  # Find the output, starting from the most likely.  This scheme is
1383# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1384# resort.
1385for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1386                ls a.out conftest 2>/dev/null;
1387                ls a.* conftest.* 2>/dev/null`; do
1388  case $ac_file in
1389    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1390    a.out ) # We found the default executable, but exeext='' is most
1391            # certainly right.
1392            break;;
1393    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1394          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1395          export ac_cv_exeext
1396          break;;
1397    * ) break;;
1398  esac
1399done
1400else
1401  echo "$as_me: failed program was:" >&5
1402cat conftest.$ac_ext >&5
1403{ { echo "$as_me:1403: error: C compiler cannot create executables" >&5
1404echo "$as_me: error: C compiler cannot create executables" >&2;}
1405   { (exit 77); exit 77; }; }
1406fi
1407
1408ac_exeext=$ac_cv_exeext
1409echo "$as_me:1409: result: $ac_file" >&5
1410echo "${ECHO_T}$ac_file" >&6
1411
1412# Check the compiler produces executables we can run.  If not, either
1413# the compiler is broken, or we cross compile.
1414echo "$as_me:1414: checking whether the C compiler works" >&5
1415echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1416# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1417# If not cross compiling, check that we can run a simple program.
1418if test "$cross_compiling" != yes; then
1419  if { ac_try='./$ac_file'
1420  { (eval echo "$as_me:1420: \"$ac_try\"") >&5
1421  (eval $ac_try) 2>&5
1422  ac_status=$?
1423  echo "$as_me:1423: \$? = $ac_status" >&5
1424  (exit $ac_status); }; }; then
1425    cross_compiling=no
1426  else
1427    if test "$cross_compiling" = maybe; then
1428	cross_compiling=yes
1429    else
1430	{ { echo "$as_me:1430: error: cannot run C compiled programs.
1431If you meant to cross compile, use \`--host'." >&5
1432echo "$as_me: error: cannot run C compiled programs.
1433If you meant to cross compile, use \`--host'." >&2;}
1434   { (exit 1); exit 1; }; }
1435    fi
1436  fi
1437fi
1438echo "$as_me:1438: result: yes" >&5
1439echo "${ECHO_T}yes" >&6
1440
1441rm -f a.out a.exe conftest$ac_cv_exeext
1442ac_clean_files=$ac_clean_files_save
1443# Check the compiler produces executables we can run.  If not, either
1444# the compiler is broken, or we cross compile.
1445echo "$as_me:1445: checking whether we are cross compiling" >&5
1446echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1447echo "$as_me:1447: result: $cross_compiling" >&5
1448echo "${ECHO_T}$cross_compiling" >&6
1449
1450echo "$as_me:1450: checking for executable suffix" >&5
1451echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1452if { (eval echo "$as_me:1452: \"$ac_link\"") >&5
1453  (eval $ac_link) 2>&5
1454  ac_status=$?
1455  echo "$as_me:1455: \$? = $ac_status" >&5
1456  (exit $ac_status); }; then
1457  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1458# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1459# work properly (i.e., refer to `conftest.exe'), while it won't with
1460# `rm'.
1461for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1462  case $ac_file in
1463    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1464    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1465          export ac_cv_exeext
1466          break;;
1467    * ) break;;
1468  esac
1469done
1470else
1471  { { echo "$as_me:1471: error: cannot compute EXEEXT: cannot compile and link" >&5
1472echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1473   { (exit 1); exit 1; }; }
1474fi
1475
1476rm -f conftest$ac_cv_exeext
1477echo "$as_me:1477: result: $ac_cv_exeext" >&5
1478echo "${ECHO_T}$ac_cv_exeext" >&6
1479
1480rm -f conftest.$ac_ext
1481EXEEXT=$ac_cv_exeext
1482ac_exeext=$EXEEXT
1483echo "$as_me:1483: checking for object suffix" >&5
1484echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1485if test "${ac_cv_objext+set}" = set; then
1486  echo $ECHO_N "(cached) $ECHO_C" >&6
1487else
1488  cat >conftest.$ac_ext <<_ACEOF
1489#line 1489 "configure"
1490#include "confdefs.h"
1491
1492int
1493main ()
1494{
1495
1496  ;
1497  return 0;
1498}
1499_ACEOF
1500rm -f conftest.o conftest.obj
1501if { (eval echo "$as_me:1501: \"$ac_compile\"") >&5
1502  (eval $ac_compile) 2>&5
1503  ac_status=$?
1504  echo "$as_me:1504: \$? = $ac_status" >&5
1505  (exit $ac_status); }; then
1506  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1507  case $ac_file in
1508    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1509    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1510       break;;
1511  esac
1512done
1513else
1514  echo "$as_me: failed program was:" >&5
1515cat conftest.$ac_ext >&5
1516{ { echo "$as_me:1516: error: cannot compute OBJEXT: cannot compile" >&5
1517echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1518   { (exit 1); exit 1; }; }
1519fi
1520
1521rm -f conftest.$ac_cv_objext conftest.$ac_ext
1522fi
1523echo "$as_me:1523: result: $ac_cv_objext" >&5
1524echo "${ECHO_T}$ac_cv_objext" >&6
1525OBJEXT=$ac_cv_objext
1526ac_objext=$OBJEXT
1527echo "$as_me:1527: checking whether we are using the GNU C compiler" >&5
1528echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1529if test "${ac_cv_c_compiler_gnu+set}" = set; then
1530  echo $ECHO_N "(cached) $ECHO_C" >&6
1531else
1532  cat >conftest.$ac_ext <<_ACEOF
1533#line 1533 "configure"
1534#include "confdefs.h"
1535
1536int
1537main ()
1538{
1539#ifndef __GNUC__
1540       choke me
1541#endif
1542
1543  ;
1544  return 0;
1545}
1546_ACEOF
1547rm -f conftest.$ac_objext
1548if { (eval echo "$as_me:1548: \"$ac_compile\"") >&5
1549  (eval $ac_compile) 2>&5
1550  ac_status=$?
1551  echo "$as_me:1551: \$? = $ac_status" >&5
1552  (exit $ac_status); } &&
1553         { ac_try='test -s conftest.$ac_objext'
1554  { (eval echo "$as_me:1554: \"$ac_try\"") >&5
1555  (eval $ac_try) 2>&5
1556  ac_status=$?
1557  echo "$as_me:1557: \$? = $ac_status" >&5
1558  (exit $ac_status); }; }; then
1559  ac_compiler_gnu=yes
1560else
1561  echo "$as_me: failed program was:" >&5
1562cat conftest.$ac_ext >&5
1563ac_compiler_gnu=no
1564fi
1565rm -f conftest.$ac_objext conftest.$ac_ext
1566ac_cv_c_compiler_gnu=$ac_compiler_gnu
1567
1568fi
1569echo "$as_me:1569: result: $ac_cv_c_compiler_gnu" >&5
1570echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1571GCC=`test $ac_compiler_gnu = yes && echo yes`
1572ac_test_CFLAGS=${CFLAGS+set}
1573ac_save_CFLAGS=$CFLAGS
1574CFLAGS="-g"
1575echo "$as_me:1575: checking whether $CC accepts -g" >&5
1576echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1577if test "${ac_cv_prog_cc_g+set}" = set; then
1578  echo $ECHO_N "(cached) $ECHO_C" >&6
1579else
1580  cat >conftest.$ac_ext <<_ACEOF
1581#line 1581 "configure"
1582#include "confdefs.h"
1583
1584int
1585main ()
1586{
1587
1588  ;
1589  return 0;
1590}
1591_ACEOF
1592rm -f conftest.$ac_objext
1593if { (eval echo "$as_me:1593: \"$ac_compile\"") >&5
1594  (eval $ac_compile) 2>&5
1595  ac_status=$?
1596  echo "$as_me:1596: \$? = $ac_status" >&5
1597  (exit $ac_status); } &&
1598         { ac_try='test -s conftest.$ac_objext'
1599  { (eval echo "$as_me:1599: \"$ac_try\"") >&5
1600  (eval $ac_try) 2>&5
1601  ac_status=$?
1602  echo "$as_me:1602: \$? = $ac_status" >&5
1603  (exit $ac_status); }; }; then
1604  ac_cv_prog_cc_g=yes
1605else
1606  echo "$as_me: failed program was:" >&5
1607cat conftest.$ac_ext >&5
1608ac_cv_prog_cc_g=no
1609fi
1610rm -f conftest.$ac_objext conftest.$ac_ext
1611fi
1612echo "$as_me:1612: result: $ac_cv_prog_cc_g" >&5
1613echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1614if test "$ac_test_CFLAGS" = set; then
1615  CFLAGS=$ac_save_CFLAGS
1616elif test $ac_cv_prog_cc_g = yes; then
1617  if test "$GCC" = yes; then
1618    CFLAGS="-g -O2"
1619  else
1620    CFLAGS="-g"
1621  fi
1622else
1623  if test "$GCC" = yes; then
1624    CFLAGS="-O2"
1625  else
1626    CFLAGS=
1627  fi
1628fi
1629# Some people use a C++ compiler to compile C.  Since we use `exit',
1630# in C++ we need to declare it.  In case someone uses the same compiler
1631# for both compiling C and C++ we need to have the C++ compiler decide
1632# the declaration of exit, since it's the most demanding environment.
1633cat >conftest.$ac_ext <<_ACEOF
1634#ifndef __cplusplus
1635  choke me
1636#endif
1637_ACEOF
1638rm -f conftest.$ac_objext
1639if { (eval echo "$as_me:1639: \"$ac_compile\"") >&5
1640  (eval $ac_compile) 2>&5
1641  ac_status=$?
1642  echo "$as_me:1642: \$? = $ac_status" >&5
1643  (exit $ac_status); } &&
1644         { ac_try='test -s conftest.$ac_objext'
1645  { (eval echo "$as_me:1645: \"$ac_try\"") >&5
1646  (eval $ac_try) 2>&5
1647  ac_status=$?
1648  echo "$as_me:1648: \$? = $ac_status" >&5
1649  (exit $ac_status); }; }; then
1650  for ac_declaration in \
1651   ''\
1652   '#include <stdlib.h>' \
1653   'extern "C" void std::exit (int) throw (); using std::exit;' \
1654   'extern "C" void std::exit (int); using std::exit;' \
1655   'extern "C" void exit (int) throw ();' \
1656   'extern "C" void exit (int);' \
1657   'void exit (int);'
1658do
1659  cat >conftest.$ac_ext <<_ACEOF
1660#line 1660 "configure"
1661#include "confdefs.h"
1662#include <stdlib.h>
1663$ac_declaration
1664int
1665main ()
1666{
1667exit (42);
1668  ;
1669  return 0;
1670}
1671_ACEOF
1672rm -f conftest.$ac_objext
1673if { (eval echo "$as_me:1673: \"$ac_compile\"") >&5
1674  (eval $ac_compile) 2>&5
1675  ac_status=$?
1676  echo "$as_me:1676: \$? = $ac_status" >&5
1677  (exit $ac_status); } &&
1678         { ac_try='test -s conftest.$ac_objext'
1679  { (eval echo "$as_me:1679: \"$ac_try\"") >&5
1680  (eval $ac_try) 2>&5
1681  ac_status=$?
1682  echo "$as_me:1682: \$? = $ac_status" >&5
1683  (exit $ac_status); }; }; then
1684  :
1685else
1686  echo "$as_me: failed program was:" >&5
1687cat conftest.$ac_ext >&5
1688continue
1689fi
1690rm -f conftest.$ac_objext conftest.$ac_ext
1691  cat >conftest.$ac_ext <<_ACEOF
1692#line 1692 "configure"
1693#include "confdefs.h"
1694$ac_declaration
1695int
1696main ()
1697{
1698exit (42);
1699  ;
1700  return 0;
1701}
1702_ACEOF
1703rm -f conftest.$ac_objext
1704if { (eval echo "$as_me:1704: \"$ac_compile\"") >&5
1705  (eval $ac_compile) 2>&5
1706  ac_status=$?
1707  echo "$as_me:1707: \$? = $ac_status" >&5
1708  (exit $ac_status); } &&
1709         { ac_try='test -s conftest.$ac_objext'
1710  { (eval echo "$as_me:1710: \"$ac_try\"") >&5
1711  (eval $ac_try) 2>&5
1712  ac_status=$?
1713  echo "$as_me:1713: \$? = $ac_status" >&5
1714  (exit $ac_status); }; }; then
1715  break
1716else
1717  echo "$as_me: failed program was:" >&5
1718cat conftest.$ac_ext >&5
1719fi
1720rm -f conftest.$ac_objext conftest.$ac_ext
1721done
1722rm -rf conftest*
1723if test -n "$ac_declaration"; then
1724  echo '#ifdef __cplusplus' >>confdefs.h
1725  echo $ac_declaration      >>confdefs.h
1726  echo '#endif'             >>confdefs.h
1727fi
1728
1729else
1730  echo "$as_me: failed program was:" >&5
1731cat conftest.$ac_ext >&5
1732fi
1733rm -f conftest.$ac_objext conftest.$ac_ext
1734ac_ext=c
1735ac_cpp='$CPP $CPPFLAGS'
1736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1738ac_compiler_gnu=$ac_cv_c_compiler_gnu
1739ac_main_return=return
1740
1741GCC_VERSION=none
1742if test "$GCC" = yes ; then
1743	echo "$as_me:1743: checking version of $CC" >&5
1744echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1745	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.].*//'`"
1746	test -z "$GCC_VERSION" && GCC_VERSION=unknown
1747	echo "$as_me:1747: result: $GCC_VERSION" >&5
1748echo "${ECHO_T}$GCC_VERSION" >&6
1749fi
1750
1751echo "$as_me:1751: checking for $CC option to accept ANSI C" >&5
1752echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1753if test "${ac_cv_prog_cc_stdc+set}" = set; then
1754  echo $ECHO_N "(cached) $ECHO_C" >&6
1755else
1756  ac_cv_prog_cc_stdc=no
1757ac_save_CC=$CC
1758cat >conftest.$ac_ext <<_ACEOF
1759#line 1759 "configure"
1760#include "confdefs.h"
1761#include <stdarg.h>
1762#include <stdio.h>
1763#include <sys/types.h>
1764#include <sys/stat.h>
1765/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1766struct buf { int x; };
1767FILE * (*rcsopen) (struct buf *, struct stat *, int);
1768static char *e (p, i)
1769     char **p;
1770     int i;
1771{
1772  return p[i];
1773}
1774static char *f (char * (*g) (char **, int), char **p, ...)
1775{
1776  char *s;
1777  va_list v;
1778  va_start (v,p);
1779  s = g (p, va_arg (v,int));
1780  va_end (v);
1781  return s;
1782}
1783int test (int i, double x);
1784struct s1 {int (*f) (int a);};
1785struct s2 {int (*f) (double a);};
1786int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1787int argc;
1788char **argv;
1789int
1790main ()
1791{
1792return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1793  ;
1794  return 0;
1795}
1796_ACEOF
1797# Don't try gcc -ansi; that turns off useful extensions and
1798# breaks some systems' header files.
1799# AIX			-qlanglvl=ansi
1800# Ultrix and OSF/1	-std1
1801# HP-UX 10.20 and later	-Ae
1802# HP-UX older versions	-Aa -D_HPUX_SOURCE
1803# SVR4			-Xc -D__EXTENSIONS__
1804for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1805do
1806  CC="$ac_save_CC $ac_arg"
1807  rm -f conftest.$ac_objext
1808if { (eval echo "$as_me:1808: \"$ac_compile\"") >&5
1809  (eval $ac_compile) 2>&5
1810  ac_status=$?
1811  echo "$as_me:1811: \$? = $ac_status" >&5
1812  (exit $ac_status); } &&
1813         { ac_try='test -s conftest.$ac_objext'
1814  { (eval echo "$as_me:1814: \"$ac_try\"") >&5
1815  (eval $ac_try) 2>&5
1816  ac_status=$?
1817  echo "$as_me:1817: \$? = $ac_status" >&5
1818  (exit $ac_status); }; }; then
1819  ac_cv_prog_cc_stdc=$ac_arg
1820break
1821else
1822  echo "$as_me: failed program was:" >&5
1823cat conftest.$ac_ext >&5
1824fi
1825rm -f conftest.$ac_objext
1826done
1827rm -f conftest.$ac_ext conftest.$ac_objext
1828CC=$ac_save_CC
1829
1830fi
1831
1832case "x$ac_cv_prog_cc_stdc" in
1833  x|xno)
1834    echo "$as_me:1834: result: none needed" >&5
1835echo "${ECHO_T}none needed" >&6 ;;
1836  *)
1837    echo "$as_me:1837: result: $ac_cv_prog_cc_stdc" >&5
1838echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1839    CC="$CC $ac_cv_prog_cc_stdc" ;;
1840esac
1841
1842# This should have been defined by AC_PROG_CC
1843: ${CC:=cc}
1844
1845echo "$as_me:1845: checking \$CC variable" >&5
1846echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1847case "$CC" in #(vi
1848*[\ \	]-[IUD]*)
1849	echo "$as_me:1849: result: broken" >&5
1850echo "${ECHO_T}broken" >&6
1851	{ echo "$as_me:1851: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1852echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1853	# humor him...
1854	cf_flags=`echo "$CC" | sed -e 's/^[^ 	]*[ 	]//'`
1855	CC=`echo "$CC" | sed -e 's/[ 	].*//'`
1856
1857cf_fix_cppflags=no
1858cf_new_cflags=
1859cf_new_cppflags=
1860cf_new_extra_cppflags=
1861
1862for cf_add_cflags in $cf_flags
1863do
1864case $cf_fix_cppflags in
1865no)
1866	case $cf_add_cflags in #(vi
1867	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1868		case $cf_add_cflags in
1869		-D*)
1870			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1871
1872			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1873				&& test -z "${cf_tst_cflags}" \
1874				&& cf_fix_cppflags=yes
1875
1876			if test $cf_fix_cppflags = yes ; then
1877				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1878				continue
1879			elif test "${cf_tst_cflags}" = "\"'" ; then
1880				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1881				continue
1882			fi
1883			;;
1884		esac
1885		case "$CPPFLAGS" in
1886		*$cf_add_cflags) #(vi
1887			;;
1888		*) #(vi
1889			case $cf_add_cflags in #(vi
1890			-D*)
1891				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1892
1893CPPFLAGS=`echo "$CPPFLAGS" | \
1894	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
1895		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
1896
1897				;;
1898			esac
1899			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1900			;;
1901		esac
1902		;;
1903	*)
1904		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1905		;;
1906	esac
1907	;;
1908yes)
1909	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1910
1911	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1912
1913	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1914		&& test -z "${cf_tst_cflags}" \
1915		&& cf_fix_cppflags=no
1916	;;
1917esac
1918done
1919
1920if test -n "$cf_new_cflags" ; then
1921
1922	CFLAGS="$CFLAGS $cf_new_cflags"
1923fi
1924
1925if test -n "$cf_new_cppflags" ; then
1926
1927	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1928fi
1929
1930if test -n "$cf_new_extra_cppflags" ; then
1931
1932	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1933fi
1934
1935	;;
1936*)
1937	echo "$as_me:1937: result: ok" >&5
1938echo "${ECHO_T}ok" >&6
1939	;;
1940esac
1941
1942ac_ext=c
1943ac_cpp='$CPP $CPPFLAGS'
1944ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1945ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1946ac_compiler_gnu=$ac_cv_c_compiler_gnu
1947ac_main_return=return
1948echo "$as_me:1948: checking how to run the C preprocessor" >&5
1949echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1950# On Suns, sometimes $CPP names a directory.
1951if test -n "$CPP" && test -d "$CPP"; then
1952  CPP=
1953fi
1954if test -z "$CPP"; then
1955  if test "${ac_cv_prog_CPP+set}" = set; then
1956  echo $ECHO_N "(cached) $ECHO_C" >&6
1957else
1958      # Double quotes because CPP needs to be expanded
1959    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1960    do
1961      ac_preproc_ok=false
1962for ac_c_preproc_warn_flag in '' yes
1963do
1964  # Use a header file that comes with gcc, so configuring glibc
1965  # with a fresh cross-compiler works.
1966  # On the NeXT, cc -E runs the code through the compiler's parser,
1967  # not just through cpp. "Syntax error" is here to catch this case.
1968  cat >conftest.$ac_ext <<_ACEOF
1969#line 1969 "configure"
1970#include "confdefs.h"
1971#include <assert.h>
1972                     Syntax error
1973_ACEOF
1974if { (eval echo "$as_me:1974: \"$ac_cpp conftest.$ac_ext\"") >&5
1975  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1976  ac_status=$?
1977  egrep -v '^ *\+' conftest.er1 >conftest.err
1978  rm -f conftest.er1
1979  cat conftest.err >&5
1980  echo "$as_me:1980: \$? = $ac_status" >&5
1981  (exit $ac_status); } >/dev/null; then
1982  if test -s conftest.err; then
1983    ac_cpp_err=$ac_c_preproc_warn_flag
1984  else
1985    ac_cpp_err=
1986  fi
1987else
1988  ac_cpp_err=yes
1989fi
1990if test -z "$ac_cpp_err"; then
1991  :
1992else
1993  echo "$as_me: failed program was:" >&5
1994  cat conftest.$ac_ext >&5
1995  # Broken: fails on valid input.
1996continue
1997fi
1998rm -f conftest.err conftest.$ac_ext
1999
2000  # OK, works on sane cases.  Now check whether non-existent headers
2001  # can be detected and how.
2002  cat >conftest.$ac_ext <<_ACEOF
2003#line 2003 "configure"
2004#include "confdefs.h"
2005#include <ac_nonexistent.h>
2006_ACEOF
2007if { (eval echo "$as_me:2007: \"$ac_cpp conftest.$ac_ext\"") >&5
2008  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2009  ac_status=$?
2010  egrep -v '^ *\+' conftest.er1 >conftest.err
2011  rm -f conftest.er1
2012  cat conftest.err >&5
2013  echo "$as_me:2013: \$? = $ac_status" >&5
2014  (exit $ac_status); } >/dev/null; then
2015  if test -s conftest.err; then
2016    ac_cpp_err=$ac_c_preproc_warn_flag
2017  else
2018    ac_cpp_err=
2019  fi
2020else
2021  ac_cpp_err=yes
2022fi
2023if test -z "$ac_cpp_err"; then
2024  # Broken: success on invalid input.
2025continue
2026else
2027  echo "$as_me: failed program was:" >&5
2028  cat conftest.$ac_ext >&5
2029  # Passes both tests.
2030ac_preproc_ok=:
2031break
2032fi
2033rm -f conftest.err conftest.$ac_ext
2034
2035done
2036# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2037rm -f conftest.err conftest.$ac_ext
2038if $ac_preproc_ok; then
2039  break
2040fi
2041
2042    done
2043    ac_cv_prog_CPP=$CPP
2044
2045fi
2046  CPP=$ac_cv_prog_CPP
2047else
2048  ac_cv_prog_CPP=$CPP
2049fi
2050echo "$as_me:2050: result: $CPP" >&5
2051echo "${ECHO_T}$CPP" >&6
2052ac_preproc_ok=false
2053for ac_c_preproc_warn_flag in '' yes
2054do
2055  # Use a header file that comes with gcc, so configuring glibc
2056  # with a fresh cross-compiler works.
2057  # On the NeXT, cc -E runs the code through the compiler's parser,
2058  # not just through cpp. "Syntax error" is here to catch this case.
2059  cat >conftest.$ac_ext <<_ACEOF
2060#line 2060 "configure"
2061#include "confdefs.h"
2062#include <assert.h>
2063                     Syntax error
2064_ACEOF
2065if { (eval echo "$as_me:2065: \"$ac_cpp conftest.$ac_ext\"") >&5
2066  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2067  ac_status=$?
2068  egrep -v '^ *\+' conftest.er1 >conftest.err
2069  rm -f conftest.er1
2070  cat conftest.err >&5
2071  echo "$as_me:2071: \$? = $ac_status" >&5
2072  (exit $ac_status); } >/dev/null; then
2073  if test -s conftest.err; then
2074    ac_cpp_err=$ac_c_preproc_warn_flag
2075  else
2076    ac_cpp_err=
2077  fi
2078else
2079  ac_cpp_err=yes
2080fi
2081if test -z "$ac_cpp_err"; then
2082  :
2083else
2084  echo "$as_me: failed program was:" >&5
2085  cat conftest.$ac_ext >&5
2086  # Broken: fails on valid input.
2087continue
2088fi
2089rm -f conftest.err conftest.$ac_ext
2090
2091  # OK, works on sane cases.  Now check whether non-existent headers
2092  # can be detected and how.
2093  cat >conftest.$ac_ext <<_ACEOF
2094#line 2094 "configure"
2095#include "confdefs.h"
2096#include <ac_nonexistent.h>
2097_ACEOF
2098if { (eval echo "$as_me:2098: \"$ac_cpp conftest.$ac_ext\"") >&5
2099  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2100  ac_status=$?
2101  egrep -v '^ *\+' conftest.er1 >conftest.err
2102  rm -f conftest.er1
2103  cat conftest.err >&5
2104  echo "$as_me:2104: \$? = $ac_status" >&5
2105  (exit $ac_status); } >/dev/null; then
2106  if test -s conftest.err; then
2107    ac_cpp_err=$ac_c_preproc_warn_flag
2108  else
2109    ac_cpp_err=
2110  fi
2111else
2112  ac_cpp_err=yes
2113fi
2114if test -z "$ac_cpp_err"; then
2115  # Broken: success on invalid input.
2116continue
2117else
2118  echo "$as_me: failed program was:" >&5
2119  cat conftest.$ac_ext >&5
2120  # Passes both tests.
2121ac_preproc_ok=:
2122break
2123fi
2124rm -f conftest.err conftest.$ac_ext
2125
2126done
2127# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2128rm -f conftest.err conftest.$ac_ext
2129if $ac_preproc_ok; then
2130  :
2131else
2132  { { echo "$as_me:2132: error: C preprocessor \"$CPP\" fails sanity check" >&5
2133echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2134   { (exit 1); exit 1; }; }
2135fi
2136
2137ac_ext=c
2138ac_cpp='$CPP $CPPFLAGS'
2139ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2140ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2141ac_compiler_gnu=$ac_cv_c_compiler_gnu
2142ac_main_return=return
2143
2144echo "$as_me:2144: checking whether ${MAKE-make} sets \${MAKE}" >&5
2145echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2146set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2147if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2148  echo $ECHO_N "(cached) $ECHO_C" >&6
2149else
2150  cat >conftest.make <<\EOF
2151all:
2152	@echo 'ac_maketemp="${MAKE}"'
2153EOF
2154# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2155eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2156if test -n "$ac_maketemp"; then
2157  eval ac_cv_prog_make_${ac_make}_set=yes
2158else
2159  eval ac_cv_prog_make_${ac_make}_set=no
2160fi
2161rm -f conftest.make
2162fi
2163if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2164  echo "$as_me:2164: result: yes" >&5
2165echo "${ECHO_T}yes" >&6
2166  SET_MAKE=
2167else
2168  echo "$as_me:2168: result: no" >&5
2169echo "${ECHO_T}no" >&6
2170  SET_MAKE="MAKE=${MAKE-make}"
2171fi
2172
2173if test -n "$ac_tool_prefix"; then
2174  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2175set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2176echo "$as_me:2176: checking for $ac_word" >&5
2177echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2178if test "${ac_cv_prog_RANLIB+set}" = set; then
2179  echo $ECHO_N "(cached) $ECHO_C" >&6
2180else
2181  if test -n "$RANLIB"; then
2182  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2183else
2184  ac_save_IFS=$IFS; IFS=$ac_path_separator
2185ac_dummy="$PATH"
2186for ac_dir in $ac_dummy; do
2187  IFS=$ac_save_IFS
2188  test -z "$ac_dir" && ac_dir=.
2189  $as_executable_p "$ac_dir/$ac_word" || continue
2190ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2191echo "$as_me:2191: found $ac_dir/$ac_word" >&5
2192break
2193done
2194
2195fi
2196fi
2197RANLIB=$ac_cv_prog_RANLIB
2198if test -n "$RANLIB"; then
2199  echo "$as_me:2199: result: $RANLIB" >&5
2200echo "${ECHO_T}$RANLIB" >&6
2201else
2202  echo "$as_me:2202: result: no" >&5
2203echo "${ECHO_T}no" >&6
2204fi
2205
2206fi
2207if test -z "$ac_cv_prog_RANLIB"; then
2208  ac_ct_RANLIB=$RANLIB
2209  # Extract the first word of "ranlib", so it can be a program name with args.
2210set dummy ranlib; ac_word=$2
2211echo "$as_me:2211: checking for $ac_word" >&5
2212echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2213if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2214  echo $ECHO_N "(cached) $ECHO_C" >&6
2215else
2216  if test -n "$ac_ct_RANLIB"; then
2217  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2218else
2219  ac_save_IFS=$IFS; IFS=$ac_path_separator
2220ac_dummy="$PATH"
2221for ac_dir in $ac_dummy; do
2222  IFS=$ac_save_IFS
2223  test -z "$ac_dir" && ac_dir=.
2224  $as_executable_p "$ac_dir/$ac_word" || continue
2225ac_cv_prog_ac_ct_RANLIB="ranlib"
2226echo "$as_me:2226: found $ac_dir/$ac_word" >&5
2227break
2228done
2229
2230  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2231fi
2232fi
2233ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2234if test -n "$ac_ct_RANLIB"; then
2235  echo "$as_me:2235: result: $ac_ct_RANLIB" >&5
2236echo "${ECHO_T}$ac_ct_RANLIB" >&6
2237else
2238  echo "$as_me:2238: result: no" >&5
2239echo "${ECHO_T}no" >&6
2240fi
2241
2242  RANLIB=$ac_ct_RANLIB
2243else
2244  RANLIB="$ac_cv_prog_RANLIB"
2245fi
2246
2247ac_aux_dir=
2248for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2249  if test -f $ac_dir/install-sh; then
2250    ac_aux_dir=$ac_dir
2251    ac_install_sh="$ac_aux_dir/install-sh -c"
2252    break
2253  elif test -f $ac_dir/install.sh; then
2254    ac_aux_dir=$ac_dir
2255    ac_install_sh="$ac_aux_dir/install.sh -c"
2256    break
2257  elif test -f $ac_dir/shtool; then
2258    ac_aux_dir=$ac_dir
2259    ac_install_sh="$ac_aux_dir/shtool install -c"
2260    break
2261  fi
2262done
2263if test -z "$ac_aux_dir"; then
2264  { { echo "$as_me:2264: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2265echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2266   { (exit 1); exit 1; }; }
2267fi
2268ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2269ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2270ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2271
2272# Find a good install program.  We prefer a C program (faster),
2273# so one script is as good as another.  But avoid the broken or
2274# incompatible versions:
2275# SysV /etc/install, /usr/sbin/install
2276# SunOS /usr/etc/install
2277# IRIX /sbin/install
2278# AIX /bin/install
2279# AmigaOS /C/install, which installs bootblocks on floppy discs
2280# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2281# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2282# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2283# ./install, which can be erroneously created by make from ./install.sh.
2284echo "$as_me:2284: checking for a BSD compatible install" >&5
2285echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2286if test -z "$INSTALL"; then
2287if test "${ac_cv_path_install+set}" = set; then
2288  echo $ECHO_N "(cached) $ECHO_C" >&6
2289else
2290    ac_save_IFS=$IFS; IFS=$ac_path_separator
2291  for ac_dir in $PATH; do
2292    IFS=$ac_save_IFS
2293    # Account for people who put trailing slashes in PATH elements.
2294    case $ac_dir/ in
2295    / | ./ | .// | /cC/* \
2296    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2297    | /usr/ucb/* ) ;;
2298    *)
2299      # OSF1 and SCO ODT 3.0 have their own names for install.
2300      # Don't use installbsd from OSF since it installs stuff as root
2301      # by default.
2302      for ac_prog in ginstall scoinst install; do
2303        if $as_executable_p "$ac_dir/$ac_prog"; then
2304	  if test $ac_prog = install &&
2305            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2306	    # AIX install.  It has an incompatible calling convention.
2307	    :
2308	  elif test $ac_prog = install &&
2309	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2310	    # program-specific install script used by HP pwplus--don't use.
2311	    :
2312	  else
2313	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2314	    break 2
2315	  fi
2316	fi
2317      done
2318      ;;
2319    esac
2320  done
2321
2322fi
2323  if test "${ac_cv_path_install+set}" = set; then
2324    INSTALL=$ac_cv_path_install
2325  else
2326    # As a last resort, use the slow shell script.  We don't cache a
2327    # path for INSTALL within a source directory, because that will
2328    # break other packages using the cache if that directory is
2329    # removed, or if the path is relative.
2330    INSTALL=$ac_install_sh
2331  fi
2332fi
2333echo "$as_me:2333: result: $INSTALL" >&5
2334echo "${ECHO_T}$INSTALL" >&6
2335
2336# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2337# It thinks the first close brace ends the variable substitution.
2338test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2339
2340test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2341
2342test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2343
2344echo "$as_me:2344: checking whether ln -s works" >&5
2345echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2346LN_S=$as_ln_s
2347if test "$LN_S" = "ln -s"; then
2348  echo "$as_me:2348: result: yes" >&5
2349echo "${ECHO_T}yes" >&6
2350else
2351  echo "$as_me:2351: result: no, using $LN_S" >&5
2352echo "${ECHO_T}no, using $LN_S" >&6
2353fi
2354
2355echo "$as_me:2355: checking if $LN_S -f options work" >&5
2356echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2357
2358rm -f conf$$.src conf$$dst
2359echo >conf$$.dst
2360echo first >conf$$.src
2361if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2362	cf_prog_ln_sf=yes
2363else
2364	cf_prog_ln_sf=no
2365fi
2366rm -f conf$$.dst conf$$src
2367echo "$as_me:2367: result: $cf_prog_ln_sf" >&5
2368echo "${ECHO_T}$cf_prog_ln_sf" >&6
2369
2370test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2371
2372for ac_prog in tdlint lint alint splint lclint
2373do
2374  # Extract the first word of "$ac_prog", so it can be a program name with args.
2375set dummy $ac_prog; ac_word=$2
2376echo "$as_me:2376: checking for $ac_word" >&5
2377echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2378if test "${ac_cv_prog_LINT+set}" = set; then
2379  echo $ECHO_N "(cached) $ECHO_C" >&6
2380else
2381  if test -n "$LINT"; then
2382  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2383else
2384  ac_save_IFS=$IFS; IFS=$ac_path_separator
2385ac_dummy="$PATH"
2386for ac_dir in $ac_dummy; do
2387  IFS=$ac_save_IFS
2388  test -z "$ac_dir" && ac_dir=.
2389  $as_executable_p "$ac_dir/$ac_word" || continue
2390ac_cv_prog_LINT="$ac_prog"
2391echo "$as_me:2391: found $ac_dir/$ac_word" >&5
2392break
2393done
2394
2395fi
2396fi
2397LINT=$ac_cv_prog_LINT
2398if test -n "$LINT"; then
2399  echo "$as_me:2399: result: $LINT" >&5
2400echo "${ECHO_T}$LINT" >&6
2401else
2402  echo "$as_me:2402: result: no" >&5
2403echo "${ECHO_T}no" >&6
2404fi
2405
2406  test -n "$LINT" && break
2407done
2408
2409if test -n "$ac_tool_prefix"; then
2410  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2411set dummy ${ac_tool_prefix}ar; ac_word=$2
2412echo "$as_me:2412: checking for $ac_word" >&5
2413echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2414if test "${ac_cv_prog_AR+set}" = set; then
2415  echo $ECHO_N "(cached) $ECHO_C" >&6
2416else
2417  if test -n "$AR"; then
2418  ac_cv_prog_AR="$AR" # Let the user override the test.
2419else
2420  ac_save_IFS=$IFS; IFS=$ac_path_separator
2421ac_dummy="$PATH"
2422for ac_dir in $ac_dummy; do
2423  IFS=$ac_save_IFS
2424  test -z "$ac_dir" && ac_dir=.
2425  $as_executable_p "$ac_dir/$ac_word" || continue
2426ac_cv_prog_AR="${ac_tool_prefix}ar"
2427echo "$as_me:2427: found $ac_dir/$ac_word" >&5
2428break
2429done
2430
2431fi
2432fi
2433AR=$ac_cv_prog_AR
2434if test -n "$AR"; then
2435  echo "$as_me:2435: result: $AR" >&5
2436echo "${ECHO_T}$AR" >&6
2437else
2438  echo "$as_me:2438: result: no" >&5
2439echo "${ECHO_T}no" >&6
2440fi
2441
2442fi
2443if test -z "$ac_cv_prog_AR"; then
2444  ac_ct_AR=$AR
2445  # Extract the first word of "ar", so it can be a program name with args.
2446set dummy ar; ac_word=$2
2447echo "$as_me:2447: checking for $ac_word" >&5
2448echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2449if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
2450  echo $ECHO_N "(cached) $ECHO_C" >&6
2451else
2452  if test -n "$ac_ct_AR"; then
2453  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
2454else
2455  ac_save_IFS=$IFS; IFS=$ac_path_separator
2456ac_dummy="$PATH"
2457for ac_dir in $ac_dummy; do
2458  IFS=$ac_save_IFS
2459  test -z "$ac_dir" && ac_dir=.
2460  $as_executable_p "$ac_dir/$ac_word" || continue
2461ac_cv_prog_ac_ct_AR="ar"
2462echo "$as_me:2462: found $ac_dir/$ac_word" >&5
2463break
2464done
2465
2466  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
2467fi
2468fi
2469ac_ct_AR=$ac_cv_prog_ac_ct_AR
2470if test -n "$ac_ct_AR"; then
2471  echo "$as_me:2471: result: $ac_ct_AR" >&5
2472echo "${ECHO_T}$ac_ct_AR" >&6
2473else
2474  echo "$as_me:2474: result: no" >&5
2475echo "${ECHO_T}no" >&6
2476fi
2477
2478  AR=$ac_ct_AR
2479else
2480  AR="$ac_cv_prog_AR"
2481fi
2482
2483echo "$as_me:2483: checking for makeflags variable" >&5
2484echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2485if test "${cf_cv_makeflags+set}" = set; then
2486  echo $ECHO_N "(cached) $ECHO_C" >&6
2487else
2488
2489	cf_cv_makeflags=''
2490	for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2491	do
2492		cat >cf_makeflags.tmp <<CF_EOF
2493SHELL = /bin/sh
2494all :
2495	@ echo '.$cf_option'
2496CF_EOF
2497		cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ 	]*$,,'`
2498		case "$cf_result" in
2499		.*k)
2500			cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2501			case "$cf_result" in
2502			.*CC=*)	cf_cv_makeflags=
2503				;;
2504			*)	cf_cv_makeflags=$cf_option
2505				;;
2506			esac
2507			break
2508			;;
2509		.-)	;;
2510		*)	echo "given option \"$cf_option\", no match \"$cf_result\""
2511			;;
2512		esac
2513	done
2514	rm -f cf_makeflags.tmp
2515
2516fi
2517echo "$as_me:2517: result: $cf_cv_makeflags" >&5
2518echo "${ECHO_T}$cf_cv_makeflags" >&6
2519
2520echo "$as_me:2520: checking if filesystem supports mixed-case filenames" >&5
2521echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2522if test "${cf_cv_mixedcase+set}" = set; then
2523  echo $ECHO_N "(cached) $ECHO_C" >&6
2524else
2525
2526if test "$cross_compiling" = yes ; then
2527	case $target_alias in #(vi
2528	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw32*|*-uwin*) #(vi
2529		cf_cv_mixedcase=no
2530		;;
2531	*)
2532		cf_cv_mixedcase=yes
2533		;;
2534	esac
2535else
2536	rm -f conftest CONFTEST
2537	echo test >conftest
2538	if test -f CONFTEST ; then
2539		cf_cv_mixedcase=no
2540	else
2541		cf_cv_mixedcase=yes
2542	fi
2543	rm -f conftest CONFTEST
2544fi
2545
2546fi
2547echo "$as_me:2547: result: $cf_cv_mixedcase" >&5
2548echo "${ECHO_T}$cf_cv_mixedcase" >&6
2549test "$cf_cv_mixedcase" = yes &&
2550cat >>confdefs.h <<\EOF
2551#define MIXEDCASE_FILENAMES 1
2552EOF
2553
2554for ac_prog in exctags ctags
2555do
2556  # Extract the first word of "$ac_prog", so it can be a program name with args.
2557set dummy $ac_prog; ac_word=$2
2558echo "$as_me:2558: checking for $ac_word" >&5
2559echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2560if test "${ac_cv_prog_CTAGS+set}" = set; then
2561  echo $ECHO_N "(cached) $ECHO_C" >&6
2562else
2563  if test -n "$CTAGS"; then
2564  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2565else
2566  ac_save_IFS=$IFS; IFS=$ac_path_separator
2567ac_dummy="$PATH"
2568for ac_dir in $ac_dummy; do
2569  IFS=$ac_save_IFS
2570  test -z "$ac_dir" && ac_dir=.
2571  $as_executable_p "$ac_dir/$ac_word" || continue
2572ac_cv_prog_CTAGS="$ac_prog"
2573echo "$as_me:2573: found $ac_dir/$ac_word" >&5
2574break
2575done
2576
2577fi
2578fi
2579CTAGS=$ac_cv_prog_CTAGS
2580if test -n "$CTAGS"; then
2581  echo "$as_me:2581: result: $CTAGS" >&5
2582echo "${ECHO_T}$CTAGS" >&6
2583else
2584  echo "$as_me:2584: result: no" >&5
2585echo "${ECHO_T}no" >&6
2586fi
2587
2588  test -n "$CTAGS" && break
2589done
2590
2591for ac_prog in exetags etags
2592do
2593  # Extract the first word of "$ac_prog", so it can be a program name with args.
2594set dummy $ac_prog; ac_word=$2
2595echo "$as_me:2595: checking for $ac_word" >&5
2596echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2597if test "${ac_cv_prog_ETAGS+set}" = set; then
2598  echo $ECHO_N "(cached) $ECHO_C" >&6
2599else
2600  if test -n "$ETAGS"; then
2601  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2602else
2603  ac_save_IFS=$IFS; IFS=$ac_path_separator
2604ac_dummy="$PATH"
2605for ac_dir in $ac_dummy; do
2606  IFS=$ac_save_IFS
2607  test -z "$ac_dir" && ac_dir=.
2608  $as_executable_p "$ac_dir/$ac_word" || continue
2609ac_cv_prog_ETAGS="$ac_prog"
2610echo "$as_me:2610: found $ac_dir/$ac_word" >&5
2611break
2612done
2613
2614fi
2615fi
2616ETAGS=$ac_cv_prog_ETAGS
2617if test -n "$ETAGS"; then
2618  echo "$as_me:2618: result: $ETAGS" >&5
2619echo "${ECHO_T}$ETAGS" >&6
2620else
2621  echo "$as_me:2621: result: no" >&5
2622echo "${ECHO_T}no" >&6
2623fi
2624
2625  test -n "$ETAGS" && break
2626done
2627
2628# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2629set dummy ${CTAGS:-ctags}; 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_LOWER_TAGS+set}" = set; then
2633  echo $ECHO_N "(cached) $ECHO_C" >&6
2634else
2635  if test -n "$MAKE_LOWER_TAGS"; then
2636  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_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_LOWER_TAGS="yes"
2645echo "$as_me:2645: found $ac_dir/$ac_word" >&5
2646break
2647done
2648
2649  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2650fi
2651fi
2652MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2653if test -n "$MAKE_LOWER_TAGS"; then
2654  echo "$as_me:2654: result: $MAKE_LOWER_TAGS" >&5
2655echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2656else
2657  echo "$as_me:2657: result: no" >&5
2658echo "${ECHO_T}no" >&6
2659fi
2660
2661if test "$cf_cv_mixedcase" = yes ; then
2662	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2663set dummy ${ETAGS:-etags}; ac_word=$2
2664echo "$as_me:2664: checking for $ac_word" >&5
2665echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2666if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2667  echo $ECHO_N "(cached) $ECHO_C" >&6
2668else
2669  if test -n "$MAKE_UPPER_TAGS"; then
2670  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2671else
2672  ac_save_IFS=$IFS; IFS=$ac_path_separator
2673ac_dummy="$PATH"
2674for ac_dir in $ac_dummy; do
2675  IFS=$ac_save_IFS
2676  test -z "$ac_dir" && ac_dir=.
2677  $as_executable_p "$ac_dir/$ac_word" || continue
2678ac_cv_prog_MAKE_UPPER_TAGS="yes"
2679echo "$as_me:2679: found $ac_dir/$ac_word" >&5
2680break
2681done
2682
2683  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2684fi
2685fi
2686MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2687if test -n "$MAKE_UPPER_TAGS"; then
2688  echo "$as_me:2688: result: $MAKE_UPPER_TAGS" >&5
2689echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2690else
2691  echo "$as_me:2691: result: no" >&5
2692echo "${ECHO_T}no" >&6
2693fi
2694
2695else
2696	MAKE_UPPER_TAGS=no
2697fi
2698
2699if test "$MAKE_UPPER_TAGS" = yes ; then
2700	MAKE_UPPER_TAGS=
2701else
2702	MAKE_UPPER_TAGS="#"
2703fi
2704
2705if test "$MAKE_LOWER_TAGS" = yes ; then
2706	MAKE_LOWER_TAGS=
2707else
2708	MAKE_LOWER_TAGS="#"
2709fi
2710
2711echo "$as_me:2711: checking if you want to see long compiling messages" >&5
2712echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
2713
2714# Check whether --enable-echo or --disable-echo was given.
2715if test "${enable_echo+set}" = set; then
2716  enableval="$enable_echo"
2717  test "$enableval" != no && enableval=yes
2718  if test "$enableval" != "yes" ; then
2719
2720    ECHO_LT='--silent'
2721    ECHO_LD='@echo linking $@;'
2722    RULE_CC='@echo compiling $<'
2723    SHOW_CC='@echo compiling $@'
2724    ECHO_CC='@'
2725
2726  else
2727
2728    ECHO_LT=''
2729    ECHO_LD=''
2730    RULE_CC=''
2731    SHOW_CC=''
2732    ECHO_CC=''
2733
2734  fi
2735else
2736  enableval=yes
2737
2738    ECHO_LT=''
2739    ECHO_LD=''
2740    RULE_CC=''
2741    SHOW_CC=''
2742    ECHO_CC=''
2743
2744fi;
2745echo "$as_me:2745: result: $enableval" >&5
2746echo "${ECHO_T}$enableval" >&6
2747
2748# Make sure we can run config.sub.
2749$ac_config_sub sun4 >/dev/null 2>&1 ||
2750  { { echo "$as_me:2750: error: cannot run $ac_config_sub" >&5
2751echo "$as_me: error: cannot run $ac_config_sub" >&2;}
2752   { (exit 1); exit 1; }; }
2753
2754echo "$as_me:2754: checking build system type" >&5
2755echo $ECHO_N "checking build system type... $ECHO_C" >&6
2756if test "${ac_cv_build+set}" = set; then
2757  echo $ECHO_N "(cached) $ECHO_C" >&6
2758else
2759  ac_cv_build_alias=$build_alias
2760test -z "$ac_cv_build_alias" &&
2761  ac_cv_build_alias=`$ac_config_guess`
2762test -z "$ac_cv_build_alias" &&
2763  { { echo "$as_me:2763: error: cannot guess build type; you must specify one" >&5
2764echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2765   { (exit 1); exit 1; }; }
2766ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
2767  { { echo "$as_me:2767: error: $ac_config_sub $ac_cv_build_alias failed." >&5
2768echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
2769   { (exit 1); exit 1; }; }
2770
2771fi
2772echo "$as_me:2772: result: $ac_cv_build" >&5
2773echo "${ECHO_T}$ac_cv_build" >&6
2774build=$ac_cv_build
2775build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2776build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2777build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2778
2779if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
2780	echo "$as_me:2780: checking host system type" >&5
2781echo $ECHO_N "checking host system type... $ECHO_C" >&6
2782if test "${ac_cv_host+set}" = set; then
2783  echo $ECHO_N "(cached) $ECHO_C" >&6
2784else
2785  ac_cv_host_alias=$host_alias
2786test -z "$ac_cv_host_alias" &&
2787  ac_cv_host_alias=$ac_cv_build_alias
2788ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
2789  { { echo "$as_me:2789: error: $ac_config_sub $ac_cv_host_alias failed" >&5
2790echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
2791   { (exit 1); exit 1; }; }
2792
2793fi
2794echo "$as_me:2794: result: $ac_cv_host" >&5
2795echo "${ECHO_T}$ac_cv_host" >&6
2796host=$ac_cv_host
2797host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2798host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2799host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2800
2801	system_name="$host_os"
2802else
2803	system_name="`(uname -s -r) 2>/dev/null`"
2804	if test -z "$system_name" ; then
2805		system_name="`(hostname) 2>/dev/null`"
2806	fi
2807fi
2808test -n "$system_name" &&
2809cat >>confdefs.h <<EOF
2810#define SYSTEM_NAME "$system_name"
2811EOF
2812
2813if test "${cf_cv_system_name+set}" = set; then
2814  echo $ECHO_N "(cached) $ECHO_C" >&6
2815else
2816  cf_cv_system_name="$system_name"
2817fi
2818
2819test -z "$system_name" && system_name="$cf_cv_system_name"
2820test -n "$cf_cv_system_name" && echo "$as_me:2820: result: Configuring for $cf_cv_system_name" >&5
2821echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
2822
2823if test ".$system_name" != ".$cf_cv_system_name" ; then
2824	echo "$as_me:2824: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
2825echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
2826	{ { echo "$as_me:2826: error: \"Please remove config.cache and try again.\"" >&5
2827echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
2828   { (exit 1); exit 1; }; }
2829fi
2830
2831case $cf_cv_system_name in
2832os2*)
2833    CFLAGS="$CFLAGS -Zmt"
2834    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2835    CXXFLAGS="$CXXFLAGS -Zmt"
2836    # autoconf's macro sets -Zexe and suffix both, which conflict:w
2837    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2838    ac_cv_exeext=.exe
2839    ;;
2840esac
2841
2842PROG_EXT="$EXEEXT"
2843
2844test -n "$PROG_EXT" &&
2845cat >>confdefs.h <<EOF
2846#define PROG_EXT "$PROG_EXT"
2847EOF
2848
2849	echo "$as_me:2849: checking for PATH separator" >&5
2850echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
2851	case $cf_cv_system_name in
2852	os2*)	PATH_SEPARATOR=';'  ;;
2853	*)	${PATH_SEPARATOR:=':'}  ;;
2854	esac
2855
2856	echo "$as_me:2856: result: $PATH_SEPARATOR" >&5
2857echo "${ECHO_T}$PATH_SEPARATOR" >&6
2858
2859	case $cf_cv_system_name in #(vi
2860	OS/2*|os2*) #(vi
2861        LIB_PREFIX=''
2862        ;;
2863	*)	LIB_PREFIX='lib'
2864        ;;
2865	esac
2866
2867cf_XOPEN_SOURCE=500
2868cf_POSIX_C_SOURCE=199506L
2869cf_xopen_source=
2870
2871case $host_os in #(vi
2872aix[4-7]*) #(vi
2873	cf_xopen_source="-D_ALL_SOURCE"
2874	;;
2875cygwin|msys) #(vi
2876	cf_XOPEN_SOURCE=600
2877	;;
2878darwin[0-8].*) #(vi
2879	cf_xopen_source="-D_APPLE_C_SOURCE"
2880	;;
2881darwin*) #(vi
2882	cf_xopen_source="-D_DARWIN_C_SOURCE"
2883	cf_XOPEN_SOURCE=
2884	;;
2885freebsd*|dragonfly*) #(vi
2886	# 5.x headers associate
2887	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2888	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2889	cf_POSIX_C_SOURCE=200112L
2890	cf_XOPEN_SOURCE=600
2891	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2892	;;
2893hpux11*) #(vi
2894	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2895	;;
2896hpux*) #(vi
2897	cf_xopen_source="-D_HPUX_SOURCE"
2898	;;
2899irix[56].*) #(vi
2900	cf_xopen_source="-D_SGI_SOURCE"
2901	cf_XOPEN_SOURCE=
2902	;;
2903linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2904
2905echo "$as_me:2905: checking if we must define _GNU_SOURCE" >&5
2906echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2907if test "${cf_cv_gnu_source+set}" = set; then
2908  echo $ECHO_N "(cached) $ECHO_C" >&6
2909else
2910
2911cat >conftest.$ac_ext <<_ACEOF
2912#line 2912 "configure"
2913#include "confdefs.h"
2914#include <sys/types.h>
2915int
2916main ()
2917{
2918
2919#ifndef _XOPEN_SOURCE
2920make an error
2921#endif
2922  ;
2923  return 0;
2924}
2925_ACEOF
2926rm -f conftest.$ac_objext
2927if { (eval echo "$as_me:2927: \"$ac_compile\"") >&5
2928  (eval $ac_compile) 2>&5
2929  ac_status=$?
2930  echo "$as_me:2930: \$? = $ac_status" >&5
2931  (exit $ac_status); } &&
2932         { ac_try='test -s conftest.$ac_objext'
2933  { (eval echo "$as_me:2933: \"$ac_try\"") >&5
2934  (eval $ac_try) 2>&5
2935  ac_status=$?
2936  echo "$as_me:2936: \$? = $ac_status" >&5
2937  (exit $ac_status); }; }; then
2938  cf_cv_gnu_source=no
2939else
2940  echo "$as_me: failed program was:" >&5
2941cat conftest.$ac_ext >&5
2942cf_save="$CPPFLAGS"
2943	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2944	 cat >conftest.$ac_ext <<_ACEOF
2945#line 2945 "configure"
2946#include "confdefs.h"
2947#include <sys/types.h>
2948int
2949main ()
2950{
2951
2952#ifdef _XOPEN_SOURCE
2953make an error
2954#endif
2955  ;
2956  return 0;
2957}
2958_ACEOF
2959rm -f conftest.$ac_objext
2960if { (eval echo "$as_me:2960: \"$ac_compile\"") >&5
2961  (eval $ac_compile) 2>&5
2962  ac_status=$?
2963  echo "$as_me:2963: \$? = $ac_status" >&5
2964  (exit $ac_status); } &&
2965         { ac_try='test -s conftest.$ac_objext'
2966  { (eval echo "$as_me:2966: \"$ac_try\"") >&5
2967  (eval $ac_try) 2>&5
2968  ac_status=$?
2969  echo "$as_me:2969: \$? = $ac_status" >&5
2970  (exit $ac_status); }; }; then
2971  cf_cv_gnu_source=no
2972else
2973  echo "$as_me: failed program was:" >&5
2974cat conftest.$ac_ext >&5
2975cf_cv_gnu_source=yes
2976fi
2977rm -f conftest.$ac_objext conftest.$ac_ext
2978	CPPFLAGS="$cf_save"
2979
2980fi
2981rm -f conftest.$ac_objext conftest.$ac_ext
2982
2983fi
2984echo "$as_me:2984: result: $cf_cv_gnu_source" >&5
2985echo "${ECHO_T}$cf_cv_gnu_source" >&6
2986test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2987
2988	;;
2989mirbsd*) #(vi
2990	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2991	cf_XOPEN_SOURCE=
2992
2993cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2994
2995cf_save_CFLAGS="$CFLAGS"
2996cf_save_CPPFLAGS="$CPPFLAGS"
2997
2998cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2999	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3000		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3001
3002cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3003	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3004		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3005
3006echo "$as_me:3006: checking if we should define _POSIX_C_SOURCE" >&5
3007echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3008if test "${cf_cv_posix_c_source+set}" = set; then
3009  echo $ECHO_N "(cached) $ECHO_C" >&6
3010else
3011
3012echo "${as_me:-configure}:3012: testing if the symbol is already defined go no further ..." 1>&5
3013
3014	cat >conftest.$ac_ext <<_ACEOF
3015#line 3015 "configure"
3016#include "confdefs.h"
3017#include <sys/types.h>
3018int
3019main ()
3020{
3021
3022#ifndef _POSIX_C_SOURCE
3023make an error
3024#endif
3025  ;
3026  return 0;
3027}
3028_ACEOF
3029rm -f conftest.$ac_objext
3030if { (eval echo "$as_me:3030: \"$ac_compile\"") >&5
3031  (eval $ac_compile) 2>&5
3032  ac_status=$?
3033  echo "$as_me:3033: \$? = $ac_status" >&5
3034  (exit $ac_status); } &&
3035         { ac_try='test -s conftest.$ac_objext'
3036  { (eval echo "$as_me:3036: \"$ac_try\"") >&5
3037  (eval $ac_try) 2>&5
3038  ac_status=$?
3039  echo "$as_me:3039: \$? = $ac_status" >&5
3040  (exit $ac_status); }; }; then
3041  cf_cv_posix_c_source=no
3042else
3043  echo "$as_me: failed program was:" >&5
3044cat conftest.$ac_ext >&5
3045cf_want_posix_source=no
3046	 case .$cf_POSIX_C_SOURCE in #(vi
3047	 .[12]??*) #(vi
3048		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3049		;;
3050	 .2) #(vi
3051		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3052		cf_want_posix_source=yes
3053		;;
3054	 .*)
3055		cf_want_posix_source=yes
3056		;;
3057	 esac
3058	 if test "$cf_want_posix_source" = yes ; then
3059		cat >conftest.$ac_ext <<_ACEOF
3060#line 3060 "configure"
3061#include "confdefs.h"
3062#include <sys/types.h>
3063int
3064main ()
3065{
3066
3067#ifdef _POSIX_SOURCE
3068make an error
3069#endif
3070  ;
3071  return 0;
3072}
3073_ACEOF
3074rm -f conftest.$ac_objext
3075if { (eval echo "$as_me:3075: \"$ac_compile\"") >&5
3076  (eval $ac_compile) 2>&5
3077  ac_status=$?
3078  echo "$as_me:3078: \$? = $ac_status" >&5
3079  (exit $ac_status); } &&
3080         { ac_try='test -s conftest.$ac_objext'
3081  { (eval echo "$as_me:3081: \"$ac_try\"") >&5
3082  (eval $ac_try) 2>&5
3083  ac_status=$?
3084  echo "$as_me:3084: \$? = $ac_status" >&5
3085  (exit $ac_status); }; }; then
3086  :
3087else
3088  echo "$as_me: failed program was:" >&5
3089cat conftest.$ac_ext >&5
3090cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3091fi
3092rm -f conftest.$ac_objext conftest.$ac_ext
3093	 fi
3094
3095echo "${as_me:-configure}:3095: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3096
3097	 CFLAGS="$cf_trim_CFLAGS"
3098	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3099
3100echo "${as_me:-configure}:3100: testing if the second compile does not leave our definition intact error ..." 1>&5
3101
3102	 cat >conftest.$ac_ext <<_ACEOF
3103#line 3103 "configure"
3104#include "confdefs.h"
3105#include <sys/types.h>
3106int
3107main ()
3108{
3109
3110#ifndef _POSIX_C_SOURCE
3111make an error
3112#endif
3113  ;
3114  return 0;
3115}
3116_ACEOF
3117rm -f conftest.$ac_objext
3118if { (eval echo "$as_me:3118: \"$ac_compile\"") >&5
3119  (eval $ac_compile) 2>&5
3120  ac_status=$?
3121  echo "$as_me:3121: \$? = $ac_status" >&5
3122  (exit $ac_status); } &&
3123         { ac_try='test -s conftest.$ac_objext'
3124  { (eval echo "$as_me:3124: \"$ac_try\"") >&5
3125  (eval $ac_try) 2>&5
3126  ac_status=$?
3127  echo "$as_me:3127: \$? = $ac_status" >&5
3128  (exit $ac_status); }; }; then
3129  :
3130else
3131  echo "$as_me: failed program was:" >&5
3132cat conftest.$ac_ext >&5
3133cf_cv_posix_c_source=no
3134fi
3135rm -f conftest.$ac_objext conftest.$ac_ext
3136	 CFLAGS="$cf_save_CFLAGS"
3137	 CPPFLAGS="$cf_save_CPPFLAGS"
3138
3139fi
3140rm -f conftest.$ac_objext conftest.$ac_ext
3141
3142fi
3143echo "$as_me:3143: result: $cf_cv_posix_c_source" >&5
3144echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3145
3146if test "$cf_cv_posix_c_source" != no ; then
3147	CFLAGS="$cf_trim_CFLAGS"
3148	CPPFLAGS="$cf_trim_CPPFLAGS"
3149
3150cf_fix_cppflags=no
3151cf_new_cflags=
3152cf_new_cppflags=
3153cf_new_extra_cppflags=
3154
3155for cf_add_cflags in $cf_cv_posix_c_source
3156do
3157case $cf_fix_cppflags in
3158no)
3159	case $cf_add_cflags in #(vi
3160	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3161		case $cf_add_cflags in
3162		-D*)
3163			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3164
3165			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3166				&& test -z "${cf_tst_cflags}" \
3167				&& cf_fix_cppflags=yes
3168
3169			if test $cf_fix_cppflags = yes ; then
3170				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3171				continue
3172			elif test "${cf_tst_cflags}" = "\"'" ; then
3173				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3174				continue
3175			fi
3176			;;
3177		esac
3178		case "$CPPFLAGS" in
3179		*$cf_add_cflags) #(vi
3180			;;
3181		*) #(vi
3182			case $cf_add_cflags in #(vi
3183			-D*)
3184				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3185
3186CPPFLAGS=`echo "$CPPFLAGS" | \
3187	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3188		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3189
3190				;;
3191			esac
3192			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3193			;;
3194		esac
3195		;;
3196	*)
3197		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3198		;;
3199	esac
3200	;;
3201yes)
3202	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3203
3204	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3205
3206	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3207		&& test -z "${cf_tst_cflags}" \
3208		&& cf_fix_cppflags=no
3209	;;
3210esac
3211done
3212
3213if test -n "$cf_new_cflags" ; then
3214
3215	CFLAGS="$CFLAGS $cf_new_cflags"
3216fi
3217
3218if test -n "$cf_new_cppflags" ; then
3219
3220	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3221fi
3222
3223if test -n "$cf_new_extra_cppflags" ; then
3224
3225	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3226fi
3227
3228fi
3229
3230	;;
3231netbsd*) #(vi
3232	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3233	;;
3234openbsd[4-9]*) #(vi
3235	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3236	cf_xopen_source="-D_BSD_SOURCE"
3237	cf_XOPEN_SOURCE=600
3238	;;
3239openbsd*) #(vi
3240	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3241	;;
3242osf[45]*) #(vi
3243	cf_xopen_source="-D_OSF_SOURCE"
3244	;;
3245nto-qnx*) #(vi
3246	cf_xopen_source="-D_QNX_SOURCE"
3247	;;
3248sco*) #(vi
3249	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3250	;;
3251solaris2.*) #(vi
3252	cf_xopen_source="-D__EXTENSIONS__"
3253	;;
3254*)
3255
3256echo "$as_me:3256: checking if we should define _XOPEN_SOURCE" >&5
3257echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3258if test "${cf_cv_xopen_source+set}" = set; then
3259  echo $ECHO_N "(cached) $ECHO_C" >&6
3260else
3261
3262	cat >conftest.$ac_ext <<_ACEOF
3263#line 3263 "configure"
3264#include "confdefs.h"
3265
3266#include <stdlib.h>
3267#include <string.h>
3268#include <sys/types.h>
3269
3270int
3271main ()
3272{
3273
3274#ifndef _XOPEN_SOURCE
3275make an error
3276#endif
3277  ;
3278  return 0;
3279}
3280_ACEOF
3281rm -f conftest.$ac_objext
3282if { (eval echo "$as_me:3282: \"$ac_compile\"") >&5
3283  (eval $ac_compile) 2>&5
3284  ac_status=$?
3285  echo "$as_me:3285: \$? = $ac_status" >&5
3286  (exit $ac_status); } &&
3287         { ac_try='test -s conftest.$ac_objext'
3288  { (eval echo "$as_me:3288: \"$ac_try\"") >&5
3289  (eval $ac_try) 2>&5
3290  ac_status=$?
3291  echo "$as_me:3291: \$? = $ac_status" >&5
3292  (exit $ac_status); }; }; then
3293  cf_cv_xopen_source=no
3294else
3295  echo "$as_me: failed program was:" >&5
3296cat conftest.$ac_ext >&5
3297cf_save="$CPPFLAGS"
3298	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3299	 cat >conftest.$ac_ext <<_ACEOF
3300#line 3300 "configure"
3301#include "confdefs.h"
3302
3303#include <stdlib.h>
3304#include <string.h>
3305#include <sys/types.h>
3306
3307int
3308main ()
3309{
3310
3311#ifdef _XOPEN_SOURCE
3312make an error
3313#endif
3314  ;
3315  return 0;
3316}
3317_ACEOF
3318rm -f conftest.$ac_objext
3319if { (eval echo "$as_me:3319: \"$ac_compile\"") >&5
3320  (eval $ac_compile) 2>&5
3321  ac_status=$?
3322  echo "$as_me:3322: \$? = $ac_status" >&5
3323  (exit $ac_status); } &&
3324         { ac_try='test -s conftest.$ac_objext'
3325  { (eval echo "$as_me:3325: \"$ac_try\"") >&5
3326  (eval $ac_try) 2>&5
3327  ac_status=$?
3328  echo "$as_me:3328: \$? = $ac_status" >&5
3329  (exit $ac_status); }; }; then
3330  cf_cv_xopen_source=no
3331else
3332  echo "$as_me: failed program was:" >&5
3333cat conftest.$ac_ext >&5
3334cf_cv_xopen_source=$cf_XOPEN_SOURCE
3335fi
3336rm -f conftest.$ac_objext conftest.$ac_ext
3337	CPPFLAGS="$cf_save"
3338
3339fi
3340rm -f conftest.$ac_objext conftest.$ac_ext
3341
3342fi
3343echo "$as_me:3343: result: $cf_cv_xopen_source" >&5
3344echo "${ECHO_T}$cf_cv_xopen_source" >&6
3345
3346if test "$cf_cv_xopen_source" != no ; then
3347
3348CFLAGS=`echo "$CFLAGS" | \
3349	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3350		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3351
3352CPPFLAGS=`echo "$CPPFLAGS" | \
3353	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3354		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3355
3356	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3357
3358cf_fix_cppflags=no
3359cf_new_cflags=
3360cf_new_cppflags=
3361cf_new_extra_cppflags=
3362
3363for cf_add_cflags in $cf_temp_xopen_source
3364do
3365case $cf_fix_cppflags in
3366no)
3367	case $cf_add_cflags in #(vi
3368	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3369		case $cf_add_cflags in
3370		-D*)
3371			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3372
3373			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3374				&& test -z "${cf_tst_cflags}" \
3375				&& cf_fix_cppflags=yes
3376
3377			if test $cf_fix_cppflags = yes ; then
3378				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3379				continue
3380			elif test "${cf_tst_cflags}" = "\"'" ; then
3381				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3382				continue
3383			fi
3384			;;
3385		esac
3386		case "$CPPFLAGS" in
3387		*$cf_add_cflags) #(vi
3388			;;
3389		*) #(vi
3390			case $cf_add_cflags in #(vi
3391			-D*)
3392				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3393
3394CPPFLAGS=`echo "$CPPFLAGS" | \
3395	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3396		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3397
3398				;;
3399			esac
3400			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3401			;;
3402		esac
3403		;;
3404	*)
3405		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3406		;;
3407	esac
3408	;;
3409yes)
3410	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3411
3412	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3413
3414	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3415		&& test -z "${cf_tst_cflags}" \
3416		&& cf_fix_cppflags=no
3417	;;
3418esac
3419done
3420
3421if test -n "$cf_new_cflags" ; then
3422
3423	CFLAGS="$CFLAGS $cf_new_cflags"
3424fi
3425
3426if test -n "$cf_new_cppflags" ; then
3427
3428	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3429fi
3430
3431if test -n "$cf_new_extra_cppflags" ; then
3432
3433	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3434fi
3435
3436fi
3437
3438cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3439
3440cf_save_CFLAGS="$CFLAGS"
3441cf_save_CPPFLAGS="$CPPFLAGS"
3442
3443cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3444	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3445		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3446
3447cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3448	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3449		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3450
3451echo "$as_me:3451: checking if we should define _POSIX_C_SOURCE" >&5
3452echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3453if test "${cf_cv_posix_c_source+set}" = set; then
3454  echo $ECHO_N "(cached) $ECHO_C" >&6
3455else
3456
3457echo "${as_me:-configure}:3457: testing if the symbol is already defined go no further ..." 1>&5
3458
3459	cat >conftest.$ac_ext <<_ACEOF
3460#line 3460 "configure"
3461#include "confdefs.h"
3462#include <sys/types.h>
3463int
3464main ()
3465{
3466
3467#ifndef _POSIX_C_SOURCE
3468make an error
3469#endif
3470  ;
3471  return 0;
3472}
3473_ACEOF
3474rm -f conftest.$ac_objext
3475if { (eval echo "$as_me:3475: \"$ac_compile\"") >&5
3476  (eval $ac_compile) 2>&5
3477  ac_status=$?
3478  echo "$as_me:3478: \$? = $ac_status" >&5
3479  (exit $ac_status); } &&
3480         { ac_try='test -s conftest.$ac_objext'
3481  { (eval echo "$as_me:3481: \"$ac_try\"") >&5
3482  (eval $ac_try) 2>&5
3483  ac_status=$?
3484  echo "$as_me:3484: \$? = $ac_status" >&5
3485  (exit $ac_status); }; }; then
3486  cf_cv_posix_c_source=no
3487else
3488  echo "$as_me: failed program was:" >&5
3489cat conftest.$ac_ext >&5
3490cf_want_posix_source=no
3491	 case .$cf_POSIX_C_SOURCE in #(vi
3492	 .[12]??*) #(vi
3493		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3494		;;
3495	 .2) #(vi
3496		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3497		cf_want_posix_source=yes
3498		;;
3499	 .*)
3500		cf_want_posix_source=yes
3501		;;
3502	 esac
3503	 if test "$cf_want_posix_source" = yes ; then
3504		cat >conftest.$ac_ext <<_ACEOF
3505#line 3505 "configure"
3506#include "confdefs.h"
3507#include <sys/types.h>
3508int
3509main ()
3510{
3511
3512#ifdef _POSIX_SOURCE
3513make an error
3514#endif
3515  ;
3516  return 0;
3517}
3518_ACEOF
3519rm -f conftest.$ac_objext
3520if { (eval echo "$as_me:3520: \"$ac_compile\"") >&5
3521  (eval $ac_compile) 2>&5
3522  ac_status=$?
3523  echo "$as_me:3523: \$? = $ac_status" >&5
3524  (exit $ac_status); } &&
3525         { ac_try='test -s conftest.$ac_objext'
3526  { (eval echo "$as_me:3526: \"$ac_try\"") >&5
3527  (eval $ac_try) 2>&5
3528  ac_status=$?
3529  echo "$as_me:3529: \$? = $ac_status" >&5
3530  (exit $ac_status); }; }; then
3531  :
3532else
3533  echo "$as_me: failed program was:" >&5
3534cat conftest.$ac_ext >&5
3535cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3536fi
3537rm -f conftest.$ac_objext conftest.$ac_ext
3538	 fi
3539
3540echo "${as_me:-configure}:3540: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3541
3542	 CFLAGS="$cf_trim_CFLAGS"
3543	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3544
3545echo "${as_me:-configure}:3545: testing if the second compile does not leave our definition intact error ..." 1>&5
3546
3547	 cat >conftest.$ac_ext <<_ACEOF
3548#line 3548 "configure"
3549#include "confdefs.h"
3550#include <sys/types.h>
3551int
3552main ()
3553{
3554
3555#ifndef _POSIX_C_SOURCE
3556make an error
3557#endif
3558  ;
3559  return 0;
3560}
3561_ACEOF
3562rm -f conftest.$ac_objext
3563if { (eval echo "$as_me:3563: \"$ac_compile\"") >&5
3564  (eval $ac_compile) 2>&5
3565  ac_status=$?
3566  echo "$as_me:3566: \$? = $ac_status" >&5
3567  (exit $ac_status); } &&
3568         { ac_try='test -s conftest.$ac_objext'
3569  { (eval echo "$as_me:3569: \"$ac_try\"") >&5
3570  (eval $ac_try) 2>&5
3571  ac_status=$?
3572  echo "$as_me:3572: \$? = $ac_status" >&5
3573  (exit $ac_status); }; }; then
3574  :
3575else
3576  echo "$as_me: failed program was:" >&5
3577cat conftest.$ac_ext >&5
3578cf_cv_posix_c_source=no
3579fi
3580rm -f conftest.$ac_objext conftest.$ac_ext
3581	 CFLAGS="$cf_save_CFLAGS"
3582	 CPPFLAGS="$cf_save_CPPFLAGS"
3583
3584fi
3585rm -f conftest.$ac_objext conftest.$ac_ext
3586
3587fi
3588echo "$as_me:3588: result: $cf_cv_posix_c_source" >&5
3589echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3590
3591if test "$cf_cv_posix_c_source" != no ; then
3592	CFLAGS="$cf_trim_CFLAGS"
3593	CPPFLAGS="$cf_trim_CPPFLAGS"
3594
3595cf_fix_cppflags=no
3596cf_new_cflags=
3597cf_new_cppflags=
3598cf_new_extra_cppflags=
3599
3600for cf_add_cflags in $cf_cv_posix_c_source
3601do
3602case $cf_fix_cppflags in
3603no)
3604	case $cf_add_cflags in #(vi
3605	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3606		case $cf_add_cflags in
3607		-D*)
3608			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3609
3610			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3611				&& test -z "${cf_tst_cflags}" \
3612				&& cf_fix_cppflags=yes
3613
3614			if test $cf_fix_cppflags = yes ; then
3615				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3616				continue
3617			elif test "${cf_tst_cflags}" = "\"'" ; then
3618				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3619				continue
3620			fi
3621			;;
3622		esac
3623		case "$CPPFLAGS" in
3624		*$cf_add_cflags) #(vi
3625			;;
3626		*) #(vi
3627			case $cf_add_cflags in #(vi
3628			-D*)
3629				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3630
3631CPPFLAGS=`echo "$CPPFLAGS" | \
3632	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3633		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3634
3635				;;
3636			esac
3637			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3638			;;
3639		esac
3640		;;
3641	*)
3642		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3643		;;
3644	esac
3645	;;
3646yes)
3647	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3648
3649	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3650
3651	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3652		&& test -z "${cf_tst_cflags}" \
3653		&& cf_fix_cppflags=no
3654	;;
3655esac
3656done
3657
3658if test -n "$cf_new_cflags" ; then
3659
3660	CFLAGS="$CFLAGS $cf_new_cflags"
3661fi
3662
3663if test -n "$cf_new_cppflags" ; then
3664
3665	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3666fi
3667
3668if test -n "$cf_new_extra_cppflags" ; then
3669
3670	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3671fi
3672
3673fi
3674
3675	;;
3676esac
3677
3678if test -n "$cf_xopen_source" ; then
3679
3680cf_fix_cppflags=no
3681cf_new_cflags=
3682cf_new_cppflags=
3683cf_new_extra_cppflags=
3684
3685for cf_add_cflags in $cf_xopen_source
3686do
3687case $cf_fix_cppflags in
3688no)
3689	case $cf_add_cflags in #(vi
3690	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3691		case $cf_add_cflags in
3692		-D*)
3693			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3694
3695			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3696				&& test -z "${cf_tst_cflags}" \
3697				&& cf_fix_cppflags=yes
3698
3699			if test $cf_fix_cppflags = yes ; then
3700				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3701				continue
3702			elif test "${cf_tst_cflags}" = "\"'" ; then
3703				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3704				continue
3705			fi
3706			;;
3707		esac
3708		case "$CPPFLAGS" in
3709		*$cf_add_cflags) #(vi
3710			;;
3711		*) #(vi
3712			case $cf_add_cflags in #(vi
3713			-D*)
3714				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3715
3716CPPFLAGS=`echo "$CPPFLAGS" | \
3717	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3718		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3719
3720				;;
3721			esac
3722			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3723			;;
3724		esac
3725		;;
3726	*)
3727		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3728		;;
3729	esac
3730	;;
3731yes)
3732	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3733
3734	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3735
3736	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3737		&& test -z "${cf_tst_cflags}" \
3738		&& cf_fix_cppflags=no
3739	;;
3740esac
3741done
3742
3743if test -n "$cf_new_cflags" ; then
3744
3745	CFLAGS="$CFLAGS $cf_new_cflags"
3746fi
3747
3748if test -n "$cf_new_cppflags" ; then
3749
3750	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3751fi
3752
3753if test -n "$cf_new_extra_cppflags" ; then
3754
3755	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3756fi
3757
3758fi
3759
3760if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3761	echo "$as_me:3761: checking if _XOPEN_SOURCE really is set" >&5
3762echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3763	cat >conftest.$ac_ext <<_ACEOF
3764#line 3764 "configure"
3765#include "confdefs.h"
3766#include <stdlib.h>
3767int
3768main ()
3769{
3770
3771#ifndef _XOPEN_SOURCE
3772make an error
3773#endif
3774  ;
3775  return 0;
3776}
3777_ACEOF
3778rm -f conftest.$ac_objext
3779if { (eval echo "$as_me:3779: \"$ac_compile\"") >&5
3780  (eval $ac_compile) 2>&5
3781  ac_status=$?
3782  echo "$as_me:3782: \$? = $ac_status" >&5
3783  (exit $ac_status); } &&
3784         { ac_try='test -s conftest.$ac_objext'
3785  { (eval echo "$as_me:3785: \"$ac_try\"") >&5
3786  (eval $ac_try) 2>&5
3787  ac_status=$?
3788  echo "$as_me:3788: \$? = $ac_status" >&5
3789  (exit $ac_status); }; }; then
3790  cf_XOPEN_SOURCE_set=yes
3791else
3792  echo "$as_me: failed program was:" >&5
3793cat conftest.$ac_ext >&5
3794cf_XOPEN_SOURCE_set=no
3795fi
3796rm -f conftest.$ac_objext conftest.$ac_ext
3797	echo "$as_me:3797: result: $cf_XOPEN_SOURCE_set" >&5
3798echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3799	if test $cf_XOPEN_SOURCE_set = yes
3800	then
3801		cat >conftest.$ac_ext <<_ACEOF
3802#line 3802 "configure"
3803#include "confdefs.h"
3804#include <stdlib.h>
3805int
3806main ()
3807{
3808
3809#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3810make an error
3811#endif
3812  ;
3813  return 0;
3814}
3815_ACEOF
3816rm -f conftest.$ac_objext
3817if { (eval echo "$as_me:3817: \"$ac_compile\"") >&5
3818  (eval $ac_compile) 2>&5
3819  ac_status=$?
3820  echo "$as_me:3820: \$? = $ac_status" >&5
3821  (exit $ac_status); } &&
3822         { ac_try='test -s conftest.$ac_objext'
3823  { (eval echo "$as_me:3823: \"$ac_try\"") >&5
3824  (eval $ac_try) 2>&5
3825  ac_status=$?
3826  echo "$as_me:3826: \$? = $ac_status" >&5
3827  (exit $ac_status); }; }; then
3828  cf_XOPEN_SOURCE_set_ok=yes
3829else
3830  echo "$as_me: failed program was:" >&5
3831cat conftest.$ac_ext >&5
3832cf_XOPEN_SOURCE_set_ok=no
3833fi
3834rm -f conftest.$ac_objext conftest.$ac_ext
3835		if test $cf_XOPEN_SOURCE_set_ok = no
3836		then
3837			{ echo "$as_me:3837: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3838echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3839		fi
3840	else
3841
3842echo "$as_me:3842: checking if we should define _XOPEN_SOURCE" >&5
3843echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3844if test "${cf_cv_xopen_source+set}" = set; then
3845  echo $ECHO_N "(cached) $ECHO_C" >&6
3846else
3847
3848	cat >conftest.$ac_ext <<_ACEOF
3849#line 3849 "configure"
3850#include "confdefs.h"
3851
3852#include <stdlib.h>
3853#include <string.h>
3854#include <sys/types.h>
3855
3856int
3857main ()
3858{
3859
3860#ifndef _XOPEN_SOURCE
3861make an error
3862#endif
3863  ;
3864  return 0;
3865}
3866_ACEOF
3867rm -f conftest.$ac_objext
3868if { (eval echo "$as_me:3868: \"$ac_compile\"") >&5
3869  (eval $ac_compile) 2>&5
3870  ac_status=$?
3871  echo "$as_me:3871: \$? = $ac_status" >&5
3872  (exit $ac_status); } &&
3873         { ac_try='test -s conftest.$ac_objext'
3874  { (eval echo "$as_me:3874: \"$ac_try\"") >&5
3875  (eval $ac_try) 2>&5
3876  ac_status=$?
3877  echo "$as_me:3877: \$? = $ac_status" >&5
3878  (exit $ac_status); }; }; then
3879  cf_cv_xopen_source=no
3880else
3881  echo "$as_me: failed program was:" >&5
3882cat conftest.$ac_ext >&5
3883cf_save="$CPPFLAGS"
3884	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3885	 cat >conftest.$ac_ext <<_ACEOF
3886#line 3886 "configure"
3887#include "confdefs.h"
3888
3889#include <stdlib.h>
3890#include <string.h>
3891#include <sys/types.h>
3892
3893int
3894main ()
3895{
3896
3897#ifdef _XOPEN_SOURCE
3898make an error
3899#endif
3900  ;
3901  return 0;
3902}
3903_ACEOF
3904rm -f conftest.$ac_objext
3905if { (eval echo "$as_me:3905: \"$ac_compile\"") >&5
3906  (eval $ac_compile) 2>&5
3907  ac_status=$?
3908  echo "$as_me:3908: \$? = $ac_status" >&5
3909  (exit $ac_status); } &&
3910         { ac_try='test -s conftest.$ac_objext'
3911  { (eval echo "$as_me:3911: \"$ac_try\"") >&5
3912  (eval $ac_try) 2>&5
3913  ac_status=$?
3914  echo "$as_me:3914: \$? = $ac_status" >&5
3915  (exit $ac_status); }; }; then
3916  cf_cv_xopen_source=no
3917else
3918  echo "$as_me: failed program was:" >&5
3919cat conftest.$ac_ext >&5
3920cf_cv_xopen_source=$cf_XOPEN_SOURCE
3921fi
3922rm -f conftest.$ac_objext conftest.$ac_ext
3923	CPPFLAGS="$cf_save"
3924
3925fi
3926rm -f conftest.$ac_objext conftest.$ac_ext
3927
3928fi
3929echo "$as_me:3929: result: $cf_cv_xopen_source" >&5
3930echo "${ECHO_T}$cf_cv_xopen_source" >&6
3931
3932if test "$cf_cv_xopen_source" != no ; then
3933
3934CFLAGS=`echo "$CFLAGS" | \
3935	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3936		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3937
3938CPPFLAGS=`echo "$CPPFLAGS" | \
3939	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3940		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3941
3942	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3943
3944cf_fix_cppflags=no
3945cf_new_cflags=
3946cf_new_cppflags=
3947cf_new_extra_cppflags=
3948
3949for cf_add_cflags in $cf_temp_xopen_source
3950do
3951case $cf_fix_cppflags in
3952no)
3953	case $cf_add_cflags in #(vi
3954	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3955		case $cf_add_cflags in
3956		-D*)
3957			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3958
3959			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3960				&& test -z "${cf_tst_cflags}" \
3961				&& cf_fix_cppflags=yes
3962
3963			if test $cf_fix_cppflags = yes ; then
3964				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3965				continue
3966			elif test "${cf_tst_cflags}" = "\"'" ; then
3967				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3968				continue
3969			fi
3970			;;
3971		esac
3972		case "$CPPFLAGS" in
3973		*$cf_add_cflags) #(vi
3974			;;
3975		*) #(vi
3976			case $cf_add_cflags in #(vi
3977			-D*)
3978				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3979
3980CPPFLAGS=`echo "$CPPFLAGS" | \
3981	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3982		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3983
3984				;;
3985			esac
3986			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3987			;;
3988		esac
3989		;;
3990	*)
3991		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3992		;;
3993	esac
3994	;;
3995yes)
3996	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3997
3998	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3999
4000	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4001		&& test -z "${cf_tst_cflags}" \
4002		&& cf_fix_cppflags=no
4003	;;
4004esac
4005done
4006
4007if test -n "$cf_new_cflags" ; then
4008
4009	CFLAGS="$CFLAGS $cf_new_cflags"
4010fi
4011
4012if test -n "$cf_new_cppflags" ; then
4013
4014	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4015fi
4016
4017if test -n "$cf_new_extra_cppflags" ; then
4018
4019	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4020fi
4021
4022fi
4023
4024	fi
4025fi
4026
4027# Check whether --enable-largefile or --disable-largefile was given.
4028if test "${enable_largefile+set}" = set; then
4029  enableval="$enable_largefile"
4030
4031fi;
4032if test "$enable_largefile" != no; then
4033
4034  echo "$as_me:4034: checking for special C compiler options needed for large files" >&5
4035echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4036if test "${ac_cv_sys_largefile_CC+set}" = set; then
4037  echo $ECHO_N "(cached) $ECHO_C" >&6
4038else
4039  ac_cv_sys_largefile_CC=no
4040     if test "$GCC" != yes; then
4041       ac_save_CC=$CC
4042       while :; do
4043     	 # IRIX 6.2 and later do not support large files by default,
4044     	 # so use the C compiler's -n32 option if that helps.
4045         cat >conftest.$ac_ext <<_ACEOF
4046#line 4046 "configure"
4047#include "confdefs.h"
4048#include <sys/types.h>
4049 /* Check that off_t can represent 2**63 - 1 correctly.
4050    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4051    since some C++ compilers masquerading as C compilers
4052    incorrectly reject 9223372036854775807.  */
4053#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4054  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4055		       && LARGE_OFF_T % 2147483647 == 1)
4056		      ? 1 : -1];
4057int
4058main ()
4059{
4060
4061  ;
4062  return 0;
4063}
4064_ACEOF
4065     	 rm -f conftest.$ac_objext
4066if { (eval echo "$as_me:4066: \"$ac_compile\"") >&5
4067  (eval $ac_compile) 2>&5
4068  ac_status=$?
4069  echo "$as_me:4069: \$? = $ac_status" >&5
4070  (exit $ac_status); } &&
4071         { ac_try='test -s conftest.$ac_objext'
4072  { (eval echo "$as_me:4072: \"$ac_try\"") >&5
4073  (eval $ac_try) 2>&5
4074  ac_status=$?
4075  echo "$as_me:4075: \$? = $ac_status" >&5
4076  (exit $ac_status); }; }; then
4077  break
4078else
4079  echo "$as_me: failed program was:" >&5
4080cat conftest.$ac_ext >&5
4081fi
4082rm -f conftest.$ac_objext
4083     	 CC="$CC -n32"
4084     	 rm -f conftest.$ac_objext
4085if { (eval echo "$as_me:4085: \"$ac_compile\"") >&5
4086  (eval $ac_compile) 2>&5
4087  ac_status=$?
4088  echo "$as_me:4088: \$? = $ac_status" >&5
4089  (exit $ac_status); } &&
4090         { ac_try='test -s conftest.$ac_objext'
4091  { (eval echo "$as_me:4091: \"$ac_try\"") >&5
4092  (eval $ac_try) 2>&5
4093  ac_status=$?
4094  echo "$as_me:4094: \$? = $ac_status" >&5
4095  (exit $ac_status); }; }; then
4096  ac_cv_sys_largefile_CC=' -n32'; break
4097else
4098  echo "$as_me: failed program was:" >&5
4099cat conftest.$ac_ext >&5
4100fi
4101rm -f conftest.$ac_objext
4102         break
4103       done
4104       CC=$ac_save_CC
4105       rm -f conftest.$ac_ext
4106    fi
4107fi
4108echo "$as_me:4108: result: $ac_cv_sys_largefile_CC" >&5
4109echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4110  if test "$ac_cv_sys_largefile_CC" != no; then
4111    CC=$CC$ac_cv_sys_largefile_CC
4112  fi
4113
4114  echo "$as_me:4114: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4115echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4116if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4117  echo $ECHO_N "(cached) $ECHO_C" >&6
4118else
4119  while :; do
4120  ac_cv_sys_file_offset_bits=no
4121  cat >conftest.$ac_ext <<_ACEOF
4122#line 4122 "configure"
4123#include "confdefs.h"
4124#include <sys/types.h>
4125 /* Check that off_t can represent 2**63 - 1 correctly.
4126    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4127    since some C++ compilers masquerading as C compilers
4128    incorrectly reject 9223372036854775807.  */
4129#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4130  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4131		       && LARGE_OFF_T % 2147483647 == 1)
4132		      ? 1 : -1];
4133int
4134main ()
4135{
4136
4137  ;
4138  return 0;
4139}
4140_ACEOF
4141rm -f conftest.$ac_objext
4142if { (eval echo "$as_me:4142: \"$ac_compile\"") >&5
4143  (eval $ac_compile) 2>&5
4144  ac_status=$?
4145  echo "$as_me:4145: \$? = $ac_status" >&5
4146  (exit $ac_status); } &&
4147         { ac_try='test -s conftest.$ac_objext'
4148  { (eval echo "$as_me:4148: \"$ac_try\"") >&5
4149  (eval $ac_try) 2>&5
4150  ac_status=$?
4151  echo "$as_me:4151: \$? = $ac_status" >&5
4152  (exit $ac_status); }; }; then
4153  break
4154else
4155  echo "$as_me: failed program was:" >&5
4156cat conftest.$ac_ext >&5
4157fi
4158rm -f conftest.$ac_objext conftest.$ac_ext
4159  cat >conftest.$ac_ext <<_ACEOF
4160#line 4160 "configure"
4161#include "confdefs.h"
4162#define _FILE_OFFSET_BITS 64
4163#include <sys/types.h>
4164 /* Check that off_t can represent 2**63 - 1 correctly.
4165    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4166    since some C++ compilers masquerading as C compilers
4167    incorrectly reject 9223372036854775807.  */
4168#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4169  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4170		       && LARGE_OFF_T % 2147483647 == 1)
4171		      ? 1 : -1];
4172int
4173main ()
4174{
4175
4176  ;
4177  return 0;
4178}
4179_ACEOF
4180rm -f conftest.$ac_objext
4181if { (eval echo "$as_me:4181: \"$ac_compile\"") >&5
4182  (eval $ac_compile) 2>&5
4183  ac_status=$?
4184  echo "$as_me:4184: \$? = $ac_status" >&5
4185  (exit $ac_status); } &&
4186         { ac_try='test -s conftest.$ac_objext'
4187  { (eval echo "$as_me:4187: \"$ac_try\"") >&5
4188  (eval $ac_try) 2>&5
4189  ac_status=$?
4190  echo "$as_me:4190: \$? = $ac_status" >&5
4191  (exit $ac_status); }; }; then
4192  ac_cv_sys_file_offset_bits=64; break
4193else
4194  echo "$as_me: failed program was:" >&5
4195cat conftest.$ac_ext >&5
4196fi
4197rm -f conftest.$ac_objext conftest.$ac_ext
4198  break
4199done
4200fi
4201echo "$as_me:4201: result: $ac_cv_sys_file_offset_bits" >&5
4202echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
4203if test "$ac_cv_sys_file_offset_bits" != no; then
4204
4205cat >>confdefs.h <<EOF
4206#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4207EOF
4208
4209fi
4210rm -rf conftest*
4211  echo "$as_me:4211: checking for _LARGE_FILES value needed for large files" >&5
4212echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
4213if test "${ac_cv_sys_large_files+set}" = set; then
4214  echo $ECHO_N "(cached) $ECHO_C" >&6
4215else
4216  while :; do
4217  ac_cv_sys_large_files=no
4218  cat >conftest.$ac_ext <<_ACEOF
4219#line 4219 "configure"
4220#include "confdefs.h"
4221#include <sys/types.h>
4222 /* Check that off_t can represent 2**63 - 1 correctly.
4223    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4224    since some C++ compilers masquerading as C compilers
4225    incorrectly reject 9223372036854775807.  */
4226#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4227  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4228		       && LARGE_OFF_T % 2147483647 == 1)
4229		      ? 1 : -1];
4230int
4231main ()
4232{
4233
4234  ;
4235  return 0;
4236}
4237_ACEOF
4238rm -f conftest.$ac_objext
4239if { (eval echo "$as_me:4239: \"$ac_compile\"") >&5
4240  (eval $ac_compile) 2>&5
4241  ac_status=$?
4242  echo "$as_me:4242: \$? = $ac_status" >&5
4243  (exit $ac_status); } &&
4244         { ac_try='test -s conftest.$ac_objext'
4245  { (eval echo "$as_me:4245: \"$ac_try\"") >&5
4246  (eval $ac_try) 2>&5
4247  ac_status=$?
4248  echo "$as_me:4248: \$? = $ac_status" >&5
4249  (exit $ac_status); }; }; then
4250  break
4251else
4252  echo "$as_me: failed program was:" >&5
4253cat conftest.$ac_ext >&5
4254fi
4255rm -f conftest.$ac_objext conftest.$ac_ext
4256  cat >conftest.$ac_ext <<_ACEOF
4257#line 4257 "configure"
4258#include "confdefs.h"
4259#define _LARGE_FILES 1
4260#include <sys/types.h>
4261 /* Check that off_t can represent 2**63 - 1 correctly.
4262    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4263    since some C++ compilers masquerading as C compilers
4264    incorrectly reject 9223372036854775807.  */
4265#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4266  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4267		       && LARGE_OFF_T % 2147483647 == 1)
4268		      ? 1 : -1];
4269int
4270main ()
4271{
4272
4273  ;
4274  return 0;
4275}
4276_ACEOF
4277rm -f conftest.$ac_objext
4278if { (eval echo "$as_me:4278: \"$ac_compile\"") >&5
4279  (eval $ac_compile) 2>&5
4280  ac_status=$?
4281  echo "$as_me:4281: \$? = $ac_status" >&5
4282  (exit $ac_status); } &&
4283         { ac_try='test -s conftest.$ac_objext'
4284  { (eval echo "$as_me:4284: \"$ac_try\"") >&5
4285  (eval $ac_try) 2>&5
4286  ac_status=$?
4287  echo "$as_me:4287: \$? = $ac_status" >&5
4288  (exit $ac_status); }; }; then
4289  ac_cv_sys_large_files=1; break
4290else
4291  echo "$as_me: failed program was:" >&5
4292cat conftest.$ac_ext >&5
4293fi
4294rm -f conftest.$ac_objext conftest.$ac_ext
4295  break
4296done
4297fi
4298echo "$as_me:4298: result: $ac_cv_sys_large_files" >&5
4299echo "${ECHO_T}$ac_cv_sys_large_files" >&6
4300if test "$ac_cv_sys_large_files" != no; then
4301
4302cat >>confdefs.h <<EOF
4303#define _LARGE_FILES $ac_cv_sys_large_files
4304EOF
4305
4306fi
4307rm -rf conftest*
4308fi
4309
4310    if test "$enable_largefile" != no ; then
4311	echo "$as_me:4311: checking for _LARGEFILE_SOURCE value needed for large files" >&5
4312echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
4313if test "${ac_cv_sys_largefile_source+set}" = set; then
4314  echo $ECHO_N "(cached) $ECHO_C" >&6
4315else
4316  while :; do
4317  ac_cv_sys_largefile_source=no
4318  cat >conftest.$ac_ext <<_ACEOF
4319#line 4319 "configure"
4320#include "confdefs.h"
4321#include <stdio.h>
4322int
4323main ()
4324{
4325return !fseeko;
4326  ;
4327  return 0;
4328}
4329_ACEOF
4330rm -f conftest.$ac_objext
4331if { (eval echo "$as_me:4331: \"$ac_compile\"") >&5
4332  (eval $ac_compile) 2>&5
4333  ac_status=$?
4334  echo "$as_me:4334: \$? = $ac_status" >&5
4335  (exit $ac_status); } &&
4336         { ac_try='test -s conftest.$ac_objext'
4337  { (eval echo "$as_me:4337: \"$ac_try\"") >&5
4338  (eval $ac_try) 2>&5
4339  ac_status=$?
4340  echo "$as_me:4340: \$? = $ac_status" >&5
4341  (exit $ac_status); }; }; then
4342  break
4343else
4344  echo "$as_me: failed program was:" >&5
4345cat conftest.$ac_ext >&5
4346fi
4347rm -f conftest.$ac_objext conftest.$ac_ext
4348  cat >conftest.$ac_ext <<_ACEOF
4349#line 4349 "configure"
4350#include "confdefs.h"
4351#define _LARGEFILE_SOURCE 1
4352#include <stdio.h>
4353int
4354main ()
4355{
4356return !fseeko;
4357  ;
4358  return 0;
4359}
4360_ACEOF
4361rm -f conftest.$ac_objext
4362if { (eval echo "$as_me:4362: \"$ac_compile\"") >&5
4363  (eval $ac_compile) 2>&5
4364  ac_status=$?
4365  echo "$as_me:4365: \$? = $ac_status" >&5
4366  (exit $ac_status); } &&
4367         { ac_try='test -s conftest.$ac_objext'
4368  { (eval echo "$as_me:4368: \"$ac_try\"") >&5
4369  (eval $ac_try) 2>&5
4370  ac_status=$?
4371  echo "$as_me:4371: \$? = $ac_status" >&5
4372  (exit $ac_status); }; }; then
4373  ac_cv_sys_largefile_source=1; break
4374else
4375  echo "$as_me: failed program was:" >&5
4376cat conftest.$ac_ext >&5
4377fi
4378rm -f conftest.$ac_objext conftest.$ac_ext
4379  break
4380done
4381fi
4382echo "$as_me:4382: result: $ac_cv_sys_largefile_source" >&5
4383echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
4384if test "$ac_cv_sys_largefile_source" != no; then
4385
4386cat >>confdefs.h <<EOF
4387#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4388EOF
4389
4390fi
4391rm -rf conftest*
4392
4393# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
4394# in glibc 2.1.3, but that breaks too many other things.
4395# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
4396echo "$as_me:4396: checking for fseeko" >&5
4397echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
4398if test "${ac_cv_func_fseeko+set}" = set; then
4399  echo $ECHO_N "(cached) $ECHO_C" >&6
4400else
4401  cat >conftest.$ac_ext <<_ACEOF
4402#line 4402 "configure"
4403#include "confdefs.h"
4404#include <stdio.h>
4405int
4406main ()
4407{
4408return fseeko && fseeko (stdin, 0, 0);
4409  ;
4410  return 0;
4411}
4412_ACEOF
4413rm -f conftest.$ac_objext conftest$ac_exeext
4414if { (eval echo "$as_me:4414: \"$ac_link\"") >&5
4415  (eval $ac_link) 2>&5
4416  ac_status=$?
4417  echo "$as_me:4417: \$? = $ac_status" >&5
4418  (exit $ac_status); } &&
4419         { ac_try='test -s conftest$ac_exeext'
4420  { (eval echo "$as_me:4420: \"$ac_try\"") >&5
4421  (eval $ac_try) 2>&5
4422  ac_status=$?
4423  echo "$as_me:4423: \$? = $ac_status" >&5
4424  (exit $ac_status); }; }; then
4425  ac_cv_func_fseeko=yes
4426else
4427  echo "$as_me: failed program was:" >&5
4428cat conftest.$ac_ext >&5
4429ac_cv_func_fseeko=no
4430fi
4431rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4432fi
4433echo "$as_me:4433: result: $ac_cv_func_fseeko" >&5
4434echo "${ECHO_T}$ac_cv_func_fseeko" >&6
4435if test $ac_cv_func_fseeko = yes; then
4436
4437cat >>confdefs.h <<\EOF
4438#define HAVE_FSEEKO 1
4439EOF
4440
4441fi
4442
4443	# Normally we would collect these definitions in the config.h,
4444	# but (like _XOPEN_SOURCE), some environments rely on having these
4445	# defined before any of the system headers are included.  Another
4446	# case comes up with C++, e.g., on AIX the compiler compiles the
4447	# header files by themselves before looking at the body files it is
4448	# told to compile.  For ncurses, those header files do not include
4449	# the config.h
4450	test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
4451	test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
4452	test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
4453
4454	echo "$as_me:4454: checking whether to use struct dirent64" >&5
4455echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
4456if test "${cf_cv_struct_dirent64+set}" = set; then
4457  echo $ECHO_N "(cached) $ECHO_C" >&6
4458else
4459
4460		cat >conftest.$ac_ext <<_ACEOF
4461#line 4461 "configure"
4462#include "confdefs.h"
4463
4464#include <sys/types.h>
4465#include <dirent.h>
4466
4467int
4468main ()
4469{
4470
4471		/* if transitional largefile support is setup, this is true */
4472		extern struct dirent64 * readdir(DIR *);
4473		struct dirent64 *x = readdir((DIR *)0);
4474		struct dirent *y = readdir((DIR *)0);
4475		int z = x - y;
4476
4477  ;
4478  return 0;
4479}
4480_ACEOF
4481rm -f conftest.$ac_objext
4482if { (eval echo "$as_me:4482: \"$ac_compile\"") >&5
4483  (eval $ac_compile) 2>&5
4484  ac_status=$?
4485  echo "$as_me:4485: \$? = $ac_status" >&5
4486  (exit $ac_status); } &&
4487         { ac_try='test -s conftest.$ac_objext'
4488  { (eval echo "$as_me:4488: \"$ac_try\"") >&5
4489  (eval $ac_try) 2>&5
4490  ac_status=$?
4491  echo "$as_me:4491: \$? = $ac_status" >&5
4492  (exit $ac_status); }; }; then
4493  cf_cv_struct_dirent64=yes
4494else
4495  echo "$as_me: failed program was:" >&5
4496cat conftest.$ac_ext >&5
4497cf_cv_struct_dirent64=no
4498fi
4499rm -f conftest.$ac_objext conftest.$ac_ext
4500
4501fi
4502echo "$as_me:4502: result: $cf_cv_struct_dirent64" >&5
4503echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
4504	test "$cf_cv_struct_dirent64" = yes &&
4505cat >>confdefs.h <<\EOF
4506#define HAVE_STRUCT_DIRENT64 1
4507EOF
4508
4509    fi
4510
4511if ( test "$GCC" = yes || test "$GXX" = yes )
4512then
4513echo "$as_me:4513: checking if you want to check for gcc warnings" >&5
4514echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6
4515
4516# Check whether --with-warnings or --without-warnings was given.
4517if test "${with_warnings+set}" = set; then
4518  withval="$with_warnings"
4519  cf_opt_with_warnings=$withval
4520else
4521  cf_opt_with_warnings=no
4522fi;
4523echo "$as_me:4523: result: $cf_opt_with_warnings" >&5
4524echo "${ECHO_T}$cf_opt_with_warnings" >&6
4525if test "$cf_opt_with_warnings" != no ; then
4526
4527if test "$GCC" = yes
4528then
4529cat > conftest.i <<EOF
4530#ifndef GCC_PRINTF
4531#define GCC_PRINTF 0
4532#endif
4533#ifndef GCC_SCANF
4534#define GCC_SCANF 0
4535#endif
4536#ifndef GCC_NORETURN
4537#define GCC_NORETURN /* nothing */
4538#endif
4539#ifndef GCC_UNUSED
4540#define GCC_UNUSED /* nothing */
4541#endif
4542EOF
4543if test "$GCC" = yes
4544then
4545	{ echo "$as_me:4545: checking for $CC __attribute__ directives..." >&5
4546echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
4547cat > conftest.$ac_ext <<EOF
4548#line 4548 "${as_me:-configure}"
4549#include "confdefs.h"
4550#include "conftest.h"
4551#include "conftest.i"
4552#if	GCC_PRINTF
4553#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4554#else
4555#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
4556#endif
4557#if	GCC_SCANF
4558#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
4559#else
4560#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
4561#endif
4562extern void wow(char *,...) GCC_SCANFLIKE(1,2);
4563extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
4564extern void foo(void) GCC_NORETURN;
4565int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
4566EOF
4567	cf_printf_attribute=no
4568	cf_scanf_attribute=no
4569	for cf_attribute in scanf printf unused noreturn
4570	do
4571
4572cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4573
4574		cf_directive="__attribute__(($cf_attribute))"
4575		echo "checking for $CC $cf_directive" 1>&5
4576
4577		case $cf_attribute in #(vi
4578		printf) #(vi
4579			cf_printf_attribute=yes
4580			cat >conftest.h <<EOF
4581#define GCC_$cf_ATTRIBUTE 1
4582EOF
4583			;;
4584		scanf) #(vi
4585			cf_scanf_attribute=yes
4586			cat >conftest.h <<EOF
4587#define GCC_$cf_ATTRIBUTE 1
4588EOF
4589			;;
4590		*) #(vi
4591			cat >conftest.h <<EOF
4592#define GCC_$cf_ATTRIBUTE $cf_directive
4593EOF
4594			;;
4595		esac
4596
4597		if { (eval echo "$as_me:4597: \"$ac_compile\"") >&5
4598  (eval $ac_compile) 2>&5
4599  ac_status=$?
4600  echo "$as_me:4600: \$? = $ac_status" >&5
4601  (exit $ac_status); }; then
4602			test -n "$verbose" && echo "$as_me:4602: result: ... $cf_attribute" >&5
4603echo "${ECHO_T}... $cf_attribute" >&6
4604			cat conftest.h >>confdefs.h
4605			case $cf_attribute in #(vi
4606			noreturn) #(vi
4607
4608cat >>confdefs.h <<EOF
4609#define GCC_NORETURN $cf_directive
4610EOF
4611
4612				;;
4613			printf) #(vi
4614				cf_value='/* nothing */'
4615				if test "$cf_printf_attribute" != no ; then
4616					cf_value='__attribute__((format(printf,fmt,var)))'
4617
4618cat >>confdefs.h <<\EOF
4619#define GCC_PRINTF 1
4620EOF
4621
4622				fi
4623
4624cat >>confdefs.h <<EOF
4625#define GCC_PRINTFLIKE(fmt,var) $cf_value
4626EOF
4627
4628				;;
4629			scanf) #(vi
4630				cf_value='/* nothing */'
4631				if test "$cf_scanf_attribute" != no ; then
4632					cf_value='__attribute__((format(scanf,fmt,var)))'
4633
4634cat >>confdefs.h <<\EOF
4635#define GCC_SCANF 1
4636EOF
4637
4638				fi
4639
4640cat >>confdefs.h <<EOF
4641#define GCC_SCANFLIKE(fmt,var) $cf_value
4642EOF
4643
4644				;;
4645			unused) #(vi
4646
4647cat >>confdefs.h <<EOF
4648#define GCC_UNUSED $cf_directive
4649EOF
4650
4651				;;
4652			esac
4653		fi
4654	done
4655else
4656	fgrep define conftest.i >>confdefs.h
4657fi
4658rm -rf conftest*
4659fi
4660
4661INTEL_COMPILER=no
4662
4663if test "$GCC" = yes ; then
4664	case $host_os in
4665	linux*|gnu*)
4666		echo "$as_me:4666: checking if this is really Intel C compiler" >&5
4667echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
4668		cf_save_CFLAGS="$CFLAGS"
4669		CFLAGS="$CFLAGS -no-gcc"
4670		cat >conftest.$ac_ext <<_ACEOF
4671#line 4671 "configure"
4672#include "confdefs.h"
4673
4674int
4675main ()
4676{
4677
4678#ifdef __INTEL_COMPILER
4679#else
4680make an error
4681#endif
4682
4683  ;
4684  return 0;
4685}
4686_ACEOF
4687rm -f conftest.$ac_objext
4688if { (eval echo "$as_me:4688: \"$ac_compile\"") >&5
4689  (eval $ac_compile) 2>&5
4690  ac_status=$?
4691  echo "$as_me:4691: \$? = $ac_status" >&5
4692  (exit $ac_status); } &&
4693         { ac_try='test -s conftest.$ac_objext'
4694  { (eval echo "$as_me:4694: \"$ac_try\"") >&5
4695  (eval $ac_try) 2>&5
4696  ac_status=$?
4697  echo "$as_me:4697: \$? = $ac_status" >&5
4698  (exit $ac_status); }; }; then
4699  INTEL_COMPILER=yes
4700cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
4701
4702else
4703  echo "$as_me: failed program was:" >&5
4704cat conftest.$ac_ext >&5
4705fi
4706rm -f conftest.$ac_objext conftest.$ac_ext
4707		CFLAGS="$cf_save_CFLAGS"
4708		echo "$as_me:4708: result: $INTEL_COMPILER" >&5
4709echo "${ECHO_T}$INTEL_COMPILER" >&6
4710		;;
4711	esac
4712fi
4713
4714CLANG_COMPILER=no
4715
4716if test "$GCC" = yes ; then
4717	echo "$as_me:4717: checking if this is really Clang C compiler" >&5
4718echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
4719	cf_save_CFLAGS="$CFLAGS"
4720	CFLAGS="$CFLAGS -Qunused-arguments"
4721	cat >conftest.$ac_ext <<_ACEOF
4722#line 4722 "configure"
4723#include "confdefs.h"
4724
4725int
4726main ()
4727{
4728
4729#ifdef __clang__
4730#else
4731make an error
4732#endif
4733
4734  ;
4735  return 0;
4736}
4737_ACEOF
4738rm -f conftest.$ac_objext
4739if { (eval echo "$as_me:4739: \"$ac_compile\"") >&5
4740  (eval $ac_compile) 2>&5
4741  ac_status=$?
4742  echo "$as_me:4742: \$? = $ac_status" >&5
4743  (exit $ac_status); } &&
4744         { ac_try='test -s conftest.$ac_objext'
4745  { (eval echo "$as_me:4745: \"$ac_try\"") >&5
4746  (eval $ac_try) 2>&5
4747  ac_status=$?
4748  echo "$as_me:4748: \$? = $ac_status" >&5
4749  (exit $ac_status); }; }; then
4750  CLANG_COMPILER=yes
4751cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
4752
4753else
4754  echo "$as_me: failed program was:" >&5
4755cat conftest.$ac_ext >&5
4756fi
4757rm -f conftest.$ac_objext conftest.$ac_ext
4758	CFLAGS="$cf_save_CFLAGS"
4759	echo "$as_me:4759: result: $CLANG_COMPILER" >&5
4760echo "${ECHO_T}$CLANG_COMPILER" >&6
4761fi
4762
4763cat > conftest.$ac_ext <<EOF
4764#line 4764 "${as_me:-configure}"
4765int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4766EOF
4767
4768if test "$INTEL_COMPILER" = yes
4769then
4770# The "-wdXXX" options suppress warnings:
4771# remark #1419: external declaration in primary source file
4772# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
4773# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
4774# remark #193: zero used for undefined preprocessing identifier
4775# remark #593: variable "curs_sb_left_arrow" was set but never used
4776# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
4777# remark #869: parameter "tw" was never referenced
4778# remark #981: operands are evaluated in unspecified order
4779# warning #279: controlling expression is constant
4780
4781	{ echo "$as_me:4781: checking for $CC warning options..." >&5
4782echo "$as_me: checking for $CC warning options..." >&6;}
4783	cf_save_CFLAGS="$CFLAGS"
4784	EXTRA_CFLAGS="-Wall"
4785	for cf_opt in \
4786		wd1419 \
4787		wd1683 \
4788		wd1684 \
4789		wd193 \
4790		wd593 \
4791		wd279 \
4792		wd810 \
4793		wd869 \
4794		wd981
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			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4805		fi
4806	done
4807	CFLAGS="$cf_save_CFLAGS"
4808
4809elif test "$GCC" = yes
4810then
4811	{ echo "$as_me:4811: checking for $CC warning options..." >&5
4812echo "$as_me: checking for $CC warning options..." >&6;}
4813	cf_save_CFLAGS="$CFLAGS"
4814	EXTRA_CFLAGS=
4815	cf_warn_CONST=""
4816	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4817	for cf_opt in W Wall \
4818		Wbad-function-cast \
4819		Wcast-align \
4820		Wcast-qual \
4821		Winline \
4822		Wmissing-declarations \
4823		Wmissing-prototypes \
4824		Wnested-externs \
4825		Wpointer-arith \
4826		Wshadow \
4827		Wstrict-prototypes \
4828		Wundef $cf_warn_CONST
4829	do
4830		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4831		if { (eval echo "$as_me:4831: \"$ac_compile\"") >&5
4832  (eval $ac_compile) 2>&5
4833  ac_status=$?
4834  echo "$as_me:4834: \$? = $ac_status" >&5
4835  (exit $ac_status); }; then
4836			test -n "$verbose" && echo "$as_me:4836: result: ... -$cf_opt" >&5
4837echo "${ECHO_T}... -$cf_opt" >&6
4838			case $cf_opt in #(vi
4839			Wcast-qual) #(vi
4840				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4841				;;
4842			Winline) #(vi
4843				case $GCC_VERSION in
4844				[34].*)
4845					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
4846
4847echo "${as_me:-configure}:4847: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4848
4849					continue;;
4850				esac
4851				;;
4852			Wpointer-arith) #(vi
4853				case $GCC_VERSION in
4854				[12].*)
4855					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
4856
4857echo "${as_me:-configure}:4857: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4858
4859					continue;;
4860				esac
4861				;;
4862			esac
4863			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4864		fi
4865	done
4866	CFLAGS="$cf_save_CFLAGS"
4867fi
4868rm -rf conftest*
4869
4870fi
4871fi
4872
4873echo "$as_me:4873: checking if you want to use pkg-config" >&5
4874echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4875
4876# Check whether --with-pkg-config or --without-pkg-config was given.
4877if test "${with_pkg_config+set}" = set; then
4878  withval="$with_pkg_config"
4879  cf_pkg_config=$withval
4880else
4881  cf_pkg_config=yes
4882fi;
4883echo "$as_me:4883: result: $cf_pkg_config" >&5
4884echo "${ECHO_T}$cf_pkg_config" >&6
4885
4886case $cf_pkg_config in #(vi
4887no) #(vi
4888	PKG_CONFIG=none
4889	;;
4890yes) #(vi
4891
4892if test -n "$ac_tool_prefix"; then
4893  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4894set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4895echo "$as_me:4895: checking for $ac_word" >&5
4896echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4897if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4898  echo $ECHO_N "(cached) $ECHO_C" >&6
4899else
4900  case $PKG_CONFIG in
4901  [\\/]* | ?:[\\/]*)
4902  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4903  ;;
4904  *)
4905  ac_save_IFS=$IFS; IFS=$ac_path_separator
4906ac_dummy="$PATH"
4907for ac_dir in $ac_dummy; do
4908  IFS=$ac_save_IFS
4909  test -z "$ac_dir" && ac_dir=.
4910  if $as_executable_p "$ac_dir/$ac_word"; then
4911   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4912   echo "$as_me:4912: found $ac_dir/$ac_word" >&5
4913   break
4914fi
4915done
4916
4917  ;;
4918esac
4919fi
4920PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4921
4922if test -n "$PKG_CONFIG"; then
4923  echo "$as_me:4923: result: $PKG_CONFIG" >&5
4924echo "${ECHO_T}$PKG_CONFIG" >&6
4925else
4926  echo "$as_me:4926: result: no" >&5
4927echo "${ECHO_T}no" >&6
4928fi
4929
4930fi
4931if test -z "$ac_cv_path_PKG_CONFIG"; then
4932  ac_pt_PKG_CONFIG=$PKG_CONFIG
4933  # Extract the first word of "pkg-config", so it can be a program name with args.
4934set dummy pkg-config; ac_word=$2
4935echo "$as_me:4935: checking for $ac_word" >&5
4936echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4937if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4938  echo $ECHO_N "(cached) $ECHO_C" >&6
4939else
4940  case $ac_pt_PKG_CONFIG in
4941  [\\/]* | ?:[\\/]*)
4942  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4943  ;;
4944  *)
4945  ac_save_IFS=$IFS; IFS=$ac_path_separator
4946ac_dummy="$PATH"
4947for ac_dir in $ac_dummy; do
4948  IFS=$ac_save_IFS
4949  test -z "$ac_dir" && ac_dir=.
4950  if $as_executable_p "$ac_dir/$ac_word"; then
4951   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4952   echo "$as_me:4952: found $ac_dir/$ac_word" >&5
4953   break
4954fi
4955done
4956
4957  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4958  ;;
4959esac
4960fi
4961ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4962
4963if test -n "$ac_pt_PKG_CONFIG"; then
4964  echo "$as_me:4964: result: $ac_pt_PKG_CONFIG" >&5
4965echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4966else
4967  echo "$as_me:4967: result: no" >&5
4968echo "${ECHO_T}no" >&6
4969fi
4970
4971  PKG_CONFIG=$ac_pt_PKG_CONFIG
4972else
4973  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4974fi
4975
4976	;;
4977*)
4978	PKG_CONFIG=$withval
4979	;;
4980esac
4981
4982test -z "$PKG_CONFIG" && PKG_CONFIG=none
4983if test "$PKG_CONFIG" != none ; then
4984
4985if test "x$prefix" != xNONE; then
4986  cf_path_syntax="$prefix"
4987else
4988  cf_path_syntax="$ac_default_prefix"
4989fi
4990
4991case ".$PKG_CONFIG" in #(vi
4992.\$\(*\)*|.\'*\'*) #(vi
4993  ;;
4994..|./*|.\\*) #(vi
4995  ;;
4996.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4997  ;;
4998.\${*prefix}*|.\${*dir}*) #(vi
4999  eval PKG_CONFIG="$PKG_CONFIG"
5000  case ".$PKG_CONFIG" in #(vi
5001  .NONE/*)
5002    PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5003    ;;
5004  esac
5005  ;; #(vi
5006.no|.NONE/*)
5007  PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5008  ;;
5009*)
5010  { { echo "$as_me:5010: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5011echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5012   { (exit 1); exit 1; }; }
5013  ;;
5014esac
5015
5016fi
5017
5018echo "$as_me:5018: checking for this package's name" >&5
5019echo $ECHO_N "checking for this package's name... $ECHO_C" >&6
5020
5021# Check whether --with-package or --without-package was given.
5022if test "${with_package+set}" = set; then
5023  withval="$with_package"
5024  PACKAGE=$withval
5025else
5026  PACKAGE=dialog
5027fi;
5028echo "$as_me:5028: result: $PACKAGE" >&5
5029echo "${ECHO_T}$PACKAGE" >&6
5030
5031if test -f $srcdir/VERSION ; then
5032	echo "$as_me:5032: checking for package version" >&5
5033echo $ECHO_N "checking for package version... $ECHO_C" >&6
5034
5035	# if there are not enough fields, cut returns the last one...
5036	cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
5037	cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
5038	cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
5039
5040	# this is how CF_BUNDLED_INTL uses $VERSION:
5041	VERSION="$cf_field1"
5042
5043	VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
5044	test -z "$VERSION_MAJOR" && { { echo "$as_me:5044: error: missing major-version" >&5
5045echo "$as_me: error: missing major-version" >&2;}
5046   { (exit 1); exit 1; }; }
5047
5048	VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
5049	test -z "$VERSION_MINOR" && { { echo "$as_me:5049: error: missing minor-version" >&5
5050echo "$as_me: error: missing minor-version" >&2;}
5051   { (exit 1); exit 1; }; }
5052
5053	echo "$as_me:5053: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
5054echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
5055
5056	echo "$as_me:5056: checking for package patch date" >&5
5057echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
5058	VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
5059	case .$VERSION_PATCH in
5060	.)
5061		{ { echo "$as_me:5061: error: missing patch-date $VERSION_PATCH" >&5
5062echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
5063   { (exit 1); exit 1; }; }
5064		;;
5065	.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
5066		;;
5067	*)
5068		{ { echo "$as_me:5068: error: illegal patch-date $VERSION_PATCH" >&5
5069echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
5070   { (exit 1); exit 1; }; }
5071		;;
5072	esac
5073	echo "$as_me:5073: result: $VERSION_PATCH" >&5
5074echo "${ECHO_T}$VERSION_PATCH" >&6
5075else
5076	{ { echo "$as_me:5076: error: did not find $srcdir/VERSION" >&5
5077echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
5078   { (exit 1); exit 1; }; }
5079fi
5080
5081# show the actual data that we have for versions:
5082test -n "$verbose" && echo "	ABI VERSION $VERSION" 1>&6
5083
5084echo "${as_me:-configure}:5084: testing ABI VERSION $VERSION ..." 1>&5
5085
5086test -n "$verbose" && echo "	VERSION_MAJOR $VERSION_MAJOR" 1>&6
5087
5088echo "${as_me:-configure}:5088: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
5089
5090test -n "$verbose" && echo "	VERSION_MINOR $VERSION_MINOR" 1>&6
5091
5092echo "${as_me:-configure}:5092: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
5093
5094test -n "$verbose" && echo "	VERSION_PATCH $VERSION_PATCH" 1>&6
5095
5096echo "${as_me:-configure}:5096: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
5097
5098	cf_PACKAGE=dialog
5099	PACKAGE=$PACKAGE
5100
5101cat >>confdefs.h <<EOF
5102#define PACKAGE "$PACKAGE"
5103EOF
5104
5105cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5106
5107	cat >>confdefs.h <<EOF
5108#define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
5109EOF
5110
5111	cat >>confdefs.h <<EOF
5112#define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
5113EOF
5114
5115CFG_ROOTNAME=$PACKAGE
5116HDR_ROOTNAME=$PACKAGE
5117LIB_ROOTNAME=$PACKAGE
5118
5119echo "$as_me:5119: checking if we should install dlg_XXX headers to subdirectory" >&5
5120echo $ECHO_N "checking if we should install dlg_XXX headers to subdirectory... $ECHO_C" >&6
5121
5122# Check whether --enable-header-subdir or --disable-header-subdir was given.
5123if test "${enable_header_subdir+set}" = set; then
5124  enableval="$enable_header_subdir"
5125  SUB_INC=$enableval
5126else
5127  SUB_INC=no
5128fi;
5129echo "$as_me:5129: result: $SUB_INC" >&5
5130echo "${ECHO_T}$SUB_INC" >&6
5131
5132EXTRAOBJS=""
5133
5134echo "$as_me:5134: checking for ANSI C header files" >&5
5135echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5136if test "${ac_cv_header_stdc+set}" = set; then
5137  echo $ECHO_N "(cached) $ECHO_C" >&6
5138else
5139  cat >conftest.$ac_ext <<_ACEOF
5140#line 5140 "configure"
5141#include "confdefs.h"
5142#include <stdlib.h>
5143#include <stdarg.h>
5144#include <string.h>
5145#include <float.h>
5146
5147_ACEOF
5148if { (eval echo "$as_me:5148: \"$ac_cpp conftest.$ac_ext\"") >&5
5149  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5150  ac_status=$?
5151  egrep -v '^ *\+' conftest.er1 >conftest.err
5152  rm -f conftest.er1
5153  cat conftest.err >&5
5154  echo "$as_me:5154: \$? = $ac_status" >&5
5155  (exit $ac_status); } >/dev/null; then
5156  if test -s conftest.err; then
5157    ac_cpp_err=$ac_c_preproc_warn_flag
5158  else
5159    ac_cpp_err=
5160  fi
5161else
5162  ac_cpp_err=yes
5163fi
5164if test -z "$ac_cpp_err"; then
5165  ac_cv_header_stdc=yes
5166else
5167  echo "$as_me: failed program was:" >&5
5168  cat conftest.$ac_ext >&5
5169  ac_cv_header_stdc=no
5170fi
5171rm -f conftest.err conftest.$ac_ext
5172
5173if test $ac_cv_header_stdc = yes; then
5174  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5175  cat >conftest.$ac_ext <<_ACEOF
5176#line 5176 "configure"
5177#include "confdefs.h"
5178#include <string.h>
5179
5180_ACEOF
5181if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5182  egrep "memchr" >/dev/null 2>&1; then
5183  :
5184else
5185  ac_cv_header_stdc=no
5186fi
5187rm -rf conftest*
5188
5189fi
5190
5191if test $ac_cv_header_stdc = yes; then
5192  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5193  cat >conftest.$ac_ext <<_ACEOF
5194#line 5194 "configure"
5195#include "confdefs.h"
5196#include <stdlib.h>
5197
5198_ACEOF
5199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5200  egrep "free" >/dev/null 2>&1; then
5201  :
5202else
5203  ac_cv_header_stdc=no
5204fi
5205rm -rf conftest*
5206
5207fi
5208
5209if test $ac_cv_header_stdc = yes; then
5210  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5211  if test "$cross_compiling" = yes; then
5212  :
5213else
5214  cat >conftest.$ac_ext <<_ACEOF
5215#line 5215 "configure"
5216#include "confdefs.h"
5217#include <ctype.h>
5218#if ((' ' & 0x0FF) == 0x020)
5219# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5220# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5221#else
5222# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
5223                     || ('j' <= (c) && (c) <= 'r') \
5224                     || ('s' <= (c) && (c) <= 'z'))
5225# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5226#endif
5227
5228#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5229int
5230main ()
5231{
5232  int i;
5233  for (i = 0; i < 256; i++)
5234    if (XOR (islower (i), ISLOWER (i))
5235        || toupper (i) != TOUPPER (i))
5236      $ac_main_return(2);
5237  $ac_main_return (0);
5238}
5239_ACEOF
5240rm -f conftest$ac_exeext
5241if { (eval echo "$as_me:5241: \"$ac_link\"") >&5
5242  (eval $ac_link) 2>&5
5243  ac_status=$?
5244  echo "$as_me:5244: \$? = $ac_status" >&5
5245  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5246  { (eval echo "$as_me:5246: \"$ac_try\"") >&5
5247  (eval $ac_try) 2>&5
5248  ac_status=$?
5249  echo "$as_me:5249: \$? = $ac_status" >&5
5250  (exit $ac_status); }; }; then
5251  :
5252else
5253  echo "$as_me: program exited with status $ac_status" >&5
5254echo "$as_me: failed program was:" >&5
5255cat conftest.$ac_ext >&5
5256ac_cv_header_stdc=no
5257fi
5258rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5259fi
5260fi
5261fi
5262echo "$as_me:5262: result: $ac_cv_header_stdc" >&5
5263echo "${ECHO_T}$ac_cv_header_stdc" >&6
5264if test $ac_cv_header_stdc = yes; then
5265
5266cat >>confdefs.h <<\EOF
5267#define STDC_HEADERS 1
5268EOF
5269
5270fi
5271
5272echo "$as_me:5272: checking for inline" >&5
5273echo $ECHO_N "checking for inline... $ECHO_C" >&6
5274if test "${ac_cv_c_inline+set}" = set; then
5275  echo $ECHO_N "(cached) $ECHO_C" >&6
5276else
5277  ac_cv_c_inline=no
5278for ac_kw in inline __inline__ __inline; do
5279  cat >conftest.$ac_ext <<_ACEOF
5280#line 5280 "configure"
5281#include "confdefs.h"
5282#ifndef __cplusplus
5283static $ac_kw int static_foo () {return 0; }
5284$ac_kw int foo () {return 0; }
5285#endif
5286
5287_ACEOF
5288rm -f conftest.$ac_objext
5289if { (eval echo "$as_me:5289: \"$ac_compile\"") >&5
5290  (eval $ac_compile) 2>&5
5291  ac_status=$?
5292  echo "$as_me:5292: \$? = $ac_status" >&5
5293  (exit $ac_status); } &&
5294         { ac_try='test -s conftest.$ac_objext'
5295  { (eval echo "$as_me:5295: \"$ac_try\"") >&5
5296  (eval $ac_try) 2>&5
5297  ac_status=$?
5298  echo "$as_me:5298: \$? = $ac_status" >&5
5299  (exit $ac_status); }; }; then
5300  ac_cv_c_inline=$ac_kw; break
5301else
5302  echo "$as_me: failed program was:" >&5
5303cat conftest.$ac_ext >&5
5304fi
5305rm -f conftest.$ac_objext conftest.$ac_ext
5306done
5307
5308fi
5309echo "$as_me:5309: result: $ac_cv_c_inline" >&5
5310echo "${ECHO_T}$ac_cv_c_inline" >&6
5311case $ac_cv_c_inline in
5312  inline | yes) ;;
5313  no)
5314cat >>confdefs.h <<\EOF
5315#define inline
5316EOF
5317 ;;
5318  *)  cat >>confdefs.h <<EOF
5319#define inline $ac_cv_c_inline
5320EOF
5321 ;;
5322esac
5323
5324# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5325
5326for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5327                  inttypes.h stdint.h unistd.h
5328do
5329as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5330echo "$as_me:5330: checking for $ac_header" >&5
5331echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5332if eval "test \"\${$as_ac_Header+set}\" = set"; then
5333  echo $ECHO_N "(cached) $ECHO_C" >&6
5334else
5335  cat >conftest.$ac_ext <<_ACEOF
5336#line 5336 "configure"
5337#include "confdefs.h"
5338$ac_includes_default
5339#include <$ac_header>
5340_ACEOF
5341rm -f conftest.$ac_objext
5342if { (eval echo "$as_me:5342: \"$ac_compile\"") >&5
5343  (eval $ac_compile) 2>&5
5344  ac_status=$?
5345  echo "$as_me:5345: \$? = $ac_status" >&5
5346  (exit $ac_status); } &&
5347         { ac_try='test -s conftest.$ac_objext'
5348  { (eval echo "$as_me:5348: \"$ac_try\"") >&5
5349  (eval $ac_try) 2>&5
5350  ac_status=$?
5351  echo "$as_me:5351: \$? = $ac_status" >&5
5352  (exit $ac_status); }; }; then
5353  eval "$as_ac_Header=yes"
5354else
5355  echo "$as_me: failed program was:" >&5
5356cat conftest.$ac_ext >&5
5357eval "$as_ac_Header=no"
5358fi
5359rm -f conftest.$ac_objext conftest.$ac_ext
5360fi
5361echo "$as_me:5361: result: `eval echo '${'$as_ac_Header'}'`" >&5
5362echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5363if test `eval echo '${'$as_ac_Header'}'` = yes; then
5364  cat >>confdefs.h <<EOF
5365#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5366EOF
5367
5368fi
5369done
5370
5371echo "$as_me:5371: checking for off_t" >&5
5372echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5373if test "${ac_cv_type_off_t+set}" = set; then
5374  echo $ECHO_N "(cached) $ECHO_C" >&6
5375else
5376  cat >conftest.$ac_ext <<_ACEOF
5377#line 5377 "configure"
5378#include "confdefs.h"
5379$ac_includes_default
5380int
5381main ()
5382{
5383if ((off_t *) 0)
5384  return 0;
5385if (sizeof (off_t))
5386  return 0;
5387  ;
5388  return 0;
5389}
5390_ACEOF
5391rm -f conftest.$ac_objext
5392if { (eval echo "$as_me:5392: \"$ac_compile\"") >&5
5393  (eval $ac_compile) 2>&5
5394  ac_status=$?
5395  echo "$as_me:5395: \$? = $ac_status" >&5
5396  (exit $ac_status); } &&
5397         { ac_try='test -s conftest.$ac_objext'
5398  { (eval echo "$as_me:5398: \"$ac_try\"") >&5
5399  (eval $ac_try) 2>&5
5400  ac_status=$?
5401  echo "$as_me:5401: \$? = $ac_status" >&5
5402  (exit $ac_status); }; }; then
5403  ac_cv_type_off_t=yes
5404else
5405  echo "$as_me: failed program was:" >&5
5406cat conftest.$ac_ext >&5
5407ac_cv_type_off_t=no
5408fi
5409rm -f conftest.$ac_objext conftest.$ac_ext
5410fi
5411echo "$as_me:5411: result: $ac_cv_type_off_t" >&5
5412echo "${ECHO_T}$ac_cv_type_off_t" >&6
5413if test $ac_cv_type_off_t = yes; then
5414  :
5415else
5416
5417cat >>confdefs.h <<EOF
5418#define off_t long
5419EOF
5420
5421fi
5422
5423echo "$as_me:5423: checking for size_t" >&5
5424echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5425if test "${ac_cv_type_size_t+set}" = set; then
5426  echo $ECHO_N "(cached) $ECHO_C" >&6
5427else
5428  cat >conftest.$ac_ext <<_ACEOF
5429#line 5429 "configure"
5430#include "confdefs.h"
5431$ac_includes_default
5432int
5433main ()
5434{
5435if ((size_t *) 0)
5436  return 0;
5437if (sizeof (size_t))
5438  return 0;
5439  ;
5440  return 0;
5441}
5442_ACEOF
5443rm -f conftest.$ac_objext
5444if { (eval echo "$as_me:5444: \"$ac_compile\"") >&5
5445  (eval $ac_compile) 2>&5
5446  ac_status=$?
5447  echo "$as_me:5447: \$? = $ac_status" >&5
5448  (exit $ac_status); } &&
5449         { ac_try='test -s conftest.$ac_objext'
5450  { (eval echo "$as_me:5450: \"$ac_try\"") >&5
5451  (eval $ac_try) 2>&5
5452  ac_status=$?
5453  echo "$as_me:5453: \$? = $ac_status" >&5
5454  (exit $ac_status); }; }; then
5455  ac_cv_type_size_t=yes
5456else
5457  echo "$as_me: failed program was:" >&5
5458cat conftest.$ac_ext >&5
5459ac_cv_type_size_t=no
5460fi
5461rm -f conftest.$ac_objext conftest.$ac_ext
5462fi
5463echo "$as_me:5463: result: $ac_cv_type_size_t" >&5
5464echo "${ECHO_T}$ac_cv_type_size_t" >&6
5465if test $ac_cv_type_size_t = yes; then
5466  :
5467else
5468
5469cat >>confdefs.h <<EOF
5470#define size_t unsigned
5471EOF
5472
5473fi
5474
5475# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5476# for constant arguments.  Useless!
5477echo "$as_me:5477: checking for working alloca.h" >&5
5478echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
5479if test "${ac_cv_working_alloca_h+set}" = set; then
5480  echo $ECHO_N "(cached) $ECHO_C" >&6
5481else
5482  cat >conftest.$ac_ext <<_ACEOF
5483#line 5483 "configure"
5484#include "confdefs.h"
5485#include <alloca.h>
5486int
5487main ()
5488{
5489char *p = (char *) alloca (2 * sizeof (int));
5490  ;
5491  return 0;
5492}
5493_ACEOF
5494rm -f conftest.$ac_objext conftest$ac_exeext
5495if { (eval echo "$as_me:5495: \"$ac_link\"") >&5
5496  (eval $ac_link) 2>&5
5497  ac_status=$?
5498  echo "$as_me:5498: \$? = $ac_status" >&5
5499  (exit $ac_status); } &&
5500         { ac_try='test -s conftest$ac_exeext'
5501  { (eval echo "$as_me:5501: \"$ac_try\"") >&5
5502  (eval $ac_try) 2>&5
5503  ac_status=$?
5504  echo "$as_me:5504: \$? = $ac_status" >&5
5505  (exit $ac_status); }; }; then
5506  ac_cv_working_alloca_h=yes
5507else
5508  echo "$as_me: failed program was:" >&5
5509cat conftest.$ac_ext >&5
5510ac_cv_working_alloca_h=no
5511fi
5512rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5513fi
5514echo "$as_me:5514: result: $ac_cv_working_alloca_h" >&5
5515echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
5516if test $ac_cv_working_alloca_h = yes; then
5517
5518cat >>confdefs.h <<\EOF
5519#define HAVE_ALLOCA_H 1
5520EOF
5521
5522fi
5523
5524echo "$as_me:5524: checking for alloca" >&5
5525echo $ECHO_N "checking for alloca... $ECHO_C" >&6
5526if test "${ac_cv_func_alloca_works+set}" = set; then
5527  echo $ECHO_N "(cached) $ECHO_C" >&6
5528else
5529  cat >conftest.$ac_ext <<_ACEOF
5530#line 5530 "configure"
5531#include "confdefs.h"
5532#ifdef __GNUC__
5533# define alloca __builtin_alloca
5534#else
5535# ifdef _MSC_VER
5536#  include <malloc.h>
5537#  define alloca _alloca
5538# else
5539#  if HAVE_ALLOCA_H
5540#   include <alloca.h>
5541#  else
5542#   ifdef _AIX
5543 #pragma alloca
5544#   else
5545#    ifndef alloca /* predefined by HP cc +Olibcalls */
5546char *alloca ();
5547#    endif
5548#   endif
5549#  endif
5550# endif
5551#endif
5552
5553int
5554main ()
5555{
5556char *p = (char *) alloca (1);
5557  ;
5558  return 0;
5559}
5560_ACEOF
5561rm -f conftest.$ac_objext conftest$ac_exeext
5562if { (eval echo "$as_me:5562: \"$ac_link\"") >&5
5563  (eval $ac_link) 2>&5
5564  ac_status=$?
5565  echo "$as_me:5565: \$? = $ac_status" >&5
5566  (exit $ac_status); } &&
5567         { ac_try='test -s conftest$ac_exeext'
5568  { (eval echo "$as_me:5568: \"$ac_try\"") >&5
5569  (eval $ac_try) 2>&5
5570  ac_status=$?
5571  echo "$as_me:5571: \$? = $ac_status" >&5
5572  (exit $ac_status); }; }; then
5573  ac_cv_func_alloca_works=yes
5574else
5575  echo "$as_me: failed program was:" >&5
5576cat conftest.$ac_ext >&5
5577ac_cv_func_alloca_works=no
5578fi
5579rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5580fi
5581echo "$as_me:5581: result: $ac_cv_func_alloca_works" >&5
5582echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
5583
5584if test $ac_cv_func_alloca_works = yes; then
5585
5586cat >>confdefs.h <<\EOF
5587#define HAVE_ALLOCA 1
5588EOF
5589
5590else
5591  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5592# that cause trouble.  Some versions do not even contain alloca or
5593# contain a buggy version.  If you still want to use their alloca,
5594# use ar to extract alloca.o from them instead of compiling alloca.c.
5595
5596ALLOCA=alloca.$ac_objext
5597
5598cat >>confdefs.h <<\EOF
5599#define C_ALLOCA 1
5600EOF
5601
5602echo "$as_me:5602: checking whether \`alloca.c' needs Cray hooks" >&5
5603echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
5604if test "${ac_cv_os_cray+set}" = set; then
5605  echo $ECHO_N "(cached) $ECHO_C" >&6
5606else
5607  cat >conftest.$ac_ext <<_ACEOF
5608#line 5608 "configure"
5609#include "confdefs.h"
5610#if defined(CRAY) && ! defined(CRAY2)
5611webecray
5612#else
5613wenotbecray
5614#endif
5615
5616_ACEOF
5617if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5618  egrep "webecray" >/dev/null 2>&1; then
5619  ac_cv_os_cray=yes
5620else
5621  ac_cv_os_cray=no
5622fi
5623rm -rf conftest*
5624
5625fi
5626echo "$as_me:5626: result: $ac_cv_os_cray" >&5
5627echo "${ECHO_T}$ac_cv_os_cray" >&6
5628if test $ac_cv_os_cray = yes; then
5629  for ac_func in _getb67 GETB67 getb67; do
5630    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5631echo "$as_me:5631: checking for $ac_func" >&5
5632echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5633if eval "test \"\${$as_ac_var+set}\" = set"; then
5634  echo $ECHO_N "(cached) $ECHO_C" >&6
5635else
5636  cat >conftest.$ac_ext <<_ACEOF
5637#line 5637 "configure"
5638#include "confdefs.h"
5639/* System header to define __stub macros and hopefully few prototypes,
5640    which can conflict with char $ac_func (); below.  */
5641#include <assert.h>
5642/* Override any gcc2 internal prototype to avoid an error.  */
5643#ifdef __cplusplus
5644extern "C"
5645#endif
5646/* We use char because int might match the return type of a gcc2
5647   builtin and then its argument prototype would still apply.  */
5648char $ac_func ();
5649char (*f) ();
5650
5651int
5652main ()
5653{
5654/* The GNU C library defines this for functions which it implements
5655    to always fail with ENOSYS.  Some functions are actually named
5656    something starting with __ and the normal name is an alias.  */
5657#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5658choke me
5659#else
5660f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5661#endif
5662
5663  ;
5664  return 0;
5665}
5666_ACEOF
5667rm -f conftest.$ac_objext conftest$ac_exeext
5668if { (eval echo "$as_me:5668: \"$ac_link\"") >&5
5669  (eval $ac_link) 2>&5
5670  ac_status=$?
5671  echo "$as_me:5671: \$? = $ac_status" >&5
5672  (exit $ac_status); } &&
5673         { ac_try='test -s conftest$ac_exeext'
5674  { (eval echo "$as_me:5674: \"$ac_try\"") >&5
5675  (eval $ac_try) 2>&5
5676  ac_status=$?
5677  echo "$as_me:5677: \$? = $ac_status" >&5
5678  (exit $ac_status); }; }; then
5679  eval "$as_ac_var=yes"
5680else
5681  echo "$as_me: failed program was:" >&5
5682cat conftest.$ac_ext >&5
5683eval "$as_ac_var=no"
5684fi
5685rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5686fi
5687echo "$as_me:5687: result: `eval echo '${'$as_ac_var'}'`" >&5
5688echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5689if test `eval echo '${'$as_ac_var'}'` = yes; then
5690
5691cat >>confdefs.h <<EOF
5692#define CRAY_STACKSEG_END $ac_func
5693EOF
5694
5695    break
5696fi
5697
5698  done
5699fi
5700
5701echo "$as_me:5701: checking stack direction for C alloca" >&5
5702echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
5703if test "${ac_cv_c_stack_direction+set}" = set; then
5704  echo $ECHO_N "(cached) $ECHO_C" >&6
5705else
5706  if test "$cross_compiling" = yes; then
5707  ac_cv_c_stack_direction=0
5708else
5709  cat >conftest.$ac_ext <<_ACEOF
5710#line 5710 "configure"
5711#include "confdefs.h"
5712int
5713find_stack_direction ()
5714{
5715  static char *addr = 0;
5716  auto char dummy;
5717  if (addr == 0)
5718    {
5719      addr = &dummy;
5720      return find_stack_direction ();
5721    }
5722  else
5723    return (&dummy > addr) ? 1 : -1;
5724}
5725
5726int
5727main ()
5728{
5729  $ac_main_return (find_stack_direction () < 0);
5730}
5731_ACEOF
5732rm -f conftest$ac_exeext
5733if { (eval echo "$as_me:5733: \"$ac_link\"") >&5
5734  (eval $ac_link) 2>&5
5735  ac_status=$?
5736  echo "$as_me:5736: \$? = $ac_status" >&5
5737  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5738  { (eval echo "$as_me:5738: \"$ac_try\"") >&5
5739  (eval $ac_try) 2>&5
5740  ac_status=$?
5741  echo "$as_me:5741: \$? = $ac_status" >&5
5742  (exit $ac_status); }; }; then
5743  ac_cv_c_stack_direction=1
5744else
5745  echo "$as_me: program exited with status $ac_status" >&5
5746echo "$as_me: failed program was:" >&5
5747cat conftest.$ac_ext >&5
5748ac_cv_c_stack_direction=-1
5749fi
5750rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5751fi
5752fi
5753echo "$as_me:5753: result: $ac_cv_c_stack_direction" >&5
5754echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
5755
5756cat >>confdefs.h <<EOF
5757#define STACK_DIRECTION $ac_cv_c_stack_direction
5758EOF
5759
5760fi
5761
5762for ac_header in stdlib.h unistd.h
5763do
5764as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5765echo "$as_me:5765: checking for $ac_header" >&5
5766echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5767if eval "test \"\${$as_ac_Header+set}\" = set"; then
5768  echo $ECHO_N "(cached) $ECHO_C" >&6
5769else
5770  cat >conftest.$ac_ext <<_ACEOF
5771#line 5771 "configure"
5772#include "confdefs.h"
5773#include <$ac_header>
5774_ACEOF
5775if { (eval echo "$as_me:5775: \"$ac_cpp conftest.$ac_ext\"") >&5
5776  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5777  ac_status=$?
5778  egrep -v '^ *\+' conftest.er1 >conftest.err
5779  rm -f conftest.er1
5780  cat conftest.err >&5
5781  echo "$as_me:5781: \$? = $ac_status" >&5
5782  (exit $ac_status); } >/dev/null; then
5783  if test -s conftest.err; then
5784    ac_cpp_err=$ac_c_preproc_warn_flag
5785  else
5786    ac_cpp_err=
5787  fi
5788else
5789  ac_cpp_err=yes
5790fi
5791if test -z "$ac_cpp_err"; then
5792  eval "$as_ac_Header=yes"
5793else
5794  echo "$as_me: failed program was:" >&5
5795  cat conftest.$ac_ext >&5
5796  eval "$as_ac_Header=no"
5797fi
5798rm -f conftest.err conftest.$ac_ext
5799fi
5800echo "$as_me:5800: result: `eval echo '${'$as_ac_Header'}'`" >&5
5801echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5802if test `eval echo '${'$as_ac_Header'}'` = yes; then
5803  cat >>confdefs.h <<EOF
5804#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5805EOF
5806
5807fi
5808done
5809
5810for ac_func in getpagesize
5811do
5812as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5813echo "$as_me:5813: checking for $ac_func" >&5
5814echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5815if eval "test \"\${$as_ac_var+set}\" = set"; then
5816  echo $ECHO_N "(cached) $ECHO_C" >&6
5817else
5818  cat >conftest.$ac_ext <<_ACEOF
5819#line 5819 "configure"
5820#include "confdefs.h"
5821/* System header to define __stub macros and hopefully few prototypes,
5822    which can conflict with char $ac_func (); below.  */
5823#include <assert.h>
5824/* Override any gcc2 internal prototype to avoid an error.  */
5825#ifdef __cplusplus
5826extern "C"
5827#endif
5828/* We use char because int might match the return type of a gcc2
5829   builtin and then its argument prototype would still apply.  */
5830char $ac_func ();
5831char (*f) ();
5832
5833int
5834main ()
5835{
5836/* The GNU C library defines this for functions which it implements
5837    to always fail with ENOSYS.  Some functions are actually named
5838    something starting with __ and the normal name is an alias.  */
5839#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5840choke me
5841#else
5842f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5843#endif
5844
5845  ;
5846  return 0;
5847}
5848_ACEOF
5849rm -f conftest.$ac_objext conftest$ac_exeext
5850if { (eval echo "$as_me:5850: \"$ac_link\"") >&5
5851  (eval $ac_link) 2>&5
5852  ac_status=$?
5853  echo "$as_me:5853: \$? = $ac_status" >&5
5854  (exit $ac_status); } &&
5855         { ac_try='test -s conftest$ac_exeext'
5856  { (eval echo "$as_me:5856: \"$ac_try\"") >&5
5857  (eval $ac_try) 2>&5
5858  ac_status=$?
5859  echo "$as_me:5859: \$? = $ac_status" >&5
5860  (exit $ac_status); }; }; then
5861  eval "$as_ac_var=yes"
5862else
5863  echo "$as_me: failed program was:" >&5
5864cat conftest.$ac_ext >&5
5865eval "$as_ac_var=no"
5866fi
5867rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5868fi
5869echo "$as_me:5869: result: `eval echo '${'$as_ac_var'}'`" >&5
5870echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5871if test `eval echo '${'$as_ac_var'}'` = yes; then
5872  cat >>confdefs.h <<EOF
5873#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5874EOF
5875
5876fi
5877done
5878
5879echo "$as_me:5879: checking for working mmap" >&5
5880echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5881if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5882  echo $ECHO_N "(cached) $ECHO_C" >&6
5883else
5884  if test "$cross_compiling" = yes; then
5885  ac_cv_func_mmap_fixed_mapped=no
5886else
5887  cat >conftest.$ac_ext <<_ACEOF
5888#line 5888 "configure"
5889#include "confdefs.h"
5890$ac_includes_default
5891/* Thanks to Mike Haertel and Jim Avera for this test.
5892   Here is a matrix of mmap possibilities:
5893	mmap private not fixed
5894	mmap private fixed at somewhere currently unmapped
5895	mmap private fixed at somewhere already mapped
5896	mmap shared not fixed
5897	mmap shared fixed at somewhere currently unmapped
5898	mmap shared fixed at somewhere already mapped
5899   For private mappings, we should verify that changes cannot be read()
5900   back from the file, nor mmap's back from the file at a different
5901   address.  (There have been systems where private was not correctly
5902   implemented like the infamous i386 svr4.0, and systems where the
5903   VM page cache was not coherent with the file system buffer cache
5904   like early versions of FreeBSD and possibly contemporary NetBSD.)
5905   For shared mappings, we should conversely verify that changes get
5906   propogated back to all the places they're supposed to be.
5907
5908   Grep wants private fixed already mapped.
5909   The main things grep needs to know about mmap are:
5910   * does it exist and is it safe to write into the mmap'd area
5911   * how to use it (BSD variants)  */
5912
5913#include <fcntl.h>
5914#include <sys/mman.h>
5915
5916#if !STDC_HEADERS && !HAVE_STDLIB_H
5917char *malloc ();
5918#endif
5919
5920/* This mess was copied from the GNU getpagesize.h.  */
5921#if !HAVE_GETPAGESIZE
5922/* Assume that all systems that can run configure have sys/param.h.  */
5923# if !HAVE_SYS_PARAM_H
5924#  define HAVE_SYS_PARAM_H 1
5925# endif
5926
5927# ifdef _SC_PAGESIZE
5928#  define getpagesize() sysconf(_SC_PAGESIZE)
5929# else /* no _SC_PAGESIZE */
5930#  if HAVE_SYS_PARAM_H
5931#   include <sys/param.h>
5932#   ifdef EXEC_PAGESIZE
5933#    define getpagesize() EXEC_PAGESIZE
5934#   else /* no EXEC_PAGESIZE */
5935#    ifdef NBPG
5936#     define getpagesize() NBPG * CLSIZE
5937#     ifndef CLSIZE
5938#      define CLSIZE 1
5939#     endif /* no CLSIZE */
5940#    else /* no NBPG */
5941#     ifdef NBPC
5942#      define getpagesize() NBPC
5943#     else /* no NBPC */
5944#      ifdef PAGESIZE
5945#       define getpagesize() PAGESIZE
5946#      endif /* PAGESIZE */
5947#     endif /* no NBPC */
5948#    endif /* no NBPG */
5949#   endif /* no EXEC_PAGESIZE */
5950#  else /* no HAVE_SYS_PARAM_H */
5951#   define getpagesize() 8192	/* punt totally */
5952#  endif /* no HAVE_SYS_PARAM_H */
5953# endif /* no _SC_PAGESIZE */
5954
5955#endif /* no HAVE_GETPAGESIZE */
5956
5957int
5958main ()
5959{
5960  char *data, *data2, *data3;
5961  int i, pagesize;
5962  int fd;
5963
5964  pagesize = getpagesize ();
5965
5966  /* First, make a file with some known garbage in it. */
5967  data = (char *) malloc (pagesize);
5968  if (!data)
5969    $ac_main_return (1);
5970  for (i = 0; i < pagesize; ++i)
5971    *(data + i) = rand ();
5972  umask (0);
5973  fd = creat ("conftest.mmap", 0600);
5974  if (fd < 0)
5975    $ac_main_return (1);
5976  if (write (fd, data, pagesize) != pagesize)
5977    $ac_main_return (1);
5978  close (fd);
5979
5980  /* Next, try to mmap the file at a fixed address which already has
5981     something else allocated at it.  If we can, also make sure that
5982     we see the same garbage.  */
5983  fd = open ("conftest.mmap", O_RDWR);
5984  if (fd < 0)
5985    $ac_main_return (1);
5986  data2 = (char *) malloc (2 * pagesize);
5987  if (!data2)
5988    $ac_main_return (1);
5989  data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5990  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5991                     MAP_PRIVATE | MAP_FIXED, fd, 0L))
5992    $ac_main_return (1);
5993  for (i = 0; i < pagesize; ++i)
5994    if (*(data + i) != *(data2 + i))
5995      $ac_main_return (1);
5996
5997  /* Finally, make sure that changes to the mapped area do not
5998     percolate back to the file as seen by read().  (This is a bug on
5999     some variants of i386 svr4.0.)  */
6000  for (i = 0; i < pagesize; ++i)
6001    *(data2 + i) = *(data2 + i) + 1;
6002  data3 = (char *) malloc (pagesize);
6003  if (!data3)
6004    $ac_main_return (1);
6005  if (read (fd, data3, pagesize) != pagesize)
6006    $ac_main_return (1);
6007  for (i = 0; i < pagesize; ++i)
6008    if (*(data + i) != *(data3 + i))
6009      $ac_main_return (1);
6010  close (fd);
6011  $ac_main_return (0);
6012}
6013_ACEOF
6014rm -f conftest$ac_exeext
6015if { (eval echo "$as_me:6015: \"$ac_link\"") >&5
6016  (eval $ac_link) 2>&5
6017  ac_status=$?
6018  echo "$as_me:6018: \$? = $ac_status" >&5
6019  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6020  { (eval echo "$as_me:6020: \"$ac_try\"") >&5
6021  (eval $ac_try) 2>&5
6022  ac_status=$?
6023  echo "$as_me:6023: \$? = $ac_status" >&5
6024  (exit $ac_status); }; }; then
6025  ac_cv_func_mmap_fixed_mapped=yes
6026else
6027  echo "$as_me: program exited with status $ac_status" >&5
6028echo "$as_me: failed program was:" >&5
6029cat conftest.$ac_ext >&5
6030ac_cv_func_mmap_fixed_mapped=no
6031fi
6032rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6033fi
6034fi
6035echo "$as_me:6035: result: $ac_cv_func_mmap_fixed_mapped" >&5
6036echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
6037if test $ac_cv_func_mmap_fixed_mapped = yes; then
6038
6039cat >>confdefs.h <<\EOF
6040#define HAVE_MMAP 1
6041EOF
6042
6043fi
6044rm -f conftest.mmap
6045
6046    echo "$as_me:6046: checking whether we are using the GNU C Library 2.1 or newer" >&5
6047echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
6048if test "${ac_cv_gnu_library_2_1+set}" = set; then
6049  echo $ECHO_N "(cached) $ECHO_C" >&6
6050else
6051  cat >conftest.$ac_ext <<_ACEOF
6052#line 6052 "configure"
6053#include "confdefs.h"
6054
6055#include <features.h>
6056#ifdef __GNU_LIBRARY__
6057 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
6058  Lucky GNU user
6059 #endif
6060#endif
6061
6062_ACEOF
6063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6064  egrep "Lucky GNU user" >/dev/null 2>&1; then
6065  ac_cv_gnu_library_2_1=yes
6066else
6067  ac_cv_gnu_library_2_1=no
6068fi
6069rm -rf conftest*
6070
6071fi
6072echo "$as_me:6072: result: $ac_cv_gnu_library_2_1" >&5
6073echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
6074
6075    GLIBC21="$ac_cv_gnu_library_2_1"
6076
6077cf_makefile=makefile
6078
6079test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
6080
6081# Allow override of "config.h" definition:
6082: ${CONFIG_H:=config.h}
6083
6084if test -z "$PACKAGE" ; then
6085	{ { echo "$as_me:6085: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
6086echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
6087   { (exit 1); exit 1; }; }
6088fi
6089
6090if test -z "$VERSION" ; then
6091if test -f $srcdir/VERSION ; then
6092	VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
6093else
6094	VERSION=unknown
6095fi
6096fi
6097
6098for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
6099stdlib.h string.h unistd.h sys/param.h
6100do
6101as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6102echo "$as_me:6102: checking for $ac_header" >&5
6103echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6104if eval "test \"\${$as_ac_Header+set}\" = set"; then
6105  echo $ECHO_N "(cached) $ECHO_C" >&6
6106else
6107  cat >conftest.$ac_ext <<_ACEOF
6108#line 6108 "configure"
6109#include "confdefs.h"
6110#include <$ac_header>
6111_ACEOF
6112if { (eval echo "$as_me:6112: \"$ac_cpp conftest.$ac_ext\"") >&5
6113  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6114  ac_status=$?
6115  egrep -v '^ *\+' conftest.er1 >conftest.err
6116  rm -f conftest.er1
6117  cat conftest.err >&5
6118  echo "$as_me:6118: \$? = $ac_status" >&5
6119  (exit $ac_status); } >/dev/null; then
6120  if test -s conftest.err; then
6121    ac_cpp_err=$ac_c_preproc_warn_flag
6122  else
6123    ac_cpp_err=
6124  fi
6125else
6126  ac_cpp_err=yes
6127fi
6128if test -z "$ac_cpp_err"; then
6129  eval "$as_ac_Header=yes"
6130else
6131  echo "$as_me: failed program was:" >&5
6132  cat conftest.$ac_ext >&5
6133  eval "$as_ac_Header=no"
6134fi
6135rm -f conftest.err conftest.$ac_ext
6136fi
6137echo "$as_me:6137: result: `eval echo '${'$as_ac_Header'}'`" >&5
6138echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6139if test `eval echo '${'$as_ac_Header'}'` = yes; then
6140  cat >>confdefs.h <<EOF
6141#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6142EOF
6143
6144fi
6145done
6146
6147for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
6148getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
6149strdup strtoul tsearch __argz_count __argz_stringify __argz_next
6150do
6151as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6152echo "$as_me:6152: checking for $ac_func" >&5
6153echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6154if eval "test \"\${$as_ac_var+set}\" = set"; then
6155  echo $ECHO_N "(cached) $ECHO_C" >&6
6156else
6157  cat >conftest.$ac_ext <<_ACEOF
6158#line 6158 "configure"
6159#include "confdefs.h"
6160/* System header to define __stub macros and hopefully few prototypes,
6161    which can conflict with char $ac_func (); below.  */
6162#include <assert.h>
6163/* Override any gcc2 internal prototype to avoid an error.  */
6164#ifdef __cplusplus
6165extern "C"
6166#endif
6167/* We use char because int might match the return type of a gcc2
6168   builtin and then its argument prototype would still apply.  */
6169char $ac_func ();
6170char (*f) ();
6171
6172int
6173main ()
6174{
6175/* The GNU C library defines this for functions which it implements
6176    to always fail with ENOSYS.  Some functions are actually named
6177    something starting with __ and the normal name is an alias.  */
6178#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6179choke me
6180#else
6181f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6182#endif
6183
6184  ;
6185  return 0;
6186}
6187_ACEOF
6188rm -f conftest.$ac_objext conftest$ac_exeext
6189if { (eval echo "$as_me:6189: \"$ac_link\"") >&5
6190  (eval $ac_link) 2>&5
6191  ac_status=$?
6192  echo "$as_me:6192: \$? = $ac_status" >&5
6193  (exit $ac_status); } &&
6194         { ac_try='test -s conftest$ac_exeext'
6195  { (eval echo "$as_me:6195: \"$ac_try\"") >&5
6196  (eval $ac_try) 2>&5
6197  ac_status=$?
6198  echo "$as_me:6198: \$? = $ac_status" >&5
6199  (exit $ac_status); }; }; then
6200  eval "$as_ac_var=yes"
6201else
6202  echo "$as_me: failed program was:" >&5
6203cat conftest.$ac_ext >&5
6204eval "$as_ac_var=no"
6205fi
6206rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6207fi
6208echo "$as_me:6208: result: `eval echo '${'$as_ac_var'}'`" >&5
6209echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6210if test `eval echo '${'$as_ac_var'}'` = yes; then
6211  cat >>confdefs.h <<EOF
6212#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6213EOF
6214
6215fi
6216done
6217
6218# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
6219if test "${with_libiconv_prefix+set}" = set; then
6220  withval="$with_libiconv_prefix"
6221
6222  case "$withval" in #(vi
6223  no) #(vi
6224      ;;
6225  yes) #(vi
6226      ;;
6227  *)
6228
6229for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
6230	if test -d $cf_searchpath/include; then
6231
6232if test -n "$cf_searchpath/include" ; then
6233  for cf_add_incdir in $cf_searchpath/include
6234  do
6235	while test $cf_add_incdir != /usr/include
6236	do
6237	  if test -d $cf_add_incdir
6238	  then
6239		cf_have_incdir=no
6240		if test -n "$CFLAGS$CPPFLAGS" ; then
6241		  # a loop is needed to ensure we can add subdirs of existing dirs
6242		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6243			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6244			  cf_have_incdir=yes; break
6245			fi
6246		  done
6247		fi
6248
6249		if test "$cf_have_incdir" = no ; then
6250		  if test "$cf_add_incdir" = /usr/local/include ; then
6251			if test "$GCC" = yes
6252			then
6253			  cf_save_CPPFLAGS=$CPPFLAGS
6254			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6255			  cat >conftest.$ac_ext <<_ACEOF
6256#line 6256 "configure"
6257#include "confdefs.h"
6258#include <stdio.h>
6259int
6260main ()
6261{
6262printf("Hello")
6263  ;
6264  return 0;
6265}
6266_ACEOF
6267rm -f conftest.$ac_objext
6268if { (eval echo "$as_me:6268: \"$ac_compile\"") >&5
6269  (eval $ac_compile) 2>&5
6270  ac_status=$?
6271  echo "$as_me:6271: \$? = $ac_status" >&5
6272  (exit $ac_status); } &&
6273         { ac_try='test -s conftest.$ac_objext'
6274  { (eval echo "$as_me:6274: \"$ac_try\"") >&5
6275  (eval $ac_try) 2>&5
6276  ac_status=$?
6277  echo "$as_me:6277: \$? = $ac_status" >&5
6278  (exit $ac_status); }; }; then
6279  :
6280else
6281  echo "$as_me: failed program was:" >&5
6282cat conftest.$ac_ext >&5
6283cf_have_incdir=yes
6284fi
6285rm -f conftest.$ac_objext conftest.$ac_ext
6286			  CPPFLAGS=$cf_save_CPPFLAGS
6287			fi
6288		  fi
6289		fi
6290
6291		if test "$cf_have_incdir" = no ; then
6292		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
6293
6294echo "${as_me:-configure}:6294: testing adding $cf_add_incdir to include-path ..." 1>&5
6295
6296		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6297
6298		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6299		  test "$cf_top_incdir" = "$cf_add_incdir" && break
6300		  cf_add_incdir="$cf_top_incdir"
6301		else
6302		  break
6303		fi
6304	  fi
6305	done
6306  done
6307fi
6308
6309	elif test -d $cf_searchpath/../include ; then
6310
6311if test -n "$cf_searchpath/../include" ; then
6312  for cf_add_incdir in $cf_searchpath/../include
6313  do
6314	while test $cf_add_incdir != /usr/include
6315	do
6316	  if test -d $cf_add_incdir
6317	  then
6318		cf_have_incdir=no
6319		if test -n "$CFLAGS$CPPFLAGS" ; then
6320		  # a loop is needed to ensure we can add subdirs of existing dirs
6321		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6322			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6323			  cf_have_incdir=yes; break
6324			fi
6325		  done
6326		fi
6327
6328		if test "$cf_have_incdir" = no ; then
6329		  if test "$cf_add_incdir" = /usr/local/include ; then
6330			if test "$GCC" = yes
6331			then
6332			  cf_save_CPPFLAGS=$CPPFLAGS
6333			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6334			  cat >conftest.$ac_ext <<_ACEOF
6335#line 6335 "configure"
6336#include "confdefs.h"
6337#include <stdio.h>
6338int
6339main ()
6340{
6341printf("Hello")
6342  ;
6343  return 0;
6344}
6345_ACEOF
6346rm -f conftest.$ac_objext
6347if { (eval echo "$as_me:6347: \"$ac_compile\"") >&5
6348  (eval $ac_compile) 2>&5
6349  ac_status=$?
6350  echo "$as_me:6350: \$? = $ac_status" >&5
6351  (exit $ac_status); } &&
6352         { ac_try='test -s conftest.$ac_objext'
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  :
6359else
6360  echo "$as_me: failed program was:" >&5
6361cat conftest.$ac_ext >&5
6362cf_have_incdir=yes
6363fi
6364rm -f conftest.$ac_objext conftest.$ac_ext
6365			  CPPFLAGS=$cf_save_CPPFLAGS
6366			fi
6367		  fi
6368		fi
6369
6370		if test "$cf_have_incdir" = no ; then
6371		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
6372
6373echo "${as_me:-configure}:6373: testing adding $cf_add_incdir to include-path ..." 1>&5
6374
6375		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6376
6377		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6378		  test "$cf_top_incdir" = "$cf_add_incdir" && break
6379		  cf_add_incdir="$cf_top_incdir"
6380		else
6381		  break
6382		fi
6383	  fi
6384	done
6385  done
6386fi
6387
6388	else
6389{ { echo "$as_me:6389: error: cannot find libiconv under $withval" >&5
6390echo "$as_me: error: cannot find libiconv under $withval" >&2;}
6391   { (exit 1); exit 1; }; }
6392	fi
6393	if test -d $cf_searchpath/lib; then
6394
6395if test -n "$cf_searchpath/lib" ; then
6396  for cf_add_libdir in $cf_searchpath/lib
6397  do
6398    if test $cf_add_libdir = /usr/lib ; then
6399      :
6400    elif test -d $cf_add_libdir
6401    then
6402      cf_have_libdir=no
6403      if test -n "$LDFLAGS$LIBS" ; then
6404        # a loop is needed to ensure we can add subdirs of existing dirs
6405        for cf_test_libdir in $LDFLAGS $LIBS ; do
6406          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6407            cf_have_libdir=yes; break
6408          fi
6409        done
6410      fi
6411      if test "$cf_have_libdir" = no ; then
6412        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
6413
6414echo "${as_me:-configure}:6414: testing adding $cf_add_libdir to library-path ..." 1>&5
6415
6416        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6417      fi
6418    fi
6419  done
6420fi
6421
6422	elif test -d $cf_searchpath ; then
6423
6424if test -n "$cf_searchpath" ; then
6425  for cf_add_libdir in $cf_searchpath
6426  do
6427    if test $cf_add_libdir = /usr/lib ; then
6428      :
6429    elif test -d $cf_add_libdir
6430    then
6431      cf_have_libdir=no
6432      if test -n "$LDFLAGS$LIBS" ; then
6433        # a loop is needed to ensure we can add subdirs of existing dirs
6434        for cf_test_libdir in $LDFLAGS $LIBS ; do
6435          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6436            cf_have_libdir=yes; break
6437          fi
6438        done
6439      fi
6440      if test "$cf_have_libdir" = no ; then
6441        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
6442
6443echo "${as_me:-configure}:6443: testing adding $cf_add_libdir to library-path ..." 1>&5
6444
6445        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6446      fi
6447    fi
6448  done
6449fi
6450
6451	else
6452{ { echo "$as_me:6452: error: cannot find libiconv under $withval" >&5
6453echo "$as_me: error: cannot find libiconv under $withval" >&2;}
6454   { (exit 1); exit 1; }; }
6455	fi
6456done
6457
6458      ;;
6459  esac
6460
6461fi;
6462
6463  echo "$as_me:6463: checking for iconv" >&5
6464echo $ECHO_N "checking for iconv... $ECHO_C" >&6
6465if test "${am_cv_func_iconv+set}" = set; then
6466  echo $ECHO_N "(cached) $ECHO_C" >&6
6467else
6468
6469# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6470# will be set on completion of the AC_TRY_LINK below.
6471cf_cv_header_path_iconv=
6472cf_cv_library_path_iconv=
6473
6474echo "${as_me:-configure}:6474: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
6475
6476cf_save_LIBS="$LIBS"
6477
6478cat >conftest.$ac_ext <<_ACEOF
6479#line 6479 "configure"
6480#include "confdefs.h"
6481
6482#include <stdlib.h>
6483#include <iconv.h>
6484
6485int
6486main ()
6487{
6488
6489	iconv_t cd = iconv_open("","");
6490	iconv(cd,NULL,NULL,NULL,NULL);
6491	iconv_close(cd);
6492
6493  ;
6494  return 0;
6495}
6496_ACEOF
6497rm -f conftest.$ac_objext conftest$ac_exeext
6498if { (eval echo "$as_me:6498: \"$ac_link\"") >&5
6499  (eval $ac_link) 2>&5
6500  ac_status=$?
6501  echo "$as_me:6501: \$? = $ac_status" >&5
6502  (exit $ac_status); } &&
6503         { ac_try='test -s conftest$ac_exeext'
6504  { (eval echo "$as_me:6504: \"$ac_try\"") >&5
6505  (eval $ac_try) 2>&5
6506  ac_status=$?
6507  echo "$as_me:6507: \$? = $ac_status" >&5
6508  (exit $ac_status); }; }; then
6509
6510	cf_cv_find_linkage_iconv=yes
6511	cf_cv_header_path_iconv=/usr/include
6512	cf_cv_library_path_iconv=/usr/lib
6513
6514else
6515  echo "$as_me: failed program was:" >&5
6516cat conftest.$ac_ext >&5
6517
6518LIBS="-liconv  $cf_save_LIBS"
6519
6520cat >conftest.$ac_ext <<_ACEOF
6521#line 6521 "configure"
6522#include "confdefs.h"
6523
6524#include <stdlib.h>
6525#include <iconv.h>
6526
6527int
6528main ()
6529{
6530
6531	iconv_t cd = iconv_open("","");
6532	iconv(cd,NULL,NULL,NULL,NULL);
6533	iconv_close(cd);
6534
6535  ;
6536  return 0;
6537}
6538_ACEOF
6539rm -f conftest.$ac_objext conftest$ac_exeext
6540if { (eval echo "$as_me:6540: \"$ac_link\"") >&5
6541  (eval $ac_link) 2>&5
6542  ac_status=$?
6543  echo "$as_me:6543: \$? = $ac_status" >&5
6544  (exit $ac_status); } &&
6545         { ac_try='test -s conftest$ac_exeext'
6546  { (eval echo "$as_me:6546: \"$ac_try\"") >&5
6547  (eval $ac_try) 2>&5
6548  ac_status=$?
6549  echo "$as_me:6549: \$? = $ac_status" >&5
6550  (exit $ac_status); }; }; then
6551
6552	cf_cv_find_linkage_iconv=yes
6553	cf_cv_header_path_iconv=/usr/include
6554	cf_cv_library_path_iconv=/usr/lib
6555	cf_cv_library_file_iconv="-liconv"
6556
6557else
6558  echo "$as_me: failed program was:" >&5
6559cat conftest.$ac_ext >&5
6560
6561	cf_cv_find_linkage_iconv=no
6562	LIBS="$cf_save_LIBS"
6563
6564    test -n "$verbose" && echo "	find linkage for iconv library" 1>&6
6565
6566echo "${as_me:-configure}:6566: testing find linkage for iconv library ..." 1>&5
6567
6568echo "${as_me:-configure}:6568: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
6569
6570    cf_save_CPPFLAGS="$CPPFLAGS"
6571    cf_test_CPPFLAGS="$CPPFLAGS"
6572
6573cf_search=
6574
6575# collect the current set of include-directories from compiler flags
6576cf_header_path_list=""
6577if test -n "${CFLAGS}${CPPFLAGS}" ; then
6578	for cf_header_path in $CPPFLAGS $CFLAGS
6579	do
6580		case $cf_header_path in #(vi
6581		-I*)
6582			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6583
6584test "$cf_header_path" != "NONE" && \
6585test -d "$cf_header_path" && \
6586 {
6587	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
6588	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6589	test -d $cf_header_path/include/iconv &&       cf_search="$cf_search $cf_header_path/include/iconv"
6590	test -d $cf_header_path/include/iconv/include &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
6591	test -d $cf_header_path/iconv/include &&       cf_search="$cf_search $cf_header_path/iconv/include"
6592	test -d $cf_header_path/iconv/include/iconv &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
6593}
6594
6595			cf_header_path_list="$cf_header_path_list $cf_search"
6596			;;
6597		esac
6598	done
6599fi
6600
6601# add the variations for the package we are looking for
6602
6603cf_search=
6604
6605test "/usr" != "$prefix" && \
6606test -d "/usr" && \
6607(test $prefix = NONE || test "/usr" != "$prefix") && {
6608	test -n "$verbose" && echo "	... testing for include-directories under /usr"
6609	test -d /usr/include &&          cf_search="$cf_search /usr/include"
6610	test -d /usr/include/iconv &&       cf_search="$cf_search /usr/include/iconv"
6611	test -d /usr/include/iconv/include &&    cf_search="$cf_search /usr/include/iconv/include"
6612	test -d /usr/iconv/include &&       cf_search="$cf_search /usr/iconv/include"
6613	test -d /usr/iconv/include/iconv &&    cf_search="$cf_search /usr/iconv/include/iconv"
6614}
6615
6616test "$prefix" != "NONE" && \
6617test -d "$prefix" && \
6618 {
6619	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
6620	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6621	test -d $prefix/include/iconv &&       cf_search="$cf_search $prefix/include/iconv"
6622	test -d $prefix/include/iconv/include &&    cf_search="$cf_search $prefix/include/iconv/include"
6623	test -d $prefix/iconv/include &&       cf_search="$cf_search $prefix/iconv/include"
6624	test -d $prefix/iconv/include/iconv &&    cf_search="$cf_search $prefix/iconv/include/iconv"
6625}
6626
6627test "/usr/local" != "$prefix" && \
6628test -d "/usr/local" && \
6629(test $prefix = NONE || test "/usr/local" != "$prefix") && {
6630	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
6631	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6632	test -d /usr/local/include/iconv &&       cf_search="$cf_search /usr/local/include/iconv"
6633	test -d /usr/local/include/iconv/include &&    cf_search="$cf_search /usr/local/include/iconv/include"
6634	test -d /usr/local/iconv/include &&       cf_search="$cf_search /usr/local/iconv/include"
6635	test -d /usr/local/iconv/include/iconv &&    cf_search="$cf_search /usr/local/iconv/include/iconv"
6636}
6637
6638test "/opt" != "$prefix" && \
6639test -d "/opt" && \
6640(test $prefix = NONE || test "/opt" != "$prefix") && {
6641	test -n "$verbose" && echo "	... testing for include-directories under /opt"
6642	test -d /opt/include &&          cf_search="$cf_search /opt/include"
6643	test -d /opt/include/iconv &&       cf_search="$cf_search /opt/include/iconv"
6644	test -d /opt/include/iconv/include &&    cf_search="$cf_search /opt/include/iconv/include"
6645	test -d /opt/iconv/include &&       cf_search="$cf_search /opt/iconv/include"
6646	test -d /opt/iconv/include/iconv &&    cf_search="$cf_search /opt/iconv/include/iconv"
6647}
6648
6649test "$HOME" != "$prefix" && \
6650test -d "$HOME" && \
6651(test $prefix = NONE || test "$HOME" != "$prefix") && {
6652	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
6653	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6654	test -d $HOME/include/iconv &&       cf_search="$cf_search $HOME/include/iconv"
6655	test -d $HOME/include/iconv/include &&    cf_search="$cf_search $HOME/include/iconv/include"
6656	test -d $HOME/iconv/include &&       cf_search="$cf_search $HOME/iconv/include"
6657	test -d $HOME/iconv/include/iconv &&    cf_search="$cf_search $HOME/iconv/include/iconv"
6658}
6659
6660test "$includedir" != NONE && \
6661test "$includedir" != "/usr/include" && \
6662test -d "$includedir" && {
6663	test -d $includedir &&    cf_search="$cf_search $includedir"
6664	test -d $includedir/iconv && cf_search="$cf_search $includedir/iconv"
6665}
6666
6667test "$oldincludedir" != NONE && \
6668test "$oldincludedir" != "/usr/include" && \
6669test -d "$oldincludedir" && {
6670	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6671	test -d $oldincludedir/iconv && cf_search="$cf_search $oldincludedir/iconv"
6672}
6673
6674cf_search="$cf_search $cf_header_path_list"
6675
6676    for cf_cv_header_path_iconv in $cf_search
6677    do
6678      if test -d $cf_cv_header_path_iconv ; then
6679        test -n "$verbose" && echo "	... testing $cf_cv_header_path_iconv" 1>&6
6680
6681echo "${as_me:-configure}:6681: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
6682
6683        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_iconv"
6684        cat >conftest.$ac_ext <<_ACEOF
6685#line 6685 "configure"
6686#include "confdefs.h"
6687
6688#include <stdlib.h>
6689#include <iconv.h>
6690
6691int
6692main ()
6693{
6694
6695	iconv_t cd = iconv_open("","");
6696	iconv(cd,NULL,NULL,NULL,NULL);
6697	iconv_close(cd);
6698
6699  ;
6700  return 0;
6701}
6702_ACEOF
6703rm -f conftest.$ac_objext
6704if { (eval echo "$as_me:6704: \"$ac_compile\"") >&5
6705  (eval $ac_compile) 2>&5
6706  ac_status=$?
6707  echo "$as_me:6707: \$? = $ac_status" >&5
6708  (exit $ac_status); } &&
6709         { ac_try='test -s conftest.$ac_objext'
6710  { (eval echo "$as_me:6710: \"$ac_try\"") >&5
6711  (eval $ac_try) 2>&5
6712  ac_status=$?
6713  echo "$as_me:6713: \$? = $ac_status" >&5
6714  (exit $ac_status); }; }; then
6715
6716            test -n "$verbose" && echo "	... found iconv headers in $cf_cv_header_path_iconv" 1>&6
6717
6718echo "${as_me:-configure}:6718: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
6719
6720            cf_cv_find_linkage_iconv=maybe
6721            cf_test_CPPFLAGS="$CPPFLAGS"
6722            break
6723else
6724  echo "$as_me: failed program was:" >&5
6725cat conftest.$ac_ext >&5
6726
6727            CPPFLAGS="$cf_save_CPPFLAGS"
6728
6729fi
6730rm -f conftest.$ac_objext conftest.$ac_ext
6731      fi
6732    done
6733
6734    if test "$cf_cv_find_linkage_iconv" = maybe ; then
6735
6736echo "${as_me:-configure}:6736: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
6737
6738      cf_save_LIBS="$LIBS"
6739      cf_save_LDFLAGS="$LDFLAGS"
6740
6741      if test "$cf_cv_find_linkage_iconv" != yes ; then
6742
6743cf_search=
6744cf_library_path_list=""
6745if test -n "${LDFLAGS}${LIBS}" ; then
6746	for cf_library_path in $LDFLAGS $LIBS
6747	do
6748		case $cf_library_path in #(vi
6749		-L*)
6750			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6751
6752test "$cf_library_path" != "NONE" && \
6753test -d "$cf_library_path" && \
6754 {
6755	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
6756	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6757	test -d $cf_library_path/lib/iconv &&       cf_search="$cf_search $cf_library_path/lib/iconv"
6758	test -d $cf_library_path/lib/iconv/lib &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
6759	test -d $cf_library_path/iconv/lib &&       cf_search="$cf_search $cf_library_path/iconv/lib"
6760	test -d $cf_library_path/iconv/lib/iconv &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
6761}
6762
6763			cf_library_path_list="$cf_library_path_list $cf_search"
6764			;;
6765		esac
6766	done
6767fi
6768
6769cf_search=
6770
6771test "/usr" != "$prefix" && \
6772test -d "/usr" && \
6773(test $prefix = NONE || test "/usr" != "$prefix") && {
6774	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
6775	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6776	test -d /usr/lib/iconv &&       cf_search="$cf_search /usr/lib/iconv"
6777	test -d /usr/lib/iconv/lib &&    cf_search="$cf_search /usr/lib/iconv/lib"
6778	test -d /usr/iconv/lib &&       cf_search="$cf_search /usr/iconv/lib"
6779	test -d /usr/iconv/lib/iconv &&    cf_search="$cf_search /usr/iconv/lib/iconv"
6780}
6781
6782test "$prefix" != "NONE" && \
6783test -d "$prefix" && \
6784 {
6785	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
6786	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6787	test -d $prefix/lib/iconv &&       cf_search="$cf_search $prefix/lib/iconv"
6788	test -d $prefix/lib/iconv/lib &&    cf_search="$cf_search $prefix/lib/iconv/lib"
6789	test -d $prefix/iconv/lib &&       cf_search="$cf_search $prefix/iconv/lib"
6790	test -d $prefix/iconv/lib/iconv &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
6791}
6792
6793test "/usr/local" != "$prefix" && \
6794test -d "/usr/local" && \
6795(test $prefix = NONE || test "/usr/local" != "$prefix") && {
6796	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
6797	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6798	test -d /usr/local/lib/iconv &&       cf_search="$cf_search /usr/local/lib/iconv"
6799	test -d /usr/local/lib/iconv/lib &&    cf_search="$cf_search /usr/local/lib/iconv/lib"
6800	test -d /usr/local/iconv/lib &&       cf_search="$cf_search /usr/local/iconv/lib"
6801	test -d /usr/local/iconv/lib/iconv &&    cf_search="$cf_search /usr/local/iconv/lib/iconv"
6802}
6803
6804test "/opt" != "$prefix" && \
6805test -d "/opt" && \
6806(test $prefix = NONE || test "/opt" != "$prefix") && {
6807	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
6808	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6809	test -d /opt/lib/iconv &&       cf_search="$cf_search /opt/lib/iconv"
6810	test -d /opt/lib/iconv/lib &&    cf_search="$cf_search /opt/lib/iconv/lib"
6811	test -d /opt/iconv/lib &&       cf_search="$cf_search /opt/iconv/lib"
6812	test -d /opt/iconv/lib/iconv &&    cf_search="$cf_search /opt/iconv/lib/iconv"
6813}
6814
6815test "$HOME" != "$prefix" && \
6816test -d "$HOME" && \
6817(test $prefix = NONE || test "$HOME" != "$prefix") && {
6818	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
6819	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6820	test -d $HOME/lib/iconv &&       cf_search="$cf_search $HOME/lib/iconv"
6821	test -d $HOME/lib/iconv/lib &&    cf_search="$cf_search $HOME/lib/iconv/lib"
6822	test -d $HOME/iconv/lib &&       cf_search="$cf_search $HOME/iconv/lib"
6823	test -d $HOME/iconv/lib/iconv &&    cf_search="$cf_search $HOME/iconv/lib/iconv"
6824}
6825
6826cf_search="$cf_library_path_list $cf_search"
6827
6828        for cf_cv_library_path_iconv in $cf_search
6829        do
6830          if test -d $cf_cv_library_path_iconv ; then
6831            test -n "$verbose" && echo "	... testing $cf_cv_library_path_iconv" 1>&6
6832
6833echo "${as_me:-configure}:6833: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
6834
6835            CPPFLAGS="$cf_test_CPPFLAGS"
6836            LIBS="-liconv  $cf_save_LIBS"
6837            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
6838            cat >conftest.$ac_ext <<_ACEOF
6839#line 6839 "configure"
6840#include "confdefs.h"
6841
6842#include <stdlib.h>
6843#include <iconv.h>
6844
6845int
6846main ()
6847{
6848
6849	iconv_t cd = iconv_open("","");
6850	iconv(cd,NULL,NULL,NULL,NULL);
6851	iconv_close(cd);
6852
6853  ;
6854  return 0;
6855}
6856_ACEOF
6857rm -f conftest.$ac_objext conftest$ac_exeext
6858if { (eval echo "$as_me:6858: \"$ac_link\"") >&5
6859  (eval $ac_link) 2>&5
6860  ac_status=$?
6861  echo "$as_me:6861: \$? = $ac_status" >&5
6862  (exit $ac_status); } &&
6863         { ac_try='test -s conftest$ac_exeext'
6864  { (eval echo "$as_me:6864: \"$ac_try\"") >&5
6865  (eval $ac_try) 2>&5
6866  ac_status=$?
6867  echo "$as_me:6867: \$? = $ac_status" >&5
6868  (exit $ac_status); }; }; then
6869
6870                test -n "$verbose" && echo "	... found iconv library in $cf_cv_library_path_iconv" 1>&6
6871
6872echo "${as_me:-configure}:6872: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
6873
6874                cf_cv_find_linkage_iconv=yes
6875                cf_cv_library_file_iconv="-liconv"
6876                break
6877else
6878  echo "$as_me: failed program was:" >&5
6879cat conftest.$ac_ext >&5
6880
6881                CPPFLAGS="$cf_save_CPPFLAGS"
6882                LIBS="$cf_save_LIBS"
6883                LDFLAGS="$cf_save_LDFLAGS"
6884
6885fi
6886rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6887          fi
6888        done
6889        CPPFLAGS="$cf_save_CPPFLAGS"
6890        LDFLAGS="$cf_save_LDFLAGS"
6891      fi
6892
6893    else
6894      cf_cv_find_linkage_iconv=no
6895    fi
6896
6897fi
6898rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6899
6900fi
6901rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6902
6903LIBS="$cf_save_LIBS"
6904
6905if test "$cf_cv_find_linkage_iconv" = yes ; then
6906am_cv_func_iconv=yes
6907else
6908am_cv_func_iconv="no, consider installing GNU libiconv"
6909fi
6910
6911fi
6912echo "$as_me:6912: result: $am_cv_func_iconv" >&5
6913echo "${ECHO_T}$am_cv_func_iconv" >&6
6914
6915  if test "$am_cv_func_iconv" = yes; then
6916
6917cat >>confdefs.h <<\EOF
6918#define HAVE_ICONV 1
6919EOF
6920
6921    echo "$as_me:6921: checking if the declaration of iconv() needs const." >&5
6922echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
6923if test "${am_cv_proto_iconv_const+set}" = set; then
6924  echo $ECHO_N "(cached) $ECHO_C" >&6
6925else
6926
6927      cat >conftest.$ac_ext <<_ACEOF
6928#line 6928 "configure"
6929#include "confdefs.h"
6930
6931#include <stdlib.h>
6932#include <iconv.h>
6933
6934extern
6935#ifdef __cplusplus
6936"C"
6937#endif
6938#if defined(__STDC__) || defined(__cplusplus)
6939size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6940#else
6941size_t iconv();
6942#endif
6943
6944int
6945main ()
6946{
6947
6948  ;
6949  return 0;
6950}
6951_ACEOF
6952rm -f conftest.$ac_objext
6953if { (eval echo "$as_me:6953: \"$ac_compile\"") >&5
6954  (eval $ac_compile) 2>&5
6955  ac_status=$?
6956  echo "$as_me:6956: \$? = $ac_status" >&5
6957  (exit $ac_status); } &&
6958         { ac_try='test -s conftest.$ac_objext'
6959  { (eval echo "$as_me:6959: \"$ac_try\"") >&5
6960  (eval $ac_try) 2>&5
6961  ac_status=$?
6962  echo "$as_me:6962: \$? = $ac_status" >&5
6963  (exit $ac_status); }; }; then
6964  am_cv_proto_iconv_const=no
6965else
6966  echo "$as_me: failed program was:" >&5
6967cat conftest.$ac_ext >&5
6968am_cv_proto_iconv_const=yes
6969fi
6970rm -f conftest.$ac_objext conftest.$ac_ext
6971fi
6972echo "$as_me:6972: result: $am_cv_proto_iconv_const" >&5
6973echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
6974
6975    if test "$am_cv_proto_iconv_const" = yes ; then
6976      am_cv_proto_iconv_arg1="const"
6977    else
6978      am_cv_proto_iconv_arg1=""
6979    fi
6980
6981cat >>confdefs.h <<EOF
6982#define ICONV_CONST $am_cv_proto_iconv_arg1
6983EOF
6984
6985  fi
6986
6987  LIBICONV=
6988  if test "$cf_cv_find_linkage_iconv" = yes; then
6989
6990if test -n "$cf_cv_header_path_iconv" ; then
6991  for cf_add_incdir in $cf_cv_header_path_iconv
6992  do
6993	while test $cf_add_incdir != /usr/include
6994	do
6995	  if test -d $cf_add_incdir
6996	  then
6997		cf_have_incdir=no
6998		if test -n "$CFLAGS$CPPFLAGS" ; then
6999		  # a loop is needed to ensure we can add subdirs of existing dirs
7000		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7001			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7002			  cf_have_incdir=yes; break
7003			fi
7004		  done
7005		fi
7006
7007		if test "$cf_have_incdir" = no ; then
7008		  if test "$cf_add_incdir" = /usr/local/include ; then
7009			if test "$GCC" = yes
7010			then
7011			  cf_save_CPPFLAGS=$CPPFLAGS
7012			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7013			  cat >conftest.$ac_ext <<_ACEOF
7014#line 7014 "configure"
7015#include "confdefs.h"
7016#include <stdio.h>
7017int
7018main ()
7019{
7020printf("Hello")
7021  ;
7022  return 0;
7023}
7024_ACEOF
7025rm -f conftest.$ac_objext
7026if { (eval echo "$as_me:7026: \"$ac_compile\"") >&5
7027  (eval $ac_compile) 2>&5
7028  ac_status=$?
7029  echo "$as_me:7029: \$? = $ac_status" >&5
7030  (exit $ac_status); } &&
7031         { ac_try='test -s conftest.$ac_objext'
7032  { (eval echo "$as_me:7032: \"$ac_try\"") >&5
7033  (eval $ac_try) 2>&5
7034  ac_status=$?
7035  echo "$as_me:7035: \$? = $ac_status" >&5
7036  (exit $ac_status); }; }; then
7037  :
7038else
7039  echo "$as_me: failed program was:" >&5
7040cat conftest.$ac_ext >&5
7041cf_have_incdir=yes
7042fi
7043rm -f conftest.$ac_objext conftest.$ac_ext
7044			  CPPFLAGS=$cf_save_CPPFLAGS
7045			fi
7046		  fi
7047		fi
7048
7049		if test "$cf_have_incdir" = no ; then
7050		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
7051
7052echo "${as_me:-configure}:7052: testing adding $cf_add_incdir to include-path ..." 1>&5
7053
7054		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7055
7056		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7057		  test "$cf_top_incdir" = "$cf_add_incdir" && break
7058		  cf_add_incdir="$cf_top_incdir"
7059		else
7060		  break
7061		fi
7062	  fi
7063	done
7064  done
7065fi
7066
7067    if test -n "$cf_cv_library_file_iconv" ; then
7068      LIBICONV="-liconv"
7069
7070if test -n "$cf_cv_library_path_iconv" ; then
7071  for cf_add_libdir in $cf_cv_library_path_iconv
7072  do
7073    if test $cf_add_libdir = /usr/lib ; then
7074      :
7075    elif test -d $cf_add_libdir
7076    then
7077      cf_have_libdir=no
7078      if test -n "$LDFLAGS$LIBS" ; then
7079        # a loop is needed to ensure we can add subdirs of existing dirs
7080        for cf_test_libdir in $LDFLAGS $LIBS ; do
7081          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7082            cf_have_libdir=yes; break
7083          fi
7084        done
7085      fi
7086      if test "$cf_have_libdir" = no ; then
7087        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
7088
7089echo "${as_me:-configure}:7089: testing adding $cf_add_libdir to library-path ..." 1>&5
7090
7091        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7092      fi
7093    fi
7094  done
7095fi
7096
7097    fi
7098  fi
7099
7100  echo "$as_me:7100: checking for nl_langinfo and CODESET" >&5
7101echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7102if test "${am_cv_langinfo_codeset+set}" = set; then
7103  echo $ECHO_N "(cached) $ECHO_C" >&6
7104else
7105  cat >conftest.$ac_ext <<_ACEOF
7106#line 7106 "configure"
7107#include "confdefs.h"
7108#include <langinfo.h>
7109int
7110main ()
7111{
7112char* cs = nl_langinfo(CODESET);
7113  ;
7114  return 0;
7115}
7116_ACEOF
7117rm -f conftest.$ac_objext conftest$ac_exeext
7118if { (eval echo "$as_me:7118: \"$ac_link\"") >&5
7119  (eval $ac_link) 2>&5
7120  ac_status=$?
7121  echo "$as_me:7121: \$? = $ac_status" >&5
7122  (exit $ac_status); } &&
7123         { ac_try='test -s conftest$ac_exeext'
7124  { (eval echo "$as_me:7124: \"$ac_try\"") >&5
7125  (eval $ac_try) 2>&5
7126  ac_status=$?
7127  echo "$as_me:7127: \$? = $ac_status" >&5
7128  (exit $ac_status); }; }; then
7129  am_cv_langinfo_codeset=yes
7130else
7131  echo "$as_me: failed program was:" >&5
7132cat conftest.$ac_ext >&5
7133am_cv_langinfo_codeset=no
7134fi
7135rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7136
7137fi
7138echo "$as_me:7138: result: $am_cv_langinfo_codeset" >&5
7139echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7140  if test $am_cv_langinfo_codeset = yes; then
7141
7142cat >>confdefs.h <<\EOF
7143#define HAVE_LANGINFO_CODESET 1
7144EOF
7145
7146  fi
7147
7148   if test $ac_cv_header_locale_h = yes; then
7149    echo "$as_me:7149: checking for LC_MESSAGES" >&5
7150echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
7151if test "${am_cv_val_LC_MESSAGES+set}" = set; then
7152  echo $ECHO_N "(cached) $ECHO_C" >&6
7153else
7154  cat >conftest.$ac_ext <<_ACEOF
7155#line 7155 "configure"
7156#include "confdefs.h"
7157#include <locale.h>
7158int
7159main ()
7160{
7161return LC_MESSAGES
7162  ;
7163  return 0;
7164}
7165_ACEOF
7166rm -f conftest.$ac_objext conftest$ac_exeext
7167if { (eval echo "$as_me:7167: \"$ac_link\"") >&5
7168  (eval $ac_link) 2>&5
7169  ac_status=$?
7170  echo "$as_me:7170: \$? = $ac_status" >&5
7171  (exit $ac_status); } &&
7172         { ac_try='test -s conftest$ac_exeext'
7173  { (eval echo "$as_me:7173: \"$ac_try\"") >&5
7174  (eval $ac_try) 2>&5
7175  ac_status=$?
7176  echo "$as_me:7176: \$? = $ac_status" >&5
7177  (exit $ac_status); }; }; then
7178  am_cv_val_LC_MESSAGES=yes
7179else
7180  echo "$as_me: failed program was:" >&5
7181cat conftest.$ac_ext >&5
7182am_cv_val_LC_MESSAGES=no
7183fi
7184rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7185fi
7186echo "$as_me:7186: result: $am_cv_val_LC_MESSAGES" >&5
7187echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
7188    if test $am_cv_val_LC_MESSAGES = yes; then
7189
7190cat >>confdefs.h <<\EOF
7191#define HAVE_LC_MESSAGES 1
7192EOF
7193
7194    fi
7195  fi
7196   echo "$as_me:7196: checking whether NLS is requested" >&5
7197echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
7198
7199# Check whether --enable-nls or --disable-nls was given.
7200if test "${enable_nls+set}" = set; then
7201  enableval="$enable_nls"
7202  USE_NLS=$enableval
7203else
7204  USE_NLS=no
7205fi;
7206  echo "$as_me:7206: result: $USE_NLS" >&5
7207echo "${ECHO_T}$USE_NLS" >&6
7208
7209  BUILD_INCLUDED_LIBINTL=no
7210  USE_INCLUDED_LIBINTL=no
7211  INTLLIBS=
7212
7213    if test "$USE_NLS" = "yes"; then
7214
7215cat >>confdefs.h <<\EOF
7216#define ENABLE_NLS 1
7217EOF
7218
7219    echo "$as_me:7219: checking whether included gettext is requested" >&5
7220echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
7221
7222# Check whether --with-included-gettext or --without-included-gettext was given.
7223if test "${with_included_gettext+set}" = set; then
7224  withval="$with_included_gettext"
7225  nls_cv_force_use_gnu_gettext=$withval
7226else
7227  nls_cv_force_use_gnu_gettext=no
7228fi;
7229    echo "$as_me:7229: result: $nls_cv_force_use_gnu_gettext" >&5
7230echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
7231
7232    nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
7233    if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
7234                        CATOBJEXT=NONE
7235
7236      cf_save_LIBS_1="$LIBS"
7237      LIBS="$LIBICONV $LIBS"
7238      echo "$as_me:7238: checking for libintl.h and gettext()" >&5
7239echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
7240if test "${cf_cv_func_gettext+set}" = set; then
7241  echo $ECHO_N "(cached) $ECHO_C" >&6
7242else
7243
7244# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7245# will be set on completion of the AC_TRY_LINK below.
7246cf_cv_header_path_intl=
7247cf_cv_library_path_intl=
7248
7249echo "${as_me:-configure}:7249: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
7250
7251cf_save_LIBS="$LIBS"
7252
7253cat >conftest.$ac_ext <<_ACEOF
7254#line 7254 "configure"
7255#include "confdefs.h"
7256
7257#include <libintl.h>
7258extern int _nl_msg_cat_cntr;
7259
7260int
7261main ()
7262{
7263
7264    bindtextdomain ("", "");
7265    return (int) gettext ("")
7266
7267             + _nl_msg_cat_cntr
7268
7269  ;
7270  return 0;
7271}
7272_ACEOF
7273rm -f conftest.$ac_objext conftest$ac_exeext
7274if { (eval echo "$as_me:7274: \"$ac_link\"") >&5
7275  (eval $ac_link) 2>&5
7276  ac_status=$?
7277  echo "$as_me:7277: \$? = $ac_status" >&5
7278  (exit $ac_status); } &&
7279         { ac_try='test -s conftest$ac_exeext'
7280  { (eval echo "$as_me:7280: \"$ac_try\"") >&5
7281  (eval $ac_try) 2>&5
7282  ac_status=$?
7283  echo "$as_me:7283: \$? = $ac_status" >&5
7284  (exit $ac_status); }; }; then
7285
7286	cf_cv_find_linkage_intl=yes
7287	cf_cv_header_path_intl=/usr/include
7288	cf_cv_library_path_intl=/usr/lib
7289
7290else
7291  echo "$as_me: failed program was:" >&5
7292cat conftest.$ac_ext >&5
7293
7294LIBS="-lintl  $cf_save_LIBS"
7295
7296cat >conftest.$ac_ext <<_ACEOF
7297#line 7297 "configure"
7298#include "confdefs.h"
7299
7300#include <libintl.h>
7301extern int _nl_msg_cat_cntr;
7302
7303int
7304main ()
7305{
7306
7307    bindtextdomain ("", "");
7308    return (int) gettext ("")
7309
7310             + _nl_msg_cat_cntr
7311
7312  ;
7313  return 0;
7314}
7315_ACEOF
7316rm -f conftest.$ac_objext conftest$ac_exeext
7317if { (eval echo "$as_me:7317: \"$ac_link\"") >&5
7318  (eval $ac_link) 2>&5
7319  ac_status=$?
7320  echo "$as_me:7320: \$? = $ac_status" >&5
7321  (exit $ac_status); } &&
7322         { ac_try='test -s conftest$ac_exeext'
7323  { (eval echo "$as_me:7323: \"$ac_try\"") >&5
7324  (eval $ac_try) 2>&5
7325  ac_status=$?
7326  echo "$as_me:7326: \$? = $ac_status" >&5
7327  (exit $ac_status); }; }; then
7328
7329	cf_cv_find_linkage_intl=yes
7330	cf_cv_header_path_intl=/usr/include
7331	cf_cv_library_path_intl=/usr/lib
7332	cf_cv_library_file_intl="-lintl"
7333
7334else
7335  echo "$as_me: failed program was:" >&5
7336cat conftest.$ac_ext >&5
7337
7338	cf_cv_find_linkage_intl=no
7339	LIBS="$cf_save_LIBS"
7340
7341    test -n "$verbose" && echo "	find linkage for intl library" 1>&6
7342
7343echo "${as_me:-configure}:7343: testing find linkage for intl library ..." 1>&5
7344
7345echo "${as_me:-configure}:7345: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
7346
7347    cf_save_CPPFLAGS="$CPPFLAGS"
7348    cf_test_CPPFLAGS="$CPPFLAGS"
7349
7350cf_search=
7351
7352# collect the current set of include-directories from compiler flags
7353cf_header_path_list=""
7354if test -n "${CFLAGS}${CPPFLAGS}" ; then
7355	for cf_header_path in $CPPFLAGS $CFLAGS
7356	do
7357		case $cf_header_path in #(vi
7358		-I*)
7359			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7360
7361test "$cf_header_path" != "NONE" && \
7362test -d "$cf_header_path" && \
7363 {
7364	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
7365	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7366	test -d $cf_header_path/include/intl &&       cf_search="$cf_search $cf_header_path/include/intl"
7367	test -d $cf_header_path/include/intl/include &&    cf_search="$cf_search $cf_header_path/include/intl/include"
7368	test -d $cf_header_path/intl/include &&       cf_search="$cf_search $cf_header_path/intl/include"
7369	test -d $cf_header_path/intl/include/intl &&    cf_search="$cf_search $cf_header_path/intl/include/intl"
7370}
7371
7372			cf_header_path_list="$cf_header_path_list $cf_search"
7373			;;
7374		esac
7375	done
7376fi
7377
7378# add the variations for the package we are looking for
7379
7380cf_search=
7381
7382test "/usr" != "$prefix" && \
7383test -d "/usr" && \
7384(test $prefix = NONE || test "/usr" != "$prefix") && {
7385	test -n "$verbose" && echo "	... testing for include-directories under /usr"
7386	test -d /usr/include &&          cf_search="$cf_search /usr/include"
7387	test -d /usr/include/intl &&       cf_search="$cf_search /usr/include/intl"
7388	test -d /usr/include/intl/include &&    cf_search="$cf_search /usr/include/intl/include"
7389	test -d /usr/intl/include &&       cf_search="$cf_search /usr/intl/include"
7390	test -d /usr/intl/include/intl &&    cf_search="$cf_search /usr/intl/include/intl"
7391}
7392
7393test "$prefix" != "NONE" && \
7394test -d "$prefix" && \
7395 {
7396	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
7397	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7398	test -d $prefix/include/intl &&       cf_search="$cf_search $prefix/include/intl"
7399	test -d $prefix/include/intl/include &&    cf_search="$cf_search $prefix/include/intl/include"
7400	test -d $prefix/intl/include &&       cf_search="$cf_search $prefix/intl/include"
7401	test -d $prefix/intl/include/intl &&    cf_search="$cf_search $prefix/intl/include/intl"
7402}
7403
7404test "/usr/local" != "$prefix" && \
7405test -d "/usr/local" && \
7406(test $prefix = NONE || test "/usr/local" != "$prefix") && {
7407	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
7408	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7409	test -d /usr/local/include/intl &&       cf_search="$cf_search /usr/local/include/intl"
7410	test -d /usr/local/include/intl/include &&    cf_search="$cf_search /usr/local/include/intl/include"
7411	test -d /usr/local/intl/include &&       cf_search="$cf_search /usr/local/intl/include"
7412	test -d /usr/local/intl/include/intl &&    cf_search="$cf_search /usr/local/intl/include/intl"
7413}
7414
7415test "/opt" != "$prefix" && \
7416test -d "/opt" && \
7417(test $prefix = NONE || test "/opt" != "$prefix") && {
7418	test -n "$verbose" && echo "	... testing for include-directories under /opt"
7419	test -d /opt/include &&          cf_search="$cf_search /opt/include"
7420	test -d /opt/include/intl &&       cf_search="$cf_search /opt/include/intl"
7421	test -d /opt/include/intl/include &&    cf_search="$cf_search /opt/include/intl/include"
7422	test -d /opt/intl/include &&       cf_search="$cf_search /opt/intl/include"
7423	test -d /opt/intl/include/intl &&    cf_search="$cf_search /opt/intl/include/intl"
7424}
7425
7426test "$HOME" != "$prefix" && \
7427test -d "$HOME" && \
7428(test $prefix = NONE || test "$HOME" != "$prefix") && {
7429	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
7430	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7431	test -d $HOME/include/intl &&       cf_search="$cf_search $HOME/include/intl"
7432	test -d $HOME/include/intl/include &&    cf_search="$cf_search $HOME/include/intl/include"
7433	test -d $HOME/intl/include &&       cf_search="$cf_search $HOME/intl/include"
7434	test -d $HOME/intl/include/intl &&    cf_search="$cf_search $HOME/intl/include/intl"
7435}
7436
7437test "$includedir" != NONE && \
7438test "$includedir" != "/usr/include" && \
7439test -d "$includedir" && {
7440	test -d $includedir &&    cf_search="$cf_search $includedir"
7441	test -d $includedir/intl && cf_search="$cf_search $includedir/intl"
7442}
7443
7444test "$oldincludedir" != NONE && \
7445test "$oldincludedir" != "/usr/include" && \
7446test -d "$oldincludedir" && {
7447	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7448	test -d $oldincludedir/intl && cf_search="$cf_search $oldincludedir/intl"
7449}
7450
7451cf_search="$cf_search $cf_header_path_list"
7452
7453    for cf_cv_header_path_intl in $cf_search
7454    do
7455      if test -d $cf_cv_header_path_intl ; then
7456        test -n "$verbose" && echo "	... testing $cf_cv_header_path_intl" 1>&6
7457
7458echo "${as_me:-configure}:7458: testing ... testing $cf_cv_header_path_intl ..." 1>&5
7459
7460        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_intl"
7461        cat >conftest.$ac_ext <<_ACEOF
7462#line 7462 "configure"
7463#include "confdefs.h"
7464
7465#include <libintl.h>
7466extern int _nl_msg_cat_cntr;
7467
7468int
7469main ()
7470{
7471
7472    bindtextdomain ("", "");
7473    return (int) gettext ("")
7474
7475             + _nl_msg_cat_cntr
7476
7477  ;
7478  return 0;
7479}
7480_ACEOF
7481rm -f conftest.$ac_objext
7482if { (eval echo "$as_me:7482: \"$ac_compile\"") >&5
7483  (eval $ac_compile) 2>&5
7484  ac_status=$?
7485  echo "$as_me:7485: \$? = $ac_status" >&5
7486  (exit $ac_status); } &&
7487         { ac_try='test -s conftest.$ac_objext'
7488  { (eval echo "$as_me:7488: \"$ac_try\"") >&5
7489  (eval $ac_try) 2>&5
7490  ac_status=$?
7491  echo "$as_me:7491: \$? = $ac_status" >&5
7492  (exit $ac_status); }; }; then
7493
7494            test -n "$verbose" && echo "	... found intl headers in $cf_cv_header_path_intl" 1>&6
7495
7496echo "${as_me:-configure}:7496: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
7497
7498            cf_cv_find_linkage_intl=maybe
7499            cf_test_CPPFLAGS="$CPPFLAGS"
7500            break
7501else
7502  echo "$as_me: failed program was:" >&5
7503cat conftest.$ac_ext >&5
7504
7505            CPPFLAGS="$cf_save_CPPFLAGS"
7506
7507fi
7508rm -f conftest.$ac_objext conftest.$ac_ext
7509      fi
7510    done
7511
7512    if test "$cf_cv_find_linkage_intl" = maybe ; then
7513
7514echo "${as_me:-configure}:7514: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
7515
7516      cf_save_LIBS="$LIBS"
7517      cf_save_LDFLAGS="$LDFLAGS"
7518
7519      if test "$cf_cv_find_linkage_intl" != yes ; then
7520
7521cf_search=
7522cf_library_path_list=""
7523if test -n "${LDFLAGS}${LIBS}" ; then
7524	for cf_library_path in $LDFLAGS $LIBS
7525	do
7526		case $cf_library_path in #(vi
7527		-L*)
7528			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7529
7530test "$cf_library_path" != "NONE" && \
7531test -d "$cf_library_path" && \
7532 {
7533	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
7534	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7535	test -d $cf_library_path/lib/intl &&       cf_search="$cf_search $cf_library_path/lib/intl"
7536	test -d $cf_library_path/lib/intl/lib &&    cf_search="$cf_search $cf_library_path/lib/intl/lib"
7537	test -d $cf_library_path/intl/lib &&       cf_search="$cf_search $cf_library_path/intl/lib"
7538	test -d $cf_library_path/intl/lib/intl &&    cf_search="$cf_search $cf_library_path/intl/lib/intl"
7539}
7540
7541			cf_library_path_list="$cf_library_path_list $cf_search"
7542			;;
7543		esac
7544	done
7545fi
7546
7547cf_search=
7548
7549test "/usr" != "$prefix" && \
7550test -d "/usr" && \
7551(test $prefix = NONE || test "/usr" != "$prefix") && {
7552	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
7553	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7554	test -d /usr/lib/intl &&       cf_search="$cf_search /usr/lib/intl"
7555	test -d /usr/lib/intl/lib &&    cf_search="$cf_search /usr/lib/intl/lib"
7556	test -d /usr/intl/lib &&       cf_search="$cf_search /usr/intl/lib"
7557	test -d /usr/intl/lib/intl &&    cf_search="$cf_search /usr/intl/lib/intl"
7558}
7559
7560test "$prefix" != "NONE" && \
7561test -d "$prefix" && \
7562 {
7563	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
7564	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7565	test -d $prefix/lib/intl &&       cf_search="$cf_search $prefix/lib/intl"
7566	test -d $prefix/lib/intl/lib &&    cf_search="$cf_search $prefix/lib/intl/lib"
7567	test -d $prefix/intl/lib &&       cf_search="$cf_search $prefix/intl/lib"
7568	test -d $prefix/intl/lib/intl &&    cf_search="$cf_search $prefix/intl/lib/intl"
7569}
7570
7571test "/usr/local" != "$prefix" && \
7572test -d "/usr/local" && \
7573(test $prefix = NONE || test "/usr/local" != "$prefix") && {
7574	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
7575	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7576	test -d /usr/local/lib/intl &&       cf_search="$cf_search /usr/local/lib/intl"
7577	test -d /usr/local/lib/intl/lib &&    cf_search="$cf_search /usr/local/lib/intl/lib"
7578	test -d /usr/local/intl/lib &&       cf_search="$cf_search /usr/local/intl/lib"
7579	test -d /usr/local/intl/lib/intl &&    cf_search="$cf_search /usr/local/intl/lib/intl"
7580}
7581
7582test "/opt" != "$prefix" && \
7583test -d "/opt" && \
7584(test $prefix = NONE || test "/opt" != "$prefix") && {
7585	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
7586	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7587	test -d /opt/lib/intl &&       cf_search="$cf_search /opt/lib/intl"
7588	test -d /opt/lib/intl/lib &&    cf_search="$cf_search /opt/lib/intl/lib"
7589	test -d /opt/intl/lib &&       cf_search="$cf_search /opt/intl/lib"
7590	test -d /opt/intl/lib/intl &&    cf_search="$cf_search /opt/intl/lib/intl"
7591}
7592
7593test "$HOME" != "$prefix" && \
7594test -d "$HOME" && \
7595(test $prefix = NONE || test "$HOME" != "$prefix") && {
7596	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
7597	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7598	test -d $HOME/lib/intl &&       cf_search="$cf_search $HOME/lib/intl"
7599	test -d $HOME/lib/intl/lib &&    cf_search="$cf_search $HOME/lib/intl/lib"
7600	test -d $HOME/intl/lib &&       cf_search="$cf_search $HOME/intl/lib"
7601	test -d $HOME/intl/lib/intl &&    cf_search="$cf_search $HOME/intl/lib/intl"
7602}
7603
7604cf_search="$cf_library_path_list $cf_search"
7605
7606        for cf_cv_library_path_intl in $cf_search
7607        do
7608          if test -d $cf_cv_library_path_intl ; then
7609            test -n "$verbose" && echo "	... testing $cf_cv_library_path_intl" 1>&6
7610
7611echo "${as_me:-configure}:7611: testing ... testing $cf_cv_library_path_intl ..." 1>&5
7612
7613            CPPFLAGS="$cf_test_CPPFLAGS"
7614            LIBS="-lintl  $cf_save_LIBS"
7615            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
7616            cat >conftest.$ac_ext <<_ACEOF
7617#line 7617 "configure"
7618#include "confdefs.h"
7619
7620#include <libintl.h>
7621extern int _nl_msg_cat_cntr;
7622
7623int
7624main ()
7625{
7626
7627    bindtextdomain ("", "");
7628    return (int) gettext ("")
7629
7630             + _nl_msg_cat_cntr
7631
7632  ;
7633  return 0;
7634}
7635_ACEOF
7636rm -f conftest.$ac_objext conftest$ac_exeext
7637if { (eval echo "$as_me:7637: \"$ac_link\"") >&5
7638  (eval $ac_link) 2>&5
7639  ac_status=$?
7640  echo "$as_me:7640: \$? = $ac_status" >&5
7641  (exit $ac_status); } &&
7642         { ac_try='test -s conftest$ac_exeext'
7643  { (eval echo "$as_me:7643: \"$ac_try\"") >&5
7644  (eval $ac_try) 2>&5
7645  ac_status=$?
7646  echo "$as_me:7646: \$? = $ac_status" >&5
7647  (exit $ac_status); }; }; then
7648
7649                test -n "$verbose" && echo "	... found intl library in $cf_cv_library_path_intl" 1>&6
7650
7651echo "${as_me:-configure}:7651: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
7652
7653                cf_cv_find_linkage_intl=yes
7654                cf_cv_library_file_intl="-lintl"
7655                break
7656else
7657  echo "$as_me: failed program was:" >&5
7658cat conftest.$ac_ext >&5
7659
7660                CPPFLAGS="$cf_save_CPPFLAGS"
7661                LIBS="$cf_save_LIBS"
7662                LDFLAGS="$cf_save_LDFLAGS"
7663
7664fi
7665rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7666          fi
7667        done
7668        CPPFLAGS="$cf_save_CPPFLAGS"
7669        LDFLAGS="$cf_save_LDFLAGS"
7670      fi
7671
7672    else
7673      cf_cv_find_linkage_intl=no
7674    fi
7675
7676fi
7677rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7678
7679fi
7680rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7681
7682LIBS="$cf_save_LIBS"
7683
7684if test "$cf_cv_find_linkage_intl" = yes ; then
7685cf_cv_func_gettext=yes
7686else
7687cf_cv_func_gettext=no
7688fi
7689
7690fi
7691echo "$as_me:7691: result: $cf_cv_func_gettext" >&5
7692echo "${ECHO_T}$cf_cv_func_gettext" >&6
7693      LIBS="$cf_save_LIBS_1"
7694
7695      if test "$cf_cv_func_gettext" = yes ; then
7696
7697cat >>confdefs.h <<\EOF
7698#define HAVE_LIBINTL_H 1
7699EOF
7700
7701                                        if test "$PACKAGE" != gettext; then
7702
7703cat >>confdefs.h <<\EOF
7704#define HAVE_GETTEXT 1
7705EOF
7706
7707if test -n "$cf_cv_header_path_intl" ; then
7708  for cf_add_incdir in $cf_cv_header_path_intl
7709  do
7710	while test $cf_add_incdir != /usr/include
7711	do
7712	  if test -d $cf_add_incdir
7713	  then
7714		cf_have_incdir=no
7715		if test -n "$CFLAGS$CPPFLAGS" ; then
7716		  # a loop is needed to ensure we can add subdirs of existing dirs
7717		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7718			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7719			  cf_have_incdir=yes; break
7720			fi
7721		  done
7722		fi
7723
7724		if test "$cf_have_incdir" = no ; then
7725		  if test "$cf_add_incdir" = /usr/local/include ; then
7726			if test "$GCC" = yes
7727			then
7728			  cf_save_CPPFLAGS=$CPPFLAGS
7729			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7730			  cat >conftest.$ac_ext <<_ACEOF
7731#line 7731 "configure"
7732#include "confdefs.h"
7733#include <stdio.h>
7734int
7735main ()
7736{
7737printf("Hello")
7738  ;
7739  return 0;
7740}
7741_ACEOF
7742rm -f conftest.$ac_objext
7743if { (eval echo "$as_me:7743: \"$ac_compile\"") >&5
7744  (eval $ac_compile) 2>&5
7745  ac_status=$?
7746  echo "$as_me:7746: \$? = $ac_status" >&5
7747  (exit $ac_status); } &&
7748         { ac_try='test -s conftest.$ac_objext'
7749  { (eval echo "$as_me:7749: \"$ac_try\"") >&5
7750  (eval $ac_try) 2>&5
7751  ac_status=$?
7752  echo "$as_me:7752: \$? = $ac_status" >&5
7753  (exit $ac_status); }; }; then
7754  :
7755else
7756  echo "$as_me: failed program was:" >&5
7757cat conftest.$ac_ext >&5
7758cf_have_incdir=yes
7759fi
7760rm -f conftest.$ac_objext conftest.$ac_ext
7761			  CPPFLAGS=$cf_save_CPPFLAGS
7762			fi
7763		  fi
7764		fi
7765
7766		if test "$cf_have_incdir" = no ; then
7767		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
7768
7769echo "${as_me:-configure}:7769: testing adding $cf_add_incdir to include-path ..." 1>&5
7770
7771		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7772
7773		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7774		  test "$cf_top_incdir" = "$cf_add_incdir" && break
7775		  cf_add_incdir="$cf_top_incdir"
7776		else
7777		  break
7778		fi
7779	  fi
7780	done
7781  done
7782fi
7783
7784          if test -n "$cf_cv_library_file_intl" ; then
7785                                                INTLLIBS="$cf_cv_library_file_intl $LIBICONV"
7786
7787if test -n "$cf_cv_library_path_intl" ; then
7788  for cf_add_libdir in $cf_cv_library_path_intl
7789  do
7790    if test $cf_add_libdir = /usr/lib ; then
7791      :
7792    elif test -d $cf_add_libdir
7793    then
7794      cf_have_libdir=no
7795      if test -n "$LDFLAGS$LIBS" ; then
7796        # a loop is needed to ensure we can add subdirs of existing dirs
7797        for cf_test_libdir in $LDFLAGS $LIBS ; do
7798          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7799            cf_have_libdir=yes; break
7800          fi
7801        done
7802      fi
7803      if test "$cf_have_libdir" = no ; then
7804        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
7805
7806echo "${as_me:-configure}:7806: testing adding $cf_add_libdir to library-path ..." 1>&5
7807
7808        INTLLIBS="-L$cf_add_libdir $INTLLIBS"
7809      fi
7810    fi
7811  done
7812fi
7813
7814          fi
7815
7816          gt_save_LIBS="$LIBS"
7817          LIBS="$LIBS $INTLLIBS"
7818
7819for ac_func in dcgettext
7820do
7821as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7822echo "$as_me:7822: checking for $ac_func" >&5
7823echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7824if eval "test \"\${$as_ac_var+set}\" = set"; then
7825  echo $ECHO_N "(cached) $ECHO_C" >&6
7826else
7827  cat >conftest.$ac_ext <<_ACEOF
7828#line 7828 "configure"
7829#include "confdefs.h"
7830/* System header to define __stub macros and hopefully few prototypes,
7831    which can conflict with char $ac_func (); below.  */
7832#include <assert.h>
7833/* Override any gcc2 internal prototype to avoid an error.  */
7834#ifdef __cplusplus
7835extern "C"
7836#endif
7837/* We use char because int might match the return type of a gcc2
7838   builtin and then its argument prototype would still apply.  */
7839char $ac_func ();
7840char (*f) ();
7841
7842int
7843main ()
7844{
7845/* The GNU C library defines this for functions which it implements
7846    to always fail with ENOSYS.  Some functions are actually named
7847    something starting with __ and the normal name is an alias.  */
7848#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7849choke me
7850#else
7851f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7852#endif
7853
7854  ;
7855  return 0;
7856}
7857_ACEOF
7858rm -f conftest.$ac_objext conftest$ac_exeext
7859if { (eval echo "$as_me:7859: \"$ac_link\"") >&5
7860  (eval $ac_link) 2>&5
7861  ac_status=$?
7862  echo "$as_me:7862: \$? = $ac_status" >&5
7863  (exit $ac_status); } &&
7864         { ac_try='test -s conftest$ac_exeext'
7865  { (eval echo "$as_me:7865: \"$ac_try\"") >&5
7866  (eval $ac_try) 2>&5
7867  ac_status=$?
7868  echo "$as_me:7868: \$? = $ac_status" >&5
7869  (exit $ac_status); }; }; then
7870  eval "$as_ac_var=yes"
7871else
7872  echo "$as_me: failed program was:" >&5
7873cat conftest.$ac_ext >&5
7874eval "$as_ac_var=no"
7875fi
7876rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7877fi
7878echo "$as_me:7878: result: `eval echo '${'$as_ac_var'}'`" >&5
7879echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7880if test `eval echo '${'$as_ac_var'}'` = yes; then
7881  cat >>confdefs.h <<EOF
7882#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7883EOF
7884
7885fi
7886done
7887
7888          LIBS="$gt_save_LIBS"
7889
7890                    # Extract the first word of "msgfmt", so it can be a program name with args.
7891
7892set dummy msgfmt; ac_word=$2
7893echo "$as_me:7893: checking for $ac_word" >&5
7894echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7895if test "${ac_cv_path_MSGFMT+set}" = set; then
7896  echo $ECHO_N "(cached) $ECHO_C" >&6
7897else
7898  case "$MSGFMT" in
7899  [\\/]*|?:[\\/]*)
7900  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7901  ;;
7902  *)
7903  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7904  for ac_dir in $PATH; do
7905    test -z "$ac_dir" && ac_dir=.
7906    if test -f $ac_dir/$ac_word$ac_exeext; then
7907      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
7908	ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
7909	break
7910      fi
7911    fi
7912  done
7913  IFS="$ac_save_ifs"
7914  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
7915  ;;
7916esac
7917fi
7918MSGFMT="$ac_cv_path_MSGFMT"
7919if test "$MSGFMT" != ":"; then
7920  echo "$as_me:7920: result: $MSGFMT" >&5
7921echo "${ECHO_T}$MSGFMT" >&6
7922else
7923  echo "$as_me:7923: result: no" >&5
7924echo "${ECHO_T}no" >&6
7925fi
7926
7927          # Extract the first word of "gmsgfmt", so it can be a program name with args.
7928set dummy gmsgfmt; ac_word=$2
7929echo "$as_me:7929: checking for $ac_word" >&5
7930echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7931if test "${ac_cv_path_GMSGFMT+set}" = set; then
7932  echo $ECHO_N "(cached) $ECHO_C" >&6
7933else
7934  case $GMSGFMT in
7935  [\\/]* | ?:[\\/]*)
7936  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7937  ;;
7938  *)
7939  ac_save_IFS=$IFS; IFS=$ac_path_separator
7940ac_dummy="$PATH"
7941for ac_dir in $ac_dummy; do
7942  IFS=$ac_save_IFS
7943  test -z "$ac_dir" && ac_dir=.
7944  if $as_executable_p "$ac_dir/$ac_word"; then
7945   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7946   echo "$as_me:7946: found $ac_dir/$ac_word" >&5
7947   break
7948fi
7949done
7950
7951  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7952  ;;
7953esac
7954fi
7955GMSGFMT=$ac_cv_path_GMSGFMT
7956
7957if test -n "$GMSGFMT"; then
7958  echo "$as_me:7958: result: $GMSGFMT" >&5
7959echo "${ECHO_T}$GMSGFMT" >&6
7960else
7961  echo "$as_me:7961: result: no" >&5
7962echo "${ECHO_T}no" >&6
7963fi
7964
7965                    # Extract the first word of "xgettext", so it can be a program name with args.
7966
7967set dummy xgettext; ac_word=$2
7968echo "$as_me:7968: checking for $ac_word" >&5
7969echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7970if test "${ac_cv_path_XGETTEXT+set}" = set; then
7971  echo $ECHO_N "(cached) $ECHO_C" >&6
7972else
7973  case "$XGETTEXT" in
7974  [\\/]*|?:[\\/]*)
7975  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7976  ;;
7977  *)
7978  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7979  for ac_dir in $PATH; do
7980    test -z "$ac_dir" && ac_dir=.
7981    if test -f $ac_dir/$ac_word$ac_exeext; then
7982      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
7983	ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
7984	break
7985      fi
7986    fi
7987  done
7988  IFS="$ac_save_ifs"
7989  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7990  ;;
7991esac
7992fi
7993XGETTEXT="$ac_cv_path_XGETTEXT"
7994if test "$XGETTEXT" != ":"; then
7995  echo "$as_me:7995: result: $XGETTEXT" >&5
7996echo "${ECHO_T}$XGETTEXT" >&6
7997else
7998  echo "$as_me:7998: result: no" >&5
7999echo "${ECHO_T}no" >&6
8000fi
8001
8002          CATOBJEXT=.gmo
8003        fi
8004      fi
8005
8006      if test "$CATOBJEXT" = "NONE"; then
8007                        nls_cv_use_gnu_gettext=yes
8008      fi
8009    fi
8010
8011    if test "$nls_cv_use_gnu_gettext" = "yes"; then
8012      if test ! -d $srcdir/intl ; then
8013        { { echo "$as_me:8013: error: no NLS library is packaged with this application" >&5
8014echo "$as_me: error: no NLS library is packaged with this application" >&2;}
8015   { (exit 1); exit 1; }; }
8016      fi
8017            INTLOBJS="\$(GETTOBJS)"
8018      # Extract the first word of "msgfmt", so it can be a program name with args.
8019
8020set dummy msgfmt; ac_word=$2
8021echo "$as_me:8021: checking for $ac_word" >&5
8022echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8023if test "${ac_cv_path_MSGFMT+set}" = set; then
8024  echo $ECHO_N "(cached) $ECHO_C" >&6
8025else
8026  case "$MSGFMT" in
8027  [\\/]*|?:[\\/]*)
8028  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8029  ;;
8030  *)
8031  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8032  for ac_dir in $PATH; do
8033    test -z "$ac_dir" && ac_dir=.
8034    if test -f $ac_dir/$ac_word$ac_exeext; then
8035      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
8036	ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
8037	break
8038      fi
8039    fi
8040  done
8041  IFS="$ac_save_ifs"
8042  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
8043  ;;
8044esac
8045fi
8046MSGFMT="$ac_cv_path_MSGFMT"
8047if test "$MSGFMT" != ":"; then
8048  echo "$as_me:8048: result: $MSGFMT" >&5
8049echo "${ECHO_T}$MSGFMT" >&6
8050else
8051  echo "$as_me:8051: result: no" >&5
8052echo "${ECHO_T}no" >&6
8053fi
8054
8055      # Extract the first word of "gmsgfmt", so it can be a program name with args.
8056set dummy gmsgfmt; ac_word=$2
8057echo "$as_me:8057: checking for $ac_word" >&5
8058echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8059if test "${ac_cv_path_GMSGFMT+set}" = set; then
8060  echo $ECHO_N "(cached) $ECHO_C" >&6
8061else
8062  case $GMSGFMT in
8063  [\\/]* | ?:[\\/]*)
8064  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8065  ;;
8066  *)
8067  ac_save_IFS=$IFS; IFS=$ac_path_separator
8068ac_dummy="$PATH"
8069for ac_dir in $ac_dummy; do
8070  IFS=$ac_save_IFS
8071  test -z "$ac_dir" && ac_dir=.
8072  if $as_executable_p "$ac_dir/$ac_word"; then
8073   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
8074   echo "$as_me:8074: found $ac_dir/$ac_word" >&5
8075   break
8076fi
8077done
8078
8079  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8080  ;;
8081esac
8082fi
8083GMSGFMT=$ac_cv_path_GMSGFMT
8084
8085if test -n "$GMSGFMT"; then
8086  echo "$as_me:8086: result: $GMSGFMT" >&5
8087echo "${ECHO_T}$GMSGFMT" >&6
8088else
8089  echo "$as_me:8089: result: no" >&5
8090echo "${ECHO_T}no" >&6
8091fi
8092
8093      # Extract the first word of "xgettext", so it can be a program name with args.
8094
8095set dummy xgettext; ac_word=$2
8096echo "$as_me:8096: checking for $ac_word" >&5
8097echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8098if test "${ac_cv_path_XGETTEXT+set}" = set; then
8099  echo $ECHO_N "(cached) $ECHO_C" >&6
8100else
8101  case "$XGETTEXT" in
8102  [\\/]*|?:[\\/]*)
8103  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8104  ;;
8105  *)
8106  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8107  for ac_dir in $PATH; do
8108    test -z "$ac_dir" && ac_dir=.
8109    if test -f $ac_dir/$ac_word$ac_exeext; then
8110      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
8111	ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
8112	break
8113      fi
8114    fi
8115  done
8116  IFS="$ac_save_ifs"
8117  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8118  ;;
8119esac
8120fi
8121XGETTEXT="$ac_cv_path_XGETTEXT"
8122if test "$XGETTEXT" != ":"; then
8123  echo "$as_me:8123: result: $XGETTEXT" >&5
8124echo "${ECHO_T}$XGETTEXT" >&6
8125else
8126  echo "$as_me:8126: result: no" >&5
8127echo "${ECHO_T}no" >&6
8128fi
8129
8130      BUILD_INCLUDED_LIBINTL=yes
8131      USE_INCLUDED_LIBINTL=yes
8132      CATOBJEXT=.gmo
8133      INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
8134      LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
8135    fi
8136
8137            if test "$GMSGFMT" != ":"; then
8138                  if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
8139        : ;
8140      else
8141        echo "$as_me:8141: result: found msgfmt program is not GNU msgfmt; ignore it" >&5
8142echo "${ECHO_T}found msgfmt program is not GNU msgfmt; ignore it" >&6
8143        GMSGFMT=":"
8144      fi
8145    fi
8146
8147            if test "$XGETTEXT" != ":"; then
8148                      if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
8149        : ;
8150      else
8151        echo "$as_me:8151: result: found xgettext program is not GNU xgettext; ignore it" >&5
8152echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
8153        XGETTEXT=":"
8154      fi
8155    fi
8156
8157        POSUB=po
8158  fi
8159
8160  ac_config_commands="$ac_config_commands default-1"
8161
8162      if test "$PACKAGE" = gettext; then
8163    BUILD_INCLUDED_LIBINTL=yes
8164  fi
8165
8166                      if test "$nls_cv_use_gnu_gettext" = "yes"; then
8167    for ac_prog in bison
8168do
8169  # Extract the first word of "$ac_prog", so it can be a program name with args.
8170set dummy $ac_prog; ac_word=$2
8171echo "$as_me:8171: checking for $ac_word" >&5
8172echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8173if test "${ac_cv_prog_INTLBISON+set}" = set; then
8174  echo $ECHO_N "(cached) $ECHO_C" >&6
8175else
8176  if test -n "$INTLBISON"; then
8177  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
8178else
8179  ac_save_IFS=$IFS; IFS=$ac_path_separator
8180ac_dummy="$PATH"
8181for ac_dir in $ac_dummy; do
8182  IFS=$ac_save_IFS
8183  test -z "$ac_dir" && ac_dir=.
8184  $as_executable_p "$ac_dir/$ac_word" || continue
8185ac_cv_prog_INTLBISON="$ac_prog"
8186echo "$as_me:8186: found $ac_dir/$ac_word" >&5
8187break
8188done
8189
8190fi
8191fi
8192INTLBISON=$ac_cv_prog_INTLBISON
8193if test -n "$INTLBISON"; then
8194  echo "$as_me:8194: result: $INTLBISON" >&5
8195echo "${ECHO_T}$INTLBISON" >&6
8196else
8197  echo "$as_me:8197: result: no" >&5
8198echo "${ECHO_T}no" >&6
8199fi
8200
8201  test -n "$INTLBISON" && break
8202done
8203
8204    if test -z "$INTLBISON"; then
8205      ac_verc_fail=yes
8206    else
8207            echo "$as_me:8207: checking version of bison" >&5
8208echo $ECHO_N "checking version of bison... $ECHO_C" >&6
8209      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
8210      case $ac_prog_version in
8211        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
8212        1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
8213           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
8214        *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
8215      esac
8216    echo "$as_me:8216: result: $ac_prog_version" >&5
8217echo "${ECHO_T}$ac_prog_version" >&6
8218    fi
8219    if test $ac_verc_fail = yes; then
8220      INTLBISON=:
8221    fi
8222  fi
8223
8224        for lang in $ALL_LINGUAS; do
8225    GMOFILES="$GMOFILES $lang.gmo"
8226    POFILES="$POFILES $lang.po"
8227  done
8228
8229    nls_cv_header_intl=
8230  nls_cv_header_libgt=
8231
8232    DATADIRNAME=share
8233
8234    INSTOBJEXT=.mo
8235
8236    GENCAT=gencat
8237
8238   if test "x$CATOBJEXT" != "x"; then
8239     if test "x$ALL_LINGUAS" = "x"; then
8240       LINGUAS=
8241     else
8242       echo "$as_me:8242: checking for catalogs to be installed" >&5
8243echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
8244       NEW_LINGUAS=
8245       for presentlang in $ALL_LINGUAS; do
8246         useit=no
8247         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
8248           # Use the presentlang catalog if desiredlang is
8249           #   a. equal to presentlang, or
8250           #   b. a variant of presentlang (because in this case,
8251           #      presentlang can be used as a fallback for messages
8252           #      which are not translated in the desiredlang catalog).
8253           case "$desiredlang" in
8254             "$presentlang"*) useit=yes;;
8255           esac
8256         done
8257         if test $useit = yes; then
8258           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8259         fi
8260       done
8261       LINGUAS=$NEW_LINGUAS
8262       echo "$as_me:8262: result: $LINGUAS" >&5
8263echo "${ECHO_T}$LINGUAS" >&6
8264     fi
8265
8266          if test -n "$LINGUAS"; then
8267       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8268     fi
8269   fi
8270
8271      INTL_LIBTOOL_SUFFIX_PREFIX=
8272
8273if test "$USE_NLS" = yes ; then
8274
8275# Check whether --with-textdomain or --without-textdomain was given.
8276if test "${with_textdomain+set}" = set; then
8277  withval="$with_textdomain"
8278  NLS_TEXTDOMAIN=$withval
8279else
8280  NLS_TEXTDOMAIN=$PACKAGE
8281fi;
8282
8283cat >>confdefs.h <<EOF
8284#define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
8285EOF
8286
8287fi
8288
8289INTLDIR_MAKE=
8290MSG_DIR_MAKE=
8291SUB_MAKEFILE=
8292
8293cf_makefile=makefile
8294
8295use_our_messages=no
8296if test "$USE_NLS" = yes ; then
8297if test -d $srcdir/po ; then
8298echo "$as_me:8298: checking if we should use included message-library" >&5
8299echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
8300
8301# Check whether --enable-included-msgs or --disable-included-msgs was given.
8302if test "${enable_included_msgs+set}" = set; then
8303  enableval="$enable_included_msgs"
8304  use_our_messages=$enableval
8305else
8306  use_our_messages=yes
8307fi;
8308fi
8309echo "$as_me:8309: result: $use_our_messages" >&5
8310echo "${ECHO_T}$use_our_messages" >&6
8311fi
8312
8313MSG_DIR_MAKE="#"
8314if test "$use_our_messages" = yes
8315then
8316	SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
8317	MSG_DIR_MAKE=
8318fi
8319
8320if test "$USE_INCLUDED_LIBINTL" = yes ; then
8321        if test "$nls_cv_force_use_gnu_gettext" = yes ; then
8322		:
8323	elif test "$nls_cv_use_gnu_gettext" = yes ; then
8324		:
8325	else
8326		INTLDIR_MAKE="#"
8327	fi
8328	if test -z "$INTLDIR_MAKE"; then
8329
8330cat >>confdefs.h <<\EOF
8331#define HAVE_LIBGETTEXT_H 1
8332EOF
8333
8334		for cf_makefile in \
8335			$srcdir/intl/Makefile.in \
8336			$srcdir/intl/makefile.in
8337		do
8338			if test -f "$cf_makefile" ; then
8339				SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf_makefile}"
8340				break
8341			fi
8342		done
8343	fi
8344else
8345	INTLDIR_MAKE="#"
8346	if test "$USE_NLS" = yes ; then
8347
8348for ac_header in libintl.h
8349do
8350as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8351echo "$as_me:8351: checking for $ac_header" >&5
8352echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8353if eval "test \"\${$as_ac_Header+set}\" = set"; then
8354  echo $ECHO_N "(cached) $ECHO_C" >&6
8355else
8356  cat >conftest.$ac_ext <<_ACEOF
8357#line 8357 "configure"
8358#include "confdefs.h"
8359#include <$ac_header>
8360_ACEOF
8361if { (eval echo "$as_me:8361: \"$ac_cpp conftest.$ac_ext\"") >&5
8362  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8363  ac_status=$?
8364  egrep -v '^ *\+' conftest.er1 >conftest.err
8365  rm -f conftest.er1
8366  cat conftest.err >&5
8367  echo "$as_me:8367: \$? = $ac_status" >&5
8368  (exit $ac_status); } >/dev/null; then
8369  if test -s conftest.err; then
8370    ac_cpp_err=$ac_c_preproc_warn_flag
8371  else
8372    ac_cpp_err=
8373  fi
8374else
8375  ac_cpp_err=yes
8376fi
8377if test -z "$ac_cpp_err"; then
8378  eval "$as_ac_Header=yes"
8379else
8380  echo "$as_me: failed program was:" >&5
8381  cat conftest.$ac_ext >&5
8382  eval "$as_ac_Header=no"
8383fi
8384rm -f conftest.err conftest.$ac_ext
8385fi
8386echo "$as_me:8386: result: `eval echo '${'$as_ac_Header'}'`" >&5
8387echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8388if test `eval echo '${'$as_ac_Header'}'` = yes; then
8389  cat >>confdefs.h <<EOF
8390#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8391EOF
8392
8393fi
8394done
8395
8396	fi
8397fi
8398
8399if test -z "$INTLDIR_MAKE" ; then
8400	CPPFLAGS="$CPPFLAGS -I../intl"
8401fi
8402
8403if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
8404	GT_YES="#"
8405	GT_NO=
8406else
8407	GT_YES=
8408	GT_NO="#"
8409fi
8410
8411if test "$USE_INCLUDED_LIBINTL" = yes ; then
8412	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
8413
8414cat >>confdefs.h <<\EOF
8415#define HAVE_GETTEXT 1
8416EOF
8417
8418	elif test "$nls_cv_use_gnu_gettext" = yes ; then
8419
8420cat >>confdefs.h <<\EOF
8421#define HAVE_GETTEXT 1
8422EOF
8423
8424	fi
8425	if test -n "$nls_cv_header_intl" ; then
8426
8427cat >>confdefs.h <<\EOF
8428#define HAVE_LIBINTL_H 1
8429EOF
8430
8431	fi
8432fi
8433
8434echo "$as_me:8434: checking if -lm needed for math functions" >&5
8435echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
8436if test "${cf_cv_need_libm+set}" = set; then
8437  echo $ECHO_N "(cached) $ECHO_C" >&6
8438else
8439
8440	cat >conftest.$ac_ext <<_ACEOF
8441#line 8441 "configure"
8442#include "confdefs.h"
8443
8444	#include <stdio.h>
8445	#include <math.h>
8446
8447int
8448main ()
8449{
8450double x = rand(); printf("result = %g\n", sqrt(x))
8451  ;
8452  return 0;
8453}
8454_ACEOF
8455rm -f conftest.$ac_objext conftest$ac_exeext
8456if { (eval echo "$as_me:8456: \"$ac_link\"") >&5
8457  (eval $ac_link) 2>&5
8458  ac_status=$?
8459  echo "$as_me:8459: \$? = $ac_status" >&5
8460  (exit $ac_status); } &&
8461         { ac_try='test -s conftest$ac_exeext'
8462  { (eval echo "$as_me:8462: \"$ac_try\"") >&5
8463  (eval $ac_try) 2>&5
8464  ac_status=$?
8465  echo "$as_me:8465: \$? = $ac_status" >&5
8466  (exit $ac_status); }; }; then
8467  cf_cv_need_libm=no
8468else
8469  echo "$as_me: failed program was:" >&5
8470cat conftest.$ac_ext >&5
8471cf_cv_need_libm=yes
8472fi
8473rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8474fi
8475echo "$as_me:8475: result: $cf_cv_need_libm" >&5
8476echo "${ECHO_T}$cf_cv_need_libm" >&6
8477if test "$cf_cv_need_libm" = yes
8478then
8479
8480	LIBS="-lm $LIBS"
8481
8482fi
8483
8484echo "$as_me:8484: checking if you want to use dmalloc for testing" >&5
8485echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
8486
8487# Check whether --with-dmalloc or --without-dmalloc was given.
8488if test "${with_dmalloc+set}" = set; then
8489  withval="$with_dmalloc"
8490
8491cat >>confdefs.h <<EOF
8492#define USE_DMALLOC 1
8493EOF
8494
8495	: ${with_cflags:=-g}
8496	: ${with_no_leaks:=yes}
8497	 with_dmalloc=yes
8498else
8499  with_dmalloc=
8500fi;
8501echo "$as_me:8501: result: ${with_dmalloc:-no}" >&5
8502echo "${ECHO_T}${with_dmalloc:-no}" >&6
8503
8504case .$with_cflags in #(vi
8505.*-g*)
8506	case .$CFLAGS in #(vi
8507	.*-g*) #(vi
8508		;;
8509	*)
8510
8511cf_fix_cppflags=no
8512cf_new_cflags=
8513cf_new_cppflags=
8514cf_new_extra_cppflags=
8515
8516for cf_add_cflags in -g
8517do
8518case $cf_fix_cppflags in
8519no)
8520	case $cf_add_cflags in #(vi
8521	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8522		case $cf_add_cflags in
8523		-D*)
8524			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8525
8526			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8527				&& test -z "${cf_tst_cflags}" \
8528				&& cf_fix_cppflags=yes
8529
8530			if test $cf_fix_cppflags = yes ; then
8531				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8532				continue
8533			elif test "${cf_tst_cflags}" = "\"'" ; then
8534				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8535				continue
8536			fi
8537			;;
8538		esac
8539		case "$CPPFLAGS" in
8540		*$cf_add_cflags) #(vi
8541			;;
8542		*) #(vi
8543			case $cf_add_cflags in #(vi
8544			-D*)
8545				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8546
8547CPPFLAGS=`echo "$CPPFLAGS" | \
8548	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8549		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8550
8551				;;
8552			esac
8553			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8554			;;
8555		esac
8556		;;
8557	*)
8558		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8559		;;
8560	esac
8561	;;
8562yes)
8563	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8564
8565	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8566
8567	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8568		&& test -z "${cf_tst_cflags}" \
8569		&& cf_fix_cppflags=no
8570	;;
8571esac
8572done
8573
8574if test -n "$cf_new_cflags" ; then
8575
8576	CFLAGS="$CFLAGS $cf_new_cflags"
8577fi
8578
8579if test -n "$cf_new_cppflags" ; then
8580
8581	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8582fi
8583
8584if test -n "$cf_new_extra_cppflags" ; then
8585
8586	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8587fi
8588
8589		;;
8590	esac
8591	;;
8592esac
8593
8594if test "$with_dmalloc" = yes ; then
8595	echo "$as_me:8595: checking for dmalloc.h" >&5
8596echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
8597if test "${ac_cv_header_dmalloc_h+set}" = set; then
8598  echo $ECHO_N "(cached) $ECHO_C" >&6
8599else
8600  cat >conftest.$ac_ext <<_ACEOF
8601#line 8601 "configure"
8602#include "confdefs.h"
8603#include <dmalloc.h>
8604_ACEOF
8605if { (eval echo "$as_me:8605: \"$ac_cpp conftest.$ac_ext\"") >&5
8606  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8607  ac_status=$?
8608  egrep -v '^ *\+' conftest.er1 >conftest.err
8609  rm -f conftest.er1
8610  cat conftest.err >&5
8611  echo "$as_me:8611: \$? = $ac_status" >&5
8612  (exit $ac_status); } >/dev/null; then
8613  if test -s conftest.err; then
8614    ac_cpp_err=$ac_c_preproc_warn_flag
8615  else
8616    ac_cpp_err=
8617  fi
8618else
8619  ac_cpp_err=yes
8620fi
8621if test -z "$ac_cpp_err"; then
8622  ac_cv_header_dmalloc_h=yes
8623else
8624  echo "$as_me: failed program was:" >&5
8625  cat conftest.$ac_ext >&5
8626  ac_cv_header_dmalloc_h=no
8627fi
8628rm -f conftest.err conftest.$ac_ext
8629fi
8630echo "$as_me:8630: result: $ac_cv_header_dmalloc_h" >&5
8631echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
8632if test $ac_cv_header_dmalloc_h = yes; then
8633
8634echo "$as_me:8634: checking for dmalloc_debug in -ldmalloc" >&5
8635echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
8636if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
8637  echo $ECHO_N "(cached) $ECHO_C" >&6
8638else
8639  ac_check_lib_save_LIBS=$LIBS
8640LIBS="-ldmalloc  $LIBS"
8641cat >conftest.$ac_ext <<_ACEOF
8642#line 8642 "configure"
8643#include "confdefs.h"
8644
8645/* Override any gcc2 internal prototype to avoid an error.  */
8646#ifdef __cplusplus
8647extern "C"
8648#endif
8649/* We use char because int might match the return type of a gcc2
8650   builtin and then its argument prototype would still apply.  */
8651char dmalloc_debug ();
8652int
8653main ()
8654{
8655dmalloc_debug ();
8656  ;
8657  return 0;
8658}
8659_ACEOF
8660rm -f conftest.$ac_objext conftest$ac_exeext
8661if { (eval echo "$as_me:8661: \"$ac_link\"") >&5
8662  (eval $ac_link) 2>&5
8663  ac_status=$?
8664  echo "$as_me:8664: \$? = $ac_status" >&5
8665  (exit $ac_status); } &&
8666         { ac_try='test -s conftest$ac_exeext'
8667  { (eval echo "$as_me:8667: \"$ac_try\"") >&5
8668  (eval $ac_try) 2>&5
8669  ac_status=$?
8670  echo "$as_me:8670: \$? = $ac_status" >&5
8671  (exit $ac_status); }; }; then
8672  ac_cv_lib_dmalloc_dmalloc_debug=yes
8673else
8674  echo "$as_me: failed program was:" >&5
8675cat conftest.$ac_ext >&5
8676ac_cv_lib_dmalloc_dmalloc_debug=no
8677fi
8678rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8679LIBS=$ac_check_lib_save_LIBS
8680fi
8681echo "$as_me:8681: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
8682echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
8683if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
8684  cat >>confdefs.h <<EOF
8685#define HAVE_LIBDMALLOC 1
8686EOF
8687
8688  LIBS="-ldmalloc $LIBS"
8689
8690fi
8691
8692fi
8693
8694fi
8695
8696echo "$as_me:8696: checking if you want to use dbmalloc for testing" >&5
8697echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
8698
8699# Check whether --with-dbmalloc or --without-dbmalloc was given.
8700if test "${with_dbmalloc+set}" = set; then
8701  withval="$with_dbmalloc"
8702
8703cat >>confdefs.h <<EOF
8704#define USE_DBMALLOC 1
8705EOF
8706
8707	: ${with_cflags:=-g}
8708	: ${with_no_leaks:=yes}
8709	 with_dbmalloc=yes
8710else
8711  with_dbmalloc=
8712fi;
8713echo "$as_me:8713: result: ${with_dbmalloc:-no}" >&5
8714echo "${ECHO_T}${with_dbmalloc:-no}" >&6
8715
8716case .$with_cflags in #(vi
8717.*-g*)
8718	case .$CFLAGS in #(vi
8719	.*-g*) #(vi
8720		;;
8721	*)
8722
8723cf_fix_cppflags=no
8724cf_new_cflags=
8725cf_new_cppflags=
8726cf_new_extra_cppflags=
8727
8728for cf_add_cflags in -g
8729do
8730case $cf_fix_cppflags in
8731no)
8732	case $cf_add_cflags in #(vi
8733	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8734		case $cf_add_cflags in
8735		-D*)
8736			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8737
8738			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8739				&& test -z "${cf_tst_cflags}" \
8740				&& cf_fix_cppflags=yes
8741
8742			if test $cf_fix_cppflags = yes ; then
8743				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8744				continue
8745			elif test "${cf_tst_cflags}" = "\"'" ; then
8746				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8747				continue
8748			fi
8749			;;
8750		esac
8751		case "$CPPFLAGS" in
8752		*$cf_add_cflags) #(vi
8753			;;
8754		*) #(vi
8755			case $cf_add_cflags in #(vi
8756			-D*)
8757				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8758
8759CPPFLAGS=`echo "$CPPFLAGS" | \
8760	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8761		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8762
8763				;;
8764			esac
8765			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8766			;;
8767		esac
8768		;;
8769	*)
8770		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8771		;;
8772	esac
8773	;;
8774yes)
8775	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8776
8777	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8778
8779	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8780		&& test -z "${cf_tst_cflags}" \
8781		&& cf_fix_cppflags=no
8782	;;
8783esac
8784done
8785
8786if test -n "$cf_new_cflags" ; then
8787
8788	CFLAGS="$CFLAGS $cf_new_cflags"
8789fi
8790
8791if test -n "$cf_new_cppflags" ; then
8792
8793	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8794fi
8795
8796if test -n "$cf_new_extra_cppflags" ; then
8797
8798	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8799fi
8800
8801		;;
8802	esac
8803	;;
8804esac
8805
8806if test "$with_dbmalloc" = yes ; then
8807	echo "$as_me:8807: checking for dbmalloc.h" >&5
8808echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
8809if test "${ac_cv_header_dbmalloc_h+set}" = set; then
8810  echo $ECHO_N "(cached) $ECHO_C" >&6
8811else
8812  cat >conftest.$ac_ext <<_ACEOF
8813#line 8813 "configure"
8814#include "confdefs.h"
8815#include <dbmalloc.h>
8816_ACEOF
8817if { (eval echo "$as_me:8817: \"$ac_cpp conftest.$ac_ext\"") >&5
8818  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8819  ac_status=$?
8820  egrep -v '^ *\+' conftest.er1 >conftest.err
8821  rm -f conftest.er1
8822  cat conftest.err >&5
8823  echo "$as_me:8823: \$? = $ac_status" >&5
8824  (exit $ac_status); } >/dev/null; then
8825  if test -s conftest.err; then
8826    ac_cpp_err=$ac_c_preproc_warn_flag
8827  else
8828    ac_cpp_err=
8829  fi
8830else
8831  ac_cpp_err=yes
8832fi
8833if test -z "$ac_cpp_err"; then
8834  ac_cv_header_dbmalloc_h=yes
8835else
8836  echo "$as_me: failed program was:" >&5
8837  cat conftest.$ac_ext >&5
8838  ac_cv_header_dbmalloc_h=no
8839fi
8840rm -f conftest.err conftest.$ac_ext
8841fi
8842echo "$as_me:8842: result: $ac_cv_header_dbmalloc_h" >&5
8843echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
8844if test $ac_cv_header_dbmalloc_h = yes; then
8845
8846echo "$as_me:8846: checking for debug_malloc in -ldbmalloc" >&5
8847echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
8848if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
8849  echo $ECHO_N "(cached) $ECHO_C" >&6
8850else
8851  ac_check_lib_save_LIBS=$LIBS
8852LIBS="-ldbmalloc  $LIBS"
8853cat >conftest.$ac_ext <<_ACEOF
8854#line 8854 "configure"
8855#include "confdefs.h"
8856
8857/* Override any gcc2 internal prototype to avoid an error.  */
8858#ifdef __cplusplus
8859extern "C"
8860#endif
8861/* We use char because int might match the return type of a gcc2
8862   builtin and then its argument prototype would still apply.  */
8863char debug_malloc ();
8864int
8865main ()
8866{
8867debug_malloc ();
8868  ;
8869  return 0;
8870}
8871_ACEOF
8872rm -f conftest.$ac_objext conftest$ac_exeext
8873if { (eval echo "$as_me:8873: \"$ac_link\"") >&5
8874  (eval $ac_link) 2>&5
8875  ac_status=$?
8876  echo "$as_me:8876: \$? = $ac_status" >&5
8877  (exit $ac_status); } &&
8878         { ac_try='test -s conftest$ac_exeext'
8879  { (eval echo "$as_me:8879: \"$ac_try\"") >&5
8880  (eval $ac_try) 2>&5
8881  ac_status=$?
8882  echo "$as_me:8882: \$? = $ac_status" >&5
8883  (exit $ac_status); }; }; then
8884  ac_cv_lib_dbmalloc_debug_malloc=yes
8885else
8886  echo "$as_me: failed program was:" >&5
8887cat conftest.$ac_ext >&5
8888ac_cv_lib_dbmalloc_debug_malloc=no
8889fi
8890rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8891LIBS=$ac_check_lib_save_LIBS
8892fi
8893echo "$as_me:8893: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
8894echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
8895if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
8896  cat >>confdefs.h <<EOF
8897#define HAVE_LIBDBMALLOC 1
8898EOF
8899
8900  LIBS="-ldbmalloc $LIBS"
8901
8902fi
8903
8904fi
8905
8906fi
8907
8908echo "$as_me:8908: checking if you want to use purify for testing" >&5
8909echo $ECHO_N "checking if you want to use purify for testing... $ECHO_C" >&6
8910
8911# Check whether --with-purify or --without-purify was given.
8912if test "${with_purify+set}" = set; then
8913  withval="$with_purify"
8914
8915cat >>confdefs.h <<EOF
8916#define USE_PURIFY 1
8917EOF
8918
8919	: ${with_cflags:=-g}
8920	: ${with_no_leaks:=yes}
8921	 with_purify=yes
8922else
8923  with_purify=
8924fi;
8925echo "$as_me:8925: result: ${with_purify:-no}" >&5
8926echo "${ECHO_T}${with_purify:-no}" >&6
8927
8928case .$with_cflags in #(vi
8929.*-g*)
8930	case .$CFLAGS in #(vi
8931	.*-g*) #(vi
8932		;;
8933	*)
8934
8935cf_fix_cppflags=no
8936cf_new_cflags=
8937cf_new_cppflags=
8938cf_new_extra_cppflags=
8939
8940for cf_add_cflags in -g
8941do
8942case $cf_fix_cppflags in
8943no)
8944	case $cf_add_cflags in #(vi
8945	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8946		case $cf_add_cflags in
8947		-D*)
8948			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8949
8950			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8951				&& test -z "${cf_tst_cflags}" \
8952				&& cf_fix_cppflags=yes
8953
8954			if test $cf_fix_cppflags = yes ; then
8955				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8956				continue
8957			elif test "${cf_tst_cflags}" = "\"'" ; then
8958				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8959				continue
8960			fi
8961			;;
8962		esac
8963		case "$CPPFLAGS" in
8964		*$cf_add_cflags) #(vi
8965			;;
8966		*) #(vi
8967			case $cf_add_cflags in #(vi
8968			-D*)
8969				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8970
8971CPPFLAGS=`echo "$CPPFLAGS" | \
8972	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8973		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8974
8975				;;
8976			esac
8977			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8978			;;
8979		esac
8980		;;
8981	*)
8982		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8983		;;
8984	esac
8985	;;
8986yes)
8987	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8988
8989	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8990
8991	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8992		&& test -z "${cf_tst_cflags}" \
8993		&& cf_fix_cppflags=no
8994	;;
8995esac
8996done
8997
8998if test -n "$cf_new_cflags" ; then
8999
9000	CFLAGS="$CFLAGS $cf_new_cflags"
9001fi
9002
9003if test -n "$cf_new_cppflags" ; then
9004
9005	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9006fi
9007
9008if test -n "$cf_new_extra_cppflags" ; then
9009
9010	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9011fi
9012
9013		;;
9014	esac
9015	;;
9016esac
9017
9018echo "$as_me:9018: checking if you want to use valgrind for testing" >&5
9019echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
9020
9021# Check whether --with-valgrind or --without-valgrind was given.
9022if test "${with_valgrind+set}" = set; then
9023  withval="$with_valgrind"
9024
9025cat >>confdefs.h <<EOF
9026#define USE_VALGRIND 1
9027EOF
9028
9029	: ${with_cflags:=-g}
9030	: ${with_no_leaks:=yes}
9031	 with_valgrind=yes
9032else
9033  with_valgrind=
9034fi;
9035echo "$as_me:9035: result: ${with_valgrind:-no}" >&5
9036echo "${ECHO_T}${with_valgrind:-no}" >&6
9037
9038case .$with_cflags in #(vi
9039.*-g*)
9040	case .$CFLAGS in #(vi
9041	.*-g*) #(vi
9042		;;
9043	*)
9044
9045cf_fix_cppflags=no
9046cf_new_cflags=
9047cf_new_cppflags=
9048cf_new_extra_cppflags=
9049
9050for cf_add_cflags in -g
9051do
9052case $cf_fix_cppflags in
9053no)
9054	case $cf_add_cflags in #(vi
9055	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9056		case $cf_add_cflags in
9057		-D*)
9058			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9059
9060			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9061				&& test -z "${cf_tst_cflags}" \
9062				&& cf_fix_cppflags=yes
9063
9064			if test $cf_fix_cppflags = yes ; then
9065				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9066				continue
9067			elif test "${cf_tst_cflags}" = "\"'" ; then
9068				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9069				continue
9070			fi
9071			;;
9072		esac
9073		case "$CPPFLAGS" in
9074		*$cf_add_cflags) #(vi
9075			;;
9076		*) #(vi
9077			case $cf_add_cflags in #(vi
9078			-D*)
9079				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9080
9081CPPFLAGS=`echo "$CPPFLAGS" | \
9082	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9083		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9084
9085				;;
9086			esac
9087			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9088			;;
9089		esac
9090		;;
9091	*)
9092		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9093		;;
9094	esac
9095	;;
9096yes)
9097	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9098
9099	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9100
9101	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9102		&& test -z "${cf_tst_cflags}" \
9103		&& cf_fix_cppflags=no
9104	;;
9105esac
9106done
9107
9108if test -n "$cf_new_cflags" ; then
9109
9110	CFLAGS="$CFLAGS $cf_new_cflags"
9111fi
9112
9113if test -n "$cf_new_cppflags" ; then
9114
9115	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9116fi
9117
9118if test -n "$cf_new_extra_cppflags" ; then
9119
9120	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9121fi
9122
9123		;;
9124	esac
9125	;;
9126esac
9127
9128echo "$as_me:9128: checking if you want to perform memory-leak testing" >&5
9129echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
9130
9131# Check whether --with-no-leaks or --without-no-leaks was given.
9132if test "${with_no_leaks+set}" = set; then
9133  withval="$with_no_leaks"
9134
9135cat >>confdefs.h <<\EOF
9136#define NO_LEAKS 1
9137EOF
9138
9139	 cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
9140	 case ${cf_doalloc} in #(vi
9141	 *yes*) ;;
9142	 *)
9143cat >>confdefs.h <<\EOF
9144#define DOALLOC 10000
9145EOF
9146 ;;
9147	 esac
9148	 with_no_leaks=yes
9149else
9150  with_no_leaks=
9151fi;
9152echo "$as_me:9152: result: $with_no_leaks" >&5
9153echo "${ECHO_T}$with_no_leaks" >&6
9154
9155echo "$as_me:9155: checking if you want --trace option" >&5
9156echo $ECHO_N "checking if you want --trace option... $ECHO_C" >&6
9157
9158# Check whether --enable-trace or --disable-trace was given.
9159if test "${enable_trace+set}" = set; then
9160  enableval="$enable_trace"
9161
9162else
9163  enableval=yes
9164fi;
9165echo "$as_me:9165: result: $enableval" >&5
9166echo "${ECHO_T}$enableval" >&6
9167if test "$enableval" != no ; then
9168EXTRAOBJS="$EXTRAOBJS trace\$o"
9169
9170cat >>confdefs.h <<\EOF
9171#define HAVE_DLG_TRACE 1
9172EOF
9173
9174else
9175	:
9176fi
9177
9178LD_RPATH_OPT=
9179echo "$as_me:9179: checking for an rpath option" >&5
9180echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
9181case $cf_cv_system_name in #(vi
9182irix*) #(vi
9183	if test "$GCC" = yes; then
9184		LD_RPATH_OPT="-Wl,-rpath,"
9185	else
9186		LD_RPATH_OPT="-rpath "
9187	fi
9188	;;
9189linux*|gnu*|k*bsd*-gnu) #(vi
9190	LD_RPATH_OPT="-Wl,-rpath,"
9191	;;
9192openbsd[2-9].*|mirbsd*) #(vi
9193	LD_RPATH_OPT="-Wl,-rpath,"
9194	;;
9195dragonfly*|freebsd*) #(vi
9196	LD_RPATH_OPT="-rpath "
9197	;;
9198netbsd*) #(vi
9199	LD_RPATH_OPT="-Wl,-rpath,"
9200	;;
9201osf*|mls+*) #(vi
9202	LD_RPATH_OPT="-rpath "
9203	;;
9204solaris2*) #(vi
9205	LD_RPATH_OPT="-R"
9206	;;
9207*)
9208	;;
9209esac
9210echo "$as_me:9210: result: $LD_RPATH_OPT" >&5
9211echo "${ECHO_T}$LD_RPATH_OPT" >&6
9212
9213case "x$LD_RPATH_OPT" in #(vi
9214x-R*)
9215	echo "$as_me:9215: checking if we need a space after rpath option" >&5
9216echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
9217	cf_save_LIBS="$LIBS"
9218	LIBS="${LD_RPATH_OPT}$libdir $LIBS"
9219	cat >conftest.$ac_ext <<_ACEOF
9220#line 9220 "configure"
9221#include "confdefs.h"
9222
9223int
9224main ()
9225{
9226
9227  ;
9228  return 0;
9229}
9230_ACEOF
9231rm -f conftest.$ac_objext conftest$ac_exeext
9232if { (eval echo "$as_me:9232: \"$ac_link\"") >&5
9233  (eval $ac_link) 2>&5
9234  ac_status=$?
9235  echo "$as_me:9235: \$? = $ac_status" >&5
9236  (exit $ac_status); } &&
9237         { ac_try='test -s conftest$ac_exeext'
9238  { (eval echo "$as_me:9238: \"$ac_try\"") >&5
9239  (eval $ac_try) 2>&5
9240  ac_status=$?
9241  echo "$as_me:9241: \$? = $ac_status" >&5
9242  (exit $ac_status); }; }; then
9243  cf_rpath_space=no
9244else
9245  echo "$as_me: failed program was:" >&5
9246cat conftest.$ac_ext >&5
9247cf_rpath_space=yes
9248fi
9249rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9250	LIBS="$cf_save_LIBS"
9251	echo "$as_me:9251: result: $cf_rpath_space" >&5
9252echo "${ECHO_T}$cf_rpath_space" >&6
9253	test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
9254	;;
9255esac
9256
9257REL_VERSION=${VERSION_MAJOR}.${VERSION_MINOR}
9258ABI_VERSION=`echo "$VERSION" |sed -e 's/:/./g'`
9259cf_cv_rel_version=$REL_VERSION
9260
9261test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
9262
9263# Check whether --with-rel-version or --without-rel-version was given.
9264if test "${with_rel_version+set}" = set; then
9265  withval="$with_rel_version"
9266  { echo "$as_me:9266: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
9267echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
9268 cf_cv_rel_version=$withval
9269fi;
9270
9271 DIALOG_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
9272 DIALOG_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
9273
9274if test -n "$DIALOG_MAJOR" ; then
9275  case $DIALOG_MAJOR in #(vi
9276  [0-9]*) #(vi
9277 	;;
9278  *)
9279	{ { echo "$as_me:9279: error: Release major-version is not a number: $DIALOG_MAJOR" >&5
9280echo "$as_me: error: Release major-version is not a number: $DIALOG_MAJOR" >&2;}
9281   { (exit 1); exit 1; }; }
9282 	;;
9283  esac
9284else
9285  { { echo "$as_me:9285: error: Release major-version value is empty" >&5
9286echo "$as_me: error: Release major-version value is empty" >&2;}
9287   { (exit 1); exit 1; }; }
9288fi
9289
9290if test -n "$DIALOG_MINOR" ; then
9291  case $DIALOG_MINOR in #(vi
9292  [0-9]*) #(vi
9293 	;;
9294  *)
9295	{ { echo "$as_me:9295: error: Release minor-version is not a number: $DIALOG_MINOR" >&5
9296echo "$as_me: error: Release minor-version is not a number: $DIALOG_MINOR" >&2;}
9297   { (exit 1); exit 1; }; }
9298 	;;
9299  esac
9300else
9301  { { echo "$as_me:9301: error: Release minor-version value is empty" >&5
9302echo "$as_me: error: Release minor-version value is empty" >&2;}
9303   { (exit 1); exit 1; }; }
9304fi
9305
9306test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
9307
9308# Check whether --with-abi-version or --without-abi-version was given.
9309if test "${with_abi_version+set}" = set; then
9310  withval="$with_abi_version"
9311  { echo "$as_me:9311: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
9312echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
9313 cf_cv_abi_version=$withval
9314fi;
9315
9316if test -n "$cf_cv_abi_version" ; then
9317  case $cf_cv_abi_version in #(vi
9318  [0-9]*) #(vi
9319 	;;
9320  *)
9321	{ { echo "$as_me:9321: error: ABI version is not a number: $cf_cv_abi_version" >&5
9322echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
9323   { (exit 1); exit 1; }; }
9324 	;;
9325  esac
9326else
9327  { { echo "$as_me:9327: error: ABI version value is empty" >&5
9328echo "$as_me: error: ABI version value is empty" >&2;}
9329   { (exit 1); exit 1; }; }
9330fi
9331
9332LIB_MODEL=static
9333DFT_LWR_MODEL=$LIB_MODEL
9334LIBTOOL_MAKE="#"
9335
9336# use to comment-out makefile lines
9337MAKE_NORMAL=
9338MAKE_STATIC=
9339MAKE_SHARED="#"
9340
9341echo "$as_me:9341: checking if libtool -version-number should be used" >&5
9342echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
9343
9344# Check whether --enable-libtool-version or --disable-libtool-version was given.
9345if test "${enable_libtool_version+set}" = set; then
9346  enableval="$enable_libtool_version"
9347  test "$enableval" != no && enableval=yes
9348  if test "$enableval" != "yes" ; then
9349    cf_libtool_version=no
9350  else
9351    cf_libtool_version=yes
9352  fi
9353else
9354  enableval=yes
9355  cf_libtool_version=yes
9356
9357fi;
9358echo "$as_me:9358: result: $cf_libtool_version" >&5
9359echo "${ECHO_T}$cf_libtool_version" >&6
9360
9361if test "$cf_libtool_version" = yes ; then
9362	LIBTOOL_VERSION="-version-number"
9363else
9364	LIBTOOL_VERSION="-version-info"
9365fi
9366
9367LIBTOOL=
9368
9369# common library maintenance symbols that are convenient for libtool scripts:
9370LIB_CREATE='${AR} -cr'
9371LIB_OBJECT='${OBJECTS}'
9372LIB_SUFFIX=.a
9373LIB_PREP="$RANLIB"
9374
9375# symbols used to prop libtool up to enable it to determine what it should be
9376# doing:
9377LIB_CLEAN=
9378LIB_COMPILE=
9379LIB_LINK='${CC}'
9380LIB_INSTALL=
9381LIB_UNINSTALL=
9382
9383echo "$as_me:9383: checking if you want to build libraries with libtool" >&5
9384echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
9385
9386# Check whether --with-libtool or --without-libtool was given.
9387if test "${with_libtool+set}" = set; then
9388  withval="$with_libtool"
9389  with_libtool=$withval
9390else
9391  with_libtool=no
9392fi;
9393echo "$as_me:9393: result: $with_libtool" >&5
9394echo "${ECHO_T}$with_libtool" >&6
9395if test "$with_libtool" != "no"; then
9396
9397	if test "$with_libtool" != "yes" ; then
9398
9399if test "x$prefix" != xNONE; then
9400  cf_path_syntax="$prefix"
9401else
9402  cf_path_syntax="$ac_default_prefix"
9403fi
9404
9405case ".$with_libtool" in #(vi
9406.\$\(*\)*|.\'*\'*) #(vi
9407  ;;
9408..|./*|.\\*) #(vi
9409  ;;
9410.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9411  ;;
9412.\${*prefix}*|.\${*dir}*) #(vi
9413  eval with_libtool="$with_libtool"
9414  case ".$with_libtool" in #(vi
9415  .NONE/*)
9416    with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
9417    ;;
9418  esac
9419  ;; #(vi
9420.no|.NONE/*)
9421  with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
9422  ;;
9423*)
9424  { { echo "$as_me:9424: error: expected a pathname, not \"$with_libtool\"" >&5
9425echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
9426   { (exit 1); exit 1; }; }
9427  ;;
9428esac
9429
9430		LIBTOOL=$with_libtool
9431	else
9432		if test -n "$ac_tool_prefix"; then
9433  for ac_prog in libtool glibtool
9434  do
9435    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9436set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9437echo "$as_me:9437: checking for $ac_word" >&5
9438echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9439if test "${ac_cv_prog_LIBTOOL+set}" = set; then
9440  echo $ECHO_N "(cached) $ECHO_C" >&6
9441else
9442  if test -n "$LIBTOOL"; then
9443  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
9444else
9445  ac_save_IFS=$IFS; IFS=$ac_path_separator
9446ac_dummy="$PATH"
9447for ac_dir in $ac_dummy; do
9448  IFS=$ac_save_IFS
9449  test -z "$ac_dir" && ac_dir=.
9450  $as_executable_p "$ac_dir/$ac_word" || continue
9451ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
9452echo "$as_me:9452: found $ac_dir/$ac_word" >&5
9453break
9454done
9455
9456fi
9457fi
9458LIBTOOL=$ac_cv_prog_LIBTOOL
9459if test -n "$LIBTOOL"; then
9460  echo "$as_me:9460: result: $LIBTOOL" >&5
9461echo "${ECHO_T}$LIBTOOL" >&6
9462else
9463  echo "$as_me:9463: result: no" >&5
9464echo "${ECHO_T}no" >&6
9465fi
9466
9467    test -n "$LIBTOOL" && break
9468  done
9469fi
9470if test -z "$LIBTOOL"; then
9471  ac_ct_LIBTOOL=$LIBTOOL
9472  for ac_prog in libtool glibtool
9473do
9474  # Extract the first word of "$ac_prog", so it can be a program name with args.
9475set dummy $ac_prog; ac_word=$2
9476echo "$as_me:9476: checking for $ac_word" >&5
9477echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9478if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
9479  echo $ECHO_N "(cached) $ECHO_C" >&6
9480else
9481  if test -n "$ac_ct_LIBTOOL"; then
9482  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
9483else
9484  ac_save_IFS=$IFS; IFS=$ac_path_separator
9485ac_dummy="$PATH"
9486for ac_dir in $ac_dummy; do
9487  IFS=$ac_save_IFS
9488  test -z "$ac_dir" && ac_dir=.
9489  $as_executable_p "$ac_dir/$ac_word" || continue
9490ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
9491echo "$as_me:9491: found $ac_dir/$ac_word" >&5
9492break
9493done
9494
9495fi
9496fi
9497ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
9498if test -n "$ac_ct_LIBTOOL"; then
9499  echo "$as_me:9499: result: $ac_ct_LIBTOOL" >&5
9500echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
9501else
9502  echo "$as_me:9502: result: no" >&5
9503echo "${ECHO_T}no" >&6
9504fi
9505
9506  test -n "$ac_ct_LIBTOOL" && break
9507done
9508test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
9509
9510  LIBTOOL=$ac_ct_LIBTOOL
9511fi
9512
9513if test -n "$LIBTOOL" && test "$LIBTOOL" != none
9514then
9515	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.].*//'`
9516else
9517	cf_cv_libtool_version=
9518fi
9519test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
9520
9521		if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
9522		then
9523
9524unset ac_cv_prog_ac_ct_LIBTOOL
9525unset ac_ct_LIBTOOL
9526unset LIBTOOL
9527
9528			if test -n "$ac_tool_prefix"; then
9529  for ac_prog in glibtool
9530  do
9531    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9532set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9533echo "$as_me:9533: checking for $ac_word" >&5
9534echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9535if test "${ac_cv_prog_LIBTOOL+set}" = set; then
9536  echo $ECHO_N "(cached) $ECHO_C" >&6
9537else
9538  if test -n "$LIBTOOL"; then
9539  ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
9540else
9541  ac_save_IFS=$IFS; IFS=$ac_path_separator
9542ac_dummy="$PATH"
9543for ac_dir in $ac_dummy; do
9544  IFS=$ac_save_IFS
9545  test -z "$ac_dir" && ac_dir=.
9546  $as_executable_p "$ac_dir/$ac_word" || continue
9547ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
9548echo "$as_me:9548: found $ac_dir/$ac_word" >&5
9549break
9550done
9551
9552fi
9553fi
9554LIBTOOL=$ac_cv_prog_LIBTOOL
9555if test -n "$LIBTOOL"; then
9556  echo "$as_me:9556: result: $LIBTOOL" >&5
9557echo "${ECHO_T}$LIBTOOL" >&6
9558else
9559  echo "$as_me:9559: result: no" >&5
9560echo "${ECHO_T}no" >&6
9561fi
9562
9563    test -n "$LIBTOOL" && break
9564  done
9565fi
9566if test -z "$LIBTOOL"; then
9567  ac_ct_LIBTOOL=$LIBTOOL
9568  for ac_prog in glibtool
9569do
9570  # Extract the first word of "$ac_prog", so it can be a program name with args.
9571set dummy $ac_prog; ac_word=$2
9572echo "$as_me:9572: checking for $ac_word" >&5
9573echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9574if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
9575  echo $ECHO_N "(cached) $ECHO_C" >&6
9576else
9577  if test -n "$ac_ct_LIBTOOL"; then
9578  ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
9579else
9580  ac_save_IFS=$IFS; IFS=$ac_path_separator
9581ac_dummy="$PATH"
9582for ac_dir in $ac_dummy; do
9583  IFS=$ac_save_IFS
9584  test -z "$ac_dir" && ac_dir=.
9585  $as_executable_p "$ac_dir/$ac_word" || continue
9586ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
9587echo "$as_me:9587: found $ac_dir/$ac_word" >&5
9588break
9589done
9590
9591fi
9592fi
9593ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
9594if test -n "$ac_ct_LIBTOOL"; then
9595  echo "$as_me:9595: result: $ac_ct_LIBTOOL" >&5
9596echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
9597else
9598  echo "$as_me:9598: result: no" >&5
9599echo "${ECHO_T}no" >&6
9600fi
9601
9602  test -n "$ac_ct_LIBTOOL" && break
9603done
9604test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
9605
9606  LIBTOOL=$ac_ct_LIBTOOL
9607fi
9608
9609if test -n "$LIBTOOL" && test "$LIBTOOL" != none
9610then
9611	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.].*//'`
9612else
9613	cf_cv_libtool_version=
9614fi
9615test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
9616
9617		fi
9618	fi
9619	if test -z "$LIBTOOL" ; then
9620		{ { echo "$as_me:9620: error: Cannot find libtool" >&5
9621echo "$as_me: error: Cannot find libtool" >&2;}
9622   { (exit 1); exit 1; }; }
9623	fi
9624	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
9625	LIB_OBJECT='${OBJECTS:.o=.lo}'
9626	LIB_SUFFIX=.la
9627	LIB_CLEAN='${LIBTOOL} --mode=clean'
9628	LIB_COMPILE='${LIBTOOL} --mode=compile'
9629	LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
9630	LIB_INSTALL='${LIBTOOL} --mode=install'
9631	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
9632	LIB_PREP=:
9633
9634if test -n "$LIBTOOL" && test "$LIBTOOL" != none
9635then
9636	echo "$as_me:9636: checking version of $LIBTOOL" >&5
9637echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
9638
9639if test -n "$LIBTOOL" && test "$LIBTOOL" != none
9640then
9641	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.].*//'`
9642else
9643	cf_cv_libtool_version=
9644fi
9645test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
9646
9647	echo "$as_me:9647: result: $cf_cv_libtool_version" >&5
9648echo "${ECHO_T}$cf_cv_libtool_version" >&6
9649	if test -z "$cf_cv_libtool_version" ; then
9650		{ { echo "$as_me:9650: error: This is not GNU libtool" >&5
9651echo "$as_me: error: This is not GNU libtool" >&2;}
9652   { (exit 1); exit 1; }; }
9653	fi
9654else
9655	{ { echo "$as_me:9655: error: GNU libtool has not been found" >&5
9656echo "$as_me: error: GNU libtool has not been found" >&2;}
9657   { (exit 1); exit 1; }; }
9658fi
9659
9660	# special hack to add -no-undefined (which libtool should do for itself)
9661	LT_UNDEF=
9662	case "$cf_cv_system_name" in #(vi
9663	cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
9664		LT_UNDEF=-no-undefined
9665		;;
9666	esac
9667
9668	# special hack to add --tag option for C++ compiler
9669	case $cf_cv_libtool_version in #(vi
9670	1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
9671		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
9672		LIBTOOL="$LIBTOOL --tag=CC"
9673		;;
9674	*)
9675		LIBTOOL_CXX="$LIBTOOL"
9676		;;
9677	esac
9678else
9679	LIBTOOL=""
9680	LIBTOOL_CXX=""
9681fi
9682
9683test -z "$LIBTOOL" && ECHO_LT=
9684
9685LIB_CREATE="$LIB_CREATE \$@"
9686
9687if test "$with_libtool" = "yes" ; then
9688	OBJEXT="lo"
9689	LIB_MODEL=libtool
9690	DFT_LWR_MODEL=$LIB_MODEL
9691	LIBTOOL_MAKE=
9692
9693echo "$as_me:9693: checking for additional libtool options" >&5
9694echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
9695
9696# Check whether --with-libtool-opts or --without-libtool-opts was given.
9697if test "${with_libtool_opts+set}" = set; then
9698  withval="$with_libtool_opts"
9699  with_libtool_opts=$withval
9700else
9701  with_libtool_opts=no
9702fi;
9703echo "$as_me:9703: result: $with_libtool_opts" >&5
9704echo "${ECHO_T}$with_libtool_opts" >&6
9705
9706case .$with_libtool_opts in
9707.yes|.no|.)
9708	;;
9709*)
9710	LIBTOOL_OPTS=$with_libtool_opts
9711	;;
9712esac
9713
9714	MAKE_NORMAL="#"
9715	MAKE_STATIC="#"
9716	MAKE_SHARED=
9717else
9718	echo "$as_me:9718: checking if you want to build shared libraries" >&5
9719echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
9720
9721# Check whether --with-shared or --without-shared was given.
9722if test "${with_shared+set}" = set; then
9723  withval="$with_shared"
9724  with_shared=$withval
9725else
9726  with_shared=no
9727fi;
9728	echo "$as_me:9728: result: $with_shared" >&5
9729echo "${ECHO_T}$with_shared" >&6
9730	if test "$with_shared" = "yes" ; then
9731		LIB_MODEL=shared
9732		DFT_LWR_MODEL=$LIB_MODEL
9733
9734	RM_SHARED_OPTS=
9735	LOCAL_LDFLAGS=
9736	LOCAL_LDFLAGS2=
9737	LD_SHARED_OPTS=
9738	INSTALL_LIB="-m 644"
9739	: ${rel_builddir:=.}
9740
9741	cf_cv_do_symlinks=no
9742	cf_ld_rpath_opt=
9743	test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
9744
9745	echo "$as_me:9745: checking if release/abi version should be used for shared libs" >&5
9746echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
9747
9748# Check whether --with-shlib-version or --without-shlib-version was given.
9749if test "${with_shlib_version+set}" = set; then
9750  withval="$with_shlib_version"
9751  test -z "$withval" && withval=auto
9752	case $withval in #(vi
9753	yes) #(vi
9754		cf_cv_shlib_version=auto
9755		;;
9756	rel|abi|auto|no) #(vi
9757		cf_cv_shlib_version=$withval
9758		;;
9759	*)
9760		{ { echo "$as_me:9760: error: option value must be one of: rel, abi, auto or no" >&5
9761echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
9762   { (exit 1); exit 1; }; }
9763		;;
9764	esac
9765
9766else
9767  cf_cv_shlib_version=auto
9768fi;
9769	echo "$as_me:9769: result: $cf_cv_shlib_version" >&5
9770echo "${ECHO_T}$cf_cv_shlib_version" >&6
9771
9772	cf_cv_rm_so_locs=no
9773	cf_try_cflags=
9774
9775	# Some less-capable ports of gcc support only -fpic
9776	CC_SHARED_OPTS=
9777	if test "$GCC" = yes
9778	then
9779		echo "$as_me:9779: checking which $CC option to use" >&5
9780echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
9781		cf_save_CFLAGS="$CFLAGS"
9782		for CC_SHARED_OPTS in -fPIC -fpic ''
9783		do
9784			CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
9785			cat >conftest.$ac_ext <<_ACEOF
9786#line 9786 "configure"
9787#include "confdefs.h"
9788#include <stdio.h>
9789int
9790main ()
9791{
9792int x = 1
9793  ;
9794  return 0;
9795}
9796_ACEOF
9797rm -f conftest.$ac_objext
9798if { (eval echo "$as_me:9798: \"$ac_compile\"") >&5
9799  (eval $ac_compile) 2>&5
9800  ac_status=$?
9801  echo "$as_me:9801: \$? = $ac_status" >&5
9802  (exit $ac_status); } &&
9803         { ac_try='test -s conftest.$ac_objext'
9804  { (eval echo "$as_me:9804: \"$ac_try\"") >&5
9805  (eval $ac_try) 2>&5
9806  ac_status=$?
9807  echo "$as_me:9807: \$? = $ac_status" >&5
9808  (exit $ac_status); }; }; then
9809  break
9810else
9811  echo "$as_me: failed program was:" >&5
9812cat conftest.$ac_ext >&5
9813fi
9814rm -f conftest.$ac_objext conftest.$ac_ext
9815		done
9816		echo "$as_me:9816: result: $CC_SHARED_OPTS" >&5
9817echo "${ECHO_T}$CC_SHARED_OPTS" >&6
9818		CFLAGS="$cf_save_CFLAGS"
9819	fi
9820
9821	cf_cv_shlib_version_infix=no
9822
9823	case $cf_cv_system_name in #(vi
9824	aix4.3-9*|aix[5-7]*) #(vi
9825		if test "$GCC" = yes; then
9826			CC_SHARED_OPTS=
9827			MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9828		else
9829			# CC_SHARED_OPTS='-qpic=large -G'
9830			# perhaps "-bM:SRE -bnoentry -bexpall"
9831			MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9832		fi
9833		;;
9834	beos*) #(vi
9835		MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
9836		;;
9837	cygwin*) #(vi
9838		CC_SHARED_OPTS=
9839		MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9840		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9841		cf_cv_shlib_version=cygdll
9842		cf_cv_shlib_version_infix=cygdll
9843		cat >mk_shared_lib.sh <<-CF_EOF
9844		#!/bin/sh
9845		SHARED_LIB=\$1
9846		IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9847		shift
9848		cat <<-EOF
9849		Linking shared library
9850		** SHARED_LIB \$SHARED_LIB
9851		** IMPORT_LIB \$IMPORT_LIB
9852EOF
9853		exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9854CF_EOF
9855		chmod +x mk_shared_lib.sh
9856		;;
9857	msys*) #(vi
9858		CC_SHARED_OPTS=
9859		MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9860		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9861		cf_cv_shlib_version=msysdll
9862		cf_cv_shlib_version_infix=msysdll
9863		cat >mk_shared_lib.sh <<-CF_EOF
9864		#!/bin/sh
9865		SHARED_LIB=\$1
9866		IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9867		shift
9868		cat <<-EOF
9869		Linking shared library
9870		** SHARED_LIB \$SHARED_LIB
9871		** IMPORT_LIB \$IMPORT_LIB
9872EOF
9873		exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9874CF_EOF
9875		chmod +x mk_shared_lib.sh
9876		;;
9877	darwin*) #(vi
9878		cf_try_cflags="no-cpp-precomp"
9879		CC_SHARED_OPTS="-dynamic"
9880		MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
9881		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
9882		cf_cv_shlib_version_infix=yes
9883		echo "$as_me:9883: checking if ld -search_paths_first works" >&5
9884echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
9885if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
9886  echo $ECHO_N "(cached) $ECHO_C" >&6
9887else
9888
9889			cf_save_LDFLAGS=$LDFLAGS
9890			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9891			cat >conftest.$ac_ext <<_ACEOF
9892#line 9892 "configure"
9893#include "confdefs.h"
9894
9895int
9896main ()
9897{
9898int i;
9899  ;
9900  return 0;
9901}
9902_ACEOF
9903rm -f conftest.$ac_objext conftest$ac_exeext
9904if { (eval echo "$as_me:9904: \"$ac_link\"") >&5
9905  (eval $ac_link) 2>&5
9906  ac_status=$?
9907  echo "$as_me:9907: \$? = $ac_status" >&5
9908  (exit $ac_status); } &&
9909         { ac_try='test -s conftest$ac_exeext'
9910  { (eval echo "$as_me:9910: \"$ac_try\"") >&5
9911  (eval $ac_try) 2>&5
9912  ac_status=$?
9913  echo "$as_me:9913: \$? = $ac_status" >&5
9914  (exit $ac_status); }; }; then
9915  cf_cv_ldflags_search_paths_first=yes
9916else
9917  echo "$as_me: failed program was:" >&5
9918cat conftest.$ac_ext >&5
9919cf_cv_ldflags_search_paths_first=no
9920fi
9921rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9922				LDFLAGS=$cf_save_LDFLAGS
9923fi
9924echo "$as_me:9924: result: $cf_cv_ldflags_search_paths_first" >&5
9925echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
9926		if test $cf_cv_ldflags_search_paths_first = yes; then
9927			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9928		fi
9929		;;
9930	hpux[7-8]*) #(vi
9931		# HP-UX 8.07 ld lacks "+b" option used for libdir search-list
9932		if test "$GCC" != yes; then
9933			CC_SHARED_OPTS='+Z'
9934		fi
9935		MK_SHARED_LIB='${LD} -b -o $@'
9936		INSTALL_LIB="-m 555"
9937		;;
9938	hpux*) #(vi
9939		# (tested with gcc 2.7.2 -- I don't have c89)
9940		if test "$GCC" = yes; then
9941			LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
9942		else
9943			CC_SHARED_OPTS='+Z'
9944			LD_SHARED_OPTS='-Wl,+b,${libdir}'
9945		fi
9946		MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
9947		# HP-UX shared libraries must be executable, and should be
9948		# readonly to exploit a quirk in the memory manager.
9949		INSTALL_LIB="-m 555"
9950		;;
9951	interix*)
9952		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9953		if test "$cf_cv_shlib_version" = rel; then
9954			cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
9955		else
9956			cf_shared_soname='`basename `'
9957		fi
9958		CC_SHARED_OPTS=
9959		MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
9960		;;
9961	irix*) #(vi
9962		if test "$cf_cv_enable_rpath" = yes ; then
9963			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9964		fi
9965		# tested with IRIX 5.2 and 'cc'.
9966		if test "$GCC" != yes; then
9967			CC_SHARED_OPTS='-KPIC'
9968			MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
9969		else
9970			MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
9971		fi
9972		cf_cv_rm_so_locs=yes
9973		;;
9974	linux*|gnu*|k*bsd*-gnu) #(vi
9975		if test "$DFT_LWR_MODEL" = "shared" ; then
9976			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9977			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9978		fi
9979		if test "$cf_cv_enable_rpath" = yes ; then
9980			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9981		fi
9982
9983	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9984	if test "$cf_cv_shlib_version" = rel; then
9985		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9986	else
9987		cf_cv_shared_soname='`basename $@`'
9988	fi
9989
9990		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9991		;;
9992	mingw*) #(vi
9993		cf_cv_shlib_version=mingw
9994		cf_cv_shlib_version_infix=mingw
9995		if test "$DFT_LWR_MODEL" = "shared" ; then
9996			LOCAL_LDFLAGS="-Wl,--enable-auto-import"
9997			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9998			EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
9999		fi
10000		CC_SHARED_OPTS=
10001		MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10002		RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10003		cat >mk_shared_lib.sh <<-CF_EOF
10004		#!/bin/sh
10005		SHARED_LIB=\$1
10006		IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
10007		shift
10008		cat <<-EOF
10009		Linking shared library
10010		** SHARED_LIB \$SHARED_LIB
10011		** IMPORT_LIB \$IMPORT_LIB
10012EOF
10013		exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10014CF_EOF
10015		chmod +x mk_shared_lib.sh
10016		;;
10017	openbsd[2-9].*|mirbsd*) #(vi
10018		if test "$DFT_LWR_MODEL" = "shared" ; then
10019			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10020			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10021		fi
10022		if test "$cf_cv_enable_rpath" = yes ; then
10023			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10024		fi
10025		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10026
10027	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10028	if test "$cf_cv_shlib_version" = rel; then
10029		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10030	else
10031		cf_cv_shared_soname='`basename $@`'
10032	fi
10033
10034		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10035		;;
10036	nto-qnx*|openbsd*|freebsd[12].*) #(vi
10037		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10038		MK_SHARED_LIB='${LD} -Bshareable -o $@'
10039		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10040		;;
10041	dragonfly*|freebsd*) #(vi
10042		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10043		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
10044			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
10045			LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
10046			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10047		fi
10048
10049	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10050	if test "$cf_cv_shlib_version" = rel; then
10051		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10052	else
10053		cf_cv_shared_soname='`basename $@`'
10054	fi
10055
10056		MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
10057		;;
10058	netbsd*) #(vi
10059		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10060		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
10061			LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
10062			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10063			EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10064			if test "$cf_cv_shlib_version" = auto; then
10065			if test -f /usr/libexec/ld.elf_so; then
10066				cf_cv_shlib_version=abi
10067			else
10068				cf_cv_shlib_version=rel
10069			fi
10070			fi
10071
10072	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10073	if test "$cf_cv_shlib_version" = rel; then
10074		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10075	else
10076		cf_cv_shared_soname='`basename $@`'
10077	fi
10078
10079			MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
10080		else
10081			MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
10082		fi
10083		;;
10084	osf*|mls+*) #(vi
10085		# tested with OSF/1 V3.2 and 'cc'
10086		# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
10087		# link with shared libs).
10088		MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
10089		case $host_os in #(vi
10090		osf4*)
10091			MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
10092			;;
10093		esac
10094		MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
10095		if test "$DFT_LWR_MODEL" = "shared" ; then
10096			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10097			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10098		fi
10099		cf_cv_rm_so_locs=yes
10100		;;
10101	sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
10102		# tested with osr5.0.5
10103		if test "$GCC" != yes; then
10104			CC_SHARED_OPTS='-belf -KPIC'
10105		fi
10106		MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
10107		if test "$cf_cv_enable_rpath" = yes ; then
10108			# only way is to set LD_RUN_PATH but no switch for it
10109			RUN_PATH=$libdir
10110		fi
10111		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10112		LINK_PROGS='LD_RUN_PATH=${libdir}'
10113		LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
10114		;;
10115	sunos4*) #(vi
10116		# tested with SunOS 4.1.1 and gcc 2.7.0
10117		if test "$GCC" != yes; then
10118			CC_SHARED_OPTS='-KPIC'
10119		fi
10120		MK_SHARED_LIB='${LD} -assert pure-text -o $@'
10121		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10122		;;
10123	solaris2*) #(vi
10124		# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
10125		# tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
10126		if test "$DFT_LWR_MODEL" = "shared" ; then
10127			LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
10128			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10129		fi
10130		if test "$cf_cv_enable_rpath" = yes ; then
10131			EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
10132		fi
10133
10134	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10135	if test "$cf_cv_shlib_version" = rel; then
10136		cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10137	else
10138		cf_cv_shared_soname='`basename $@`'
10139	fi
10140
10141		if test "$GCC" != yes; then
10142			cf_save_CFLAGS="$CFLAGS"
10143			for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
10144			do
10145				CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
10146				cat >conftest.$ac_ext <<_ACEOF
10147#line 10147 "configure"
10148#include "confdefs.h"
10149#include <stdio.h>
10150int
10151main ()
10152{
10153printf("Hello\n");
10154  ;
10155  return 0;
10156}
10157_ACEOF
10158rm -f conftest.$ac_objext
10159if { (eval echo "$as_me:10159: \"$ac_compile\"") >&5
10160  (eval $ac_compile) 2>&5
10161  ac_status=$?
10162  echo "$as_me:10162: \$? = $ac_status" >&5
10163  (exit $ac_status); } &&
10164         { ac_try='test -s conftest.$ac_objext'
10165  { (eval echo "$as_me:10165: \"$ac_try\"") >&5
10166  (eval $ac_try) 2>&5
10167  ac_status=$?
10168  echo "$as_me:10168: \$? = $ac_status" >&5
10169  (exit $ac_status); }; }; then
10170  break
10171else
10172  echo "$as_me: failed program was:" >&5
10173cat conftest.$ac_ext >&5
10174fi
10175rm -f conftest.$ac_objext conftest.$ac_ext
10176			done
10177			CFLAGS="$cf_save_CFLAGS"
10178			CC_SHARED_OPTS=$cf_shared_opts
10179			MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
10180		else
10181			MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
10182		fi
10183		;;
10184	sysv5uw7*|unix_sv*) #(vi
10185		# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
10186		if test "$GCC" != yes; then
10187			CC_SHARED_OPTS='-KPIC'
10188		fi
10189		MK_SHARED_LIB='${LD} -d y -G -o $@'
10190		;;
10191	*)
10192		CC_SHARED_OPTS='unknown'
10193		MK_SHARED_LIB='echo unknown'
10194		;;
10195	esac
10196
10197	# This works if the last tokens in $MK_SHARED_LIB are the -o target.
10198	case "$cf_cv_shlib_version" in #(vi
10199	rel|abi)
10200		case "$MK_SHARED_LIB" in #(vi
10201		*'-o $@') #(vi
10202			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
10203			;;
10204		*)
10205			{ echo "$as_me:10205: WARNING: ignored --with-shlib-version" >&5
10206echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
10207			;;
10208		esac
10209		;;
10210	esac
10211
10212	if test -n "$cf_try_cflags"
10213	then
10214cat > conftest.$ac_ext <<EOF
10215#line 10215 "${as_me:-configure}"
10216#include <stdio.h>
10217int main(int argc, char *argv[])
10218{
10219	printf("hello\n");
10220	return (argv[argc-1] == 0) ;
10221}
10222EOF
10223		cf_save_CFLAGS="$CFLAGS"
10224		for cf_opt in $cf_try_cflags
10225		do
10226			CFLAGS="$cf_save_CFLAGS -$cf_opt"
10227			echo "$as_me:10227: checking if CFLAGS option -$cf_opt works" >&5
10228echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
10229			if { (eval echo "$as_me:10229: \"$ac_compile\"") >&5
10230  (eval $ac_compile) 2>&5
10231  ac_status=$?
10232  echo "$as_me:10232: \$? = $ac_status" >&5
10233  (exit $ac_status); }; then
10234				echo "$as_me:10234: result: yes" >&5
10235echo "${ECHO_T}yes" >&6
10236				cf_save_CFLAGS="$CFLAGS"
10237			else
10238				echo "$as_me:10238: result: no" >&5
10239echo "${ECHO_T}no" >&6
10240			fi
10241		done
10242		CFLAGS="$cf_save_CFLAGS"
10243	fi
10244
10245	# RPATH_LIST is a colon-separated list of directories
10246	test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
10247	test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
10248
10249	test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
10250
10251	test -n "$verbose" && echo "	CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
10252
10253echo "${as_me:-configure}:10253: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
10254
10255	test -n "$verbose" && echo "	MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
10256
10257echo "${as_me:-configure}:10257: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
10258
10259		LIB_PREP=:
10260		LIB_CREATE="$MK_SHARED_LIB"
10261		CFLAGS="$CFLAGS $CC_SHARED_OPTS"
10262		MAKE_NORMAL="#"
10263		MAKE_STATIC="#"
10264		MAKE_SHARED=
10265	fi
10266fi
10267
10268LIB_SUFFIX=
10269
10270	case X$LIB_MODEL in #(vi
10271	Xlibtool) #(vi
10272		DFT_LIB_SUFFIX='.la'
10273		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10274		;;
10275	Xdebug) #(vi
10276		DFT_LIB_SUFFIX='_g.a'
10277		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10278		;;
10279	Xprofile) #(vi
10280		DFT_LIB_SUFFIX='_p.a'
10281		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10282		;;
10283	Xshared) #(vi
10284		case $cf_cv_system_name in
10285		aix[5-7]*) #(vi
10286			DFT_LIB_SUFFIX='.a'
10287			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10288			;;
10289		cygwin*|msys*|mingw*) #(vi
10290			DFT_LIB_SUFFIX='.dll'
10291			DFT_DEP_SUFFIX='.dll.a'
10292			;;
10293		darwin*) #(vi
10294			DFT_LIB_SUFFIX='.dylib'
10295			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10296			;;
10297		hpux*) #(vi
10298			case $target in
10299			ia64*) #(vi
10300				DFT_LIB_SUFFIX='.so'
10301				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10302				;;
10303			*) #(vi
10304				DFT_LIB_SUFFIX='.sl'
10305				DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10306				;;
10307			esac
10308			;;
10309		*) #(vi
10310			DFT_LIB_SUFFIX='.so'
10311			DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10312			;;
10313		esac
10314		;;
10315	*)
10316		DFT_LIB_SUFFIX='.a'
10317		DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10318		;;
10319	esac
10320	test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
10321	test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
10322
10323LIB_SUFFIX=$DFT_LIB_SUFFIX
10324
10325echo "$as_me:10325: checking for specific curses-directory" >&5
10326echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
10327
10328# Check whether --with-curses-dir or --without-curses-dir was given.
10329if test "${with_curses_dir+set}" = set; then
10330  withval="$with_curses_dir"
10331  cf_cv_curses_dir=$withval
10332else
10333  cf_cv_curses_dir=no
10334fi;
10335echo "$as_me:10335: result: $cf_cv_curses_dir" >&5
10336echo "${ECHO_T}$cf_cv_curses_dir" >&6
10337
10338if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10339then
10340
10341if test "x$prefix" != xNONE; then
10342  cf_path_syntax="$prefix"
10343else
10344  cf_path_syntax="$ac_default_prefix"
10345fi
10346
10347case ".$withval" in #(vi
10348.\$\(*\)*|.\'*\'*) #(vi
10349  ;;
10350..|./*|.\\*) #(vi
10351  ;;
10352.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
10353  ;;
10354.\${*prefix}*|.\${*dir}*) #(vi
10355  eval withval="$withval"
10356  case ".$withval" in #(vi
10357  .NONE/*)
10358    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10359    ;;
10360  esac
10361  ;; #(vi
10362.no|.NONE/*)
10363  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10364  ;;
10365*)
10366  { { echo "$as_me:10366: error: expected a pathname, not \"$withval\"" >&5
10367echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
10368   { (exit 1); exit 1; }; }
10369  ;;
10370esac
10371
10372	if test -d "$cf_cv_curses_dir"
10373	then
10374
10375if test -n "$cf_cv_curses_dir/include" ; then
10376  for cf_add_incdir in $cf_cv_curses_dir/include
10377  do
10378	while test $cf_add_incdir != /usr/include
10379	do
10380	  if test -d $cf_add_incdir
10381	  then
10382		cf_have_incdir=no
10383		if test -n "$CFLAGS$CPPFLAGS" ; then
10384		  # a loop is needed to ensure we can add subdirs of existing dirs
10385		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10386			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10387			  cf_have_incdir=yes; break
10388			fi
10389		  done
10390		fi
10391
10392		if test "$cf_have_incdir" = no ; then
10393		  if test "$cf_add_incdir" = /usr/local/include ; then
10394			if test "$GCC" = yes
10395			then
10396			  cf_save_CPPFLAGS=$CPPFLAGS
10397			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10398			  cat >conftest.$ac_ext <<_ACEOF
10399#line 10399 "configure"
10400#include "confdefs.h"
10401#include <stdio.h>
10402int
10403main ()
10404{
10405printf("Hello")
10406  ;
10407  return 0;
10408}
10409_ACEOF
10410rm -f conftest.$ac_objext
10411if { (eval echo "$as_me:10411: \"$ac_compile\"") >&5
10412  (eval $ac_compile) 2>&5
10413  ac_status=$?
10414  echo "$as_me:10414: \$? = $ac_status" >&5
10415  (exit $ac_status); } &&
10416         { ac_try='test -s conftest.$ac_objext'
10417  { (eval echo "$as_me:10417: \"$ac_try\"") >&5
10418  (eval $ac_try) 2>&5
10419  ac_status=$?
10420  echo "$as_me:10420: \$? = $ac_status" >&5
10421  (exit $ac_status); }; }; then
10422  :
10423else
10424  echo "$as_me: failed program was:" >&5
10425cat conftest.$ac_ext >&5
10426cf_have_incdir=yes
10427fi
10428rm -f conftest.$ac_objext conftest.$ac_ext
10429			  CPPFLAGS=$cf_save_CPPFLAGS
10430			fi
10431		  fi
10432		fi
10433
10434		if test "$cf_have_incdir" = no ; then
10435		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
10436
10437echo "${as_me:-configure}:10437: testing adding $cf_add_incdir to include-path ..." 1>&5
10438
10439		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10440
10441		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10442		  test "$cf_top_incdir" = "$cf_add_incdir" && break
10443		  cf_add_incdir="$cf_top_incdir"
10444		else
10445		  break
10446		fi
10447	  fi
10448	done
10449  done
10450fi
10451
10452if test -n "$cf_cv_curses_dir/lib" ; then
10453  for cf_add_libdir in $cf_cv_curses_dir/lib
10454  do
10455    if test $cf_add_libdir = /usr/lib ; then
10456      :
10457    elif test -d $cf_add_libdir
10458    then
10459      cf_have_libdir=no
10460      if test -n "$LDFLAGS$LIBS" ; then
10461        # a loop is needed to ensure we can add subdirs of existing dirs
10462        for cf_test_libdir in $LDFLAGS $LIBS ; do
10463          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10464            cf_have_libdir=yes; break
10465          fi
10466        done
10467      fi
10468      if test "$cf_have_libdir" = no ; then
10469        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
10470
10471echo "${as_me:-configure}:10471: testing adding $cf_add_libdir to library-path ..." 1>&5
10472
10473        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10474      fi
10475    fi
10476  done
10477fi
10478
10479	fi
10480fi
10481
10482echo "$as_me:10482: checking if rpath option should be used" >&5
10483echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
10484
10485# Check whether --enable-rpath or --disable-rpath was given.
10486if test "${enable_rpath+set}" = set; then
10487  enableval="$enable_rpath"
10488  cf_cv_enable_rpath=$enableval
10489else
10490  cf_cv_enable_rpath=no
10491fi;
10492echo "$as_me:10492: result: $cf_cv_enable_rpath" >&5
10493echo "${ECHO_T}$cf_cv_enable_rpath" >&6
10494
10495use_ncurses=no
10496
10497# Check whether --with-ncurses or --without-ncurses was given.
10498if test "${with_ncurses+set}" = set; then
10499  withval="$with_ncurses"
10500  use_ncurses=ncurses
10501fi;
10502
10503# Check whether --with-ncursesw or --without-ncursesw was given.
10504if test "${with_ncursesw+set}" = set; then
10505  withval="$with_ncursesw"
10506  use_ncurses=ncursesw
10507fi;
10508if test $use_ncurses != no ; then
10509	cf_wide_curses=yes
10510	if test $use_ncurses = ncursesw ; then
10511
10512echo "$as_me:10512: checking for multibyte character support" >&5
10513echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
10514if test "${cf_cv_utf8_lib+set}" = set; then
10515  echo $ECHO_N "(cached) $ECHO_C" >&6
10516else
10517
10518	cf_save_LIBS="$LIBS"
10519	cat >conftest.$ac_ext <<_ACEOF
10520#line 10520 "configure"
10521#include "confdefs.h"
10522
10523#include <stdlib.h>
10524int
10525main ()
10526{
10527putwc(0,0);
10528  ;
10529  return 0;
10530}
10531_ACEOF
10532rm -f conftest.$ac_objext conftest$ac_exeext
10533if { (eval echo "$as_me:10533: \"$ac_link\"") >&5
10534  (eval $ac_link) 2>&5
10535  ac_status=$?
10536  echo "$as_me:10536: \$? = $ac_status" >&5
10537  (exit $ac_status); } &&
10538         { ac_try='test -s conftest$ac_exeext'
10539  { (eval echo "$as_me:10539: \"$ac_try\"") >&5
10540  (eval $ac_try) 2>&5
10541  ac_status=$?
10542  echo "$as_me:10542: \$? = $ac_status" >&5
10543  (exit $ac_status); }; }; then
10544  cf_cv_utf8_lib=yes
10545else
10546  echo "$as_me: failed program was:" >&5
10547cat conftest.$ac_ext >&5
10548
10549# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10550# will be set on completion of the AC_TRY_LINK below.
10551cf_cv_header_path_utf8=
10552cf_cv_library_path_utf8=
10553
10554echo "${as_me:-configure}:10554: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10555
10556cf_save_LIBS="$LIBS"
10557
10558cat >conftest.$ac_ext <<_ACEOF
10559#line 10559 "configure"
10560#include "confdefs.h"
10561
10562#include <libutf8.h>
10563int
10564main ()
10565{
10566putwc(0,0);
10567  ;
10568  return 0;
10569}
10570_ACEOF
10571rm -f conftest.$ac_objext conftest$ac_exeext
10572if { (eval echo "$as_me:10572: \"$ac_link\"") >&5
10573  (eval $ac_link) 2>&5
10574  ac_status=$?
10575  echo "$as_me:10575: \$? = $ac_status" >&5
10576  (exit $ac_status); } &&
10577         { ac_try='test -s conftest$ac_exeext'
10578  { (eval echo "$as_me:10578: \"$ac_try\"") >&5
10579  (eval $ac_try) 2>&5
10580  ac_status=$?
10581  echo "$as_me:10581: \$? = $ac_status" >&5
10582  (exit $ac_status); }; }; then
10583
10584	cf_cv_find_linkage_utf8=yes
10585	cf_cv_header_path_utf8=/usr/include
10586	cf_cv_library_path_utf8=/usr/lib
10587
10588else
10589  echo "$as_me: failed program was:" >&5
10590cat conftest.$ac_ext >&5
10591
10592LIBS="-lutf8  $cf_save_LIBS"
10593
10594cat >conftest.$ac_ext <<_ACEOF
10595#line 10595 "configure"
10596#include "confdefs.h"
10597
10598#include <libutf8.h>
10599int
10600main ()
10601{
10602putwc(0,0);
10603  ;
10604  return 0;
10605}
10606_ACEOF
10607rm -f conftest.$ac_objext conftest$ac_exeext
10608if { (eval echo "$as_me:10608: \"$ac_link\"") >&5
10609  (eval $ac_link) 2>&5
10610  ac_status=$?
10611  echo "$as_me:10611: \$? = $ac_status" >&5
10612  (exit $ac_status); } &&
10613         { ac_try='test -s conftest$ac_exeext'
10614  { (eval echo "$as_me:10614: \"$ac_try\"") >&5
10615  (eval $ac_try) 2>&5
10616  ac_status=$?
10617  echo "$as_me:10617: \$? = $ac_status" >&5
10618  (exit $ac_status); }; }; then
10619
10620	cf_cv_find_linkage_utf8=yes
10621	cf_cv_header_path_utf8=/usr/include
10622	cf_cv_library_path_utf8=/usr/lib
10623	cf_cv_library_file_utf8="-lutf8"
10624
10625else
10626  echo "$as_me: failed program was:" >&5
10627cat conftest.$ac_ext >&5
10628
10629	cf_cv_find_linkage_utf8=no
10630	LIBS="$cf_save_LIBS"
10631
10632    test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6
10633
10634echo "${as_me:-configure}:10634: testing find linkage for utf8 library ..." 1>&5
10635
10636echo "${as_me:-configure}:10636: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
10637
10638    cf_save_CPPFLAGS="$CPPFLAGS"
10639    cf_test_CPPFLAGS="$CPPFLAGS"
10640
10641cf_search=
10642
10643# collect the current set of include-directories from compiler flags
10644cf_header_path_list=""
10645if test -n "${CFLAGS}${CPPFLAGS}" ; then
10646	for cf_header_path in $CPPFLAGS $CFLAGS
10647	do
10648		case $cf_header_path in #(vi
10649		-I*)
10650			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10651
10652test "$cf_header_path" != "NONE" && \
10653test -d "$cf_header_path" && \
10654 {
10655	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
10656	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10657	test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10658	test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10659	test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10660	test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10661}
10662
10663			cf_header_path_list="$cf_header_path_list $cf_search"
10664			;;
10665		esac
10666	done
10667fi
10668
10669# add the variations for the package we are looking for
10670
10671cf_search=
10672
10673test "/usr" != "$prefix" && \
10674test -d "/usr" && \
10675(test $prefix = NONE || test "/usr" != "$prefix") && {
10676	test -n "$verbose" && echo "	... testing for include-directories under /usr"
10677	test -d /usr/include &&          cf_search="$cf_search /usr/include"
10678	test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
10679	test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
10680	test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
10681	test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
10682}
10683
10684test "$prefix" != "NONE" && \
10685test -d "$prefix" && \
10686 {
10687	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
10688	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10689	test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10690	test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10691	test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10692	test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10693}
10694
10695test "/usr/local" != "$prefix" && \
10696test -d "/usr/local" && \
10697(test $prefix = NONE || test "/usr/local" != "$prefix") && {
10698	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
10699	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
10700	test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
10701	test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
10702	test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
10703	test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
10704}
10705
10706test "/opt" != "$prefix" && \
10707test -d "/opt" && \
10708(test $prefix = NONE || test "/opt" != "$prefix") && {
10709	test -n "$verbose" && echo "	... testing for include-directories under /opt"
10710	test -d /opt/include &&          cf_search="$cf_search /opt/include"
10711	test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
10712	test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
10713	test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
10714	test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
10715}
10716
10717test "$HOME" != "$prefix" && \
10718test -d "$HOME" && \
10719(test $prefix = NONE || test "$HOME" != "$prefix") && {
10720	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
10721	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
10722	test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
10723	test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
10724	test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
10725	test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
10726}
10727
10728test "$includedir" != NONE && \
10729test "$includedir" != "/usr/include" && \
10730test -d "$includedir" && {
10731	test -d $includedir &&    cf_search="$cf_search $includedir"
10732	test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10733}
10734
10735test "$oldincludedir" != NONE && \
10736test "$oldincludedir" != "/usr/include" && \
10737test -d "$oldincludedir" && {
10738	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10739	test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10740}
10741
10742cf_search="$cf_search $cf_header_path_list"
10743
10744    for cf_cv_header_path_utf8 in $cf_search
10745    do
10746      if test -d $cf_cv_header_path_utf8 ; then
10747        test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6
10748
10749echo "${as_me:-configure}:10749: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10750
10751        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10752        cat >conftest.$ac_ext <<_ACEOF
10753#line 10753 "configure"
10754#include "confdefs.h"
10755
10756#include <libutf8.h>
10757int
10758main ()
10759{
10760putwc(0,0);
10761  ;
10762  return 0;
10763}
10764_ACEOF
10765rm -f conftest.$ac_objext
10766if { (eval echo "$as_me:10766: \"$ac_compile\"") >&5
10767  (eval $ac_compile) 2>&5
10768  ac_status=$?
10769  echo "$as_me:10769: \$? = $ac_status" >&5
10770  (exit $ac_status); } &&
10771         { ac_try='test -s conftest.$ac_objext'
10772  { (eval echo "$as_me:10772: \"$ac_try\"") >&5
10773  (eval $ac_try) 2>&5
10774  ac_status=$?
10775  echo "$as_me:10775: \$? = $ac_status" >&5
10776  (exit $ac_status); }; }; then
10777
10778            test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10779
10780echo "${as_me:-configure}:10780: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10781
10782            cf_cv_find_linkage_utf8=maybe
10783            cf_test_CPPFLAGS="$CPPFLAGS"
10784            break
10785else
10786  echo "$as_me: failed program was:" >&5
10787cat conftest.$ac_ext >&5
10788
10789            CPPFLAGS="$cf_save_CPPFLAGS"
10790
10791fi
10792rm -f conftest.$ac_objext conftest.$ac_ext
10793      fi
10794    done
10795
10796    if test "$cf_cv_find_linkage_utf8" = maybe ; then
10797
10798echo "${as_me:-configure}:10798: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10799
10800      cf_save_LIBS="$LIBS"
10801      cf_save_LDFLAGS="$LDFLAGS"
10802
10803      if test "$cf_cv_find_linkage_utf8" != yes ; then
10804
10805cf_search=
10806cf_library_path_list=""
10807if test -n "${LDFLAGS}${LIBS}" ; then
10808	for cf_library_path in $LDFLAGS $LIBS
10809	do
10810		case $cf_library_path in #(vi
10811		-L*)
10812			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10813
10814test "$cf_library_path" != "NONE" && \
10815test -d "$cf_library_path" && \
10816 {
10817	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
10818	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10819	test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10820	test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10821	test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10822	test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10823}
10824
10825			cf_library_path_list="$cf_library_path_list $cf_search"
10826			;;
10827		esac
10828	done
10829fi
10830
10831cf_search=
10832
10833test "/usr" != "$prefix" && \
10834test -d "/usr" && \
10835(test $prefix = NONE || test "/usr" != "$prefix") && {
10836	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
10837	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
10838	test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
10839	test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
10840	test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
10841	test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
10842}
10843
10844test "$prefix" != "NONE" && \
10845test -d "$prefix" && \
10846 {
10847	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
10848	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10849	test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10850	test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10851	test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10852	test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10853}
10854
10855test "/usr/local" != "$prefix" && \
10856test -d "/usr/local" && \
10857(test $prefix = NONE || test "/usr/local" != "$prefix") && {
10858	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
10859	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
10860	test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
10861	test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
10862	test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
10863	test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
10864}
10865
10866test "/opt" != "$prefix" && \
10867test -d "/opt" && \
10868(test $prefix = NONE || test "/opt" != "$prefix") && {
10869	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
10870	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
10871	test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
10872	test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
10873	test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
10874	test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
10875}
10876
10877test "$HOME" != "$prefix" && \
10878test -d "$HOME" && \
10879(test $prefix = NONE || test "$HOME" != "$prefix") && {
10880	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
10881	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
10882	test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
10883	test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
10884	test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
10885	test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
10886}
10887
10888cf_search="$cf_library_path_list $cf_search"
10889
10890        for cf_cv_library_path_utf8 in $cf_search
10891        do
10892          if test -d $cf_cv_library_path_utf8 ; then
10893            test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6
10894
10895echo "${as_me:-configure}:10895: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10896
10897            CPPFLAGS="$cf_test_CPPFLAGS"
10898            LIBS="-lutf8  $cf_save_LIBS"
10899            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10900            cat >conftest.$ac_ext <<_ACEOF
10901#line 10901 "configure"
10902#include "confdefs.h"
10903
10904#include <libutf8.h>
10905int
10906main ()
10907{
10908putwc(0,0);
10909  ;
10910  return 0;
10911}
10912_ACEOF
10913rm -f conftest.$ac_objext conftest$ac_exeext
10914if { (eval echo "$as_me:10914: \"$ac_link\"") >&5
10915  (eval $ac_link) 2>&5
10916  ac_status=$?
10917  echo "$as_me:10917: \$? = $ac_status" >&5
10918  (exit $ac_status); } &&
10919         { ac_try='test -s conftest$ac_exeext'
10920  { (eval echo "$as_me:10920: \"$ac_try\"") >&5
10921  (eval $ac_try) 2>&5
10922  ac_status=$?
10923  echo "$as_me:10923: \$? = $ac_status" >&5
10924  (exit $ac_status); }; }; then
10925
10926                test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10927
10928echo "${as_me:-configure}:10928: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10929
10930                cf_cv_find_linkage_utf8=yes
10931                cf_cv_library_file_utf8="-lutf8"
10932                break
10933else
10934  echo "$as_me: failed program was:" >&5
10935cat conftest.$ac_ext >&5
10936
10937                CPPFLAGS="$cf_save_CPPFLAGS"
10938                LIBS="$cf_save_LIBS"
10939                LDFLAGS="$cf_save_LDFLAGS"
10940
10941fi
10942rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10943          fi
10944        done
10945        CPPFLAGS="$cf_save_CPPFLAGS"
10946        LDFLAGS="$cf_save_LDFLAGS"
10947      fi
10948
10949    else
10950      cf_cv_find_linkage_utf8=no
10951    fi
10952
10953fi
10954rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10955
10956fi
10957rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10958
10959LIBS="$cf_save_LIBS"
10960
10961if test "$cf_cv_find_linkage_utf8" = yes ; then
10962cf_cv_utf8_lib=add-on
10963else
10964cf_cv_utf8_lib=no
10965fi
10966
10967fi
10968rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10969fi
10970echo "$as_me:10970: result: $cf_cv_utf8_lib" >&5
10971echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10972
10973# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10974# ncurses/ncursesw:
10975if test "$cf_cv_utf8_lib" = "add-on" ; then
10976
10977cat >>confdefs.h <<\EOF
10978#define HAVE_LIBUTF8_H 1
10979EOF
10980
10981if test -n "$cf_cv_header_path_utf8" ; then
10982  for cf_add_incdir in $cf_cv_header_path_utf8
10983  do
10984	while test $cf_add_incdir != /usr/include
10985	do
10986	  if test -d $cf_add_incdir
10987	  then
10988		cf_have_incdir=no
10989		if test -n "$CFLAGS$CPPFLAGS" ; then
10990		  # a loop is needed to ensure we can add subdirs of existing dirs
10991		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10992			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10993			  cf_have_incdir=yes; break
10994			fi
10995		  done
10996		fi
10997
10998		if test "$cf_have_incdir" = no ; then
10999		  if test "$cf_add_incdir" = /usr/local/include ; then
11000			if test "$GCC" = yes
11001			then
11002			  cf_save_CPPFLAGS=$CPPFLAGS
11003			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11004			  cat >conftest.$ac_ext <<_ACEOF
11005#line 11005 "configure"
11006#include "confdefs.h"
11007#include <stdio.h>
11008int
11009main ()
11010{
11011printf("Hello")
11012  ;
11013  return 0;
11014}
11015_ACEOF
11016rm -f conftest.$ac_objext
11017if { (eval echo "$as_me:11017: \"$ac_compile\"") >&5
11018  (eval $ac_compile) 2>&5
11019  ac_status=$?
11020  echo "$as_me:11020: \$? = $ac_status" >&5
11021  (exit $ac_status); } &&
11022         { ac_try='test -s conftest.$ac_objext'
11023  { (eval echo "$as_me:11023: \"$ac_try\"") >&5
11024  (eval $ac_try) 2>&5
11025  ac_status=$?
11026  echo "$as_me:11026: \$? = $ac_status" >&5
11027  (exit $ac_status); }; }; then
11028  :
11029else
11030  echo "$as_me: failed program was:" >&5
11031cat conftest.$ac_ext >&5
11032cf_have_incdir=yes
11033fi
11034rm -f conftest.$ac_objext conftest.$ac_ext
11035			  CPPFLAGS=$cf_save_CPPFLAGS
11036			fi
11037		  fi
11038		fi
11039
11040		if test "$cf_have_incdir" = no ; then
11041		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
11042
11043echo "${as_me:-configure}:11043: testing adding $cf_add_incdir to include-path ..." 1>&5
11044
11045		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11046
11047		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11048		  test "$cf_top_incdir" = "$cf_add_incdir" && break
11049		  cf_add_incdir="$cf_top_incdir"
11050		else
11051		  break
11052		fi
11053	  fi
11054	done
11055  done
11056fi
11057
11058if test -n "$cf_cv_library_path_utf8" ; then
11059  for cf_add_libdir in $cf_cv_library_path_utf8
11060  do
11061    if test $cf_add_libdir = /usr/lib ; then
11062      :
11063    elif test -d $cf_add_libdir
11064    then
11065      cf_have_libdir=no
11066      if test -n "$LDFLAGS$LIBS" ; then
11067        # a loop is needed to ensure we can add subdirs of existing dirs
11068        for cf_test_libdir in $LDFLAGS $LIBS ; do
11069          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11070            cf_have_libdir=yes; break
11071          fi
11072        done
11073      fi
11074      if test "$cf_have_libdir" = no ; then
11075        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11076
11077echo "${as_me:-configure}:11077: testing adding $cf_add_libdir to library-path ..." 1>&5
11078
11079        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11080      fi
11081    fi
11082  done
11083fi
11084
11085	LIBS="$cf_cv_library_file_utf8 $LIBS"
11086fi
11087
11088	fi
11089
11090cf_ncuconfig_root=$use_ncurses
11091
11092echo "Looking for ${cf_ncuconfig_root}-config"
11093
11094if test -n "$ac_tool_prefix"; then
11095  for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
11096  do
11097    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11098set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11099echo "$as_me:11099: checking for $ac_word" >&5
11100echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11101if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
11102  echo $ECHO_N "(cached) $ECHO_C" >&6
11103else
11104  if test -n "$NCURSES_CONFIG"; then
11105  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
11106else
11107  ac_save_IFS=$IFS; IFS=$ac_path_separator
11108ac_dummy="$PATH"
11109for ac_dir in $ac_dummy; do
11110  IFS=$ac_save_IFS
11111  test -z "$ac_dir" && ac_dir=.
11112  $as_executable_p "$ac_dir/$ac_word" || continue
11113ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
11114echo "$as_me:11114: found $ac_dir/$ac_word" >&5
11115break
11116done
11117
11118fi
11119fi
11120NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
11121if test -n "$NCURSES_CONFIG"; then
11122  echo "$as_me:11122: result: $NCURSES_CONFIG" >&5
11123echo "${ECHO_T}$NCURSES_CONFIG" >&6
11124else
11125  echo "$as_me:11125: result: no" >&5
11126echo "${ECHO_T}no" >&6
11127fi
11128
11129    test -n "$NCURSES_CONFIG" && break
11130  done
11131fi
11132if test -z "$NCURSES_CONFIG"; then
11133  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
11134  for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
11135do
11136  # Extract the first word of "$ac_prog", so it can be a program name with args.
11137set dummy $ac_prog; ac_word=$2
11138echo "$as_me:11138: checking for $ac_word" >&5
11139echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11140if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
11141  echo $ECHO_N "(cached) $ECHO_C" >&6
11142else
11143  if test -n "$ac_ct_NCURSES_CONFIG"; then
11144  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
11145else
11146  ac_save_IFS=$IFS; IFS=$ac_path_separator
11147ac_dummy="$PATH"
11148for ac_dir in $ac_dummy; do
11149  IFS=$ac_save_IFS
11150  test -z "$ac_dir" && ac_dir=.
11151  $as_executable_p "$ac_dir/$ac_word" || continue
11152ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
11153echo "$as_me:11153: found $ac_dir/$ac_word" >&5
11154break
11155done
11156
11157fi
11158fi
11159ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
11160if test -n "$ac_ct_NCURSES_CONFIG"; then
11161  echo "$as_me:11161: result: $ac_ct_NCURSES_CONFIG" >&5
11162echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
11163else
11164  echo "$as_me:11164: result: no" >&5
11165echo "${ECHO_T}no" >&6
11166fi
11167
11168  test -n "$ac_ct_NCURSES_CONFIG" && break
11169done
11170test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
11171
11172  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
11173fi
11174
11175if test "$NCURSES_CONFIG" != none ; then
11176
11177CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
11178LIBS="`$NCURSES_CONFIG --libs` $LIBS"
11179
11180# even with config script, some packages use no-override for curses.h
11181
11182echo "$as_me:11182: checking if we have identified curses headers" >&5
11183echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
11184if test "${cf_cv_ncurses_header+set}" = set; then
11185  echo $ECHO_N "(cached) $ECHO_C" >&6
11186else
11187
11188cf_cv_ncurses_header=none
11189for cf_header in  \
11190    $use_ncurses/ncurses.h \
11191	$use_ncurses/curses.h \
11192	ncurses.h \
11193	curses.h
11194do
11195cat >conftest.$ac_ext <<_ACEOF
11196#line 11196 "configure"
11197#include "confdefs.h"
11198#include <${cf_header}>
11199int
11200main ()
11201{
11202initscr(); tgoto("?", 0,0)
11203  ;
11204  return 0;
11205}
11206_ACEOF
11207rm -f conftest.$ac_objext
11208if { (eval echo "$as_me:11208: \"$ac_compile\"") >&5
11209  (eval $ac_compile) 2>&5
11210  ac_status=$?
11211  echo "$as_me:11211: \$? = $ac_status" >&5
11212  (exit $ac_status); } &&
11213         { ac_try='test -s conftest.$ac_objext'
11214  { (eval echo "$as_me:11214: \"$ac_try\"") >&5
11215  (eval $ac_try) 2>&5
11216  ac_status=$?
11217  echo "$as_me:11217: \$? = $ac_status" >&5
11218  (exit $ac_status); }; }; then
11219  cf_cv_ncurses_header=$cf_header; break
11220else
11221  echo "$as_me: failed program was:" >&5
11222cat conftest.$ac_ext >&5
11223fi
11224rm -f conftest.$ac_objext conftest.$ac_ext
11225done
11226
11227fi
11228echo "$as_me:11228: result: $cf_cv_ncurses_header" >&5
11229echo "${ECHO_T}$cf_cv_ncurses_header" >&6
11230
11231if test "$cf_cv_ncurses_header" = none ; then
11232	{ { echo "$as_me:11232: error: No curses header-files found" >&5
11233echo "$as_me: error: No curses header-files found" >&2;}
11234   { (exit 1); exit 1; }; }
11235fi
11236
11237# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
11238
11239for ac_header in $cf_cv_ncurses_header
11240do
11241as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11242echo "$as_me:11242: checking for $ac_header" >&5
11243echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11244if eval "test \"\${$as_ac_Header+set}\" = set"; then
11245  echo $ECHO_N "(cached) $ECHO_C" >&6
11246else
11247  cat >conftest.$ac_ext <<_ACEOF
11248#line 11248 "configure"
11249#include "confdefs.h"
11250#include <$ac_header>
11251_ACEOF
11252if { (eval echo "$as_me:11252: \"$ac_cpp conftest.$ac_ext\"") >&5
11253  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11254  ac_status=$?
11255  egrep -v '^ *\+' conftest.er1 >conftest.err
11256  rm -f conftest.er1
11257  cat conftest.err >&5
11258  echo "$as_me:11258: \$? = $ac_status" >&5
11259  (exit $ac_status); } >/dev/null; then
11260  if test -s conftest.err; then
11261    ac_cpp_err=$ac_c_preproc_warn_flag
11262  else
11263    ac_cpp_err=
11264  fi
11265else
11266  ac_cpp_err=yes
11267fi
11268if test -z "$ac_cpp_err"; then
11269  eval "$as_ac_Header=yes"
11270else
11271  echo "$as_me: failed program was:" >&5
11272  cat conftest.$ac_ext >&5
11273  eval "$as_ac_Header=no"
11274fi
11275rm -f conftest.err conftest.$ac_ext
11276fi
11277echo "$as_me:11277: result: `eval echo '${'$as_ac_Header'}'`" >&5
11278echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11279if test `eval echo '${'$as_ac_Header'}'` = yes; then
11280  cat >>confdefs.h <<EOF
11281#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11282EOF
11283
11284fi
11285done
11286
11287cat >>confdefs.h <<\EOF
11288#define NCURSES 1
11289EOF
11290
11291cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11292
11293cat >>confdefs.h <<EOF
11294#define $cf_nculib_ROOT 1
11295EOF
11296
11297cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
11298
11299else
11300
11301cf_ncuhdr_root=$use_ncurses
11302
11303test -n "$cf_cv_curses_dir" && \
11304test "$cf_cv_curses_dir" != "no" && { \
11305
11306if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
11307  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
11308  do
11309	while test $cf_add_incdir != /usr/include
11310	do
11311	  if test -d $cf_add_incdir
11312	  then
11313		cf_have_incdir=no
11314		if test -n "$CFLAGS$CPPFLAGS" ; then
11315		  # a loop is needed to ensure we can add subdirs of existing dirs
11316		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11317			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11318			  cf_have_incdir=yes; break
11319			fi
11320		  done
11321		fi
11322
11323		if test "$cf_have_incdir" = no ; then
11324		  if test "$cf_add_incdir" = /usr/local/include ; then
11325			if test "$GCC" = yes
11326			then
11327			  cf_save_CPPFLAGS=$CPPFLAGS
11328			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11329			  cat >conftest.$ac_ext <<_ACEOF
11330#line 11330 "configure"
11331#include "confdefs.h"
11332#include <stdio.h>
11333int
11334main ()
11335{
11336printf("Hello")
11337  ;
11338  return 0;
11339}
11340_ACEOF
11341rm -f conftest.$ac_objext
11342if { (eval echo "$as_me:11342: \"$ac_compile\"") >&5
11343  (eval $ac_compile) 2>&5
11344  ac_status=$?
11345  echo "$as_me:11345: \$? = $ac_status" >&5
11346  (exit $ac_status); } &&
11347         { ac_try='test -s conftest.$ac_objext'
11348  { (eval echo "$as_me:11348: \"$ac_try\"") >&5
11349  (eval $ac_try) 2>&5
11350  ac_status=$?
11351  echo "$as_me:11351: \$? = $ac_status" >&5
11352  (exit $ac_status); }; }; then
11353  :
11354else
11355  echo "$as_me: failed program was:" >&5
11356cat conftest.$ac_ext >&5
11357cf_have_incdir=yes
11358fi
11359rm -f conftest.$ac_objext conftest.$ac_ext
11360			  CPPFLAGS=$cf_save_CPPFLAGS
11361			fi
11362		  fi
11363		fi
11364
11365		if test "$cf_have_incdir" = no ; then
11366		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
11367
11368echo "${as_me:-configure}:11368: testing adding $cf_add_incdir to include-path ..." 1>&5
11369
11370		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11371
11372		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11373		  test "$cf_top_incdir" = "$cf_add_incdir" && break
11374		  cf_add_incdir="$cf_top_incdir"
11375		else
11376		  break
11377		fi
11378	  fi
11379	done
11380  done
11381fi
11382
11383}
11384
11385echo "$as_me:11385: checking for $cf_ncuhdr_root header in include-path" >&5
11386echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
11387if test "${cf_cv_ncurses_h+set}" = set; then
11388  echo $ECHO_N "(cached) $ECHO_C" >&6
11389else
11390
11391	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
11392	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
11393	for cf_header in $cf_header_list
11394	do
11395
11396	cat >conftest.$ac_ext <<_ACEOF
11397#line 11397 "configure"
11398#include "confdefs.h"
11399
11400#include <$cf_header>
11401int
11402main ()
11403{
11404
11405#ifdef NCURSES_VERSION
11406
11407printf("%s\n", NCURSES_VERSION);
11408#else
11409#ifdef __NCURSES_H
11410printf("old\n");
11411#else
11412	make an error
11413#endif
11414#endif
11415
11416  ;
11417  return 0;
11418}
11419_ACEOF
11420rm -f conftest.$ac_objext
11421if { (eval echo "$as_me:11421: \"$ac_compile\"") >&5
11422  (eval $ac_compile) 2>&5
11423  ac_status=$?
11424  echo "$as_me:11424: \$? = $ac_status" >&5
11425  (exit $ac_status); } &&
11426         { ac_try='test -s conftest.$ac_objext'
11427  { (eval echo "$as_me:11427: \"$ac_try\"") >&5
11428  (eval $ac_try) 2>&5
11429  ac_status=$?
11430  echo "$as_me:11430: \$? = $ac_status" >&5
11431  (exit $ac_status); }; }; then
11432  cf_cv_ncurses_h=$cf_header
11433
11434else
11435  echo "$as_me: failed program was:" >&5
11436cat conftest.$ac_ext >&5
11437cf_cv_ncurses_h=no
11438fi
11439rm -f conftest.$ac_objext conftest.$ac_ext
11440
11441		test "$cf_cv_ncurses_h" != no && break
11442	done
11443
11444fi
11445echo "$as_me:11445: result: $cf_cv_ncurses_h" >&5
11446echo "${ECHO_T}$cf_cv_ncurses_h" >&6
11447
11448if test "$cf_cv_ncurses_h" != no ; then
11449	cf_cv_ncurses_header=$cf_cv_ncurses_h
11450else
11451
11452echo "$as_me:11452: checking for $cf_ncuhdr_root include-path" >&5
11453echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
11454if test "${cf_cv_ncurses_h2+set}" = set; then
11455  echo $ECHO_N "(cached) $ECHO_C" >&6
11456else
11457
11458	test -n "$verbose" && echo
11459
11460cf_search=
11461
11462# collect the current set of include-directories from compiler flags
11463cf_header_path_list=""
11464if test -n "${CFLAGS}${CPPFLAGS}" ; then
11465	for cf_header_path in $CPPFLAGS $CFLAGS
11466	do
11467		case $cf_header_path in #(vi
11468		-I*)
11469			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11470
11471test "$cf_header_path" != "NONE" && \
11472test -d "$cf_header_path" && \
11473 {
11474	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
11475	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11476	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
11477	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
11478	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
11479	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"
11480}
11481
11482			cf_header_path_list="$cf_header_path_list $cf_search"
11483			;;
11484		esac
11485	done
11486fi
11487
11488# add the variations for the package we are looking for
11489
11490cf_search=
11491
11492test "/usr" != "$prefix" && \
11493test -d "/usr" && \
11494(test $prefix = NONE || test "/usr" != "$prefix") && {
11495	test -n "$verbose" && echo "	... testing for include-directories under /usr"
11496	test -d /usr/include &&          cf_search="$cf_search /usr/include"
11497	test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
11498	test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
11499	test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
11500	test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11501}
11502
11503test "$prefix" != "NONE" && \
11504test -d "$prefix" && \
11505 {
11506	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
11507	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11508	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
11509	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
11510	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
11511	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11512}
11513
11514test "/usr/local" != "$prefix" && \
11515test -d "/usr/local" && \
11516(test $prefix = NONE || test "/usr/local" != "$prefix") && {
11517	test -n "$verbose" && echo "	... testing for include-directories under /usr/local"
11518	test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
11519	test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
11520	test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
11521	test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
11522	test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11523}
11524
11525test "/opt" != "$prefix" && \
11526test -d "/opt" && \
11527(test $prefix = NONE || test "/opt" != "$prefix") && {
11528	test -n "$verbose" && echo "	... testing for include-directories under /opt"
11529	test -d /opt/include &&          cf_search="$cf_search /opt/include"
11530	test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
11531	test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
11532	test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
11533	test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11534}
11535
11536test "$HOME" != "$prefix" && \
11537test -d "$HOME" && \
11538(test $prefix = NONE || test "$HOME" != "$prefix") && {
11539	test -n "$verbose" && echo "	... testing for include-directories under $HOME"
11540	test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
11541	test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
11542	test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
11543	test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
11544	test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11545}
11546
11547test "$includedir" != NONE && \
11548test "$includedir" != "/usr/include" && \
11549test -d "$includedir" && {
11550	test -d $includedir &&    cf_search="$cf_search $includedir"
11551	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
11552}
11553
11554test "$oldincludedir" != NONE && \
11555test "$oldincludedir" != "/usr/include" && \
11556test -d "$oldincludedir" && {
11557	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11558	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
11559}
11560
11561cf_search="$cf_search $cf_header_path_list"
11562
11563	test -n "$verbose" && echo search path $cf_search
11564	cf_save2_CPPFLAGS="$CPPFLAGS"
11565	for cf_incdir in $cf_search
11566	do
11567
11568if test -n "$cf_incdir" ; then
11569  for cf_add_incdir in $cf_incdir
11570  do
11571	while test $cf_add_incdir != /usr/include
11572	do
11573	  if test -d $cf_add_incdir
11574	  then
11575		cf_have_incdir=no
11576		if test -n "$CFLAGS$CPPFLAGS" ; then
11577		  # a loop is needed to ensure we can add subdirs of existing dirs
11578		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11579			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11580			  cf_have_incdir=yes; break
11581			fi
11582		  done
11583		fi
11584
11585		if test "$cf_have_incdir" = no ; then
11586		  if test "$cf_add_incdir" = /usr/local/include ; then
11587			if test "$GCC" = yes
11588			then
11589			  cf_save_CPPFLAGS=$CPPFLAGS
11590			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11591			  cat >conftest.$ac_ext <<_ACEOF
11592#line 11592 "configure"
11593#include "confdefs.h"
11594#include <stdio.h>
11595int
11596main ()
11597{
11598printf("Hello")
11599  ;
11600  return 0;
11601}
11602_ACEOF
11603rm -f conftest.$ac_objext
11604if { (eval echo "$as_me:11604: \"$ac_compile\"") >&5
11605  (eval $ac_compile) 2>&5
11606  ac_status=$?
11607  echo "$as_me:11607: \$? = $ac_status" >&5
11608  (exit $ac_status); } &&
11609         { ac_try='test -s conftest.$ac_objext'
11610  { (eval echo "$as_me:11610: \"$ac_try\"") >&5
11611  (eval $ac_try) 2>&5
11612  ac_status=$?
11613  echo "$as_me:11613: \$? = $ac_status" >&5
11614  (exit $ac_status); }; }; then
11615  :
11616else
11617  echo "$as_me: failed program was:" >&5
11618cat conftest.$ac_ext >&5
11619cf_have_incdir=yes
11620fi
11621rm -f conftest.$ac_objext conftest.$ac_ext
11622			  CPPFLAGS=$cf_save_CPPFLAGS
11623			fi
11624		  fi
11625		fi
11626
11627		if test "$cf_have_incdir" = no ; then
11628		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
11629
11630echo "${as_me:-configure}:11630: testing adding $cf_add_incdir to include-path ..." 1>&5
11631
11632		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11633
11634		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11635		  test "$cf_top_incdir" = "$cf_add_incdir" && break
11636		  cf_add_incdir="$cf_top_incdir"
11637		else
11638		  break
11639		fi
11640	  fi
11641	done
11642  done
11643fi
11644
11645		for cf_header in \
11646			ncurses.h \
11647			curses.h
11648		do
11649
11650	cat >conftest.$ac_ext <<_ACEOF
11651#line 11651 "configure"
11652#include "confdefs.h"
11653
11654#include <$cf_header>
11655int
11656main ()
11657{
11658
11659#ifdef NCURSES_VERSION
11660
11661printf("%s\n", NCURSES_VERSION);
11662#else
11663#ifdef __NCURSES_H
11664printf("old\n");
11665#else
11666	make an error
11667#endif
11668#endif
11669
11670  ;
11671  return 0;
11672}
11673_ACEOF
11674rm -f conftest.$ac_objext
11675if { (eval echo "$as_me:11675: \"$ac_compile\"") >&5
11676  (eval $ac_compile) 2>&5
11677  ac_status=$?
11678  echo "$as_me:11678: \$? = $ac_status" >&5
11679  (exit $ac_status); } &&
11680         { ac_try='test -s conftest.$ac_objext'
11681  { (eval echo "$as_me:11681: \"$ac_try\"") >&5
11682  (eval $ac_try) 2>&5
11683  ac_status=$?
11684  echo "$as_me:11684: \$? = $ac_status" >&5
11685  (exit $ac_status); }; }; then
11686  cf_cv_ncurses_h2=$cf_header
11687
11688else
11689  echo "$as_me: failed program was:" >&5
11690cat conftest.$ac_ext >&5
11691cf_cv_ncurses_h2=no
11692fi
11693rm -f conftest.$ac_objext conftest.$ac_ext
11694
11695			if test "$cf_cv_ncurses_h2" != no ; then
11696				cf_cv_ncurses_h2=$cf_incdir/$cf_header
11697				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
11698				break
11699			fi
11700			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
11701		done
11702		CPPFLAGS="$cf_save2_CPPFLAGS"
11703		test "$cf_cv_ncurses_h2" != no && break
11704	done
11705	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11705: error: not found" >&5
11706echo "$as_me: error: not found" >&2;}
11707   { (exit 1); exit 1; }; }
11708
11709fi
11710echo "$as_me:11710: result: $cf_cv_ncurses_h2" >&5
11711echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11712
11713	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
11714	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
11715	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
11716		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
11717	fi
11718
11719if test -n "$cf_1st_incdir" ; then
11720  for cf_add_incdir in $cf_1st_incdir
11721  do
11722	while test $cf_add_incdir != /usr/include
11723	do
11724	  if test -d $cf_add_incdir
11725	  then
11726		cf_have_incdir=no
11727		if test -n "$CFLAGS$CPPFLAGS" ; then
11728		  # a loop is needed to ensure we can add subdirs of existing dirs
11729		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11730			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11731			  cf_have_incdir=yes; break
11732			fi
11733		  done
11734		fi
11735
11736		if test "$cf_have_incdir" = no ; then
11737		  if test "$cf_add_incdir" = /usr/local/include ; then
11738			if test "$GCC" = yes
11739			then
11740			  cf_save_CPPFLAGS=$CPPFLAGS
11741			  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11742			  cat >conftest.$ac_ext <<_ACEOF
11743#line 11743 "configure"
11744#include "confdefs.h"
11745#include <stdio.h>
11746int
11747main ()
11748{
11749printf("Hello")
11750  ;
11751  return 0;
11752}
11753_ACEOF
11754rm -f conftest.$ac_objext
11755if { (eval echo "$as_me:11755: \"$ac_compile\"") >&5
11756  (eval $ac_compile) 2>&5
11757  ac_status=$?
11758  echo "$as_me:11758: \$? = $ac_status" >&5
11759  (exit $ac_status); } &&
11760         { ac_try='test -s conftest.$ac_objext'
11761  { (eval echo "$as_me:11761: \"$ac_try\"") >&5
11762  (eval $ac_try) 2>&5
11763  ac_status=$?
11764  echo "$as_me:11764: \$? = $ac_status" >&5
11765  (exit $ac_status); }; }; then
11766  :
11767else
11768  echo "$as_me: failed program was:" >&5
11769cat conftest.$ac_ext >&5
11770cf_have_incdir=yes
11771fi
11772rm -f conftest.$ac_objext conftest.$ac_ext
11773			  CPPFLAGS=$cf_save_CPPFLAGS
11774			fi
11775		  fi
11776		fi
11777
11778		if test "$cf_have_incdir" = no ; then
11779		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
11780
11781echo "${as_me:-configure}:11781: testing adding $cf_add_incdir to include-path ..." 1>&5
11782
11783		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11784
11785		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11786		  test "$cf_top_incdir" = "$cf_add_incdir" && break
11787		  cf_add_incdir="$cf_top_incdir"
11788		else
11789		  break
11790		fi
11791	  fi
11792	done
11793  done
11794fi
11795
11796fi
11797
11798# Set definitions to allow ifdef'ing for ncurses.h
11799
11800case $cf_cv_ncurses_header in # (vi
11801*ncurses.h)
11802
11803cat >>confdefs.h <<\EOF
11804#define HAVE_NCURSES_H 1
11805EOF
11806
11807	;;
11808esac
11809
11810case $cf_cv_ncurses_header in # (vi
11811ncurses/curses.h|ncurses/ncurses.h)
11812
11813cat >>confdefs.h <<\EOF
11814#define HAVE_NCURSES_NCURSES_H 1
11815EOF
11816
11817	;;
11818ncursesw/curses.h|ncursesw/ncurses.h)
11819
11820cat >>confdefs.h <<\EOF
11821#define HAVE_NCURSESW_NCURSES_H 1
11822EOF
11823
11824	;;
11825esac
11826
11827echo "$as_me:11827: checking for terminfo header" >&5
11828echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11829if test "${cf_cv_term_header+set}" = set; then
11830  echo $ECHO_N "(cached) $ECHO_C" >&6
11831else
11832
11833case ${cf_cv_ncurses_header} in #(vi
11834*/ncurses.h|*/ncursesw.h) #(vi
11835	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11836	;;
11837*)
11838	cf_term_header=term.h
11839	;;
11840esac
11841
11842for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11843do
11844cat >conftest.$ac_ext <<_ACEOF
11845#line 11845 "configure"
11846#include "confdefs.h"
11847#include <stdio.h>
11848#include <${cf_cv_ncurses_header:-curses.h}>
11849#include <$cf_test>
11850
11851int
11852main ()
11853{
11854int x = auto_left_margin
11855  ;
11856  return 0;
11857}
11858_ACEOF
11859rm -f conftest.$ac_objext
11860if { (eval echo "$as_me:11860: \"$ac_compile\"") >&5
11861  (eval $ac_compile) 2>&5
11862  ac_status=$?
11863  echo "$as_me:11863: \$? = $ac_status" >&5
11864  (exit $ac_status); } &&
11865         { ac_try='test -s conftest.$ac_objext'
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
11872	cf_cv_term_header="$cf_test"
11873else
11874  echo "$as_me: failed program was:" >&5
11875cat conftest.$ac_ext >&5
11876
11877	cf_cv_term_header=unknown
11878
11879fi
11880rm -f conftest.$ac_objext conftest.$ac_ext
11881	test "$cf_cv_term_header" != unknown && break
11882done
11883
11884fi
11885echo "$as_me:11885: result: $cf_cv_term_header" >&5
11886echo "${ECHO_T}$cf_cv_term_header" >&6
11887
11888# Set definitions to allow ifdef'ing to accommodate subdirectories
11889
11890case $cf_cv_term_header in # (vi
11891*term.h)
11892
11893cat >>confdefs.h <<\EOF
11894#define HAVE_TERM_H 1
11895EOF
11896
11897	;;
11898esac
11899
11900case $cf_cv_term_header in # (vi
11901ncurses/term.h) #(vi
11902
11903cat >>confdefs.h <<\EOF
11904#define HAVE_NCURSES_TERM_H 1
11905EOF
11906
11907	;;
11908ncursesw/term.h)
11909
11910cat >>confdefs.h <<\EOF
11911#define HAVE_NCURSESW_TERM_H 1
11912EOF
11913
11914	;;
11915esac
11916
11917# some applications need this, but should check for NCURSES_VERSION
11918
11919cat >>confdefs.h <<\EOF
11920#define NCURSES 1
11921EOF
11922
11923echo "$as_me:11923: checking for ncurses version" >&5
11924echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11925if test "${cf_cv_ncurses_version+set}" = set; then
11926  echo $ECHO_N "(cached) $ECHO_C" >&6
11927else
11928
11929	cf_cv_ncurses_version=no
11930	cf_tempfile=out$$
11931	rm -f $cf_tempfile
11932	if test "$cross_compiling" = yes; then
11933
11934	# This will not work if the preprocessor splits the line after the
11935	# Autoconf token.  The 'unproto' program does that.
11936	cat > conftest.$ac_ext <<EOF
11937#include <${cf_cv_ncurses_header:-curses.h}>
11938#undef Autoconf
11939#ifdef NCURSES_VERSION
11940Autoconf NCURSES_VERSION
11941#else
11942#ifdef __NCURSES_H
11943Autoconf "old"
11944#endif
11945;
11946#endif
11947EOF
11948	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11949	{ (eval echo "$as_me:11949: \"$cf_try\"") >&5
11950  (eval $cf_try) 2>&5
11951  ac_status=$?
11952  echo "$as_me:11952: \$? = $ac_status" >&5
11953  (exit $ac_status); }
11954	if test -f conftest.out ; then
11955		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
11956		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11957		rm -f conftest.out
11958	fi
11959
11960else
11961  cat >conftest.$ac_ext <<_ACEOF
11962#line 11962 "configure"
11963#include "confdefs.h"
11964
11965#include <${cf_cv_ncurses_header:-curses.h}>
11966#include <stdio.h>
11967int main()
11968{
11969	FILE *fp = fopen("$cf_tempfile", "w");
11970#ifdef NCURSES_VERSION
11971# ifdef NCURSES_VERSION_PATCH
11972	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11973# else
11974	fprintf(fp, "%s\n", NCURSES_VERSION);
11975# endif
11976#else
11977# ifdef __NCURSES_H
11978	fprintf(fp, "old\n");
11979# else
11980	make an error
11981# endif
11982#endif
11983	${cf_cv_main_return:-return}(0);
11984}
11985_ACEOF
11986rm -f conftest$ac_exeext
11987if { (eval echo "$as_me:11987: \"$ac_link\"") >&5
11988  (eval $ac_link) 2>&5
11989  ac_status=$?
11990  echo "$as_me:11990: \$? = $ac_status" >&5
11991  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11992  { (eval echo "$as_me:11992: \"$ac_try\"") >&5
11993  (eval $ac_try) 2>&5
11994  ac_status=$?
11995  echo "$as_me:11995: \$? = $ac_status" >&5
11996  (exit $ac_status); }; }; then
11997
11998	cf_cv_ncurses_version=`cat $cf_tempfile`
11999else
12000  echo "$as_me: program exited with status $ac_status" >&5
12001echo "$as_me: failed program was:" >&5
12002cat conftest.$ac_ext >&5
12003fi
12004rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12005fi
12006	rm -f $cf_tempfile
12007
12008fi
12009echo "$as_me:12009: result: $cf_cv_ncurses_version" >&5
12010echo "${ECHO_T}$cf_cv_ncurses_version" >&6
12011test "$cf_cv_ncurses_version" = no ||
12012cat >>confdefs.h <<\EOF
12013#define NCURSES 1
12014EOF
12015
12016cf_nculib_root=$use_ncurses
12017	# This works, except for the special case where we find gpm, but
12018	# ncurses is in a nonstandard location via $LIBS, and we really want
12019	# to link gpm.
12020cf_ncurses_LIBS=""
12021cf_ncurses_SAVE="$LIBS"
12022echo "$as_me:12022: checking for Gpm_Open in -lgpm" >&5
12023echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
12024if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
12025  echo $ECHO_N "(cached) $ECHO_C" >&6
12026else
12027  ac_check_lib_save_LIBS=$LIBS
12028LIBS="-lgpm  $LIBS"
12029cat >conftest.$ac_ext <<_ACEOF
12030#line 12030 "configure"
12031#include "confdefs.h"
12032
12033/* Override any gcc2 internal prototype to avoid an error.  */
12034#ifdef __cplusplus
12035extern "C"
12036#endif
12037/* We use char because int might match the return type of a gcc2
12038   builtin and then its argument prototype would still apply.  */
12039char Gpm_Open ();
12040int
12041main ()
12042{
12043Gpm_Open ();
12044  ;
12045  return 0;
12046}
12047_ACEOF
12048rm -f conftest.$ac_objext conftest$ac_exeext
12049if { (eval echo "$as_me:12049: \"$ac_link\"") >&5
12050  (eval $ac_link) 2>&5
12051  ac_status=$?
12052  echo "$as_me:12052: \$? = $ac_status" >&5
12053  (exit $ac_status); } &&
12054         { ac_try='test -s conftest$ac_exeext'
12055  { (eval echo "$as_me:12055: \"$ac_try\"") >&5
12056  (eval $ac_try) 2>&5
12057  ac_status=$?
12058  echo "$as_me:12058: \$? = $ac_status" >&5
12059  (exit $ac_status); }; }; then
12060  ac_cv_lib_gpm_Gpm_Open=yes
12061else
12062  echo "$as_me: failed program was:" >&5
12063cat conftest.$ac_ext >&5
12064ac_cv_lib_gpm_Gpm_Open=no
12065fi
12066rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12067LIBS=$ac_check_lib_save_LIBS
12068fi
12069echo "$as_me:12069: result: $ac_cv_lib_gpm_Gpm_Open" >&5
12070echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
12071if test $ac_cv_lib_gpm_Gpm_Open = yes; then
12072  echo "$as_me:12072: checking for initscr in -lgpm" >&5
12073echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
12074if test "${ac_cv_lib_gpm_initscr+set}" = set; then
12075  echo $ECHO_N "(cached) $ECHO_C" >&6
12076else
12077  ac_check_lib_save_LIBS=$LIBS
12078LIBS="-lgpm  $LIBS"
12079cat >conftest.$ac_ext <<_ACEOF
12080#line 12080 "configure"
12081#include "confdefs.h"
12082
12083/* Override any gcc2 internal prototype to avoid an error.  */
12084#ifdef __cplusplus
12085extern "C"
12086#endif
12087/* We use char because int might match the return type of a gcc2
12088   builtin and then its argument prototype would still apply.  */
12089char initscr ();
12090int
12091main ()
12092{
12093initscr ();
12094  ;
12095  return 0;
12096}
12097_ACEOF
12098rm -f conftest.$ac_objext conftest$ac_exeext
12099if { (eval echo "$as_me:12099: \"$ac_link\"") >&5
12100  (eval $ac_link) 2>&5
12101  ac_status=$?
12102  echo "$as_me:12102: \$? = $ac_status" >&5
12103  (exit $ac_status); } &&
12104         { ac_try='test -s conftest$ac_exeext'
12105  { (eval echo "$as_me:12105: \"$ac_try\"") >&5
12106  (eval $ac_try) 2>&5
12107  ac_status=$?
12108  echo "$as_me:12108: \$? = $ac_status" >&5
12109  (exit $ac_status); }; }; then
12110  ac_cv_lib_gpm_initscr=yes
12111else
12112  echo "$as_me: failed program was:" >&5
12113cat conftest.$ac_ext >&5
12114ac_cv_lib_gpm_initscr=no
12115fi
12116rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12117LIBS=$ac_check_lib_save_LIBS
12118fi
12119echo "$as_me:12119: result: $ac_cv_lib_gpm_initscr" >&5
12120echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
12121if test $ac_cv_lib_gpm_initscr = yes; then
12122  LIBS="$cf_ncurses_SAVE"
12123else
12124  cf_ncurses_LIBS="-lgpm"
12125fi
12126
12127fi
12128
12129case $host_os in #(vi
12130freebsd*)
12131	# This is only necessary if you are linking against an obsolete
12132	# version of ncurses (but it should do no harm, since it's static).
12133	if test "$cf_nculib_root" = ncurses ; then
12134		echo "$as_me:12134: checking for tgoto in -lmytinfo" >&5
12135echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
12136if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
12137  echo $ECHO_N "(cached) $ECHO_C" >&6
12138else
12139  ac_check_lib_save_LIBS=$LIBS
12140LIBS="-lmytinfo  $LIBS"
12141cat >conftest.$ac_ext <<_ACEOF
12142#line 12142 "configure"
12143#include "confdefs.h"
12144
12145/* Override any gcc2 internal prototype to avoid an error.  */
12146#ifdef __cplusplus
12147extern "C"
12148#endif
12149/* We use char because int might match the return type of a gcc2
12150   builtin and then its argument prototype would still apply.  */
12151char tgoto ();
12152int
12153main ()
12154{
12155tgoto ();
12156  ;
12157  return 0;
12158}
12159_ACEOF
12160rm -f conftest.$ac_objext conftest$ac_exeext
12161if { (eval echo "$as_me:12161: \"$ac_link\"") >&5
12162  (eval $ac_link) 2>&5
12163  ac_status=$?
12164  echo "$as_me:12164: \$? = $ac_status" >&5
12165  (exit $ac_status); } &&
12166         { ac_try='test -s conftest$ac_exeext'
12167  { (eval echo "$as_me:12167: \"$ac_try\"") >&5
12168  (eval $ac_try) 2>&5
12169  ac_status=$?
12170  echo "$as_me:12170: \$? = $ac_status" >&5
12171  (exit $ac_status); }; }; then
12172  ac_cv_lib_mytinfo_tgoto=yes
12173else
12174  echo "$as_me: failed program was:" >&5
12175cat conftest.$ac_ext >&5
12176ac_cv_lib_mytinfo_tgoto=no
12177fi
12178rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12179LIBS=$ac_check_lib_save_LIBS
12180fi
12181echo "$as_me:12181: result: $ac_cv_lib_mytinfo_tgoto" >&5
12182echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
12183if test $ac_cv_lib_mytinfo_tgoto = yes; then
12184  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
12185fi
12186
12187	fi
12188	;;
12189esac
12190
12191LIBS="$cf_ncurses_LIBS $LIBS"
12192
12193if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
12194then
12195	LIBS="-l$cf_nculib_root $LIBS"
12196else
12197
12198	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
12199	cf_libdir=""
12200	echo "$as_me:12200: checking for initscr" >&5
12201echo $ECHO_N "checking for initscr... $ECHO_C" >&6
12202if test "${ac_cv_func_initscr+set}" = set; then
12203  echo $ECHO_N "(cached) $ECHO_C" >&6
12204else
12205  cat >conftest.$ac_ext <<_ACEOF
12206#line 12206 "configure"
12207#include "confdefs.h"
12208/* System header to define __stub macros and hopefully few prototypes,
12209    which can conflict with char initscr (); below.  */
12210#include <assert.h>
12211/* Override any gcc2 internal prototype to avoid an error.  */
12212#ifdef __cplusplus
12213extern "C"
12214#endif
12215/* We use char because int might match the return type of a gcc2
12216   builtin and then its argument prototype would still apply.  */
12217char initscr ();
12218char (*f) ();
12219
12220int
12221main ()
12222{
12223/* The GNU C library defines this for functions which it implements
12224    to always fail with ENOSYS.  Some functions are actually named
12225    something starting with __ and the normal name is an alias.  */
12226#if defined (__stub_initscr) || defined (__stub___initscr)
12227choke me
12228#else
12229f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12230#endif
12231
12232  ;
12233  return 0;
12234}
12235_ACEOF
12236rm -f conftest.$ac_objext conftest$ac_exeext
12237if { (eval echo "$as_me:12237: \"$ac_link\"") >&5
12238  (eval $ac_link) 2>&5
12239  ac_status=$?
12240  echo "$as_me:12240: \$? = $ac_status" >&5
12241  (exit $ac_status); } &&
12242         { ac_try='test -s conftest$ac_exeext'
12243  { (eval echo "$as_me:12243: \"$ac_try\"") >&5
12244  (eval $ac_try) 2>&5
12245  ac_status=$?
12246  echo "$as_me:12246: \$? = $ac_status" >&5
12247  (exit $ac_status); }; }; then
12248  ac_cv_func_initscr=yes
12249else
12250  echo "$as_me: failed program was:" >&5
12251cat conftest.$ac_ext >&5
12252ac_cv_func_initscr=no
12253fi
12254rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12255fi
12256echo "$as_me:12256: result: $ac_cv_func_initscr" >&5
12257echo "${ECHO_T}$ac_cv_func_initscr" >&6
12258if test $ac_cv_func_initscr = yes; then
12259  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
12260else
12261
12262		cf_save_LIBS="$LIBS"
12263		echo "$as_me:12263: checking for initscr in -l$cf_nculib_root" >&5
12264echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
12265		LIBS="-l$cf_nculib_root $LIBS"
12266		cat >conftest.$ac_ext <<_ACEOF
12267#line 12267 "configure"
12268#include "confdefs.h"
12269#include <${cf_cv_ncurses_header:-curses.h}>
12270int
12271main ()
12272{
12273initscr()
12274  ;
12275  return 0;
12276}
12277_ACEOF
12278rm -f conftest.$ac_objext conftest$ac_exeext
12279if { (eval echo "$as_me:12279: \"$ac_link\"") >&5
12280  (eval $ac_link) 2>&5
12281  ac_status=$?
12282  echo "$as_me:12282: \$? = $ac_status" >&5
12283  (exit $ac_status); } &&
12284         { ac_try='test -s conftest$ac_exeext'
12285  { (eval echo "$as_me:12285: \"$ac_try\"") >&5
12286  (eval $ac_try) 2>&5
12287  ac_status=$?
12288  echo "$as_me:12288: \$? = $ac_status" >&5
12289  (exit $ac_status); }; }; then
12290  echo "$as_me:12290: result: yes" >&5
12291echo "${ECHO_T}yes" >&6
12292			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
12293
12294else
12295  echo "$as_me: failed program was:" >&5
12296cat conftest.$ac_ext >&5
12297echo "$as_me:12297: result: no" >&5
12298echo "${ECHO_T}no" >&6
12299
12300cf_search=
12301cf_library_path_list=""
12302if test -n "${LDFLAGS}${LIBS}" ; then
12303	for cf_library_path in $LDFLAGS $LIBS
12304	do
12305		case $cf_library_path in #(vi
12306		-L*)
12307			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12308
12309test "$cf_library_path" != "NONE" && \
12310test -d "$cf_library_path" && \
12311 {
12312	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
12313	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12314	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
12315	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
12316	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
12317	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"
12318}
12319
12320			cf_library_path_list="$cf_library_path_list $cf_search"
12321			;;
12322		esac
12323	done
12324fi
12325
12326cf_search=
12327
12328test "/usr" != "$prefix" && \
12329test -d "/usr" && \
12330(test $prefix = NONE || test "/usr" != "$prefix") && {
12331	test -n "$verbose" && echo "	... testing for lib-directories under /usr"
12332	test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
12333	test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
12334	test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
12335	test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
12336	test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
12337}
12338
12339test "$prefix" != "NONE" && \
12340test -d "$prefix" && \
12341 {
12342	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
12343	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12344	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
12345	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
12346	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
12347	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
12348}
12349
12350test "/usr/local" != "$prefix" && \
12351test -d "/usr/local" && \
12352(test $prefix = NONE || test "/usr/local" != "$prefix") && {
12353	test -n "$verbose" && echo "	... testing for lib-directories under /usr/local"
12354	test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
12355	test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
12356	test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
12357	test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
12358	test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
12359}
12360
12361test "/opt" != "$prefix" && \
12362test -d "/opt" && \
12363(test $prefix = NONE || test "/opt" != "$prefix") && {
12364	test -n "$verbose" && echo "	... testing for lib-directories under /opt"
12365	test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
12366	test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
12367	test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
12368	test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
12369	test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
12370}
12371
12372test "$HOME" != "$prefix" && \
12373test -d "$HOME" && \
12374(test $prefix = NONE || test "$HOME" != "$prefix") && {
12375	test -n "$verbose" && echo "	... testing for lib-directories under $HOME"
12376	test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
12377	test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
12378	test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
12379	test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
12380	test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
12381}
12382
12383cf_search="$cf_library_path_list $cf_search"
12384
12385			for cf_libdir in $cf_search
12386			do
12387				echo "$as_me:12387: checking for -l$cf_nculib_root in $cf_libdir" >&5
12388echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
12389				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
12390				cat >conftest.$ac_ext <<_ACEOF
12391#line 12391 "configure"
12392#include "confdefs.h"
12393#include <${cf_cv_ncurses_header:-curses.h}>
12394int
12395main ()
12396{
12397initscr()
12398  ;
12399  return 0;
12400}
12401_ACEOF
12402rm -f conftest.$ac_objext conftest$ac_exeext
12403if { (eval echo "$as_me:12403: \"$ac_link\"") >&5
12404  (eval $ac_link) 2>&5
12405  ac_status=$?
12406  echo "$as_me:12406: \$? = $ac_status" >&5
12407  (exit $ac_status); } &&
12408         { ac_try='test -s conftest$ac_exeext'
12409  { (eval echo "$as_me:12409: \"$ac_try\"") >&5
12410  (eval $ac_try) 2>&5
12411  ac_status=$?
12412  echo "$as_me:12412: \$? = $ac_status" >&5
12413  (exit $ac_status); }; }; then
12414  echo "$as_me:12414: result: yes" >&5
12415echo "${ECHO_T}yes" >&6
12416			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
12417					 break
12418else
12419  echo "$as_me: failed program was:" >&5
12420cat conftest.$ac_ext >&5
12421echo "$as_me:12421: result: no" >&5
12422echo "${ECHO_T}no" >&6
12423					 LIBS="$cf_save_LIBS"
12424fi
12425rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12426			done
12427
12428fi
12429rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12430
12431fi
12432
12433eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
12434
12435if test $cf_found_library = no ; then
12436	{ { echo "$as_me:12436: error: Cannot link $cf_nculib_root library" >&5
12437echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
12438   { (exit 1); exit 1; }; }
12439fi
12440
12441fi
12442
12443if test -n "$cf_ncurses_LIBS" ; then
12444	echo "$as_me:12444: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
12445echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
12446	cf_ncurses_SAVE="$LIBS"
12447	for p in $cf_ncurses_LIBS ; do
12448		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
12449		if test "$q" != "$LIBS" ; then
12450			LIBS="$q"
12451		fi
12452	done
12453	cat >conftest.$ac_ext <<_ACEOF
12454#line 12454 "configure"
12455#include "confdefs.h"
12456#include <${cf_cv_ncurses_header:-curses.h}>
12457int
12458main ()
12459{
12460initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
12461  ;
12462  return 0;
12463}
12464_ACEOF
12465rm -f conftest.$ac_objext conftest$ac_exeext
12466if { (eval echo "$as_me:12466: \"$ac_link\"") >&5
12467  (eval $ac_link) 2>&5
12468  ac_status=$?
12469  echo "$as_me:12469: \$? = $ac_status" >&5
12470  (exit $ac_status); } &&
12471         { ac_try='test -s conftest$ac_exeext'
12472  { (eval echo "$as_me:12472: \"$ac_try\"") >&5
12473  (eval $ac_try) 2>&5
12474  ac_status=$?
12475  echo "$as_me:12475: \$? = $ac_status" >&5
12476  (exit $ac_status); }; }; then
12477  echo "$as_me:12477: result: yes" >&5
12478echo "${ECHO_T}yes" >&6
12479else
12480  echo "$as_me: failed program was:" >&5
12481cat conftest.$ac_ext >&5
12482echo "$as_me:12482: result: no" >&5
12483echo "${ECHO_T}no" >&6
12484		 LIBS="$cf_ncurses_SAVE"
12485fi
12486rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12487fi
12488
12489cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12490
12491cat >>confdefs.h <<EOF
12492#define $cf_nculib_ROOT 1
12493EOF
12494
12495fi
12496
12497else
12498	cf_wide_curses=no
12499
12500echo "$as_me:12500: checking for extra include directories" >&5
12501echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
12502if test "${cf_cv_curses_incdir+set}" = set; then
12503  echo $ECHO_N "(cached) $ECHO_C" >&6
12504else
12505
12506cf_cv_curses_incdir=no
12507case $host_os in #(vi
12508hpux10.*) #(vi
12509	if test "x$cf_cv_screen" = "xcurses_colr"
12510	then
12511		test -d /usr/include/curses_colr && \
12512		cf_cv_curses_incdir="-I/usr/include/curses_colr"
12513	fi
12514	;;
12515sunos3*|sunos4*)
12516	if test "x$cf_cv_screen" = "xcurses_5lib"
12517	then
12518		test -d /usr/5lib && \
12519		test -d /usr/5include && \
12520		cf_cv_curses_incdir="-I/usr/5include"
12521	fi
12522	;;
12523esac
12524
12525fi
12526echo "$as_me:12526: result: $cf_cv_curses_incdir" >&5
12527echo "${ECHO_T}$cf_cv_curses_incdir" >&6
12528test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
12529
12530echo "$as_me:12530: checking if we have identified curses headers" >&5
12531echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
12532if test "${cf_cv_ncurses_header+set}" = set; then
12533  echo $ECHO_N "(cached) $ECHO_C" >&6
12534else
12535
12536cf_cv_ncurses_header=none
12537for cf_header in  \
12538	ncurses.h \
12539	curses.h ncurses/ncurses.h ncurses/curses.h
12540do
12541cat >conftest.$ac_ext <<_ACEOF
12542#line 12542 "configure"
12543#include "confdefs.h"
12544#include <${cf_header}>
12545int
12546main ()
12547{
12548initscr(); tgoto("?", 0,0)
12549  ;
12550  return 0;
12551}
12552_ACEOF
12553rm -f conftest.$ac_objext
12554if { (eval echo "$as_me:12554: \"$ac_compile\"") >&5
12555  (eval $ac_compile) 2>&5
12556  ac_status=$?
12557  echo "$as_me:12557: \$? = $ac_status" >&5
12558  (exit $ac_status); } &&
12559         { ac_try='test -s conftest.$ac_objext'
12560  { (eval echo "$as_me:12560: \"$ac_try\"") >&5
12561  (eval $ac_try) 2>&5
12562  ac_status=$?
12563  echo "$as_me:12563: \$? = $ac_status" >&5
12564  (exit $ac_status); }; }; then
12565  cf_cv_ncurses_header=$cf_header; break
12566else
12567  echo "$as_me: failed program was:" >&5
12568cat conftest.$ac_ext >&5
12569fi
12570rm -f conftest.$ac_objext conftest.$ac_ext
12571done
12572
12573fi
12574echo "$as_me:12574: result: $cf_cv_ncurses_header" >&5
12575echo "${ECHO_T}$cf_cv_ncurses_header" >&6
12576
12577if test "$cf_cv_ncurses_header" = none ; then
12578	{ { echo "$as_me:12578: error: No curses header-files found" >&5
12579echo "$as_me: error: No curses header-files found" >&2;}
12580   { (exit 1); exit 1; }; }
12581fi
12582
12583# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
12584
12585for ac_header in $cf_cv_ncurses_header
12586do
12587as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12588echo "$as_me:12588: checking for $ac_header" >&5
12589echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12590if eval "test \"\${$as_ac_Header+set}\" = set"; then
12591  echo $ECHO_N "(cached) $ECHO_C" >&6
12592else
12593  cat >conftest.$ac_ext <<_ACEOF
12594#line 12594 "configure"
12595#include "confdefs.h"
12596#include <$ac_header>
12597_ACEOF
12598if { (eval echo "$as_me:12598: \"$ac_cpp conftest.$ac_ext\"") >&5
12599  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12600  ac_status=$?
12601  egrep -v '^ *\+' conftest.er1 >conftest.err
12602  rm -f conftest.er1
12603  cat conftest.err >&5
12604  echo "$as_me:12604: \$? = $ac_status" >&5
12605  (exit $ac_status); } >/dev/null; then
12606  if test -s conftest.err; then
12607    ac_cpp_err=$ac_c_preproc_warn_flag
12608  else
12609    ac_cpp_err=
12610  fi
12611else
12612  ac_cpp_err=yes
12613fi
12614if test -z "$ac_cpp_err"; then
12615  eval "$as_ac_Header=yes"
12616else
12617  echo "$as_me: failed program was:" >&5
12618  cat conftest.$ac_ext >&5
12619  eval "$as_ac_Header=no"
12620fi
12621rm -f conftest.err conftest.$ac_ext
12622fi
12623echo "$as_me:12623: result: `eval echo '${'$as_ac_Header'}'`" >&5
12624echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12625if test `eval echo '${'$as_ac_Header'}'` = yes; then
12626  cat >>confdefs.h <<EOF
12627#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12628EOF
12629
12630fi
12631done
12632
12633echo "$as_me:12633: checking for terminfo header" >&5
12634echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
12635if test "${cf_cv_term_header+set}" = set; then
12636  echo $ECHO_N "(cached) $ECHO_C" >&6
12637else
12638
12639case ${cf_cv_ncurses_header} in #(vi
12640*/ncurses.h|*/ncursesw.h) #(vi
12641	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
12642	;;
12643*)
12644	cf_term_header=term.h
12645	;;
12646esac
12647
12648for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
12649do
12650cat >conftest.$ac_ext <<_ACEOF
12651#line 12651 "configure"
12652#include "confdefs.h"
12653#include <stdio.h>
12654#include <${cf_cv_ncurses_header:-curses.h}>
12655#include <$cf_test>
12656
12657int
12658main ()
12659{
12660int x = auto_left_margin
12661  ;
12662  return 0;
12663}
12664_ACEOF
12665rm -f conftest.$ac_objext
12666if { (eval echo "$as_me:12666: \"$ac_compile\"") >&5
12667  (eval $ac_compile) 2>&5
12668  ac_status=$?
12669  echo "$as_me:12669: \$? = $ac_status" >&5
12670  (exit $ac_status); } &&
12671         { ac_try='test -s conftest.$ac_objext'
12672  { (eval echo "$as_me:12672: \"$ac_try\"") >&5
12673  (eval $ac_try) 2>&5
12674  ac_status=$?
12675  echo "$as_me:12675: \$? = $ac_status" >&5
12676  (exit $ac_status); }; }; then
12677
12678	cf_cv_term_header="$cf_test"
12679else
12680  echo "$as_me: failed program was:" >&5
12681cat conftest.$ac_ext >&5
12682
12683	cf_cv_term_header=unknown
12684
12685fi
12686rm -f conftest.$ac_objext conftest.$ac_ext
12687	test "$cf_cv_term_header" != unknown && break
12688done
12689
12690fi
12691echo "$as_me:12691: result: $cf_cv_term_header" >&5
12692echo "${ECHO_T}$cf_cv_term_header" >&6
12693
12694# Set definitions to allow ifdef'ing to accommodate subdirectories
12695
12696case $cf_cv_term_header in # (vi
12697*term.h)
12698
12699cat >>confdefs.h <<\EOF
12700#define HAVE_TERM_H 1
12701EOF
12702
12703	;;
12704esac
12705
12706case $cf_cv_term_header in # (vi
12707ncurses/term.h) #(vi
12708
12709cat >>confdefs.h <<\EOF
12710#define HAVE_NCURSES_TERM_H 1
12711EOF
12712
12713	;;
12714ncursesw/term.h)
12715
12716cat >>confdefs.h <<\EOF
12717#define HAVE_NCURSESW_TERM_H 1
12718EOF
12719
12720	;;
12721esac
12722
12723echo "$as_me:12723: checking for ncurses version" >&5
12724echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
12725if test "${cf_cv_ncurses_version+set}" = set; then
12726  echo $ECHO_N "(cached) $ECHO_C" >&6
12727else
12728
12729	cf_cv_ncurses_version=no
12730	cf_tempfile=out$$
12731	rm -f $cf_tempfile
12732	if test "$cross_compiling" = yes; then
12733
12734	# This will not work if the preprocessor splits the line after the
12735	# Autoconf token.  The 'unproto' program does that.
12736	cat > conftest.$ac_ext <<EOF
12737#include <${cf_cv_ncurses_header:-curses.h}>
12738#undef Autoconf
12739#ifdef NCURSES_VERSION
12740Autoconf NCURSES_VERSION
12741#else
12742#ifdef __NCURSES_H
12743Autoconf "old"
12744#endif
12745;
12746#endif
12747EOF
12748	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
12749	{ (eval echo "$as_me:12749: \"$cf_try\"") >&5
12750  (eval $cf_try) 2>&5
12751  ac_status=$?
12752  echo "$as_me:12752: \$? = $ac_status" >&5
12753  (exit $ac_status); }
12754	if test -f conftest.out ; then
12755		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
12756		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
12757		rm -f conftest.out
12758	fi
12759
12760else
12761  cat >conftest.$ac_ext <<_ACEOF
12762#line 12762 "configure"
12763#include "confdefs.h"
12764
12765#include <${cf_cv_ncurses_header:-curses.h}>
12766#include <stdio.h>
12767int main()
12768{
12769	FILE *fp = fopen("$cf_tempfile", "w");
12770#ifdef NCURSES_VERSION
12771# ifdef NCURSES_VERSION_PATCH
12772	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
12773# else
12774	fprintf(fp, "%s\n", NCURSES_VERSION);
12775# endif
12776#else
12777# ifdef __NCURSES_H
12778	fprintf(fp, "old\n");
12779# else
12780	make an error
12781# endif
12782#endif
12783	${cf_cv_main_return:-return}(0);
12784}
12785_ACEOF
12786rm -f conftest$ac_exeext
12787if { (eval echo "$as_me:12787: \"$ac_link\"") >&5
12788  (eval $ac_link) 2>&5
12789  ac_status=$?
12790  echo "$as_me:12790: \$? = $ac_status" >&5
12791  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12792  { (eval echo "$as_me:12792: \"$ac_try\"") >&5
12793  (eval $ac_try) 2>&5
12794  ac_status=$?
12795  echo "$as_me:12795: \$? = $ac_status" >&5
12796  (exit $ac_status); }; }; then
12797
12798	cf_cv_ncurses_version=`cat $cf_tempfile`
12799else
12800  echo "$as_me: program exited with status $ac_status" >&5
12801echo "$as_me: failed program was:" >&5
12802cat conftest.$ac_ext >&5
12803fi
12804rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12805fi
12806	rm -f $cf_tempfile
12807
12808fi
12809echo "$as_me:12809: result: $cf_cv_ncurses_version" >&5
12810echo "${ECHO_T}$cf_cv_ncurses_version" >&6
12811test "$cf_cv_ncurses_version" = no ||
12812cat >>confdefs.h <<\EOF
12813#define NCURSES 1
12814EOF
12815
12816echo "$as_me:12816: checking if we have identified curses libraries" >&5
12817echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
12818cat >conftest.$ac_ext <<_ACEOF
12819#line 12819 "configure"
12820#include "confdefs.h"
12821#include <${cf_cv_ncurses_header:-curses.h}>
12822int
12823main ()
12824{
12825initscr(); tgoto("?", 0,0)
12826  ;
12827  return 0;
12828}
12829_ACEOF
12830rm -f conftest.$ac_objext conftest$ac_exeext
12831if { (eval echo "$as_me:12831: \"$ac_link\"") >&5
12832  (eval $ac_link) 2>&5
12833  ac_status=$?
12834  echo "$as_me:12834: \$? = $ac_status" >&5
12835  (exit $ac_status); } &&
12836         { ac_try='test -s conftest$ac_exeext'
12837  { (eval echo "$as_me:12837: \"$ac_try\"") >&5
12838  (eval $ac_try) 2>&5
12839  ac_status=$?
12840  echo "$as_me:12840: \$? = $ac_status" >&5
12841  (exit $ac_status); }; }; then
12842  cf_result=yes
12843else
12844  echo "$as_me: failed program was:" >&5
12845cat conftest.$ac_ext >&5
12846cf_result=no
12847fi
12848rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12849echo "$as_me:12849: result: $cf_result" >&5
12850echo "${ECHO_T}$cf_result" >&6
12851
12852if test "$cf_result" = no ; then
12853case $host_os in #(vi
12854freebsd*) #(vi
12855    echo "$as_me:12855: checking for tgoto in -lmytinfo" >&5
12856echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
12857if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
12858  echo $ECHO_N "(cached) $ECHO_C" >&6
12859else
12860  ac_check_lib_save_LIBS=$LIBS
12861LIBS="-lmytinfo  $LIBS"
12862cat >conftest.$ac_ext <<_ACEOF
12863#line 12863 "configure"
12864#include "confdefs.h"
12865
12866/* Override any gcc2 internal prototype to avoid an error.  */
12867#ifdef __cplusplus
12868extern "C"
12869#endif
12870/* We use char because int might match the return type of a gcc2
12871   builtin and then its argument prototype would still apply.  */
12872char tgoto ();
12873int
12874main ()
12875{
12876tgoto ();
12877  ;
12878  return 0;
12879}
12880_ACEOF
12881rm -f conftest.$ac_objext conftest$ac_exeext
12882if { (eval echo "$as_me:12882: \"$ac_link\"") >&5
12883  (eval $ac_link) 2>&5
12884  ac_status=$?
12885  echo "$as_me:12885: \$? = $ac_status" >&5
12886  (exit $ac_status); } &&
12887         { ac_try='test -s conftest$ac_exeext'
12888  { (eval echo "$as_me:12888: \"$ac_try\"") >&5
12889  (eval $ac_try) 2>&5
12890  ac_status=$?
12891  echo "$as_me:12891: \$? = $ac_status" >&5
12892  (exit $ac_status); }; }; then
12893  ac_cv_lib_mytinfo_tgoto=yes
12894else
12895  echo "$as_me: failed program was:" >&5
12896cat conftest.$ac_ext >&5
12897ac_cv_lib_mytinfo_tgoto=no
12898fi
12899rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12900LIBS=$ac_check_lib_save_LIBS
12901fi
12902echo "$as_me:12902: result: $ac_cv_lib_mytinfo_tgoto" >&5
12903echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
12904if test $ac_cv_lib_mytinfo_tgoto = yes; then
12905  LIBS="-lmytinfo $LIBS"
12906fi
12907
12908    ;;
12909hpux10.*) #(vi
12910	# Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
12911	# next (1998), and xcurses "newer" (2000).  There is no header file for
12912	# Hcurses; the subdirectory curses_colr has the headers (curses.h and
12913	# term.h) for cur_colr
12914	if test "x$cf_cv_screen" = "xcurses_colr"
12915	then
12916		echo "$as_me:12916: checking for initscr in -lcur_colr" >&5
12917echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
12918if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
12919  echo $ECHO_N "(cached) $ECHO_C" >&6
12920else
12921  ac_check_lib_save_LIBS=$LIBS
12922LIBS="-lcur_colr  $LIBS"
12923cat >conftest.$ac_ext <<_ACEOF
12924#line 12924 "configure"
12925#include "confdefs.h"
12926
12927/* Override any gcc2 internal prototype to avoid an error.  */
12928#ifdef __cplusplus
12929extern "C"
12930#endif
12931/* We use char because int might match the return type of a gcc2
12932   builtin and then its argument prototype would still apply.  */
12933char initscr ();
12934int
12935main ()
12936{
12937initscr ();
12938  ;
12939  return 0;
12940}
12941_ACEOF
12942rm -f conftest.$ac_objext conftest$ac_exeext
12943if { (eval echo "$as_me:12943: \"$ac_link\"") >&5
12944  (eval $ac_link) 2>&5
12945  ac_status=$?
12946  echo "$as_me:12946: \$? = $ac_status" >&5
12947  (exit $ac_status); } &&
12948         { ac_try='test -s conftest$ac_exeext'
12949  { (eval echo "$as_me:12949: \"$ac_try\"") >&5
12950  (eval $ac_try) 2>&5
12951  ac_status=$?
12952  echo "$as_me:12952: \$? = $ac_status" >&5
12953  (exit $ac_status); }; }; then
12954  ac_cv_lib_cur_colr_initscr=yes
12955else
12956  echo "$as_me: failed program was:" >&5
12957cat conftest.$ac_ext >&5
12958ac_cv_lib_cur_colr_initscr=no
12959fi
12960rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12961LIBS=$ac_check_lib_save_LIBS
12962fi
12963echo "$as_me:12963: result: $ac_cv_lib_cur_colr_initscr" >&5
12964echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
12965if test $ac_cv_lib_cur_colr_initscr = yes; then
12966
12967			LIBS="-lcur_colr $LIBS"
12968			ac_cv_func_initscr=yes
12969
12970else
12971
12972		echo "$as_me:12972: checking for initscr in -lHcurses" >&5
12973echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
12974if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
12975  echo $ECHO_N "(cached) $ECHO_C" >&6
12976else
12977  ac_check_lib_save_LIBS=$LIBS
12978LIBS="-lHcurses  $LIBS"
12979cat >conftest.$ac_ext <<_ACEOF
12980#line 12980 "configure"
12981#include "confdefs.h"
12982
12983/* Override any gcc2 internal prototype to avoid an error.  */
12984#ifdef __cplusplus
12985extern "C"
12986#endif
12987/* We use char because int might match the return type of a gcc2
12988   builtin and then its argument prototype would still apply.  */
12989char initscr ();
12990int
12991main ()
12992{
12993initscr ();
12994  ;
12995  return 0;
12996}
12997_ACEOF
12998rm -f conftest.$ac_objext conftest$ac_exeext
12999if { (eval echo "$as_me:12999: \"$ac_link\"") >&5
13000  (eval $ac_link) 2>&5
13001  ac_status=$?
13002  echo "$as_me:13002: \$? = $ac_status" >&5
13003  (exit $ac_status); } &&
13004         { ac_try='test -s conftest$ac_exeext'
13005  { (eval echo "$as_me:13005: \"$ac_try\"") >&5
13006  (eval $ac_try) 2>&5
13007  ac_status=$?
13008  echo "$as_me:13008: \$? = $ac_status" >&5
13009  (exit $ac_status); }; }; then
13010  ac_cv_lib_Hcurses_initscr=yes
13011else
13012  echo "$as_me: failed program was:" >&5
13013cat conftest.$ac_ext >&5
13014ac_cv_lib_Hcurses_initscr=no
13015fi
13016rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13017LIBS=$ac_check_lib_save_LIBS
13018fi
13019echo "$as_me:13019: result: $ac_cv_lib_Hcurses_initscr" >&5
13020echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
13021if test $ac_cv_lib_Hcurses_initscr = yes; then
13022
13023			# HP's header uses __HP_CURSES, but user claims _HP_CURSES.
13024			LIBS="-lHcurses $LIBS"
13025			CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
13026			ac_cv_func_initscr=yes
13027
13028fi
13029
13030fi
13031
13032	fi
13033	;;
13034linux*)
13035	case `arch 2>/dev/null` in
13036	x86_64)
13037		if test -d /lib64
13038		then
13039
13040if test -n "/lib64" ; then
13041  for cf_add_libdir in /lib64
13042  do
13043    if test $cf_add_libdir = /usr/lib ; then
13044      :
13045    elif test -d $cf_add_libdir
13046    then
13047      cf_have_libdir=no
13048      if test -n "$LDFLAGS$LIBS" ; then
13049        # a loop is needed to ensure we can add subdirs of existing dirs
13050        for cf_test_libdir in $LDFLAGS $LIBS ; do
13051          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13052            cf_have_libdir=yes; break
13053          fi
13054        done
13055      fi
13056      if test "$cf_have_libdir" = no ; then
13057        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
13058
13059echo "${as_me:-configure}:13059: testing adding $cf_add_libdir to library-path ..." 1>&5
13060
13061        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13062      fi
13063    fi
13064  done
13065fi
13066
13067		else
13068
13069if test -n "/lib" ; then
13070  for cf_add_libdir in /lib
13071  do
13072    if test $cf_add_libdir = /usr/lib ; then
13073      :
13074    elif test -d $cf_add_libdir
13075    then
13076      cf_have_libdir=no
13077      if test -n "$LDFLAGS$LIBS" ; then
13078        # a loop is needed to ensure we can add subdirs of existing dirs
13079        for cf_test_libdir in $LDFLAGS $LIBS ; do
13080          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13081            cf_have_libdir=yes; break
13082          fi
13083        done
13084      fi
13085      if test "$cf_have_libdir" = no ; then
13086        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
13087
13088echo "${as_me:-configure}:13088: testing adding $cf_add_libdir to library-path ..." 1>&5
13089
13090        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13091      fi
13092    fi
13093  done
13094fi
13095
13096		fi
13097		;;
13098	*)
13099
13100if test -n "/lib" ; then
13101  for cf_add_libdir in /lib
13102  do
13103    if test $cf_add_libdir = /usr/lib ; then
13104      :
13105    elif test -d $cf_add_libdir
13106    then
13107      cf_have_libdir=no
13108      if test -n "$LDFLAGS$LIBS" ; then
13109        # a loop is needed to ensure we can add subdirs of existing dirs
13110        for cf_test_libdir in $LDFLAGS $LIBS ; do
13111          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13112            cf_have_libdir=yes; break
13113          fi
13114        done
13115      fi
13116      if test "$cf_have_libdir" = no ; then
13117        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
13118
13119echo "${as_me:-configure}:13119: testing adding $cf_add_libdir to library-path ..." 1>&5
13120
13121        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13122      fi
13123    fi
13124  done
13125fi
13126
13127		;;
13128	esac
13129	;;
13130sunos3*|sunos4*)
13131	if test "x$cf_cv_screen" = "xcurses_5lib"
13132	then
13133		if test -d /usr/5lib ; then
13134
13135if test -n "/usr/5lib" ; then
13136  for cf_add_libdir in /usr/5lib
13137  do
13138    if test $cf_add_libdir = /usr/lib ; then
13139      :
13140    elif test -d $cf_add_libdir
13141    then
13142      cf_have_libdir=no
13143      if test -n "$LDFLAGS$LIBS" ; then
13144        # a loop is needed to ensure we can add subdirs of existing dirs
13145        for cf_test_libdir in $LDFLAGS $LIBS ; do
13146          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13147            cf_have_libdir=yes; break
13148          fi
13149        done
13150      fi
13151      if test "$cf_have_libdir" = no ; then
13152        test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
13153
13154echo "${as_me:-configure}:13154: testing adding $cf_add_libdir to library-path ..." 1>&5
13155
13156        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13157      fi
13158    fi
13159  done
13160fi
13161
13162			LIBS="-lcurses -ltermcap $LIBS"
13163		fi
13164    fi
13165    ac_cv_func_initscr=yes
13166    ;;
13167esac
13168
13169if test ".$ac_cv_func_initscr" != .yes ; then
13170	cf_save_LIBS="$LIBS"
13171
13172	if test ".${cf_cv_ncurses_version:-no}" != .no
13173	then
13174		cf_check_list="ncurses curses cursesX"
13175	else
13176		cf_check_list="cursesX curses ncurses"
13177	fi
13178
13179	# Check for library containing tgoto.  Do this before curses library
13180	# because it may be needed to link the test-case for initscr.
13181	if test "x$cf_term_lib" = x
13182	then
13183		echo "$as_me:13183: checking for tgoto" >&5
13184echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
13185if test "${ac_cv_func_tgoto+set}" = set; then
13186  echo $ECHO_N "(cached) $ECHO_C" >&6
13187else
13188  cat >conftest.$ac_ext <<_ACEOF
13189#line 13189 "configure"
13190#include "confdefs.h"
13191/* System header to define __stub macros and hopefully few prototypes,
13192    which can conflict with char tgoto (); below.  */
13193#include <assert.h>
13194/* Override any gcc2 internal prototype to avoid an error.  */
13195#ifdef __cplusplus
13196extern "C"
13197#endif
13198/* We use char because int might match the return type of a gcc2
13199   builtin and then its argument prototype would still apply.  */
13200char tgoto ();
13201char (*f) ();
13202
13203int
13204main ()
13205{
13206/* The GNU C library defines this for functions which it implements
13207    to always fail with ENOSYS.  Some functions are actually named
13208    something starting with __ and the normal name is an alias.  */
13209#if defined (__stub_tgoto) || defined (__stub___tgoto)
13210choke me
13211#else
13212f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13213#endif
13214
13215  ;
13216  return 0;
13217}
13218_ACEOF
13219rm -f conftest.$ac_objext conftest$ac_exeext
13220if { (eval echo "$as_me:13220: \"$ac_link\"") >&5
13221  (eval $ac_link) 2>&5
13222  ac_status=$?
13223  echo "$as_me:13223: \$? = $ac_status" >&5
13224  (exit $ac_status); } &&
13225         { ac_try='test -s conftest$ac_exeext'
13226  { (eval echo "$as_me:13226: \"$ac_try\"") >&5
13227  (eval $ac_try) 2>&5
13228  ac_status=$?
13229  echo "$as_me:13229: \$? = $ac_status" >&5
13230  (exit $ac_status); }; }; then
13231  ac_cv_func_tgoto=yes
13232else
13233  echo "$as_me: failed program was:" >&5
13234cat conftest.$ac_ext >&5
13235ac_cv_func_tgoto=no
13236fi
13237rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13238fi
13239echo "$as_me:13239: result: $ac_cv_func_tgoto" >&5
13240echo "${ECHO_T}$ac_cv_func_tgoto" >&6
13241if test $ac_cv_func_tgoto = yes; then
13242  cf_term_lib=predefined
13243else
13244
13245			for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
13246			do
13247				as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
13248echo "$as_me:13248: checking for tgoto in -l$cf_term_lib" >&5
13249echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
13250if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13251  echo $ECHO_N "(cached) $ECHO_C" >&6
13252else
13253  ac_check_lib_save_LIBS=$LIBS
13254LIBS="-l$cf_term_lib  $LIBS"
13255cat >conftest.$ac_ext <<_ACEOF
13256#line 13256 "configure"
13257#include "confdefs.h"
13258
13259/* Override any gcc2 internal prototype to avoid an error.  */
13260#ifdef __cplusplus
13261extern "C"
13262#endif
13263/* We use char because int might match the return type of a gcc2
13264   builtin and then its argument prototype would still apply.  */
13265char tgoto ();
13266int
13267main ()
13268{
13269tgoto ();
13270  ;
13271  return 0;
13272}
13273_ACEOF
13274rm -f conftest.$ac_objext conftest$ac_exeext
13275if { (eval echo "$as_me:13275: \"$ac_link\"") >&5
13276  (eval $ac_link) 2>&5
13277  ac_status=$?
13278  echo "$as_me:13278: \$? = $ac_status" >&5
13279  (exit $ac_status); } &&
13280         { ac_try='test -s conftest$ac_exeext'
13281  { (eval echo "$as_me:13281: \"$ac_try\"") >&5
13282  (eval $ac_try) 2>&5
13283  ac_status=$?
13284  echo "$as_me:13284: \$? = $ac_status" >&5
13285  (exit $ac_status); }; }; then
13286  eval "$as_ac_Lib=yes"
13287else
13288  echo "$as_me: failed program was:" >&5
13289cat conftest.$ac_ext >&5
13290eval "$as_ac_Lib=no"
13291fi
13292rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13293LIBS=$ac_check_lib_save_LIBS
13294fi
13295echo "$as_me:13295: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13296echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13297if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13298  break
13299fi
13300
13301			done
13302
13303fi
13304
13305	fi
13306
13307	# Check for library containing initscr
13308	test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
13309	if test "x$cf_curs_lib" = x
13310	then
13311		for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
13312		do
13313			as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
13314echo "$as_me:13314: checking for initscr in -l$cf_curs_lib" >&5
13315echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
13316if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13317  echo $ECHO_N "(cached) $ECHO_C" >&6
13318else
13319  ac_check_lib_save_LIBS=$LIBS
13320LIBS="-l$cf_curs_lib  $LIBS"
13321cat >conftest.$ac_ext <<_ACEOF
13322#line 13322 "configure"
13323#include "confdefs.h"
13324
13325/* Override any gcc2 internal prototype to avoid an error.  */
13326#ifdef __cplusplus
13327extern "C"
13328#endif
13329/* We use char because int might match the return type of a gcc2
13330   builtin and then its argument prototype would still apply.  */
13331char initscr ();
13332int
13333main ()
13334{
13335initscr ();
13336  ;
13337  return 0;
13338}
13339_ACEOF
13340rm -f conftest.$ac_objext conftest$ac_exeext
13341if { (eval echo "$as_me:13341: \"$ac_link\"") >&5
13342  (eval $ac_link) 2>&5
13343  ac_status=$?
13344  echo "$as_me:13344: \$? = $ac_status" >&5
13345  (exit $ac_status); } &&
13346         { ac_try='test -s conftest$ac_exeext'
13347  { (eval echo "$as_me:13347: \"$ac_try\"") >&5
13348  (eval $ac_try) 2>&5
13349  ac_status=$?
13350  echo "$as_me:13350: \$? = $ac_status" >&5
13351  (exit $ac_status); }; }; then
13352  eval "$as_ac_Lib=yes"
13353else
13354  echo "$as_me: failed program was:" >&5
13355cat conftest.$ac_ext >&5
13356eval "$as_ac_Lib=no"
13357fi
13358rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13359LIBS=$ac_check_lib_save_LIBS
13360fi
13361echo "$as_me:13361: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13362echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13363if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13364  break
13365fi
13366
13367		done
13368	fi
13369	test $cf_curs_lib = unknown && { { echo "$as_me:13369: error: no curses library found" >&5
13370echo "$as_me: error: no curses library found" >&2;}
13371   { (exit 1); exit 1; }; }
13372
13373	LIBS="-l$cf_curs_lib $cf_save_LIBS"
13374	if test "$cf_term_lib" = unknown ; then
13375		echo "$as_me:13375: checking if we can link with $cf_curs_lib library" >&5
13376echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
13377		cat >conftest.$ac_ext <<_ACEOF
13378#line 13378 "configure"
13379#include "confdefs.h"
13380#include <${cf_cv_ncurses_header:-curses.h}>
13381int
13382main ()
13383{
13384initscr()
13385  ;
13386  return 0;
13387}
13388_ACEOF
13389rm -f conftest.$ac_objext conftest$ac_exeext
13390if { (eval echo "$as_me:13390: \"$ac_link\"") >&5
13391  (eval $ac_link) 2>&5
13392  ac_status=$?
13393  echo "$as_me:13393: \$? = $ac_status" >&5
13394  (exit $ac_status); } &&
13395         { ac_try='test -s conftest$ac_exeext'
13396  { (eval echo "$as_me:13396: \"$ac_try\"") >&5
13397  (eval $ac_try) 2>&5
13398  ac_status=$?
13399  echo "$as_me:13399: \$? = $ac_status" >&5
13400  (exit $ac_status); }; }; then
13401  cf_result=yes
13402else
13403  echo "$as_me: failed program was:" >&5
13404cat conftest.$ac_ext >&5
13405cf_result=no
13406fi
13407rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13408		echo "$as_me:13408: result: $cf_result" >&5
13409echo "${ECHO_T}$cf_result" >&6
13410		test $cf_result = no && { { echo "$as_me:13410: error: Cannot link curses library" >&5
13411echo "$as_me: error: Cannot link curses library" >&2;}
13412   { (exit 1); exit 1; }; }
13413	elif test "$cf_curs_lib" = "$cf_term_lib" ; then
13414		:
13415	elif test "$cf_term_lib" != predefined ; then
13416		echo "$as_me:13416: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
13417echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
13418		cat >conftest.$ac_ext <<_ACEOF
13419#line 13419 "configure"
13420#include "confdefs.h"
13421#include <${cf_cv_ncurses_header:-curses.h}>
13422int
13423main ()
13424{
13425initscr(); tgoto((char *)0, 0, 0);
13426  ;
13427  return 0;
13428}
13429_ACEOF
13430rm -f conftest.$ac_objext conftest$ac_exeext
13431if { (eval echo "$as_me:13431: \"$ac_link\"") >&5
13432  (eval $ac_link) 2>&5
13433  ac_status=$?
13434  echo "$as_me:13434: \$? = $ac_status" >&5
13435  (exit $ac_status); } &&
13436         { ac_try='test -s conftest$ac_exeext'
13437  { (eval echo "$as_me:13437: \"$ac_try\"") >&5
13438  (eval $ac_try) 2>&5
13439  ac_status=$?
13440  echo "$as_me:13440: \$? = $ac_status" >&5
13441  (exit $ac_status); }; }; then
13442  cf_result=no
13443else
13444  echo "$as_me: failed program was:" >&5
13445cat conftest.$ac_ext >&5
13446
13447			LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
13448			cat >conftest.$ac_ext <<_ACEOF
13449#line 13449 "configure"
13450#include "confdefs.h"
13451#include <${cf_cv_ncurses_header:-curses.h}>
13452int
13453main ()
13454{
13455initscr()
13456  ;
13457  return 0;
13458}
13459_ACEOF
13460rm -f conftest.$ac_objext conftest$ac_exeext
13461if { (eval echo "$as_me:13461: \"$ac_link\"") >&5
13462  (eval $ac_link) 2>&5
13463  ac_status=$?
13464  echo "$as_me:13464: \$? = $ac_status" >&5
13465  (exit $ac_status); } &&
13466         { ac_try='test -s conftest$ac_exeext'
13467  { (eval echo "$as_me:13467: \"$ac_try\"") >&5
13468  (eval $ac_try) 2>&5
13469  ac_status=$?
13470  echo "$as_me:13470: \$? = $ac_status" >&5
13471  (exit $ac_status); }; }; then
13472  cf_result=yes
13473else
13474  echo "$as_me: failed program was:" >&5
13475cat conftest.$ac_ext >&5
13476cf_result=error
13477fi
13478rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13479
13480fi
13481rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13482		echo "$as_me:13482: result: $cf_result" >&5
13483echo "${ECHO_T}$cf_result" >&6
13484	fi
13485fi
13486fi
13487
13488fi
13489
13490cf_all_widgets=yes
13491
13492echo "$as_me:13492: checking if you want extra dialogs" >&5
13493echo $ECHO_N "checking if you want extra dialogs... $ECHO_C" >&6
13494
13495# Check whether --enable-extras or --disable-extras was given.
13496if test "${enable_extras+set}" = set; then
13497  enableval="$enable_extras"
13498
13499else
13500  enableval=yes
13501fi;
13502echo "$as_me:13502: result: $enableval" >&5
13503echo "${ECHO_T}$enableval" >&6
13504if test "$enableval" != no ; then
13505cf_all_widgets=yes
13506else
13507cf_all_widgets=no
13508fi
13509
13510echo "$as_me:13510: checking if you want config-file support" >&5
13511echo $ECHO_N "checking if you want config-file support... $ECHO_C" >&6
13512
13513# Check whether --enable-rc-file or --disable-rc-file was given.
13514if test "${enable_rc_file+set}" = set; then
13515  enableval="$enable_rc_file"
13516
13517else
13518  enableval=$cf_all_widgets
13519fi;
13520echo "$as_me:13520: result: $enableval" >&5
13521echo "${ECHO_T}$enableval" >&6
13522if test "$enableval" != no ; then
13523EXTRAOBJS="$EXTRAOBJS rc\$o"
13524
13525cat >>confdefs.h <<\EOF
13526#define HAVE_RC_FILE 1
13527EOF
13528
13529else
13530	:
13531fi
13532
13533echo "$as_me:13533: checking if you want Xdialog-style dialogs" >&5
13534echo $ECHO_N "checking if you want Xdialog-style dialogs... $ECHO_C" >&6
13535
13536# Check whether --enable-Xdialog or --disable-Xdialog was given.
13537if test "${enable_Xdialog+set}" = set; then
13538  enableval="$enable_Xdialog"
13539
13540else
13541  enableval=$cf_all_widgets
13542fi;
13543echo "$as_me:13543: result: $enableval" >&5
13544echo "${ECHO_T}$enableval" >&6
13545if test "$enableval" != no ; then
13546EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
13547
13548cat >>confdefs.h <<\EOF
13549#define HAVE_XDIALOG 1
13550EOF
13551
13552else
13553	:
13554fi
13555
13556echo "$as_me:13556: checking if you want extra Xdialog-style dialogs (1.2)" >&5
13557echo $ECHO_N "checking if you want extra Xdialog-style dialogs (1.2)... $ECHO_C" >&6
13558
13559# Check whether --enable-Xdialog2 or --disable-Xdialog2 was given.
13560if test "${enable_Xdialog2+set}" = set; then
13561  enableval="$enable_Xdialog2"
13562
13563else
13564  enableval=$cf_all_widgets
13565fi;
13566echo "$as_me:13566: result: $enableval" >&5
13567echo "${ECHO_T}$enableval" >&6
13568if test "$enableval" != no ; then
13569EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
13570
13571cat >>confdefs.h <<\EOF
13572#define HAVE_XDIALOG2 1
13573EOF
13574
13575else
13576	:
13577fi
13578
13579echo "$as_me:13579: checking if you want compatibility with whiptail options" >&5
13580echo $ECHO_N "checking if you want compatibility with whiptail options... $ECHO_C" >&6
13581
13582# Check whether --enable-whiptail or --disable-whiptail was given.
13583if test "${enable_whiptail+set}" = set; then
13584  enableval="$enable_whiptail"
13585
13586else
13587  enableval=$cf_all_widgets
13588fi;
13589echo "$as_me:13589: result: $enableval" >&5
13590echo "${ECHO_T}$enableval" >&6
13591if test "$enableval" != no ; then
13592
13593cat >>confdefs.h <<\EOF
13594#define HAVE_WHIPTAIL 1
13595EOF
13596
13597else
13598	:
13599fi
13600
13601echo "$as_me:13601: checking if you want the form dialog" >&5
13602echo $ECHO_N "checking if you want the form dialog... $ECHO_C" >&6
13603
13604# Check whether --enable-form or --disable-form was given.
13605if test "${enable_form+set}" = set; then
13606  enableval="$enable_form"
13607
13608else
13609  enableval=$cf_all_widgets
13610fi;
13611echo "$as_me:13611: result: $enableval" >&5
13612echo "${ECHO_T}$enableval" >&6
13613if test "$enableval" != no ; then
13614EXTRAOBJS="$EXTRAOBJS formbox\$o"
13615
13616cat >>confdefs.h <<\EOF
13617#define HAVE_DLG_FORMBOX 1
13618EOF
13619
13620else
13621	:
13622fi
13623
13624echo "$as_me:13624: checking if you want the gauge dialog" >&5
13625echo $ECHO_N "checking if you want the gauge dialog... $ECHO_C" >&6
13626
13627# Check whether --enable-gauge or --disable-gauge was given.
13628if test "${enable_gauge+set}" = set; then
13629  enableval="$enable_gauge"
13630
13631else
13632  enableval=$cf_all_widgets
13633fi;
13634echo "$as_me:13634: result: $enableval" >&5
13635echo "${ECHO_T}$enableval" >&6
13636if test "$enableval" != no ; then
13637EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
13638
13639cat >>confdefs.h <<\EOF
13640#define HAVE_DLG_GAUGE 1
13641EOF
13642
13643else
13644	:
13645fi
13646
13647echo "$as_me:13647: checking if you want the tailbox dialog" >&5
13648echo $ECHO_N "checking if you want the tailbox dialog... $ECHO_C" >&6
13649
13650# Check whether --enable-tailbox or --disable-tailbox was given.
13651if test "${enable_tailbox+set}" = set; then
13652  enableval="$enable_tailbox"
13653
13654else
13655  enableval=$cf_all_widgets
13656fi;
13657echo "$as_me:13657: result: $enableval" >&5
13658echo "${ECHO_T}$enableval" >&6
13659if test "$enableval" != no ; then
13660EXTRAOBJS="$EXTRAOBJS tailbox\$o"
13661
13662cat >>confdefs.h <<\EOF
13663#define HAVE_DLG_TAILBOX 1
13664EOF
13665
13666else
13667	:
13668fi
13669
13670echo "$as_me:13670: checking if you want the mixedform dialog" >&5
13671echo $ECHO_N "checking if you want the mixedform dialog... $ECHO_C" >&6
13672
13673# Check whether --enable-mixedform or --disable-mixedform was given.
13674if test "${enable_mixedform+set}" = set; then
13675  enableval="$enable_mixedform"
13676
13677else
13678  enableval=$cf_all_widgets
13679fi;
13680echo "$as_me:13680: result: $enableval" >&5
13681echo "${ECHO_T}$enableval" >&6
13682if test "$enableval" != no ; then
13683EXTRAOBJS="$EXTRAOBJS mixedform\$o"
13684
13685cat >>confdefs.h <<\EOF
13686#define HAVE_DLG_MIXEDFORM 1
13687EOF
13688
13689else
13690	:
13691fi
13692
13693echo "$as_me:13693: checking if you want the mixedgauge dialog" >&5
13694echo $ECHO_N "checking if you want the mixedgauge dialog... $ECHO_C" >&6
13695
13696# Check whether --enable-mixedgauge or --disable-mixedgauge was given.
13697if test "${enable_mixedgauge+set}" = set; then
13698  enableval="$enable_mixedgauge"
13699
13700else
13701  enableval=$cf_all_widgets
13702fi;
13703echo "$as_me:13703: result: $enableval" >&5
13704echo "${ECHO_T}$enableval" >&6
13705if test "$enableval" != no ; then
13706EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
13707
13708cat >>confdefs.h <<\EOF
13709#define HAVE_MIXEDGAUGE 1
13710EOF
13711
13712else
13713	:
13714fi
13715
13716echo "$as_me:13716: checking if you want the wide-curses features" >&5
13717echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
13718
13719# Check whether --enable-widec or --disable-widec was given.
13720if test "${enable_widec+set}" = set; then
13721  enableval="$enable_widec"
13722
13723else
13724  enableval=$cf_wide_curses
13725fi;
13726echo "$as_me:13726: result: $enableval" >&5
13727echo "${ECHO_T}$enableval" >&6
13728if test "$enableval" != no ; then
13729
13730cat >>confdefs.h <<\EOF
13731#define USE_WIDE_CURSES 1
13732EOF
13733
13734else
13735	:
13736fi
13737
13738echo "$as_me:13738: checking for ANSI C header files" >&5
13739echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13740if test "${ac_cv_header_stdc+set}" = set; then
13741  echo $ECHO_N "(cached) $ECHO_C" >&6
13742else
13743  cat >conftest.$ac_ext <<_ACEOF
13744#line 13744 "configure"
13745#include "confdefs.h"
13746#include <stdlib.h>
13747#include <stdarg.h>
13748#include <string.h>
13749#include <float.h>
13750
13751_ACEOF
13752if { (eval echo "$as_me:13752: \"$ac_cpp conftest.$ac_ext\"") >&5
13753  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13754  ac_status=$?
13755  egrep -v '^ *\+' conftest.er1 >conftest.err
13756  rm -f conftest.er1
13757  cat conftest.err >&5
13758  echo "$as_me:13758: \$? = $ac_status" >&5
13759  (exit $ac_status); } >/dev/null; then
13760  if test -s conftest.err; then
13761    ac_cpp_err=$ac_c_preproc_warn_flag
13762  else
13763    ac_cpp_err=
13764  fi
13765else
13766  ac_cpp_err=yes
13767fi
13768if test -z "$ac_cpp_err"; then
13769  ac_cv_header_stdc=yes
13770else
13771  echo "$as_me: failed program was:" >&5
13772  cat conftest.$ac_ext >&5
13773  ac_cv_header_stdc=no
13774fi
13775rm -f conftest.err conftest.$ac_ext
13776
13777if test $ac_cv_header_stdc = yes; then
13778  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13779  cat >conftest.$ac_ext <<_ACEOF
13780#line 13780 "configure"
13781#include "confdefs.h"
13782#include <string.h>
13783
13784_ACEOF
13785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13786  egrep "memchr" >/dev/null 2>&1; then
13787  :
13788else
13789  ac_cv_header_stdc=no
13790fi
13791rm -rf conftest*
13792
13793fi
13794
13795if test $ac_cv_header_stdc = yes; then
13796  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13797  cat >conftest.$ac_ext <<_ACEOF
13798#line 13798 "configure"
13799#include "confdefs.h"
13800#include <stdlib.h>
13801
13802_ACEOF
13803if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13804  egrep "free" >/dev/null 2>&1; then
13805  :
13806else
13807  ac_cv_header_stdc=no
13808fi
13809rm -rf conftest*
13810
13811fi
13812
13813if test $ac_cv_header_stdc = yes; then
13814  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13815  if test "$cross_compiling" = yes; then
13816  :
13817else
13818  cat >conftest.$ac_ext <<_ACEOF
13819#line 13819 "configure"
13820#include "confdefs.h"
13821#include <ctype.h>
13822#if ((' ' & 0x0FF) == 0x020)
13823# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13824# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13825#else
13826# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13827                     || ('j' <= (c) && (c) <= 'r') \
13828                     || ('s' <= (c) && (c) <= 'z'))
13829# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13830#endif
13831
13832#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13833int
13834main ()
13835{
13836  int i;
13837  for (i = 0; i < 256; i++)
13838    if (XOR (islower (i), ISLOWER (i))
13839        || toupper (i) != TOUPPER (i))
13840      $ac_main_return(2);
13841  $ac_main_return (0);
13842}
13843_ACEOF
13844rm -f conftest$ac_exeext
13845if { (eval echo "$as_me:13845: \"$ac_link\"") >&5
13846  (eval $ac_link) 2>&5
13847  ac_status=$?
13848  echo "$as_me:13848: \$? = $ac_status" >&5
13849  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13850  { (eval echo "$as_me:13850: \"$ac_try\"") >&5
13851  (eval $ac_try) 2>&5
13852  ac_status=$?
13853  echo "$as_me:13853: \$? = $ac_status" >&5
13854  (exit $ac_status); }; }; then
13855  :
13856else
13857  echo "$as_me: program exited with status $ac_status" >&5
13858echo "$as_me: failed program was:" >&5
13859cat conftest.$ac_ext >&5
13860ac_cv_header_stdc=no
13861fi
13862rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13863fi
13864fi
13865fi
13866echo "$as_me:13866: result: $ac_cv_header_stdc" >&5
13867echo "${ECHO_T}$ac_cv_header_stdc" >&6
13868if test $ac_cv_header_stdc = yes; then
13869
13870cat >>confdefs.h <<\EOF
13871#define STDC_HEADERS 1
13872EOF
13873
13874fi
13875
13876echo "$as_me:13876: checking whether time.h and sys/time.h may both be included" >&5
13877echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13878if test "${ac_cv_header_time+set}" = set; then
13879  echo $ECHO_N "(cached) $ECHO_C" >&6
13880else
13881  cat >conftest.$ac_ext <<_ACEOF
13882#line 13882 "configure"
13883#include "confdefs.h"
13884#include <sys/types.h>
13885#include <sys/time.h>
13886#include <time.h>
13887
13888int
13889main ()
13890{
13891if ((struct tm *) 0)
13892return 0;
13893  ;
13894  return 0;
13895}
13896_ACEOF
13897rm -f conftest.$ac_objext
13898if { (eval echo "$as_me:13898: \"$ac_compile\"") >&5
13899  (eval $ac_compile) 2>&5
13900  ac_status=$?
13901  echo "$as_me:13901: \$? = $ac_status" >&5
13902  (exit $ac_status); } &&
13903         { ac_try='test -s conftest.$ac_objext'
13904  { (eval echo "$as_me:13904: \"$ac_try\"") >&5
13905  (eval $ac_try) 2>&5
13906  ac_status=$?
13907  echo "$as_me:13907: \$? = $ac_status" >&5
13908  (exit $ac_status); }; }; then
13909  ac_cv_header_time=yes
13910else
13911  echo "$as_me: failed program was:" >&5
13912cat conftest.$ac_ext >&5
13913ac_cv_header_time=no
13914fi
13915rm -f conftest.$ac_objext conftest.$ac_ext
13916fi
13917echo "$as_me:13917: result: $ac_cv_header_time" >&5
13918echo "${ECHO_T}$ac_cv_header_time" >&6
13919if test $ac_cv_header_time = yes; then
13920
13921cat >>confdefs.h <<\EOF
13922#define TIME_WITH_SYS_TIME 1
13923EOF
13924
13925fi
13926
13927ac_header_dirent=no
13928for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13929  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13930echo "$as_me:13930: checking for $ac_hdr that defines DIR" >&5
13931echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13932if eval "test \"\${$as_ac_Header+set}\" = set"; then
13933  echo $ECHO_N "(cached) $ECHO_C" >&6
13934else
13935  cat >conftest.$ac_ext <<_ACEOF
13936#line 13936 "configure"
13937#include "confdefs.h"
13938#include <sys/types.h>
13939#include <$ac_hdr>
13940
13941int
13942main ()
13943{
13944if ((DIR *) 0)
13945return 0;
13946  ;
13947  return 0;
13948}
13949_ACEOF
13950rm -f conftest.$ac_objext
13951if { (eval echo "$as_me:13951: \"$ac_compile\"") >&5
13952  (eval $ac_compile) 2>&5
13953  ac_status=$?
13954  echo "$as_me:13954: \$? = $ac_status" >&5
13955  (exit $ac_status); } &&
13956         { ac_try='test -s conftest.$ac_objext'
13957  { (eval echo "$as_me:13957: \"$ac_try\"") >&5
13958  (eval $ac_try) 2>&5
13959  ac_status=$?
13960  echo "$as_me:13960: \$? = $ac_status" >&5
13961  (exit $ac_status); }; }; then
13962  eval "$as_ac_Header=yes"
13963else
13964  echo "$as_me: failed program was:" >&5
13965cat conftest.$ac_ext >&5
13966eval "$as_ac_Header=no"
13967fi
13968rm -f conftest.$ac_objext conftest.$ac_ext
13969fi
13970echo "$as_me:13970: result: `eval echo '${'$as_ac_Header'}'`" >&5
13971echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13972if test `eval echo '${'$as_ac_Header'}'` = yes; then
13973  cat >>confdefs.h <<EOF
13974#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13975EOF
13976
13977ac_header_dirent=$ac_hdr; break
13978fi
13979
13980done
13981# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13982if test $ac_header_dirent = dirent.h; then
13983  echo "$as_me:13983: checking for opendir in -ldir" >&5
13984echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13985if test "${ac_cv_lib_dir_opendir+set}" = set; then
13986  echo $ECHO_N "(cached) $ECHO_C" >&6
13987else
13988  ac_check_lib_save_LIBS=$LIBS
13989LIBS="-ldir  $LIBS"
13990cat >conftest.$ac_ext <<_ACEOF
13991#line 13991 "configure"
13992#include "confdefs.h"
13993
13994/* Override any gcc2 internal prototype to avoid an error.  */
13995#ifdef __cplusplus
13996extern "C"
13997#endif
13998/* We use char because int might match the return type of a gcc2
13999   builtin and then its argument prototype would still apply.  */
14000char opendir ();
14001int
14002main ()
14003{
14004opendir ();
14005  ;
14006  return 0;
14007}
14008_ACEOF
14009rm -f conftest.$ac_objext conftest$ac_exeext
14010if { (eval echo "$as_me:14010: \"$ac_link\"") >&5
14011  (eval $ac_link) 2>&5
14012  ac_status=$?
14013  echo "$as_me:14013: \$? = $ac_status" >&5
14014  (exit $ac_status); } &&
14015         { ac_try='test -s conftest$ac_exeext'
14016  { (eval echo "$as_me:14016: \"$ac_try\"") >&5
14017  (eval $ac_try) 2>&5
14018  ac_status=$?
14019  echo "$as_me:14019: \$? = $ac_status" >&5
14020  (exit $ac_status); }; }; then
14021  ac_cv_lib_dir_opendir=yes
14022else
14023  echo "$as_me: failed program was:" >&5
14024cat conftest.$ac_ext >&5
14025ac_cv_lib_dir_opendir=no
14026fi
14027rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14028LIBS=$ac_check_lib_save_LIBS
14029fi
14030echo "$as_me:14030: result: $ac_cv_lib_dir_opendir" >&5
14031echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14032if test $ac_cv_lib_dir_opendir = yes; then
14033  LIBS="$LIBS -ldir"
14034fi
14035
14036else
14037  echo "$as_me:14037: checking for opendir in -lx" >&5
14038echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14039if test "${ac_cv_lib_x_opendir+set}" = set; then
14040  echo $ECHO_N "(cached) $ECHO_C" >&6
14041else
14042  ac_check_lib_save_LIBS=$LIBS
14043LIBS="-lx  $LIBS"
14044cat >conftest.$ac_ext <<_ACEOF
14045#line 14045 "configure"
14046#include "confdefs.h"
14047
14048/* Override any gcc2 internal prototype to avoid an error.  */
14049#ifdef __cplusplus
14050extern "C"
14051#endif
14052/* We use char because int might match the return type of a gcc2
14053   builtin and then its argument prototype would still apply.  */
14054char opendir ();
14055int
14056main ()
14057{
14058opendir ();
14059  ;
14060  return 0;
14061}
14062_ACEOF
14063rm -f conftest.$ac_objext conftest$ac_exeext
14064if { (eval echo "$as_me:14064: \"$ac_link\"") >&5
14065  (eval $ac_link) 2>&5
14066  ac_status=$?
14067  echo "$as_me:14067: \$? = $ac_status" >&5
14068  (exit $ac_status); } &&
14069         { ac_try='test -s conftest$ac_exeext'
14070  { (eval echo "$as_me:14070: \"$ac_try\"") >&5
14071  (eval $ac_try) 2>&5
14072  ac_status=$?
14073  echo "$as_me:14073: \$? = $ac_status" >&5
14074  (exit $ac_status); }; }; then
14075  ac_cv_lib_x_opendir=yes
14076else
14077  echo "$as_me: failed program was:" >&5
14078cat conftest.$ac_ext >&5
14079ac_cv_lib_x_opendir=no
14080fi
14081rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14082LIBS=$ac_check_lib_save_LIBS
14083fi
14084echo "$as_me:14084: result: $ac_cv_lib_x_opendir" >&5
14085echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14086if test $ac_cv_lib_x_opendir = yes; then
14087  LIBS="$LIBS -lx"
14088fi
14089
14090fi
14091
14092for ac_header in search.h unctrl.h unistd.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
14140echo "$as_me:14140: checking for term.h" >&5
14141echo $ECHO_N "checking for term.h... $ECHO_C" >&6
14142if test "${cf_cv_term_header+set}" = set; then
14143  echo $ECHO_N "(cached) $ECHO_C" >&6
14144else
14145
14146# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
14147# for <term.h> if we do not find the variant.
14148
14149cf_header_list="term.h ncurses/term.h ncursesw/term.h"
14150
14151case ${cf_cv_ncurses_header:-curses.h} in #(vi
14152*/*)
14153	cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
14154	cf_header_list="$cf_header_item $cf_header_list"
14155	;;
14156esac
14157
14158for cf_header in $cf_header_list
14159do
14160	cat >conftest.$ac_ext <<_ACEOF
14161#line 14161 "configure"
14162#include "confdefs.h"
14163
14164#include <${cf_cv_ncurses_header:-curses.h}>
14165#include <${cf_header}>
14166int
14167main ()
14168{
14169WINDOW *x
14170  ;
14171  return 0;
14172}
14173_ACEOF
14174rm -f conftest.$ac_objext
14175if { (eval echo "$as_me:14175: \"$ac_compile\"") >&5
14176  (eval $ac_compile) 2>&5
14177  ac_status=$?
14178  echo "$as_me:14178: \$? = $ac_status" >&5
14179  (exit $ac_status); } &&
14180         { ac_try='test -s conftest.$ac_objext'
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_term_header=$cf_header
14187	 break
14188else
14189  echo "$as_me: failed program was:" >&5
14190cat conftest.$ac_ext >&5
14191cf_cv_term_header=no
14192fi
14193rm -f conftest.$ac_objext conftest.$ac_ext
14194done
14195
14196case $cf_cv_term_header in #(vi
14197no)
14198	# If curses is ncurses, some packagers still mess it up by trying to make
14199	# us use GNU termcap.  This handles the most common case.
14200	for cf_header in ncurses/term.h ncursesw/term.h
14201	do
14202		cat >conftest.$ac_ext <<_ACEOF
14203#line 14203 "configure"
14204#include "confdefs.h"
14205
14206#include <${cf_cv_ncurses_header:-curses.h}>
14207#ifdef NCURSES_VERSION
14208#include <${cf_header}>
14209#else
14210make an error
14211#endif
14212int
14213main ()
14214{
14215WINDOW *x
14216  ;
14217  return 0;
14218}
14219_ACEOF
14220rm -f conftest.$ac_objext
14221if { (eval echo "$as_me:14221: \"$ac_compile\"") >&5
14222  (eval $ac_compile) 2>&5
14223  ac_status=$?
14224  echo "$as_me:14224: \$? = $ac_status" >&5
14225  (exit $ac_status); } &&
14226         { ac_try='test -s conftest.$ac_objext'
14227  { (eval echo "$as_me:14227: \"$ac_try\"") >&5
14228  (eval $ac_try) 2>&5
14229  ac_status=$?
14230  echo "$as_me:14230: \$? = $ac_status" >&5
14231  (exit $ac_status); }; }; then
14232  cf_cv_term_header=$cf_header
14233			 break
14234else
14235  echo "$as_me: failed program was:" >&5
14236cat conftest.$ac_ext >&5
14237cf_cv_term_header=no
14238fi
14239rm -f conftest.$ac_objext conftest.$ac_ext
14240	done
14241	;;
14242esac
14243
14244fi
14245echo "$as_me:14245: result: $cf_cv_term_header" >&5
14246echo "${ECHO_T}$cf_cv_term_header" >&6
14247
14248case $cf_cv_term_header in #(vi
14249term.h) #(vi
14250
14251cat >>confdefs.h <<\EOF
14252#define HAVE_TERM_H 1
14253EOF
14254
14255	;;
14256ncurses/term.h) #(vi
14257
14258cat >>confdefs.h <<\EOF
14259#define HAVE_NCURSES_TERM_H 1
14260EOF
14261
14262	;;
14263ncursesw/term.h)
14264
14265cat >>confdefs.h <<\EOF
14266#define HAVE_NCURSESW_TERM_H 1
14267EOF
14268
14269	;;
14270esac
14271
14272echo "$as_me:14272: checking return type of signal handlers" >&5
14273echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14274if test "${ac_cv_type_signal+set}" = set; then
14275  echo $ECHO_N "(cached) $ECHO_C" >&6
14276else
14277  cat >conftest.$ac_ext <<_ACEOF
14278#line 14278 "configure"
14279#include "confdefs.h"
14280#include <sys/types.h>
14281#include <signal.h>
14282#ifdef signal
14283# undef signal
14284#endif
14285#ifdef __cplusplus
14286extern "C" void (*signal (int, void (*)(int)))(int);
14287#else
14288void (*signal ()) ();
14289#endif
14290
14291int
14292main ()
14293{
14294int i;
14295  ;
14296  return 0;
14297}
14298_ACEOF
14299rm -f conftest.$ac_objext
14300if { (eval echo "$as_me:14300: \"$ac_compile\"") >&5
14301  (eval $ac_compile) 2>&5
14302  ac_status=$?
14303  echo "$as_me:14303: \$? = $ac_status" >&5
14304  (exit $ac_status); } &&
14305         { ac_try='test -s conftest.$ac_objext'
14306  { (eval echo "$as_me:14306: \"$ac_try\"") >&5
14307  (eval $ac_try) 2>&5
14308  ac_status=$?
14309  echo "$as_me:14309: \$? = $ac_status" >&5
14310  (exit $ac_status); }; }; then
14311  ac_cv_type_signal=void
14312else
14313  echo "$as_me: failed program was:" >&5
14314cat conftest.$ac_ext >&5
14315ac_cv_type_signal=int
14316fi
14317rm -f conftest.$ac_objext conftest.$ac_ext
14318fi
14319echo "$as_me:14319: result: $ac_cv_type_signal" >&5
14320echo "${ECHO_T}$ac_cv_type_signal" >&6
14321
14322cat >>confdefs.h <<EOF
14323#define RETSIGTYPE $ac_cv_type_signal
14324EOF
14325
14326for ac_func in \
14327_nc_free_and_exit \
14328btowc \
14329mblen \
14330mbrlen \
14331mbrtowc \
14332mbtowc \
14333strcasecmp \
14334strftime \
14335tsearch \
14336waitpid \
14337wcsrtombs \
14338wcstombs \
14339wctob \
14340wctomb \
14341
14342do
14343as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14344echo "$as_me:14344: checking for $ac_func" >&5
14345echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14346if eval "test \"\${$as_ac_var+set}\" = set"; then
14347  echo $ECHO_N "(cached) $ECHO_C" >&6
14348else
14349  cat >conftest.$ac_ext <<_ACEOF
14350#line 14350 "configure"
14351#include "confdefs.h"
14352/* System header to define __stub macros and hopefully few prototypes,
14353    which can conflict with char $ac_func (); below.  */
14354#include <assert.h>
14355/* Override any gcc2 internal prototype to avoid an error.  */
14356#ifdef __cplusplus
14357extern "C"
14358#endif
14359/* We use char because int might match the return type of a gcc2
14360   builtin and then its argument prototype would still apply.  */
14361char $ac_func ();
14362char (*f) ();
14363
14364int
14365main ()
14366{
14367/* The GNU C library defines this for functions which it implements
14368    to always fail with ENOSYS.  Some functions are actually named
14369    something starting with __ and the normal name is an alias.  */
14370#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14371choke me
14372#else
14373f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14374#endif
14375
14376  ;
14377  return 0;
14378}
14379_ACEOF
14380rm -f conftest.$ac_objext conftest$ac_exeext
14381if { (eval echo "$as_me:14381: \"$ac_link\"") >&5
14382  (eval $ac_link) 2>&5
14383  ac_status=$?
14384  echo "$as_me:14384: \$? = $ac_status" >&5
14385  (exit $ac_status); } &&
14386         { ac_try='test -s conftest$ac_exeext'
14387  { (eval echo "$as_me:14387: \"$ac_try\"") >&5
14388  (eval $ac_try) 2>&5
14389  ac_status=$?
14390  echo "$as_me:14390: \$? = $ac_status" >&5
14391  (exit $ac_status); }; }; then
14392  eval "$as_ac_var=yes"
14393else
14394  echo "$as_me: failed program was:" >&5
14395cat conftest.$ac_ext >&5
14396eval "$as_ac_var=no"
14397fi
14398rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14399fi
14400echo "$as_me:14400: result: `eval echo '${'$as_ac_var'}'`" >&5
14401echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14402if test `eval echo '${'$as_ac_var'}'` = yes; then
14403  cat >>confdefs.h <<EOF
14404#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14405EOF
14406
14407fi
14408done
14409
14410echo "$as_me:14410: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
14411echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
14412if test "${cf_cv_need_xopen_extension+set}" = set; then
14413  echo $ECHO_N "(cached) $ECHO_C" >&6
14414else
14415
14416cat >conftest.$ac_ext <<_ACEOF
14417#line 14417 "configure"
14418#include "confdefs.h"
14419
14420#include <stdlib.h>
14421#include <${cf_cv_ncurses_header:-curses.h}>
14422int
14423main ()
14424{
14425
14426#if defined(NCURSES_VERSION_PATCH)
14427#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
14428	make an error
14429#endif
14430#endif
14431	long x = winnstr(stdscr, "", 0);
14432	int x1, y1;
14433	getbegyx(stdscr, y1, x1)
14434  ;
14435  return 0;
14436}
14437_ACEOF
14438rm -f conftest.$ac_objext conftest$ac_exeext
14439if { (eval echo "$as_me:14439: \"$ac_link\"") >&5
14440  (eval $ac_link) 2>&5
14441  ac_status=$?
14442  echo "$as_me:14442: \$? = $ac_status" >&5
14443  (exit $ac_status); } &&
14444         { ac_try='test -s conftest$ac_exeext'
14445  { (eval echo "$as_me:14445: \"$ac_try\"") >&5
14446  (eval $ac_try) 2>&5
14447  ac_status=$?
14448  echo "$as_me:14448: \$? = $ac_status" >&5
14449  (exit $ac_status); }; }; then
14450  cf_cv_need_xopen_extension=no
14451else
14452  echo "$as_me: failed program was:" >&5
14453cat conftest.$ac_ext >&5
14454cat >conftest.$ac_ext <<_ACEOF
14455#line 14455 "configure"
14456#include "confdefs.h"
14457
14458#define _XOPEN_SOURCE_EXTENDED
14459#include <stdlib.h>
14460#include <${cf_cv_ncurses_header:-curses.h}>
14461int
14462main ()
14463{
14464
14465#ifdef NCURSES_VERSION
14466	cchar_t check;
14467	int check2 = curs_set((int)sizeof(check));
14468#endif
14469	long x = winnstr(stdscr, "", 0);
14470	int x1, y1;
14471	getbegyx(stdscr, y1, x1)
14472  ;
14473  return 0;
14474}
14475_ACEOF
14476rm -f conftest.$ac_objext conftest$ac_exeext
14477if { (eval echo "$as_me:14477: \"$ac_link\"") >&5
14478  (eval $ac_link) 2>&5
14479  ac_status=$?
14480  echo "$as_me:14480: \$? = $ac_status" >&5
14481  (exit $ac_status); } &&
14482         { ac_try='test -s conftest$ac_exeext'
14483  { (eval echo "$as_me:14483: \"$ac_try\"") >&5
14484  (eval $ac_try) 2>&5
14485  ac_status=$?
14486  echo "$as_me:14486: \$? = $ac_status" >&5
14487  (exit $ac_status); }; }; then
14488  cf_cv_need_xopen_extension=yes
14489else
14490  echo "$as_me: failed program was:" >&5
14491cat conftest.$ac_ext >&5
14492cf_cv_need_xopen_extension=unknown
14493fi
14494rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14495fi
14496rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14497fi
14498echo "$as_me:14498: result: $cf_cv_need_xopen_extension" >&5
14499echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
14500test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
14501
14502echo "$as_me:14502: checking for unctrl.h" >&5
14503echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
14504if test "${cf_cv_unctrl_header+set}" = set; then
14505  echo $ECHO_N "(cached) $ECHO_C" >&6
14506else
14507
14508# If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
14509# for <unctrl.h> if we do not find the variant.
14510
14511cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
14512
14513case ${cf_cv_ncurses_header:-curses.h} in #(vi
14514*/*)
14515	cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
14516	cf_header_list="$cf_header_item $cf_header_list"
14517	;;
14518esac
14519
14520for cf_header in $cf_header_list
14521do
14522	cat >conftest.$ac_ext <<_ACEOF
14523#line 14523 "configure"
14524#include "confdefs.h"
14525
14526#include <${cf_cv_ncurses_header:-curses.h}>
14527#include <${cf_header}>
14528int
14529main ()
14530{
14531WINDOW *x
14532  ;
14533  return 0;
14534}
14535_ACEOF
14536rm -f conftest.$ac_objext
14537if { (eval echo "$as_me:14537: \"$ac_compile\"") >&5
14538  (eval $ac_compile) 2>&5
14539  ac_status=$?
14540  echo "$as_me:14540: \$? = $ac_status" >&5
14541  (exit $ac_status); } &&
14542         { ac_try='test -s conftest.$ac_objext'
14543  { (eval echo "$as_me:14543: \"$ac_try\"") >&5
14544  (eval $ac_try) 2>&5
14545  ac_status=$?
14546  echo "$as_me:14546: \$? = $ac_status" >&5
14547  (exit $ac_status); }; }; then
14548  cf_cv_unctrl_header=$cf_header
14549	 break
14550else
14551  echo "$as_me: failed program was:" >&5
14552cat conftest.$ac_ext >&5
14553cf_cv_unctrl_header=no
14554fi
14555rm -f conftest.$ac_objext conftest.$ac_ext
14556done
14557
14558case $cf_cv_unctrl_header in #(vi
14559no)
14560	{ echo "$as_me:14560: WARNING: unctrl.h header not found" >&5
14561echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14562	;;
14563esac
14564
14565fi
14566echo "$as_me:14566: result: $cf_cv_unctrl_header" >&5
14567echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14568
14569case $cf_cv_unctrl_header in #(vi
14570unctrl.h) #(vi
14571
14572cat >>confdefs.h <<\EOF
14573#define HAVE_UNCTRL_H 1
14574EOF
14575
14576	;;
14577ncurses/unctrl.h) #(vi
14578
14579cat >>confdefs.h <<\EOF
14580#define HAVE_NCURSES_UNCTRL_H 1
14581EOF
14582
14583	;;
14584ncursesw/unctrl.h)
14585
14586cat >>confdefs.h <<\EOF
14587#define HAVE_NCURSESW_UNCTRL_H 1
14588EOF
14589
14590	;;
14591esac
14592
14593for cf_func in \
14594flushinp \
14595getattrs \
14596getbegx \
14597getbegy \
14598getbegyx \
14599getcurx \
14600getcury \
14601getmaxx \
14602getmaxy \
14603getmaxyx \
14604getparx \
14605getpary \
14606getparyx \
14607use_default_colors \
14608wchgat \
14609wcursyncup \
14610wget_wch \
14611wsyncup \
14612
14613do
14614
14615cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14616
14617	echo "$as_me:14617: checking for ${cf_func}" >&5
14618echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14619
14620echo "${as_me:-configure}:14620: testing ${cf_func} ..." 1>&5
14621
14622	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14623  echo $ECHO_N "(cached) $ECHO_C" >&6
14624else
14625
14626		eval cf_result='$ac_cv_func_'$cf_func
14627		if test ".$cf_result" != ".no"; then
14628			cat >conftest.$ac_ext <<_ACEOF
14629#line 14629 "configure"
14630#include "confdefs.h"
14631
14632#ifdef HAVE_XCURSES
14633#include <xcurses.h>
14634char * XCursesProgramName = "test";
14635#else
14636#include <${cf_cv_ncurses_header:-curses.h}>
14637#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14638#include <ncursesw/term.h>
14639#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14640#include <ncurses/term.h>
14641#elif defined(HAVE_TERM_H)
14642#include <term.h>
14643#endif
14644#endif
14645
14646int
14647main ()
14648{
14649
14650#ifndef ${cf_func}
14651long foo = (long)(&${cf_func});
14652if (foo + 1234 > 5678)
14653	${cf_cv_main_return:-return}(foo);
14654#endif
14655
14656  ;
14657  return 0;
14658}
14659_ACEOF
14660rm -f conftest.$ac_objext conftest$ac_exeext
14661if { (eval echo "$as_me:14661: \"$ac_link\"") >&5
14662  (eval $ac_link) 2>&5
14663  ac_status=$?
14664  echo "$as_me:14664: \$? = $ac_status" >&5
14665  (exit $ac_status); } &&
14666         { ac_try='test -s conftest$ac_exeext'
14667  { (eval echo "$as_me:14667: \"$ac_try\"") >&5
14668  (eval $ac_try) 2>&5
14669  ac_status=$?
14670  echo "$as_me:14670: \$? = $ac_status" >&5
14671  (exit $ac_status); }; }; then
14672  cf_result=yes
14673else
14674  echo "$as_me: failed program was:" >&5
14675cat conftest.$ac_ext >&5
14676cf_result=no
14677fi
14678rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14679		fi
14680		eval 'cf_cv_func_'$cf_func'=$cf_result'
14681
14682fi
14683
14684	# use the computed/retrieved cache-value:
14685	eval 'cf_result=$cf_cv_func_'$cf_func
14686	echo "$as_me:14686: result: $cf_result" >&5
14687echo "${ECHO_T}$cf_result" >&6
14688	if test $cf_result != no; then
14689		cat >>confdefs.h <<EOF
14690#define HAVE_${cf_tr_func} 1
14691EOF
14692
14693	fi
14694done
14695
14696echo "$as_me:14696: checking for start_color" >&5
14697echo $ECHO_N "checking for start_color... $ECHO_C" >&6
14698if test "${ac_cv_func_start_color+set}" = set; then
14699  echo $ECHO_N "(cached) $ECHO_C" >&6
14700else
14701  cat >conftest.$ac_ext <<_ACEOF
14702#line 14702 "configure"
14703#include "confdefs.h"
14704/* System header to define __stub macros and hopefully few prototypes,
14705    which can conflict with char start_color (); below.  */
14706#include <assert.h>
14707/* Override any gcc2 internal prototype to avoid an error.  */
14708#ifdef __cplusplus
14709extern "C"
14710#endif
14711/* We use char because int might match the return type of a gcc2
14712   builtin and then its argument prototype would still apply.  */
14713char start_color ();
14714char (*f) ();
14715
14716int
14717main ()
14718{
14719/* The GNU C library defines this for functions which it implements
14720    to always fail with ENOSYS.  Some functions are actually named
14721    something starting with __ and the normal name is an alias.  */
14722#if defined (__stub_start_color) || defined (__stub___start_color)
14723choke me
14724#else
14725f = start_color; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14726#endif
14727
14728  ;
14729  return 0;
14730}
14731_ACEOF
14732rm -f conftest.$ac_objext conftest$ac_exeext
14733if { (eval echo "$as_me:14733: \"$ac_link\"") >&5
14734  (eval $ac_link) 2>&5
14735  ac_status=$?
14736  echo "$as_me:14736: \$? = $ac_status" >&5
14737  (exit $ac_status); } &&
14738         { ac_try='test -s conftest$ac_exeext'
14739  { (eval echo "$as_me:14739: \"$ac_try\"") >&5
14740  (eval $ac_try) 2>&5
14741  ac_status=$?
14742  echo "$as_me:14742: \$? = $ac_status" >&5
14743  (exit $ac_status); }; }; then
14744  ac_cv_func_start_color=yes
14745else
14746  echo "$as_me: failed program was:" >&5
14747cat conftest.$ac_ext >&5
14748ac_cv_func_start_color=no
14749fi
14750rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14751fi
14752echo "$as_me:14752: result: $ac_cv_func_start_color" >&5
14753echo "${ECHO_T}$ac_cv_func_start_color" >&6
14754if test $ac_cv_func_start_color = yes; then
14755
14756cat >>confdefs.h <<\EOF
14757#define HAVE_COLOR 1
14758EOF
14759
14760fi
14761
14762echo "$as_me:14762: checking for chtype typedef" >&5
14763echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
14764if test "${cf_cv_chtype_decl+set}" = set; then
14765  echo $ECHO_N "(cached) $ECHO_C" >&6
14766else
14767
14768	cat >conftest.$ac_ext <<_ACEOF
14769#line 14769 "configure"
14770#include "confdefs.h"
14771#include <${cf_cv_ncurses_header:-curses.h}>
14772int
14773main ()
14774{
14775chtype foo
14776  ;
14777  return 0;
14778}
14779_ACEOF
14780rm -f conftest.$ac_objext
14781if { (eval echo "$as_me:14781: \"$ac_compile\"") >&5
14782  (eval $ac_compile) 2>&5
14783  ac_status=$?
14784  echo "$as_me:14784: \$? = $ac_status" >&5
14785  (exit $ac_status); } &&
14786         { ac_try='test -s conftest.$ac_objext'
14787  { (eval echo "$as_me:14787: \"$ac_try\"") >&5
14788  (eval $ac_try) 2>&5
14789  ac_status=$?
14790  echo "$as_me:14790: \$? = $ac_status" >&5
14791  (exit $ac_status); }; }; then
14792  cf_cv_chtype_decl=yes
14793else
14794  echo "$as_me: failed program was:" >&5
14795cat conftest.$ac_ext >&5
14796cf_cv_chtype_decl=no
14797fi
14798rm -f conftest.$ac_objext conftest.$ac_ext
14799fi
14800echo "$as_me:14800: result: $cf_cv_chtype_decl" >&5
14801echo "${ECHO_T}$cf_cv_chtype_decl" >&6
14802if test $cf_cv_chtype_decl = yes ; then
14803
14804cat >>confdefs.h <<\EOF
14805#define HAVE_TYPE_CHTYPE 1
14806EOF
14807
14808	echo "$as_me:14808: checking if chtype is scalar or struct" >&5
14809echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
14810if test "${cf_cv_chtype_type+set}" = set; then
14811  echo $ECHO_N "(cached) $ECHO_C" >&6
14812else
14813
14814		cat >conftest.$ac_ext <<_ACEOF
14815#line 14815 "configure"
14816#include "confdefs.h"
14817#include <${cf_cv_ncurses_header:-curses.h}>
14818int
14819main ()
14820{
14821chtype foo; long x = foo
14822  ;
14823  return 0;
14824}
14825_ACEOF
14826rm -f conftest.$ac_objext
14827if { (eval echo "$as_me:14827: \"$ac_compile\"") >&5
14828  (eval $ac_compile) 2>&5
14829  ac_status=$?
14830  echo "$as_me:14830: \$? = $ac_status" >&5
14831  (exit $ac_status); } &&
14832         { ac_try='test -s conftest.$ac_objext'
14833  { (eval echo "$as_me:14833: \"$ac_try\"") >&5
14834  (eval $ac_try) 2>&5
14835  ac_status=$?
14836  echo "$as_me:14836: \$? = $ac_status" >&5
14837  (exit $ac_status); }; }; then
14838  cf_cv_chtype_type=scalar
14839else
14840  echo "$as_me: failed program was:" >&5
14841cat conftest.$ac_ext >&5
14842cf_cv_chtype_type=struct
14843fi
14844rm -f conftest.$ac_objext conftest.$ac_ext
14845fi
14846echo "$as_me:14846: result: $cf_cv_chtype_type" >&5
14847echo "${ECHO_T}$cf_cv_chtype_type" >&6
14848	if test $cf_cv_chtype_type = scalar ; then
14849
14850cat >>confdefs.h <<\EOF
14851#define TYPE_CHTYPE_IS_SCALAR 1
14852EOF
14853
14854	fi
14855fi
14856
14857echo "$as_me:14857: checking for wide alternate character set array" >&5
14858echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14859if test "${cf_cv_curses_wacs_map+set}" = set; then
14860  echo $ECHO_N "(cached) $ECHO_C" >&6
14861else
14862
14863	cf_cv_curses_wacs_map=unknown
14864	for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14865	do
14866	cat >conftest.$ac_ext <<_ACEOF
14867#line 14867 "configure"
14868#include "confdefs.h"
14869
14870#ifndef _XOPEN_SOURCE_EXTENDED
14871#define _XOPEN_SOURCE_EXTENDED
14872#endif
14873#include <${cf_cv_ncurses_header:-curses.h}>
14874int
14875main ()
14876{
14877void *foo = &($name['k'])
14878  ;
14879  return 0;
14880}
14881_ACEOF
14882rm -f conftest.$ac_objext conftest$ac_exeext
14883if { (eval echo "$as_me:14883: \"$ac_link\"") >&5
14884  (eval $ac_link) 2>&5
14885  ac_status=$?
14886  echo "$as_me:14886: \$? = $ac_status" >&5
14887  (exit $ac_status); } &&
14888         { ac_try='test -s conftest$ac_exeext'
14889  { (eval echo "$as_me:14889: \"$ac_try\"") >&5
14890  (eval $ac_try) 2>&5
14891  ac_status=$?
14892  echo "$as_me:14892: \$? = $ac_status" >&5
14893  (exit $ac_status); }; }; then
14894  cf_cv_curses_wacs_map=$name
14895	 break
14896else
14897  echo "$as_me: failed program was:" >&5
14898cat conftest.$ac_ext >&5
14899fi
14900rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14901	done
14902fi
14903echo "$as_me:14903: result: $cf_cv_curses_wacs_map" >&5
14904echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
14905
14906test "$cf_cv_curses_wacs_map" != unknown &&
14907cat >>confdefs.h <<EOF
14908#define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
14909EOF
14910
14911echo "$as_me:14911: checking for wide alternate character constants" >&5
14912echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
14913if test "${cf_cv_curses_wacs_symbols+set}" = set; then
14914  echo $ECHO_N "(cached) $ECHO_C" >&6
14915else
14916
14917cf_cv_curses_wacs_symbols=no
14918if test "$cf_cv_curses_wacs_map" != unknown
14919then
14920	cat >conftest.$ac_ext <<_ACEOF
14921#line 14921 "configure"
14922#include "confdefs.h"
14923
14924#ifndef _XOPEN_SOURCE_EXTENDED
14925#define _XOPEN_SOURCE_EXTENDED
14926#endif
14927#include <${cf_cv_ncurses_header:-curses.h}>
14928int
14929main ()
14930{
14931cchar_t *foo = WACS_PLUS;
14932	 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
14933  ;
14934  return 0;
14935}
14936_ACEOF
14937rm -f conftest.$ac_objext conftest$ac_exeext
14938if { (eval echo "$as_me:14938: \"$ac_link\"") >&5
14939  (eval $ac_link) 2>&5
14940  ac_status=$?
14941  echo "$as_me:14941: \$? = $ac_status" >&5
14942  (exit $ac_status); } &&
14943         { ac_try='test -s conftest$ac_exeext'
14944  { (eval echo "$as_me:14944: \"$ac_try\"") >&5
14945  (eval $ac_try) 2>&5
14946  ac_status=$?
14947  echo "$as_me:14947: \$? = $ac_status" >&5
14948  (exit $ac_status); }; }; then
14949  cf_cv_curses_wacs_symbols=yes
14950else
14951  echo "$as_me: failed program was:" >&5
14952cat conftest.$ac_ext >&5
14953fi
14954rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14955else
14956	cat >conftest.$ac_ext <<_ACEOF
14957#line 14957 "configure"
14958#include "confdefs.h"
14959
14960#ifndef _XOPEN_SOURCE_EXTENDED
14961#define _XOPEN_SOURCE_EXTENDED
14962#endif
14963#include <${cf_cv_ncurses_header:-curses.h}>
14964int
14965main ()
14966{
14967cchar_t *foo = WACS_PLUS
14968  ;
14969  return 0;
14970}
14971_ACEOF
14972rm -f conftest.$ac_objext conftest$ac_exeext
14973if { (eval echo "$as_me:14973: \"$ac_link\"") >&5
14974  (eval $ac_link) 2>&5
14975  ac_status=$?
14976  echo "$as_me:14976: \$? = $ac_status" >&5
14977  (exit $ac_status); } &&
14978         { ac_try='test -s conftest$ac_exeext'
14979  { (eval echo "$as_me:14979: \"$ac_try\"") >&5
14980  (eval $ac_try) 2>&5
14981  ac_status=$?
14982  echo "$as_me:14982: \$? = $ac_status" >&5
14983  (exit $ac_status); }; }; then
14984  cf_cv_curses_wacs_symbols=yes
14985else
14986  echo "$as_me: failed program was:" >&5
14987cat conftest.$ac_ext >&5
14988fi
14989rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14990fi
14991
14992fi
14993echo "$as_me:14993: result: $cf_cv_curses_wacs_symbols" >&5
14994echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
14995
14996test "$cf_cv_curses_wacs_symbols" != no &&
14997cat >>confdefs.h <<\EOF
14998#define CURSES_WACS_SYMBOLS 1
14999EOF
15000
15001for cf_func in wgetparent
15002do
15003
15004cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15005
15006	echo "$as_me:15006: checking for ${cf_func}" >&5
15007echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
15008
15009echo "${as_me:-configure}:15009: testing ${cf_func} ..." 1>&5
15010
15011	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
15012  echo $ECHO_N "(cached) $ECHO_C" >&6
15013else
15014
15015		eval cf_result='$ac_cv_func_'$cf_func
15016		if test ".$cf_result" != ".no"; then
15017			cat >conftest.$ac_ext <<_ACEOF
15018#line 15018 "configure"
15019#include "confdefs.h"
15020
15021#ifdef HAVE_XCURSES
15022#include <xcurses.h>
15023char * XCursesProgramName = "test";
15024#else
15025#include <${cf_cv_ncurses_header:-curses.h}>
15026#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15027#include <ncursesw/term.h>
15028#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15029#include <ncurses/term.h>
15030#elif defined(HAVE_TERM_H)
15031#include <term.h>
15032#endif
15033#endif
15034
15035int
15036main ()
15037{
15038
15039#ifndef ${cf_func}
15040long foo = (long)(&${cf_func});
15041if (foo + 1234 > 5678)
15042	${cf_cv_main_return:-return}(foo);
15043#endif
15044
15045  ;
15046  return 0;
15047}
15048_ACEOF
15049rm -f conftest.$ac_objext conftest$ac_exeext
15050if { (eval echo "$as_me:15050: \"$ac_link\"") >&5
15051  (eval $ac_link) 2>&5
15052  ac_status=$?
15053  echo "$as_me:15053: \$? = $ac_status" >&5
15054  (exit $ac_status); } &&
15055         { ac_try='test -s conftest$ac_exeext'
15056  { (eval echo "$as_me:15056: \"$ac_try\"") >&5
15057  (eval $ac_try) 2>&5
15058  ac_status=$?
15059  echo "$as_me:15059: \$? = $ac_status" >&5
15060  (exit $ac_status); }; }; then
15061  cf_result=yes
15062else
15063  echo "$as_me: failed program was:" >&5
15064cat conftest.$ac_ext >&5
15065cf_result=no
15066fi
15067rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15068		fi
15069		eval 'cf_cv_func_'$cf_func'=$cf_result'
15070
15071fi
15072
15073	# use the computed/retrieved cache-value:
15074	eval 'cf_result=$cf_cv_func_'$cf_func
15075	echo "$as_me:15075: result: $cf_result" >&5
15076echo "${ECHO_T}$cf_result" >&6
15077	if test $cf_result != no; then
15078		cat >>confdefs.h <<EOF
15079#define HAVE_${cf_tr_func} 1
15080EOF
15081
15082	fi
15083done
15084
15085if test "x$cf_cv_func_wgetparent" != xyes
15086then
15087	echo "$as_me:15087: checking if WINDOW has _parent member" >&5
15088echo $ECHO_N "checking if WINDOW has _parent member... $ECHO_C" >&6
15089	cat >conftest.$ac_ext <<_ACEOF
15090#line 15090 "configure"
15091#include "confdefs.h"
15092#include <${cf_cv_ncurses_header:-curses.h}>
15093int
15094main ()
15095{
15096WINDOW *p = stdscr->_parent
15097  ;
15098  return 0;
15099}
15100_ACEOF
15101rm -f conftest.$ac_objext
15102if { (eval echo "$as_me:15102: \"$ac_compile\"") >&5
15103  (eval $ac_compile) 2>&5
15104  ac_status=$?
15105  echo "$as_me:15105: \$? = $ac_status" >&5
15106  (exit $ac_status); } &&
15107         { ac_try='test -s conftest.$ac_objext'
15108  { (eval echo "$as_me:15108: \"$ac_try\"") >&5
15109  (eval $ac_try) 2>&5
15110  ac_status=$?
15111  echo "$as_me:15111: \$? = $ac_status" >&5
15112  (exit $ac_status); }; }; then
15113  cf_window__parent=yes
15114else
15115  echo "$as_me: failed program was:" >&5
15116cat conftest.$ac_ext >&5
15117cf_window__parent=no
15118fi
15119rm -f conftest.$ac_objext conftest.$ac_ext
15120	echo "$as_me:15120: result: $cf_window__parent" >&5
15121echo "${ECHO_T}$cf_window__parent" >&6
15122	if test "$cf_window__parent" = yes
15123	then
15124
15125cat >>confdefs.h <<\EOF
15126#define HAVE_WINDOW__PARENT 1
15127EOF
15128
15129	fi
15130fi
15131
15132for ac_header in sys/wait.h
15133do
15134as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15135echo "$as_me:15135: checking for $ac_header" >&5
15136echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15137if eval "test \"\${$as_ac_Header+set}\" = set"; then
15138  echo $ECHO_N "(cached) $ECHO_C" >&6
15139else
15140  cat >conftest.$ac_ext <<_ACEOF
15141#line 15141 "configure"
15142#include "confdefs.h"
15143#include <$ac_header>
15144_ACEOF
15145if { (eval echo "$as_me:15145: \"$ac_cpp conftest.$ac_ext\"") >&5
15146  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15147  ac_status=$?
15148  egrep -v '^ *\+' conftest.er1 >conftest.err
15149  rm -f conftest.er1
15150  cat conftest.err >&5
15151  echo "$as_me:15151: \$? = $ac_status" >&5
15152  (exit $ac_status); } >/dev/null; then
15153  if test -s conftest.err; then
15154    ac_cpp_err=$ac_c_preproc_warn_flag
15155  else
15156    ac_cpp_err=
15157  fi
15158else
15159  ac_cpp_err=yes
15160fi
15161if test -z "$ac_cpp_err"; then
15162  eval "$as_ac_Header=yes"
15163else
15164  echo "$as_me: failed program was:" >&5
15165  cat conftest.$ac_ext >&5
15166  eval "$as_ac_Header=no"
15167fi
15168rm -f conftest.err conftest.$ac_ext
15169fi
15170echo "$as_me:15170: result: `eval echo '${'$as_ac_Header'}'`" >&5
15171echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15172if test `eval echo '${'$as_ac_Header'}'` = yes; then
15173  cat >>confdefs.h <<EOF
15174#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15175EOF
15176
15177fi
15178done
15179
15180cf_wait_headers="#include <sys/types.h>
15181"
15182if test $ac_cv_header_sys_wait_h = yes; then
15183cf_wait_headers="$cf_wait_headers
15184#include <sys/wait.h>
15185"
15186else
15187
15188for ac_header in wait.h
15189do
15190as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15191echo "$as_me:15191: checking for $ac_header" >&5
15192echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15193if eval "test \"\${$as_ac_Header+set}\" = set"; then
15194  echo $ECHO_N "(cached) $ECHO_C" >&6
15195else
15196  cat >conftest.$ac_ext <<_ACEOF
15197#line 15197 "configure"
15198#include "confdefs.h"
15199#include <$ac_header>
15200_ACEOF
15201if { (eval echo "$as_me:15201: \"$ac_cpp conftest.$ac_ext\"") >&5
15202  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15203  ac_status=$?
15204  egrep -v '^ *\+' conftest.er1 >conftest.err
15205  rm -f conftest.er1
15206  cat conftest.err >&5
15207  echo "$as_me:15207: \$? = $ac_status" >&5
15208  (exit $ac_status); } >/dev/null; then
15209  if test -s conftest.err; then
15210    ac_cpp_err=$ac_c_preproc_warn_flag
15211  else
15212    ac_cpp_err=
15213  fi
15214else
15215  ac_cpp_err=yes
15216fi
15217if test -z "$ac_cpp_err"; then
15218  eval "$as_ac_Header=yes"
15219else
15220  echo "$as_me: failed program was:" >&5
15221  cat conftest.$ac_ext >&5
15222  eval "$as_ac_Header=no"
15223fi
15224rm -f conftest.err conftest.$ac_ext
15225fi
15226echo "$as_me:15226: result: `eval echo '${'$as_ac_Header'}'`" >&5
15227echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15228if test `eval echo '${'$as_ac_Header'}'` = yes; then
15229  cat >>confdefs.h <<EOF
15230#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15231EOF
15232
15233fi
15234done
15235
15236for ac_header in waitstatus.h
15237do
15238as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15239echo "$as_me:15239: checking for $ac_header" >&5
15240echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15241if eval "test \"\${$as_ac_Header+set}\" = set"; then
15242  echo $ECHO_N "(cached) $ECHO_C" >&6
15243else
15244  cat >conftest.$ac_ext <<_ACEOF
15245#line 15245 "configure"
15246#include "confdefs.h"
15247#include <$ac_header>
15248_ACEOF
15249if { (eval echo "$as_me:15249: \"$ac_cpp conftest.$ac_ext\"") >&5
15250  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15251  ac_status=$?
15252  egrep -v '^ *\+' conftest.er1 >conftest.err
15253  rm -f conftest.er1
15254  cat conftest.err >&5
15255  echo "$as_me:15255: \$? = $ac_status" >&5
15256  (exit $ac_status); } >/dev/null; then
15257  if test -s conftest.err; then
15258    ac_cpp_err=$ac_c_preproc_warn_flag
15259  else
15260    ac_cpp_err=
15261  fi
15262else
15263  ac_cpp_err=yes
15264fi
15265if test -z "$ac_cpp_err"; then
15266  eval "$as_ac_Header=yes"
15267else
15268  echo "$as_me: failed program was:" >&5
15269  cat conftest.$ac_ext >&5
15270  eval "$as_ac_Header=no"
15271fi
15272rm -f conftest.err conftest.$ac_ext
15273fi
15274echo "$as_me:15274: result: `eval echo '${'$as_ac_Header'}'`" >&5
15275echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15276if test `eval echo '${'$as_ac_Header'}'` = yes; then
15277  cat >>confdefs.h <<EOF
15278#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15279EOF
15280
15281fi
15282done
15283
15284if test $ac_cv_header_wait_h = yes; then
15285cf_wait_headers="$cf_wait_headers
15286#include <wait.h>
15287"
15288fi
15289if test $ac_cv_header_waitstatus_h = yes; then
15290cf_wait_headers="$cf_wait_headers
15291#include <waitstatus.h>
15292"
15293fi
15294fi
15295
15296echo "$as_me:15296: checking for union wait" >&5
15297echo $ECHO_N "checking for union wait... $ECHO_C" >&6
15298if test "${cf_cv_type_unionwait+set}" = set; then
15299  echo $ECHO_N "(cached) $ECHO_C" >&6
15300else
15301
15302	cat >conftest.$ac_ext <<_ACEOF
15303#line 15303 "configure"
15304#include "confdefs.h"
15305$cf_wait_headers
15306int
15307main ()
15308{
15309int x;
15310	 int y = WEXITSTATUS(x);
15311	 int z = WTERMSIG(x);
15312	 wait(&x);
15313
15314  ;
15315  return 0;
15316}
15317_ACEOF
15318rm -f conftest.$ac_objext conftest$ac_exeext
15319if { (eval echo "$as_me:15319: \"$ac_link\"") >&5
15320  (eval $ac_link) 2>&5
15321  ac_status=$?
15322  echo "$as_me:15322: \$? = $ac_status" >&5
15323  (exit $ac_status); } &&
15324         { ac_try='test -s conftest$ac_exeext'
15325  { (eval echo "$as_me:15325: \"$ac_try\"") >&5
15326  (eval $ac_try) 2>&5
15327  ac_status=$?
15328  echo "$as_me:15328: \$? = $ac_status" >&5
15329  (exit $ac_status); }; }; then
15330  cf_cv_type_unionwait=no
15331	 echo compiles ok w/o union wait 1>&5
15332
15333else
15334  echo "$as_me: failed program was:" >&5
15335cat conftest.$ac_ext >&5
15336
15337	cat >conftest.$ac_ext <<_ACEOF
15338#line 15338 "configure"
15339#include "confdefs.h"
15340$cf_wait_headers
15341int
15342main ()
15343{
15344union wait x;
15345#ifdef WEXITSTATUS
15346	 int y = WEXITSTATUS(x);
15347#endif
15348#ifdef WTERMSIG
15349	 int z = WTERMSIG(x);
15350#endif
15351	 wait(&x);
15352
15353  ;
15354  return 0;
15355}
15356_ACEOF
15357rm -f conftest.$ac_objext conftest$ac_exeext
15358if { (eval echo "$as_me:15358: \"$ac_link\"") >&5
15359  (eval $ac_link) 2>&5
15360  ac_status=$?
15361  echo "$as_me:15361: \$? = $ac_status" >&5
15362  (exit $ac_status); } &&
15363         { ac_try='test -s conftest$ac_exeext'
15364  { (eval echo "$as_me:15364: \"$ac_try\"") >&5
15365  (eval $ac_try) 2>&5
15366  ac_status=$?
15367  echo "$as_me:15367: \$? = $ac_status" >&5
15368  (exit $ac_status); }; }; then
15369  cf_cv_type_unionwait=yes
15370	 echo compiles ok with union wait and possibly macros too 1>&5
15371
15372else
15373  echo "$as_me: failed program was:" >&5
15374cat conftest.$ac_ext >&5
15375cf_cv_type_unionwait=no
15376fi
15377rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15378fi
15379rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15380fi
15381
15382echo "$as_me:15382: result: $cf_cv_type_unionwait" >&5
15383echo "${ECHO_T}$cf_cv_type_unionwait" >&6
15384test $cf_cv_type_unionwait = yes &&
15385cat >>confdefs.h <<\EOF
15386#define HAVE_TYPE_UNIONWAIT 1
15387EOF
15388
15389if test $cf_cv_type_unionwait = yes; then
15390
15391	echo "$as_me:15391: checking if union wait can be used as wait-arg" >&5
15392echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
15393	if test "${cf_cv_arg_union_wait+set}" = set; then
15394  echo $ECHO_N "(cached) $ECHO_C" >&6
15395else
15396
15397		cat >conftest.$ac_ext <<_ACEOF
15398#line 15398 "configure"
15399#include "confdefs.h"
15400$cf_wait_headers
15401int
15402main ()
15403{
15404union wait x; wait(&x)
15405  ;
15406  return 0;
15407}
15408_ACEOF
15409rm -f conftest.$ac_objext
15410if { (eval echo "$as_me:15410: \"$ac_compile\"") >&5
15411  (eval $ac_compile) 2>&5
15412  ac_status=$?
15413  echo "$as_me:15413: \$? = $ac_status" >&5
15414  (exit $ac_status); } &&
15415         { ac_try='test -s conftest.$ac_objext'
15416  { (eval echo "$as_me:15416: \"$ac_try\"") >&5
15417  (eval $ac_try) 2>&5
15418  ac_status=$?
15419  echo "$as_me:15419: \$? = $ac_status" >&5
15420  (exit $ac_status); }; }; then
15421  cf_cv_arg_union_wait=yes
15422else
15423  echo "$as_me: failed program was:" >&5
15424cat conftest.$ac_ext >&5
15425cf_cv_arg_union_wait=no
15426fi
15427rm -f conftest.$ac_objext conftest.$ac_ext
15428
15429fi
15430
15431	echo "$as_me:15431: result: $cf_cv_arg_union_wait" >&5
15432echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
15433	test $cf_cv_arg_union_wait = yes &&
15434cat >>confdefs.h <<\EOF
15435#define WAIT_USES_UNION 1
15436EOF
15437
15438	echo "$as_me:15438: checking if union wait can be used as waitpid-arg" >&5
15439echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
15440	if test "${cf_cv_arg_union_waitpid+set}" = set; then
15441  echo $ECHO_N "(cached) $ECHO_C" >&6
15442else
15443
15444		cat >conftest.$ac_ext <<_ACEOF
15445#line 15445 "configure"
15446#include "confdefs.h"
15447$cf_wait_headers
15448int
15449main ()
15450{
15451union wait x; waitpid(0, &x, 0)
15452  ;
15453  return 0;
15454}
15455_ACEOF
15456rm -f conftest.$ac_objext
15457if { (eval echo "$as_me:15457: \"$ac_compile\"") >&5
15458  (eval $ac_compile) 2>&5
15459  ac_status=$?
15460  echo "$as_me:15460: \$? = $ac_status" >&5
15461  (exit $ac_status); } &&
15462         { ac_try='test -s conftest.$ac_objext'
15463  { (eval echo "$as_me:15463: \"$ac_try\"") >&5
15464  (eval $ac_try) 2>&5
15465  ac_status=$?
15466  echo "$as_me:15466: \$? = $ac_status" >&5
15467  (exit $ac_status); }; }; then
15468  cf_cv_arg_union_waitpid=yes
15469else
15470  echo "$as_me: failed program was:" >&5
15471cat conftest.$ac_ext >&5
15472cf_cv_arg_union_waitpid=no
15473fi
15474rm -f conftest.$ac_objext conftest.$ac_ext
15475
15476fi
15477
15478	echo "$as_me:15478: result: $cf_cv_arg_union_waitpid" >&5
15479echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
15480	test $cf_cv_arg_union_waitpid = yes &&
15481cat >>confdefs.h <<\EOF
15482#define WAITPID_USES_UNION 1
15483EOF
15484
15485fi
15486
15487echo "$as_me:15487: checking if we must include wchar.h to declare mbstate_t" >&5
15488echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
15489if test "${cf_cv_mbstate_t+set}" = set; then
15490  echo $ECHO_N "(cached) $ECHO_C" >&6
15491else
15492
15493cat >conftest.$ac_ext <<_ACEOF
15494#line 15494 "configure"
15495#include "confdefs.h"
15496
15497#include <stdlib.h>
15498#include <stdio.h>
15499#ifdef HAVE_LIBUTF8_H
15500#include <libutf8.h>
15501#endif
15502int
15503main ()
15504{
15505mbstate_t state
15506  ;
15507  return 0;
15508}
15509_ACEOF
15510rm -f conftest.$ac_objext
15511if { (eval echo "$as_me:15511: \"$ac_compile\"") >&5
15512  (eval $ac_compile) 2>&5
15513  ac_status=$?
15514  echo "$as_me:15514: \$? = $ac_status" >&5
15515  (exit $ac_status); } &&
15516         { ac_try='test -s conftest.$ac_objext'
15517  { (eval echo "$as_me:15517: \"$ac_try\"") >&5
15518  (eval $ac_try) 2>&5
15519  ac_status=$?
15520  echo "$as_me:15520: \$? = $ac_status" >&5
15521  (exit $ac_status); }; }; then
15522  cf_cv_mbstate_t=no
15523else
15524  echo "$as_me: failed program was:" >&5
15525cat conftest.$ac_ext >&5
15526cat >conftest.$ac_ext <<_ACEOF
15527#line 15527 "configure"
15528#include "confdefs.h"
15529
15530#include <stdlib.h>
15531#include <stdio.h>
15532#include <wchar.h>
15533#ifdef HAVE_LIBUTF8_H
15534#include <libutf8.h>
15535#endif
15536int
15537main ()
15538{
15539mbstate_t value
15540  ;
15541  return 0;
15542}
15543_ACEOF
15544rm -f conftest.$ac_objext
15545if { (eval echo "$as_me:15545: \"$ac_compile\"") >&5
15546  (eval $ac_compile) 2>&5
15547  ac_status=$?
15548  echo "$as_me:15548: \$? = $ac_status" >&5
15549  (exit $ac_status); } &&
15550         { ac_try='test -s conftest.$ac_objext'
15551  { (eval echo "$as_me:15551: \"$ac_try\"") >&5
15552  (eval $ac_try) 2>&5
15553  ac_status=$?
15554  echo "$as_me:15554: \$? = $ac_status" >&5
15555  (exit $ac_status); }; }; then
15556  cf_cv_mbstate_t=yes
15557else
15558  echo "$as_me: failed program was:" >&5
15559cat conftest.$ac_ext >&5
15560cf_cv_mbstate_t=unknown
15561fi
15562rm -f conftest.$ac_objext conftest.$ac_ext
15563fi
15564rm -f conftest.$ac_objext conftest.$ac_ext
15565fi
15566echo "$as_me:15566: result: $cf_cv_mbstate_t" >&5
15567echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15568
15569if test "$cf_cv_mbstate_t" = yes ; then
15570
15571cat >>confdefs.h <<\EOF
15572#define NEED_WCHAR_H 1
15573EOF
15574
15575fi
15576
15577if test "$cf_cv_mbstate_t" != unknown ; then
15578
15579cat >>confdefs.h <<\EOF
15580#define HAVE_MBSTATE_T 1
15581EOF
15582
15583fi
15584
15585PACKAGE_PREFIX=DLG
15586PACKAGE_CONFIG=dlg_config.h
15587
15588EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
15589
15590cat >conftest.$ac_ext <<_ACEOF
15591#line 15591 "configure"
15592#include "confdefs.h"
15593#include <locale.h>
15594int
15595main ()
15596{
15597setlocale(LC_ALL, "")
15598  ;
15599  return 0;
15600}
15601_ACEOF
15602rm -f conftest.$ac_objext conftest$ac_exeext
15603if { (eval echo "$as_me:15603: \"$ac_link\"") >&5
15604  (eval $ac_link) 2>&5
15605  ac_status=$?
15606  echo "$as_me:15606: \$? = $ac_status" >&5
15607  (exit $ac_status); } &&
15608         { ac_try='test -s conftest$ac_exeext'
15609  { (eval echo "$as_me:15609: \"$ac_try\"") >&5
15610  (eval $ac_try) 2>&5
15611  ac_status=$?
15612  echo "$as_me:15612: \$? = $ac_status" >&5
15613  (exit $ac_status); }; }; then
15614
15615cat >>confdefs.h <<\EOF
15616#define HAVE_SETLOCALE 1
15617EOF
15618
15619else
15620  echo "$as_me: failed program was:" >&5
15621cat conftest.$ac_ext >&5
15622fi
15623rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15624
15625echo "$as_me:15625: checking if rpath-hack should be disabled" >&5
15626echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
15627
15628# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
15629if test "${enable_rpath_hack+set}" = set; then
15630  enableval="$enable_rpath_hack"
15631  test "$enableval" != no && enableval=yes
15632  if test "$enableval" != "yes" ; then
15633    cf_disable_rpath_hack=yes
15634  else
15635    cf_disable_rpath_hack=no
15636  fi
15637else
15638  enableval=yes
15639  cf_disable_rpath_hack=no
15640
15641fi;
15642echo "$as_me:15642: result: $cf_disable_rpath_hack" >&5
15643echo "${ECHO_T}$cf_disable_rpath_hack" >&6
15644if test "$cf_disable_rpath_hack" = no ; then
15645
15646echo "$as_me:15646: checking for updated LDFLAGS" >&5
15647echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
15648if test -n "$LD_RPATH_OPT" ; then
15649	echo "$as_me:15649: result: maybe" >&5
15650echo "${ECHO_T}maybe" >&6
15651
15652	for ac_prog in ldd
15653do
15654  # Extract the first word of "$ac_prog", so it can be a program name with args.
15655set dummy $ac_prog; ac_word=$2
15656echo "$as_me:15656: checking for $ac_word" >&5
15657echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15658if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
15659  echo $ECHO_N "(cached) $ECHO_C" >&6
15660else
15661  if test -n "$cf_ldd_prog"; then
15662  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
15663else
15664  ac_save_IFS=$IFS; IFS=$ac_path_separator
15665ac_dummy="$PATH"
15666for ac_dir in $ac_dummy; do
15667  IFS=$ac_save_IFS
15668  test -z "$ac_dir" && ac_dir=.
15669  $as_executable_p "$ac_dir/$ac_word" || continue
15670ac_cv_prog_cf_ldd_prog="$ac_prog"
15671echo "$as_me:15671: found $ac_dir/$ac_word" >&5
15672break
15673done
15674
15675fi
15676fi
15677cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
15678if test -n "$cf_ldd_prog"; then
15679  echo "$as_me:15679: result: $cf_ldd_prog" >&5
15680echo "${ECHO_T}$cf_ldd_prog" >&6
15681else
15682  echo "$as_me:15682: result: no" >&5
15683echo "${ECHO_T}no" >&6
15684fi
15685
15686  test -n "$cf_ldd_prog" && break
15687done
15688test -n "$cf_ldd_prog" || cf_ldd_prog="no"
15689
15690	cf_rpath_list="/usr/lib /lib"
15691	if test "$cf_ldd_prog" != no
15692	then
15693		cf_rpath_oops=
15694
15695cat >conftest.$ac_ext <<_ACEOF
15696#line 15696 "configure"
15697#include "confdefs.h"
15698#include <stdio.h>
15699int
15700main ()
15701{
15702printf("Hello");
15703  ;
15704  return 0;
15705}
15706_ACEOF
15707rm -f conftest.$ac_objext conftest$ac_exeext
15708if { (eval echo "$as_me:15708: \"$ac_link\"") >&5
15709  (eval $ac_link) 2>&5
15710  ac_status=$?
15711  echo "$as_me:15711: \$? = $ac_status" >&5
15712  (exit $ac_status); } &&
15713         { ac_try='test -s conftest$ac_exeext'
15714  { (eval echo "$as_me:15714: \"$ac_try\"") >&5
15715  (eval $ac_try) 2>&5
15716  ac_status=$?
15717  echo "$as_me:15717: \$? = $ac_status" >&5
15718  (exit $ac_status); }; }; then
15719  cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
15720		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
15721else
15722  echo "$as_me: failed program was:" >&5
15723cat conftest.$ac_ext >&5
15724fi
15725rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15726
15727		# If we passed the link-test, but get a "not found" on a given library,
15728		# this could be due to inept reconfiguration of gcc to make it only
15729		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
15730		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
15731		# /usr/local libraries.
15732		if test -n "$cf_rpath_oops"
15733		then
15734			for cf_rpath_src in $cf_rpath_oops
15735			do
15736				for cf_rpath_dir in \
15737					/usr/local \
15738					/usr/pkg \
15739					/opt/sfw
15740				do
15741					if test -f $cf_rpath_dir/lib/$cf_rpath_src
15742					then
15743						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
15744
15745echo "${as_me:-configure}:15745: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
15746
15747						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
15748						break
15749					fi
15750				done
15751			done
15752		fi
15753	fi
15754
15755	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
15756
15757echo "${as_me:-configure}:15757: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
15758
15759test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
15760
15761echo "${as_me:-configure}:15761: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
15762
15763cf_rpath_dst=
15764for cf_rpath_src in $LDFLAGS
15765do
15766	case $cf_rpath_src in #(vi
15767	-L*) #(vi
15768
15769		# check if this refers to a directory which we will ignore
15770		cf_rpath_skip=no
15771		if test -n "$cf_rpath_list"
15772		then
15773			for cf_rpath_item in $cf_rpath_list
15774			do
15775				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
15776				then
15777					cf_rpath_skip=yes
15778					break
15779				fi
15780			done
15781		fi
15782
15783		if test "$cf_rpath_skip" = no
15784		then
15785			# transform the option
15786			if test "$LD_RPATH_OPT" = "-R " ; then
15787				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
15788			else
15789				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
15790			fi
15791
15792			# if we have not already added this, add it now
15793			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
15794			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
15795			then
15796				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
15797
15798echo "${as_me:-configure}:15798: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
15799
15800				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
15801			fi
15802		fi
15803		;;
15804	esac
15805	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
15806done
15807LDFLAGS=$cf_rpath_dst
15808
15809test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
15810
15811echo "${as_me:-configure}:15811: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
15812
15813test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
15814
15815echo "${as_me:-configure}:15815: testing ...checking LIBS $LIBS ..." 1>&5
15816
15817cf_rpath_dst=
15818for cf_rpath_src in $LIBS
15819do
15820	case $cf_rpath_src in #(vi
15821	-L*) #(vi
15822
15823		# check if this refers to a directory which we will ignore
15824		cf_rpath_skip=no
15825		if test -n "$cf_rpath_list"
15826		then
15827			for cf_rpath_item in $cf_rpath_list
15828			do
15829				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
15830				then
15831					cf_rpath_skip=yes
15832					break
15833				fi
15834			done
15835		fi
15836
15837		if test "$cf_rpath_skip" = no
15838		then
15839			# transform the option
15840			if test "$LD_RPATH_OPT" = "-R " ; then
15841				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
15842			else
15843				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
15844			fi
15845
15846			# if we have not already added this, add it now
15847			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
15848			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
15849			then
15850				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
15851
15852echo "${as_me:-configure}:15852: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
15853
15854				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
15855			fi
15856		fi
15857		;;
15858	esac
15859	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
15860done
15861LIBS=$cf_rpath_dst
15862
15863test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
15864
15865echo "${as_me:-configure}:15865: testing ...checked LIBS $LIBS ..." 1>&5
15866
15867	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
15868
15869echo "${as_me:-configure}:15869: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
15870
15871else
15872	echo "$as_me:15872: result: no" >&5
15873echo "${ECHO_T}no" >&6
15874fi
15875
15876fi
15877
15878cf_libname=\${LIB_BASENAME}
15879cf_liblink=$cf_libname
15880cf_libroot=$cf_libname
15881
15882if test "x$cf_cv_do_symlinks" = xyes
15883then
15884	case "x$cf_cv_shlib_version" in #(vi
15885	xrel) #(vi
15886		cf_liblink="\${LIB_ABI_NAME}"
15887		cf_libname="\${LIB_REL_NAME}"
15888		;;
15889	xabi)
15890		cf_liblink="\${LIB_REL_NAME}"
15891		cf_libname="\${LIB_ABI_NAME}"
15892		;;
15893	esac
15894fi
15895LIB_TARGET=$cf_libname
15896
15897SET_SHLIB_VARS="# begin CF__DEFINE_SHLIB_VARS\\
15898LIB_BASENAME	= ${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\
15899LIB_REL_NAME	= \${LIB_BASENAME}.\${REL_VERSION}\\
15900LIB_ABI_NAME	= \${LIB_BASENAME}.\${ABI_VERSION}\\
15901LIB_TARGET	= $LIB_TARGET\\
15902RM_SHARED_OPTS	= $RM_SHARED_OPTS\\
15903# end CF__DEFINE_SHLIB_VARS"
15904
15905ac_config_files="$ac_config_files dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE"
15906ac_config_commands="$ac_config_commands default"
15907cat >confcache <<\_ACEOF
15908# This file is a shell script that caches the results of configure
15909# tests run on this system so they can be shared between configure
15910# scripts and configure runs, see configure's option --config-cache.
15911# It is not useful on other systems.  If it contains results you don't
15912# want to keep, you may remove or edit it.
15913#
15914# config.status only pays attention to the cache file if you give it
15915# the --recheck option to rerun configure.
15916#
15917# `ac_cv_env_foo' variables (set or unset) will be overriden when
15918# loading this file, other *unset* `ac_cv_foo' will be assigned the
15919# following values.
15920
15921_ACEOF
15922
15923# The following way of writing the cache mishandles newlines in values,
15924# but we know of no workaround that is simple, portable, and efficient.
15925# So, don't put newlines in cache variables' values.
15926# Ultrix sh set writes to stderr and can't be redirected directly,
15927# and sets the high bit in the cache file unless we assign to the vars.
15928{
15929  (set) 2>&1 |
15930    case `(ac_space=' '; set | grep ac_space) 2>&1` in
15931    *ac_space=\ *)
15932      # `set' does not quote correctly, so add quotes (double-quote
15933      # substitution turns \\\\ into \\, and sed turns \\ into \).
15934      sed -n \
15935        "s/'/'\\\\''/g;
15936    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15937      ;;
15938    *)
15939      # `set' quotes correctly as required by POSIX, so do not add quotes.
15940      sed -n \
15941        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15942      ;;
15943    esac;
15944} |
15945  sed '
15946     t clear
15947     : clear
15948     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15949     t end
15950     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15951     : end' >>confcache
15952if cmp -s $cache_file confcache; then :; else
15953  if test -w $cache_file; then
15954    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15955    cat confcache >$cache_file
15956  else
15957    echo "not updating unwritable cache $cache_file"
15958  fi
15959fi
15960rm -f confcache
15961
15962test "x$prefix" = xNONE && prefix=$ac_default_prefix
15963# Let make expand exec_prefix.
15964test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15965
15966# VPATH may cause trouble with some makes, so we remove $(srcdir),
15967# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15968# trailing colons and then remove the whole line if VPATH becomes empty
15969# (actually we leave an empty line to preserve line numbers).
15970if test "x$srcdir" = x.; then
15971  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
15972s/:*\$(srcdir):*/:/;
15973s/:*\${srcdir}:*/:/;
15974s/:*@srcdir@:*/:/;
15975s/^\([^=]*=[ 	]*\):*/\1/;
15976s/:*$//;
15977s/^[^=]*=[ 	]*$//;
15978}'
15979fi
15980
15981DEFS=-DHAVE_CONFIG_H
15982
15983: ${CONFIG_STATUS=./config.status}
15984ac_clean_files_save=$ac_clean_files
15985ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15986{ echo "$as_me:15986: creating $CONFIG_STATUS" >&5
15987echo "$as_me: creating $CONFIG_STATUS" >&6;}
15988cat >$CONFIG_STATUS <<_ACEOF
15989#! $SHELL
15990# Generated automatically by configure.
15991# Run this file to recreate the current configuration.
15992# Compiler output produced by configure, useful for debugging
15993# configure, is in config.log if it exists.
15994
15995debug=false
15996SHELL=\${CONFIG_SHELL-$SHELL}
15997ac_cs_invocation="\$0 \$@"
15998
15999_ACEOF
16000
16001cat >>$CONFIG_STATUS <<\_ACEOF
16002# Be Bourne compatible
16003if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16004  emulate sh
16005  NULLCMD=:
16006elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16007  set -o posix
16008fi
16009
16010# Name of the executable.
16011as_me=`echo "$0" |sed 's,.*[\\/],,'`
16012
16013if expr a : '\(a\)' >/dev/null 2>&1; then
16014  as_expr=expr
16015else
16016  as_expr=false
16017fi
16018
16019rm -f conf$$ conf$$.exe conf$$.file
16020echo >conf$$.file
16021if ln -s conf$$.file conf$$ 2>/dev/null; then
16022  # We could just check for DJGPP; but this test a) works b) is more generic
16023  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16024  if test -f conf$$.exe; then
16025    # Don't use ln at all; we don't have any links
16026    as_ln_s='cp -p'
16027  else
16028    as_ln_s='ln -s'
16029  fi
16030elif ln conf$$.file conf$$ 2>/dev/null; then
16031  as_ln_s=ln
16032else
16033  as_ln_s='cp -p'
16034fi
16035rm -f conf$$ conf$$.exe conf$$.file
16036
16037as_executable_p="test -f"
16038
16039# Support unset when possible.
16040if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16041  as_unset=unset
16042else
16043  as_unset=false
16044fi
16045
16046# NLS nuisances.
16047$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16048$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16049$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16050$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16051$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16052$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16053$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16054$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16055
16056# IFS
16057# We need space, tab and new line, in precisely that order.
16058as_nl='
16059'
16060IFS=" 	$as_nl"
16061
16062# CDPATH.
16063$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16064
16065exec 6>&1
16066
16067_ACEOF
16068
16069# Files that config.status was made for.
16070if test -n "$ac_config_files"; then
16071  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16072fi
16073
16074if test -n "$ac_config_headers"; then
16075  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16076fi
16077
16078if test -n "$ac_config_links"; then
16079  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16080fi
16081
16082if test -n "$ac_config_commands"; then
16083  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16084fi
16085
16086cat >>$CONFIG_STATUS <<\EOF
16087
16088ac_cs_usage="\
16089\`$as_me' instantiates files from templates according to the
16090current configuration.
16091
16092Usage: $0 [OPTIONS] [FILE]...
16093
16094  -h, --help       print this help, then exit
16095  -V, --version    print version number, then exit
16096  -d, --debug      don't remove temporary files
16097      --recheck    update $as_me by reconfiguring in the same conditions
16098  --file=FILE[:TEMPLATE]
16099                   instantiate the configuration file FILE
16100  --header=FILE[:TEMPLATE]
16101                   instantiate the configuration header FILE
16102
16103Configuration files:
16104$config_files
16105
16106Configuration headers:
16107$config_headers
16108
16109Configuration commands:
16110$config_commands
16111
16112Report bugs to <dickey@invisible-island.net>."
16113EOF
16114
16115cat >>$CONFIG_STATUS <<EOF
16116ac_cs_version="\\
16117config.status
16118configured by $0, generated by GNU Autoconf 2.52.20121002,
16119  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16120
16121Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16122Free Software Foundation, Inc.
16123This config.status script is free software; the Free Software Foundation
16124gives unlimited permission to copy, distribute and modify it."
16125srcdir=$srcdir
16126INSTALL="$INSTALL"
16127EOF
16128
16129cat >>$CONFIG_STATUS <<\EOF
16130# If no file are specified by the user, then we need to provide default
16131# value.  By we need to know if files were specified by the user.
16132ac_need_defaults=:
16133while test $# != 0
16134do
16135  case $1 in
16136  --*=*)
16137    ac_option=`expr "x$1" : 'x\([^=]*\)='`
16138    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16139    shift
16140    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16141    shift
16142    ;;
16143  -*);;
16144  *) # This is not an option, so the user has probably given explicit
16145     # arguments.
16146     ac_need_defaults=false;;
16147  esac
16148
16149  case $1 in
16150  # Handling of the options.
16151EOF
16152cat >>$CONFIG_STATUS <<EOF
16153  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16154    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16155    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16156EOF
16157cat >>$CONFIG_STATUS <<\EOF
16158  --version | --vers* | -V )
16159    echo "$ac_cs_version"; exit 0 ;;
16160  --he | --h)
16161    # Conflict between --help and --header
16162    { { echo "$as_me:16162: error: ambiguous option: $1
16163Try \`$0 --help' for more information." >&5
16164echo "$as_me: error: ambiguous option: $1
16165Try \`$0 --help' for more information." >&2;}
16166   { (exit 1); exit 1; }; };;
16167  --help | --hel | -h )
16168    echo "$ac_cs_usage"; exit 0 ;;
16169  --debug | --d* | -d )
16170    debug=: ;;
16171  --file | --fil | --fi | --f )
16172    shift
16173    CONFIG_FILES="$CONFIG_FILES $1"
16174    ac_need_defaults=false;;
16175  --header | --heade | --head | --hea )
16176    shift
16177    CONFIG_HEADERS="$CONFIG_HEADERS $1"
16178    ac_need_defaults=false;;
16179
16180  # This is an error.
16181  -*) { { echo "$as_me:16181: error: unrecognized option: $1
16182Try \`$0 --help' for more information." >&5
16183echo "$as_me: error: unrecognized option: $1
16184Try \`$0 --help' for more information." >&2;}
16185   { (exit 1); exit 1; }; } ;;
16186
16187  *) ac_config_targets="$ac_config_targets $1" ;;
16188
16189  esac
16190  shift
16191done
16192
16193exec 5>>config.log
16194cat >&5 << _ACEOF
16195
16196## ----------------------- ##
16197## Running config.status.  ##
16198## ----------------------- ##
16199
16200This file was extended by $as_me 2.52.20121002, executed with
16201  CONFIG_FILES    = $CONFIG_FILES
16202  CONFIG_HEADERS  = $CONFIG_HEADERS
16203  CONFIG_LINKS    = $CONFIG_LINKS
16204  CONFIG_COMMANDS = $CONFIG_COMMANDS
16205  > $ac_cs_invocation
16206on `(hostname || uname -n) 2>/dev/null | sed 1q`
16207
16208_ACEOF
16209EOF
16210
16211cat >>$CONFIG_STATUS <<EOF
16212#
16213# INIT-COMMANDS section.
16214#
16215
16216ABI_VERSION="$ABI_VERSION"
16217REL_VERSION="$REL_VERSION"
16218LIB_MODEL="$LIB_MODEL"
16219LIB_PREFIX="$LIB_PREFIX"
16220LIB_ROOTNAME="$LIB_ROOTNAME"
16221DFT_DEP_SUFFIX="$DFT_DEP_SUFFIX"
16222RM_SHARED_OPTS="$RM_SHARED_OPTS"
16223cf_cv_do_symlinks="$cf_cv_do_symlinks"
16224cf_cv_shlib_version="$cf_cv_shlib_version"
16225
16226EOF
16227
16228cat >>$CONFIG_STATUS <<\EOF
16229for ac_config_target in $ac_config_targets
16230do
16231  case "$ac_config_target" in
16232  # Handling of arguments.
16233  "dialog-config" ) CONFIG_FILES="$CONFIG_FILES dialog-config" ;;
16234  "makefile" ) CONFIG_FILES="$CONFIG_FILES makefile" ;;
16235  "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
16236  "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
16237  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
16238  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16239  "dlg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS dlg_config.h:config.hin" ;;
16240  *) { { echo "$as_me:16240: error: invalid argument: $ac_config_target" >&5
16241echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16242   { (exit 1); exit 1; }; };;
16243  esac
16244done
16245
16246# If the user did not use the arguments to specify the items to instantiate,
16247# then the envvar interface is used.  Set only those that are not.
16248# We use the long form for the default assignment because of an extremely
16249# bizarre bug on SunOS 4.1.3.
16250if $ac_need_defaults; then
16251  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16252  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16253  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16254fi
16255
16256# Create a temporary directory, and hook for its removal unless debugging.
16257$debug ||
16258{
16259  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16260  trap '{ (exit 1); exit 1; }' 1 2 13 15
16261}
16262
16263# Create a (secure) tmp directory for tmp files.
16264: ${TMPDIR=/tmp}
16265{
16266  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16267  test -n "$tmp" && test -d "$tmp"
16268}  ||
16269{
16270  tmp=$TMPDIR/cs$$-$RANDOM
16271  (umask 077 && mkdir $tmp)
16272} ||
16273{
16274   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16275   { (exit 1); exit 1; }
16276}
16277
16278EOF
16279
16280cat >>$CONFIG_STATUS <<EOF
16281
16282#
16283# CONFIG_FILES section.
16284#
16285
16286# No need to generate the scripts if there are no CONFIG_FILES.
16287# This happens for instance when ./config.status config.h
16288if test -n "\$CONFIG_FILES"; then
16289  # Protect against being on the right side of a sed subst in config.status.
16290  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16291   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16292s,@SHELL@,$SHELL,;t t
16293s,@exec_prefix@,$exec_prefix,;t t
16294s,@prefix@,$prefix,;t t
16295s,@program_transform_name@,$program_transform_name,;t t
16296s,@bindir@,$bindir,;t t
16297s,@sbindir@,$sbindir,;t t
16298s,@libexecdir@,$libexecdir,;t t
16299s,@datarootdir@,$datarootdir,;t t
16300s,@datadir@,$datadir,;t t
16301s,@sysconfdir@,$sysconfdir,;t t
16302s,@sharedstatedir@,$sharedstatedir,;t t
16303s,@localstatedir@,$localstatedir,;t t
16304s,@libdir@,$libdir,;t t
16305s,@includedir@,$includedir,;t t
16306s,@oldincludedir@,$oldincludedir,;t t
16307s,@infodir@,$infodir,;t t
16308s,@mandir@,$mandir,;t t
16309s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16310s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16311s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16312s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16313s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16314s,@build_alias@,$build_alias,;t t
16315s,@host_alias@,$host_alias,;t t
16316s,@target_alias@,$target_alias,;t t
16317s,@ECHO_C@,$ECHO_C,;t t
16318s,@ECHO_N@,$ECHO_N,;t t
16319s,@ECHO_T@,$ECHO_T,;t t
16320s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16321s,@DEFS@,$DEFS,;t t
16322s,@LIBS@,$LIBS,;t t
16323s,@DESTDIR@,$DESTDIR,;t t
16324s,@CC@,$CC,;t t
16325s,@CFLAGS@,$CFLAGS,;t t
16326s,@LDFLAGS@,$LDFLAGS,;t t
16327s,@CPPFLAGS@,$CPPFLAGS,;t t
16328s,@ac_ct_CC@,$ac_ct_CC,;t t
16329s,@EXEEXT@,$EXEEXT,;t t
16330s,@OBJEXT@,$OBJEXT,;t t
16331s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16332s,@CPP@,$CPP,;t t
16333s,@SET_MAKE@,$SET_MAKE,;t t
16334s,@RANLIB@,$RANLIB,;t t
16335s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16336s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16337s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16338s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16339s,@LN_S@,$LN_S,;t t
16340s,@LINT@,$LINT,;t t
16341s,@LINT_OPTS@,$LINT_OPTS,;t t
16342s,@AR@,$AR,;t t
16343s,@ac_ct_AR@,$ac_ct_AR,;t t
16344s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16345s,@CTAGS@,$CTAGS,;t t
16346s,@ETAGS@,$ETAGS,;t t
16347s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16348s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16349s,@ECHO_LT@,$ECHO_LT,;t t
16350s,@ECHO_LD@,$ECHO_LD,;t t
16351s,@RULE_CC@,$RULE_CC,;t t
16352s,@SHOW_CC@,$SHOW_CC,;t t
16353s,@ECHO_CC@,$ECHO_CC,;t t
16354s,@build@,$build,;t t
16355s,@build_cpu@,$build_cpu,;t t
16356s,@build_vendor@,$build_vendor,;t t
16357s,@build_os@,$build_os,;t t
16358s,@host@,$host,;t t
16359s,@host_cpu@,$host_cpu,;t t
16360s,@host_vendor@,$host_vendor,;t t
16361s,@host_os@,$host_os,;t t
16362s,@PROG_EXT@,$PROG_EXT,;t t
16363s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16364s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16365s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16366s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
16367s,@VERSION@,$VERSION,;t t
16368s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
16369s,@VERSION_MINOR@,$VERSION_MINOR,;t t
16370s,@VERSION_PATCH@,$VERSION_PATCH,;t t
16371s,@PACKAGE@,$PACKAGE,;t t
16372s,@CFG_ROOTNAME@,$CFG_ROOTNAME,;t t
16373s,@HDR_ROOTNAME@,$HDR_ROOTNAME,;t t
16374s,@LIB_ROOTNAME@,$LIB_ROOTNAME,;t t
16375s,@SUB_INC@,$SUB_INC,;t t
16376s,@CONFIG_H@,$CONFIG_H,;t t
16377s,@ALLOCA@,$ALLOCA,;t t
16378s,@GLIBC21@,$GLIBC21,;t t
16379s,@LIBICONV@,$LIBICONV,;t t
16380s,@USE_NLS@,$USE_NLS,;t t
16381s,@MSGFMT@,$MSGFMT,;t t
16382s,@GMSGFMT@,$GMSGFMT,;t t
16383s,@XGETTEXT@,$XGETTEXT,;t t
16384s,@INTLBISON@,$INTLBISON,;t t
16385s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
16386s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
16387s,@CATALOGS@,$CATALOGS,;t t
16388s,@CATOBJEXT@,$CATOBJEXT,;t t
16389s,@GMOFILES@,$GMOFILES,;t t
16390s,@INTLLIBS@,$INTLLIBS,;t t
16391s,@INTLOBJS@,$INTLOBJS,;t t
16392s,@POFILES@,$POFILES,;t t
16393s,@POSUB@,$POSUB,;t t
16394s,@DATADIRNAME@,$DATADIRNAME,;t t
16395s,@INSTOBJEXT@,$INSTOBJEXT,;t t
16396s,@GENCAT@,$GENCAT,;t t
16397s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
16398s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
16399s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
16400s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
16401s,@INTLDIR_MAKE@,$INTLDIR_MAKE,;t t
16402s,@GT_YES@,$GT_YES,;t t
16403s,@GT_NO@,$GT_NO,;t t
16404s,@LINK_PREFIX@,$LINK_PREFIX,;t t
16405s,@ABI_VERSION@,$ABI_VERSION,;t t
16406s,@REL_VERSION@,$REL_VERSION,;t t
16407s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
16408s,@LIBTOOL@,$LIBTOOL,;t t
16409s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
16410s,@LT_UNDEF@,$LT_UNDEF,;t t
16411s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16412s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
16413s,@LIB_CREATE@,$LIB_CREATE,;t t
16414s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16415s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16416s,@LIB_PREP@,$LIB_PREP,;t t
16417s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16418s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16419s,@LIB_LINK@,$LIB_LINK,;t t
16420s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16421s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16422s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16423s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
16424s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16425s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16426s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
16427s,@LINK_PROGS@,$LINK_PROGS,;t t
16428s,@LINK_TESTS@,$LINK_TESTS,;t t
16429s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16430s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16431s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16432s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16433s,@RPATH_LIST@,$RPATH_LIST,;t t
16434s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16435s,@DFT_LIB_SUFFIX@,$DFT_LIB_SUFFIX,;t t
16436s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16437s,@LIB_MODEL@,$LIB_MODEL,;t t
16438s,@LIBTOOL_MAKE@,$LIBTOOL_MAKE,;t t
16439s,@MAKE_NORMAL@,$MAKE_NORMAL,;t t
16440s,@MAKE_SHARED@,$MAKE_SHARED,;t t
16441s,@MAKE_STATIC@,$MAKE_STATIC,;t t
16442s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
16443s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
16444s,@EXTRAOBJS@,$EXTRAOBJS,;t t
16445s,@PACKAGE_PREFIX@,$PACKAGE_PREFIX,;t t
16446s,@PACKAGE_CONFIG@,$PACKAGE_CONFIG,;t t
16447s,@cf_ldd_prog@,$cf_ldd_prog,;t t
16448s,@SET_SHLIB_VARS@,$SET_SHLIB_VARS,;t t
16449s,@LIB_TARGET@,$LIB_TARGET,;t t
16450CEOF
16451
16452EOF
16453
16454  cat >>$CONFIG_STATUS <<\EOF
16455  # Split the substitutions into bite-sized pieces for seds with
16456  # small command number limits, like on Digital OSF/1 and HP-UX.
16457  ac_max_sed_lines=48
16458  ac_sed_frag=1 # Number of current file.
16459  ac_beg=1 # First line for current file.
16460  ac_end=$ac_max_sed_lines # Line after last line for current file.
16461  ac_more_lines=:
16462  ac_sed_cmds=
16463  while $ac_more_lines; do
16464    if test $ac_beg -gt 1; then
16465      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16466    else
16467      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16468    fi
16469    if test ! -s $tmp/subs.frag; then
16470      ac_more_lines=false
16471    else
16472      # The purpose of the label and of the branching condition is to
16473      # speed up the sed processing (if there are no `@' at all, there
16474      # is no need to browse any of the substitutions).
16475      # These are the two extra sed commands mentioned above.
16476      (echo ':t
16477  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16478      if test -z "$ac_sed_cmds"; then
16479  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16480      else
16481  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16482      fi
16483      ac_sed_frag=`expr $ac_sed_frag + 1`
16484      ac_beg=$ac_end
16485      ac_end=`expr $ac_end + $ac_max_sed_lines`
16486    fi
16487  done
16488  if test -z "$ac_sed_cmds"; then
16489    ac_sed_cmds=cat
16490  fi
16491fi # test -n "$CONFIG_FILES"
16492
16493EOF
16494cat >>$CONFIG_STATUS <<\EOF
16495for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16496  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16497  case $ac_file in
16498  - | *:- | *:-:* ) # input from stdin
16499        cat >$tmp/stdin
16500        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16501        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16502  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16503        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16504  * )   ac_file_in=$ac_file.in ;;
16505  esac
16506
16507  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16508  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16509         X"$ac_file" : 'X\(//\)[^/]' \| \
16510         X"$ac_file" : 'X\(//\)$' \| \
16511         X"$ac_file" : 'X\(/\)' \| \
16512         .     : '\(.\)' 2>/dev/null ||
16513echo X"$ac_file" |
16514    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16515  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16516  	  /^X\(\/\/\)$/{ s//\1/; q; }
16517  	  /^X\(\/\).*/{ s//\1/; q; }
16518  	  s/.*/./; q'`
16519  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16520    { case "$ac_dir" in
16521  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16522  *)                      as_incr_dir=.;;
16523esac
16524as_dummy="$ac_dir"
16525for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16526  case $as_mkdir_dir in
16527    # Skip DOS drivespec
16528    ?:) as_incr_dir=$as_mkdir_dir ;;
16529    *)
16530      as_incr_dir=$as_incr_dir/$as_mkdir_dir
16531      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16532    ;;
16533  esac
16534done; }
16535
16536    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16537    # A "../" for each directory in $ac_dir_suffix.
16538    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16539  else
16540    ac_dir_suffix= ac_dots=
16541  fi
16542
16543  case $srcdir in
16544  .)  ac_srcdir=.
16545      if test -z "$ac_dots"; then
16546         ac_top_srcdir=.
16547      else
16548         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16549      fi ;;
16550  [\\/]* | ?:[\\/]* )
16551      ac_srcdir=$srcdir$ac_dir_suffix;
16552      ac_top_srcdir=$srcdir ;;
16553  *) # Relative path.
16554    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16555    ac_top_srcdir=$ac_dots$srcdir ;;
16556  esac
16557
16558  case $INSTALL in
16559  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16560  *) ac_INSTALL=$ac_dots$INSTALL ;;
16561  esac
16562
16563  if test x"$ac_file" != x-; then
16564    { echo "$as_me:16564: creating $ac_file" >&5
16565echo "$as_me: creating $ac_file" >&6;}
16566    rm -f "$ac_file"
16567  fi
16568  # Let's still pretend it is `configure' which instantiates (i.e., don't
16569  # use $as_me), people would be surprised to read:
16570  #    /* config.h.  Generated automatically by config.status.  */
16571  configure_input="Generated automatically from `echo $ac_file_in |
16572                                                 sed 's,.*/,,'` by configure."
16573
16574  # First look for the input files in the build tree, otherwise in the
16575  # src tree.
16576  ac_file_inputs=`IFS=:
16577    for f in $ac_file_in; do
16578      case $f in
16579      -) echo $tmp/stdin ;;
16580      [\\/$]*)
16581         # Absolute (can't be DOS-style, as IFS=:)
16582         test -f "$f" || { { echo "$as_me:16582: error: cannot find input file: $f" >&5
16583echo "$as_me: error: cannot find input file: $f" >&2;}
16584   { (exit 1); exit 1; }; }
16585         echo $f;;
16586      *) # Relative
16587         if test -f "$f"; then
16588           # Build tree
16589           echo $f
16590         elif test -f "$srcdir/$f"; then
16591           # Source tree
16592           echo $srcdir/$f
16593         else
16594           # /dev/null tree
16595           { { echo "$as_me:16595: error: cannot find input file: $f" >&5
16596echo "$as_me: error: cannot find input file: $f" >&2;}
16597   { (exit 1); exit 1; }; }
16598         fi;;
16599      esac
16600    done` || { (exit 1); exit 1; }
16601EOF
16602cat >>$CONFIG_STATUS <<\EOF
16603  ac_warn_datarootdir=no
16604  if test x"$ac_file" != x-; then
16605    for ac_item in $ac_file_inputs
16606    do
16607      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
16608      if test -n "$ac_seen"; then
16609        ac_used=`grep '@datarootdir@' $ac_item`
16610        if test -z "$ac_used"; then
16611          { echo "$as_me:16611: WARNING: datarootdir was used implicitly but not set:
16612$ac_seen" >&5
16613echo "$as_me: WARNING: datarootdir was used implicitly but not set:
16614$ac_seen" >&2;}
16615          ac_warn_datarootdir=yes
16616        fi
16617      fi
16618      ac_seen=`grep '${datarootdir}' $ac_item`
16619      if test -n "$ac_seen"; then
16620        { echo "$as_me:16620: WARNING: datarootdir was used explicitly but not set:
16621$ac_seen" >&5
16622echo "$as_me: WARNING: datarootdir was used explicitly but not set:
16623$ac_seen" >&2;}
16624        ac_warn_datarootdir=yes
16625      fi
16626    done
16627  fi
16628
16629if test "x$ac_warn_datarootdir" = xyes; then
16630  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
16631fi
16632
16633EOF
16634cat >>$CONFIG_STATUS <<EOF
16635  sed "$ac_vpsub
16636$extrasub
16637EOF
16638cat >>$CONFIG_STATUS <<\EOF
16639:t
16640/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16641s,@configure_input@,$configure_input,;t t
16642s,@srcdir@,$ac_srcdir,;t t
16643s,@top_srcdir@,$ac_top_srcdir,;t t
16644s,@INSTALL@,$ac_INSTALL,;t t
16645" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16646  rm -f $tmp/stdin
16647  if test x"$ac_file" != x-; then
16648    cp $tmp/out $ac_file
16649
16650    for ac_name in prefix exec_prefix datarootdir
16651    do
16652        ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
16653        if test -n "$ac_seen"; then
16654            ac_init=`egrep '[ 	]*'$ac_name'[ 	]*=' $ac_file`
16655            if test -z "$ac_init"; then
16656              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
16657              { echo "$as_me:16657: WARNING: Variable $ac_name is used but was not set:
16658$ac_seen" >&5
16659echo "$as_me: WARNING: Variable $ac_name is used but was not set:
16660$ac_seen" >&2;}
16661            fi
16662        fi
16663    done
16664    egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
16665    egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
16666    if test -s $tmp/out; then
16667      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
16668      { echo "$as_me:16668: WARNING: Some variables may not be substituted:
16669$ac_seen" >&5
16670echo "$as_me: WARNING: Some variables may not be substituted:
16671$ac_seen" >&2;}
16672    fi
16673  else
16674    cat $tmp/out
16675  fi
16676  rm -f $tmp/out
16677
16678done
16679EOF
16680cat >>$CONFIG_STATUS <<\EOF
16681
16682#
16683# CONFIG_HEADER section.
16684#
16685
16686# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16687# NAME is the cpp macro being defined and VALUE is the value it is being given.
16688#
16689# ac_d sets the value in "#define NAME VALUE" lines.
16690ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
16691ac_dB='[ 	].*$,\1#\2'
16692ac_dC=' '
16693ac_dD=',;t'
16694# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16695ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
16696ac_iB='\([ 	]\),\1#\2define\3'
16697ac_iC=' '
16698ac_iD='\4,;t'
16699# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16700ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
16701ac_uB='$,\1#\2define\3'
16702ac_uC=' '
16703ac_uD=',;t'
16704
16705for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16706  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16707  case $ac_file in
16708  - | *:- | *:-:* ) # input from stdin
16709        cat >$tmp/stdin
16710        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16711        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16712  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16713        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16714  * )   ac_file_in=$ac_file.in ;;
16715  esac
16716
16717  test x"$ac_file" != x- && { echo "$as_me:16717: creating $ac_file" >&5
16718echo "$as_me: creating $ac_file" >&6;}
16719
16720  # First look for the input files in the build tree, otherwise in the
16721  # src tree.
16722  ac_file_inputs=`IFS=:
16723    for f in $ac_file_in; do
16724      case $f in
16725      -) echo $tmp/stdin ;;
16726      [\\/$]*)
16727         # Absolute (can't be DOS-style, as IFS=:)
16728         test -f "$f" || { { echo "$as_me:16728: error: cannot find input file: $f" >&5
16729echo "$as_me: error: cannot find input file: $f" >&2;}
16730   { (exit 1); exit 1; }; }
16731         echo $f;;
16732      *) # Relative
16733         if test -f "$f"; then
16734           # Build tree
16735           echo $f
16736         elif test -f "$srcdir/$f"; then
16737           # Source tree
16738           echo $srcdir/$f
16739         else
16740           # /dev/null tree
16741           { { echo "$as_me:16741: error: cannot find input file: $f" >&5
16742echo "$as_me: error: cannot find input file: $f" >&2;}
16743   { (exit 1); exit 1; }; }
16744         fi;;
16745      esac
16746    done` || { (exit 1); exit 1; }
16747  # Remove the trailing spaces.
16748  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
16749
16750EOF
16751
16752# Transform confdefs.h into a list of #define's.  We won't use it as a sed
16753# script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16754# be either 'cat' or 'sort'.
16755sort -u confdefs.h | uniq >conftest.vals
16756
16757# Break up conftest.vals because some shells have a limit on
16758# the size of here documents, and old seds have small limits too.
16759
16760rm -f conftest.tail
16761echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16762while grep . conftest.vals >/dev/null
16763do
16764  # Write chunks of a limited-size here document to conftest.frag.
16765  echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16766  sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16767  echo 'CEOF' >> $CONFIG_STATUS
16768  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16769  rm -f conftest.vals
16770  mv conftest.tail conftest.vals
16771done
16772rm -f conftest.vals
16773
16774# Run sed to substitute the contents of conftest.frag into $tmp/in at the
16775# marker @DEFS@.
16776echo '  cat >> conftest.edit <<CEOF
16777/@DEFS@/r conftest.frag
16778/@DEFS@/d
16779CEOF
16780sed -f conftest.edit $tmp/in > $tmp/out
16781rm -f $tmp/in
16782mv $tmp/out $tmp/in
16783rm -f conftest.edit conftest.frag
16784' >> $CONFIG_STATUS
16785
16786cat >>$CONFIG_STATUS <<\EOF
16787  # Let's still pretend it is `configure' which instantiates (i.e., don't
16788  # use $as_me), people would be surprised to read:
16789  #    /* config.h.  Generated automatically by config.status.  */
16790  if test x"$ac_file" = x-; then
16791    echo "/* Generated automatically by configure.  */" >$tmp/config.h
16792  else
16793    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16794  fi
16795  cat $tmp/in >>$tmp/config.h
16796  rm -f $tmp/in
16797  if test x"$ac_file" != x-; then
16798    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16799      { echo "$as_me:16799: $ac_file is unchanged" >&5
16800echo "$as_me: $ac_file is unchanged" >&6;}
16801    else
16802      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16803         X"$ac_file" : 'X\(//\)[^/]' \| \
16804         X"$ac_file" : 'X\(//\)$' \| \
16805         X"$ac_file" : 'X\(/\)' \| \
16806         .     : '\(.\)' 2>/dev/null ||
16807echo X"$ac_file" |
16808    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16809  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16810  	  /^X\(\/\/\)$/{ s//\1/; q; }
16811  	  /^X\(\/\).*/{ s//\1/; q; }
16812  	  s/.*/./; q'`
16813      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16814        { case "$ac_dir" in
16815  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16816  *)                      as_incr_dir=.;;
16817esac
16818as_dummy="$ac_dir"
16819for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16820  case $as_mkdir_dir in
16821    # Skip DOS drivespec
16822    ?:) as_incr_dir=$as_mkdir_dir ;;
16823    *)
16824      as_incr_dir=$as_incr_dir/$as_mkdir_dir
16825      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16826    ;;
16827  esac
16828done; }
16829
16830      fi
16831      rm -f $ac_file
16832      mv $tmp/config.h $ac_file
16833    fi
16834  else
16835    cat $tmp/config.h
16836    rm -f $tmp/config.h
16837  fi
16838done
16839EOF
16840cat >>$CONFIG_STATUS <<\EOF
16841#
16842# CONFIG_COMMANDS section.
16843#
16844for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16845  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16846  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16847
16848  case $ac_dest in
16849    default-1 ) for ac_file in $CONFIG_FILES; do
16850
16851      # Support "outfile[:infile[:infile...]]"
16852      case "$ac_file" in
16853        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16854      esac
16855
16856      # PO directories have a Makefile.in generated from Makefile.inn.
16857      case "$ac_file" in */[Mm]akefile.in)
16858        # Adjust a relative srcdir.
16859        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
16860        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
16861        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
16862        ac_base=`basename $ac_file .in`
16863        # In autoconf-2.13 it is called $ac_given_srcdir.
16864        # In autoconf-2.50 it is called $srcdir.
16865        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
16866
16867        case "$ac_given_srcdir" in
16868          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
16869          /*) top_srcdir="$ac_given_srcdir" ;;
16870          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
16871        esac
16872
16873        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
16874          rm -f "$ac_dir/POTFILES"
16875          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
16876          sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
16877          test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
16878          sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
16879        fi
16880        ;;
16881      esac
16882    done ;;
16883    default )
16884
16885cf_libname=\${LIB_BASENAME}
16886cf_liblink=$cf_libname
16887cf_libroot=$cf_libname
16888
16889if test "x$cf_cv_do_symlinks" = xyes
16890then
16891	case "x$cf_cv_shlib_version" in #(vi
16892	xrel) #(vi
16893		cf_liblink="\${LIB_ABI_NAME}"
16894		cf_libname="\${LIB_REL_NAME}"
16895		;;
16896	xabi)
16897		cf_liblink="\${LIB_REL_NAME}"
16898		cf_libname="\${LIB_ABI_NAME}"
16899		;;
16900	esac
16901fi
16902LIB_TARGET=$cf_libname
16903
16904case x$LIB_MODEL in
16905xlibtool|xshared) #(vi
16906	cf_libdeps="\${LIBS} \${LDFLAGS}"
16907	;;
16908x*)
16909	cf_libdeps=
16910	;;
16911esac
16912
16913cat >>makefile <<CF_EOF
16914
16915# generated by CF__ADD_SHLIB_RULES
16916# libmodel: $LIB_MODEL
16917# symlinks: $cf_cv_do_symlinks
16918# shlibver: $cf_cv_shlib_version
16919
16920CF_EOF
16921
16922cat >>makefile <<CF_EOF
16923$cf_libname :: \\
16924CF_EOF
16925
16926cat >>makefile <<CF_EOF
16927		\${LIB_OBJECT}
16928	@echo linking \$@
16929	\$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
16930CF_EOF
16931
16932if test "x$cf_cv_do_symlinks" = xyes
16933then
16934cat >>makefile <<CF_EOF
16935	\$(LN_S) $cf_libname $cf_liblink
16936	\$(LN_S) $cf_liblink $cf_libroot
16937CF_EOF
16938fi
16939
16940cat >>makefile <<CF_EOF
16941
16942install \\
16943install.libs :: \$(DESTDIR)\$(libdir)/$cf_libname
16944
16945\$(DESTDIR)\$(libdir)/$cf_libname :: \\
16946		\$(DESTDIR)\$(libdir) \\
16947		\${LIB_OBJECT}
16948	@echo linking \$@
16949	\$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
16950CF_EOF
16951
16952if test "x$cf_cv_do_symlinks" = xyes
16953then
16954cat >>makefile <<CF_EOF
16955	cd \$(DESTDIR)\$(libdir) && (\$(LN_S) $cf_libname $cf_liblink; \$(LN_S) $cf_liblink $cf_libroot; )
16956CF_EOF
16957fi
16958
16959if test x$LIB_MODEL = xshared
16960then
16961cat >>makefile <<CF_EOF
16962	- test -z "\$(DESTDIR)" && /sbin/ldconfig
16963CF_EOF
16964fi
16965
16966cat >>makefile <<CF_EOF
16967
16968uninstall \\
16969uninstall.libs ::
16970	@echo uninstalling \$(DESTDIR)\$(libdir)/$cf_libname
16971CF_EOF
16972
16973if test "x$cf_cv_do_symlinks" = xyes
16974then
16975cat >>makefile <<CF_EOF
16976	-rm -f \$(DESTDIR)\$(libdir)/$cf_libroot
16977	-rm -f \$(DESTDIR)\$(libdir)/$cf_liblink
16978CF_EOF
16979fi
16980
16981cat >>makefile <<CF_EOF
16982	-rm -f \$(DESTDIR)\$(libdir)/$cf_libname
16983
16984clean \\
16985clean.libs ::
16986CF_EOF
16987
16988if test "x$cf_cv_do_symlinks" = xyes
16989then
16990cat >>makefile <<CF_EOF
16991	-rm -f $cf_libroot
16992	-rm -f $cf_liblink
16993CF_EOF
16994fi
16995
16996cat >>makefile <<CF_EOF
16997	-rm -f $cf_libname
16998
16999mostlyclean::
17000	-rm -f \${LIB_OBJECT}
17001# end generated by CF__ADD_SHLIB_RULES
17002CF_EOF
17003
17004 ;;
17005  esac
17006done
17007EOF
17008
17009cat >>$CONFIG_STATUS <<\EOF
17010
17011{ (exit 0); exit 0; }
17012EOF
17013chmod +x $CONFIG_STATUS
17014ac_clean_files=$ac_clean_files_save
17015
17016# configure is writing to config.log, and then calls config.status.
17017# config.status does its own redirection, appending to config.log.
17018# Unfortunately, on DOS this fails, as config.log is still kept open
17019# by configure, so config.status won't be able to write to it; its
17020# output is simply discarded.  So we exec the FD to /dev/null,
17021# effectively closing config.log, so it can be properly (re)opened and
17022# appended to by config.status.  When coming back to configure, we
17023# need to make the FD available again.
17024if test "$no_create" != yes; then
17025  ac_cs_success=:
17026  exec 5>/dev/null
17027  $SHELL $CONFIG_STATUS || ac_cs_success=false
17028  exec 5>>config.log
17029  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17030  # would make configure fail if this is the last instruction.
17031  $ac_cs_success || { (exit 1); exit 1; }
17032fi
17033
17034