]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20210403
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.729 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210105.
5 #
6 # Copyright 2003-2020,2021      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr=expr
38 else
39   as_expr=false
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s=ln
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
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     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --without-ada           suppress check for Ada compiler, don't build demo
720   --without-cxx           do not adjust ncurses bool to match C++
721   --without-cxx-binding   do not build C++ binding and demo
722   --disable-db-install    suppress install of terminal database
723   --without-manpages      suppress install of manpages
724   --without-progs         suppress build/install with programs (e.g., tic)
725   --without-tack          suppress build/install with tack program
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict environment when running as root
787   --enable-symlinks       make tic use symbolic links not hard links
788   --enable-broken_linker  compile with broken-linker support code
789   --enable-bsdpad         recognize BSD-style prefix padding
790   --enable-widec          compile with wide-char/UTF-8 code
791   --disable-lp64          allow chtype to be long (ignore _LP64)
792   --disable-largefile     omit support for large files
793   --disable-tparm-varargs compile tparm() without varargs interface
794   --disable-tic-depends   link tic library without explicit dependency on ncurses library
795   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
796   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
797   --with-bool=TYPE        override fallback type of bool variable
798   --with-caps=alt         compile with alternate Caps file
799   --with-chtype=TYPE      override type of chtype
800   --with-ospeed=TYPE      override type of ospeed variable
801   --with-mmask-t=TYPE     override type of mmask_t
802   --with-ccharw-max=XXX   override size CCHARW_MAX
803   --enable-signed-char    compile using signed Boolean's in term.h
804   --with-tparm-arg=TYPE   override parameter type of tparm
805   --with-rcs-ids          compile-in RCS identifiers
806 Options to Specify How Manpages are Installed:
807   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
808                           optionally formatted/catonly, e.g., gzip,formatted
809   --with-manpage-renames  specify manpage-renaming
810   --with-manpage-aliases  specify manpage-aliases using .so
811   --with-manpage-symlinks specify manpage-aliases using symlinks
812   --with-manpage-tbl      specify manpage processing with tbl
813 Extensions:
814   --disable-ext-funcs     disable function-extensions
815   --enable-sp-funcs       enable SCREEN-extensions
816   --enable-term-driver    enable terminal-driver
817   --enable-const          compile with extra/non-standard const
818   --enable-ext-colors     compile for 256-color support
819   --enable-ext-mouse      compile for extended mouse-encoding
820   --enable-ext-putwin     compile with extended putwin/screendump
821   --enable-no-padding     compile with $NCURSES_NO_PADDING code
822   --enable-sigwinch       compile with SIGWINCH handler
823   --enable-tcap-names     compile with user-definable terminal capabilities
824 Reentrant Code:
825   --with-pthread          use POSIX thread library
826   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
827   --enable-weak-symbols   enable weak-symbols for pthreads
828   --enable-reentrant      compile with reentrant code
829   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
830   --enable-opaque-form    make form-library structures "opaque"
831   --enable-opaque-menu    make menu-library structures "opaque"
832   --enable-opaque-panel   make panel-library structures "opaque"
833   --with-wrap-prefix=XXX  override prefix used for public variables
834 Development Code:
835   --without-develop       disable development options
836   --enable-hard-tabs      compile with hard-tabs code
837   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
838 Experimental Code:
839   --disable-assumed-color do not assume anything about default-colors
840   --disable-hashmap       compile without hashmap scrolling-optimization
841   --enable-colorfgbg      compile-in experimental $COLORFGBG code
842   --enable-fvisibility    compile with -fvisibility=hidden
843   --enable-interop        compile-in interop bindings
844   --enable-safe-sprintf   compile with experimental safe-sprintf code
845   --disable-scroll-hints  compile without scroll-hints code
846   --enable-wgetch-events  compile with wgetch-events code
847   --enable-exp-win32      compile with experimental-Windows driver
848 Testing/development Options:
849   --disable-echo          do not display "compiling" commands
850   --disable-stripping     do not strip (debug info) installed executables
851   --enable-warnings       test: turn on gcc compiler warnings
852   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
853   --enable-string-hacks   work around bogus compiler/loader warnings
854   --enable-assertions     test: turn on generation of assertion code
855   --with-dmalloc          test: use Gray Watson's dmalloc library
856   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
857   --with-valgrind         test: use valgrind
858   --disable-leaks         test: free permanent memory, analyze leaks
859   --enable-expanded       test: generate functions for certain macros
860   --disable-macros        test: use functions rather than macros
861   --with-trace            test: add trace() function to all models of ncurses
862   --disable-gnat-projects test: disable GNAT projects even if usable
863 Ada Binding Options:
864   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
865   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
866   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
867   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
868   --with-ada-libname=XXX  override default Ada library-name
869   --with-form-libname=XXX override form basename of library
870   --with-menu-libname=XXX override menu basename of library
871   --with-panel-libname=XXX override panel basename of library
872   --with-cxx-libname=XXX override ncurses++ basename of library
873
874 Some influential environment variables:
875   CC          C compiler command
876   CFLAGS      C compiler flags
877   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
878               nonstandard directory <lib dir>
879   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
880               headers in a nonstandard directory <include dir>
881   CPP         C preprocessor
882   CXX         C++ compiler command
883   CXXFLAGS    C++ compiler flags
884   CXXCPP      C++ preprocessor
885
886 Use these variables to override the choices made by `configure' or to help
887 it to find libraries and programs with nonstandard names/locations.
888
889 EOF
890 fi
891
892 if test "$ac_init_help" = "recursive"; then
893   # If there are subdirs, report their specific --help.
894   ac_popdir=`pwd`
895   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
896     cd "$ac_subdir"
897     # A "../" for each directory in /$ac_subdir.
898     ac_dots=`echo "$ac_subdir" |
899              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
900
901     case "$srcdir" in
902     .) # No --srcdir option.  We are building in place.
903       ac_sub_srcdir="$srcdir" ;;
904     [\\/]* | ?:[\\/]* ) # Absolute path.
905       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
906     *) # Relative path.
907       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
908     esac
909
910     # Check for guested configure; otherwise get Cygnus style configure.
911     if test -f "$ac_sub_srcdir/configure.gnu"; then
912       echo
913       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
914     elif test -f "$ac_sub_srcdir/configure"; then
915       echo
916       $SHELL "$ac_sub_srcdir/configure" --help=recursive
917     elif test -f "$ac_sub_srcdir/configure.ac" ||
918            test -f "$ac_sub_srcdir/configure.in"; then
919       echo
920       "$ac_configure" --help
921     else
922       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
923     fi
924     cd "$ac_popdir"
925   done
926 fi
927
928 test -n "$ac_init_help" && exit 0
929 if "$ac_init_version"; then
930   cat <<\EOF
931
932 Copyright 2003-2020,2021        Thomas E. Dickey
933 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
934 Free Software Foundation, Inc.
935 This configure script is free software; the Free Software Foundation
936 gives unlimited permission to copy, distribute and modify it.
937 EOF
938   exit 0
939 fi
940 exec 5>config.log
941 cat >&5 <<EOF
942 This file contains any messages produced by compilers while
943 running configure, to aid debugging if configure makes a mistake.
944
945 It was created by $as_me, which was
946 generated by GNU Autoconf 2.52.20210105.  Invocation command line was
947
948   $ $0 $@
949
950 EOF
951 {
952 cat <<_ASUNAME
953 ## ---------- ##
954 ## Platform.  ##
955 ## ---------- ##
956
957 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
958 uname -m = `(uname -m) 2>/dev/null || echo unknown`
959 uname -r = `(uname -r) 2>/dev/null || echo unknown`
960 uname -s = `(uname -s) 2>/dev/null || echo unknown`
961 uname -v = `(uname -v) 2>/dev/null || echo unknown`
962
963 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
964 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
965
966 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
967 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
968 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
969 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
970 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
971 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
972 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
973
974 PATH = $PATH
975
976 _ASUNAME
977 } >&5
978
979 cat >&5 <<EOF
980 ## ------------ ##
981 ## Core tests.  ##
982 ## ------------ ##
983
984 EOF
985
986 # Keep a trace of the command line.
987 # Strip out --no-create and --no-recursion so they do not pile up.
988 # Also quote any args containing shell meta-characters.
989 ac_configure_args=
990 ac_sep=
991 for ac_arg
992 do
993   case "$ac_arg" in
994   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
995   | --no-cr | --no-c) ;;
996   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
997   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
998   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
999     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1000     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1001     ac_sep=" " ;;
1002   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1003      ac_sep=" " ;;
1004   esac
1005   # Get rid of the leading space.
1006 done
1007
1008 # When interrupted or exit'd, cleanup temporary files, and complete
1009 # config.log.  We remove comments because anyway the quotes in there
1010 # would cause problems or look ugly.
1011 trap 'exit_status=$?
1012   # Save into config.log some information that might help in debugging.
1013   echo >&5
1014   echo "## ----------------- ##" >&5
1015   echo "## Cache variables.  ##" >&5
1016   echo "## ----------------- ##" >&5
1017   echo >&5
1018   # The following way of writing the cache mishandles newlines in values,
1019 {
1020   (set) 2>&1 |
1021     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1022     *ac_space=\ *)
1023       sed -n \
1024         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1025           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1026       ;;
1027     *)
1028       sed -n \
1029         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1030       ;;
1031     esac;
1032 } >&5
1033   sed "/^$/d" confdefs.h >conftest.log
1034   if test -s conftest.log; then
1035     echo >&5
1036     echo "## ------------ ##" >&5
1037     echo "## confdefs.h.  ##" >&5
1038     echo "## ------------ ##" >&5
1039     echo >&5
1040     cat conftest.log >&5
1041   fi
1042   (echo; echo) >&5
1043   test "$ac_signal" != 0 &&
1044     echo "$as_me: caught signal $ac_signal" >&5
1045   echo "$as_me: exit $exit_status" >&5
1046   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1047     exit $exit_status
1048      ' 0
1049 for ac_signal in 1 2 13 15; do
1050   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1051 done
1052 ac_signal=0
1053
1054 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1055 rm -rf conftest* confdefs.h
1056 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1057 echo >confdefs.h
1058
1059 # Let the site file select an alternate cache file if it wants to.
1060 # Prefer explicitly selected file to automatically selected ones.
1061 if test -z "$CONFIG_SITE"; then
1062   if test "x$prefix" != xNONE; then
1063     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1064   else
1065     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1066   fi
1067 fi
1068 for ac_site_file in $CONFIG_SITE; do
1069   if test -r "$ac_site_file"; then
1070     { echo "$as_me:1070: loading site script $ac_site_file" >&5
1071 echo "$as_me: loading site script $ac_site_file" >&6;}
1072     cat "$ac_site_file" >&5
1073     . "$ac_site_file"
1074   fi
1075 done
1076
1077 if test -r "$cache_file"; then
1078   # Some versions of bash will fail to source /dev/null (special
1079   # files actually), so we avoid doing that.
1080   if test -f "$cache_file"; then
1081     { echo "$as_me:1081: loading cache $cache_file" >&5
1082 echo "$as_me: loading cache $cache_file" >&6;}
1083     case $cache_file in
1084       [\\/]* | ?:[\\/]* ) . $cache_file;;
1085       *)                      . ./$cache_file;;
1086     esac
1087   fi
1088 else
1089   { echo "$as_me:1089: creating cache $cache_file" >&5
1090 echo "$as_me: creating cache $cache_file" >&6;}
1091   >$cache_file
1092 fi
1093
1094 # Check that the precious variables saved in the cache have kept the same
1095 # value.
1096 ac_cache_corrupted=false
1097 for ac_var in `(set) 2>&1 |
1098                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1099   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1100   eval ac_new_set=\$ac_env_${ac_var}_set
1101   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1102   eval ac_new_val="\$ac_env_${ac_var}_value"
1103   case "$ac_old_set,$ac_new_set" in
1104     set,)
1105       { echo "$as_me:1105: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1106 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1107       ac_cache_corrupted=: ;;
1108     ,set)
1109       { echo "$as_me:1109: error: \`$ac_var' was not set in the previous run" >&5
1110 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1111       ac_cache_corrupted=: ;;
1112     ,);;
1113     *)
1114       if test "x$ac_old_val" != "x$ac_new_val"; then
1115         { echo "$as_me:1115: error: \`$ac_var' has changed since the previous run:" >&5
1116 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1117         { echo "$as_me:1117:   former value:  $ac_old_val" >&5
1118 echo "$as_me:   former value:  $ac_old_val" >&2;}
1119         { echo "$as_me:1119:   current value: $ac_new_val" >&5
1120 echo "$as_me:   current value: $ac_new_val" >&2;}
1121         ac_cache_corrupted=:
1122       fi;;
1123   esac
1124   # Pass precious variables to config.status.  It doesn't matter if
1125   # we pass some twice (in addition to the command line arguments).
1126   if test "$ac_new_set" = set; then
1127     case "$ac_new_val" in
1128     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1129       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1130       ac_configure_args="$ac_configure_args '$ac_arg'"
1131       ;;
1132     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1133        ;;
1134     esac
1135   fi
1136 done
1137 if "$ac_cache_corrupted"; then
1138   { echo "$as_me:1138: error: changes in the environment can compromise the build" >&5
1139 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1140   { { echo "$as_me:1140: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1141 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1142    { (exit 1); exit 1; }; }
1143 fi
1144
1145 ac_ext=c
1146 ac_cpp='$CPP $CPPFLAGS'
1147 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1148 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1149 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1150 ac_main_return="return"
1151
1152 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1153   *c*,-n*) ECHO_N=
1154            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1155            ECHO_T='     '
1156            ;;
1157   *c*,*  ) ECHO_N=-n
1158            ECHO_C=
1159            ECHO_T=
1160            ;;
1161   *)       ECHO_N=
1162            ECHO_C='\c'
1163            ECHO_T=
1164            ;;
1165 esac
1166 echo "#! $SHELL" >conftest.sh
1167 echo  "exit 0"   >>conftest.sh
1168 chmod +x conftest.sh
1169 if { (echo "$as_me:1169: PATH=\".;.\"; conftest.sh") >&5
1170   (PATH=".;."; conftest.sh) 2>&5
1171   ac_status=$?
1172   echo "$as_me:1172: \$? = $ac_status" >&5
1173   (exit "$ac_status"); }; then
1174   ac_path_separator=';'
1175 else
1176   ac_path_separator=:
1177 fi
1178 PATH_SEPARATOR="$ac_path_separator"
1179 rm -f conftest.sh
1180
1181 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1182
1183 top_builddir=`pwd`
1184
1185 for ac_prog in ggrep grep
1186 do
1187   # Extract the first word of "$ac_prog", so it can be a program name with args.
1188 set dummy $ac_prog; ac_word=$2
1189 echo "$as_me:1189: checking for $ac_word" >&5
1190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1191 if test "${ac_cv_prog_GREP+set}" = set; then
1192   echo $ECHO_N "(cached) $ECHO_C" >&6
1193 else
1194   if test -n "$GREP"; then
1195   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1196 else
1197   ac_save_IFS=$IFS; IFS=$ac_path_separator
1198 ac_dummy="$PATH"
1199 for ac_dir in $ac_dummy; do
1200   IFS=$ac_save_IFS
1201   test -z "$ac_dir" && ac_dir=.
1202   $as_executable_p "$ac_dir/$ac_word" || continue
1203 ac_cv_prog_GREP="$ac_prog"
1204 echo "$as_me:1204: found $ac_dir/$ac_word" >&5
1205 break
1206 done
1207
1208 fi
1209 fi
1210 GREP=$ac_cv_prog_GREP
1211 if test -n "$GREP"; then
1212   echo "$as_me:1212: result: $GREP" >&5
1213 echo "${ECHO_T}$GREP" >&6
1214 else
1215   echo "$as_me:1215: result: no" >&5
1216 echo "${ECHO_T}no" >&6
1217 fi
1218
1219   test -n "$GREP" && break
1220 done
1221 test -n "$GREP" || GREP=": "
1222
1223 echo "$as_me:1223: checking for egrep" >&5
1224 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1225 if test "${ac_cv_path_EGREP+set}" = set; then
1226   echo $ECHO_N "(cached) $ECHO_C" >&6
1227 else
1228   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1229    then ac_cv_path_EGREP="$GREP -E"
1230    else
1231      for ac_prog in gegrep egrep
1232 do
1233   # Extract the first word of "$ac_prog", so it can be a program name with args.
1234 set dummy $ac_prog; ac_word=$2
1235 echo "$as_me:1235: checking for $ac_word" >&5
1236 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1237 if test "${ac_cv_path_EGREP+set}" = set; then
1238   echo $ECHO_N "(cached) $ECHO_C" >&6
1239 else
1240   case $EGREP in
1241   [\\/]* | ?:[\\/]*)
1242   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1243   ;;
1244   *)
1245   ac_save_IFS=$IFS; IFS=$ac_path_separator
1246 ac_dummy="$PATH"
1247 for ac_dir in $ac_dummy; do
1248   IFS=$ac_save_IFS
1249   test -z "$ac_dir" && ac_dir=.
1250   if $as_executable_p "$ac_dir/$ac_word"; then
1251    ac_cv_path_EGREP="$ac_dir/$ac_word"
1252    echo "$as_me:1252: found $ac_dir/$ac_word" >&5
1253    break
1254 fi
1255 done
1256
1257   ;;
1258 esac
1259 fi
1260 EGREP=$ac_cv_path_EGREP
1261
1262 if test -n "$EGREP"; then
1263   echo "$as_me:1263: result: $EGREP" >&5
1264 echo "${ECHO_T}$EGREP" >&6
1265 else
1266   echo "$as_me:1266: result: no" >&5
1267 echo "${ECHO_T}no" >&6
1268 fi
1269
1270   test -n "$EGREP" && break
1271 done
1272 test -n "$EGREP" || EGREP=": "
1273
1274      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1274: error: cannot find workable egrep" >&5
1275 echo "$as_me: error: cannot find workable egrep" >&2;}
1276    { (exit 1); exit 1; }; }
1277    fi
1278 fi
1279 echo "$as_me:1279: result: $ac_cv_path_EGREP" >&5
1280 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1281  EGREP="$ac_cv_path_EGREP"
1282
1283 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1284 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 cf_cv_abi_version=${NCURSES_MAJOR}
1287 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1288 cf_cv_timestamp=`date`
1289 echo "$as_me:1289: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1290 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1291
1292 if test -f "$srcdir/VERSION" ; then
1293         echo "$as_me:1293: checking for package version" >&5
1294 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1295
1296         # if there are not enough fields, cut returns the last one...
1297         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1298         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1299         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1300
1301         # this is how CF_BUNDLED_INTL uses $VERSION:
1302         VERSION="$cf_field1"
1303
1304         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1305         test -z "$VERSION_MAJOR" && { { echo "$as_me:1305: error: missing major-version" >&5
1306 echo "$as_me: error: missing major-version" >&2;}
1307    { (exit 1); exit 1; }; }
1308
1309         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1310         test -z "$VERSION_MINOR" && { { echo "$as_me:1310: error: missing minor-version" >&5
1311 echo "$as_me: error: missing minor-version" >&2;}
1312    { (exit 1); exit 1; }; }
1313
1314         echo "$as_me:1314: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1315 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1316
1317         echo "$as_me:1317: checking for package patch date" >&5
1318 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1319         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1320         case .$VERSION_PATCH in
1321         (.)
1322                 { { echo "$as_me:1322: error: missing patch-date $VERSION_PATCH" >&5
1323 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1324    { (exit 1); exit 1; }; }
1325                 ;;
1326         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1327                 ;;
1328         (*)
1329                 { { echo "$as_me:1329: error: illegal patch-date $VERSION_PATCH" >&5
1330 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1331    { (exit 1); exit 1; }; }
1332                 ;;
1333         esac
1334         echo "$as_me:1334: result: $VERSION_PATCH" >&5
1335 echo "${ECHO_T}$VERSION_PATCH" >&6
1336 else
1337         { { echo "$as_me:1337: error: did not find $srcdir/VERSION" >&5
1338 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1339    { (exit 1); exit 1; }; }
1340 fi
1341
1342 # show the actual data that we have for versions:
1343 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1344
1345 echo "${as_me:-configure}:1345: testing ABI VERSION $VERSION ..." 1>&5
1346
1347 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1348
1349 echo "${as_me:-configure}:1349: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1350
1351 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1352
1353 echo "${as_me:-configure}:1353: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1354
1355 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1356
1357 echo "${as_me:-configure}:1357: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1358
1359         cf_PACKAGE=NCURSES
1360         PACKAGE=ncurses
1361
1362 cat >>confdefs.h <<EOF
1363 #define PACKAGE "$PACKAGE"
1364 EOF
1365
1366 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1367
1368         cat >>confdefs.h <<EOF
1369 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1370 EOF
1371
1372         cat >>confdefs.h <<EOF
1373 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1374 EOF
1375
1376 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1377
1378 # Check whether --with-rel-version or --without-rel-version was given.
1379 if test "${with_rel_version+set}" = set; then
1380   withval="$with_rel_version"
1381   { echo "$as_me:1381: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1382 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1383  cf_cv_rel_version=$withval
1384 fi;
1385
1386  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1387  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1388
1389 if test -n "$NCURSES_MAJOR" ; then
1390   case $NCURSES_MAJOR in
1391   ([0-9]*)
1392         ;;
1393   (*)
1394         { { echo "$as_me:1394: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1395 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1396    { (exit 1); exit 1; }; }
1397         ;;
1398   esac
1399 else
1400   { { echo "$as_me:1400: error: Release major-version value is empty" >&5
1401 echo "$as_me: error: Release major-version value is empty" >&2;}
1402    { (exit 1); exit 1; }; }
1403 fi
1404
1405 if test -n "$NCURSES_MINOR" ; then
1406   case $NCURSES_MINOR in
1407   ([0-9]*)
1408         ;;
1409   (*)
1410         { { echo "$as_me:1410: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1411 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1412    { (exit 1); exit 1; }; }
1413         ;;
1414   esac
1415 else
1416   { { echo "$as_me:1416: error: Release minor-version value is empty" >&5
1417 echo "$as_me: error: Release minor-version value is empty" >&2;}
1418    { (exit 1); exit 1; }; }
1419 fi
1420
1421 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1422
1423 # Check whether --with-abi-version or --without-abi-version was given.
1424 if test "${with_abi_version+set}" = set; then
1425   withval="$with_abi_version"
1426
1427         if test "x$cf_cv_abi_version" != "x$withval"
1428         then
1429                 { echo "$as_me:1429: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1430 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1431                 case "$cf_cv_rel_version" in
1432                 (5.*)
1433                         cf_cv_rel_version=$withval.0
1434                         ;;
1435                 (6.*)
1436                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1437                         ;;
1438                 esac
1439         fi
1440         cf_cv_abi_version=$withval
1441 fi;
1442
1443 if test -n "$cf_cv_abi_version" ; then
1444   case $cf_cv_abi_version in
1445   ([0-9]*)
1446         ;;
1447   (*)
1448         { { echo "$as_me:1448: error: ABI version is not a number: $cf_cv_abi_version" >&5
1449 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1450    { (exit 1); exit 1; }; }
1451         ;;
1452   esac
1453 else
1454   { { echo "$as_me:1454: error: ABI version value is empty" >&5
1455 echo "$as_me: error: ABI version value is empty" >&2;}
1456    { (exit 1); exit 1; }; }
1457 fi
1458
1459 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1460 then
1461         case "$cf_cv_rel_version" in
1462         (5.*)
1463                 cf_cv_rel_version=$with_abi_version.0
1464                 ;;
1465         esac
1466 fi
1467
1468 ac_aux_dir=
1469 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1470   if test -f "$ac_dir/install-sh"; then
1471     ac_aux_dir=$ac_dir
1472     ac_install_sh="$ac_aux_dir/install-sh -c"
1473     break
1474   elif test -f "$ac_dir/install.sh"; then
1475     ac_aux_dir=$ac_dir
1476     ac_install_sh="$ac_aux_dir/install.sh -c"
1477     break
1478   elif test -f "$ac_dir/shtool"; then
1479     ac_aux_dir=$ac_dir
1480     ac_install_sh="$ac_aux_dir/shtool install -c"
1481     break
1482   fi
1483 done
1484 if test -z "$ac_aux_dir"; then
1485   { { echo "$as_me:1485: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1486 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1487    { (exit 1); exit 1; }; }
1488 fi
1489 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1490 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1491 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1492
1493 # Make sure we can run config.sub.
1494 $ac_config_sub sun4 >/dev/null 2>&1 ||
1495   { { echo "$as_me:1495: error: cannot run $ac_config_sub" >&5
1496 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1497    { (exit 1); exit 1; }; }
1498
1499 echo "$as_me:1499: checking build system type" >&5
1500 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1501 if test "${ac_cv_build+set}" = set; then
1502   echo $ECHO_N "(cached) $ECHO_C" >&6
1503 else
1504   ac_cv_build_alias=$build_alias
1505 test -z "$ac_cv_build_alias" &&
1506   ac_cv_build_alias=`$ac_config_guess`
1507 test -z "$ac_cv_build_alias" &&
1508   { { echo "$as_me:1508: error: cannot guess build type; you must specify one" >&5
1509 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1510    { (exit 1); exit 1; }; }
1511 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1512   { { echo "$as_me:1512: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1513 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1514    { (exit 1); exit 1; }; }
1515
1516 fi
1517 echo "$as_me:1517: result: $ac_cv_build" >&5
1518 echo "${ECHO_T}$ac_cv_build" >&6
1519 build=$ac_cv_build
1520 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1521 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1522 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1523
1524 echo "$as_me:1524: checking host system type" >&5
1525 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1526 if test "${ac_cv_host+set}" = set; then
1527   echo $ECHO_N "(cached) $ECHO_C" >&6
1528 else
1529   ac_cv_host_alias=$host_alias
1530 test -z "$ac_cv_host_alias" &&
1531   ac_cv_host_alias=$ac_cv_build_alias
1532 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1533   { { echo "$as_me:1533: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1534 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1535    { (exit 1); exit 1; }; }
1536
1537 fi
1538 echo "$as_me:1538: result: $ac_cv_host" >&5
1539 echo "${ECHO_T}$ac_cv_host" >&6
1540 host=$ac_cv_host
1541 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1542 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1543 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1544
1545 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1546         echo "$as_me:1546: checking target system type" >&5
1547 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1548 if test "${ac_cv_target+set}" = set; then
1549   echo $ECHO_N "(cached) $ECHO_C" >&6
1550 else
1551   ac_cv_target_alias=$target_alias
1552 test "x$ac_cv_target_alias" = "x" &&
1553   ac_cv_target_alias=$ac_cv_host_alias
1554 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1555   { { echo "$as_me:1555: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1556 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1557    { (exit 1); exit 1; }; }
1558
1559 fi
1560 echo "$as_me:1560: result: $ac_cv_target" >&5
1561 echo "${ECHO_T}$ac_cv_target" >&6
1562 target=$ac_cv_target
1563 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1564 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1565 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1566
1567 # The aliases save the names the user supplied, while $host etc.
1568 # will get canonicalized.
1569 test -n "$target_alias" &&
1570   test "$program_prefix$program_suffix$program_transform_name" = \
1571     NONENONEs,x,x, &&
1572   program_prefix=${target_alias}-
1573         system_name="$host_os"
1574 else
1575         system_name="`(uname -s -r) 2>/dev/null`"
1576         if test -z "$system_name" ; then
1577                 system_name="`(hostname) 2>/dev/null`"
1578         fi
1579 fi
1580 test -n "$system_name" &&
1581 cat >>confdefs.h <<EOF
1582 #define SYSTEM_NAME "$system_name"
1583 EOF
1584
1585 if test "${cf_cv_system_name+set}" = set; then
1586   echo $ECHO_N "(cached) $ECHO_C" >&6
1587 else
1588   cf_cv_system_name="$system_name"
1589 fi
1590
1591 test -z "$system_name" && system_name="$cf_cv_system_name"
1592 test -n "$cf_cv_system_name" && echo "$as_me:1592: result: Configuring for $cf_cv_system_name" >&5
1593 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1594
1595 if test ".$system_name" != ".$cf_cv_system_name" ; then
1596         echo "$as_me:1596: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1597 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1598         { { echo "$as_me:1598: error: \"Please remove config.cache and try again.\"" >&5
1599 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1600    { (exit 1); exit 1; }; }
1601 fi
1602
1603 # Check whether --with-system-type or --without-system-type was given.
1604 if test "${with_system_type+set}" = set; then
1605   withval="$with_system_type"
1606   { echo "$as_me:1606: WARNING: overriding system type to $withval" >&5
1607 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1608         cf_cv_system_name=$withval
1609         host_os=$withval
1610
1611 fi;
1612
1613 ###     Save the given $CFLAGS to allow user-override.
1614 cf_user_CFLAGS="$CFLAGS"
1615
1616 ###     Default install-location
1617 echo "$as_me:1617: checking for fgrep" >&5
1618 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1619 if test "${ac_cv_path_FGREP+set}" = set; then
1620   echo $ECHO_N "(cached) $ECHO_C" >&6
1621 else
1622   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1623    then ac_cv_path_FGREP="$GREP -F"
1624    else
1625      for ac_prog in gfgrep fgrep
1626 do
1627   # Extract the first word of "$ac_prog", so it can be a program name with args.
1628 set dummy $ac_prog; ac_word=$2
1629 echo "$as_me:1629: checking for $ac_word" >&5
1630 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1631 if test "${ac_cv_path_FGREP+set}" = set; then
1632   echo $ECHO_N "(cached) $ECHO_C" >&6
1633 else
1634   case $FGREP in
1635   [\\/]* | ?:[\\/]*)
1636   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1637   ;;
1638   *)
1639   ac_save_IFS=$IFS; IFS=$ac_path_separator
1640 ac_dummy="$PATH"
1641 for ac_dir in $ac_dummy; do
1642   IFS=$ac_save_IFS
1643   test -z "$ac_dir" && ac_dir=.
1644   if $as_executable_p "$ac_dir/$ac_word"; then
1645    ac_cv_path_FGREP="$ac_dir/$ac_word"
1646    echo "$as_me:1646: found $ac_dir/$ac_word" >&5
1647    break
1648 fi
1649 done
1650
1651   ;;
1652 esac
1653 fi
1654 FGREP=$ac_cv_path_FGREP
1655
1656 if test -n "$FGREP"; then
1657   echo "$as_me:1657: result: $FGREP" >&5
1658 echo "${ECHO_T}$FGREP" >&6
1659 else
1660   echo "$as_me:1660: result: no" >&5
1661 echo "${ECHO_T}no" >&6
1662 fi
1663
1664   test -n "$FGREP" && break
1665 done
1666 test -n "$FGREP" || FGREP=": "
1667
1668      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1668: error: cannot find workable fgrep" >&5
1669 echo "$as_me: error: cannot find workable fgrep" >&2;}
1670    { (exit 1); exit 1; }; }
1671    fi
1672 fi
1673 echo "$as_me:1673: result: $ac_cv_path_FGREP" >&5
1674 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1675  FGREP="$ac_cv_path_FGREP"
1676
1677 echo "$as_me:1677: checking for prefix" >&5
1678 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1679 if test "x$prefix" = "xNONE" ; then
1680         case "$cf_cv_system_name" in
1681                 # non-vendor systems don't have a conflict
1682         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1683                 prefix=/usr
1684                 ;;
1685         (*)     prefix=$ac_default_prefix
1686                 ;;
1687         esac
1688 fi
1689 echo "$as_me:1689: result: $prefix" >&5
1690 echo "${ECHO_T}$prefix" >&6
1691
1692 if test "x$prefix" = "xNONE" ; then
1693 echo "$as_me:1693: checking for default include-directory" >&5
1694 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1695 test -n "$verbose" && echo 1>&6
1696 for cf_symbol in \
1697         "$includedir" \
1698         "$includedir/ncurses" \
1699         "$prefix/include" \
1700         "$prefix/include/ncurses" \
1701         /usr/local/include \
1702         /usr/local/include/ncurses \
1703         /usr/include \
1704         /usr/include/ncurses
1705 do
1706         cf_dir=`eval echo "$cf_symbol"`
1707         if test -f "$cf_dir/curses.h" ; then
1708         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1709                 includedir="$cf_symbol"
1710                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1711                 break
1712         fi
1713         fi
1714         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1715 done
1716 echo "$as_me:1716: result: $includedir" >&5
1717 echo "${ECHO_T}$includedir" >&6
1718 fi
1719
1720 ### Defaults for ncurses ABI
1721
1722 case x$cf_cv_abi_version in
1723 (x[6789])
1724         cf_dft_ext_colors=yes
1725         cf_dft_ext_const=yes
1726         cf_dft_ext_mouse=yes
1727         cf_dft_ext_putwin=yes
1728         cf_dft_ext_spfuncs=yes
1729         cf_dft_filter_syms=yes
1730         cf_dft_chtype=uint32_t
1731         cf_dft_mmask_t=uint32_t
1732         cf_dft_interop=yes
1733         cf_dft_tparm_arg=intptr_t
1734         cf_dft_with_lp64=yes
1735         ;;
1736 (*)
1737         cf_dft_ext_colors=no
1738         cf_dft_ext_const=no
1739         cf_dft_ext_mouse=no
1740         cf_dft_ext_putwin=no
1741         cf_dft_ext_spfuncs=no
1742         cf_dft_filter_syms=no
1743         cf_dft_chtype=auto
1744         cf_dft_mmask_t=auto
1745         cf_dft_interop=no
1746         cf_dft_tparm_arg=long
1747         cf_dft_with_lp64=no
1748         ;;
1749 esac
1750
1751 ###     Checks for programs.
1752
1753 # Check whether --with-ada or --without-ada was given.
1754 if test "${with_ada+set}" = set; then
1755   withval="$with_ada"
1756   cf_with_ada=$withval
1757 else
1758   cf_with_ada=yes
1759 fi;
1760
1761 if test "x$cf_with_ada" = xyes
1762 then
1763         cf_prog_cc="gnatgcc gcc cc"
1764 else
1765         cf_prog_cc="gcc cc"
1766 fi
1767
1768 ac_ext=c
1769 ac_cpp='$CPP $CPPFLAGS'
1770 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1771 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1772 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1773 ac_main_return="return"
1774 if test -n "$ac_tool_prefix"; then
1775   for ac_prog in $cf_prog_cc
1776   do
1777     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1778 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1779 echo "$as_me:1779: checking for $ac_word" >&5
1780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1781 if test "${ac_cv_prog_CC+set}" = set; then
1782   echo $ECHO_N "(cached) $ECHO_C" >&6
1783 else
1784   if test -n "$CC"; then
1785   ac_cv_prog_CC="$CC" # Let the user override the test.
1786 else
1787   ac_save_IFS=$IFS; IFS=$ac_path_separator
1788 ac_dummy="$PATH"
1789 for ac_dir in $ac_dummy; do
1790   IFS=$ac_save_IFS
1791   test -z "$ac_dir" && ac_dir=.
1792   $as_executable_p "$ac_dir/$ac_word" || continue
1793 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1794 echo "$as_me:1794: found $ac_dir/$ac_word" >&5
1795 break
1796 done
1797
1798 fi
1799 fi
1800 CC=$ac_cv_prog_CC
1801 if test -n "$CC"; then
1802   echo "$as_me:1802: result: $CC" >&5
1803 echo "${ECHO_T}$CC" >&6
1804 else
1805   echo "$as_me:1805: result: no" >&5
1806 echo "${ECHO_T}no" >&6
1807 fi
1808
1809     test -n "$CC" && break
1810   done
1811 fi
1812 if test -z "$CC"; then
1813   ac_ct_CC=$CC
1814   for ac_prog in $cf_prog_cc
1815 do
1816   # Extract the first word of "$ac_prog", so it can be a program name with args.
1817 set dummy $ac_prog; ac_word=$2
1818 echo "$as_me:1818: checking for $ac_word" >&5
1819 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1820 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1821   echo $ECHO_N "(cached) $ECHO_C" >&6
1822 else
1823   if test -n "$ac_ct_CC"; then
1824   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1825 else
1826   ac_save_IFS=$IFS; IFS=$ac_path_separator
1827 ac_dummy="$PATH"
1828 for ac_dir in $ac_dummy; do
1829   IFS=$ac_save_IFS
1830   test -z "$ac_dir" && ac_dir=.
1831   $as_executable_p "$ac_dir/$ac_word" || continue
1832 ac_cv_prog_ac_ct_CC="$ac_prog"
1833 echo "$as_me:1833: found $ac_dir/$ac_word" >&5
1834 break
1835 done
1836
1837 fi
1838 fi
1839 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1840 if test -n "$ac_ct_CC"; then
1841   echo "$as_me:1841: result: $ac_ct_CC" >&5
1842 echo "${ECHO_T}$ac_ct_CC" >&6
1843 else
1844   echo "$as_me:1844: result: no" >&5
1845 echo "${ECHO_T}no" >&6
1846 fi
1847
1848   test -n "$ac_ct_CC" && break
1849 done
1850
1851   CC=$ac_ct_CC
1852 fi
1853
1854 test -z "$CC" && { { echo "$as_me:1854: error: no acceptable cc found in \$PATH" >&5
1855 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1856    { (exit 1); exit 1; }; }
1857
1858 # Provide some information about the compiler.
1859 echo "$as_me:1859:" \
1860      "checking for C compiler version" >&5
1861 ac_compiler=`set X $ac_compile; echo "$2"`
1862 { (eval echo "$as_me:1862: \"$ac_compiler --version </dev/null >&5\"") >&5
1863   (eval $ac_compiler --version </dev/null >&5) 2>&5
1864   ac_status=$?
1865   echo "$as_me:1865: \$? = $ac_status" >&5
1866   (exit "$ac_status"); }
1867 { (eval echo "$as_me:1867: \"$ac_compiler -v </dev/null >&5\"") >&5
1868   (eval $ac_compiler -v </dev/null >&5) 2>&5
1869   ac_status=$?
1870   echo "$as_me:1870: \$? = $ac_status" >&5
1871   (exit "$ac_status"); }
1872 { (eval echo "$as_me:1872: \"$ac_compiler -V </dev/null >&5\"") >&5
1873   (eval $ac_compiler -V </dev/null >&5) 2>&5
1874   ac_status=$?
1875   echo "$as_me:1875: \$? = $ac_status" >&5
1876   (exit "$ac_status"); }
1877
1878 cat >"conftest.$ac_ext" <<_ACEOF
1879 #line 1879 "configure"
1880 #include "confdefs.h"
1881
1882 int
1883 main (void)
1884 {
1885
1886   ;
1887   return 0;
1888 }
1889 _ACEOF
1890 ac_clean_files_save=$ac_clean_files
1891 ac_clean_files="$ac_clean_files a.out a.exe"
1892 # Try to create an executable without -o first, disregard a.out.
1893 # It will help us diagnose broken compilers, and finding out an intuition
1894 # of exeext.
1895 echo "$as_me:1895: checking for C compiler default output" >&5
1896 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1897 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1898 if { (eval echo "$as_me:1898: \"$ac_link_default\"") >&5
1899   (eval $ac_link_default) 2>&5
1900   ac_status=$?
1901   echo "$as_me:1901: \$? = $ac_status" >&5
1902   (exit "$ac_status"); }; then
1903   # Find the output, starting from the most likely.  This scheme is
1904 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1905 # resort.
1906 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1907                 ls a.out conftest 2>/dev/null;
1908                 ls a.* conftest.* 2>/dev/null`; do
1909   case $ac_file in
1910     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1911     a.out ) # We found the default executable, but exeext='' is most
1912             # certainly right.
1913             break;;
1914     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1915           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1916           export ac_cv_exeext
1917           break;;
1918     * ) break;;
1919   esac
1920 done
1921 else
1922   echo "$as_me: failed program was:" >&5
1923 cat "conftest.$ac_ext" >&5
1924 { { echo "$as_me:1924: error: C compiler cannot create executables" >&5
1925 echo "$as_me: error: C compiler cannot create executables" >&2;}
1926    { (exit 77); exit 77; }; }
1927 fi
1928
1929 ac_exeext=$ac_cv_exeext
1930 echo "$as_me:1930: result: $ac_file" >&5
1931 echo "${ECHO_T}$ac_file" >&6
1932
1933 # Check the compiler produces executables we can run.  If not, either
1934 # the compiler is broken, or we cross compile.
1935 echo "$as_me:1935: checking whether the C compiler works" >&5
1936 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1937 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1938 # If not cross compiling, check that we can run a simple program.
1939 if test "$cross_compiling" != yes; then
1940   if { ac_try='./$ac_file'
1941   { (eval echo "$as_me:1941: \"$ac_try\"") >&5
1942   (eval $ac_try) 2>&5
1943   ac_status=$?
1944   echo "$as_me:1944: \$? = $ac_status" >&5
1945   (exit "$ac_status"); }; }; then
1946     cross_compiling=no
1947   else
1948     if test "$cross_compiling" = maybe; then
1949         cross_compiling=yes
1950     else
1951         { { echo "$as_me:1951: error: cannot run C compiled programs.
1952 If you meant to cross compile, use \`--host'." >&5
1953 echo "$as_me: error: cannot run C compiled programs.
1954 If you meant to cross compile, use \`--host'." >&2;}
1955    { (exit 1); exit 1; }; }
1956     fi
1957   fi
1958 fi
1959 echo "$as_me:1959: result: yes" >&5
1960 echo "${ECHO_T}yes" >&6
1961
1962 rm -f a.out a.exe "conftest$ac_cv_exeext"
1963 ac_clean_files=$ac_clean_files_save
1964 # Check the compiler produces executables we can run.  If not, either
1965 # the compiler is broken, or we cross compile.
1966 echo "$as_me:1966: checking whether we are cross compiling" >&5
1967 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1968 echo "$as_me:1968: result: $cross_compiling" >&5
1969 echo "${ECHO_T}$cross_compiling" >&6
1970
1971 echo "$as_me:1971: checking for executable suffix" >&5
1972 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1973 if { (eval echo "$as_me:1973: \"$ac_link\"") >&5
1974   (eval $ac_link) 2>&5
1975   ac_status=$?
1976   echo "$as_me:1976: \$? = $ac_status" >&5
1977   (exit "$ac_status"); }; then
1978   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1979 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1980 # work properly (i.e., refer to `conftest.exe'), while it won't with
1981 # `rm'.
1982 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1983   case $ac_file in
1984     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1985     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1986           export ac_cv_exeext
1987           break;;
1988     * ) break;;
1989   esac
1990 done
1991 else
1992   { { echo "$as_me:1992: error: cannot compute EXEEXT: cannot compile and link" >&5
1993 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1994    { (exit 1); exit 1; }; }
1995 fi
1996
1997 rm -f "conftest$ac_cv_exeext"
1998 echo "$as_me:1998: result: $ac_cv_exeext" >&5
1999 echo "${ECHO_T}$ac_cv_exeext" >&6
2000
2001 rm -f "conftest.$ac_ext"
2002 EXEEXT=$ac_cv_exeext
2003 ac_exeext=$EXEEXT
2004 echo "$as_me:2004: checking for object suffix" >&5
2005 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2006 if test "${ac_cv_objext+set}" = set; then
2007   echo $ECHO_N "(cached) $ECHO_C" >&6
2008 else
2009   cat >"conftest.$ac_ext" <<_ACEOF
2010 #line 2010 "configure"
2011 #include "confdefs.h"
2012
2013 int
2014 main (void)
2015 {
2016
2017   ;
2018   return 0;
2019 }
2020 _ACEOF
2021 rm -f conftest.o conftest.obj
2022 if { (eval echo "$as_me:2022: \"$ac_compile\"") >&5
2023   (eval $ac_compile) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit "$ac_status"); }; then
2027   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2028   case $ac_file in
2029     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2030     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2031        break;;
2032   esac
2033 done
2034 else
2035   echo "$as_me: failed program was:" >&5
2036 cat "conftest.$ac_ext" >&5
2037 { { echo "$as_me:2037: error: cannot compute OBJEXT: cannot compile" >&5
2038 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2039    { (exit 1); exit 1; }; }
2040 fi
2041
2042 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2043 fi
2044 echo "$as_me:2044: result: $ac_cv_objext" >&5
2045 echo "${ECHO_T}$ac_cv_objext" >&6
2046 OBJEXT=$ac_cv_objext
2047 ac_objext=$OBJEXT
2048 echo "$as_me:2048: checking whether we are using the GNU C compiler" >&5
2049 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2050 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2051   echo $ECHO_N "(cached) $ECHO_C" >&6
2052 else
2053   cat >"conftest.$ac_ext" <<_ACEOF
2054 #line 2054 "configure"
2055 #include "confdefs.h"
2056
2057 int
2058 main (void)
2059 {
2060 #ifndef __GNUC__
2061        choke me
2062 #endif
2063
2064   ;
2065   return 0;
2066 }
2067 _ACEOF
2068 rm -f "conftest.$ac_objext"
2069 if { (eval echo "$as_me:2069: \"$ac_compile\"") >&5
2070   (eval $ac_compile) 2>&5
2071   ac_status=$?
2072   echo "$as_me:2072: \$? = $ac_status" >&5
2073   (exit "$ac_status"); } &&
2074          { ac_try='test -s "conftest.$ac_objext"'
2075   { (eval echo "$as_me:2075: \"$ac_try\"") >&5
2076   (eval $ac_try) 2>&5
2077   ac_status=$?
2078   echo "$as_me:2078: \$? = $ac_status" >&5
2079   (exit "$ac_status"); }; }; then
2080   ac_compiler_gnu=yes
2081 else
2082   echo "$as_me: failed program was:" >&5
2083 cat "conftest.$ac_ext" >&5
2084 ac_compiler_gnu=no
2085 fi
2086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2087 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2088
2089 fi
2090 echo "$as_me:2090: result: $ac_cv_c_compiler_gnu" >&5
2091 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2092 GCC=`test $ac_compiler_gnu = yes && echo yes`
2093 ac_test_CFLAGS=${CFLAGS+set}
2094 ac_save_CFLAGS=$CFLAGS
2095 CFLAGS="-g"
2096 echo "$as_me:2096: checking whether $CC accepts -g" >&5
2097 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2098 if test "${ac_cv_prog_cc_g+set}" = set; then
2099   echo $ECHO_N "(cached) $ECHO_C" >&6
2100 else
2101   cat >"conftest.$ac_ext" <<_ACEOF
2102 #line 2102 "configure"
2103 #include "confdefs.h"
2104
2105 int
2106 main (void)
2107 {
2108
2109   ;
2110   return 0;
2111 }
2112 _ACEOF
2113 rm -f "conftest.$ac_objext"
2114 if { (eval echo "$as_me:2114: \"$ac_compile\"") >&5
2115   (eval $ac_compile) 2>&5
2116   ac_status=$?
2117   echo "$as_me:2117: \$? = $ac_status" >&5
2118   (exit "$ac_status"); } &&
2119          { ac_try='test -s "conftest.$ac_objext"'
2120   { (eval echo "$as_me:2120: \"$ac_try\"") >&5
2121   (eval $ac_try) 2>&5
2122   ac_status=$?
2123   echo "$as_me:2123: \$? = $ac_status" >&5
2124   (exit "$ac_status"); }; }; then
2125   ac_cv_prog_cc_g=yes
2126 else
2127   echo "$as_me: failed program was:" >&5
2128 cat "conftest.$ac_ext" >&5
2129 ac_cv_prog_cc_g=no
2130 fi
2131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2132 fi
2133 echo "$as_me:2133: result: $ac_cv_prog_cc_g" >&5
2134 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2135 if test "$ac_test_CFLAGS" = set; then
2136   CFLAGS=$ac_save_CFLAGS
2137 elif test $ac_cv_prog_cc_g = yes; then
2138   if test "$GCC" = yes; then
2139     CFLAGS="-g -O2"
2140   else
2141     CFLAGS="-g"
2142   fi
2143 else
2144   if test "$GCC" = yes; then
2145     CFLAGS="-O2"
2146   else
2147     CFLAGS=
2148   fi
2149 fi
2150 # Some people use a C++ compiler to compile C.  Since we use `exit',
2151 # in C++ we need to declare it.  In case someone uses the same compiler
2152 # for both compiling C and C++ we need to have the C++ compiler decide
2153 # the declaration of exit, since it's the most demanding environment.
2154 cat >"conftest.$ac_ext" <<_ACEOF
2155 #ifndef __cplusplus
2156   choke me
2157 #endif
2158 _ACEOF
2159 rm -f "conftest.$ac_objext"
2160 if { (eval echo "$as_me:2160: \"$ac_compile\"") >&5
2161   (eval $ac_compile) 2>&5
2162   ac_status=$?
2163   echo "$as_me:2163: \$? = $ac_status" >&5
2164   (exit "$ac_status"); } &&
2165          { ac_try='test -s "conftest.$ac_objext"'
2166   { (eval echo "$as_me:2166: \"$ac_try\"") >&5
2167   (eval $ac_try) 2>&5
2168   ac_status=$?
2169   echo "$as_me:2169: \$? = $ac_status" >&5
2170   (exit "$ac_status"); }; }; then
2171   for ac_declaration in \
2172    ''\
2173    '#include <stdlib.h>' \
2174    'extern "C" void std::exit (int) throw (); using std::exit;' \
2175    'extern "C" void std::exit (int); using std::exit;' \
2176    'extern "C" void exit (int) throw ();' \
2177    'extern "C" void exit (int);' \
2178    'void exit (int);'
2179 do
2180   cat >"conftest.$ac_ext" <<_ACEOF
2181 #line 2181 "configure"
2182 #include "confdefs.h"
2183 #include <stdlib.h>
2184 $ac_declaration
2185 int
2186 main (void)
2187 {
2188 exit (42);
2189   ;
2190   return 0;
2191 }
2192 _ACEOF
2193 rm -f "conftest.$ac_objext"
2194 if { (eval echo "$as_me:2194: \"$ac_compile\"") >&5
2195   (eval $ac_compile) 2>&5
2196   ac_status=$?
2197   echo "$as_me:2197: \$? = $ac_status" >&5
2198   (exit "$ac_status"); } &&
2199          { ac_try='test -s "conftest.$ac_objext"'
2200   { (eval echo "$as_me:2200: \"$ac_try\"") >&5
2201   (eval $ac_try) 2>&5
2202   ac_status=$?
2203   echo "$as_me:2203: \$? = $ac_status" >&5
2204   (exit "$ac_status"); }; }; then
2205   :
2206 else
2207   echo "$as_me: failed program was:" >&5
2208 cat "conftest.$ac_ext" >&5
2209 continue
2210 fi
2211 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2212   cat >"conftest.$ac_ext" <<_ACEOF
2213 #line 2213 "configure"
2214 #include "confdefs.h"
2215 $ac_declaration
2216 int
2217 main (void)
2218 {
2219 exit (42);
2220   ;
2221   return 0;
2222 }
2223 _ACEOF
2224 rm -f "conftest.$ac_objext"
2225 if { (eval echo "$as_me:2225: \"$ac_compile\"") >&5
2226   (eval $ac_compile) 2>&5
2227   ac_status=$?
2228   echo "$as_me:2228: \$? = $ac_status" >&5
2229   (exit "$ac_status"); } &&
2230          { ac_try='test -s "conftest.$ac_objext"'
2231   { (eval echo "$as_me:2231: \"$ac_try\"") >&5
2232   (eval $ac_try) 2>&5
2233   ac_status=$?
2234   echo "$as_me:2234: \$? = $ac_status" >&5
2235   (exit "$ac_status"); }; }; then
2236   break
2237 else
2238   echo "$as_me: failed program was:" >&5
2239 cat "conftest.$ac_ext" >&5
2240 fi
2241 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2242 done
2243 rm -rf conftest*
2244 if test -n "$ac_declaration"; then
2245   echo '#ifdef __cplusplus' >>confdefs.h
2246   echo "$ac_declaration"    >>confdefs.h
2247   echo '#endif'             >>confdefs.h
2248 fi
2249
2250 else
2251   echo "$as_me: failed program was:" >&5
2252 cat "conftest.$ac_ext" >&5
2253 fi
2254 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2255 ac_ext=c
2256 ac_cpp='$CPP $CPPFLAGS'
2257 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2258 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2259 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2260 ac_main_return="return"
2261
2262 GCC_VERSION=none
2263 if test "$GCC" = yes ; then
2264         echo "$as_me:2264: checking version of $CC" >&5
2265 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2266         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.].*//'`"
2267         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2268         echo "$as_me:2268: result: $GCC_VERSION" >&5
2269 echo "${ECHO_T}$GCC_VERSION" >&6
2270 fi
2271
2272 INTEL_COMPILER=no
2273
2274 if test "$GCC" = yes ; then
2275         case "$host_os" in
2276         (linux*|gnu*)
2277                 echo "$as_me:2277: checking if this is really Intel C compiler" >&5
2278 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2279                 cf_save_CFLAGS="$CFLAGS"
2280                 CFLAGS="$CFLAGS -no-gcc"
2281                 cat >"conftest.$ac_ext" <<_ACEOF
2282 #line 2282 "configure"
2283 #include "confdefs.h"
2284
2285 int
2286 main (void)
2287 {
2288
2289 #ifdef __INTEL_COMPILER
2290 #else
2291 make an error
2292 #endif
2293
2294   ;
2295   return 0;
2296 }
2297 _ACEOF
2298 rm -f "conftest.$ac_objext"
2299 if { (eval echo "$as_me:2299: \"$ac_compile\"") >&5
2300   (eval $ac_compile) 2>&5
2301   ac_status=$?
2302   echo "$as_me:2302: \$? = $ac_status" >&5
2303   (exit "$ac_status"); } &&
2304          { ac_try='test -s "conftest.$ac_objext"'
2305   { (eval echo "$as_me:2305: \"$ac_try\"") >&5
2306   (eval $ac_try) 2>&5
2307   ac_status=$?
2308   echo "$as_me:2308: \$? = $ac_status" >&5
2309   (exit "$ac_status"); }; }; then
2310   INTEL_COMPILER=yes
2311 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2312
2313 else
2314   echo "$as_me: failed program was:" >&5
2315 cat "conftest.$ac_ext" >&5
2316 fi
2317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2318                 CFLAGS="$cf_save_CFLAGS"
2319                 echo "$as_me:2319: result: $INTEL_COMPILER" >&5
2320 echo "${ECHO_T}$INTEL_COMPILER" >&6
2321                 ;;
2322         esac
2323 fi
2324
2325 CLANG_COMPILER=no
2326
2327 if test "$GCC" = yes ; then
2328         echo "$as_me:2328: checking if this is really Clang C compiler" >&5
2329 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2330         cf_save_CFLAGS="$CFLAGS"
2331         cat >"conftest.$ac_ext" <<_ACEOF
2332 #line 2332 "configure"
2333 #include "confdefs.h"
2334
2335 int
2336 main (void)
2337 {
2338
2339 #ifdef __clang__
2340 #else
2341 make an error
2342 #endif
2343
2344   ;
2345   return 0;
2346 }
2347 _ACEOF
2348 rm -f "conftest.$ac_objext"
2349 if { (eval echo "$as_me:2349: \"$ac_compile\"") >&5
2350   (eval $ac_compile) 2>&5
2351   ac_status=$?
2352   echo "$as_me:2352: \$? = $ac_status" >&5
2353   (exit "$ac_status"); } &&
2354          { ac_try='test -s "conftest.$ac_objext"'
2355   { (eval echo "$as_me:2355: \"$ac_try\"") >&5
2356   (eval $ac_try) 2>&5
2357   ac_status=$?
2358   echo "$as_me:2358: \$? = $ac_status" >&5
2359   (exit "$ac_status"); }; }; then
2360   CLANG_COMPILER=yes
2361
2362 else
2363   echo "$as_me: failed program was:" >&5
2364 cat "conftest.$ac_ext" >&5
2365 fi
2366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2367         CFLAGS="$cf_save_CFLAGS"
2368         echo "$as_me:2368: result: $CLANG_COMPILER" >&5
2369 echo "${ECHO_T}$CLANG_COMPILER" >&6
2370 fi
2371
2372 CLANG_VERSION=none
2373
2374 if test "x$CLANG_COMPILER" = "xyes" ; then
2375         case "$CC" in
2376         (c[1-9][0-9]|*/c[1-9][0-9])
2377                 { echo "$as_me:2377: WARNING: replacing broken compiler alias $CC" >&5
2378 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2379                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2380                 CC=clang
2381                 ;;
2382         esac
2383
2384         echo "$as_me:2384: checking version of $CC" >&5
2385 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2386         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2387         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2388         echo "$as_me:2388: result: $CLANG_VERSION" >&5
2389 echo "${ECHO_T}$CLANG_VERSION" >&6
2390
2391         for cf_clang_opt in \
2392                 -Qunused-arguments \
2393                 -Wno-error=implicit-function-declaration
2394         do
2395                 echo "$as_me:2395: checking if option $cf_clang_opt works" >&5
2396 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2397                 cf_save_CFLAGS="$CFLAGS"
2398                 CFLAGS="$CFLAGS $cf_clang_opt"
2399                 cat >"conftest.$ac_ext" <<_ACEOF
2400 #line 2400 "configure"
2401 #include "confdefs.h"
2402
2403                         #include <stdio.h>
2404 int
2405 main (void)
2406 {
2407
2408                         printf("hello!\\n");
2409   ;
2410   return 0;
2411 }
2412 _ACEOF
2413 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2414 if { (eval echo "$as_me:2414: \"$ac_link\"") >&5
2415   (eval $ac_link) 2>&5
2416   ac_status=$?
2417   echo "$as_me:2417: \$? = $ac_status" >&5
2418   (exit "$ac_status"); } &&
2419          { ac_try='test -s "conftest$ac_exeext"'
2420   { (eval echo "$as_me:2420: \"$ac_try\"") >&5
2421   (eval $ac_try) 2>&5
2422   ac_status=$?
2423   echo "$as_me:2423: \$? = $ac_status" >&5
2424   (exit "$ac_status"); }; }; then
2425
2426                         cf_clang_optok=yes
2427 else
2428   echo "$as_me: failed program was:" >&5
2429 cat "conftest.$ac_ext" >&5
2430
2431                         cf_clang_optok=no
2432 fi
2433 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2434                 echo "$as_me:2434: result: $cf_clang_optok" >&5
2435 echo "${ECHO_T}$cf_clang_optok" >&6
2436                 CFLAGS="$cf_save_CFLAGS"
2437                 if test "$cf_clang_optok" = yes; then
2438                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2439
2440 echo "${as_me:-configure}:2440: testing adding option $cf_clang_opt ..." 1>&5
2441
2442         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2443         CFLAGS="${CFLAGS}$cf_clang_opt"
2444
2445                 fi
2446         done
2447 fi
2448
2449 echo "$as_me:2449: checking for $CC option to accept ANSI C" >&5
2450 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2451 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2452   echo $ECHO_N "(cached) $ECHO_C" >&6
2453 else
2454   ac_cv_prog_cc_stdc=no
2455 ac_save_CC=$CC
2456 cat >"conftest.$ac_ext" <<_ACEOF
2457 #line 2457 "configure"
2458 #include "confdefs.h"
2459 #include <stdarg.h>
2460 #include <stdio.h>
2461 #include <sys/types.h>
2462 #include <sys/stat.h>
2463 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2464 struct buf { int x; };
2465 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2466 static char *e (p, i)
2467      char **p;
2468      int i;
2469 {
2470   return p[i];
2471 }
2472 static char *f (char * (*g) (char **, int), char **p, ...)
2473 {
2474   char *s;
2475   va_list v;
2476   va_start (v,p);
2477   s = g (p, va_arg (v,int));
2478   va_end (v);
2479   return s;
2480 }
2481 int test (int i, double x);
2482 struct s1 {int (*f) (int a);};
2483 struct s2 {int (*f) (double a);};
2484 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2485 int argc;
2486 char **argv;
2487 int
2488 main (void)
2489 {
2490 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2491   ;
2492   return 0;
2493 }
2494 _ACEOF
2495 # Don't try gcc -ansi; that turns off useful extensions and
2496 # breaks some systems' header files.
2497 # AIX                   -qlanglvl=ansi
2498 # Ultrix and OSF/1      -std1
2499 # HP-UX 10.20 and later -Ae
2500 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2501 # SVR4                  -Xc -D__EXTENSIONS__
2502 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2503 do
2504   CC="$ac_save_CC $ac_arg"
2505   rm -f "conftest.$ac_objext"
2506 if { (eval echo "$as_me:2506: \"$ac_compile\"") >&5
2507   (eval $ac_compile) 2>&5
2508   ac_status=$?
2509   echo "$as_me:2509: \$? = $ac_status" >&5
2510   (exit "$ac_status"); } &&
2511          { ac_try='test -s "conftest.$ac_objext"'
2512   { (eval echo "$as_me:2512: \"$ac_try\"") >&5
2513   (eval $ac_try) 2>&5
2514   ac_status=$?
2515   echo "$as_me:2515: \$? = $ac_status" >&5
2516   (exit "$ac_status"); }; }; then
2517   ac_cv_prog_cc_stdc=$ac_arg
2518 break
2519 else
2520   echo "$as_me: failed program was:" >&5
2521 cat "conftest.$ac_ext" >&5
2522 fi
2523 rm -f "conftest.$ac_objext"
2524 done
2525 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2526 CC=$ac_save_CC
2527
2528 fi
2529
2530 case "x$ac_cv_prog_cc_stdc" in
2531   x|xno)
2532     echo "$as_me:2532: result: none needed" >&5
2533 echo "${ECHO_T}none needed" >&6 ;;
2534   *)
2535     echo "$as_me:2535: result: $ac_cv_prog_cc_stdc" >&5
2536 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2537     CC="$CC $ac_cv_prog_cc_stdc" ;;
2538 esac
2539
2540 # This should have been defined by AC_PROG_CC
2541 : "${CC:=cc}"
2542
2543 echo "$as_me:2543: checking \$CFLAGS variable" >&5
2544 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2545 case "x$CFLAGS" in
2546 (*-[IUD]*)
2547         echo "$as_me:2547: result: broken" >&5
2548 echo "${ECHO_T}broken" >&6
2549         { echo "$as_me:2549: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2550 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2551         cf_flags="$CFLAGS"
2552         CFLAGS=
2553         for cf_arg in $cf_flags
2554         do
2555
2556 cf_fix_cppflags=no
2557 cf_new_cflags=
2558 cf_new_cppflags=
2559 cf_new_extra_cppflags=
2560
2561 for cf_add_cflags in $cf_arg
2562 do
2563 case "$cf_fix_cppflags" in
2564 (no)
2565         case "$cf_add_cflags" in
2566         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2567                 case "$cf_add_cflags" in
2568                 (-D*)
2569                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2570
2571                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2572                                 && test -z "${cf_tst_cflags}" \
2573                                 && cf_fix_cppflags=yes
2574
2575                         if test "$cf_fix_cppflags" = yes ; then
2576
2577         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2578         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2579
2580                                 continue
2581                         elif test "${cf_tst_cflags}" = "\"'" ; then
2582
2583         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2584         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2585
2586                                 continue
2587                         fi
2588                         ;;
2589                 esac
2590                 case "$CPPFLAGS" in
2591                 (*$cf_add_cflags)
2592                         ;;
2593                 (*)
2594                         case "$cf_add_cflags" in
2595                         (-D*)
2596                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2597
2598 CPPFLAGS=`echo "$CPPFLAGS" | \
2599         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2600                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2601
2602                                 ;;
2603                         esac
2604
2605         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2606         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2607
2608                         ;;
2609                 esac
2610                 ;;
2611         (*)
2612
2613         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2614         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2615
2616                 ;;
2617         esac
2618         ;;
2619 (yes)
2620
2621         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2622         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2623
2624         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2625
2626         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2627                 && test -z "${cf_tst_cflags}" \
2628                 && cf_fix_cppflags=no
2629         ;;
2630 esac
2631 done
2632
2633 if test -n "$cf_new_cflags" ; then
2634
2635         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2636         CFLAGS="${CFLAGS}$cf_new_cflags"
2637
2638 fi
2639
2640 if test -n "$cf_new_cppflags" ; then
2641
2642         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2643         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2644
2645 fi
2646
2647 if test -n "$cf_new_extra_cppflags" ; then
2648
2649         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2650         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2651
2652 fi
2653
2654         done
2655         ;;
2656 (*)
2657         echo "$as_me:2657: result: ok" >&5
2658 echo "${ECHO_T}ok" >&6
2659         ;;
2660 esac
2661
2662 echo "$as_me:2662: checking \$CC variable" >&5
2663 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2664 case "$CC" in
2665 (*[\ \  ]-*)
2666         echo "$as_me:2666: result: broken" >&5
2667 echo "${ECHO_T}broken" >&6
2668         { echo "$as_me:2668: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2669 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2670         # humor him...
2671         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2672         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2673         CC="$cf_prog"
2674         for cf_arg in $cf_flags
2675         do
2676                 case "x$cf_arg" in
2677                 (x-[IUDfgOW]*)
2678
2679 cf_fix_cppflags=no
2680 cf_new_cflags=
2681 cf_new_cppflags=
2682 cf_new_extra_cppflags=
2683
2684 for cf_add_cflags in $cf_arg
2685 do
2686 case "$cf_fix_cppflags" in
2687 (no)
2688         case "$cf_add_cflags" in
2689         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2690                 case "$cf_add_cflags" in
2691                 (-D*)
2692                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2693
2694                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2695                                 && test -z "${cf_tst_cflags}" \
2696                                 && cf_fix_cppflags=yes
2697
2698                         if test "$cf_fix_cppflags" = yes ; then
2699
2700         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2701         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2702
2703                                 continue
2704                         elif test "${cf_tst_cflags}" = "\"'" ; then
2705
2706         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2707         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2708
2709                                 continue
2710                         fi
2711                         ;;
2712                 esac
2713                 case "$CPPFLAGS" in
2714                 (*$cf_add_cflags)
2715                         ;;
2716                 (*)
2717                         case "$cf_add_cflags" in
2718                         (-D*)
2719                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2720
2721 CPPFLAGS=`echo "$CPPFLAGS" | \
2722         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2723                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2724
2725                                 ;;
2726                         esac
2727
2728         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2729         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2730
2731                         ;;
2732                 esac
2733                 ;;
2734         (*)
2735
2736         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2737         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2738
2739                 ;;
2740         esac
2741         ;;
2742 (yes)
2743
2744         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2745         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2746
2747         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2748
2749         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2750                 && test -z "${cf_tst_cflags}" \
2751                 && cf_fix_cppflags=no
2752         ;;
2753 esac
2754 done
2755
2756 if test -n "$cf_new_cflags" ; then
2757
2758         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2759         CFLAGS="${CFLAGS}$cf_new_cflags"
2760
2761 fi
2762
2763 if test -n "$cf_new_cppflags" ; then
2764
2765         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2766         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2767
2768 fi
2769
2770 if test -n "$cf_new_extra_cppflags" ; then
2771
2772         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2773         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2774
2775 fi
2776
2777                         ;;
2778                 (*)
2779                         CC="$CC $cf_arg"
2780                         ;;
2781                 esac
2782         done
2783         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2784
2785 echo "${as_me:-configure}:2785: testing resulting CC: '$CC' ..." 1>&5
2786
2787         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2788
2789 echo "${as_me:-configure}:2789: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2790
2791         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2792
2793 echo "${as_me:-configure}:2793: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2794
2795         ;;
2796 (*)
2797         echo "$as_me:2797: result: ok" >&5
2798 echo "${ECHO_T}ok" >&6
2799         ;;
2800 esac
2801
2802 ac_ext=c
2803 ac_cpp='$CPP $CPPFLAGS'
2804 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2805 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2806 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2807 ac_main_return="return"
2808 echo "$as_me:2808: checking how to run the C preprocessor" >&5
2809 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2810 # On Suns, sometimes $CPP names a directory.
2811 if test -n "$CPP" && test -d "$CPP"; then
2812   CPP=
2813 fi
2814 if test -z "$CPP"; then
2815   if test "${ac_cv_prog_CPP+set}" = set; then
2816   echo $ECHO_N "(cached) $ECHO_C" >&6
2817 else
2818       # Double quotes because CPP needs to be expanded
2819     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2820     do
2821       ac_preproc_ok=false
2822 for ac_c_preproc_warn_flag in '' yes
2823 do
2824   # Use a header file that comes with gcc, so configuring glibc
2825   # with a fresh cross-compiler works.
2826   # On the NeXT, cc -E runs the code through the compiler's parser,
2827   # not just through cpp. "Syntax error" is here to catch this case.
2828   cat >"conftest.$ac_ext" <<_ACEOF
2829 #line 2829 "configure"
2830 #include "confdefs.h"
2831 #include <assert.h>
2832                      Syntax error
2833 _ACEOF
2834 if { (eval echo "$as_me:2834: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2835   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2836   ac_status=$?
2837   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2838   rm -f conftest.er1
2839   cat conftest.err >&5
2840   echo "$as_me:2840: \$? = $ac_status" >&5
2841   (exit "$ac_status"); } >/dev/null; then
2842   if test -s conftest.err; then
2843     ac_cpp_err=$ac_c_preproc_warn_flag
2844   else
2845     ac_cpp_err=
2846   fi
2847 else
2848   ac_cpp_err=yes
2849 fi
2850 if test -z "$ac_cpp_err"; then
2851   :
2852 else
2853   echo "$as_me: failed program was:" >&5
2854   cat "conftest.$ac_ext" >&5
2855   # Broken: fails on valid input.
2856 continue
2857 fi
2858 rm -f conftest.err "conftest.$ac_ext"
2859
2860   # OK, works on sane cases.  Now check whether non-existent headers
2861   # can be detected and how.
2862   cat >"conftest.$ac_ext" <<_ACEOF
2863 #line 2863 "configure"
2864 #include "confdefs.h"
2865 #include <ac_nonexistent.h>
2866 _ACEOF
2867 if { (eval echo "$as_me:2867: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2868   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2869   ac_status=$?
2870   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2871   rm -f conftest.er1
2872   cat conftest.err >&5
2873   echo "$as_me:2873: \$? = $ac_status" >&5
2874   (exit "$ac_status"); } >/dev/null; then
2875   if test -s conftest.err; then
2876     ac_cpp_err=$ac_c_preproc_warn_flag
2877   else
2878     ac_cpp_err=
2879   fi
2880 else
2881   ac_cpp_err=yes
2882 fi
2883 if test -z "$ac_cpp_err"; then
2884   # Broken: success on invalid input.
2885 continue
2886 else
2887   echo "$as_me: failed program was:" >&5
2888   cat "conftest.$ac_ext" >&5
2889   # Passes both tests.
2890 ac_preproc_ok=:
2891 break
2892 fi
2893 rm -f conftest.err "conftest.$ac_ext"
2894
2895 done
2896 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2897 rm -f conftest.err "conftest.$ac_ext"
2898 if $ac_preproc_ok; then
2899   break
2900 fi
2901
2902     done
2903     ac_cv_prog_CPP=$CPP
2904
2905 fi
2906   CPP=$ac_cv_prog_CPP
2907 else
2908   ac_cv_prog_CPP=$CPP
2909 fi
2910 echo "$as_me:2910: result: $CPP" >&5
2911 echo "${ECHO_T}$CPP" >&6
2912 ac_preproc_ok=false
2913 for ac_c_preproc_warn_flag in '' yes
2914 do
2915   # Use a header file that comes with gcc, so configuring glibc
2916   # with a fresh cross-compiler works.
2917   # On the NeXT, cc -E runs the code through the compiler's parser,
2918   # not just through cpp. "Syntax error" is here to catch this case.
2919   cat >"conftest.$ac_ext" <<_ACEOF
2920 #line 2920 "configure"
2921 #include "confdefs.h"
2922 #include <assert.h>
2923                      Syntax error
2924 _ACEOF
2925 if { (eval echo "$as_me:2925: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2926   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2927   ac_status=$?
2928   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2929   rm -f conftest.er1
2930   cat conftest.err >&5
2931   echo "$as_me:2931: \$? = $ac_status" >&5
2932   (exit "$ac_status"); } >/dev/null; then
2933   if test -s conftest.err; then
2934     ac_cpp_err=$ac_c_preproc_warn_flag
2935   else
2936     ac_cpp_err=
2937   fi
2938 else
2939   ac_cpp_err=yes
2940 fi
2941 if test -z "$ac_cpp_err"; then
2942   :
2943 else
2944   echo "$as_me: failed program was:" >&5
2945   cat "conftest.$ac_ext" >&5
2946   # Broken: fails on valid input.
2947 continue
2948 fi
2949 rm -f conftest.err "conftest.$ac_ext"
2950
2951   # OK, works on sane cases.  Now check whether non-existent headers
2952   # can be detected and how.
2953   cat >"conftest.$ac_ext" <<_ACEOF
2954 #line 2954 "configure"
2955 #include "confdefs.h"
2956 #include <ac_nonexistent.h>
2957 _ACEOF
2958 if { (eval echo "$as_me:2958: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2959   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2960   ac_status=$?
2961   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2962   rm -f conftest.er1
2963   cat conftest.err >&5
2964   echo "$as_me:2964: \$? = $ac_status" >&5
2965   (exit "$ac_status"); } >/dev/null; then
2966   if test -s conftest.err; then
2967     ac_cpp_err=$ac_c_preproc_warn_flag
2968   else
2969     ac_cpp_err=
2970   fi
2971 else
2972   ac_cpp_err=yes
2973 fi
2974 if test -z "$ac_cpp_err"; then
2975   # Broken: success on invalid input.
2976 continue
2977 else
2978   echo "$as_me: failed program was:" >&5
2979   cat "conftest.$ac_ext" >&5
2980   # Passes both tests.
2981 ac_preproc_ok=:
2982 break
2983 fi
2984 rm -f conftest.err "conftest.$ac_ext"
2985
2986 done
2987 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2988 rm -f conftest.err "conftest.$ac_ext"
2989 if $ac_preproc_ok; then
2990   :
2991 else
2992   { { echo "$as_me:2992: error: C preprocessor \"$CPP\" fails sanity check" >&5
2993 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2994    { (exit 1); exit 1; }; }
2995 fi
2996
2997 ac_ext=c
2998 ac_cpp='$CPP $CPPFLAGS'
2999 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3000 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3001 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3002 ac_main_return="return"
3003
3004 if test $ac_cv_c_compiler_gnu = yes; then
3005     echo "$as_me:3005: checking whether $CC needs -traditional" >&5
3006 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3007 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3008   echo $ECHO_N "(cached) $ECHO_C" >&6
3009 else
3010     ac_pattern="Autoconf.*'x'"
3011   cat >"conftest.$ac_ext" <<_ACEOF
3012 #line 3012 "configure"
3013 #include "confdefs.h"
3014 #include <sgtty.h>
3015 int Autoconf = TIOCGETP;
3016 _ACEOF
3017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3018   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3019   ac_cv_prog_gcc_traditional=yes
3020 else
3021   ac_cv_prog_gcc_traditional=no
3022 fi
3023 rm -rf conftest*
3024
3025   if test $ac_cv_prog_gcc_traditional = no; then
3026     cat >"conftest.$ac_ext" <<_ACEOF
3027 #line 3027 "configure"
3028 #include "confdefs.h"
3029 #include <termio.h>
3030 int Autoconf = TCGETA;
3031 _ACEOF
3032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3033   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3034   ac_cv_prog_gcc_traditional=yes
3035 fi
3036 rm -rf conftest*
3037
3038   fi
3039 fi
3040 echo "$as_me:3040: result: $ac_cv_prog_gcc_traditional" >&5
3041 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3042   if test $ac_cv_prog_gcc_traditional = yes; then
3043     CC="$CC -traditional"
3044   fi
3045 fi
3046
3047 echo "$as_me:3047: checking whether $CC understands -c and -o together" >&5
3048 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3049 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3050   echo $ECHO_N "(cached) $ECHO_C" >&6
3051 else
3052
3053 cat > conftest.$ac_ext <<CF_EOF
3054 int main(void)
3055 {
3056         ${cf_cv_main_return:-return}(0);
3057 }
3058 CF_EOF
3059 # We do the test twice because some compilers refuse to overwrite an
3060 # existing .o file with -o, though they will create one.
3061 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3062 if { (eval echo "$as_me:3062: \"$ac_try\"") >&5
3063   (eval $ac_try) 2>&5
3064   ac_status=$?
3065   echo "$as_me:3065: \$? = $ac_status" >&5
3066   (exit "$ac_status"); } &&
3067   test -f conftest2.$ac_objext && { (eval echo "$as_me:3067: \"$ac_try\"") >&5
3068   (eval $ac_try) 2>&5
3069   ac_status=$?
3070   echo "$as_me:3070: \$? = $ac_status" >&5
3071   (exit "$ac_status"); };
3072 then
3073   eval cf_cv_prog_CC_c_o=yes
3074 else
3075   eval cf_cv_prog_CC_c_o=no
3076 fi
3077 rm -rf ./conftest*
3078
3079 fi
3080 if test "$cf_cv_prog_CC_c_o" = yes; then
3081   echo "$as_me:3081: result: yes" >&5
3082 echo "${ECHO_T}yes" >&6
3083 else
3084   echo "$as_me:3084: result: no" >&5
3085 echo "${ECHO_T}no" >&6
3086 fi
3087
3088 if test "$cross_compiling" = yes ; then
3089         LDCONFIG=:
3090 else
3091         case "$cf_cv_system_name" in
3092         (dragonfly*|mirbsd*|freebsd*)
3093                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3094                 ;;
3095         (*) LDPATH=$PATH:/sbin:/usr/sbin
3096                 # Extract the first word of "ldconfig", so it can be a program name with args.
3097 set dummy ldconfig; ac_word=$2
3098 echo "$as_me:3098: checking for $ac_word" >&5
3099 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3100 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3101   echo $ECHO_N "(cached) $ECHO_C" >&6
3102 else
3103   case $LDCONFIG in
3104   [\\/]* | ?:[\\/]*)
3105   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3106   ;;
3107   *)
3108   ac_save_IFS=$IFS; IFS=$ac_path_separator
3109 ac_dummy="$LDPATH"
3110 for ac_dir in $ac_dummy; do
3111   IFS=$ac_save_IFS
3112   test -z "$ac_dir" && ac_dir=.
3113   if $as_executable_p "$ac_dir/$ac_word"; then
3114    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3115    echo "$as_me:3115: found $ac_dir/$ac_word" >&5
3116    break
3117 fi
3118 done
3119
3120   ;;
3121 esac
3122 fi
3123 LDCONFIG=$ac_cv_path_LDCONFIG
3124
3125 if test -n "$LDCONFIG"; then
3126   echo "$as_me:3126: result: $LDCONFIG" >&5
3127 echo "${ECHO_T}$LDCONFIG" >&6
3128 else
3129   echo "$as_me:3129: result: no" >&5
3130 echo "${ECHO_T}no" >&6
3131 fi
3132
3133                 ;;
3134         esac
3135 fi
3136
3137 echo "$as_me:3137: checking if you want to ensure bool is consistent with C++" >&5
3138 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3139
3140 # Check whether --with-cxx or --without-cxx was given.
3141 if test "${with_cxx+set}" = set; then
3142   withval="$with_cxx"
3143   cf_with_cxx=$withval
3144 else
3145   cf_with_cxx=yes
3146 fi;
3147 echo "$as_me:3147: result: $cf_with_cxx" >&5
3148 echo "${ECHO_T}$cf_with_cxx" >&6
3149 if test "X$cf_with_cxx" = Xno ; then
3150         CXX=""
3151         GXX=""
3152 else
3153         # with autoconf 2.13, we can change the error to a warning:
3154                 ac_ext=cc
3155 ac_cpp='$CXXCPP $CPPFLAGS'
3156 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3157 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3158 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3159 ac_main_return="return"
3160 if test -n "$ac_tool_prefix"; then
3161   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3162   do
3163     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3164 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3165 echo "$as_me:3165: checking for $ac_word" >&5
3166 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3167 if test "${ac_cv_prog_CXX+set}" = set; then
3168   echo $ECHO_N "(cached) $ECHO_C" >&6
3169 else
3170   if test -n "$CXX"; then
3171   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3172 else
3173   ac_save_IFS=$IFS; IFS=$ac_path_separator
3174 ac_dummy="$PATH"
3175 for ac_dir in $ac_dummy; do
3176   IFS=$ac_save_IFS
3177   test -z "$ac_dir" && ac_dir=.
3178   $as_executable_p "$ac_dir/$ac_word" || continue
3179 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3180 echo "$as_me:3180: found $ac_dir/$ac_word" >&5
3181 break
3182 done
3183
3184 fi
3185 fi
3186 CXX=$ac_cv_prog_CXX
3187 if test -n "$CXX"; then
3188   echo "$as_me:3188: result: $CXX" >&5
3189 echo "${ECHO_T}$CXX" >&6
3190 else
3191   echo "$as_me:3191: result: no" >&5
3192 echo "${ECHO_T}no" >&6
3193 fi
3194
3195     test -n "$CXX" && break
3196   done
3197 fi
3198 if test -z "$CXX"; then
3199   ac_ct_CXX=$CXX
3200   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3201 do
3202   # Extract the first word of "$ac_prog", so it can be a program name with args.
3203 set dummy $ac_prog; ac_word=$2
3204 echo "$as_me:3204: checking for $ac_word" >&5
3205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3206 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3207   echo $ECHO_N "(cached) $ECHO_C" >&6
3208 else
3209   if test -n "$ac_ct_CXX"; then
3210   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3211 else
3212   ac_save_IFS=$IFS; IFS=$ac_path_separator
3213 ac_dummy="$PATH"
3214 for ac_dir in $ac_dummy; do
3215   IFS=$ac_save_IFS
3216   test -z "$ac_dir" && ac_dir=.
3217   $as_executable_p "$ac_dir/$ac_word" || continue
3218 ac_cv_prog_ac_ct_CXX="$ac_prog"
3219 echo "$as_me:3219: found $ac_dir/$ac_word" >&5
3220 break
3221 done
3222
3223 fi
3224 fi
3225 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3226 if test -n "$ac_ct_CXX"; then
3227   echo "$as_me:3227: result: $ac_ct_CXX" >&5
3228 echo "${ECHO_T}$ac_ct_CXX" >&6
3229 else
3230   echo "$as_me:3230: result: no" >&5
3231 echo "${ECHO_T}no" >&6
3232 fi
3233
3234   test -n "$ac_ct_CXX" && break
3235 done
3236 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3237
3238   CXX=$ac_ct_CXX
3239 fi
3240
3241 # Provide some information about the compiler.
3242 echo "$as_me:3242:" \
3243      "checking for C++ compiler version" >&5
3244 ac_compiler=`set X $ac_compile; echo $2`
3245 { (eval echo "$as_me:3245: \"$ac_compiler --version </dev/null >&5\"") >&5
3246   (eval $ac_compiler --version </dev/null >&5) 2>&5
3247   ac_status=$?
3248   echo "$as_me:3248: \$? = $ac_status" >&5
3249   (exit "$ac_status"); }
3250 { (eval echo "$as_me:3250: \"$ac_compiler -v </dev/null >&5\"") >&5
3251   (eval $ac_compiler -v </dev/null >&5) 2>&5
3252   ac_status=$?
3253   echo "$as_me:3253: \$? = $ac_status" >&5
3254   (exit "$ac_status"); }
3255 { (eval echo "$as_me:3255: \"$ac_compiler -V </dev/null >&5\"") >&5
3256   (eval $ac_compiler -V </dev/null >&5) 2>&5
3257   ac_status=$?
3258   echo "$as_me:3258: \$? = $ac_status" >&5
3259   (exit "$ac_status"); }
3260
3261 echo "$as_me:3261: checking whether we are using the GNU C++ compiler" >&5
3262 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3263 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3264   echo $ECHO_N "(cached) $ECHO_C" >&6
3265 else
3266   cat >"conftest.$ac_ext" <<_ACEOF
3267 #line 3267 "configure"
3268 #include "confdefs.h"
3269
3270 int
3271 main (void)
3272 {
3273 #ifndef __GNUC__
3274        choke me
3275 #endif
3276
3277   ;
3278   return 0;
3279 }
3280 _ACEOF
3281 rm -f "conftest.$ac_objext"
3282 if { (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   ac_compiler_gnu=yes
3294 else
3295   echo "$as_me: failed program was:" >&5
3296 cat "conftest.$ac_ext" >&5
3297 ac_compiler_gnu=no
3298 fi
3299 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3300 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3301
3302 fi
3303 echo "$as_me:3303: result: $ac_cv_cxx_compiler_gnu" >&5
3304 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3305 GXX=`test $ac_compiler_gnu = yes && echo yes`
3306 ac_test_CXXFLAGS=${CXXFLAGS+set}
3307 ac_save_CXXFLAGS=$CXXFLAGS
3308 CXXFLAGS="-g"
3309 echo "$as_me:3309: checking whether $CXX accepts -g" >&5
3310 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3311 if test "${ac_cv_prog_cxx_g+set}" = set; then
3312   echo $ECHO_N "(cached) $ECHO_C" >&6
3313 else
3314   cat >"conftest.$ac_ext" <<_ACEOF
3315 #line 3315 "configure"
3316 #include "confdefs.h"
3317
3318 int
3319 main (void)
3320 {
3321
3322   ;
3323   return 0;
3324 }
3325 _ACEOF
3326 rm -f "conftest.$ac_objext"
3327 if { (eval echo "$as_me:3327: \"$ac_compile\"") >&5
3328   (eval $ac_compile) 2>&5
3329   ac_status=$?
3330   echo "$as_me:3330: \$? = $ac_status" >&5
3331   (exit "$ac_status"); } &&
3332          { ac_try='test -s "conftest.$ac_objext"'
3333   { (eval echo "$as_me:3333: \"$ac_try\"") >&5
3334   (eval $ac_try) 2>&5
3335   ac_status=$?
3336   echo "$as_me:3336: \$? = $ac_status" >&5
3337   (exit "$ac_status"); }; }; then
3338   ac_cv_prog_cxx_g=yes
3339 else
3340   echo "$as_me: failed program was:" >&5
3341 cat "conftest.$ac_ext" >&5
3342 ac_cv_prog_cxx_g=no
3343 fi
3344 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3345 fi
3346 echo "$as_me:3346: result: $ac_cv_prog_cxx_g" >&5
3347 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3348 if test "$ac_test_CXXFLAGS" = set; then
3349   CXXFLAGS=$ac_save_CXXFLAGS
3350 elif test $ac_cv_prog_cxx_g = yes; then
3351   if test "$GXX" = yes; then
3352     CXXFLAGS="-g -O2"
3353   else
3354     CXXFLAGS="-g"
3355   fi
3356 else
3357   if test "$GXX" = yes; then
3358     CXXFLAGS="-O2"
3359   else
3360     CXXFLAGS=
3361   fi
3362 fi
3363 for ac_declaration in \
3364    ''\
3365    '#include <stdlib.h>' \
3366    'extern "C" void std::exit (int) throw (); using std::exit;' \
3367    'extern "C" void std::exit (int); using std::exit;' \
3368    'extern "C" void exit (int) throw ();' \
3369    'extern "C" void exit (int);' \
3370    'void exit (int);'
3371 do
3372   cat >"conftest.$ac_ext" <<_ACEOF
3373 #line 3373 "configure"
3374 #include "confdefs.h"
3375 #include <stdlib.h>
3376 $ac_declaration
3377 int
3378 main (void)
3379 {
3380 exit (42);
3381   ;
3382   return 0;
3383 }
3384 _ACEOF
3385 rm -f "conftest.$ac_objext"
3386 if { (eval echo "$as_me:3386: \"$ac_compile\"") >&5
3387   (eval $ac_compile) 2>&5
3388   ac_status=$?
3389   echo "$as_me:3389: \$? = $ac_status" >&5
3390   (exit "$ac_status"); } &&
3391          { ac_try='test -s "conftest.$ac_objext"'
3392   { (eval echo "$as_me:3392: \"$ac_try\"") >&5
3393   (eval $ac_try) 2>&5
3394   ac_status=$?
3395   echo "$as_me:3395: \$? = $ac_status" >&5
3396   (exit "$ac_status"); }; }; then
3397   :
3398 else
3399   echo "$as_me: failed program was:" >&5
3400 cat "conftest.$ac_ext" >&5
3401 continue
3402 fi
3403 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3404   cat >"conftest.$ac_ext" <<_ACEOF
3405 #line 3405 "configure"
3406 #include "confdefs.h"
3407 $ac_declaration
3408 int
3409 main (void)
3410 {
3411 exit (42);
3412   ;
3413   return 0;
3414 }
3415 _ACEOF
3416 rm -f "conftest.$ac_objext"
3417 if { (eval echo "$as_me:3417: \"$ac_compile\"") >&5
3418   (eval $ac_compile) 2>&5
3419   ac_status=$?
3420   echo "$as_me:3420: \$? = $ac_status" >&5
3421   (exit "$ac_status"); } &&
3422          { ac_try='test -s "conftest.$ac_objext"'
3423   { (eval echo "$as_me:3423: \"$ac_try\"") >&5
3424   (eval $ac_try) 2>&5
3425   ac_status=$?
3426   echo "$as_me:3426: \$? = $ac_status" >&5
3427   (exit "$ac_status"); }; }; then
3428   break
3429 else
3430   echo "$as_me: failed program was:" >&5
3431 cat "conftest.$ac_ext" >&5
3432 fi
3433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3434 done
3435 rm -rf conftest*
3436 if test -n "$ac_declaration"; then
3437   echo '#ifdef __cplusplus' >>confdefs.h
3438   echo "$ac_declaration"    >>confdefs.h
3439   echo '#endif'             >>confdefs.h
3440 fi
3441
3442 ac_ext=c
3443 ac_cpp='$CPP $CPPFLAGS'
3444 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3445 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3446 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3447 ac_main_return="return"
3448
3449         ac_ext=cc
3450 ac_cpp='$CXXCPP $CPPFLAGS'
3451 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3452 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3453 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3454 ac_main_return="return"
3455
3456         if test "x$cf_with_cxx" != xno
3457         then
3458                 # Several of the C++ configurations do not work, particularly when
3459                 # cross-compiling (20140913 -TD)
3460                 echo "$as_me:3460: checking if $CXX works" >&5
3461 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3462
3463                 save_CPPFLAGS="$CPPFLAGS"
3464                 eval cf_includedir=${includedir}
3465                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3466
3467 cat >"conftest.$ac_ext" <<_ACEOF
3468 #line 3468 "configure"
3469 #include "confdefs.h"
3470
3471 #include <stdlib.h>
3472 #include <stdio.h>
3473
3474 int
3475 main (void)
3476 {
3477
3478                 printf("Hello world!\n")
3479
3480   ;
3481   return 0;
3482 }
3483 _ACEOF
3484 rm -f "conftest.$ac_objext"
3485 if { (eval echo "$as_me:3485: \"$ac_compile\"") >&5
3486   (eval $ac_compile) 2>&5
3487   ac_status=$?
3488   echo "$as_me:3488: \$? = $ac_status" >&5
3489   (exit "$ac_status"); } &&
3490          { ac_try='test -s "conftest.$ac_objext"'
3491   { (eval echo "$as_me:3491: \"$ac_try\"") >&5
3492   (eval $ac_try) 2>&5
3493   ac_status=$?
3494   echo "$as_me:3494: \$? = $ac_status" >&5
3495   (exit "$ac_status"); }; }; then
3496   cf_cxx_works=yes
3497 else
3498   echo "$as_me: failed program was:" >&5
3499 cat "conftest.$ac_ext" >&5
3500 cf_cxx_works=no
3501 fi
3502 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3503                 CPPFLAGS="$save_CPPFLAGS"
3504
3505                 echo "$as_me:3505: result: $cf_cxx_works" >&5
3506 echo "${ECHO_T}$cf_cxx_works" >&6
3507                 if test "x$cf_cxx_works" = xno
3508                 then
3509                         { echo "$as_me:3509: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3510 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3511                         cf_with_cxx=no; CXX=""; GXX="";
3512                 fi
3513         fi
3514         ac_ext=c
3515 ac_cpp='$CPP $CPPFLAGS'
3516 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3517 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3518 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3519 ac_main_return="return"
3520
3521         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3522         if test "$CXX" = "g++" ; then
3523                 # Extract the first word of "g++", so it can be a program name with args.
3524 set dummy g++; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_path_CXX+set}" = set; then
3528   echo $ECHO_N "(cached) $ECHO_C" >&6
3529 else
3530   case $CXX in
3531   [\\/]* | ?:[\\/]*)
3532   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3533   ;;
3534   *)
3535   ac_save_IFS=$IFS; IFS=$ac_path_separator
3536 ac_dummy="$PATH"
3537 for ac_dir in $ac_dummy; do
3538   IFS=$ac_save_IFS
3539   test -z "$ac_dir" && ac_dir=.
3540   if $as_executable_p "$ac_dir/$ac_word"; then
3541    ac_cv_path_CXX="$ac_dir/$ac_word"
3542    echo "$as_me:3542: found $ac_dir/$ac_word" >&5
3543    break
3544 fi
3545 done
3546
3547   ;;
3548 esac
3549 fi
3550 CXX=$ac_cv_path_CXX
3551
3552 if test -n "$CXX"; then
3553   echo "$as_me:3553: result: $CXX" >&5
3554 echo "${ECHO_T}$CXX" >&6
3555 else
3556   echo "$as_me:3556: result: no" >&5
3557 echo "${ECHO_T}no" >&6
3558 fi
3559
3560         fi
3561         case "x$CXX" in
3562         (x|xg++)
3563                 { echo "$as_me:3563: WARNING: You don't have any C++ compiler, too bad" >&5
3564 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3565                 cf_with_cxx=no; CXX=""; GXX="";
3566                 ;;
3567         esac
3568 fi
3569
3570 GXX_VERSION=none
3571 if test "$GXX" = yes; then
3572         echo "$as_me:3572: checking version of ${CXX:-g++}" >&5
3573 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3574         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3575         if test -z "$GXX_VERSION"
3576         then
3577                 GXX_VERSION=unknown
3578                 GXX=no
3579         fi
3580         echo "$as_me:3580: result: $GXX_VERSION" >&5
3581 echo "${ECHO_T}$GXX_VERSION" >&6
3582 fi
3583
3584 case "$GXX_VERSION" in
3585 ([1-9][0-9].*)
3586         ;;
3587 (1.*|2.[0-6]*)
3588         { echo "$as_me:3588: WARNING: templates do not work" >&5
3589 echo "$as_me: WARNING: templates do not work" >&2;}
3590         ;;
3591 esac
3592
3593 echo "$as_me:3593: checking if you want to build C++ binding and demo" >&5
3594 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3595
3596 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3597 if test "${with_cxx_binding+set}" = set; then
3598   withval="$with_cxx_binding"
3599   cf_with_cxx_binding=$withval
3600 else
3601   cf_with_cxx_binding=$cf_with_cxx
3602 fi;
3603 echo "$as_me:3603: result: $cf_with_cxx_binding" >&5
3604 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3605
3606 echo "$as_me:3606: checking if you want to build with Ada" >&5
3607 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3608 echo "$as_me:3608: result: $cf_with_ada" >&5
3609 echo "${ECHO_T}$cf_with_ada" >&6
3610
3611 echo "$as_me:3611: checking if you want to install terminal database" >&5
3612 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3613
3614 # Check whether --enable-db-install or --disable-db-install was given.
3615 if test "${enable_db_install+set}" = set; then
3616   enableval="$enable_db_install"
3617   cf_with_db_install=$enableval
3618 else
3619   cf_with_db_install=yes
3620 fi;
3621 echo "$as_me:3621: result: $cf_with_db_install" >&5
3622 echo "${ECHO_T}$cf_with_db_install" >&6
3623
3624 echo "$as_me:3624: checking if you want to install manpages" >&5
3625 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3626
3627 # Check whether --with-manpages or --without-manpages was given.
3628 if test "${with_manpages+set}" = set; then
3629   withval="$with_manpages"
3630   cf_with_manpages=$withval
3631 else
3632   cf_with_manpages=yes
3633 fi;
3634 echo "$as_me:3634: result: $cf_with_manpages" >&5
3635 echo "${ECHO_T}$cf_with_manpages" >&6
3636
3637 echo "$as_me:3637: checking if you want to build programs such as tic" >&5
3638 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3639
3640 # Check whether --with-progs or --without-progs was given.
3641 if test "${with_progs+set}" = set; then
3642   withval="$with_progs"
3643   cf_with_progs=$withval
3644 else
3645   cf_with_progs=yes
3646 fi;
3647 echo "$as_me:3647: result: $cf_with_progs" >&5
3648 echo "${ECHO_T}$cf_with_progs" >&6
3649
3650 if test -f "$srcdir/tack/tack.h" ; then
3651         if test "x$cross_compiling" = xyes ; then
3652                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3653
3654 echo "${as_me:-configure}:3654: testing ignoring tack because we are cross-compiling ..." 1>&5
3655
3656                 cf_with_tack=no
3657         else
3658                 echo "$as_me:3658: checking if you want to build the tack program" >&5
3659 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3660
3661 # Check whether --with-tack or --without-tack was given.
3662 if test "${with_tack+set}" = set; then
3663   withval="$with_tack"
3664   cf_with_tack=$withval
3665 else
3666   cf_with_tack=$cf_with_progs
3667 fi;
3668                 echo "$as_me:3668: result: $cf_with_tack" >&5
3669 echo "${ECHO_T}$cf_with_tack" >&6
3670         fi
3671 else
3672         cf_with_tack=no
3673 fi
3674
3675 echo "$as_me:3675: checking if you want to build test-programs" >&5
3676 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3677
3678 # Check whether --with-tests or --without-tests was given.
3679 if test "${with_tests+set}" = set; then
3680   withval="$with_tests"
3681   cf_with_tests=$withval
3682 else
3683   cf_with_tests=yes
3684 fi;
3685 echo "$as_me:3685: result: $cf_with_tests" >&5
3686 echo "${ECHO_T}$cf_with_tests" >&6
3687
3688 echo "$as_me:3688: checking if you wish to install curses.h" >&5
3689 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3690
3691 # Check whether --with-curses-h or --without-curses-h was given.
3692 if test "${with_curses_h+set}" = set; then
3693   withval="$with_curses_h"
3694   with_curses_h=$withval
3695 else
3696   with_curses_h=yes
3697 fi;
3698 echo "$as_me:3698: result: $with_curses_h" >&5
3699 echo "${ECHO_T}$with_curses_h" >&6
3700
3701 modules_to_build="ncurses"
3702 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3703 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3704 modules_to_build="$modules_to_build panel menu form"
3705
3706 test "$program_prefix" != NONE &&
3707   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3708 # Use a double $ so make ignores it.
3709 test "$program_suffix" != NONE &&
3710   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3711 # Double any \ or $.  echo might interpret backslashes.
3712 # By default was `s,x,x', remove it if useless.
3713 cat <<\_ACEOF >conftest.sed
3714 s/[\\$]/&&/g;s/;s,x,x,$//
3715 _ACEOF
3716 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3717 rm conftest.sed
3718
3719 for ac_prog in mawk gawk nawk awk
3720 do
3721   # Extract the first word of "$ac_prog", so it can be a program name with args.
3722 set dummy $ac_prog; ac_word=$2
3723 echo "$as_me:3723: checking for $ac_word" >&5
3724 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3725 if test "${ac_cv_prog_AWK+set}" = set; then
3726   echo $ECHO_N "(cached) $ECHO_C" >&6
3727 else
3728   if test -n "$AWK"; then
3729   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3730 else
3731   ac_save_IFS=$IFS; IFS=$ac_path_separator
3732 ac_dummy="$PATH"
3733 for ac_dir in $ac_dummy; do
3734   IFS=$ac_save_IFS
3735   test -z "$ac_dir" && ac_dir=.
3736   $as_executable_p "$ac_dir/$ac_word" || continue
3737 ac_cv_prog_AWK="$ac_prog"
3738 echo "$as_me:3738: found $ac_dir/$ac_word" >&5
3739 break
3740 done
3741
3742 fi
3743 fi
3744 AWK=$ac_cv_prog_AWK
3745 if test -n "$AWK"; then
3746   echo "$as_me:3746: result: $AWK" >&5
3747 echo "${ECHO_T}$AWK" >&6
3748 else
3749   echo "$as_me:3749: result: no" >&5
3750 echo "${ECHO_T}no" >&6
3751 fi
3752
3753   test -n "$AWK" && break
3754 done
3755
3756 test -z "$AWK" && { { echo "$as_me:3756: error: No awk program found" >&5
3757 echo "$as_me: error: No awk program found" >&2;}
3758    { (exit 1); exit 1; }; }
3759
3760 # Find a good install program.  We prefer a C program (faster),
3761 # so one script is as good as another.  But avoid the broken or
3762 # incompatible versions:
3763 # SysV /etc/install, /usr/sbin/install
3764 # SunOS /usr/etc/install
3765 # IRIX /sbin/install
3766 # AIX /bin/install
3767 # AmigaOS /C/install, which installs bootblocks on floppy discs
3768 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3769 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3770 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3771 # ./install, which can be erroneously created by make from ./install.sh.
3772 echo "$as_me:3772: checking for a BSD compatible install" >&5
3773 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3774 if test -z "$INSTALL"; then
3775 if test "${ac_cv_path_install+set}" = set; then
3776   echo $ECHO_N "(cached) $ECHO_C" >&6
3777 else
3778     ac_save_IFS=$IFS; IFS=$ac_path_separator
3779   for ac_dir in $PATH; do
3780     IFS=$ac_save_IFS
3781     # Account for people who put trailing slashes in PATH elements.
3782     case $ac_dir/ in
3783     / | ./ | .// | /cC/* \
3784     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3785     | /usr/ucb/* ) ;;
3786     *)
3787       # OSF1 and SCO ODT 3.0 have their own names for install.
3788       # Don't use installbsd from OSF since it installs stuff as root
3789       # by default.
3790       for ac_prog in ginstall scoinst install; do
3791         if $as_executable_p "$ac_dir/$ac_prog"; then
3792           if test $ac_prog = install &&
3793             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3794             # AIX install.  It has an incompatible calling convention.
3795             :
3796           elif test $ac_prog = install &&
3797             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3798             # program-specific install script used by HP pwplus--don't use.
3799             :
3800           else
3801             ac_cv_path_install="$ac_dir/$ac_prog -c"
3802             break 2
3803           fi
3804         fi
3805       done
3806       ;;
3807     esac
3808   done
3809
3810 fi
3811   if test "${ac_cv_path_install+set}" = set; then
3812     INSTALL=$ac_cv_path_install
3813   else
3814     # As a last resort, use the slow shell script.  We don't cache a
3815     # path for INSTALL within a source directory, because that will
3816     # break other packages using the cache if that directory is
3817     # removed, or if the path is relative.
3818     INSTALL=$ac_install_sh
3819   fi
3820 fi
3821 echo "$as_me:3821: result: $INSTALL" >&5
3822 echo "${ECHO_T}$INSTALL" >&6
3823
3824 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3825 # It thinks the first close brace ends the variable substitution.
3826 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3827
3828 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3829
3830 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3831
3832 case $INSTALL in
3833 (/*)
3834         ;;
3835 (*)
3836         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3837         test -z "$cf_dir" && cf_dir=.
3838         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3839         ;;
3840 esac
3841
3842 for ac_prog in lint cppcheck splint
3843 do
3844   # Extract the first word of "$ac_prog", so it can be a program name with args.
3845 set dummy $ac_prog; ac_word=$2
3846 echo "$as_me:3846: checking for $ac_word" >&5
3847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3848 if test "${ac_cv_prog_LINT+set}" = set; then
3849   echo $ECHO_N "(cached) $ECHO_C" >&6
3850 else
3851   if test -n "$LINT"; then
3852   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3853 else
3854   ac_save_IFS=$IFS; IFS=$ac_path_separator
3855 ac_dummy="$PATH"
3856 for ac_dir in $ac_dummy; do
3857   IFS=$ac_save_IFS
3858   test -z "$ac_dir" && ac_dir=.
3859   $as_executable_p "$ac_dir/$ac_word" || continue
3860 ac_cv_prog_LINT="$ac_prog"
3861 echo "$as_me:3861: found $ac_dir/$ac_word" >&5
3862 break
3863 done
3864
3865 fi
3866 fi
3867 LINT=$ac_cv_prog_LINT
3868 if test -n "$LINT"; then
3869   echo "$as_me:3869: result: $LINT" >&5
3870 echo "${ECHO_T}$LINT" >&6
3871 else
3872   echo "$as_me:3872: result: no" >&5
3873 echo "${ECHO_T}no" >&6
3874 fi
3875
3876   test -n "$LINT" && break
3877 done
3878
3879 case "x$LINT" in
3880 (xcppcheck|x*/cppcheck)
3881         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3882         ;;
3883 esac
3884
3885 echo "$as_me:3885: checking whether ln -s works" >&5
3886 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3887 LN_S=$as_ln_s
3888 if test "$LN_S" = "ln -s"; then
3889   echo "$as_me:3889: result: yes" >&5
3890 echo "${ECHO_T}yes" >&6
3891 else
3892   echo "$as_me:3892: result: no, using $LN_S" >&5
3893 echo "${ECHO_T}no, using $LN_S" >&6
3894 fi
3895
3896 echo "$as_me:3896: checking if $LN_S -f options work" >&5
3897 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3898
3899 rm -f conf$$.src conf$$dst
3900 echo >conf$$.dst
3901 echo first >conf$$.src
3902 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3903         cf_prog_ln_sf=yes
3904 else
3905         cf_prog_ln_sf=no
3906 fi
3907 rm -f conf$$.dst conf$$src
3908 echo "$as_me:3908: result: $cf_prog_ln_sf" >&5
3909 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3910
3911 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3912
3913 echo "$as_me:3913: checking for long file names" >&5
3914 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3915 if test "${ac_cv_sys_long_file_names+set}" = set; then
3916   echo $ECHO_N "(cached) $ECHO_C" >&6
3917 else
3918   ac_cv_sys_long_file_names=yes
3919 # Test for long file names in all the places we know might matter:
3920 #      .                the current directory, where building will happen
3921 #      $prefix/lib      where we will be installing things
3922 #      $exec_prefix/lib likewise
3923 # eval it to expand exec_prefix.
3924 #      $TMPDIR          if set, where it might want to write temporary files
3925 # if $TMPDIR is not set:
3926 #      /tmp             where it might want to write temporary files
3927 #      /var/tmp         likewise
3928 #      /usr/tmp         likewise
3929 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3930   ac_tmpdirs=$TMPDIR
3931 else
3932   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3933 fi
3934 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3935   test -d "$ac_dir" || continue
3936   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3937   ac_xdir=$ac_dir/cf$$
3938   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3939   ac_tf1=$ac_xdir/conftest9012345
3940   ac_tf2=$ac_xdir/conftest9012346
3941   (echo 1 >"$ac_tf1") 2>/dev/null
3942   (echo 2 >"$ac_tf2") 2>/dev/null
3943   ac_val=`cat "$ac_tf1" 2>/dev/null`
3944   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3945     ac_cv_sys_long_file_names=no
3946     rm -rf "$ac_xdir" 2>/dev/null
3947     break
3948   fi
3949   rm -rf "$ac_xdir" 2>/dev/null
3950 done
3951 fi
3952 echo "$as_me:3952: result: $ac_cv_sys_long_file_names" >&5
3953 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3954 if test "$ac_cv_sys_long_file_names" = yes; then
3955
3956 cat >>confdefs.h <<\EOF
3957 #define HAVE_LONG_FILE_NAMES 1
3958 EOF
3959
3960 fi
3961
3962 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3963 # of package conflict.
3964 cf_config_suffix=
3965
3966 # Check whether --with-config-suffix or --without-config-suffix was given.
3967 if test "${with_config_suffix+set}" = set; then
3968   withval="$with_config_suffix"
3969   case "x$withval" in
3970         (xyes|xno)
3971                 { echo "$as_me:3971: WARNING: expected a value for config-suffix option" >&5
3972 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3973                 ;;
3974         (*)     cf_config_suffix="$withval"
3975                 ;;
3976         esac
3977 fi;
3978
3979 # If we find pkg-config, check if we should install the ".pc" files.
3980
3981 echo "$as_me:3981: checking if you want to use pkg-config" >&5
3982 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3983
3984 # Check whether --with-pkg-config or --without-pkg-config was given.
3985 if test "${with_pkg_config+set}" = set; then
3986   withval="$with_pkg_config"
3987   cf_pkg_config=$withval
3988 else
3989   cf_pkg_config=yes
3990 fi;
3991 echo "$as_me:3991: result: $cf_pkg_config" >&5
3992 echo "${ECHO_T}$cf_pkg_config" >&6
3993
3994 case "$cf_pkg_config" in
3995 (no)
3996         PKG_CONFIG=none
3997         ;;
3998 (yes)
3999
4000 if test -n "$ac_tool_prefix"; then
4001   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4002 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4003 echo "$as_me:4003: checking for $ac_word" >&5
4004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4005 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4006   echo $ECHO_N "(cached) $ECHO_C" >&6
4007 else
4008   case $PKG_CONFIG in
4009   [\\/]* | ?:[\\/]*)
4010   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4011   ;;
4012   *)
4013   ac_save_IFS=$IFS; IFS=$ac_path_separator
4014 ac_dummy="$PATH"
4015 for ac_dir in $ac_dummy; do
4016   IFS=$ac_save_IFS
4017   test -z "$ac_dir" && ac_dir=.
4018   if $as_executable_p "$ac_dir/$ac_word"; then
4019    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4020    echo "$as_me:4020: found $ac_dir/$ac_word" >&5
4021    break
4022 fi
4023 done
4024
4025   ;;
4026 esac
4027 fi
4028 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4029
4030 if test -n "$PKG_CONFIG"; then
4031   echo "$as_me:4031: result: $PKG_CONFIG" >&5
4032 echo "${ECHO_T}$PKG_CONFIG" >&6
4033 else
4034   echo "$as_me:4034: result: no" >&5
4035 echo "${ECHO_T}no" >&6
4036 fi
4037
4038 fi
4039 if test -z "$ac_cv_path_PKG_CONFIG"; then
4040   ac_pt_PKG_CONFIG=$PKG_CONFIG
4041   # Extract the first word of "pkg-config", so it can be a program name with args.
4042 set dummy pkg-config; ac_word=$2
4043 echo "$as_me:4043: checking for $ac_word" >&5
4044 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4045 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4046   echo $ECHO_N "(cached) $ECHO_C" >&6
4047 else
4048   case $ac_pt_PKG_CONFIG in
4049   [\\/]* | ?:[\\/]*)
4050   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4051   ;;
4052   *)
4053   ac_save_IFS=$IFS; IFS=$ac_path_separator
4054 ac_dummy="$PATH"
4055 for ac_dir in $ac_dummy; do
4056   IFS=$ac_save_IFS
4057   test -z "$ac_dir" && ac_dir=.
4058   if $as_executable_p "$ac_dir/$ac_word"; then
4059    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4060    echo "$as_me:4060: found $ac_dir/$ac_word" >&5
4061    break
4062 fi
4063 done
4064
4065   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4066   ;;
4067 esac
4068 fi
4069 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4070
4071 if test -n "$ac_pt_PKG_CONFIG"; then
4072   echo "$as_me:4072: result: $ac_pt_PKG_CONFIG" >&5
4073 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4074 else
4075   echo "$as_me:4075: result: no" >&5
4076 echo "${ECHO_T}no" >&6
4077 fi
4078
4079   PKG_CONFIG=$ac_pt_PKG_CONFIG
4080 else
4081   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4082 fi
4083
4084         ;;
4085 (*)
4086         PKG_CONFIG=$withval
4087         ;;
4088 esac
4089
4090 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4091 if test "$PKG_CONFIG" != none ; then
4092
4093 if test "x$prefix" != xNONE; then
4094         cf_path_syntax="$prefix"
4095 else
4096         cf_path_syntax="$ac_default_prefix"
4097 fi
4098
4099 case ".$PKG_CONFIG" in
4100 (.\$\(*\)*|.\'*\'*)
4101         ;;
4102 (..|./*|.\\*)
4103         ;;
4104 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4105         ;;
4106 (.\$\{*prefix\}*|.\$\{*dir\}*)
4107         eval PKG_CONFIG="$PKG_CONFIG"
4108         case ".$PKG_CONFIG" in
4109         (.NONE/*)
4110                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4111                 ;;
4112         esac
4113         ;;
4114 (.no|.NONE/*)
4115         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4116         ;;
4117 (*)
4118         { { echo "$as_me:4118: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4119 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4120    { (exit 1); exit 1; }; }
4121         ;;
4122 esac
4123
4124 elif test "x$cf_pkg_config" != xno ; then
4125         { echo "$as_me:4125: WARNING: pkg-config is not installed" >&5
4126 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4127 fi
4128
4129 case "$PKG_CONFIG" in
4130 (no|none|yes)
4131         echo "$as_me:4131: checking for pkg-config library directory" >&5
4132 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4133         ;;
4134 (*)
4135         echo "$as_me:4135: checking for $PKG_CONFIG library directory" >&5
4136 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4137         ;;
4138 esac
4139
4140 PKG_CONFIG_LIBDIR=no
4141
4142 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4143 if test "${with_pkg_config_libdir+set}" = set; then
4144   withval="$with_pkg_config_libdir"
4145   PKG_CONFIG_LIBDIR=$withval
4146 else
4147   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
4148 fi;
4149
4150 case x$PKG_CONFIG_LIBDIR in
4151 (x/*)
4152         ;;
4153 (xyes)
4154         # Look for the library directory using the same prefix as the executable
4155         if test "x$PKG_CONFIG" = xnone
4156         then
4157                 cf_path=$prefix
4158         else
4159                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4160         fi
4161
4162         # If you don't like using the default architecture, you have to specify the
4163         # intended library directory and corresponding compiler/linker options.
4164         #
4165         # This case allows for Debian's 2014-flavor of multiarch, along with the
4166         # most common variations before that point.  Some other variants spell the
4167         # directory differently, e.g., "pkg-config", and put it in unusual places.
4168         # pkg-config has always been poorly standardized, which is ironic...
4169         case x`(arch) 2>/dev/null` in
4170         (*64)
4171                 cf_search_path="\
4172                         $cf_path/lib/*64-linux-gnu \
4173                         $cf_path/share \
4174                         $cf_path/lib64 \
4175                         $cf_path/lib32 \
4176                         $cf_path/lib"
4177                 ;;
4178         (*)
4179                 cf_search_path="\
4180                         $cf_path/lib/*-linux-gnu \
4181                         $cf_path/share \
4182                         $cf_path/lib32 \
4183                         $cf_path/lib \
4184                         $cf_path/libdata"
4185                 ;;
4186         esac
4187
4188         test -n "$verbose" && echo "    list..." 1>&6
4189
4190 echo "${as_me:-configure}:4190: testing list... ..." 1>&5
4191
4192         for cf_config in $cf_search_path
4193         do
4194                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
4195
4196 echo "${as_me:-configure}:4196: testing checking $cf_config/pkgconfig ..." 1>&5
4197
4198                 if test -d "$cf_config/pkgconfig"
4199                 then
4200                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4201                         echo "$as_me:4201: checking done" >&5
4202 echo $ECHO_N "checking done... $ECHO_C" >&6
4203                         break
4204                 fi
4205         done
4206         ;;
4207 (*)
4208         ;;
4209 esac
4210
4211 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4212         echo "$as_me:4212: result: $PKG_CONFIG_LIBDIR" >&5
4213 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4214 fi
4215
4216 if test "x$PKG_CONFIG" != xnone
4217 then
4218         echo "$as_me:4218: checking if we should install .pc files for $PKG_CONFIG" >&5
4219 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4220 else
4221         echo "$as_me:4221: checking if we should install .pc files" >&5
4222 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4223 fi
4224
4225 # Check whether --enable-pc-files or --disable-pc-files was given.
4226 if test "${enable_pc_files+set}" = set; then
4227   enableval="$enable_pc_files"
4228   enable_pc_files=$enableval
4229 else
4230   enable_pc_files=no
4231 fi;
4232 echo "$as_me:4232: result: $enable_pc_files" >&5
4233 echo "${ECHO_T}$enable_pc_files" >&6
4234
4235 if test "x$enable_pc_files" != xno
4236 then
4237         MAKE_PC_FILES=
4238         case "x$PKG_CONFIG_LIBDIR" in
4239         (xno|xyes)
4240                 { echo "$as_me:4240: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4241 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4242                 ;;
4243         (*)
4244
4245 if test "x$prefix" != xNONE; then
4246         cf_path_syntax="$prefix"
4247 else
4248         cf_path_syntax="$ac_default_prefix"
4249 fi
4250
4251 case ".$PKG_CONFIG_LIBDIR" in
4252 (.\$\(*\)*|.\'*\'*)
4253         ;;
4254 (..|./*|.\\*)
4255         ;;
4256 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4257         ;;
4258 (.\$\{*prefix\}*|.\$\{*dir\}*)
4259         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4260         case ".$PKG_CONFIG_LIBDIR" in
4261         (.NONE/*)
4262                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4263                 ;;
4264         esac
4265         ;;
4266 (.no|.NONE/*)
4267         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4268         ;;
4269 (*)
4270         { { echo "$as_me:4270: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4271 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4272    { (exit 1); exit 1; }; }
4273         ;;
4274 esac
4275
4276                 ;;
4277         esac
4278 else
4279         MAKE_PC_FILES="#"
4280 fi
4281
4282 if test -z "$MAKE_PC_FILES"
4283 then
4284         echo "$as_me:4284: checking for suffix to add to pc-files" >&5
4285 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4286
4287 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4288 if test "${with_pc_suffix+set}" = set; then
4289   withval="$with_pc_suffix"
4290   case "x$withval" in
4291         (xyes|xno)
4292                 PC_MODULE_SUFFIX=
4293                 ;;
4294         (*)     PC_MODULE_SUFFIX="$withval"
4295                 ;;
4296         esac
4297 fi;
4298         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4299         echo "$as_me:4299: result: $PC_MODULE_SUFFIX" >&5
4300 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4301         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4302
4303 fi
4304
4305 echo "$as_me:4305: checking if we should assume mixed-case filenames" >&5
4306 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4307
4308 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4309 if test "${enable_mixed_case+set}" = set; then
4310   enableval="$enable_mixed_case"
4311   enable_mixedcase=$enableval
4312 else
4313   enable_mixedcase=auto
4314 fi;
4315 echo "$as_me:4315: result: $enable_mixedcase" >&5
4316 echo "${ECHO_T}$enable_mixedcase" >&6
4317 if test "$enable_mixedcase" = "auto" ; then
4318
4319 echo "$as_me:4319: checking if filesystem supports mixed-case filenames" >&5
4320 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4321 if test "${cf_cv_mixedcase+set}" = set; then
4322   echo $ECHO_N "(cached) $ECHO_C" >&6
4323 else
4324
4325 if test "$cross_compiling" = yes ; then
4326         case "$target_alias" in
4327         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4328                 cf_cv_mixedcase=no
4329                 ;;
4330         (*)
4331                 cf_cv_mixedcase=yes
4332                 ;;
4333         esac
4334 else
4335         rm -f conftest CONFTEST
4336         echo test >conftest
4337         if test -f CONFTEST ; then
4338                 cf_cv_mixedcase=no
4339         else
4340                 cf_cv_mixedcase=yes
4341         fi
4342         rm -f conftest CONFTEST
4343 fi
4344
4345 fi
4346 echo "$as_me:4346: result: $cf_cv_mixedcase" >&5
4347 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4348 test "$cf_cv_mixedcase" = yes &&
4349 cat >>confdefs.h <<\EOF
4350 #define MIXEDCASE_FILENAMES 1
4351 EOF
4352
4353 else
4354         cf_cv_mixedcase=$enable_mixedcase
4355         if test "x$enable_mixedcase" = "xyes" ; then
4356
4357 cat >>confdefs.h <<\EOF
4358 #define MIXEDCASE_FILENAMES 1
4359 EOF
4360
4361         fi
4362 fi
4363
4364 # do this after mixed-case option (tags/TAGS is not as important as tic).
4365 echo "$as_me:4365: checking whether ${MAKE-make} sets \${MAKE}" >&5
4366 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4367 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4368 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4369   echo $ECHO_N "(cached) $ECHO_C" >&6
4370 else
4371   cat >conftest.make <<\EOF
4372 all:
4373         @echo 'ac_maketemp="${MAKE}"'
4374 EOF
4375 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4376 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4377 if test -n "$ac_maketemp"; then
4378   eval ac_cv_prog_make_${ac_make}_set=yes
4379 else
4380   eval ac_cv_prog_make_${ac_make}_set=no
4381 fi
4382 rm -f conftest.make
4383 fi
4384 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4385   echo "$as_me:4385: result: yes" >&5
4386 echo "${ECHO_T}yes" >&6
4387   SET_MAKE=
4388 else
4389   echo "$as_me:4389: result: no" >&5
4390 echo "${ECHO_T}no" >&6
4391   SET_MAKE="MAKE=${MAKE-make}"
4392 fi
4393
4394 for ac_prog in exctags ctags
4395 do
4396   # Extract the first word of "$ac_prog", so it can be a program name with args.
4397 set dummy $ac_prog; ac_word=$2
4398 echo "$as_me:4398: checking for $ac_word" >&5
4399 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4400 if test "${ac_cv_prog_CTAGS+set}" = set; then
4401   echo $ECHO_N "(cached) $ECHO_C" >&6
4402 else
4403   if test -n "$CTAGS"; then
4404   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4405 else
4406   ac_save_IFS=$IFS; IFS=$ac_path_separator
4407 ac_dummy="$PATH"
4408 for ac_dir in $ac_dummy; do
4409   IFS=$ac_save_IFS
4410   test -z "$ac_dir" && ac_dir=.
4411   $as_executable_p "$ac_dir/$ac_word" || continue
4412 ac_cv_prog_CTAGS="$ac_prog"
4413 echo "$as_me:4413: found $ac_dir/$ac_word" >&5
4414 break
4415 done
4416
4417 fi
4418 fi
4419 CTAGS=$ac_cv_prog_CTAGS
4420 if test -n "$CTAGS"; then
4421   echo "$as_me:4421: result: $CTAGS" >&5
4422 echo "${ECHO_T}$CTAGS" >&6
4423 else
4424   echo "$as_me:4424: result: no" >&5
4425 echo "${ECHO_T}no" >&6
4426 fi
4427
4428   test -n "$CTAGS" && break
4429 done
4430
4431 for ac_prog in exetags etags
4432 do
4433   # Extract the first word of "$ac_prog", so it can be a program name with args.
4434 set dummy $ac_prog; ac_word=$2
4435 echo "$as_me:4435: checking for $ac_word" >&5
4436 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4437 if test "${ac_cv_prog_ETAGS+set}" = set; then
4438   echo $ECHO_N "(cached) $ECHO_C" >&6
4439 else
4440   if test -n "$ETAGS"; then
4441   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4442 else
4443   ac_save_IFS=$IFS; IFS=$ac_path_separator
4444 ac_dummy="$PATH"
4445 for ac_dir in $ac_dummy; do
4446   IFS=$ac_save_IFS
4447   test -z "$ac_dir" && ac_dir=.
4448   $as_executable_p "$ac_dir/$ac_word" || continue
4449 ac_cv_prog_ETAGS="$ac_prog"
4450 echo "$as_me:4450: found $ac_dir/$ac_word" >&5
4451 break
4452 done
4453
4454 fi
4455 fi
4456 ETAGS=$ac_cv_prog_ETAGS
4457 if test -n "$ETAGS"; then
4458   echo "$as_me:4458: result: $ETAGS" >&5
4459 echo "${ECHO_T}$ETAGS" >&6
4460 else
4461   echo "$as_me:4461: result: no" >&5
4462 echo "${ECHO_T}no" >&6
4463 fi
4464
4465   test -n "$ETAGS" && break
4466 done
4467
4468 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4469 set dummy ${CTAGS:-ctags}; ac_word=$2
4470 echo "$as_me:4470: checking for $ac_word" >&5
4471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4472 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4473   echo $ECHO_N "(cached) $ECHO_C" >&6
4474 else
4475   if test -n "$MAKE_LOWER_TAGS"; then
4476   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4477 else
4478   ac_save_IFS=$IFS; IFS=$ac_path_separator
4479 ac_dummy="$PATH"
4480 for ac_dir in $ac_dummy; do
4481   IFS=$ac_save_IFS
4482   test -z "$ac_dir" && ac_dir=.
4483   $as_executable_p "$ac_dir/$ac_word" || continue
4484 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4485 echo "$as_me:4485: found $ac_dir/$ac_word" >&5
4486 break
4487 done
4488
4489   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4490 fi
4491 fi
4492 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4493 if test -n "$MAKE_LOWER_TAGS"; then
4494   echo "$as_me:4494: result: $MAKE_LOWER_TAGS" >&5
4495 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4496 else
4497   echo "$as_me:4497: result: no" >&5
4498 echo "${ECHO_T}no" >&6
4499 fi
4500
4501 if test "$cf_cv_mixedcase" = yes ; then
4502         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4503 set dummy ${ETAGS:-etags}; ac_word=$2
4504 echo "$as_me:4504: checking for $ac_word" >&5
4505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4506 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4507   echo $ECHO_N "(cached) $ECHO_C" >&6
4508 else
4509   if test -n "$MAKE_UPPER_TAGS"; then
4510   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4511 else
4512   ac_save_IFS=$IFS; IFS=$ac_path_separator
4513 ac_dummy="$PATH"
4514 for ac_dir in $ac_dummy; do
4515   IFS=$ac_save_IFS
4516   test -z "$ac_dir" && ac_dir=.
4517   $as_executable_p "$ac_dir/$ac_word" || continue
4518 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4519 echo "$as_me:4519: found $ac_dir/$ac_word" >&5
4520 break
4521 done
4522
4523   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4524 fi
4525 fi
4526 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4527 if test -n "$MAKE_UPPER_TAGS"; then
4528   echo "$as_me:4528: result: $MAKE_UPPER_TAGS" >&5
4529 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4530 else
4531   echo "$as_me:4531: result: no" >&5
4532 echo "${ECHO_T}no" >&6
4533 fi
4534
4535 else
4536         MAKE_UPPER_TAGS=no
4537 fi
4538
4539 if test "$MAKE_UPPER_TAGS" = yes ; then
4540         MAKE_UPPER_TAGS=
4541 else
4542         MAKE_UPPER_TAGS="#"
4543 fi
4544
4545 if test "$MAKE_LOWER_TAGS" = yes ; then
4546         MAKE_LOWER_TAGS=
4547 else
4548         MAKE_LOWER_TAGS="#"
4549 fi
4550
4551 echo "$as_me:4551: checking for makeflags variable" >&5
4552 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4553 if test "${cf_cv_makeflags+set}" = set; then
4554   echo $ECHO_N "(cached) $ECHO_C" >&6
4555 else
4556
4557         cf_cv_makeflags=''
4558         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4559         do
4560                 cat >cf_makeflags.tmp <<CF_EOF
4561 SHELL = $SHELL
4562 all :
4563         @ echo '.$cf_option'
4564 CF_EOF
4565                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4566                 case "$cf_result" in
4567                 (.*k|.*kw)
4568                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4569                         case "$cf_result" in
4570                         (.*CC=*)        cf_cv_makeflags=
4571                                 ;;
4572                         (*)     cf_cv_makeflags=$cf_option
4573                                 ;;
4574                         esac
4575                         break
4576                         ;;
4577                 (.-)
4578                         ;;
4579                 (*)
4580
4581 echo "${as_me:-configure}:4581: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4582
4583                         ;;
4584                 esac
4585         done
4586         rm -f cf_makeflags.tmp
4587
4588 fi
4589 echo "$as_me:4589: result: $cf_cv_makeflags" >&5
4590 echo "${ECHO_T}$cf_cv_makeflags" >&6
4591
4592 if test -n "$ac_tool_prefix"; then
4593   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4594 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4595 echo "$as_me:4595: checking for $ac_word" >&5
4596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4597 if test "${ac_cv_prog_RANLIB+set}" = set; then
4598   echo $ECHO_N "(cached) $ECHO_C" >&6
4599 else
4600   if test -n "$RANLIB"; then
4601   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4602 else
4603   ac_save_IFS=$IFS; IFS=$ac_path_separator
4604 ac_dummy="$PATH"
4605 for ac_dir in $ac_dummy; do
4606   IFS=$ac_save_IFS
4607   test -z "$ac_dir" && ac_dir=.
4608   $as_executable_p "$ac_dir/$ac_word" || continue
4609 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4610 echo "$as_me:4610: found $ac_dir/$ac_word" >&5
4611 break
4612 done
4613
4614 fi
4615 fi
4616 RANLIB=$ac_cv_prog_RANLIB
4617 if test -n "$RANLIB"; then
4618   echo "$as_me:4618: result: $RANLIB" >&5
4619 echo "${ECHO_T}$RANLIB" >&6
4620 else
4621   echo "$as_me:4621: result: no" >&5
4622 echo "${ECHO_T}no" >&6
4623 fi
4624
4625 fi
4626 if test -z "$ac_cv_prog_RANLIB"; then
4627   ac_ct_RANLIB=$RANLIB
4628   # Extract the first word of "ranlib", so it can be a program name with args.
4629 set dummy ranlib; ac_word=$2
4630 echo "$as_me:4630: checking for $ac_word" >&5
4631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4632 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4633   echo $ECHO_N "(cached) $ECHO_C" >&6
4634 else
4635   if test -n "$ac_ct_RANLIB"; then
4636   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4637 else
4638   ac_save_IFS=$IFS; IFS=$ac_path_separator
4639 ac_dummy="$PATH"
4640 for ac_dir in $ac_dummy; do
4641   IFS=$ac_save_IFS
4642   test -z "$ac_dir" && ac_dir=.
4643   $as_executable_p "$ac_dir/$ac_word" || continue
4644 ac_cv_prog_ac_ct_RANLIB="ranlib"
4645 echo "$as_me:4645: found $ac_dir/$ac_word" >&5
4646 break
4647 done
4648
4649   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4650 fi
4651 fi
4652 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4653 if test -n "$ac_ct_RANLIB"; then
4654   echo "$as_me:4654: result: $ac_ct_RANLIB" >&5
4655 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4656 else
4657   echo "$as_me:4657: result: no" >&5
4658 echo "${ECHO_T}no" >&6
4659 fi
4660
4661   RANLIB=$ac_ct_RANLIB
4662 else
4663   RANLIB="$ac_cv_prog_RANLIB"
4664 fi
4665
4666 if test -n "$ac_tool_prefix"; then
4667   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4668 set dummy ${ac_tool_prefix}ld; ac_word=$2
4669 echo "$as_me:4669: checking for $ac_word" >&5
4670 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4671 if test "${ac_cv_prog_LD+set}" = set; then
4672   echo $ECHO_N "(cached) $ECHO_C" >&6
4673 else
4674   if test -n "$LD"; then
4675   ac_cv_prog_LD="$LD" # Let the user override the test.
4676 else
4677   ac_save_IFS=$IFS; IFS=$ac_path_separator
4678 ac_dummy="$PATH"
4679 for ac_dir in $ac_dummy; do
4680   IFS=$ac_save_IFS
4681   test -z "$ac_dir" && ac_dir=.
4682   $as_executable_p "$ac_dir/$ac_word" || continue
4683 ac_cv_prog_LD="${ac_tool_prefix}ld"
4684 echo "$as_me:4684: found $ac_dir/$ac_word" >&5
4685 break
4686 done
4687
4688 fi
4689 fi
4690 LD=$ac_cv_prog_LD
4691 if test -n "$LD"; then
4692   echo "$as_me:4692: result: $LD" >&5
4693 echo "${ECHO_T}$LD" >&6
4694 else
4695   echo "$as_me:4695: result: no" >&5
4696 echo "${ECHO_T}no" >&6
4697 fi
4698
4699 fi
4700 if test -z "$ac_cv_prog_LD"; then
4701   ac_ct_LD=$LD
4702   # Extract the first word of "ld", so it can be a program name with args.
4703 set dummy ld; ac_word=$2
4704 echo "$as_me:4704: checking for $ac_word" >&5
4705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4706 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4707   echo $ECHO_N "(cached) $ECHO_C" >&6
4708 else
4709   if test -n "$ac_ct_LD"; then
4710   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4711 else
4712   ac_save_IFS=$IFS; IFS=$ac_path_separator
4713 ac_dummy="$PATH"
4714 for ac_dir in $ac_dummy; do
4715   IFS=$ac_save_IFS
4716   test -z "$ac_dir" && ac_dir=.
4717   $as_executable_p "$ac_dir/$ac_word" || continue
4718 ac_cv_prog_ac_ct_LD="ld"
4719 echo "$as_me:4719: found $ac_dir/$ac_word" >&5
4720 break
4721 done
4722
4723   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4724 fi
4725 fi
4726 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4727 if test -n "$ac_ct_LD"; then
4728   echo "$as_me:4728: result: $ac_ct_LD" >&5
4729 echo "${ECHO_T}$ac_ct_LD" >&6
4730 else
4731   echo "$as_me:4731: result: no" >&5
4732 echo "${ECHO_T}no" >&6
4733 fi
4734
4735   LD=$ac_ct_LD
4736 else
4737   LD="$ac_cv_prog_LD"
4738 fi
4739
4740 if test -n "$ac_tool_prefix"; then
4741   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4742 set dummy ${ac_tool_prefix}ar; ac_word=$2
4743 echo "$as_me:4743: checking for $ac_word" >&5
4744 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4745 if test "${ac_cv_prog_AR+set}" = set; then
4746   echo $ECHO_N "(cached) $ECHO_C" >&6
4747 else
4748   if test -n "$AR"; then
4749   ac_cv_prog_AR="$AR" # Let the user override the test.
4750 else
4751   ac_save_IFS=$IFS; IFS=$ac_path_separator
4752 ac_dummy="$PATH"
4753 for ac_dir in $ac_dummy; do
4754   IFS=$ac_save_IFS
4755   test -z "$ac_dir" && ac_dir=.
4756   $as_executable_p "$ac_dir/$ac_word" || continue
4757 ac_cv_prog_AR="${ac_tool_prefix}ar"
4758 echo "$as_me:4758: found $ac_dir/$ac_word" >&5
4759 break
4760 done
4761
4762 fi
4763 fi
4764 AR=$ac_cv_prog_AR
4765 if test -n "$AR"; then
4766   echo "$as_me:4766: result: $AR" >&5
4767 echo "${ECHO_T}$AR" >&6
4768 else
4769   echo "$as_me:4769: result: no" >&5
4770 echo "${ECHO_T}no" >&6
4771 fi
4772
4773 fi
4774 if test -z "$ac_cv_prog_AR"; then
4775   ac_ct_AR=$AR
4776   # Extract the first word of "ar", so it can be a program name with args.
4777 set dummy ar; ac_word=$2
4778 echo "$as_me:4778: checking for $ac_word" >&5
4779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4780 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4781   echo $ECHO_N "(cached) $ECHO_C" >&6
4782 else
4783   if test -n "$ac_ct_AR"; then
4784   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4785 else
4786   ac_save_IFS=$IFS; IFS=$ac_path_separator
4787 ac_dummy="$PATH"
4788 for ac_dir in $ac_dummy; do
4789   IFS=$ac_save_IFS
4790   test -z "$ac_dir" && ac_dir=.
4791   $as_executable_p "$ac_dir/$ac_word" || continue
4792 ac_cv_prog_ac_ct_AR="ar"
4793 echo "$as_me:4793: found $ac_dir/$ac_word" >&5
4794 break
4795 done
4796
4797   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4798 fi
4799 fi
4800 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4801 if test -n "$ac_ct_AR"; then
4802   echo "$as_me:4802: result: $ac_ct_AR" >&5
4803 echo "${ECHO_T}$ac_ct_AR" >&6
4804 else
4805   echo "$as_me:4805: result: no" >&5
4806 echo "${ECHO_T}no" >&6
4807 fi
4808
4809   AR=$ac_ct_AR
4810 else
4811   AR="$ac_cv_prog_AR"
4812 fi
4813
4814 if test -n "$ac_tool_prefix"; then
4815   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4816 set dummy ${ac_tool_prefix}nm; ac_word=$2
4817 echo "$as_me:4817: checking for $ac_word" >&5
4818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4819 if test "${ac_cv_prog_NM+set}" = set; then
4820   echo $ECHO_N "(cached) $ECHO_C" >&6
4821 else
4822   if test -n "$NM"; then
4823   ac_cv_prog_NM="$NM" # Let the user override the test.
4824 else
4825   ac_save_IFS=$IFS; IFS=$ac_path_separator
4826 ac_dummy="$PATH"
4827 for ac_dir in $ac_dummy; do
4828   IFS=$ac_save_IFS
4829   test -z "$ac_dir" && ac_dir=.
4830   $as_executable_p "$ac_dir/$ac_word" || continue
4831 ac_cv_prog_NM="${ac_tool_prefix}nm"
4832 echo "$as_me:4832: found $ac_dir/$ac_word" >&5
4833 break
4834 done
4835
4836 fi
4837 fi
4838 NM=$ac_cv_prog_NM
4839 if test -n "$NM"; then
4840   echo "$as_me:4840: result: $NM" >&5
4841 echo "${ECHO_T}$NM" >&6
4842 else
4843   echo "$as_me:4843: result: no" >&5
4844 echo "${ECHO_T}no" >&6
4845 fi
4846
4847 fi
4848 if test -z "$ac_cv_prog_NM"; then
4849   ac_ct_NM=$NM
4850   # Extract the first word of "nm", so it can be a program name with args.
4851 set dummy nm; ac_word=$2
4852 echo "$as_me:4852: checking for $ac_word" >&5
4853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4854 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4855   echo $ECHO_N "(cached) $ECHO_C" >&6
4856 else
4857   if test -n "$ac_ct_NM"; then
4858   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4859 else
4860   ac_save_IFS=$IFS; IFS=$ac_path_separator
4861 ac_dummy="$PATH"
4862 for ac_dir in $ac_dummy; do
4863   IFS=$ac_save_IFS
4864   test -z "$ac_dir" && ac_dir=.
4865   $as_executable_p "$ac_dir/$ac_word" || continue
4866 ac_cv_prog_ac_ct_NM="nm"
4867 echo "$as_me:4867: found $ac_dir/$ac_word" >&5
4868 break
4869 done
4870
4871   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4872 fi
4873 fi
4874 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4875 if test -n "$ac_ct_NM"; then
4876   echo "$as_me:4876: result: $ac_ct_NM" >&5
4877 echo "${ECHO_T}$ac_ct_NM" >&6
4878 else
4879   echo "$as_me:4879: result: no" >&5
4880 echo "${ECHO_T}no" >&6
4881 fi
4882
4883   NM=$ac_ct_NM
4884 else
4885   NM="$ac_cv_prog_NM"
4886 fi
4887
4888 if test -n "$ac_tool_prefix"; then
4889   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4890 set dummy ${ac_tool_prefix}ar; ac_word=$2
4891 echo "$as_me:4891: checking for $ac_word" >&5
4892 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4893 if test "${ac_cv_prog_AR+set}" = set; then
4894   echo $ECHO_N "(cached) $ECHO_C" >&6
4895 else
4896   if test -n "$AR"; then
4897   ac_cv_prog_AR="$AR" # Let the user override the test.
4898 else
4899   ac_save_IFS=$IFS; IFS=$ac_path_separator
4900 ac_dummy="$PATH"
4901 for ac_dir in $ac_dummy; do
4902   IFS=$ac_save_IFS
4903   test -z "$ac_dir" && ac_dir=.
4904   $as_executable_p "$ac_dir/$ac_word" || continue
4905 ac_cv_prog_AR="${ac_tool_prefix}ar"
4906 echo "$as_me:4906: found $ac_dir/$ac_word" >&5
4907 break
4908 done
4909
4910 fi
4911 fi
4912 AR=$ac_cv_prog_AR
4913 if test -n "$AR"; then
4914   echo "$as_me:4914: result: $AR" >&5
4915 echo "${ECHO_T}$AR" >&6
4916 else
4917   echo "$as_me:4917: result: no" >&5
4918 echo "${ECHO_T}no" >&6
4919 fi
4920
4921 fi
4922 if test -z "$ac_cv_prog_AR"; then
4923   ac_ct_AR=$AR
4924   # Extract the first word of "ar", so it can be a program name with args.
4925 set dummy ar; ac_word=$2
4926 echo "$as_me:4926: checking for $ac_word" >&5
4927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4928 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4929   echo $ECHO_N "(cached) $ECHO_C" >&6
4930 else
4931   if test -n "$ac_ct_AR"; then
4932   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4933 else
4934   ac_save_IFS=$IFS; IFS=$ac_path_separator
4935 ac_dummy="$PATH"
4936 for ac_dir in $ac_dummy; do
4937   IFS=$ac_save_IFS
4938   test -z "$ac_dir" && ac_dir=.
4939   $as_executable_p "$ac_dir/$ac_word" || continue
4940 ac_cv_prog_ac_ct_AR="ar"
4941 echo "$as_me:4941: found $ac_dir/$ac_word" >&5
4942 break
4943 done
4944
4945   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4946 fi
4947 fi
4948 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4949 if test -n "$ac_ct_AR"; then
4950   echo "$as_me:4950: result: $ac_ct_AR" >&5
4951 echo "${ECHO_T}$ac_ct_AR" >&6
4952 else
4953   echo "$as_me:4953: result: no" >&5
4954 echo "${ECHO_T}no" >&6
4955 fi
4956
4957   AR=$ac_ct_AR
4958 else
4959   AR="$ac_cv_prog_AR"
4960 fi
4961
4962 echo "$as_me:4962: checking for options to update archives" >&5
4963 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4964 if test "${cf_cv_ar_flags+set}" = set; then
4965   echo $ECHO_N "(cached) $ECHO_C" >&6
4966 else
4967
4968         case "$cf_cv_system_name" in
4969         (*-msvc*)
4970                 cf_cv_ar_flags=''
4971                 cat >mk_static_lib.sh <<-EOF
4972                 #!$SHELL
4973                 MSVC_BIN="$AR"
4974                 out="\$1"
4975                 shift
4976                 exec \$MSVC_BIN -out:"\$out" \$@
4977                 EOF
4978                 chmod +x mk_static_lib.sh
4979                 AR=`pwd`/mk_static_lib.sh
4980                 ;;
4981         (*)
4982                 cf_cv_ar_flags=unknown
4983                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4984                 do
4985
4986                         # check if $ARFLAGS already contains this choice
4987                         if test "x$ARFLAGS" != "x" ; then
4988                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4989                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4990                                         cf_cv_ar_flags=
4991                                         break
4992                                 fi
4993                         fi
4994
4995                         rm -f "conftest.$ac_cv_objext"
4996                         rm -f conftest.a
4997
4998                         cat >"conftest.$ac_ext" <<EOF
4999 #line 4999 "configure"
5000 int     testdata[3] = { 123, 456, 789 };
5001 EOF
5002                         if { (eval echo "$as_me:5002: \"$ac_compile\"") >&5
5003   (eval $ac_compile) 2>&5
5004   ac_status=$?
5005   echo "$as_me:5005: \$? = $ac_status" >&5
5006   (exit "$ac_status"); } ; then
5007                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5008                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5009                                 if test -f conftest.a ; then
5010                                         cf_cv_ar_flags="$cf_ar_flags"
5011                                         break
5012                                 fi
5013                         else
5014                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5015
5016 echo "${as_me:-configure}:5016: testing cannot compile test-program ..." 1>&5
5017
5018                                 break
5019                         fi
5020                 done
5021                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5022                 ;;
5023         esac
5024
5025 fi
5026 echo "$as_me:5026: result: $cf_cv_ar_flags" >&5
5027 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5028
5029 if test -n "$ARFLAGS" ; then
5030         if test -n "$cf_cv_ar_flags" ; then
5031                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5032         fi
5033 else
5034         ARFLAGS=$cf_cv_ar_flags
5035 fi
5036
5037 echo "$as_me:5037: checking if you have specified an install-prefix" >&5
5038 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5039
5040 # Check whether --with-install-prefix or --without-install-prefix was given.
5041 if test "${with_install_prefix+set}" = set; then
5042   withval="$with_install_prefix"
5043   case "x$withval" in
5044         (xyes|xno)
5045                 ;;
5046         (*)     DESTDIR="$withval"
5047                 ;;
5048         esac
5049 fi;
5050 echo "$as_me:5050: result: $DESTDIR" >&5
5051 echo "${ECHO_T}$DESTDIR" >&6
5052
5053 ###############################################################################
5054
5055 # If we're cross-compiling, allow the user to override the tools and their
5056 # options.  The configure script is oriented toward identifying the host
5057 # compiler, etc., but we need a build compiler to generate parts of the source.
5058
5059 case "$cf_cv_system_name" in
5060 (*-msvc*)
5061         LDFLAGS="$LDFLAGS user32.lib"
5062         export LDFLAGS
5063         ;;
5064 esac
5065
5066 if test "$cross_compiling" = yes ; then
5067
5068         # defaults that we might want to override
5069         : ${BUILD_CFLAGS:=''}
5070         : ${BUILD_CPPFLAGS:=''}
5071         : ${BUILD_LDFLAGS:=''}
5072         : ${BUILD_LIBS:=''}
5073         : ${BUILD_EXEEXT:='$x'}
5074         : ${BUILD_OBJEXT:='o'}
5075
5076 # Check whether --with-build-cc or --without-build-cc was given.
5077 if test "${with_build_cc+set}" = set; then
5078   withval="$with_build_cc"
5079   BUILD_CC="$withval"
5080 else
5081   for ac_prog in gcc clang c99 c89 cc cl
5082 do
5083   # Extract the first word of "$ac_prog", so it can be a program name with args.
5084 set dummy $ac_prog; ac_word=$2
5085 echo "$as_me:5085: checking for $ac_word" >&5
5086 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5087 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5088   echo $ECHO_N "(cached) $ECHO_C" >&6
5089 else
5090   if test -n "$BUILD_CC"; then
5091   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5092 else
5093   ac_save_IFS=$IFS; IFS=$ac_path_separator
5094 ac_dummy="$PATH"
5095 for ac_dir in $ac_dummy; do
5096   IFS=$ac_save_IFS
5097   test -z "$ac_dir" && ac_dir=.
5098   $as_executable_p "$ac_dir/$ac_word" || continue
5099 ac_cv_prog_BUILD_CC="$ac_prog"
5100 echo "$as_me:5100: found $ac_dir/$ac_word" >&5
5101 break
5102 done
5103
5104 fi
5105 fi
5106 BUILD_CC=$ac_cv_prog_BUILD_CC
5107 if test -n "$BUILD_CC"; then
5108   echo "$as_me:5108: result: $BUILD_CC" >&5
5109 echo "${ECHO_T}$BUILD_CC" >&6
5110 else
5111   echo "$as_me:5111: result: no" >&5
5112 echo "${ECHO_T}no" >&6
5113 fi
5114
5115   test -n "$BUILD_CC" && break
5116 done
5117 test -n "$BUILD_CC" || BUILD_CC="none"
5118
5119 fi;
5120         echo "$as_me:5120: checking for native build C compiler" >&5
5121 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5122         echo "$as_me:5122: result: $BUILD_CC" >&5
5123 echo "${ECHO_T}$BUILD_CC" >&6
5124
5125         echo "$as_me:5125: checking for native build C preprocessor" >&5
5126 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5127
5128 # Check whether --with-build-cpp or --without-build-cpp was given.
5129 if test "${with_build_cpp+set}" = set; then
5130   withval="$with_build_cpp"
5131   BUILD_CPP="$withval"
5132 else
5133   BUILD_CPP='${BUILD_CC} -E'
5134 fi;
5135         echo "$as_me:5135: result: $BUILD_CPP" >&5
5136 echo "${ECHO_T}$BUILD_CPP" >&6
5137
5138         echo "$as_me:5138: checking for native build C flags" >&5
5139 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5140
5141 # Check whether --with-build-cflags or --without-build-cflags was given.
5142 if test "${with_build_cflags+set}" = set; then
5143   withval="$with_build_cflags"
5144   BUILD_CFLAGS="$withval"
5145 fi;
5146         echo "$as_me:5146: result: $BUILD_CFLAGS" >&5
5147 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5148
5149         echo "$as_me:5149: checking for native build C preprocessor-flags" >&5
5150 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5151
5152 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5153 if test "${with_build_cppflags+set}" = set; then
5154   withval="$with_build_cppflags"
5155   BUILD_CPPFLAGS="$withval"
5156 fi;
5157         echo "$as_me:5157: result: $BUILD_CPPFLAGS" >&5
5158 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5159
5160         echo "$as_me:5160: checking for native build linker-flags" >&5
5161 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5162
5163 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5164 if test "${with_build_ldflags+set}" = set; then
5165   withval="$with_build_ldflags"
5166   BUILD_LDFLAGS="$withval"
5167 fi;
5168         echo "$as_me:5168: result: $BUILD_LDFLAGS" >&5
5169 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5170
5171         echo "$as_me:5171: checking for native build linker-libraries" >&5
5172 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5173
5174 # Check whether --with-build-libs or --without-build-libs was given.
5175 if test "${with_build_libs+set}" = set; then
5176   withval="$with_build_libs"
5177   BUILD_LIBS="$withval"
5178 fi;
5179         echo "$as_me:5179: result: $BUILD_LIBS" >&5
5180 echo "${ECHO_T}$BUILD_LIBS" >&6
5181
5182         # this assumes we're on Unix.
5183         BUILD_EXEEXT=
5184         BUILD_OBJEXT=o
5185
5186         : ${BUILD_CC:='${CC}'}
5187
5188         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5189                 { { echo "$as_me:5189: error: Cross-build requires two compilers.
5190 Use --with-build-cc to specify the native compiler." >&5
5191 echo "$as_me: error: Cross-build requires two compilers.
5192 Use --with-build-cc to specify the native compiler." >&2;}
5193    { (exit 1); exit 1; }; }
5194         fi
5195
5196 else
5197         : ${BUILD_CC:='${CC}'}
5198         : ${BUILD_CPP:='${CPP}'}
5199         : ${BUILD_CFLAGS:='${CFLAGS}'}
5200         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5201         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5202         : ${BUILD_LIBS:='${LIBS}'}
5203         : ${BUILD_EXEEXT:='$x'}
5204         : ${BUILD_OBJEXT:='o'}
5205 fi
5206
5207 ###############################################################################
5208
5209 ### Options to allow the user to specify the set of libraries which are used.
5210 ### Use "--without-normal --with-shared" to allow the default model to be
5211 ### shared, for example.
5212 cf_list_models=""
5213
5214 echo "$as_me:5214: checking if libtool -version-number should be used" >&5
5215 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5216
5217 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5218 if test "${enable_libtool_version+set}" = set; then
5219   enableval="$enable_libtool_version"
5220   test "$enableval" != no && enableval=yes
5221         if test "$enableval" != "yes" ; then
5222     cf_libtool_version=no
5223         else
5224                 cf_libtool_version=yes
5225         fi
5226 else
5227   enableval=yes
5228         cf_libtool_version=yes
5229
5230 fi;
5231 echo "$as_me:5231: result: $cf_libtool_version" >&5
5232 echo "${ECHO_T}$cf_libtool_version" >&6
5233
5234 if test "$cf_libtool_version" = yes ; then
5235         LIBTOOL_VERSION="-version-number"
5236 else
5237         LIBTOOL_VERSION="-version-info"
5238         case "x$VERSION" in
5239         (x)
5240                 { echo "$as_me:5240: WARNING: VERSION was not set" >&5
5241 echo "$as_me: WARNING: VERSION was not set" >&2;}
5242                 ;;
5243         (x*.*.*)
5244                 ABI_VERSION="$VERSION"
5245                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5246
5247 echo "${as_me:-configure}:5247: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5248
5249                 ;;
5250         (x*:*:*)
5251                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5252                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5253
5254 echo "${as_me:-configure}:5254: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5255
5256                 ;;
5257         (*)
5258                 { echo "$as_me:5258: WARNING: unexpected VERSION value: $VERSION" >&5
5259 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5260                 ;;
5261         esac
5262 fi
5263
5264 LIBTOOL=
5265
5266 # common library maintenance symbols that are convenient for libtool scripts:
5267 LIB_CREATE='${AR} -cr'
5268 LIB_OBJECT='${OBJECTS}'
5269 LIB_SUFFIX=.a
5270 LIB_PREP="$RANLIB"
5271
5272 # symbols used to prop libtool up to enable it to determine what it should be
5273 # doing:
5274 LIB_CLEAN=
5275 LIB_COMPILE=
5276 LIB_LINK='${CC}'
5277 LIB_INSTALL=
5278 LIB_UNINSTALL=
5279
5280 echo "$as_me:5280: checking if you want to build libraries with libtool" >&5
5281 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5282
5283 # Check whether --with-libtool or --without-libtool was given.
5284 if test "${with_libtool+set}" = set; then
5285   withval="$with_libtool"
5286   with_libtool=$withval
5287 else
5288   with_libtool=no
5289 fi;
5290 echo "$as_me:5290: result: $with_libtool" >&5
5291 echo "${ECHO_T}$with_libtool" >&6
5292 if test "$with_libtool" != "no"; then
5293
5294         if test "$with_libtool" != "yes" ; then
5295
5296 if test "x$prefix" != xNONE; then
5297         cf_path_syntax="$prefix"
5298 else
5299         cf_path_syntax="$ac_default_prefix"
5300 fi
5301
5302 case ".$with_libtool" in
5303 (.\$\(*\)*|.\'*\'*)
5304         ;;
5305 (..|./*|.\\*)
5306         ;;
5307 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5308         ;;
5309 (.\$\{*prefix\}*|.\$\{*dir\}*)
5310         eval with_libtool="$with_libtool"
5311         case ".$with_libtool" in
5312         (.NONE/*)
5313                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5314                 ;;
5315         esac
5316         ;;
5317 (.no|.NONE/*)
5318         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5319         ;;
5320 (*)
5321         { { echo "$as_me:5321: error: expected a pathname, not \"$with_libtool\"" >&5
5322 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5323    { (exit 1); exit 1; }; }
5324         ;;
5325 esac
5326
5327                 LIBTOOL=$with_libtool
5328         else
5329                 if test -n "$ac_tool_prefix"; then
5330   for ac_prog in libtool glibtool
5331   do
5332     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5333 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5334 echo "$as_me:5334: checking for $ac_word" >&5
5335 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5336 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5337   echo $ECHO_N "(cached) $ECHO_C" >&6
5338 else
5339   if test -n "$LIBTOOL"; then
5340   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5341 else
5342   ac_save_IFS=$IFS; IFS=$ac_path_separator
5343 ac_dummy="$PATH"
5344 for ac_dir in $ac_dummy; do
5345   IFS=$ac_save_IFS
5346   test -z "$ac_dir" && ac_dir=.
5347   $as_executable_p "$ac_dir/$ac_word" || continue
5348 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5349 echo "$as_me:5349: found $ac_dir/$ac_word" >&5
5350 break
5351 done
5352
5353 fi
5354 fi
5355 LIBTOOL=$ac_cv_prog_LIBTOOL
5356 if test -n "$LIBTOOL"; then
5357   echo "$as_me:5357: result: $LIBTOOL" >&5
5358 echo "${ECHO_T}$LIBTOOL" >&6
5359 else
5360   echo "$as_me:5360: result: no" >&5
5361 echo "${ECHO_T}no" >&6
5362 fi
5363
5364     test -n "$LIBTOOL" && break
5365   done
5366 fi
5367 if test -z "$LIBTOOL"; then
5368   ac_ct_LIBTOOL=$LIBTOOL
5369   for ac_prog in libtool glibtool
5370 do
5371   # Extract the first word of "$ac_prog", so it can be a program name with args.
5372 set dummy $ac_prog; ac_word=$2
5373 echo "$as_me:5373: checking for $ac_word" >&5
5374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5375 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5376   echo $ECHO_N "(cached) $ECHO_C" >&6
5377 else
5378   if test -n "$ac_ct_LIBTOOL"; then
5379   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5380 else
5381   ac_save_IFS=$IFS; IFS=$ac_path_separator
5382 ac_dummy="$PATH"
5383 for ac_dir in $ac_dummy; do
5384   IFS=$ac_save_IFS
5385   test -z "$ac_dir" && ac_dir=.
5386   $as_executable_p "$ac_dir/$ac_word" || continue
5387 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5388 echo "$as_me:5388: found $ac_dir/$ac_word" >&5
5389 break
5390 done
5391
5392 fi
5393 fi
5394 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5395 if test -n "$ac_ct_LIBTOOL"; then
5396   echo "$as_me:5396: result: $ac_ct_LIBTOOL" >&5
5397 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5398 else
5399   echo "$as_me:5399: result: no" >&5
5400 echo "${ECHO_T}no" >&6
5401 fi
5402
5403   test -n "$ac_ct_LIBTOOL" && break
5404 done
5405 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5406
5407   LIBTOOL=$ac_ct_LIBTOOL
5408 fi
5409
5410 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5411 then
5412         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.].*//'`
5413 else
5414         cf_cv_libtool_version=
5415 fi
5416 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5417
5418                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5419                 then
5420
5421 unset ac_cv_prog_ac_ct_LIBTOOL
5422 unset ac_ct_LIBTOOL
5423 unset LIBTOOL
5424
5425                         if test -n "$ac_tool_prefix"; then
5426   for ac_prog in glibtool
5427   do
5428     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5429 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5430 echo "$as_me:5430: checking for $ac_word" >&5
5431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5432 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5433   echo $ECHO_N "(cached) $ECHO_C" >&6
5434 else
5435   if test -n "$LIBTOOL"; then
5436   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5437 else
5438   ac_save_IFS=$IFS; IFS=$ac_path_separator
5439 ac_dummy="$PATH"
5440 for ac_dir in $ac_dummy; do
5441   IFS=$ac_save_IFS
5442   test -z "$ac_dir" && ac_dir=.
5443   $as_executable_p "$ac_dir/$ac_word" || continue
5444 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5445 echo "$as_me:5445: found $ac_dir/$ac_word" >&5
5446 break
5447 done
5448
5449 fi
5450 fi
5451 LIBTOOL=$ac_cv_prog_LIBTOOL
5452 if test -n "$LIBTOOL"; then
5453   echo "$as_me:5453: result: $LIBTOOL" >&5
5454 echo "${ECHO_T}$LIBTOOL" >&6
5455 else
5456   echo "$as_me:5456: result: no" >&5
5457 echo "${ECHO_T}no" >&6
5458 fi
5459
5460     test -n "$LIBTOOL" && break
5461   done
5462 fi
5463 if test -z "$LIBTOOL"; then
5464   ac_ct_LIBTOOL=$LIBTOOL
5465   for ac_prog in glibtool
5466 do
5467   # Extract the first word of "$ac_prog", so it can be a program name with args.
5468 set dummy $ac_prog; ac_word=$2
5469 echo "$as_me:5469: checking for $ac_word" >&5
5470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5471 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5472   echo $ECHO_N "(cached) $ECHO_C" >&6
5473 else
5474   if test -n "$ac_ct_LIBTOOL"; then
5475   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5476 else
5477   ac_save_IFS=$IFS; IFS=$ac_path_separator
5478 ac_dummy="$PATH"
5479 for ac_dir in $ac_dummy; do
5480   IFS=$ac_save_IFS
5481   test -z "$ac_dir" && ac_dir=.
5482   $as_executable_p "$ac_dir/$ac_word" || continue
5483 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5484 echo "$as_me:5484: found $ac_dir/$ac_word" >&5
5485 break
5486 done
5487
5488 fi
5489 fi
5490 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5491 if test -n "$ac_ct_LIBTOOL"; then
5492   echo "$as_me:5492: result: $ac_ct_LIBTOOL" >&5
5493 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5494 else
5495   echo "$as_me:5495: result: no" >&5
5496 echo "${ECHO_T}no" >&6
5497 fi
5498
5499   test -n "$ac_ct_LIBTOOL" && break
5500 done
5501 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5502
5503   LIBTOOL=$ac_ct_LIBTOOL
5504 fi
5505
5506 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5507 then
5508         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.].*//'`
5509 else
5510         cf_cv_libtool_version=
5511 fi
5512 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5513
5514                 fi
5515         fi
5516         if test -z "$LIBTOOL" ; then
5517                 { { echo "$as_me:5517: error: Cannot find libtool" >&5
5518 echo "$as_me: error: Cannot find libtool" >&2;}
5519    { (exit 1); exit 1; }; }
5520         fi
5521         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5522         LIB_OBJECT='${OBJECTS:.o=.lo}'
5523         LIB_SUFFIX=.la
5524         LIB_CLEAN='${LIBTOOL} --mode=clean'
5525         LIB_COMPILE='${LIBTOOL} --mode=compile'
5526         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5527         LIB_INSTALL='${LIBTOOL} --mode=install'
5528         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5529         LIB_PREP=:
5530
5531 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5532 then
5533         echo "$as_me:5533: checking version of $LIBTOOL" >&5
5534 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5535
5536 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5537 then
5538         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.].*//'`
5539 else
5540         cf_cv_libtool_version=
5541 fi
5542 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5543
5544         echo "$as_me:5544: result: $cf_cv_libtool_version" >&5
5545 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5546         if test -z "$cf_cv_libtool_version" ; then
5547                 { { echo "$as_me:5547: error: This is not GNU libtool" >&5
5548 echo "$as_me: error: This is not GNU libtool" >&2;}
5549    { (exit 1); exit 1; }; }
5550         fi
5551 else
5552         { { echo "$as_me:5552: error: GNU libtool has not been found" >&5
5553 echo "$as_me: error: GNU libtool has not been found" >&2;}
5554    { (exit 1); exit 1; }; }
5555 fi
5556
5557         # special hack to add -no-undefined (which libtool should do for itself)
5558         LT_UNDEF=
5559         case "$cf_cv_system_name" in
5560         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5561                 LT_UNDEF=-no-undefined
5562                 ;;
5563         esac
5564
5565         # special hack to add --tag option for C++ compiler
5566         case "$cf_cv_libtool_version" in
5567         (1.[5-9]*|[2-9].[0-9.a-z]*)
5568                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5569                 LIBTOOL="$LIBTOOL --tag=CC"
5570                 ;;
5571         (*)
5572                 LIBTOOL_CXX="$LIBTOOL"
5573                 ;;
5574         esac
5575 else
5576         LIBTOOL=""
5577         LIBTOOL_CXX=""
5578 fi
5579
5580 test -z "$LIBTOOL" && ECHO_LT=
5581
5582 if test "$with_libtool" != "no" ; then
5583
5584 cf_list_models="$cf_list_models libtool"
5585
5586 else
5587
5588 echo "$as_me:5588: checking if you want to build shared libraries" >&5
5589 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5590
5591 # Check whether --with-shared or --without-shared was given.
5592 if test "${with_shared+set}" = set; then
5593   withval="$with_shared"
5594   with_shared=$withval
5595 else
5596   with_shared=no
5597 fi;
5598 echo "$as_me:5598: result: $with_shared" >&5
5599 echo "${ECHO_T}$with_shared" >&6
5600 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5601
5602 echo "$as_me:5602: checking if you want to build static libraries" >&5
5603 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5604
5605 # Check whether --with-normal or --without-normal was given.
5606 if test "${with_normal+set}" = set; then
5607   withval="$with_normal"
5608   with_normal=$withval
5609 else
5610   with_normal=yes
5611 fi;
5612 echo "$as_me:5612: result: $with_normal" >&5
5613 echo "${ECHO_T}$with_normal" >&6
5614 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5615
5616 echo "$as_me:5616: checking if you want to build debug libraries" >&5
5617 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5618
5619 # Check whether --with-debug or --without-debug was given.
5620 if test "${with_debug+set}" = set; then
5621   withval="$with_debug"
5622   with_debug=$withval
5623 else
5624   with_debug=yes
5625 fi;
5626 echo "$as_me:5626: result: $with_debug" >&5
5627 echo "${ECHO_T}$with_debug" >&6
5628 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5629
5630 echo "$as_me:5630: checking if you want to build profiling libraries" >&5
5631 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5632
5633 # Check whether --with-profile or --without-profile was given.
5634 if test "${with_profile+set}" = set; then
5635   withval="$with_profile"
5636   with_profile=$withval
5637 else
5638   with_profile=no
5639 fi;
5640 echo "$as_me:5640: result: $with_profile" >&5
5641 echo "${ECHO_T}$with_profile" >&6
5642 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5643
5644 fi
5645
5646 if test "X$cf_with_cxx_binding" != Xno; then
5647 if test "x$with_shared" = "xyes"; then
5648 echo "$as_me:5648: checking if you want to build C++ shared libraries" >&5
5649 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5650
5651 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5652 if test "${with_cxx_shared+set}" = set; then
5653   withval="$with_cxx_shared"
5654   with_shared_cxx=$withval
5655 else
5656   with_shared_cxx=no
5657 fi;
5658 echo "$as_me:5658: result: $with_shared_cxx" >&5
5659 echo "${ECHO_T}$with_shared_cxx" >&6
5660 fi
5661 fi
5662
5663 ###############################################################################
5664
5665 echo "$as_me:5665: checking for specified models" >&5
5666 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5667 test -z "$cf_list_models" && cf_list_models=normal
5668 test "$with_libtool" != "no" && cf_list_models=libtool
5669 echo "$as_me:5669: result: $cf_list_models" >&5
5670 echo "${ECHO_T}$cf_list_models" >&6
5671
5672 ### Use the first model as the default, and save its suffix for use in building
5673 ### up test-applications.
5674 echo "$as_me:5674: checking for default model" >&5
5675 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5676 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5677 echo "$as_me:5677: result: $DFT_LWR_MODEL" >&5
5678 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5679
5680 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5681
5682 TICS_NAME=tic
5683
5684 TINFO_NAME=tinfo
5685
5686 LIB_NAME=ncurses
5687
5688 LIB_DIR=../lib
5689 LIB_2ND=../../lib
5690
5691 echo "$as_me:5691: checking if you want to have a library-prefix" >&5
5692 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5693
5694 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5695 if test "${with_lib_prefix+set}" = set; then
5696   withval="$with_lib_prefix"
5697   with_lib_prefix=$withval
5698 else
5699   with_lib_prefix=auto
5700 fi;
5701 echo "$as_me:5701: result: $with_lib_prefix" >&5
5702 echo "${ECHO_T}$with_lib_prefix" >&6
5703
5704 if test "$with_lib_prefix" = auto
5705 then
5706
5707         case "$cf_cv_system_name" in
5708         (OS/2*|os2*)
5709                 if test "$DFT_LWR_MODEL" = libtool; then
5710                         LIB_PREFIX='lib'
5711                 else
5712                         LIB_PREFIX=''
5713                 fi
5714                 ;;
5715         (*-msvc*)
5716                 LIB_PREFIX=''
5717                 ;;
5718         (*)     LIB_PREFIX='lib'
5719                 ;;
5720         esac
5721 cf_prefix=$LIB_PREFIX
5722
5723 elif test "$with_lib_prefix" = no
5724 then
5725         LIB_PREFIX=
5726 else
5727         LIB_PREFIX=$with_lib_prefix
5728 fi
5729
5730 LIB_SUFFIX=
5731
5732         echo "$as_me:5732: checking for PATH separator" >&5
5733 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5734         case "$cf_cv_system_name" in
5735         (os2*)  PATH_SEPARATOR=';'  ;;
5736         (*)     ${PATH_SEPARATOR:=':'}  ;;
5737         esac
5738
5739         echo "$as_me:5739: result: $PATH_SEPARATOR" >&5
5740 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5741
5742 ###############################################################################
5743
5744 echo "$as_me:5744: checking if you want to build a separate terminfo library" >&5
5745 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5746
5747 # Check whether --with-termlib or --without-termlib was given.
5748 if test "${with_termlib+set}" = set; then
5749   withval="$with_termlib"
5750   with_termlib=$withval
5751 else
5752   with_termlib=no
5753 fi;
5754 echo "$as_me:5754: result: $with_termlib" >&5
5755 echo "${ECHO_T}$with_termlib" >&6
5756
5757 echo "$as_me:5757: checking if you want to build a separate tic library" >&5
5758 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5759
5760 # Check whether --with-ticlib or --without-ticlib was given.
5761 if test "${with_ticlib+set}" = set; then
5762   withval="$with_ticlib"
5763   with_ticlib=$withval
5764 else
5765   with_ticlib=no
5766 fi;
5767 echo "$as_me:5767: result: $with_ticlib" >&5
5768 echo "${ECHO_T}$with_ticlib" >&6
5769
5770 if test X"$CC_G_OPT" = X"" ; then
5771         CC_G_OPT='-g'
5772         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5773 fi
5774
5775 if test X"$CXX_G_OPT" = X"" ; then
5776         CXX_G_OPT='-g'
5777         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5778 fi
5779
5780 echo "$as_me:5780: checking for default loader flags" >&5
5781 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5782 case "$DFT_LWR_MODEL" in
5783 (libtool) LD_MODEL=''   ;;
5784 (normal)  LD_MODEL=''   ;;
5785 (debug)   LD_MODEL=$CC_G_OPT ;;
5786 (profile) LD_MODEL='-pg';;
5787 (shared)  LD_MODEL=''   ;;
5788 esac
5789 echo "$as_me:5789: result: $LD_MODEL" >&5
5790 echo "${ECHO_T}$LD_MODEL" >&6
5791
5792 case "$DFT_LWR_MODEL" in
5793 (shared)
5794
5795 echo "$as_me:5795: checking if rpath option should be used" >&5
5796 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5797
5798 # Check whether --enable-rpath or --disable-rpath was given.
5799 if test "${enable_rpath+set}" = set; then
5800   enableval="$enable_rpath"
5801   cf_cv_enable_rpath=$enableval
5802 else
5803   cf_cv_enable_rpath=no
5804 fi;
5805 echo "$as_me:5805: result: $cf_cv_enable_rpath" >&5
5806 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5807
5808 echo "$as_me:5808: checking if shared libraries should be relinked during install" >&5
5809 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5810
5811 # Check whether --enable-relink or --disable-relink was given.
5812 if test "${enable_relink+set}" = set; then
5813   enableval="$enable_relink"
5814   cf_cv_do_relink=$enableval
5815 else
5816   cf_cv_do_relink=yes
5817 fi;
5818 echo "$as_me:5818: result: $cf_cv_do_relink" >&5
5819 echo "${ECHO_T}$cf_cv_do_relink" >&6
5820         ;;
5821 esac
5822
5823 # we will build libraries one-level down.
5824 rel_builddir=..
5825
5826 LD_RPATH_OPT=
5827 if test "x$cf_cv_enable_rpath" != xno
5828 then
5829         echo "$as_me:5829: checking for an rpath option" >&5
5830 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5831         case "$cf_cv_system_name" in
5832         (irix*)
5833                 if test "$GCC" = yes; then
5834                         LD_RPATH_OPT="-Wl,-rpath,"
5835                 else
5836                         LD_RPATH_OPT="-rpath "
5837                 fi
5838                 ;;
5839         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5840                 LD_RPATH_OPT="-Wl,-rpath,"
5841                 ;;
5842         (openbsd[2-9].*|mirbsd*)
5843                 LD_RPATH_OPT="-Wl,-rpath,"
5844                 ;;
5845         (dragonfly*)
5846                 LD_RPATH_OPT="-rpath "
5847                 ;;
5848         (netbsd*)
5849                 LD_RPATH_OPT="-Wl,-rpath,"
5850                 ;;
5851         (osf*|mls+*)
5852                 LD_RPATH_OPT="-rpath "
5853                 ;;
5854         (solaris2*)
5855                 LD_RPATH_OPT="-R"
5856                 ;;
5857         (*)
5858                 ;;
5859         esac
5860         echo "$as_me:5860: result: $LD_RPATH_OPT" >&5
5861 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5862
5863         case "x$LD_RPATH_OPT" in
5864         (x-R*)
5865                 echo "$as_me:5865: checking if we need a space after rpath option" >&5
5866 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5867                 cf_save_LIBS="$LIBS"
5868
5869 cf_add_libs="$LIBS"
5870 # reverse order
5871 cf_add_0lib=
5872 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5873 # filter duplicates
5874 for cf_add_1lib in $cf_add_0lib; do
5875         for cf_add_2lib in $cf_add_libs; do
5876                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5877                         cf_add_1lib=
5878                         break
5879                 fi
5880         done
5881         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5882 done
5883 LIBS="$cf_add_libs"
5884
5885                 cat >"conftest.$ac_ext" <<_ACEOF
5886 #line 5886 "configure"
5887 #include "confdefs.h"
5888
5889 int
5890 main (void)
5891 {
5892
5893   ;
5894   return 0;
5895 }
5896 _ACEOF
5897 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5898 if { (eval echo "$as_me:5898: \"$ac_link\"") >&5
5899   (eval $ac_link) 2>&5
5900   ac_status=$?
5901   echo "$as_me:5901: \$? = $ac_status" >&5
5902   (exit "$ac_status"); } &&
5903          { ac_try='test -s "conftest$ac_exeext"'
5904   { (eval echo "$as_me:5904: \"$ac_try\"") >&5
5905   (eval $ac_try) 2>&5
5906   ac_status=$?
5907   echo "$as_me:5907: \$? = $ac_status" >&5
5908   (exit "$ac_status"); }; }; then
5909   cf_rpath_space=no
5910 else
5911   echo "$as_me: failed program was:" >&5
5912 cat "conftest.$ac_ext" >&5
5913 cf_rpath_space=yes
5914 fi
5915 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5916                 LIBS="$cf_save_LIBS"
5917                 echo "$as_me:5917: result: $cf_rpath_space" >&5
5918 echo "${ECHO_T}$cf_rpath_space" >&6
5919                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5920                 ;;
5921         esac
5922 fi
5923
5924         RM_SHARED_OPTS=
5925         LOCAL_LDFLAGS=
5926         LOCAL_LDFLAGS2=
5927         LD_SHARED_OPTS=
5928         INSTALL_LIB="-m 644"
5929         : ${rel_builddir:=.}
5930
5931         shlibdir=$libdir
5932
5933         MAKE_DLLS="#"
5934
5935         cf_cv_do_symlinks=no
5936         cf_ld_rpath_opt=
5937         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5938
5939         echo "$as_me:5939: checking if release/abi version should be used for shared libs" >&5
5940 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5941
5942 # Check whether --with-shlib-version or --without-shlib-version was given.
5943 if test "${with_shlib_version+set}" = set; then
5944   withval="$with_shlib_version"
5945   test -z "$withval" && withval=auto
5946         case "$withval" in
5947         (yes)
5948                 cf_cv_shlib_version=auto
5949                 ;;
5950         (rel|abi|auto)
5951                 cf_cv_shlib_version=$withval
5952                 ;;
5953         (*)
5954                 echo "$as_me:5954: result: $withval" >&5
5955 echo "${ECHO_T}$withval" >&6
5956                 { { echo "$as_me:5956: error: option value must be one of: rel, abi, or auto" >&5
5957 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5958    { (exit 1); exit 1; }; }
5959                 ;;
5960         esac
5961
5962 else
5963   cf_cv_shlib_version=auto
5964 fi;
5965         echo "$as_me:5965: result: $cf_cv_shlib_version" >&5
5966 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5967
5968         cf_cv_rm_so_locs=no
5969         cf_try_cflags=
5970
5971         # Some less-capable ports of gcc support only -fpic
5972         CC_SHARED_OPTS=
5973
5974         cf_try_fPIC=no
5975         if test "$GCC" = yes
5976         then
5977                 cf_try_fPIC=yes
5978         else
5979                 case "$cf_cv_system_name" in
5980                 (*linux*)       # e.g., PGI compiler
5981                         cf_try_fPIC=yes
5982                         ;;
5983                 esac
5984         fi
5985
5986         if test "$cf_try_fPIC" = yes
5987         then
5988                 echo "$as_me:5988: checking which $CC option to use" >&5
5989 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5990                 cf_save_CFLAGS="$CFLAGS"
5991                 for CC_SHARED_OPTS in -fPIC -fpic ''
5992                 do
5993                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5994                         cat >"conftest.$ac_ext" <<_ACEOF
5995 #line 5995 "configure"
5996 #include "confdefs.h"
5997 #include <stdio.h>
5998 int
5999 main (void)
6000 {
6001 int x = 1
6002   ;
6003   return 0;
6004 }
6005 _ACEOF
6006 rm -f "conftest.$ac_objext"
6007 if { (eval echo "$as_me:6007: \"$ac_compile\"") >&5
6008   (eval $ac_compile) 2>&5
6009   ac_status=$?
6010   echo "$as_me:6010: \$? = $ac_status" >&5
6011   (exit "$ac_status"); } &&
6012          { ac_try='test -s "conftest.$ac_objext"'
6013   { (eval echo "$as_me:6013: \"$ac_try\"") >&5
6014   (eval $ac_try) 2>&5
6015   ac_status=$?
6016   echo "$as_me:6016: \$? = $ac_status" >&5
6017   (exit "$ac_status"); }; }; then
6018   break
6019 else
6020   echo "$as_me: failed program was:" >&5
6021 cat "conftest.$ac_ext" >&5
6022 fi
6023 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6024                 done
6025                 echo "$as_me:6025: result: $CC_SHARED_OPTS" >&5
6026 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6027                 CFLAGS="$cf_save_CFLAGS"
6028         fi
6029
6030         cf_cv_shlib_version_infix=no
6031
6032         case "$cf_cv_system_name" in
6033         (aix4.3-9*|aix[5-7]*)
6034                 if test "$GCC" = yes; then
6035                         CC_SHARED_OPTS='-Wl,-brtl'
6036                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6037                 else
6038                         CC_SHARED_OPTS='-brtl'
6039                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6040                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6041                 fi
6042                 ;;
6043         (beos*)
6044                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6045                 ;;
6046         (cygwin*)
6047                 CC_SHARED_OPTS=
6048                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6049                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6050                 cf_cv_shlib_version=cygdll
6051                 cf_cv_shlib_version_infix=cygdll
6052                 shlibdir=$bindir
6053                 MAKE_DLLS=
6054                 cat >mk_shared_lib.sh <<-CF_EOF
6055                 #!$SHELL
6056                 SHARED_LIB=\$1
6057                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6058                 shift
6059                 cat <<-EOF
6060                 Linking shared library
6061                 ** SHARED_LIB \$SHARED_LIB
6062                 ** IMPORT_LIB \$IMPORT_LIB
6063 EOF
6064                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6065 CF_EOF
6066                 chmod +x mk_shared_lib.sh
6067                 ;;
6068         (msys*)
6069                 CC_SHARED_OPTS=
6070                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6071                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6072                 cf_cv_shlib_version=msysdll
6073                 cf_cv_shlib_version_infix=msysdll
6074                 shlibdir=$bindir
6075                 MAKE_DLLS=
6076                 cat >mk_shared_lib.sh <<-CF_EOF
6077                 #!$SHELL
6078                 SHARED_LIB=\$1
6079                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6080                 shift
6081                 cat <<-EOF
6082                 Linking shared library
6083                 ** SHARED_LIB \$SHARED_LIB
6084                 ** IMPORT_LIB \$IMPORT_LIB
6085 EOF
6086                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6087 CF_EOF
6088                 chmod +x mk_shared_lib.sh
6089                 ;;
6090         (darwin*)
6091                 cf_try_cflags="no-cpp-precomp"
6092                 CC_SHARED_OPTS="-dynamic"
6093                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6094                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6095                 cf_cv_shlib_version_infix=yes
6096                 echo "$as_me:6096: checking if ld -search_paths_first works" >&5
6097 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6098 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6099   echo $ECHO_N "(cached) $ECHO_C" >&6
6100 else
6101
6102                         cf_save_LDFLAGS=$LDFLAGS
6103                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6104                         cat >"conftest.$ac_ext" <<_ACEOF
6105 #line 6105 "configure"
6106 #include "confdefs.h"
6107
6108 int
6109 main (void)
6110 {
6111 int i;
6112   ;
6113   return 0;
6114 }
6115 _ACEOF
6116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6117 if { (eval echo "$as_me:6117: \"$ac_link\"") >&5
6118   (eval $ac_link) 2>&5
6119   ac_status=$?
6120   echo "$as_me:6120: \$? = $ac_status" >&5
6121   (exit "$ac_status"); } &&
6122          { ac_try='test -s "conftest$ac_exeext"'
6123   { (eval echo "$as_me:6123: \"$ac_try\"") >&5
6124   (eval $ac_try) 2>&5
6125   ac_status=$?
6126   echo "$as_me:6126: \$? = $ac_status" >&5
6127   (exit "$ac_status"); }; }; then
6128   cf_cv_ldflags_search_paths_first=yes
6129 else
6130   echo "$as_me: failed program was:" >&5
6131 cat "conftest.$ac_ext" >&5
6132 cf_cv_ldflags_search_paths_first=no
6133 fi
6134 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6135                                 LDFLAGS=$cf_save_LDFLAGS
6136 fi
6137 echo "$as_me:6137: result: $cf_cv_ldflags_search_paths_first" >&5
6138 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6139                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6140                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6141                 fi
6142                 ;;
6143         (hpux[7-8]*)
6144                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6145                 if test "$GCC" != yes; then
6146                         CC_SHARED_OPTS='+Z'
6147                 fi
6148                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6149                 INSTALL_LIB="-m 555"
6150                 ;;
6151         (hpux*)
6152                 # (tested with gcc 2.7.2 -- I don't have c89)
6153                 if test "$GCC" = yes; then
6154                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6155                 else
6156                         CC_SHARED_OPTS='+Z'
6157                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6158                 fi
6159                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6160                 # HP-UX shared libraries must be executable, and should be
6161                 # readonly to exploit a quirk in the memory manager.
6162                 INSTALL_LIB="-m 555"
6163                 ;;
6164         (interix*)
6165                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6166                 if test "$cf_cv_shlib_version" = rel; then
6167                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6168                 else
6169                         cf_shared_soname='`basename $@`'
6170                 fi
6171                 CC_SHARED_OPTS=
6172                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6173                 ;;
6174         (irix*)
6175                 if test "$cf_cv_enable_rpath" = yes ; then
6176                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6177                 fi
6178                 # tested with IRIX 5.2 and 'cc'.
6179                 if test "$GCC" != yes; then
6180                         CC_SHARED_OPTS='-KPIC'
6181                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6182                 else
6183                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6184                 fi
6185                 cf_cv_rm_so_locs=yes
6186                 ;;
6187         (linux*|gnu*|k*bsd*-gnu)
6188                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6189                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6190                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6191                 fi
6192                 if test "$cf_cv_enable_rpath" = yes ; then
6193                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6194                 fi
6195
6196         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6197         if test "$cf_cv_shlib_version" = rel; then
6198                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6199         else
6200                 cf_cv_shared_soname='`basename $@`'
6201         fi
6202
6203                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6204                 ;;
6205         (mingw*msvc*)
6206                 cf_cv_shlib_version=msvcdll
6207                 cf_cv_shlib_version_infix=msvcdll
6208                 shlibdir=$bindir
6209                 MAKE_DLLS=
6210                 if test "$DFT_LWR_MODEL" = "shared" ; then
6211                         LOCAL_LDFLAGS="-link -dll"
6212                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6213                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6214                 fi
6215                 CC_SHARED_OPTS=
6216                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6217                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6218                 cat >mk_shared_lib.sh <<-CF_EOF
6219                 #!$SHELL
6220                 SHARED_LIB=\$1
6221                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6222                 shift
6223                 my_ld=\$1
6224                 shift
6225                 cat <<-EOF
6226                 Linking shared library
6227                 ** SHARED LIB \$SHARED_LIB
6228                 ** IMPORT_LIB \$IMPORT_LIB
6229 EOF
6230                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6231                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6232                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6233 CF_EOF
6234                 chmod +x mk_shared_lib.sh
6235                 cat >mk_prog.sh <<-CF_EOF
6236                 #!$SHELL
6237                 shift
6238                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6239                 LD="$LD"
6240                 clopts=()
6241                 ldopts=("/subsystem:console")
6242                 libs=()
6243                 isdll=0
6244                 while test \$# -gt 0; do
6245                         case "\$1" in
6246                                 -link)
6247                                         # ignore -link argument
6248                                         ;;
6249                                 -M[TD] | -M[TD]d)
6250                                         # ignore runtime-library option
6251                                         ;;
6252                                 -dll)
6253                                         isdll=1
6254                                         ;;
6255                                 -W* | -w*)
6256                                         # ignore warnings
6257                                         ;;
6258                                 -D*)
6259                                         clopts+=("\$1")
6260                                         ;;
6261                                 -I*)
6262                                         clopts+=("\$1")
6263                                         ;;
6264                                 -l*)
6265                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6266                                         ;;
6267                                 -L*)
6268                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6269                                         ;;
6270                                 *.obj | *.o)
6271                                         ldopts+=("\$1")
6272                                         ;;
6273                                 -Wl,*)
6274                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6275                                                 ldopts+=("\${linkarg}")
6276                                         done
6277                                         ;;
6278                                 *.lib)
6279                                         ldopts+=("\$1")
6280                                         ;;
6281                                 -o)
6282                                         shift
6283                                         ldopts+=("-out:\$1")
6284                                         ;;
6285                                 *)
6286                                         clopts+=("\$1")
6287                                         ldopts+=("\$1")
6288                                         ;;
6289                         esac
6290                         shift
6291                 done
6292                 if [ "\$isdll" -ne 0 ]; then
6293                         for lib in \${libs[*]}; do
6294                                 ldopts+=("\$lib.dll.lib")
6295                         done
6296                 else
6297                         for lib in \${libs[*]}; do
6298                                 ldopts+=("\$lib.lib")
6299                         done
6300                 fi
6301                 cat <<-EOF
6302                 Creating program
6303                 ** ld options:   "\${ldopts[@]}"
6304 EOF
6305                 exec \$LD \${ldopts[@]}
6306 CF_EOF
6307                 chmod +x mk_prog.sh
6308                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6309                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6310                 ;;
6311         (mingw*)
6312                 cf_cv_shlib_version=mingw
6313                 cf_cv_shlib_version_infix=mingw
6314                 shlibdir=$bindir
6315                 MAKE_DLLS=
6316                 if test "$DFT_LWR_MODEL" = "shared" ; then
6317                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6318                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6319                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6320                 fi
6321                 CC_SHARED_OPTS=
6322                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6323                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6324                 cat >mk_shared_lib.sh <<-CF_EOF
6325                 #!$SHELL
6326                 SHARED_LIB=\$1
6327                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6328                 shift
6329                 cat <<-EOF
6330                 Linking shared library
6331                 ** SHARED_LIB \$SHARED_LIB
6332                 ** IMPORT_LIB \$IMPORT_LIB
6333 EOF
6334                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6335 CF_EOF
6336                 chmod +x mk_shared_lib.sh
6337                 ;;
6338         (openbsd[2-9].*|mirbsd*)
6339                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6340                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6341                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6342                 fi
6343                 if test "$cf_cv_enable_rpath" = yes ; then
6344                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6345                 fi
6346                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6347
6348         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6349         if test "$cf_cv_shlib_version" = rel; then
6350                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6351         else
6352                 cf_cv_shared_soname='`basename $@`'
6353         fi
6354
6355                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6356                 ;;
6357         (nskJ*)
6358                 CC_SHARED_OPTS=
6359                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6360                 ;;
6361         (nskL*)
6362                 CC_SHARED_OPTS=
6363                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6364                 ;;
6365         (nto-qnx*|openbsd*|freebsd[12].*)
6366                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6367                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6368                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6369                 ;;
6370         (dragonfly*|freebsd*)
6371                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6372                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6373                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6374                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6375                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6376                 fi
6377
6378         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6379         if test "$cf_cv_shlib_version" = rel; then
6380                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6381         else
6382                 cf_cv_shared_soname='`basename $@`'
6383         fi
6384
6385                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6386                 ;;
6387         (netbsd*)
6388                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6389                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6390                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6391                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6392                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6393                         if test "$cf_cv_shlib_version" = auto; then
6394                         if test -f /usr/libexec/ld.elf_so; then
6395                                 cf_cv_shlib_version=abi
6396                         else
6397                                 cf_cv_shlib_version=rel
6398                         fi
6399                         fi
6400
6401         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6402         if test "$cf_cv_shlib_version" = rel; then
6403                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6404         else
6405                 cf_cv_shared_soname='`basename $@`'
6406         fi
6407
6408                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6409                 else
6410                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6411                 fi
6412                 ;;
6413         (osf*|mls+*)
6414                 # tested with OSF/1 V3.2 and 'cc'
6415                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6416                 # link with shared libs).
6417                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6418                 case "$host_os" in
6419                 (osf4*)
6420                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6421                         ;;
6422                 esac
6423                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6424                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6425                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6426                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6427                 fi
6428                 cf_cv_rm_so_locs=yes
6429                 ;;
6430         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6431                 # tested with osr5.0.5
6432                 if test "$GCC" != yes; then
6433                         CC_SHARED_OPTS='-belf -KPIC'
6434                 fi
6435                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6436                 if test "$cf_cv_enable_rpath" = yes ; then
6437                         # only way is to set LD_RUN_PATH but no switch for it
6438                         RUN_PATH=$libdir
6439                 fi
6440                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6441                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6442                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6443                 ;;
6444         (sunos4*)
6445                 # tested with SunOS 4.1.1 and gcc 2.7.0
6446                 if test "$GCC" != yes; then
6447                         CC_SHARED_OPTS='-KPIC'
6448                 fi
6449                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6450                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6451                 ;;
6452         (solaris2*)
6453                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6454                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6455                 if test "$DFT_LWR_MODEL" = "shared" ; then
6456                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6457                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6458                 fi
6459                 if test "$cf_cv_enable_rpath" = yes ; then
6460                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6461                 fi
6462
6463         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6464         if test "$cf_cv_shlib_version" = rel; then
6465                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6466         else
6467                 cf_cv_shared_soname='`basename $@`'
6468         fi
6469
6470                 if test "$GCC" != yes; then
6471                         cf_save_CFLAGS="$CFLAGS"
6472                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6473                         do
6474                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6475                                 cat >"conftest.$ac_ext" <<_ACEOF
6476 #line 6476 "configure"
6477 #include "confdefs.h"
6478 #include <stdio.h>
6479 int
6480 main (void)
6481 {
6482 printf("Hello\\n");
6483   ;
6484   return 0;
6485 }
6486 _ACEOF
6487 rm -f "conftest.$ac_objext"
6488 if { (eval echo "$as_me:6488: \"$ac_compile\"") >&5
6489   (eval $ac_compile) 2>&5
6490   ac_status=$?
6491   echo "$as_me:6491: \$? = $ac_status" >&5
6492   (exit "$ac_status"); } &&
6493          { ac_try='test -s "conftest.$ac_objext"'
6494   { (eval echo "$as_me:6494: \"$ac_try\"") >&5
6495   (eval $ac_try) 2>&5
6496   ac_status=$?
6497   echo "$as_me:6497: \$? = $ac_status" >&5
6498   (exit "$ac_status"); }; }; then
6499   break
6500 else
6501   echo "$as_me: failed program was:" >&5
6502 cat "conftest.$ac_ext" >&5
6503 fi
6504 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6505                         done
6506                         CFLAGS="$cf_save_CFLAGS"
6507                         CC_SHARED_OPTS=$cf_shared_opts
6508                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6509                 else
6510                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6511                 fi
6512                 ;;
6513         (sysv5uw7*|unix_sv*)
6514                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6515                 if test "$GCC" != yes; then
6516                         CC_SHARED_OPTS='-KPIC'
6517                 fi
6518                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6519                 ;;
6520         (*)
6521                 CC_SHARED_OPTS='unknown'
6522                 MK_SHARED_LIB='echo unknown'
6523                 ;;
6524         esac
6525
6526         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6527         case "$cf_cv_shlib_version" in
6528         (rel|abi)
6529                 case "$MK_SHARED_LIB" in
6530                 (*'-o $@')
6531                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6532                         ;;
6533                 (*)
6534                         { echo "$as_me:6534: WARNING: ignored --with-shlib-version" >&5
6535 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6536                         ;;
6537                 esac
6538                 ;;
6539         esac
6540
6541         if test -n "$cf_try_cflags"
6542         then
6543 cat > conftest.$ac_ext <<EOF
6544 #line 6544 "${as_me:-configure}"
6545 #include <stdio.h>
6546 int main(int argc, char *argv[])
6547 {
6548         printf("hello\\n");
6549         return (argv[argc-1] == 0) ;
6550 }
6551 EOF
6552                 cf_save_CFLAGS="$CFLAGS"
6553                 for cf_opt in $cf_try_cflags
6554                 do
6555                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6556                         echo "$as_me:6556: checking if CFLAGS option -$cf_opt works" >&5
6557 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6558                         if { (eval echo "$as_me:6558: \"$ac_compile\"") >&5
6559   (eval $ac_compile) 2>&5
6560   ac_status=$?
6561   echo "$as_me:6561: \$? = $ac_status" >&5
6562   (exit "$ac_status"); }; then
6563                                 echo "$as_me:6563: result: yes" >&5
6564 echo "${ECHO_T}yes" >&6
6565                                 cf_save_CFLAGS="$CFLAGS"
6566                         else
6567                                 echo "$as_me:6567: result: no" >&5
6568 echo "${ECHO_T}no" >&6
6569                         fi
6570                 done
6571                 CFLAGS="$cf_save_CFLAGS"
6572         fi
6573
6574         # RPATH_LIST is a colon-separated list of directories
6575         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6576         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6577
6578         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6579
6580         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6581
6582 echo "${as_me:-configure}:6582: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6583
6584         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6585
6586 echo "${as_me:-configure}:6586: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6587
6588 for model in $cf_list_models ; do
6589         case "$model" in
6590         (libtool)
6591
6592 echo "$as_me:6592: checking for additional libtool options" >&5
6593 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6594
6595 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6596 if test "${with_libtool_opts+set}" = set; then
6597   withval="$with_libtool_opts"
6598   with_libtool_opts=$withval
6599 else
6600   with_libtool_opts=no
6601 fi;
6602 echo "$as_me:6602: result: $with_libtool_opts" >&5
6603 echo "${ECHO_T}$with_libtool_opts" >&6
6604
6605 case .$with_libtool_opts in
6606 (.yes|.no|.)
6607         ;;
6608 (*)
6609         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6610         ;;
6611 esac
6612
6613 echo "$as_me:6613: checking if exported-symbols file should be used" >&5
6614 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6615
6616 # Check whether --with-export-syms or --without-export-syms was given.
6617 if test "${with_export_syms+set}" = set; then
6618   withval="$with_export_syms"
6619   with_export_syms=$withval
6620 else
6621   with_export_syms=no
6622 fi;
6623 if test "x$with_export_syms" = xyes
6624 then
6625         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6626
6627 fi
6628 echo "$as_me:6628: result: $with_export_syms" >&5
6629 echo "${ECHO_T}$with_export_syms" >&6
6630 if test "x$with_export_syms" != xno
6631 then
6632         EXPORT_SYMS="-export-symbols $with_export_syms"
6633
6634 fi
6635
6636                 ;;
6637         (shared)
6638                 if test "$CC_SHARED_OPTS" = "unknown"; then
6639                         { { echo "$as_me:6639: error: Shared libraries are not supported in this version" >&5
6640 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6641    { (exit 1); exit 1; }; }
6642                 fi
6643                 # workaround for inept transition to PIE vs PIC...
6644                 echo "$as_me:6644: checking if current CFLAGS link properly" >&5
6645 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6646                 cat >"conftest.$ac_ext" <<_ACEOF
6647 #line 6647 "configure"
6648 #include "confdefs.h"
6649 #include <stdio.h>
6650 int
6651 main (void)
6652 {
6653 printf("Hello work\\n");
6654   ;
6655   return 0;
6656 }
6657 _ACEOF
6658 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6659 if { (eval echo "$as_me:6659: \"$ac_link\"") >&5
6660   (eval $ac_link) 2>&5
6661   ac_status=$?
6662   echo "$as_me:6662: \$? = $ac_status" >&5
6663   (exit "$ac_status"); } &&
6664          { ac_try='test -s "conftest$ac_exeext"'
6665   { (eval echo "$as_me:6665: \"$ac_try\"") >&5
6666   (eval $ac_try) 2>&5
6667   ac_status=$?
6668   echo "$as_me:6668: \$? = $ac_status" >&5
6669   (exit "$ac_status"); }; }; then
6670   cf_cflags_work=yes
6671 else
6672   echo "$as_me: failed program was:" >&5
6673 cat "conftest.$ac_ext" >&5
6674 cf_cflags_work=no
6675 fi
6676 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6677                 echo "$as_me:6677: result: $cf_cflags_work" >&5
6678 echo "${ECHO_T}$cf_cflags_work" >&6
6679                 if test "$cf_cflags_work" = no
6680                 then
6681                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6682
6683 echo "${as_me:-configure}:6683: testing try to work around by appending shared-options ..." 1>&5
6684
6685                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6686                 fi
6687
6688 echo "$as_me:6688: checking if versioned-symbols file should be used" >&5
6689 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6690
6691 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6692 if test "${with_versioned_syms+set}" = set; then
6693   withval="$with_versioned_syms"
6694   with_versioned_syms=$withval
6695 else
6696   with_versioned_syms=no
6697 fi;
6698 case "x$with_versioned_syms" in
6699 (xyes)
6700         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6701
6702         ;;
6703 (xno)
6704         ;;
6705 (x/*)
6706         test -f "$with_versioned_syms" || { { echo "$as_me:6706: error: expected a filename: $with_versioned_syms" >&5
6707 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6708    { (exit 1); exit 1; }; }
6709         ;;
6710 (*)
6711         test -f "$with_versioned_syms" || { { echo "$as_me:6711: error: expected a filename: $with_versioned_syms" >&5
6712 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6713    { (exit 1); exit 1; }; }
6714         with_versioned_syms=`pwd`/"$with_versioned_syms"
6715         ;;
6716 esac
6717 echo "$as_me:6717: result: $with_versioned_syms" >&5
6718 echo "${ECHO_T}$with_versioned_syms" >&6
6719
6720 RESULTING_SYMS=
6721 VERSIONED_SYMS=
6722 WILDCARD_SYMS=
6723
6724 if test "x$with_versioned_syms" != xno
6725 then
6726         RESULTING_SYMS=$with_versioned_syms
6727         case "x$MK_SHARED_LIB" in
6728         (*-Wl,*)
6729                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6730                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6731                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6732
6733 echo "${as_me:-configure}:6733: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6734
6735                 ;;
6736         (*-dy\ *)
6737                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6738                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6739                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6740
6741 echo "${as_me:-configure}:6741: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6742
6743                 ;;
6744         (*)
6745                 { echo "$as_me:6745: WARNING: this system does not support versioned-symbols" >&5
6746 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6747                 ;;
6748         esac
6749
6750         # Linux ld can selectively override scope, e.g., of symbols beginning with
6751         # "_" by first declaring some as global, and then using a wildcard to
6752         # declare the others as local.  Some other loaders cannot do this.  Check
6753         # by constructing a (very) simple shared library and inspecting its
6754         # symbols.
6755         if test "x$VERSIONED_SYMS" != "x"
6756         then
6757                 echo "$as_me:6757: checking if wildcards can be used to selectively omit symbols" >&5
6758 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6759                 WILDCARD_SYMS=no
6760
6761                 # make sources
6762                 rm -f conftest.*
6763
6764                 cat >conftest.ver <<EOF
6765 module_1.0 {
6766 global:
6767         globalf1;
6768 local:
6769         localf1;
6770 };
6771 module_2.0 {
6772 global:
6773         globalf2;
6774 local:
6775         localf2;
6776         _*;
6777 } module_1.0;
6778 submodule_1.0 {
6779 global:
6780         subglobalf1;
6781         _ismissing;
6782 local:
6783         sublocalf1;
6784 };
6785 submodule_2.0 {
6786 global:
6787         subglobalf2;
6788 local:
6789         sublocalf2;
6790         _*;
6791 } submodule_1.0;
6792 EOF
6793                 cat >conftest.$ac_ext <<EOF
6794 #line 6794 "configure"
6795 int     _ismissing(void) { return 1; }
6796 int     _localf1(void) { return 1; }
6797 int     _localf2(void) { return 2; }
6798 int     globalf1(void) { return 1; }
6799 int     globalf2(void) { return 2; }
6800 int     _sublocalf1(void) { return 1; }
6801 int     _sublocalf2(void) { return 2; }
6802 int     subglobalf1(void) { return 1; }
6803 int     subglobalf2(void) { return 2; }
6804 EOF
6805                 cat >conftest.mk <<EOF
6806 CC=${CC}
6807 CFLAGS=${CFLAGS}
6808 CPPFLAGS=${CPPFLAGS}
6809 LDFLAGS=${LDFLAGS}
6810 LIBS=${LIBS}
6811 VERSIONED_SYMS=${VERSIONED_SYMS}
6812 RESULTING_SYMS=conftest.ver
6813 MK_SHARED_LIB=${MK_SHARED_LIB}
6814 conftest.so: conftest.$ac_cv_objext
6815                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6816 EOF
6817
6818                 # compile source, make library
6819                 if make -f conftest.mk 2>&5 >/dev/null
6820                 then
6821                         # test for missing symbol in either Data or Text section
6822                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6823                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6824                 fi
6825                 echo "$as_me:6825: result: $WILDCARD_SYMS" >&5
6826 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6827                 rm -f conftest.*
6828         fi
6829 fi
6830
6831                 ;;
6832         esac
6833 done
6834
6835 ### Checks for special libraries, must be done up-front.
6836 SHLIB_LIST=""
6837
6838 echo "$as_me:6838: checking if you want to link with the GPM mouse library" >&5
6839 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6840
6841 # Check whether --with-gpm or --without-gpm was given.
6842 if test "${with_gpm+set}" = set; then
6843   withval="$with_gpm"
6844   with_gpm=$withval
6845 else
6846   with_gpm=maybe
6847 fi;
6848 echo "$as_me:6848: result: $with_gpm" >&5
6849 echo "${ECHO_T}$with_gpm" >&6
6850
6851 if test "$with_gpm" != no ; then
6852         echo "$as_me:6852: checking for gpm.h" >&5
6853 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6854 if test "${ac_cv_header_gpm_h+set}" = set; then
6855   echo $ECHO_N "(cached) $ECHO_C" >&6
6856 else
6857   cat >"conftest.$ac_ext" <<_ACEOF
6858 #line 6858 "configure"
6859 #include "confdefs.h"
6860 #include <gpm.h>
6861 _ACEOF
6862 if { (eval echo "$as_me:6862: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6863   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6864   ac_status=$?
6865   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6866   rm -f conftest.er1
6867   cat conftest.err >&5
6868   echo "$as_me:6868: \$? = $ac_status" >&5
6869   (exit "$ac_status"); } >/dev/null; then
6870   if test -s conftest.err; then
6871     ac_cpp_err=$ac_c_preproc_warn_flag
6872   else
6873     ac_cpp_err=
6874   fi
6875 else
6876   ac_cpp_err=yes
6877 fi
6878 if test -z "$ac_cpp_err"; then
6879   ac_cv_header_gpm_h=yes
6880 else
6881   echo "$as_me: failed program was:" >&5
6882   cat "conftest.$ac_ext" >&5
6883   ac_cv_header_gpm_h=no
6884 fi
6885 rm -f conftest.err "conftest.$ac_ext"
6886 fi
6887 echo "$as_me:6887: result: $ac_cv_header_gpm_h" >&5
6888 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6889 if test "$ac_cv_header_gpm_h" = yes; then
6890
6891 cat >>confdefs.h <<\EOF
6892 #define HAVE_GPM_H 1
6893 EOF
6894
6895                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6896                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6897
6898 echo "${as_me:-configure}:6898: testing assuming we really have GPM library ..." 1>&5
6899
6900 cat >>confdefs.h <<\EOF
6901 #define HAVE_LIBGPM 1
6902 EOF
6903
6904                         with_gpm=yes
6905                 else
6906                         echo "$as_me:6906: checking for Gpm_Open in -lgpm" >&5
6907 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6908 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6909   echo $ECHO_N "(cached) $ECHO_C" >&6
6910 else
6911   ac_check_lib_save_LIBS=$LIBS
6912 LIBS="-lgpm  $LIBS"
6913 cat >"conftest.$ac_ext" <<_ACEOF
6914 #line 6914 "configure"
6915 #include "confdefs.h"
6916
6917 /* Override any gcc2 internal prototype to avoid an error.  */
6918 #ifdef __cplusplus
6919 extern "C"
6920 #endif
6921 /* We use char because int might match the return type of a gcc2
6922    builtin and then its argument prototype would still apply.  */
6923 char Gpm_Open ();
6924 int
6925 main (void)
6926 {
6927 Gpm_Open ();
6928   ;
6929   return 0;
6930 }
6931 _ACEOF
6932 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6933 if { (eval echo "$as_me:6933: \"$ac_link\"") >&5
6934   (eval $ac_link) 2>&5
6935   ac_status=$?
6936   echo "$as_me:6936: \$? = $ac_status" >&5
6937   (exit "$ac_status"); } &&
6938          { ac_try='test -s "conftest$ac_exeext"'
6939   { (eval echo "$as_me:6939: \"$ac_try\"") >&5
6940   (eval $ac_try) 2>&5
6941   ac_status=$?
6942   echo "$as_me:6942: \$? = $ac_status" >&5
6943   (exit "$ac_status"); }; }; then
6944   ac_cv_lib_gpm_Gpm_Open=yes
6945 else
6946   echo "$as_me: failed program was:" >&5
6947 cat "conftest.$ac_ext" >&5
6948 ac_cv_lib_gpm_Gpm_Open=no
6949 fi
6950 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6951 LIBS=$ac_check_lib_save_LIBS
6952 fi
6953 echo "$as_me:6953: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6954 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6955 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6956   with_gpm=yes
6957 else
6958
6959                                 if test "$with_gpm" = maybe; then
6960                                         { echo "$as_me:6960: WARNING: Cannot link with GPM library" >&5
6961 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6962                                         with_gpm=no
6963                                 else
6964                                         { { echo "$as_me:6964: error: Cannot link with GPM library" >&5
6965 echo "$as_me: error: Cannot link with GPM library" >&2;}
6966    { (exit 1); exit 1; }; }
6967                                 fi
6968
6969 fi
6970
6971                 fi
6972
6973 else
6974
6975                 test "$with_gpm" != maybe && { echo "$as_me:6975: WARNING: Cannot find GPM header" >&5
6976 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6977                 with_gpm=no
6978
6979 fi
6980
6981 fi
6982
6983 if test "$with_gpm" != no ; then
6984         echo "$as_me:6984: checking if you want to load GPM dynamically" >&5
6985 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6986
6987 # Check whether --with-dlsym or --without-dlsym was given.
6988 if test "${with_dlsym+set}" = set; then
6989   withval="$with_dlsym"
6990   with_dlsym=$withval
6991 else
6992   with_dlsym=yes
6993 fi;
6994         echo "$as_me:6994: result: $with_dlsym" >&5
6995 echo "${ECHO_T}$with_dlsym" >&6
6996         if test "x$with_dlsym" = xyes ; then
6997
6998 cf_have_dlsym=no
6999 echo "$as_me:6999: checking for dlsym" >&5
7000 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7001 if test "${ac_cv_func_dlsym+set}" = set; then
7002   echo $ECHO_N "(cached) $ECHO_C" >&6
7003 else
7004   cat >"conftest.$ac_ext" <<_ACEOF
7005 #line 7005 "configure"
7006 #include "confdefs.h"
7007 #define dlsym autoconf_temporary
7008 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7009 #undef dlsym
7010
7011 #ifdef __cplusplus
7012 extern "C"
7013 #endif
7014
7015 /* We use char because int might match the return type of a gcc2
7016    builtin and then its argument prototype would still apply.  */
7017 char dlsym (void);
7018
7019 int
7020 main (void)
7021 {
7022
7023 /* The GNU C library defines stubs for functions which it implements
7024     to always fail with ENOSYS.  Some functions are actually named
7025     something starting with __ and the normal name is an alias.  */
7026 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7027 #error found stub for dlsym
7028 #endif
7029
7030         return dlsym ();
7031   ;
7032   return 0;
7033 }
7034 _ACEOF
7035 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7036 if { (eval echo "$as_me:7036: \"$ac_link\"") >&5
7037   (eval $ac_link) 2>&5
7038   ac_status=$?
7039   echo "$as_me:7039: \$? = $ac_status" >&5
7040   (exit "$ac_status"); } &&
7041          { ac_try='test -s "conftest$ac_exeext"'
7042   { (eval echo "$as_me:7042: \"$ac_try\"") >&5
7043   (eval $ac_try) 2>&5
7044   ac_status=$?
7045   echo "$as_me:7045: \$? = $ac_status" >&5
7046   (exit "$ac_status"); }; }; then
7047   ac_cv_func_dlsym=yes
7048 else
7049   echo "$as_me: failed program was:" >&5
7050 cat "conftest.$ac_ext" >&5
7051 ac_cv_func_dlsym=no
7052 fi
7053 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7054 fi
7055 echo "$as_me:7055: result: $ac_cv_func_dlsym" >&5
7056 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7057 if test "$ac_cv_func_dlsym" = yes; then
7058   cf_have_dlsym=yes
7059 else
7060
7061 cf_have_libdl=no
7062 echo "$as_me:7062: checking for dlsym in -ldl" >&5
7063 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7064 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7065   echo $ECHO_N "(cached) $ECHO_C" >&6
7066 else
7067   ac_check_lib_save_LIBS=$LIBS
7068 LIBS="-ldl  $LIBS"
7069 cat >"conftest.$ac_ext" <<_ACEOF
7070 #line 7070 "configure"
7071 #include "confdefs.h"
7072
7073 /* Override any gcc2 internal prototype to avoid an error.  */
7074 #ifdef __cplusplus
7075 extern "C"
7076 #endif
7077 /* We use char because int might match the return type of a gcc2
7078    builtin and then its argument prototype would still apply.  */
7079 char dlsym ();
7080 int
7081 main (void)
7082 {
7083 dlsym ();
7084   ;
7085   return 0;
7086 }
7087 _ACEOF
7088 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7089 if { (eval echo "$as_me:7089: \"$ac_link\"") >&5
7090   (eval $ac_link) 2>&5
7091   ac_status=$?
7092   echo "$as_me:7092: \$? = $ac_status" >&5
7093   (exit "$ac_status"); } &&
7094          { ac_try='test -s "conftest$ac_exeext"'
7095   { (eval echo "$as_me:7095: \"$ac_try\"") >&5
7096   (eval $ac_try) 2>&5
7097   ac_status=$?
7098   echo "$as_me:7098: \$? = $ac_status" >&5
7099   (exit "$ac_status"); }; }; then
7100   ac_cv_lib_dl_dlsym=yes
7101 else
7102   echo "$as_me: failed program was:" >&5
7103 cat "conftest.$ac_ext" >&5
7104 ac_cv_lib_dl_dlsym=no
7105 fi
7106 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7107 LIBS=$ac_check_lib_save_LIBS
7108 fi
7109 echo "$as_me:7109: result: $ac_cv_lib_dl_dlsym" >&5
7110 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7111 if test "$ac_cv_lib_dl_dlsym" = yes; then
7112
7113         cf_have_dlsym=yes
7114         cf_have_libdl=yes
7115 fi
7116
7117 fi
7118
7119 if test "$cf_have_dlsym" = yes ; then
7120         test "$cf_have_libdl" = yes && {
7121 cf_add_libs="$LIBS"
7122 # reverse order
7123 cf_add_0lib=
7124 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7125 # filter duplicates
7126 for cf_add_1lib in $cf_add_0lib; do
7127         for cf_add_2lib in $cf_add_libs; do
7128                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7129                         cf_add_1lib=
7130                         break
7131                 fi
7132         done
7133         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7134 done
7135 LIBS="$cf_add_libs"
7136  }
7137
7138         echo "$as_me:7138: checking whether able to link to dl*() functions" >&5
7139 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7140         cat >"conftest.$ac_ext" <<_ACEOF
7141 #line 7141 "configure"
7142 #include "confdefs.h"
7143 #include <dlfcn.h>
7144 int
7145 main (void)
7146 {
7147
7148                 void *obj;
7149                 if ((obj = dlopen("filename", 0)) != 0) {
7150                         if (dlsym(obj, "symbolname") == 0) {
7151                         dlclose(obj);
7152                         }
7153                 }
7154   ;
7155   return 0;
7156 }
7157 _ACEOF
7158 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7159 if { (eval echo "$as_me:7159: \"$ac_link\"") >&5
7160   (eval $ac_link) 2>&5
7161   ac_status=$?
7162   echo "$as_me:7162: \$? = $ac_status" >&5
7163   (exit "$ac_status"); } &&
7164          { ac_try='test -s "conftest$ac_exeext"'
7165   { (eval echo "$as_me:7165: \"$ac_try\"") >&5
7166   (eval $ac_try) 2>&5
7167   ac_status=$?
7168   echo "$as_me:7168: \$? = $ac_status" >&5
7169   (exit "$ac_status"); }; }; then
7170
7171 cat >>confdefs.h <<\EOF
7172 #define HAVE_LIBDL 1
7173 EOF
7174
7175 else
7176   echo "$as_me: failed program was:" >&5
7177 cat "conftest.$ac_ext" >&5
7178
7179                 { { echo "$as_me:7179: error: Cannot link test program for libdl" >&5
7180 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7181    { (exit 1); exit 1; }; }
7182 fi
7183 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7184         echo "$as_me:7184: result: ok" >&5
7185 echo "${ECHO_T}ok" >&6
7186 else
7187         { { echo "$as_me:7187: error: Cannot find dlsym function" >&5
7188 echo "$as_me: error: Cannot find dlsym function" >&2;}
7189    { (exit 1); exit 1; }; }
7190 fi
7191
7192                 if test "x$with_gpm" != xyes ; then
7193                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7194
7195 echo "${as_me:-configure}:7195: testing assuming soname for gpm is $with_gpm ..." 1>&5
7196
7197                         cf_cv_gpm_soname="$with_gpm"
7198                 else
7199
7200 echo "$as_me:7200: checking for soname of gpm library" >&5
7201 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7202 if test "${cf_cv_gpm_soname+set}" = set; then
7203   echo $ECHO_N "(cached) $ECHO_C" >&6
7204 else
7205
7206 cf_cv_gpm_soname=unknown
7207 if test "$cross_compiling" != yes ; then
7208 cat >conftest.$ac_ext <<CF_EOF
7209 #include <gpm.h>
7210 int main(void)
7211 {
7212 if (Gpm_Open(0,0)) Gpm_Close();
7213         ${cf_cv_main_return:-return}(0);
7214 }
7215 CF_EOF
7216 cf_save_LIBS="$LIBS"
7217
7218 cf_add_libs="$LIBS"
7219 # reverse order
7220 cf_add_0lib=
7221 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7222 # filter duplicates
7223 for cf_add_1lib in $cf_add_0lib; do
7224         for cf_add_2lib in $cf_add_libs; do
7225                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7226                         cf_add_1lib=
7227                         break
7228                 fi
7229         done
7230         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7231 done
7232 LIBS="$cf_add_libs"
7233
7234         if { (eval echo "$as_me:7234: \"$ac_compile\"") >&5
7235   (eval $ac_compile) 2>&5
7236   ac_status=$?
7237   echo "$as_me:7237: \$? = $ac_status" >&5
7238   (exit "$ac_status"); } ; then
7239                 if { (eval echo "$as_me:7239: \"$ac_link\"") >&5
7240   (eval $ac_link) 2>&5
7241   ac_status=$?
7242   echo "$as_me:7242: \$? = $ac_status" >&5
7243   (exit "$ac_status"); } ; then
7244                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7245                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7246                 fi
7247         fi
7248 rm -rf ./conftest*
7249 LIBS="$cf_save_LIBS"
7250 fi
7251
7252 fi
7253 echo "$as_me:7253: result: $cf_cv_gpm_soname" >&5
7254 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7255
7256                 fi
7257                 test "$cf_cv_gpm_soname" != "unknown" &&
7258 cat >>confdefs.h <<EOF
7259 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7260 EOF
7261
7262                 SHLIB_LIST="-ldl $SHLIB_LIST"
7263
7264 cf_add_libs="$PRIVATE_LIBS"
7265 # reverse order
7266 cf_add_0lib=
7267 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7268 # filter duplicates
7269 for cf_add_1lib in $cf_add_0lib; do
7270         for cf_add_2lib in $cf_add_libs; do
7271                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7272                         cf_add_1lib=
7273                         break
7274                 fi
7275         done
7276         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7277 done
7278 PRIVATE_LIBS="$cf_add_libs"
7279
7280         else
7281                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7282
7283 cf_add_libs="$TEST_LIBS"
7284 # reverse order
7285 cf_add_0lib=
7286 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7287 # filter duplicates
7288 for cf_add_1lib in $cf_add_0lib; do
7289         for cf_add_2lib in $cf_add_libs; do
7290                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7291                         cf_add_1lib=
7292                         break
7293                 fi
7294         done
7295         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7296 done
7297 TEST_LIBS="$cf_add_libs"
7298
7299 cf_add_libs="$PRIVATE_LIBS"
7300 # reverse order
7301 cf_add_0lib=
7302 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7303 # filter duplicates
7304 for cf_add_1lib in $cf_add_0lib; do
7305         for cf_add_2lib in $cf_add_libs; do
7306                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7307                         cf_add_1lib=
7308                         break
7309                 fi
7310         done
7311         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7312 done
7313 PRIVATE_LIBS="$cf_add_libs"
7314
7315         fi
7316
7317 cat >>confdefs.h <<\EOF
7318 #define HAVE_LIBGPM 1
7319 EOF
7320
7321 echo "$as_me:7321: checking for Gpm_Wgetch in -lgpm" >&5
7322 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7323 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7324   echo $ECHO_N "(cached) $ECHO_C" >&6
7325 else
7326   ac_check_lib_save_LIBS=$LIBS
7327 LIBS="-lgpm  $LIBS"
7328 cat >"conftest.$ac_ext" <<_ACEOF
7329 #line 7329 "configure"
7330 #include "confdefs.h"
7331
7332 /* Override any gcc2 internal prototype to avoid an error.  */
7333 #ifdef __cplusplus
7334 extern "C"
7335 #endif
7336 /* We use char because int might match the return type of a gcc2
7337    builtin and then its argument prototype would still apply.  */
7338 char Gpm_Wgetch ();
7339 int
7340 main (void)
7341 {
7342 Gpm_Wgetch ();
7343   ;
7344   return 0;
7345 }
7346 _ACEOF
7347 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7348 if { (eval echo "$as_me:7348: \"$ac_link\"") >&5
7349   (eval $ac_link) 2>&5
7350   ac_status=$?
7351   echo "$as_me:7351: \$? = $ac_status" >&5
7352   (exit "$ac_status"); } &&
7353          { ac_try='test -s "conftest$ac_exeext"'
7354   { (eval echo "$as_me:7354: \"$ac_try\"") >&5
7355   (eval $ac_try) 2>&5
7356   ac_status=$?
7357   echo "$as_me:7357: \$? = $ac_status" >&5
7358   (exit "$ac_status"); }; }; then
7359   ac_cv_lib_gpm_Gpm_Wgetch=yes
7360 else
7361   echo "$as_me: failed program was:" >&5
7362 cat "conftest.$ac_ext" >&5
7363 ac_cv_lib_gpm_Gpm_Wgetch=no
7364 fi
7365 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7366 LIBS=$ac_check_lib_save_LIBS
7367 fi
7368 echo "$as_me:7368: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7369 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7370 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7371
7372 echo "$as_me:7372: checking if GPM is weakly bound to curses library" >&5
7373 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7374 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7375   echo $ECHO_N "(cached) $ECHO_C" >&6
7376 else
7377
7378 cf_cv_check_gpm_wgetch=unknown
7379 if test "$cross_compiling" != yes ; then
7380
7381 cat >conftest.$ac_ext <<CF_EOF
7382 #include <gpm.h>
7383 int main(void)
7384 {
7385         Gpm_Wgetch();
7386         ${cf_cv_main_return:-return}(0);
7387 }
7388 CF_EOF
7389
7390         cf_save_LIBS="$LIBS"
7391         # This only works if we can look at the symbol table.  If a shared
7392         # library is stripped for install, we cannot use that.  So we're forced
7393         # to rely on the static library, noting that some packagers may not
7394         # include it.
7395         LIBS="-static -lgpm -dynamic $LIBS"
7396         if { (eval echo "$as_me:7396: \"$ac_compile\"") >&5
7397   (eval $ac_compile) 2>&5
7398   ac_status=$?
7399   echo "$as_me:7399: \$? = $ac_status" >&5
7400   (exit "$ac_status"); } ; then
7401                 if { (eval echo "$as_me:7401: \"$ac_link\"") >&5
7402   (eval $ac_link) 2>&5
7403   ac_status=$?
7404   echo "$as_me:7404: \$? = $ac_status" >&5
7405   (exit "$ac_status"); } ; then
7406                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7407                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7408                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7409                 fi
7410         fi
7411         rm -rf ./conftest*
7412         LIBS="$cf_save_LIBS"
7413 fi
7414
7415 fi
7416 echo "$as_me:7416: result: $cf_cv_check_gpm_wgetch" >&5
7417 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7418
7419 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7420         { echo "$as_me:7420: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7421 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7422 fi
7423
7424 fi
7425
7426 fi
7427
7428 echo "$as_me:7428: checking if you want to use PCRE2 for regular-expressions" >&5
7429 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7430
7431 # Check whether --with-pcre2 or --without-pcre2 was given.
7432 if test "${with_pcre2+set}" = set; then
7433   withval="$with_pcre2"
7434
7435 fi;
7436 test -z "$with_pcre2" && with_pcre2=no
7437 echo "$as_me:7437: result: $with_pcre2" >&5
7438 echo "${ECHO_T}$with_pcre2" >&6
7439
7440 if test "x$with_pcre2" != xno ; then
7441         cf_with_pcre2_ok=no
7442         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7443         do
7444
7445 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7446         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7447
7448 echo "${as_me:-configure}:7448: testing found package $cf_with_pcre2 ..." 1>&5
7449
7450         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7451         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7452         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7453
7454 echo "${as_me:-configure}:7454: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7455
7456         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7457
7458 echo "${as_me:-configure}:7458: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7459
7460 cf_fix_cppflags=no
7461 cf_new_cflags=
7462 cf_new_cppflags=
7463 cf_new_extra_cppflags=
7464
7465 for cf_add_cflags in $cf_pkgconfig_incs
7466 do
7467 case "$cf_fix_cppflags" in
7468 (no)
7469         case "$cf_add_cflags" in
7470         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7471                 case "$cf_add_cflags" in
7472                 (-D*)
7473                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7474
7475                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7476                                 && test -z "${cf_tst_cflags}" \
7477                                 && cf_fix_cppflags=yes
7478
7479                         if test "$cf_fix_cppflags" = yes ; then
7480
7481         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7482         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7483
7484                                 continue
7485                         elif test "${cf_tst_cflags}" = "\"'" ; then
7486
7487         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7488         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7489
7490                                 continue
7491                         fi
7492                         ;;
7493                 esac
7494                 case "$CPPFLAGS" in
7495                 (*$cf_add_cflags)
7496                         ;;
7497                 (*)
7498                         case "$cf_add_cflags" in
7499                         (-D*)
7500                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7501
7502 CPPFLAGS=`echo "$CPPFLAGS" | \
7503         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7504                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7505
7506                                 ;;
7507                         esac
7508
7509         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7510         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7511
7512                         ;;
7513                 esac
7514                 ;;
7515         (*)
7516
7517         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7518         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7519
7520                 ;;
7521         esac
7522         ;;
7523 (yes)
7524
7525         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7526         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7527
7528         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7529
7530         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7531                 && test -z "${cf_tst_cflags}" \
7532                 && cf_fix_cppflags=no
7533         ;;
7534 esac
7535 done
7536
7537 if test -n "$cf_new_cflags" ; then
7538
7539         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7540         CFLAGS="${CFLAGS}$cf_new_cflags"
7541
7542 fi
7543
7544 if test -n "$cf_new_cppflags" ; then
7545
7546         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7547         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7548
7549 fi
7550
7551 if test -n "$cf_new_extra_cppflags" ; then
7552
7553         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7554         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7555
7556 fi
7557
7558 cf_add_libs="$LIBS"
7559 # reverse order
7560 cf_add_0lib=
7561 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7562 # filter duplicates
7563 for cf_add_1lib in $cf_add_0lib; do
7564         for cf_add_2lib in $cf_add_libs; do
7565                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7566                         cf_add_1lib=
7567                         break
7568                 fi
7569         done
7570         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7571 done
7572 LIBS="$cf_add_libs"
7573
7574         cf_with_pcre2_ok=yes; break
7575 else
7576         cf_pkgconfig_incs=
7577         cf_pkgconfig_libs=
7578         :
7579 fi
7580
7581         done
7582         cf_with_pcre2_ok=yes || { { echo "$as_me:7582: error: Cannot find PCRE2 library" >&5
7583 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7584    { (exit 1); exit 1; }; }
7585
7586 cat >>confdefs.h <<\EOF
7587 #define HAVE_LIB_PCRE2 1
7588 EOF
7589
7590         # if pkgconfig gave no results, look for the libraries directly
7591         case "$LIBS" in
7592         (*pcre2-posix*|*pcreposix*)
7593                 ;;
7594         (*)
7595                 echo "$as_me:7595: checking for regcomp in -lpcre2-posix" >&5
7596 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7597 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7598   echo $ECHO_N "(cached) $ECHO_C" >&6
7599 else
7600   ac_check_lib_save_LIBS=$LIBS
7601 LIBS="-lpcre2-posix  $LIBS"
7602 cat >"conftest.$ac_ext" <<_ACEOF
7603 #line 7603 "configure"
7604 #include "confdefs.h"
7605
7606 /* Override any gcc2 internal prototype to avoid an error.  */
7607 #ifdef __cplusplus
7608 extern "C"
7609 #endif
7610 /* We use char because int might match the return type of a gcc2
7611    builtin and then its argument prototype would still apply.  */
7612 char regcomp ();
7613 int
7614 main (void)
7615 {
7616 regcomp ();
7617   ;
7618   return 0;
7619 }
7620 _ACEOF
7621 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7622 if { (eval echo "$as_me:7622: \"$ac_link\"") >&5
7623   (eval $ac_link) 2>&5
7624   ac_status=$?
7625   echo "$as_me:7625: \$? = $ac_status" >&5
7626   (exit "$ac_status"); } &&
7627          { ac_try='test -s "conftest$ac_exeext"'
7628   { (eval echo "$as_me:7628: \"$ac_try\"") >&5
7629   (eval $ac_try) 2>&5
7630   ac_status=$?
7631   echo "$as_me:7631: \$? = $ac_status" >&5
7632   (exit "$ac_status"); }; }; then
7633   ac_cv_lib_pcre2_posix_regcomp=yes
7634 else
7635   echo "$as_me: failed program was:" >&5
7636 cat "conftest.$ac_ext" >&5
7637 ac_cv_lib_pcre2_posix_regcomp=no
7638 fi
7639 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7640 LIBS=$ac_check_lib_save_LIBS
7641 fi
7642 echo "$as_me:7642: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7643 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7644 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7645
7646 cf_add_libs="$LIBS"
7647 # reverse order
7648 cf_add_0lib=
7649 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7650 # filter duplicates
7651 for cf_add_1lib in $cf_add_0lib; do
7652         for cf_add_2lib in $cf_add_libs; do
7653                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7654                         cf_add_1lib=
7655                         break
7656                 fi
7657         done
7658         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7659 done
7660 LIBS="$cf_add_libs"
7661
7662 else
7663   echo "$as_me:7663: checking for regcomp in -lpcreposix" >&5
7664 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7665 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7666   echo $ECHO_N "(cached) $ECHO_C" >&6
7667 else
7668   ac_check_lib_save_LIBS=$LIBS
7669 LIBS="-lpcreposix  $LIBS"
7670 cat >"conftest.$ac_ext" <<_ACEOF
7671 #line 7671 "configure"
7672 #include "confdefs.h"
7673
7674 /* Override any gcc2 internal prototype to avoid an error.  */
7675 #ifdef __cplusplus
7676 extern "C"
7677 #endif
7678 /* We use char because int might match the return type of a gcc2
7679    builtin and then its argument prototype would still apply.  */
7680 char regcomp ();
7681 int
7682 main (void)
7683 {
7684 regcomp ();
7685   ;
7686   return 0;
7687 }
7688 _ACEOF
7689 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7690 if { (eval echo "$as_me:7690: \"$ac_link\"") >&5
7691   (eval $ac_link) 2>&5
7692   ac_status=$?
7693   echo "$as_me:7693: \$? = $ac_status" >&5
7694   (exit "$ac_status"); } &&
7695          { ac_try='test -s "conftest$ac_exeext"'
7696   { (eval echo "$as_me:7696: \"$ac_try\"") >&5
7697   (eval $ac_try) 2>&5
7698   ac_status=$?
7699   echo "$as_me:7699: \$? = $ac_status" >&5
7700   (exit "$ac_status"); }; }; then
7701   ac_cv_lib_pcreposix_regcomp=yes
7702 else
7703   echo "$as_me: failed program was:" >&5
7704 cat "conftest.$ac_ext" >&5
7705 ac_cv_lib_pcreposix_regcomp=no
7706 fi
7707 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7708 LIBS=$ac_check_lib_save_LIBS
7709 fi
7710 echo "$as_me:7710: result: $ac_cv_lib_pcreposix_regcomp" >&5
7711 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7712 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7713
7714 cf_add_libs="$LIBS"
7715 # reverse order
7716 cf_add_0lib=
7717 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7718 # filter duplicates
7719 for cf_add_1lib in $cf_add_0lib; do
7720         for cf_add_2lib in $cf_add_libs; do
7721                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7722                         cf_add_1lib=
7723                         break
7724                 fi
7725         done
7726         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7727 done
7728 LIBS="$cf_add_libs"
7729
7730 else
7731   { { echo "$as_me:7731: error: Cannot find PCRE2 POSIX library" >&5
7732 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7733    { (exit 1); exit 1; }; }
7734 fi
7735
7736 fi
7737
7738                 ;;
7739         esac
7740
7741         # either way, check for the library header files
7742
7743 for ac_header in pcre2posix.h pcreposix.h
7744 do
7745 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7746 echo "$as_me:7746: checking for $ac_header" >&5
7747 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7748 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7749   echo $ECHO_N "(cached) $ECHO_C" >&6
7750 else
7751   cat >"conftest.$ac_ext" <<_ACEOF
7752 #line 7752 "configure"
7753 #include "confdefs.h"
7754 #include <$ac_header>
7755 _ACEOF
7756 if { (eval echo "$as_me:7756: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7757   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7758   ac_status=$?
7759   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7760   rm -f conftest.er1
7761   cat conftest.err >&5
7762   echo "$as_me:7762: \$? = $ac_status" >&5
7763   (exit "$ac_status"); } >/dev/null; then
7764   if test -s conftest.err; then
7765     ac_cpp_err=$ac_c_preproc_warn_flag
7766   else
7767     ac_cpp_err=
7768   fi
7769 else
7770   ac_cpp_err=yes
7771 fi
7772 if test -z "$ac_cpp_err"; then
7773   eval "$as_ac_Header=yes"
7774 else
7775   echo "$as_me: failed program was:" >&5
7776   cat "conftest.$ac_ext" >&5
7777   eval "$as_ac_Header=no"
7778 fi
7779 rm -f conftest.err "conftest.$ac_ext"
7780 fi
7781 echo "$as_me:7781: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7782 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7783 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7784   cat >>confdefs.h <<EOF
7785 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7786 EOF
7787
7788 fi
7789 done
7790
7791 fi
7792
7793 # not everyone has "test -c"
7794 if test -c /dev/sysmouse 2>/dev/null ; then
7795 echo "$as_me:7795: checking if you want to use sysmouse" >&5
7796 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7797
7798 # Check whether --with-sysmouse or --without-sysmouse was given.
7799 if test "${with_sysmouse+set}" = set; then
7800   withval="$with_sysmouse"
7801   cf_with_sysmouse=$withval
7802 else
7803   cf_with_sysmouse=maybe
7804 fi;
7805         if test "$cf_with_sysmouse" != no ; then
7806         cat >"conftest.$ac_ext" <<_ACEOF
7807 #line 7807 "configure"
7808 #include "confdefs.h"
7809
7810 #include <osreldate.h>
7811 #if (__FreeBSD_version >= 400017)
7812 #include <sys/consio.h>
7813 #include <sys/fbio.h>
7814 #else
7815 #include <machine/console.h>
7816 #endif
7817
7818 int
7819 main (void)
7820 {
7821
7822         struct mouse_info the_mouse;
7823         ioctl(0, CONS_MOUSECTL, &the_mouse);
7824
7825   ;
7826   return 0;
7827 }
7828 _ACEOF
7829 rm -f "conftest.$ac_objext"
7830 if { (eval echo "$as_me:7830: \"$ac_compile\"") >&5
7831   (eval $ac_compile) 2>&5
7832   ac_status=$?
7833   echo "$as_me:7833: \$? = $ac_status" >&5
7834   (exit "$ac_status"); } &&
7835          { ac_try='test -s "conftest.$ac_objext"'
7836   { (eval echo "$as_me:7836: \"$ac_try\"") >&5
7837   (eval $ac_try) 2>&5
7838   ac_status=$?
7839   echo "$as_me:7839: \$? = $ac_status" >&5
7840   (exit "$ac_status"); }; }; then
7841   cf_with_sysmouse=yes
7842 else
7843   echo "$as_me: failed program was:" >&5
7844 cat "conftest.$ac_ext" >&5
7845 cf_with_sysmouse=no
7846 fi
7847 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7848         fi
7849 echo "$as_me:7849: result: $cf_with_sysmouse" >&5
7850 echo "${ECHO_T}$cf_with_sysmouse" >&6
7851 test "$cf_with_sysmouse" = yes &&
7852 cat >>confdefs.h <<\EOF
7853 #define USE_SYSMOUSE 1
7854 EOF
7855
7856 fi
7857
7858 # pretend that ncurses==ncursesw==ncursest
7859 echo "$as_me:7859: checking if you want to disable library suffixes" >&5
7860 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7861
7862 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7863 if test "${enable_lib_suffixes+set}" = set; then
7864   enableval="$enable_lib_suffixes"
7865   test "$enableval" != no && enableval=yes
7866         if test "$enableval" != "yes" ; then
7867     disable_lib_suffixes=yes
7868         else
7869                 disable_lib_suffixes=no
7870         fi
7871 else
7872   enableval=yes
7873         disable_lib_suffixes=no
7874
7875 fi;
7876 echo "$as_me:7876: result: $disable_lib_suffixes" >&5
7877 echo "${ECHO_T}$disable_lib_suffixes" >&6
7878
7879 ### If we're building with rpath, try to link non-standard libs that way too.
7880 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7881
7882 echo "$as_me:7882: checking if rpath-hack should be disabled" >&5
7883 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7884
7885 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7886 if test "${enable_rpath_hack+set}" = set; then
7887   enableval="$enable_rpath_hack"
7888   test "$enableval" != no && enableval=yes
7889         if test "$enableval" != "yes" ; then
7890     enable_rpath_hack=no
7891         else
7892                 enable_rpath_hack=yes
7893         fi
7894 else
7895   enableval=yes
7896         enable_rpath_hack=yes
7897
7898 fi;
7899 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
7900 echo "$as_me:7900: result: $cf_disable_rpath_hack" >&5
7901 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7902
7903 if test "$enable_rpath_hack" = yes ; then
7904
7905 echo "$as_me:7905: checking for updated LDFLAGS" >&5
7906 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7907 if test -n "$LD_RPATH_OPT" ; then
7908         echo "$as_me:7908: result: maybe" >&5
7909 echo "${ECHO_T}maybe" >&6
7910
7911         for ac_prog in ldd
7912 do
7913   # Extract the first word of "$ac_prog", so it can be a program name with args.
7914 set dummy $ac_prog; ac_word=$2
7915 echo "$as_me:7915: checking for $ac_word" >&5
7916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7917 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7918   echo $ECHO_N "(cached) $ECHO_C" >&6
7919 else
7920   if test -n "$cf_ldd_prog"; then
7921   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7922 else
7923   ac_save_IFS=$IFS; IFS=$ac_path_separator
7924 ac_dummy="$PATH"
7925 for ac_dir in $ac_dummy; do
7926   IFS=$ac_save_IFS
7927   test -z "$ac_dir" && ac_dir=.
7928   $as_executable_p "$ac_dir/$ac_word" || continue
7929 ac_cv_prog_cf_ldd_prog="$ac_prog"
7930 echo "$as_me:7930: found $ac_dir/$ac_word" >&5
7931 break
7932 done
7933
7934 fi
7935 fi
7936 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7937 if test -n "$cf_ldd_prog"; then
7938   echo "$as_me:7938: result: $cf_ldd_prog" >&5
7939 echo "${ECHO_T}$cf_ldd_prog" >&6
7940 else
7941   echo "$as_me:7941: result: no" >&5
7942 echo "${ECHO_T}no" >&6
7943 fi
7944
7945   test -n "$cf_ldd_prog" && break
7946 done
7947 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7948
7949         cf_rpath_list="/usr/lib /lib"
7950         if test "$cf_ldd_prog" != no
7951         then
7952                 cf_rpath_oops=
7953
7954 cat >"conftest.$ac_ext" <<_ACEOF
7955 #line 7955 "configure"
7956 #include "confdefs.h"
7957 #include <stdio.h>
7958 int
7959 main (void)
7960 {
7961 printf("Hello");
7962   ;
7963   return 0;
7964 }
7965 _ACEOF
7966 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7967 if { (eval echo "$as_me:7967: \"$ac_link\"") >&5
7968   (eval $ac_link) 2>&5
7969   ac_status=$?
7970   echo "$as_me:7970: \$? = $ac_status" >&5
7971   (exit "$ac_status"); } &&
7972          { ac_try='test -s "conftest$ac_exeext"'
7973   { (eval echo "$as_me:7973: \"$ac_try\"") >&5
7974   (eval $ac_try) 2>&5
7975   ac_status=$?
7976   echo "$as_me:7976: \$? = $ac_status" >&5
7977   (exit "$ac_status"); }; }; then
7978   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7979                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7980 else
7981   echo "$as_me: failed program was:" >&5
7982 cat "conftest.$ac_ext" >&5
7983 fi
7984 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7985
7986                 # If we passed the link-test, but get a "not found" on a given library,
7987                 # this could be due to inept reconfiguration of gcc to make it only
7988                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7989                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7990                 # /usr/local libraries.
7991                 if test -n "$cf_rpath_oops"
7992                 then
7993                         for cf_rpath_src in $cf_rpath_oops
7994                         do
7995                                 for cf_rpath_dir in \
7996                                         /usr/local \
7997                                         /usr/pkg \
7998                                         /opt/sfw
7999                                 do
8000                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8001                                         then
8002                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8003
8004 echo "${as_me:-configure}:8004: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8005
8006                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8007                                                 break
8008                                         fi
8009                                 done
8010                         done
8011                 fi
8012         fi
8013
8014         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8015
8016 echo "${as_me:-configure}:8016: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8017
8018 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8019
8020 echo "${as_me:-configure}:8020: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8021
8022 cf_rpath_dst=
8023 for cf_rpath_src in $LDFLAGS
8024 do
8025         case "$cf_rpath_src" in
8026         (-L*)
8027
8028                 # check if this refers to a directory which we will ignore
8029                 cf_rpath_skip=no
8030                 if test -n "$cf_rpath_list"
8031                 then
8032                         for cf_rpath_item in $cf_rpath_list
8033                         do
8034                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8035                                 then
8036                                         cf_rpath_skip=yes
8037                                         break
8038                                 fi
8039                         done
8040                 fi
8041
8042                 if test "$cf_rpath_skip" = no
8043                 then
8044                         # transform the option
8045                         if test "$LD_RPATH_OPT" = "-R " ; then
8046                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8047                         else
8048                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8049                         fi
8050
8051                         # if we have not already added this, add it now
8052                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8053                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8054                         then
8055                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8056
8057 echo "${as_me:-configure}:8057: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8058
8059                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8060                         fi
8061                 fi
8062                 ;;
8063         esac
8064         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8065 done
8066 LDFLAGS=$cf_rpath_dst
8067
8068 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8069
8070 echo "${as_me:-configure}:8070: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8071
8072 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8073
8074 echo "${as_me:-configure}:8074: testing ...checking LIBS $LIBS ..." 1>&5
8075
8076 cf_rpath_dst=
8077 for cf_rpath_src in $LIBS
8078 do
8079         case "$cf_rpath_src" in
8080         (-L*)
8081
8082                 # check if this refers to a directory which we will ignore
8083                 cf_rpath_skip=no
8084                 if test -n "$cf_rpath_list"
8085                 then
8086                         for cf_rpath_item in $cf_rpath_list
8087                         do
8088                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8089                                 then
8090                                         cf_rpath_skip=yes
8091                                         break
8092                                 fi
8093                         done
8094                 fi
8095
8096                 if test "$cf_rpath_skip" = no
8097                 then
8098                         # transform the option
8099                         if test "$LD_RPATH_OPT" = "-R " ; then
8100                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8101                         else
8102                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8103                         fi
8104
8105                         # if we have not already added this, add it now
8106                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8107                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8108                         then
8109                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8110
8111 echo "${as_me:-configure}:8111: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8112
8113                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8114                         fi
8115                 fi
8116                 ;;
8117         esac
8118         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8119 done
8120 LIBS=$cf_rpath_dst
8121
8122 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8123
8124 echo "${as_me:-configure}:8124: testing ...checked LIBS $LIBS ..." 1>&5
8125
8126         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8127
8128 echo "${as_me:-configure}:8128: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8129
8130 else
8131         echo "$as_me:8131: result: no" >&5
8132 echo "${ECHO_T}no" >&6
8133 fi
8134
8135 fi
8136
8137 fi
8138
8139 ### Depending on the system, someone may use rpath to build ncurses but not
8140 # want users of the package to rely upon that feature.  Give those people an
8141 # option to suppress that detail from EXTRA_LDFLAGS.
8142 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8143 if test -n "$EXTRA_PKG_LDFLAGS"
8144 then
8145         echo "$as_me:8145: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8146 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8147
8148 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8149 if test "${enable_pkg_ldflags+set}" = set; then
8150   enableval="$enable_pkg_ldflags"
8151   test "$enableval" != no && enableval=yes
8152         if test "$enableval" != "yes" ; then
8153     disable_pkg_ldflags=yes
8154         else
8155                 disable_pkg_ldflags=no
8156         fi
8157 else
8158   enableval=yes
8159         disable_pkg_ldflags=no
8160
8161 fi;
8162         echo "$as_me:8162: result: $disable_pkg_ldflags" >&5
8163 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8164         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8165 fi
8166
8167 ###############################################################################
8168
8169 ###     use option --with-extra-suffix to append suffix to headers and libraries
8170 echo "$as_me:8170: checking if you wish to append extra suffix to header/library paths" >&5
8171 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8172 EXTRA_SUFFIX=
8173
8174 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8175 if test "${with_extra_suffix+set}" = set; then
8176   withval="$with_extra_suffix"
8177   case x$withval in
8178         (xno)
8179                 ;;
8180         (xyes|x)
8181                 EXTRA_SUFFIX=$cf_cv_abi_version
8182                 ;;
8183         (*)
8184                 EXTRA_SUFFIX=$withval
8185                 ;;
8186         esac
8187
8188 fi;
8189 echo "$as_me:8189: result: $EXTRA_SUFFIX" >&5
8190 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8191
8192 ###     use option --disable-overwrite to leave out the link to -lcurses
8193 echo "$as_me:8193: checking if you wish to install ncurses overwriting curses" >&5
8194 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8195
8196 # Check whether --enable-overwrite or --disable-overwrite was given.
8197 if test "${enable_overwrite+set}" = set; then
8198   enableval="$enable_overwrite"
8199   with_overwrite=$enableval
8200 else
8201   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8202 fi;
8203 echo "$as_me:8203: result: $with_overwrite" >&5
8204 echo "${ECHO_T}$with_overwrite" >&6
8205
8206 echo "$as_me:8206: checking if external terminfo-database is used" >&5
8207 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8208
8209 # Check whether --enable-database or --disable-database was given.
8210 if test "${enable_database+set}" = set; then
8211   enableval="$enable_database"
8212   use_database=$enableval
8213 else
8214   use_database=yes
8215 fi;
8216 echo "$as_me:8216: result: $use_database" >&5
8217 echo "${ECHO_T}$use_database" >&6
8218
8219 case "$host_os" in
8220 (os2*)
8221         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8222         ;;
8223 (*)
8224         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8225         ;;
8226 esac
8227
8228 NCURSES_USE_DATABASE=0
8229 if test "$use_database" != no ; then
8230         NCURSES_USE_DATABASE=1
8231
8232         echo "$as_me:8232: checking which terminfo source-file will be installed" >&5
8233 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8234
8235 # Check whether --with-database or --without-database was given.
8236 if test "${with_database+set}" = set; then
8237   withval="$with_database"
8238   TERMINFO_SRC=$withval
8239 fi;
8240         echo "$as_me:8240: result: $TERMINFO_SRC" >&5
8241 echo "${ECHO_T}$TERMINFO_SRC" >&6
8242
8243         echo "$as_me:8243: checking whether to use hashed database instead of directory/tree" >&5
8244 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8245
8246 # Check whether --with-hashed-db or --without-hashed-db was given.
8247 if test "${with_hashed_db+set}" = set; then
8248   withval="$with_hashed_db"
8249
8250 else
8251   with_hashed_db=no
8252 fi;
8253         echo "$as_me:8253: result: $with_hashed_db" >&5
8254 echo "${ECHO_T}$with_hashed_db" >&6
8255 else
8256         with_hashed_db=no
8257 fi
8258
8259 echo "$as_me:8259: checking for list of fallback descriptions" >&5
8260 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8261
8262 # Check whether --with-fallbacks or --without-fallbacks was given.
8263 if test "${with_fallbacks+set}" = set; then
8264   withval="$with_fallbacks"
8265   with_fallback=$withval
8266 else
8267   with_fallback=
8268 fi;
8269 echo "$as_me:8269: result: $with_fallback" >&5
8270 echo "${ECHO_T}$with_fallback" >&6
8271
8272 case ".$with_fallback" in
8273 (.|.no)
8274         FALLBACK_LIST=
8275         ;;
8276 (.yes)
8277         { echo "$as_me:8277: WARNING: expected a list of terminal descriptions" >&5
8278 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8279         ;;
8280 (*)
8281         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8282         ;;
8283 esac
8284
8285 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8286 # tree for generating the terminal descriptions that will be compiled into the
8287 # library.  If your toolchain is old, it may not handle current terminal
8288 # databases.  Use configure-options to point to the tools which will be used,
8289 # rather than the first ones found on the $PATH.
8290 if test -n "$ac_tool_prefix"; then
8291   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8292 set dummy ${ac_tool_prefix}tic; ac_word=$2
8293 echo "$as_me:8293: checking for $ac_word" >&5
8294 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8295 if test "${ac_cv_prog_TIC+set}" = set; then
8296   echo $ECHO_N "(cached) $ECHO_C" >&6
8297 else
8298   if test -n "$TIC"; then
8299   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8300 else
8301   ac_save_IFS=$IFS; IFS=$ac_path_separator
8302 ac_dummy="$PATH"
8303 for ac_dir in $ac_dummy; do
8304   IFS=$ac_save_IFS
8305   test -z "$ac_dir" && ac_dir=.
8306   $as_executable_p "$ac_dir/$ac_word" || continue
8307 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8308 echo "$as_me:8308: found $ac_dir/$ac_word" >&5
8309 break
8310 done
8311
8312 fi
8313 fi
8314 TIC=$ac_cv_prog_TIC
8315 if test -n "$TIC"; then
8316   echo "$as_me:8316: result: $TIC" >&5
8317 echo "${ECHO_T}$TIC" >&6
8318 else
8319   echo "$as_me:8319: result: no" >&5
8320 echo "${ECHO_T}no" >&6
8321 fi
8322
8323 fi
8324 if test -z "$ac_cv_prog_TIC"; then
8325   ac_ct_TIC=$TIC
8326   # Extract the first word of "tic", so it can be a program name with args.
8327 set dummy tic; ac_word=$2
8328 echo "$as_me:8328: checking for $ac_word" >&5
8329 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8330 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8331   echo $ECHO_N "(cached) $ECHO_C" >&6
8332 else
8333   if test -n "$ac_ct_TIC"; then
8334   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8335 else
8336   ac_save_IFS=$IFS; IFS=$ac_path_separator
8337 ac_dummy="$PATH"
8338 for ac_dir in $ac_dummy; do
8339   IFS=$ac_save_IFS
8340   test -z "$ac_dir" && ac_dir=.
8341   $as_executable_p "$ac_dir/$ac_word" || continue
8342 ac_cv_prog_ac_ct_TIC="tic"
8343 echo "$as_me:8343: found $ac_dir/$ac_word" >&5
8344 break
8345 done
8346
8347 fi
8348 fi
8349 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8350 if test -n "$ac_ct_TIC"; then
8351   echo "$as_me:8351: result: $ac_ct_TIC" >&5
8352 echo "${ECHO_T}$ac_ct_TIC" >&6
8353 else
8354   echo "$as_me:8354: result: no" >&5
8355 echo "${ECHO_T}no" >&6
8356 fi
8357
8358   TIC=$ac_ct_TIC
8359 else
8360   TIC="$ac_cv_prog_TIC"
8361 fi
8362
8363 if test -n "$ac_tool_prefix"; then
8364   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8365 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8366 echo "$as_me:8366: checking for $ac_word" >&5
8367 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8368 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8369   echo $ECHO_N "(cached) $ECHO_C" >&6
8370 else
8371   if test -n "$INFOCMP"; then
8372   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8373 else
8374   ac_save_IFS=$IFS; IFS=$ac_path_separator
8375 ac_dummy="$PATH"
8376 for ac_dir in $ac_dummy; do
8377   IFS=$ac_save_IFS
8378   test -z "$ac_dir" && ac_dir=.
8379   $as_executable_p "$ac_dir/$ac_word" || continue
8380 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8381 echo "$as_me:8381: found $ac_dir/$ac_word" >&5
8382 break
8383 done
8384
8385 fi
8386 fi
8387 INFOCMP=$ac_cv_prog_INFOCMP
8388 if test -n "$INFOCMP"; then
8389   echo "$as_me:8389: result: $INFOCMP" >&5
8390 echo "${ECHO_T}$INFOCMP" >&6
8391 else
8392   echo "$as_me:8392: result: no" >&5
8393 echo "${ECHO_T}no" >&6
8394 fi
8395
8396 fi
8397 if test -z "$ac_cv_prog_INFOCMP"; then
8398   ac_ct_INFOCMP=$INFOCMP
8399   # Extract the first word of "infocmp", so it can be a program name with args.
8400 set dummy infocmp; ac_word=$2
8401 echo "$as_me:8401: checking for $ac_word" >&5
8402 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8403 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8404   echo $ECHO_N "(cached) $ECHO_C" >&6
8405 else
8406   if test -n "$ac_ct_INFOCMP"; then
8407   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8408 else
8409   ac_save_IFS=$IFS; IFS=$ac_path_separator
8410 ac_dummy="$PATH"
8411 for ac_dir in $ac_dummy; do
8412   IFS=$ac_save_IFS
8413   test -z "$ac_dir" && ac_dir=.
8414   $as_executable_p "$ac_dir/$ac_word" || continue
8415 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8416 echo "$as_me:8416: found $ac_dir/$ac_word" >&5
8417 break
8418 done
8419
8420 fi
8421 fi
8422 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8423 if test -n "$ac_ct_INFOCMP"; then
8424   echo "$as_me:8424: result: $ac_ct_INFOCMP" >&5
8425 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8426 else
8427   echo "$as_me:8427: result: no" >&5
8428 echo "${ECHO_T}no" >&6
8429 fi
8430
8431   INFOCMP=$ac_ct_INFOCMP
8432 else
8433   INFOCMP="$ac_cv_prog_INFOCMP"
8434 fi
8435
8436 if test -n "$FALLBACK_LIST"
8437 then
8438
8439 # Check whether --with-tic-path or --without-tic-path was given.
8440 if test "${with_tic_path+set}" = set; then
8441   withval="$with_tic_path"
8442   echo "$as_me:8442: checking for tic program for fallbacks" >&5
8443 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8444                 TIC=$withval
8445                 echo "$as_me:8445: result: $TIC" >&5
8446 echo "${ECHO_T}$TIC" >&6
8447
8448 if test "x$prefix" != xNONE; then
8449         cf_path_syntax="$prefix"
8450 else
8451         cf_path_syntax="$ac_default_prefix"
8452 fi
8453
8454 case ".$TIC" in
8455 (.\$\(*\)*|.\'*\'*)
8456         ;;
8457 (..|./*|.\\*)
8458         ;;
8459 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8460         ;;
8461 (.\$\{*prefix\}*|.\$\{*dir\}*)
8462         eval TIC="$TIC"
8463         case ".$TIC" in
8464         (.NONE/*)
8465                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8466                 ;;
8467         esac
8468         ;;
8469 (.no|.NONE/*)
8470         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8471         ;;
8472 (*)
8473         { { echo "$as_me:8473: error: expected a pathname, not \"$TIC\"" >&5
8474 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8475    { (exit 1); exit 1; }; }
8476         ;;
8477 esac
8478
8479 else
8480
8481 test -z "$TIC" && TIC="tic"
8482 for ac_prog in $TIC tic
8483 do
8484   # Extract the first word of "$ac_prog", so it can be a program name with args.
8485 set dummy $ac_prog; ac_word=$2
8486 echo "$as_me:8486: checking for $ac_word" >&5
8487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8488 if test "${ac_cv_path_TIC+set}" = set; then
8489   echo $ECHO_N "(cached) $ECHO_C" >&6
8490 else
8491   case $TIC in
8492   [\\/]* | ?:[\\/]*)
8493   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8494   ;;
8495   *)
8496   ac_save_IFS=$IFS; IFS=$ac_path_separator
8497 ac_dummy="$PATH:/usr/local/ncurses/bin"
8498 for ac_dir in $ac_dummy; do
8499   IFS=$ac_save_IFS
8500   test -z "$ac_dir" && ac_dir=.
8501   if $as_executable_p "$ac_dir/$ac_word"; then
8502    ac_cv_path_TIC="$ac_dir/$ac_word"
8503    echo "$as_me:8503: found $ac_dir/$ac_word" >&5
8504    break
8505 fi
8506 done
8507
8508   ;;
8509 esac
8510 fi
8511 TIC=$ac_cv_path_TIC
8512
8513 if test -n "$TIC"; then
8514   echo "$as_me:8514: result: $TIC" >&5
8515 echo "${ECHO_T}$TIC" >&6
8516 else
8517   echo "$as_me:8517: result: no" >&5
8518 echo "${ECHO_T}no" >&6
8519 fi
8520
8521   test -n "$TIC" && break
8522 done
8523 test -n "$TIC" || TIC="$TIC"
8524
8525 cf_path_prog=""
8526 cf_path_args=""
8527 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8528 for cf_temp in $ac_cv_path_TIC
8529 do
8530         if test -z "$cf_path_prog" ; then
8531                 if test "$with_full_paths" = yes ; then
8532
8533 if test "x$prefix" != xNONE; then
8534         cf_path_syntax="$prefix"
8535 else
8536         cf_path_syntax="$ac_default_prefix"
8537 fi
8538
8539 case ".$cf_temp" in
8540 (.\$\(*\)*|.\'*\'*)
8541         ;;
8542 (..|./*|.\\*)
8543         ;;
8544 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8545         ;;
8546 (.\$\{*prefix\}*|.\$\{*dir\}*)
8547         eval cf_temp="$cf_temp"
8548         case ".$cf_temp" in
8549         (.NONE/*)
8550                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8551                 ;;
8552         esac
8553         ;;
8554 (.no|.NONE/*)
8555         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8556         ;;
8557 (*)
8558         break
8559         ;;
8560 esac
8561
8562                         cf_path_prog="$cf_temp"
8563                 else
8564                         cf_path_prog="`basename "$cf_temp"`"
8565                 fi
8566         elif test -z "$cf_path_args" ; then
8567                 cf_path_args="$cf_temp"
8568         else
8569                 cf_path_args="$cf_path_args $cf_temp"
8570         fi
8571 done
8572 IFS="$cf_save_ifs"
8573
8574 if test -n "$cf_path_prog" ; then
8575
8576 echo "${as_me:-configure}:8576: testing defining path for ${cf_path_prog} ..." 1>&5
8577
8578 cat >>confdefs.h <<EOF
8579 #define TIC_PATH "$cf_path_prog"
8580 EOF
8581
8582         test -n "$cf_path_args" &&
8583 cat >>confdefs.h <<EOF
8584 #define TIC_ARGS "$cf_path_args"
8585 EOF
8586
8587 fi
8588
8589                 if test -z "$TIC"
8590                 then
8591                         { echo "$as_me:8591: WARNING: no tic program found for fallbacks" >&5
8592 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8593                 fi
8594
8595 fi;
8596
8597 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8598 if test "${with_infocmp_path+set}" = set; then
8599   withval="$with_infocmp_path"
8600   echo "$as_me:8600: checking for infocmp program for fallbacks" >&5
8601 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8602                 INFOCMP=$withval
8603                 echo "$as_me:8603: result: $INFOCMP" >&5
8604 echo "${ECHO_T}$INFOCMP" >&6
8605
8606 if test "x$prefix" != xNONE; then
8607         cf_path_syntax="$prefix"
8608 else
8609         cf_path_syntax="$ac_default_prefix"
8610 fi
8611
8612 case ".$INFOCMP" in
8613 (.\$\(*\)*|.\'*\'*)
8614         ;;
8615 (..|./*|.\\*)
8616         ;;
8617 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8618         ;;
8619 (.\$\{*prefix\}*|.\$\{*dir\}*)
8620         eval INFOCMP="$INFOCMP"
8621         case ".$INFOCMP" in
8622         (.NONE/*)
8623                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8624                 ;;
8625         esac
8626         ;;
8627 (.no|.NONE/*)
8628         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8629         ;;
8630 (*)
8631         { { echo "$as_me:8631: error: expected a pathname, not \"$INFOCMP\"" >&5
8632 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8633    { (exit 1); exit 1; }; }
8634         ;;
8635 esac
8636
8637 else
8638
8639 test -z "$INFOCMP" && INFOCMP="infocmp"
8640 for ac_prog in $INFOCMP infocmp
8641 do
8642   # Extract the first word of "$ac_prog", so it can be a program name with args.
8643 set dummy $ac_prog; ac_word=$2
8644 echo "$as_me:8644: checking for $ac_word" >&5
8645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8646 if test "${ac_cv_path_INFOCMP+set}" = set; then
8647   echo $ECHO_N "(cached) $ECHO_C" >&6
8648 else
8649   case $INFOCMP in
8650   [\\/]* | ?:[\\/]*)
8651   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8652   ;;
8653   *)
8654   ac_save_IFS=$IFS; IFS=$ac_path_separator
8655 ac_dummy="$PATH:/usr/local/ncurses/bin"
8656 for ac_dir in $ac_dummy; do
8657   IFS=$ac_save_IFS
8658   test -z "$ac_dir" && ac_dir=.
8659   if $as_executable_p "$ac_dir/$ac_word"; then
8660    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8661    echo "$as_me:8661: found $ac_dir/$ac_word" >&5
8662    break
8663 fi
8664 done
8665
8666   ;;
8667 esac
8668 fi
8669 INFOCMP=$ac_cv_path_INFOCMP
8670
8671 if test -n "$INFOCMP"; then
8672   echo "$as_me:8672: result: $INFOCMP" >&5
8673 echo "${ECHO_T}$INFOCMP" >&6
8674 else
8675   echo "$as_me:8675: result: no" >&5
8676 echo "${ECHO_T}no" >&6
8677 fi
8678
8679   test -n "$INFOCMP" && break
8680 done
8681 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8682
8683 cf_path_prog=""
8684 cf_path_args=""
8685 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8686 for cf_temp in $ac_cv_path_INFOCMP
8687 do
8688         if test -z "$cf_path_prog" ; then
8689                 if test "$with_full_paths" = yes ; then
8690
8691 if test "x$prefix" != xNONE; then
8692         cf_path_syntax="$prefix"
8693 else
8694         cf_path_syntax="$ac_default_prefix"
8695 fi
8696
8697 case ".$cf_temp" in
8698 (.\$\(*\)*|.\'*\'*)
8699         ;;
8700 (..|./*|.\\*)
8701         ;;
8702 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8703         ;;
8704 (.\$\{*prefix\}*|.\$\{*dir\}*)
8705         eval cf_temp="$cf_temp"
8706         case ".$cf_temp" in
8707         (.NONE/*)
8708                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8709                 ;;
8710         esac
8711         ;;
8712 (.no|.NONE/*)
8713         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8714         ;;
8715 (*)
8716         break
8717         ;;
8718 esac
8719
8720                         cf_path_prog="$cf_temp"
8721                 else
8722                         cf_path_prog="`basename "$cf_temp"`"
8723                 fi
8724         elif test -z "$cf_path_args" ; then
8725                 cf_path_args="$cf_temp"
8726         else
8727                 cf_path_args="$cf_path_args $cf_temp"
8728         fi
8729 done
8730 IFS="$cf_save_ifs"
8731
8732 if test -n "$cf_path_prog" ; then
8733
8734 echo "${as_me:-configure}:8734: testing defining path for ${cf_path_prog} ..." 1>&5
8735
8736 cat >>confdefs.h <<EOF
8737 #define INFOCMP_PATH "$cf_path_prog"
8738 EOF
8739
8740         test -n "$cf_path_args" &&
8741 cat >>confdefs.h <<EOF
8742 #define INFOCMP_ARGS "$cf_path_args"
8743 EOF
8744
8745 fi
8746
8747                 if test -z "$INFOCMP"
8748                 then
8749                         { echo "$as_me:8749: WARNING: no infocmp program found for fallbacks" >&5
8750 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8751                 fi
8752
8753 fi;
8754
8755         test -z "$TIC" && FALLBACK_LIST=
8756         test -z "$INFOCMP" && FALLBACK_LIST=
8757         if test -z "$FALLBACK_LIST"
8758         then
8759                 { echo "$as_me:8759: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8760 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8761         fi
8762 fi
8763
8764 USE_FALLBACKS=
8765 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8766
8767 echo "$as_me:8767: checking if you want modern xterm or antique" >&5
8768 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8769
8770 # Check whether --with-xterm-new or --without-xterm-new was given.
8771 if test "${with_xterm_new+set}" = set; then
8772   withval="$with_xterm_new"
8773   with_xterm_new=$withval
8774 else
8775   with_xterm_new=yes
8776 fi;
8777 case "$with_xterm_new" in
8778 (no) with_xterm_new=xterm-old;;
8779 (*)      with_xterm_new=xterm-new;;
8780 esac
8781 echo "$as_me:8781: result: $with_xterm_new" >&5
8782 echo "${ECHO_T}$with_xterm_new" >&6
8783 WHICH_XTERM=$with_xterm_new
8784
8785 echo "$as_me:8785: checking if xterm backspace sends BS or DEL" >&5
8786 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8787
8788 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8789 if test "${with_xterm_kbs+set}" = set; then
8790   withval="$with_xterm_kbs"
8791   with_xterm_kbs=$withval
8792 else
8793   with_xterm_kbs=BS
8794 fi;
8795 case x$with_xterm_kbs in
8796 (xyes|xno|xBS|xbs|x8)
8797         with_xterm_kbs=BS
8798         ;;
8799 (xDEL|xdel|x127)
8800         with_xterm_kbs=DEL
8801         ;;
8802 (*)
8803         with_xterm_kbs=$withval
8804         ;;
8805 esac
8806 echo "$as_me:8806: result: $with_xterm_kbs" >&5
8807 echo "${ECHO_T}$with_xterm_kbs" >&6
8808 XTERM_KBS=$with_xterm_kbs
8809
8810 MAKE_TERMINFO=
8811 if test "$use_database" = no ; then
8812         TERMINFO="${datadir}/terminfo"
8813         MAKE_TERMINFO="#"
8814 else
8815
8816 echo "$as_me:8816: checking for list of terminfo directories" >&5
8817 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8818
8819 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8820 if test "${with_terminfo_dirs+set}" = set; then
8821   withval="$with_terminfo_dirs"
8822
8823 else
8824   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8825 fi;
8826 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8827 cf_dst_path=
8828 for cf_src_path in $withval
8829 do
8830
8831 if test "x$prefix" != xNONE; then
8832         cf_path_syntax="$prefix"
8833 else
8834         cf_path_syntax="$ac_default_prefix"
8835 fi
8836
8837 case ".$cf_src_path" in
8838 (.\$\(*\)*|.\'*\'*)
8839         ;;
8840 (..|./*|.\\*)
8841         ;;
8842 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8843         ;;
8844 (.\$\{*prefix\}*|.\$\{*dir\}*)
8845         eval cf_src_path="$cf_src_path"
8846         case ".$cf_src_path" in
8847         (.NONE/*)
8848                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8849                 ;;
8850         esac
8851         ;;
8852 (.no|.NONE/*)
8853         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8854         ;;
8855 (*)
8856         { { echo "$as_me:8856: error: expected a pathname, not \"$cf_src_path\"" >&5
8857 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8858    { (exit 1); exit 1; }; }
8859         ;;
8860 esac
8861
8862   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8863   cf_dst_path="${cf_dst_path}${cf_src_path}"
8864 done
8865 IFS="$ac_save_ifs"
8866
8867 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8868 # so we have to check/work around.  We do prefer the result of "eval"...
8869 eval cf_dst_eval="$cf_dst_path"
8870 case "x$cf_dst_eval" in
8871 (xNONE*)
8872         TERMINFO_DIRS=$cf_dst_path
8873         ;;
8874 (*)
8875         TERMINFO_DIRS="$cf_dst_eval"
8876         ;;
8877 esac
8878
8879 echo "$as_me:8879: result: $TERMINFO_DIRS" >&5
8880 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8881 test -n "$TERMINFO_DIRS" &&
8882 cat >>confdefs.h <<EOF
8883 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8884 EOF
8885
8886 case "x$TERMINFO" in
8887 x???:*)
8888         { echo "$as_me:8888: WARNING: ignoring non-directory/file TERMINFO value" >&5
8889 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8890         unset TERMINFO
8891         ;;
8892 esac
8893
8894 echo "$as_me:8894: checking for default terminfo directory" >&5
8895 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8896
8897 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8898 if test "${with_default_terminfo_dir+set}" = set; then
8899   withval="$with_default_terminfo_dir"
8900
8901 else
8902   withval="${TERMINFO:-${datadir}/terminfo}"
8903 fi; if test -n "${datadir}/terminfo" ; then
8904
8905 if test "x$prefix" != xNONE; then
8906         cf_path_syntax="$prefix"
8907 else
8908         cf_path_syntax="$ac_default_prefix"
8909 fi
8910
8911 case ".$withval" in
8912 (.\$\(*\)*|.\'*\'*)
8913         ;;
8914 (..|./*|.\\*)
8915         ;;
8916 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8917         ;;
8918 (.\$\{*prefix\}*|.\$\{*dir\}*)
8919         eval withval="$withval"
8920         case ".$withval" in
8921         (.NONE/*)
8922                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8923                 ;;
8924         esac
8925         ;;
8926 (.no|.NONE/*)
8927         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8928         ;;
8929 (*)
8930         { { echo "$as_me:8930: error: expected a pathname, not \"$withval\"" >&5
8931 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8932    { (exit 1); exit 1; }; }
8933         ;;
8934 esac
8935
8936 fi
8937 eval TERMINFO="$withval"
8938
8939 echo "$as_me:8939: result: $TERMINFO" >&5
8940 echo "${ECHO_T}$TERMINFO" >&6
8941
8942 cat >>confdefs.h <<EOF
8943 #define TERMINFO "$TERMINFO"
8944 EOF
8945
8946 fi
8947
8948 ###     use option --disable-big-core to make tic run on small machines
8949 ###     We need 4Mb, check if we can allocate 50% more than that.
8950 echo "$as_me:8950: checking if big-core option selected" >&5
8951 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8952
8953 # Check whether --enable-big-core or --disable-big-core was given.
8954 if test "${enable_big_core+set}" = set; then
8955   enableval="$enable_big_core"
8956   with_big_core=$enableval
8957 else
8958   if test "$cross_compiling" = yes; then
8959   with_big_core=no
8960 else
8961   cat >"conftest.$ac_ext" <<_ACEOF
8962 #line 8962 "configure"
8963 #include "confdefs.h"
8964
8965 #include <stdlib.h>
8966 #include <string.h>
8967 int main() {
8968         unsigned long n = 6000000L;
8969         char *s = malloc(n);
8970         if (s != 0)
8971                 s[0] = s[n-1] = 0;
8972         ${cf_cv_main_return:-return}(s == 0);
8973 }
8974 _ACEOF
8975 rm -f "conftest$ac_exeext"
8976 if { (eval echo "$as_me:8976: \"$ac_link\"") >&5
8977   (eval $ac_link) 2>&5
8978   ac_status=$?
8979   echo "$as_me:8979: \$? = $ac_status" >&5
8980   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8981   { (eval echo "$as_me:8981: \"$ac_try\"") >&5
8982   (eval $ac_try) 2>&5
8983   ac_status=$?
8984   echo "$as_me:8984: \$? = $ac_status" >&5
8985   (exit "$ac_status"); }; }; then
8986   with_big_core=yes
8987 else
8988   echo "$as_me: program exited with status $ac_status" >&5
8989 echo "$as_me: failed program was:" >&5
8990 cat "conftest.$ac_ext" >&5
8991 with_big_core=no
8992 fi
8993 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8994 fi
8995 fi;
8996 echo "$as_me:8996: result: $with_big_core" >&5
8997 echo "${ECHO_T}$with_big_core" >&6
8998 test "x$with_big_core" = "xyes" &&
8999 cat >>confdefs.h <<\EOF
9000 #define HAVE_BIG_CORE 1
9001 EOF
9002
9003 ### ISO C only guarantees 512-char strings, we have tables which load faster
9004 ### when constructed using "big" strings.  More than the C compiler, the awk
9005 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9006 echo "$as_me:9006: checking if big-strings option selected" >&5
9007 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9008
9009 # Check whether --enable-big-strings or --disable-big-strings was given.
9010 if test "${enable_big_strings+set}" = set; then
9011   enableval="$enable_big_strings"
9012   with_big_strings=$enableval
9013 else
9014
9015         case x$AWK in
9016         (x)
9017                 eval with_big_strings=no
9018                 ;;
9019         (*)
9020                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9021                         | $AWK '{ printf "%d\n", length($0); }' 2>/dev/null | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
9022                         eval with_big_strings=yes
9023                 else
9024                         eval with_big_strings=no
9025                 fi
9026                 ;;
9027         esac
9028
9029 fi;
9030 echo "$as_me:9030: result: $with_big_strings" >&5
9031 echo "${ECHO_T}$with_big_strings" >&6
9032
9033 USE_BIG_STRINGS=0
9034 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9035
9036 ###     use option --enable-termcap to compile in the termcap fallback support
9037 echo "$as_me:9037: checking if you want termcap-fallback support" >&5
9038 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9039
9040 # Check whether --enable-termcap or --disable-termcap was given.
9041 if test "${enable_termcap+set}" = set; then
9042   enableval="$enable_termcap"
9043   with_termcap=$enableval
9044 else
9045   with_termcap=no
9046 fi;
9047 echo "$as_me:9047: result: $with_termcap" >&5
9048 echo "${ECHO_T}$with_termcap" >&6
9049
9050 NCURSES_USE_TERMCAP=0
9051 if test "x$with_termcap" != "xyes" ; then
9052         if test "$use_database" = no ; then
9053                 if test -z "$with_fallback" ; then
9054                         { { echo "$as_me:9054: error: You have disabled the database w/o specifying fallbacks" >&5
9055 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9056    { (exit 1); exit 1; }; }
9057                 fi
9058         fi
9059
9060 cat >>confdefs.h <<\EOF
9061 #define PURE_TERMINFO 1
9062 EOF
9063
9064 else
9065
9066         if test "$with_ticlib" != no ; then
9067                 { { echo "$as_me:9067: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9068 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9069    { (exit 1); exit 1; }; }
9070         fi
9071
9072         NCURSES_USE_TERMCAP=1
9073         echo "$as_me:9073: checking for list of termcap files" >&5
9074 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9075
9076 # Check whether --with-termpath or --without-termpath was given.
9077 if test "${with_termpath+set}" = set; then
9078   withval="$with_termpath"
9079
9080 else
9081   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9082 fi;
9083 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9084 cf_dst_path=
9085 for cf_src_path in $withval
9086 do
9087
9088 if test "x$prefix" != xNONE; then
9089         cf_path_syntax="$prefix"
9090 else
9091         cf_path_syntax="$ac_default_prefix"
9092 fi
9093
9094 case ".$cf_src_path" in
9095 (.\$\(*\)*|.\'*\'*)
9096         ;;
9097 (..|./*|.\\*)
9098         ;;
9099 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9100         ;;
9101 (.\$\{*prefix\}*|.\$\{*dir\}*)
9102         eval cf_src_path="$cf_src_path"
9103         case ".$cf_src_path" in
9104         (.NONE/*)
9105                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9106                 ;;
9107         esac
9108         ;;
9109 (.no|.NONE/*)
9110         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9111         ;;
9112 (*)
9113         { { echo "$as_me:9113: error: expected a pathname, not \"$cf_src_path\"" >&5
9114 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9115    { (exit 1); exit 1; }; }
9116         ;;
9117 esac
9118
9119   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9120   cf_dst_path="${cf_dst_path}${cf_src_path}"
9121 done
9122 IFS="$ac_save_ifs"
9123
9124 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9125 # so we have to check/work around.  We do prefer the result of "eval"...
9126 eval cf_dst_eval="$cf_dst_path"
9127 case "x$cf_dst_eval" in
9128 (xNONE*)
9129         TERMPATH=$cf_dst_path
9130         ;;
9131 (*)
9132         TERMPATH="$cf_dst_eval"
9133         ;;
9134 esac
9135
9136         echo "$as_me:9136: result: $TERMPATH" >&5
9137 echo "${ECHO_T}$TERMPATH" >&6
9138         test -n "$TERMPATH" &&
9139 cat >>confdefs.h <<EOF
9140 #define TERMPATH "$TERMPATH"
9141 EOF
9142
9143         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9144         echo "$as_me:9144: checking if fast termcap-loader is needed" >&5
9145 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9146
9147 # Check whether --enable-getcap or --disable-getcap was given.
9148 if test "${enable_getcap+set}" = set; then
9149   enableval="$enable_getcap"
9150   with_getcap=$enableval
9151 else
9152   with_getcap=no
9153 fi;
9154         echo "$as_me:9154: result: $with_getcap" >&5
9155 echo "${ECHO_T}$with_getcap" >&6
9156         test "x$with_getcap" = "xyes" &&
9157 cat >>confdefs.h <<\EOF
9158 #define USE_GETCAP 1
9159 EOF
9160
9161         echo "$as_me:9161: checking if translated termcaps will be cached in ~/.terminfo" >&5
9162 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9163
9164 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9165 if test "${enable_getcap_cache+set}" = set; then
9166   enableval="$enable_getcap_cache"
9167   with_getcap_cache=$enableval
9168 else
9169   with_getcap_cache=no
9170 fi;
9171         echo "$as_me:9171: result: $with_getcap_cache" >&5
9172 echo "${ECHO_T}$with_getcap_cache" >&6
9173         test "x$with_getcap_cache" = "xyes" &&
9174 cat >>confdefs.h <<\EOF
9175 #define USE_GETCAP_CACHE 1
9176 EOF
9177
9178 fi
9179
9180 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9181 echo "$as_me:9181: checking if ~/.terminfo is wanted" >&5
9182 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9183
9184 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9185 if test "${enable_home_terminfo+set}" = set; then
9186   enableval="$enable_home_terminfo"
9187   with_home_terminfo=$enableval
9188 else
9189   with_home_terminfo=yes
9190 fi;
9191 echo "$as_me:9191: result: $with_home_terminfo" >&5
9192 echo "${ECHO_T}$with_home_terminfo" >&6
9193 test "x$with_home_terminfo" = "xyes" &&
9194 cat >>confdefs.h <<\EOF
9195 #define USE_HOME_TERMINFO 1
9196 EOF
9197
9198 echo "$as_me:9198: checking if you want to use restricted environment when running as root" >&5
9199 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9200
9201 # Check whether --enable-root-environ or --disable-root-environ was given.
9202 if test "${enable_root_environ+set}" = set; then
9203   enableval="$enable_root_environ"
9204   with_root_environ=$enableval
9205 else
9206   with_root_environ=yes
9207 fi;
9208 echo "$as_me:9208: result: $with_root_environ" >&5
9209 echo "${ECHO_T}$with_root_environ" >&6
9210 test "x$with_root_environ" = xyes &&
9211 cat >>confdefs.h <<\EOF
9212 #define USE_ROOT_ENVIRON 1
9213 EOF
9214
9215 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9216 ###   to reduce storage requirements for the terminfo database.
9217
9218 for ac_header in \
9219 unistd.h \
9220
9221 do
9222 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9223 echo "$as_me:9223: checking for $ac_header" >&5
9224 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9225 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9226   echo $ECHO_N "(cached) $ECHO_C" >&6
9227 else
9228   cat >"conftest.$ac_ext" <<_ACEOF
9229 #line 9229 "configure"
9230 #include "confdefs.h"
9231 #include <$ac_header>
9232 _ACEOF
9233 if { (eval echo "$as_me:9233: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9234   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9235   ac_status=$?
9236   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9237   rm -f conftest.er1
9238   cat conftest.err >&5
9239   echo "$as_me:9239: \$? = $ac_status" >&5
9240   (exit "$ac_status"); } >/dev/null; then
9241   if test -s conftest.err; then
9242     ac_cpp_err=$ac_c_preproc_warn_flag
9243   else
9244     ac_cpp_err=
9245   fi
9246 else
9247   ac_cpp_err=yes
9248 fi
9249 if test -z "$ac_cpp_err"; then
9250   eval "$as_ac_Header=yes"
9251 else
9252   echo "$as_me: failed program was:" >&5
9253   cat "conftest.$ac_ext" >&5
9254   eval "$as_ac_Header=no"
9255 fi
9256 rm -f conftest.err "conftest.$ac_ext"
9257 fi
9258 echo "$as_me:9258: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9259 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9260 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9261   cat >>confdefs.h <<EOF
9262 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9263 EOF
9264
9265 fi
9266 done
9267
9268 for ac_func in \
9269         remove \
9270         unlink
9271 do
9272 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9273 echo "$as_me:9273: checking for $ac_func" >&5
9274 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9275 if eval "test \"\${$as_ac_var+set}\" = set"; then
9276   echo $ECHO_N "(cached) $ECHO_C" >&6
9277 else
9278   cat >"conftest.$ac_ext" <<_ACEOF
9279 #line 9279 "configure"
9280 #include "confdefs.h"
9281 #define $ac_func autoconf_temporary
9282 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9283 #undef $ac_func
9284
9285 #ifdef __cplusplus
9286 extern "C"
9287 #endif
9288
9289 /* We use char because int might match the return type of a gcc2
9290    builtin and then its argument prototype would still apply.  */
9291 char $ac_func (void);
9292
9293 int
9294 main (void)
9295 {
9296
9297 /* The GNU C library defines stubs for functions which it implements
9298     to always fail with ENOSYS.  Some functions are actually named
9299     something starting with __ and the normal name is an alias.  */
9300 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9301 #error found stub for $ac_func
9302 #endif
9303
9304         return $ac_func ();
9305   ;
9306   return 0;
9307 }
9308 _ACEOF
9309 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9310 if { (eval echo "$as_me:9310: \"$ac_link\"") >&5
9311   (eval $ac_link) 2>&5
9312   ac_status=$?
9313   echo "$as_me:9313: \$? = $ac_status" >&5
9314   (exit "$ac_status"); } &&
9315          { ac_try='test -s "conftest$ac_exeext"'
9316   { (eval echo "$as_me:9316: \"$ac_try\"") >&5
9317   (eval $ac_try) 2>&5
9318   ac_status=$?
9319   echo "$as_me:9319: \$? = $ac_status" >&5
9320   (exit "$ac_status"); }; }; then
9321   eval "$as_ac_var=yes"
9322 else
9323   echo "$as_me: failed program was:" >&5
9324 cat "conftest.$ac_ext" >&5
9325 eval "$as_ac_var=no"
9326 fi
9327 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9328 fi
9329 echo "$as_me:9329: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9330 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9331 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9332   cat >>confdefs.h <<EOF
9333 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9334 EOF
9335
9336 fi
9337 done
9338
9339 if test "$cross_compiling" = yes ; then
9340
9341 for ac_func in \
9342                 link \
9343                 symlink
9344 do
9345 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9346 echo "$as_me:9346: checking for $ac_func" >&5
9347 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9348 if eval "test \"\${$as_ac_var+set}\" = set"; then
9349   echo $ECHO_N "(cached) $ECHO_C" >&6
9350 else
9351   cat >"conftest.$ac_ext" <<_ACEOF
9352 #line 9352 "configure"
9353 #include "confdefs.h"
9354 #define $ac_func autoconf_temporary
9355 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9356 #undef $ac_func
9357
9358 #ifdef __cplusplus
9359 extern "C"
9360 #endif
9361
9362 /* We use char because int might match the return type of a gcc2
9363    builtin and then its argument prototype would still apply.  */
9364 char $ac_func (void);
9365
9366 int
9367 main (void)
9368 {
9369
9370 /* The GNU C library defines stubs for functions which it implements
9371     to always fail with ENOSYS.  Some functions are actually named
9372     something starting with __ and the normal name is an alias.  */
9373 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9374 #error found stub for $ac_func
9375 #endif
9376
9377         return $ac_func ();
9378   ;
9379   return 0;
9380 }
9381 _ACEOF
9382 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9383 if { (eval echo "$as_me:9383: \"$ac_link\"") >&5
9384   (eval $ac_link) 2>&5
9385   ac_status=$?
9386   echo "$as_me:9386: \$? = $ac_status" >&5
9387   (exit "$ac_status"); } &&
9388          { ac_try='test -s "conftest$ac_exeext"'
9389   { (eval echo "$as_me:9389: \"$ac_try\"") >&5
9390   (eval $ac_try) 2>&5
9391   ac_status=$?
9392   echo "$as_me:9392: \$? = $ac_status" >&5
9393   (exit "$ac_status"); }; }; then
9394   eval "$as_ac_var=yes"
9395 else
9396   echo "$as_me: failed program was:" >&5
9397 cat "conftest.$ac_ext" >&5
9398 eval "$as_ac_var=no"
9399 fi
9400 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9401 fi
9402 echo "$as_me:9402: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9403 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9404 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9405   cat >>confdefs.h <<EOF
9406 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9407 EOF
9408
9409 fi
9410 done
9411
9412 else
9413         echo "$as_me:9413: checking if link/symlink functions work" >&5
9414 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9415 if test "${cf_cv_link_funcs+set}" = set; then
9416   echo $ECHO_N "(cached) $ECHO_C" >&6
9417 else
9418
9419                 cf_cv_link_funcs=
9420                 for cf_func in link symlink ; do
9421                         if test "$cross_compiling" = yes; then
9422
9423                         eval 'ac_cv_func_'$cf_func'=error'
9424 else
9425   cat >"conftest.$ac_ext" <<_ACEOF
9426 #line 9426 "configure"
9427 #include "confdefs.h"
9428
9429 #include <sys/types.h>
9430 #include <sys/stat.h>
9431 #ifdef HAVE_UNISTD_H
9432 #include <unistd.h>
9433 #endif
9434 int main(void)
9435 {
9436         int fail = 0;
9437         char *src = "config.log";
9438         char *dst = "conftest.chk";
9439         struct stat src_sb;
9440         struct stat dst_sb;
9441
9442         stat(src, &src_sb);
9443         if ($cf_func("config.log", "conftest.chk") < 0) {
9444                 fail = 1;
9445         } else if (stat(dst, &dst_sb) < 0) {
9446                 fail = 2;
9447         } else {
9448                 long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9449                 if (diff < 0)
9450                         diff = -diff;
9451                 if (diff > 2)
9452                         fail = 3;
9453         }
9454 #ifdef HAVE_UNLINK
9455         unlink(dst);
9456 #else
9457         remove(dst);
9458 #endif
9459         ${cf_cv_main_return:-return} (fail);
9460 }
9461
9462 _ACEOF
9463 rm -f "conftest$ac_exeext"
9464 if { (eval echo "$as_me:9464: \"$ac_link\"") >&5
9465   (eval $ac_link) 2>&5
9466   ac_status=$?
9467   echo "$as_me:9467: \$? = $ac_status" >&5
9468   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9469   { (eval echo "$as_me:9469: \"$ac_try\"") >&5
9470   (eval $ac_try) 2>&5
9471   ac_status=$?
9472   echo "$as_me:9472: \$? = $ac_status" >&5
9473   (exit "$ac_status"); }; }; then
9474
9475                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9476                         eval 'ac_cv_func_'$cf_func'=yes'
9477 else
9478   echo "$as_me: program exited with status $ac_status" >&5
9479 echo "$as_me: failed program was:" >&5
9480 cat "conftest.$ac_ext" >&5
9481
9482                         eval 'ac_cv_func_'$cf_func'=no'
9483 fi
9484 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9485 fi
9486                 done
9487                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9488
9489 fi
9490 echo "$as_me:9490: result: $cf_cv_link_funcs" >&5
9491 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9492         test "$ac_cv_func_link"    = yes &&
9493 cat >>confdefs.h <<\EOF
9494 #define HAVE_LINK 1
9495 EOF
9496
9497         test "$ac_cv_func_symlink" = yes &&
9498 cat >>confdefs.h <<\EOF
9499 #define HAVE_SYMLINK 1
9500 EOF
9501
9502 fi
9503
9504 with_links=no
9505 with_symlinks=no
9506
9507 # soft links (symbolic links) are useful for some systems where hard links do
9508 # not work, or to make it simpler to copy terminfo trees around.
9509 if test "x$ac_cv_func_symlink" = xyes ; then
9510         echo "$as_me:9510: checking if tic should use symbolic links" >&5
9511 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9512
9513 # Check whether --enable-symlinks or --disable-symlinks was given.
9514 if test "${enable_symlinks+set}" = set; then
9515   enableval="$enable_symlinks"
9516   with_symlinks=$enableval
9517 else
9518   with_symlinks=no
9519 fi;
9520         echo "$as_me:9520: result: $with_symlinks" >&5
9521 echo "${ECHO_T}$with_symlinks" >&6
9522 fi
9523
9524 # If we have hard links and did not choose to use soft links instead, there is
9525 # no reason to make this choice optional - use the hard links.
9526 if test "$with_symlinks" = no ; then
9527         echo "$as_me:9527: checking if tic should use hard links" >&5
9528 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9529         if test "x$ac_cv_func_link" = xyes ; then
9530                 with_links=yes
9531         else
9532                 with_links=no
9533         fi
9534         echo "$as_me:9534: result: $with_links" >&5
9535 echo "${ECHO_T}$with_links" >&6
9536 fi
9537
9538 test "x$with_links" = xyes &&
9539 cat >>confdefs.h <<\EOF
9540 #define USE_LINKS 1
9541 EOF
9542
9543 test "x$with_symlinks" = xyes &&
9544 cat >>confdefs.h <<\EOF
9545 #define USE_SYMLINKS 1
9546 EOF
9547
9548 ###   use option --enable-broken-linker to force on use of broken-linker support
9549
9550 echo "$as_me:9550: checking if you want broken-linker support code" >&5
9551 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9552
9553 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9554 if test "${enable_broken_linker+set}" = set; then
9555   enableval="$enable_broken_linker"
9556   with_broken_linker=$enableval
9557 else
9558   with_broken_linker=no
9559 fi;
9560 echo "$as_me:9560: result: $with_broken_linker" >&5
9561 echo "${ECHO_T}$with_broken_linker" >&6
9562
9563 : "${BROKEN_LINKER:=0}"
9564 if test "x$with_broken_linker" = xyes ; then
9565
9566 cat >>confdefs.h <<\EOF
9567 #define BROKEN_LINKER 1
9568 EOF
9569
9570         BROKEN_LINKER=1
9571 fi
9572
9573 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9574 echo "$as_me:9574: checking if tputs should process BSD-style prefix padding" >&5
9575 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9576
9577 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9578 if test "${enable_bsdpad+set}" = set; then
9579   enableval="$enable_bsdpad"
9580   with_bsdpad=$enableval
9581 else
9582   with_bsdpad=no
9583 fi;
9584 echo "$as_me:9584: result: $with_bsdpad" >&5
9585 echo "${ECHO_T}$with_bsdpad" >&6
9586 test "x$with_bsdpad" = xyes &&
9587 cat >>confdefs.h <<\EOF
9588 #define BSD_TPUTS 1
9589 EOF
9590
9591 ###   use option --enable-widec to turn on use of wide-character support
9592 NCURSES_CH_T=chtype
9593 NCURSES_LIBUTF8=0
9594
9595 NEED_WCHAR_H=0
9596 NCURSES_MBSTATE_T=0
9597 NCURSES_WCHAR_T=0
9598 NCURSES_WINT_T=0
9599
9600 # Check to define _XOPEN_SOURCE "automatically"
9601 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9602
9603 echo "$as_me:9603: checking if the POSIX test-macros are already defined" >&5
9604 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9605 if test "${cf_cv_posix_visible+set}" = set; then
9606   echo $ECHO_N "(cached) $ECHO_C" >&6
9607 else
9608
9609 cat >"conftest.$ac_ext" <<_ACEOF
9610 #line 9610 "configure"
9611 #include "confdefs.h"
9612 #include <stdio.h>
9613 int
9614 main (void)
9615 {
9616
9617 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9618         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9619         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9620         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9621 #error conflicting symbols found
9622 #endif
9623
9624   ;
9625   return 0;
9626 }
9627 _ACEOF
9628 rm -f "conftest.$ac_objext"
9629 if { (eval echo "$as_me:9629: \"$ac_compile\"") >&5
9630   (eval $ac_compile) 2>&5
9631   ac_status=$?
9632   echo "$as_me:9632: \$? = $ac_status" >&5
9633   (exit "$ac_status"); } &&
9634          { ac_try='test -s "conftest.$ac_objext"'
9635   { (eval echo "$as_me:9635: \"$ac_try\"") >&5
9636   (eval $ac_try) 2>&5
9637   ac_status=$?
9638   echo "$as_me:9638: \$? = $ac_status" >&5
9639   (exit "$ac_status"); }; }; then
9640   cf_cv_posix_visible=no
9641 else
9642   echo "$as_me: failed program was:" >&5
9643 cat "conftest.$ac_ext" >&5
9644 cf_cv_posix_visible=yes
9645 fi
9646 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9647
9648 fi
9649 echo "$as_me:9649: result: $cf_cv_posix_visible" >&5
9650 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9651
9652 if test "$cf_cv_posix_visible" = no; then
9653
9654 cf_XOPEN_SOURCE=600
9655 cf_POSIX_C_SOURCE=199506L
9656 cf_xopen_source=
9657
9658 case "$host_os" in
9659 (aix[4-7]*)
9660         cf_xopen_source="-D_ALL_SOURCE"
9661         ;;
9662 (msys)
9663         cf_XOPEN_SOURCE=600
9664         ;;
9665 (darwin[0-8].*)
9666         cf_xopen_source="-D_APPLE_C_SOURCE"
9667         ;;
9668 (darwin*)
9669         cf_xopen_source="-D_DARWIN_C_SOURCE"
9670         cf_XOPEN_SOURCE=
9671         ;;
9672 (freebsd*|dragonfly*|midnightbsd*)
9673         # 5.x headers associate
9674         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9675         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9676         cf_POSIX_C_SOURCE=200112L
9677         cf_XOPEN_SOURCE=600
9678         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9679         ;;
9680 (hpux11*)
9681         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9682         ;;
9683 (hpux*)
9684         cf_xopen_source="-D_HPUX_SOURCE"
9685         ;;
9686 (irix[56].*)
9687         cf_xopen_source="-D_SGI_SOURCE"
9688         cf_XOPEN_SOURCE=
9689         ;;
9690 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9691
9692 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9693
9694 echo "$as_me:9694: checking if this is the GNU C library" >&5
9695 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9696 if test "${cf_cv_gnu_library+set}" = set; then
9697   echo $ECHO_N "(cached) $ECHO_C" >&6
9698 else
9699
9700 cat >"conftest.$ac_ext" <<_ACEOF
9701 #line 9701 "configure"
9702 #include "confdefs.h"
9703 #include <sys/types.h>
9704 int
9705 main (void)
9706 {
9707
9708         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9709                 return 0;
9710         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9711                 return 0;
9712         #else
9713         #       error not GNU C library
9714         #endif
9715   ;
9716   return 0;
9717 }
9718 _ACEOF
9719 rm -f "conftest.$ac_objext"
9720 if { (eval echo "$as_me:9720: \"$ac_compile\"") >&5
9721   (eval $ac_compile) 2>&5
9722   ac_status=$?
9723   echo "$as_me:9723: \$? = $ac_status" >&5
9724   (exit "$ac_status"); } &&
9725          { ac_try='test -s "conftest.$ac_objext"'
9726   { (eval echo "$as_me:9726: \"$ac_try\"") >&5
9727   (eval $ac_try) 2>&5
9728   ac_status=$?
9729   echo "$as_me:9729: \$? = $ac_status" >&5
9730   (exit "$ac_status"); }; }; then
9731   cf_cv_gnu_library=yes
9732 else
9733   echo "$as_me: failed program was:" >&5
9734 cat "conftest.$ac_ext" >&5
9735 cf_cv_gnu_library=no
9736 fi
9737 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9738
9739 fi
9740 echo "$as_me:9740: result: $cf_cv_gnu_library" >&5
9741 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9742
9743 if test x$cf_cv_gnu_library = xyes; then
9744
9745         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9746         # was changed to help a little.  newlib incorporated the change about 4
9747         # years later.
9748         echo "$as_me:9748: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9749 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9750 if test "${cf_cv_gnu_library_219+set}" = set; then
9751   echo $ECHO_N "(cached) $ECHO_C" >&6
9752 else
9753
9754                 cf_save="$CPPFLAGS"
9755
9756         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9757         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9758
9759                 cat >"conftest.$ac_ext" <<_ACEOF
9760 #line 9760 "configure"
9761 #include "confdefs.h"
9762 #include <sys/types.h>
9763 int
9764 main (void)
9765 {
9766
9767                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9768                                 return 0;
9769                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9770                                 return 0;
9771                         #else
9772                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9773                         #endif
9774   ;
9775   return 0;
9776 }
9777 _ACEOF
9778 rm -f "conftest.$ac_objext"
9779 if { (eval echo "$as_me:9779: \"$ac_compile\"") >&5
9780   (eval $ac_compile) 2>&5
9781   ac_status=$?
9782   echo "$as_me:9782: \$? = $ac_status" >&5
9783   (exit "$ac_status"); } &&
9784          { ac_try='test -s "conftest.$ac_objext"'
9785   { (eval echo "$as_me:9785: \"$ac_try\"") >&5
9786   (eval $ac_try) 2>&5
9787   ac_status=$?
9788   echo "$as_me:9788: \$? = $ac_status" >&5
9789   (exit "$ac_status"); }; }; then
9790   cf_cv_gnu_library_219=yes
9791 else
9792   echo "$as_me: failed program was:" >&5
9793 cat "conftest.$ac_ext" >&5
9794 cf_cv_gnu_library_219=no
9795 fi
9796 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9797                 CPPFLAGS="$cf_save"
9798
9799 fi
9800 echo "$as_me:9800: result: $cf_cv_gnu_library_219" >&5
9801 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9802
9803         if test "x$cf_cv_gnu_library_219" = xyes; then
9804                 cf_save="$CPPFLAGS"
9805                 echo "$as_me:9805: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9806 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9807 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9808   echo $ECHO_N "(cached) $ECHO_C" >&6
9809 else
9810
9811 cf_fix_cppflags=no
9812 cf_new_cflags=
9813 cf_new_cppflags=
9814 cf_new_extra_cppflags=
9815
9816 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9817 do
9818 case "$cf_fix_cppflags" in
9819 (no)
9820         case "$cf_add_cflags" in
9821         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9822                 case "$cf_add_cflags" in
9823                 (-D*)
9824                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9825
9826                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9827                                 && test -z "${cf_tst_cflags}" \
9828                                 && cf_fix_cppflags=yes
9829
9830                         if test "$cf_fix_cppflags" = yes ; then
9831
9832         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9833         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9834
9835                                 continue
9836                         elif test "${cf_tst_cflags}" = "\"'" ; then
9837
9838         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9839         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9840
9841                                 continue
9842                         fi
9843                         ;;
9844                 esac
9845                 case "$CPPFLAGS" in
9846                 (*$cf_add_cflags)
9847                         ;;
9848                 (*)
9849                         case "$cf_add_cflags" in
9850                         (-D*)
9851                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9852
9853 CPPFLAGS=`echo "$CPPFLAGS" | \
9854         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9855                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9856
9857                                 ;;
9858                         esac
9859
9860         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9861         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9862
9863                         ;;
9864                 esac
9865                 ;;
9866         (*)
9867
9868         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9869         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9870
9871                 ;;
9872         esac
9873         ;;
9874 (yes)
9875
9876         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9877         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9878
9879         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9880
9881         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9882                 && test -z "${cf_tst_cflags}" \
9883                 && cf_fix_cppflags=no
9884         ;;
9885 esac
9886 done
9887
9888 if test -n "$cf_new_cflags" ; then
9889
9890         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9891         CFLAGS="${CFLAGS}$cf_new_cflags"
9892
9893 fi
9894
9895 if test -n "$cf_new_cppflags" ; then
9896
9897         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9898         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9899
9900 fi
9901
9902 if test -n "$cf_new_extra_cppflags" ; then
9903
9904         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9905         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9906
9907 fi
9908
9909                         cat >"conftest.$ac_ext" <<_ACEOF
9910 #line 9910 "configure"
9911 #include "confdefs.h"
9912
9913                                 #include <limits.h>
9914                                 #include <sys/types.h>
9915
9916 int
9917 main (void)
9918 {
9919
9920                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9921                                         return 0;
9922                                 #else
9923                                 #       error GNU C library is too old
9924                                 #endif
9925   ;
9926   return 0;
9927 }
9928 _ACEOF
9929 rm -f "conftest.$ac_objext"
9930 if { (eval echo "$as_me:9930: \"$ac_compile\"") >&5
9931   (eval $ac_compile) 2>&5
9932   ac_status=$?
9933   echo "$as_me:9933: \$? = $ac_status" >&5
9934   (exit "$ac_status"); } &&
9935          { ac_try='test -s "conftest.$ac_objext"'
9936   { (eval echo "$as_me:9936: \"$ac_try\"") >&5
9937   (eval $ac_try) 2>&5
9938   ac_status=$?
9939   echo "$as_me:9939: \$? = $ac_status" >&5
9940   (exit "$ac_status"); }; }; then
9941   cf_cv_gnu_dftsrc_219=yes
9942 else
9943   echo "$as_me: failed program was:" >&5
9944 cat "conftest.$ac_ext" >&5
9945 cf_cv_gnu_dftsrc_219=no
9946 fi
9947 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9948
9949 fi
9950 echo "$as_me:9950: result: $cf_cv_gnu_dftsrc_219" >&5
9951 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9952                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9953         else
9954                 cf_cv_gnu_dftsrc_219=maybe
9955         fi
9956
9957         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9958
9959                 echo "$as_me:9959: checking if we must define _GNU_SOURCE" >&5
9960 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9961 if test "${cf_cv_gnu_source+set}" = set; then
9962   echo $ECHO_N "(cached) $ECHO_C" >&6
9963 else
9964
9965                 cat >"conftest.$ac_ext" <<_ACEOF
9966 #line 9966 "configure"
9967 #include "confdefs.h"
9968 #include <sys/types.h>
9969 int
9970 main (void)
9971 {
9972
9973                         #ifndef _XOPEN_SOURCE
9974                         #error  expected _XOPEN_SOURCE to be defined
9975                         #endif
9976   ;
9977   return 0;
9978 }
9979 _ACEOF
9980 rm -f "conftest.$ac_objext"
9981 if { (eval echo "$as_me:9981: \"$ac_compile\"") >&5
9982   (eval $ac_compile) 2>&5
9983   ac_status=$?
9984   echo "$as_me:9984: \$? = $ac_status" >&5
9985   (exit "$ac_status"); } &&
9986          { ac_try='test -s "conftest.$ac_objext"'
9987   { (eval echo "$as_me:9987: \"$ac_try\"") >&5
9988   (eval $ac_try) 2>&5
9989   ac_status=$?
9990   echo "$as_me:9990: \$? = $ac_status" >&5
9991   (exit "$ac_status"); }; }; then
9992   cf_cv_gnu_source=no
9993 else
9994   echo "$as_me: failed program was:" >&5
9995 cat "conftest.$ac_ext" >&5
9996 cf_save="$CPPFLAGS"
9997
9998 cf_fix_cppflags=no
9999 cf_new_cflags=
10000 cf_new_cppflags=
10001 cf_new_extra_cppflags=
10002
10003 for cf_add_cflags in -D_GNU_SOURCE
10004 do
10005 case "$cf_fix_cppflags" in
10006 (no)
10007         case "$cf_add_cflags" in
10008         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10009                 case "$cf_add_cflags" in
10010                 (-D*)
10011                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10012
10013                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10014                                 && test -z "${cf_tst_cflags}" \
10015                                 && cf_fix_cppflags=yes
10016
10017                         if test "$cf_fix_cppflags" = yes ; then
10018
10019         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10020         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10021
10022                                 continue
10023                         elif test "${cf_tst_cflags}" = "\"'" ; then
10024
10025         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10026         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10027
10028                                 continue
10029                         fi
10030                         ;;
10031                 esac
10032                 case "$CPPFLAGS" in
10033                 (*$cf_add_cflags)
10034                         ;;
10035                 (*)
10036                         case "$cf_add_cflags" in
10037                         (-D*)
10038                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10039
10040 CPPFLAGS=`echo "$CPPFLAGS" | \
10041         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10042                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10043
10044                                 ;;
10045                         esac
10046
10047         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10048         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10049
10050                         ;;
10051                 esac
10052                 ;;
10053         (*)
10054
10055         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10056         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10057
10058                 ;;
10059         esac
10060         ;;
10061 (yes)
10062
10063         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10064         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10065
10066         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10067
10068         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10069                 && test -z "${cf_tst_cflags}" \
10070                 && cf_fix_cppflags=no
10071         ;;
10072 esac
10073 done
10074
10075 if test -n "$cf_new_cflags" ; then
10076
10077         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10078         CFLAGS="${CFLAGS}$cf_new_cflags"
10079
10080 fi
10081
10082 if test -n "$cf_new_cppflags" ; then
10083
10084         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10085         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10086
10087 fi
10088
10089 if test -n "$cf_new_extra_cppflags" ; then
10090
10091         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10092         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10093
10094 fi
10095
10096                          cat >"conftest.$ac_ext" <<_ACEOF
10097 #line 10097 "configure"
10098 #include "confdefs.h"
10099 #include <sys/types.h>
10100 int
10101 main (void)
10102 {
10103
10104                                 #ifdef _XOPEN_SOURCE
10105                                 #error  expected _XOPEN_SOURCE to be undefined
10106                                 #endif
10107   ;
10108   return 0;
10109 }
10110 _ACEOF
10111 rm -f "conftest.$ac_objext"
10112 if { (eval echo "$as_me:10112: \"$ac_compile\"") >&5
10113   (eval $ac_compile) 2>&5
10114   ac_status=$?
10115   echo "$as_me:10115: \$? = $ac_status" >&5
10116   (exit "$ac_status"); } &&
10117          { ac_try='test -s "conftest.$ac_objext"'
10118   { (eval echo "$as_me:10118: \"$ac_try\"") >&5
10119   (eval $ac_try) 2>&5
10120   ac_status=$?
10121   echo "$as_me:10121: \$? = $ac_status" >&5
10122   (exit "$ac_status"); }; }; then
10123   cf_cv_gnu_source=no
10124 else
10125   echo "$as_me: failed program was:" >&5
10126 cat "conftest.$ac_ext" >&5
10127 cf_cv_gnu_source=yes
10128 fi
10129 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10130                         CPPFLAGS="$cf_save"
10131
10132 fi
10133 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10134
10135 fi
10136 echo "$as_me:10136: result: $cf_cv_gnu_source" >&5
10137 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10138
10139                 if test "$cf_cv_gnu_source" = yes
10140                 then
10141                 echo "$as_me:10141: checking if we should also define _DEFAULT_SOURCE" >&5
10142 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10143 if test "${cf_cv_default_source+set}" = set; then
10144   echo $ECHO_N "(cached) $ECHO_C" >&6
10145 else
10146
10147         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10148         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10149
10150                         cat >"conftest.$ac_ext" <<_ACEOF
10151 #line 10151 "configure"
10152 #include "confdefs.h"
10153 #include <sys/types.h>
10154 int
10155 main (void)
10156 {
10157
10158                                 #ifdef _DEFAULT_SOURCE
10159                                 #error  expected _DEFAULT_SOURCE to be undefined
10160                                 #endif
10161   ;
10162   return 0;
10163 }
10164 _ACEOF
10165 rm -f "conftest.$ac_objext"
10166 if { (eval echo "$as_me:10166: \"$ac_compile\"") >&5
10167   (eval $ac_compile) 2>&5
10168   ac_status=$?
10169   echo "$as_me:10169: \$? = $ac_status" >&5
10170   (exit "$ac_status"); } &&
10171          { ac_try='test -s "conftest.$ac_objext"'
10172   { (eval echo "$as_me:10172: \"$ac_try\"") >&5
10173   (eval $ac_try) 2>&5
10174   ac_status=$?
10175   echo "$as_me:10175: \$? = $ac_status" >&5
10176   (exit "$ac_status"); }; }; then
10177   cf_cv_default_source=no
10178 else
10179   echo "$as_me: failed program was:" >&5
10180 cat "conftest.$ac_ext" >&5
10181 cf_cv_default_source=yes
10182 fi
10183 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10184
10185 fi
10186 echo "$as_me:10186: result: $cf_cv_default_source" >&5
10187 echo "${ECHO_T}$cf_cv_default_source" >&6
10188                         if test "$cf_cv_default_source" = yes
10189                         then
10190
10191         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10192         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10193
10194                         fi
10195                 fi
10196         fi
10197
10198 fi
10199
10200         ;;
10201 (minix*)
10202         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10203         ;;
10204 (mirbsd*)
10205         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10206         cf_XOPEN_SOURCE=
10207
10208 if test "$cf_cv_posix_visible" = no; then
10209
10210 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10211
10212 cf_save_CFLAGS="$CFLAGS"
10213 cf_save_CPPFLAGS="$CPPFLAGS"
10214
10215 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10216         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10217                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10218
10219 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10220         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10221                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10222
10223 echo "$as_me:10223: checking if we should define _POSIX_C_SOURCE" >&5
10224 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10225 if test "${cf_cv_posix_c_source+set}" = set; then
10226   echo $ECHO_N "(cached) $ECHO_C" >&6
10227 else
10228
10229 echo "${as_me:-configure}:10229: testing if the symbol is already defined go no further ..." 1>&5
10230
10231         cat >"conftest.$ac_ext" <<_ACEOF
10232 #line 10232 "configure"
10233 #include "confdefs.h"
10234 #include <sys/types.h>
10235 int
10236 main (void)
10237 {
10238
10239 #ifndef _POSIX_C_SOURCE
10240 make an error
10241 #endif
10242   ;
10243   return 0;
10244 }
10245 _ACEOF
10246 rm -f "conftest.$ac_objext"
10247 if { (eval echo "$as_me:10247: \"$ac_compile\"") >&5
10248   (eval $ac_compile) 2>&5
10249   ac_status=$?
10250   echo "$as_me:10250: \$? = $ac_status" >&5
10251   (exit "$ac_status"); } &&
10252          { ac_try='test -s "conftest.$ac_objext"'
10253   { (eval echo "$as_me:10253: \"$ac_try\"") >&5
10254   (eval $ac_try) 2>&5
10255   ac_status=$?
10256   echo "$as_me:10256: \$? = $ac_status" >&5
10257   (exit "$ac_status"); }; }; then
10258   cf_cv_posix_c_source=no
10259 else
10260   echo "$as_me: failed program was:" >&5
10261 cat "conftest.$ac_ext" >&5
10262 cf_want_posix_source=no
10263          case .$cf_POSIX_C_SOURCE in
10264          (.[12]??*)
10265                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10266                 ;;
10267          (.2)
10268                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10269                 cf_want_posix_source=yes
10270                 ;;
10271          (.*)
10272                 cf_want_posix_source=yes
10273                 ;;
10274          esac
10275          if test "$cf_want_posix_source" = yes ; then
10276                 cat >"conftest.$ac_ext" <<_ACEOF
10277 #line 10277 "configure"
10278 #include "confdefs.h"
10279 #include <sys/types.h>
10280 int
10281 main (void)
10282 {
10283
10284 #ifdef _POSIX_SOURCE
10285 make an error
10286 #endif
10287   ;
10288   return 0;
10289 }
10290 _ACEOF
10291 rm -f "conftest.$ac_objext"
10292 if { (eval echo "$as_me:10292: \"$ac_compile\"") >&5
10293   (eval $ac_compile) 2>&5
10294   ac_status=$?
10295   echo "$as_me:10295: \$? = $ac_status" >&5
10296   (exit "$ac_status"); } &&
10297          { ac_try='test -s "conftest.$ac_objext"'
10298   { (eval echo "$as_me:10298: \"$ac_try\"") >&5
10299   (eval $ac_try) 2>&5
10300   ac_status=$?
10301   echo "$as_me:10301: \$? = $ac_status" >&5
10302   (exit "$ac_status"); }; }; then
10303   :
10304 else
10305   echo "$as_me: failed program was:" >&5
10306 cat "conftest.$ac_ext" >&5
10307 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10308 fi
10309 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10310          fi
10311
10312 echo "${as_me:-configure}:10312: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10313
10314          CFLAGS="$cf_trim_CFLAGS"
10315          CPPFLAGS="$cf_trim_CPPFLAGS"
10316
10317         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10318         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10319
10320 echo "${as_me:-configure}:10320: testing if the second compile does not leave our definition intact error ..." 1>&5
10321
10322          cat >"conftest.$ac_ext" <<_ACEOF
10323 #line 10323 "configure"
10324 #include "confdefs.h"
10325 #include <sys/types.h>
10326 int
10327 main (void)
10328 {
10329
10330 #ifndef _POSIX_C_SOURCE
10331 make an error
10332 #endif
10333   ;
10334   return 0;
10335 }
10336 _ACEOF
10337 rm -f "conftest.$ac_objext"
10338 if { (eval echo "$as_me:10338: \"$ac_compile\"") >&5
10339   (eval $ac_compile) 2>&5
10340   ac_status=$?
10341   echo "$as_me:10341: \$? = $ac_status" >&5
10342   (exit "$ac_status"); } &&
10343          { ac_try='test -s "conftest.$ac_objext"'
10344   { (eval echo "$as_me:10344: \"$ac_try\"") >&5
10345   (eval $ac_try) 2>&5
10346   ac_status=$?
10347   echo "$as_me:10347: \$? = $ac_status" >&5
10348   (exit "$ac_status"); }; }; then
10349   :
10350 else
10351   echo "$as_me: failed program was:" >&5
10352 cat "conftest.$ac_ext" >&5
10353 cf_cv_posix_c_source=no
10354 fi
10355 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10356          CFLAGS="$cf_save_CFLAGS"
10357          CPPFLAGS="$cf_save_CPPFLAGS"
10358
10359 fi
10360 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10361
10362 fi
10363 echo "$as_me:10363: result: $cf_cv_posix_c_source" >&5
10364 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10365
10366 if test "$cf_cv_posix_c_source" != no ; then
10367         CFLAGS="$cf_trim_CFLAGS"
10368         CPPFLAGS="$cf_trim_CPPFLAGS"
10369
10370 cf_fix_cppflags=no
10371 cf_new_cflags=
10372 cf_new_cppflags=
10373 cf_new_extra_cppflags=
10374
10375 for cf_add_cflags in $cf_cv_posix_c_source
10376 do
10377 case "$cf_fix_cppflags" in
10378 (no)
10379         case "$cf_add_cflags" in
10380         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10381                 case "$cf_add_cflags" in
10382                 (-D*)
10383                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10384
10385                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10386                                 && test -z "${cf_tst_cflags}" \
10387                                 && cf_fix_cppflags=yes
10388
10389                         if test "$cf_fix_cppflags" = yes ; then
10390
10391         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10392         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10393
10394                                 continue
10395                         elif test "${cf_tst_cflags}" = "\"'" ; then
10396
10397         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10398         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10399
10400                                 continue
10401                         fi
10402                         ;;
10403                 esac
10404                 case "$CPPFLAGS" in
10405                 (*$cf_add_cflags)
10406                         ;;
10407                 (*)
10408                         case "$cf_add_cflags" in
10409                         (-D*)
10410                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10411
10412 CPPFLAGS=`echo "$CPPFLAGS" | \
10413         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10414                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10415
10416                                 ;;
10417                         esac
10418
10419         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10420         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10421
10422                         ;;
10423                 esac
10424                 ;;
10425         (*)
10426
10427         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10428         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10429
10430                 ;;
10431         esac
10432         ;;
10433 (yes)
10434
10435         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10436         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10437
10438         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10439
10440         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10441                 && test -z "${cf_tst_cflags}" \
10442                 && cf_fix_cppflags=no
10443         ;;
10444 esac
10445 done
10446
10447 if test -n "$cf_new_cflags" ; then
10448
10449         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10450         CFLAGS="${CFLAGS}$cf_new_cflags"
10451
10452 fi
10453
10454 if test -n "$cf_new_cppflags" ; then
10455
10456         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10457         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10458
10459 fi
10460
10461 if test -n "$cf_new_extra_cppflags" ; then
10462
10463         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10464         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10465
10466 fi
10467
10468 fi
10469
10470 fi # cf_cv_posix_visible
10471
10472         ;;
10473 (netbsd*)
10474         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10475         ;;
10476 (openbsd[4-9]*)
10477         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10478         cf_xopen_source="-D_BSD_SOURCE"
10479         cf_XOPEN_SOURCE=600
10480         ;;
10481 (openbsd*)
10482         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10483         ;;
10484 (osf[45]*)
10485         cf_xopen_source="-D_OSF_SOURCE"
10486         ;;
10487 (nto-qnx*)
10488         cf_xopen_source="-D_QNX_SOURCE"
10489         ;;
10490 (sco*)
10491         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10492         ;;
10493 (solaris2.*)
10494         cf_xopen_source="-D__EXTENSIONS__"
10495         cf_cv_xopen_source=broken
10496         ;;
10497 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10498         cf_XOPEN_SOURCE=
10499         cf_POSIX_C_SOURCE=
10500         ;;
10501 (*)
10502
10503 echo "$as_me:10503: checking if we should define _XOPEN_SOURCE" >&5
10504 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10505 if test "${cf_cv_xopen_source+set}" = set; then
10506   echo $ECHO_N "(cached) $ECHO_C" >&6
10507 else
10508
10509         cat >"conftest.$ac_ext" <<_ACEOF
10510 #line 10510 "configure"
10511 #include "confdefs.h"
10512
10513 #include <stdlib.h>
10514 #include <string.h>
10515 #include <sys/types.h>
10516
10517 int
10518 main (void)
10519 {
10520
10521 #ifndef _XOPEN_SOURCE
10522 make an error
10523 #endif
10524   ;
10525   return 0;
10526 }
10527 _ACEOF
10528 rm -f "conftest.$ac_objext"
10529 if { (eval echo "$as_me:10529: \"$ac_compile\"") >&5
10530   (eval $ac_compile) 2>&5
10531   ac_status=$?
10532   echo "$as_me:10532: \$? = $ac_status" >&5
10533   (exit "$ac_status"); } &&
10534          { ac_try='test -s "conftest.$ac_objext"'
10535   { (eval echo "$as_me:10535: \"$ac_try\"") >&5
10536   (eval $ac_try) 2>&5
10537   ac_status=$?
10538   echo "$as_me:10538: \$? = $ac_status" >&5
10539   (exit "$ac_status"); }; }; then
10540   cf_cv_xopen_source=no
10541 else
10542   echo "$as_me: failed program was:" >&5
10543 cat "conftest.$ac_ext" >&5
10544 cf_save="$CPPFLAGS"
10545
10546         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10547         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10548
10549          cat >"conftest.$ac_ext" <<_ACEOF
10550 #line 10550 "configure"
10551 #include "confdefs.h"
10552
10553 #include <stdlib.h>
10554 #include <string.h>
10555 #include <sys/types.h>
10556
10557 int
10558 main (void)
10559 {
10560
10561 #ifdef _XOPEN_SOURCE
10562 make an error
10563 #endif
10564   ;
10565   return 0;
10566 }
10567 _ACEOF
10568 rm -f "conftest.$ac_objext"
10569 if { (eval echo "$as_me:10569: \"$ac_compile\"") >&5
10570   (eval $ac_compile) 2>&5
10571   ac_status=$?
10572   echo "$as_me:10572: \$? = $ac_status" >&5
10573   (exit "$ac_status"); } &&
10574          { ac_try='test -s "conftest.$ac_objext"'
10575   { (eval echo "$as_me:10575: \"$ac_try\"") >&5
10576   (eval $ac_try) 2>&5
10577   ac_status=$?
10578   echo "$as_me:10578: \$? = $ac_status" >&5
10579   (exit "$ac_status"); }; }; then
10580   cf_cv_xopen_source=no
10581 else
10582   echo "$as_me: failed program was:" >&5
10583 cat "conftest.$ac_ext" >&5
10584 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10585 fi
10586 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10587         CPPFLAGS="$cf_save"
10588
10589 fi
10590 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10591
10592 fi
10593 echo "$as_me:10593: result: $cf_cv_xopen_source" >&5
10594 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10595
10596 if test "$cf_cv_xopen_source" != no ; then
10597
10598 CFLAGS=`echo "$CFLAGS" | \
10599         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10600                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10601
10602 CPPFLAGS=`echo "$CPPFLAGS" | \
10603         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10604                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10605
10606         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10607
10608 cf_fix_cppflags=no
10609 cf_new_cflags=
10610 cf_new_cppflags=
10611 cf_new_extra_cppflags=
10612
10613 for cf_add_cflags in $cf_temp_xopen_source
10614 do
10615 case "$cf_fix_cppflags" in
10616 (no)
10617         case "$cf_add_cflags" in
10618         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10619                 case "$cf_add_cflags" in
10620                 (-D*)
10621                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10622
10623                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10624                                 && test -z "${cf_tst_cflags}" \
10625                                 && cf_fix_cppflags=yes
10626
10627                         if test "$cf_fix_cppflags" = yes ; then
10628
10629         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10630         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10631
10632                                 continue
10633                         elif test "${cf_tst_cflags}" = "\"'" ; then
10634
10635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10637
10638                                 continue
10639                         fi
10640                         ;;
10641                 esac
10642                 case "$CPPFLAGS" in
10643                 (*$cf_add_cflags)
10644                         ;;
10645                 (*)
10646                         case "$cf_add_cflags" in
10647                         (-D*)
10648                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10649
10650 CPPFLAGS=`echo "$CPPFLAGS" | \
10651         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10652                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10653
10654                                 ;;
10655                         esac
10656
10657         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10658         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10659
10660                         ;;
10661                 esac
10662                 ;;
10663         (*)
10664
10665         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10666         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10667
10668                 ;;
10669         esac
10670         ;;
10671 (yes)
10672
10673         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10674         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10675
10676         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10677
10678         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10679                 && test -z "${cf_tst_cflags}" \
10680                 && cf_fix_cppflags=no
10681         ;;
10682 esac
10683 done
10684
10685 if test -n "$cf_new_cflags" ; then
10686
10687         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10688         CFLAGS="${CFLAGS}$cf_new_cflags"
10689
10690 fi
10691
10692 if test -n "$cf_new_cppflags" ; then
10693
10694         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10695         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10696
10697 fi
10698
10699 if test -n "$cf_new_extra_cppflags" ; then
10700
10701         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10702         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10703
10704 fi
10705
10706 fi
10707
10708 if test "$cf_cv_posix_visible" = no; then
10709
10710 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10711
10712 cf_save_CFLAGS="$CFLAGS"
10713 cf_save_CPPFLAGS="$CPPFLAGS"
10714
10715 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10716         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10717                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10718
10719 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10720         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10721                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10722
10723 echo "$as_me:10723: checking if we should define _POSIX_C_SOURCE" >&5
10724 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10725 if test "${cf_cv_posix_c_source+set}" = set; then
10726   echo $ECHO_N "(cached) $ECHO_C" >&6
10727 else
10728
10729 echo "${as_me:-configure}:10729: testing if the symbol is already defined go no further ..." 1>&5
10730
10731         cat >"conftest.$ac_ext" <<_ACEOF
10732 #line 10732 "configure"
10733 #include "confdefs.h"
10734 #include <sys/types.h>
10735 int
10736 main (void)
10737 {
10738
10739 #ifndef _POSIX_C_SOURCE
10740 make an error
10741 #endif
10742   ;
10743   return 0;
10744 }
10745 _ACEOF
10746 rm -f "conftest.$ac_objext"
10747 if { (eval echo "$as_me:10747: \"$ac_compile\"") >&5
10748   (eval $ac_compile) 2>&5
10749   ac_status=$?
10750   echo "$as_me:10750: \$? = $ac_status" >&5
10751   (exit "$ac_status"); } &&
10752          { ac_try='test -s "conftest.$ac_objext"'
10753   { (eval echo "$as_me:10753: \"$ac_try\"") >&5
10754   (eval $ac_try) 2>&5
10755   ac_status=$?
10756   echo "$as_me:10756: \$? = $ac_status" >&5
10757   (exit "$ac_status"); }; }; then
10758   cf_cv_posix_c_source=no
10759 else
10760   echo "$as_me: failed program was:" >&5
10761 cat "conftest.$ac_ext" >&5
10762 cf_want_posix_source=no
10763          case .$cf_POSIX_C_SOURCE in
10764          (.[12]??*)
10765                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10766                 ;;
10767          (.2)
10768                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10769                 cf_want_posix_source=yes
10770                 ;;
10771          (.*)
10772                 cf_want_posix_source=yes
10773                 ;;
10774          esac
10775          if test "$cf_want_posix_source" = yes ; then
10776                 cat >"conftest.$ac_ext" <<_ACEOF
10777 #line 10777 "configure"
10778 #include "confdefs.h"
10779 #include <sys/types.h>
10780 int
10781 main (void)
10782 {
10783
10784 #ifdef _POSIX_SOURCE
10785 make an error
10786 #endif
10787   ;
10788   return 0;
10789 }
10790 _ACEOF
10791 rm -f "conftest.$ac_objext"
10792 if { (eval echo "$as_me:10792: \"$ac_compile\"") >&5
10793   (eval $ac_compile) 2>&5
10794   ac_status=$?
10795   echo "$as_me:10795: \$? = $ac_status" >&5
10796   (exit "$ac_status"); } &&
10797          { ac_try='test -s "conftest.$ac_objext"'
10798   { (eval echo "$as_me:10798: \"$ac_try\"") >&5
10799   (eval $ac_try) 2>&5
10800   ac_status=$?
10801   echo "$as_me:10801: \$? = $ac_status" >&5
10802   (exit "$ac_status"); }; }; then
10803   :
10804 else
10805   echo "$as_me: failed program was:" >&5
10806 cat "conftest.$ac_ext" >&5
10807 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10808 fi
10809 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10810          fi
10811
10812 echo "${as_me:-configure}:10812: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10813
10814          CFLAGS="$cf_trim_CFLAGS"
10815          CPPFLAGS="$cf_trim_CPPFLAGS"
10816
10817         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10818         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10819
10820 echo "${as_me:-configure}:10820: testing if the second compile does not leave our definition intact error ..." 1>&5
10821
10822          cat >"conftest.$ac_ext" <<_ACEOF
10823 #line 10823 "configure"
10824 #include "confdefs.h"
10825 #include <sys/types.h>
10826 int
10827 main (void)
10828 {
10829
10830 #ifndef _POSIX_C_SOURCE
10831 make an error
10832 #endif
10833   ;
10834   return 0;
10835 }
10836 _ACEOF
10837 rm -f "conftest.$ac_objext"
10838 if { (eval echo "$as_me:10838: \"$ac_compile\"") >&5
10839   (eval $ac_compile) 2>&5
10840   ac_status=$?
10841   echo "$as_me:10841: \$? = $ac_status" >&5
10842   (exit "$ac_status"); } &&
10843          { ac_try='test -s "conftest.$ac_objext"'
10844   { (eval echo "$as_me:10844: \"$ac_try\"") >&5
10845   (eval $ac_try) 2>&5
10846   ac_status=$?
10847   echo "$as_me:10847: \$? = $ac_status" >&5
10848   (exit "$ac_status"); }; }; then
10849   :
10850 else
10851   echo "$as_me: failed program was:" >&5
10852 cat "conftest.$ac_ext" >&5
10853 cf_cv_posix_c_source=no
10854 fi
10855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10856          CFLAGS="$cf_save_CFLAGS"
10857          CPPFLAGS="$cf_save_CPPFLAGS"
10858
10859 fi
10860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10861
10862 fi
10863 echo "$as_me:10863: result: $cf_cv_posix_c_source" >&5
10864 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10865
10866 if test "$cf_cv_posix_c_source" != no ; then
10867         CFLAGS="$cf_trim_CFLAGS"
10868         CPPFLAGS="$cf_trim_CPPFLAGS"
10869
10870 cf_fix_cppflags=no
10871 cf_new_cflags=
10872 cf_new_cppflags=
10873 cf_new_extra_cppflags=
10874
10875 for cf_add_cflags in $cf_cv_posix_c_source
10876 do
10877 case "$cf_fix_cppflags" in
10878 (no)
10879         case "$cf_add_cflags" in
10880         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10881                 case "$cf_add_cflags" in
10882                 (-D*)
10883                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10884
10885                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10886                                 && test -z "${cf_tst_cflags}" \
10887                                 && cf_fix_cppflags=yes
10888
10889                         if test "$cf_fix_cppflags" = yes ; then
10890
10891         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10892         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10893
10894                                 continue
10895                         elif test "${cf_tst_cflags}" = "\"'" ; then
10896
10897         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10898         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10899
10900                                 continue
10901                         fi
10902                         ;;
10903                 esac
10904                 case "$CPPFLAGS" in
10905                 (*$cf_add_cflags)
10906                         ;;
10907                 (*)
10908                         case "$cf_add_cflags" in
10909                         (-D*)
10910                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10911
10912 CPPFLAGS=`echo "$CPPFLAGS" | \
10913         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10914                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10915
10916                                 ;;
10917                         esac
10918
10919         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10920         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10921
10922                         ;;
10923                 esac
10924                 ;;
10925         (*)
10926
10927         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10928         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10929
10930                 ;;
10931         esac
10932         ;;
10933 (yes)
10934
10935         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10936         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10937
10938         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10939
10940         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10941                 && test -z "${cf_tst_cflags}" \
10942                 && cf_fix_cppflags=no
10943         ;;
10944 esac
10945 done
10946
10947 if test -n "$cf_new_cflags" ; then
10948
10949         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10950         CFLAGS="${CFLAGS}$cf_new_cflags"
10951
10952 fi
10953
10954 if test -n "$cf_new_cppflags" ; then
10955
10956         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10957         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10958
10959 fi
10960
10961 if test -n "$cf_new_extra_cppflags" ; then
10962
10963         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10964         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10965
10966 fi
10967
10968 fi
10969
10970 fi # cf_cv_posix_visible
10971
10972         ;;
10973 esac
10974
10975 if test -n "$cf_xopen_source" ; then
10976
10977 cf_fix_cppflags=no
10978 cf_new_cflags=
10979 cf_new_cppflags=
10980 cf_new_extra_cppflags=
10981
10982 for cf_add_cflags in $cf_xopen_source
10983 do
10984 case "$cf_fix_cppflags" in
10985 (no)
10986         case "$cf_add_cflags" in
10987         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10988                 case "$cf_add_cflags" in
10989                 (-D*)
10990                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10991
10992                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10993                                 && test -z "${cf_tst_cflags}" \
10994                                 && cf_fix_cppflags=yes
10995
10996                         if test "$cf_fix_cppflags" = yes ; then
10997
10998         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10999         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11000
11001                                 continue
11002                         elif test "${cf_tst_cflags}" = "\"'" ; then
11003
11004         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11005         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11006
11007                                 continue
11008                         fi
11009                         ;;
11010                 esac
11011                 case "$CPPFLAGS" in
11012                 (*$cf_add_cflags)
11013                         ;;
11014                 (*)
11015                         case "$cf_add_cflags" in
11016                         (-D*)
11017                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11018
11019 CPPFLAGS=`echo "$CPPFLAGS" | \
11020         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11021                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11022
11023                                 ;;
11024                         esac
11025
11026         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11027         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11028
11029                         ;;
11030                 esac
11031                 ;;
11032         (*)
11033
11034         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11035         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11036
11037                 ;;
11038         esac
11039         ;;
11040 (yes)
11041
11042         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11043         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11044
11045         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11046
11047         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11048                 && test -z "${cf_tst_cflags}" \
11049                 && cf_fix_cppflags=no
11050         ;;
11051 esac
11052 done
11053
11054 if test -n "$cf_new_cflags" ; then
11055         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11056
11057 echo "${as_me:-configure}:11057: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11058
11059         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11060         CFLAGS="${CFLAGS}$cf_new_cflags"
11061
11062 fi
11063
11064 if test -n "$cf_new_cppflags" ; then
11065         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11066
11067 echo "${as_me:-configure}:11067: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11068
11069         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11070         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11071
11072 fi
11073
11074 if test -n "$cf_new_extra_cppflags" ; then
11075         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11076
11077 echo "${as_me:-configure}:11077: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11078
11079         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11080         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11081
11082 fi
11083
11084 fi
11085
11086 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11087         echo "$as_me:11087: checking if _XOPEN_SOURCE really is set" >&5
11088 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11089         cat >"conftest.$ac_ext" <<_ACEOF
11090 #line 11090 "configure"
11091 #include "confdefs.h"
11092 #include <stdlib.h>
11093 int
11094 main (void)
11095 {
11096
11097 #ifndef _XOPEN_SOURCE
11098 make an error
11099 #endif
11100   ;
11101   return 0;
11102 }
11103 _ACEOF
11104 rm -f "conftest.$ac_objext"
11105 if { (eval echo "$as_me:11105: \"$ac_compile\"") >&5
11106   (eval $ac_compile) 2>&5
11107   ac_status=$?
11108   echo "$as_me:11108: \$? = $ac_status" >&5
11109   (exit "$ac_status"); } &&
11110          { ac_try='test -s "conftest.$ac_objext"'
11111   { (eval echo "$as_me:11111: \"$ac_try\"") >&5
11112   (eval $ac_try) 2>&5
11113   ac_status=$?
11114   echo "$as_me:11114: \$? = $ac_status" >&5
11115   (exit "$ac_status"); }; }; then
11116   cf_XOPEN_SOURCE_set=yes
11117 else
11118   echo "$as_me: failed program was:" >&5
11119 cat "conftest.$ac_ext" >&5
11120 cf_XOPEN_SOURCE_set=no
11121 fi
11122 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11123         echo "$as_me:11123: result: $cf_XOPEN_SOURCE_set" >&5
11124 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11125         if test "$cf_XOPEN_SOURCE_set" = yes
11126         then
11127                 cat >"conftest.$ac_ext" <<_ACEOF
11128 #line 11128 "configure"
11129 #include "confdefs.h"
11130 #include <stdlib.h>
11131 int
11132 main (void)
11133 {
11134
11135 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11136 make an error
11137 #endif
11138   ;
11139   return 0;
11140 }
11141 _ACEOF
11142 rm -f "conftest.$ac_objext"
11143 if { (eval echo "$as_me:11143: \"$ac_compile\"") >&5
11144   (eval $ac_compile) 2>&5
11145   ac_status=$?
11146   echo "$as_me:11146: \$? = $ac_status" >&5
11147   (exit "$ac_status"); } &&
11148          { ac_try='test -s "conftest.$ac_objext"'
11149   { (eval echo "$as_me:11149: \"$ac_try\"") >&5
11150   (eval $ac_try) 2>&5
11151   ac_status=$?
11152   echo "$as_me:11152: \$? = $ac_status" >&5
11153   (exit "$ac_status"); }; }; then
11154   cf_XOPEN_SOURCE_set_ok=yes
11155 else
11156   echo "$as_me: failed program was:" >&5
11157 cat "conftest.$ac_ext" >&5
11158 cf_XOPEN_SOURCE_set_ok=no
11159 fi
11160 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11161                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11162                 then
11163                         { echo "$as_me:11163: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11164 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11165                 fi
11166         else
11167
11168 echo "$as_me:11168: checking if we should define _XOPEN_SOURCE" >&5
11169 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11170 if test "${cf_cv_xopen_source+set}" = set; then
11171   echo $ECHO_N "(cached) $ECHO_C" >&6
11172 else
11173
11174         cat >"conftest.$ac_ext" <<_ACEOF
11175 #line 11175 "configure"
11176 #include "confdefs.h"
11177
11178 #include <stdlib.h>
11179 #include <string.h>
11180 #include <sys/types.h>
11181
11182 int
11183 main (void)
11184 {
11185
11186 #ifndef _XOPEN_SOURCE
11187 make an error
11188 #endif
11189   ;
11190   return 0;
11191 }
11192 _ACEOF
11193 rm -f "conftest.$ac_objext"
11194 if { (eval echo "$as_me:11194: \"$ac_compile\"") >&5
11195   (eval $ac_compile) 2>&5
11196   ac_status=$?
11197   echo "$as_me:11197: \$? = $ac_status" >&5
11198   (exit "$ac_status"); } &&
11199          { ac_try='test -s "conftest.$ac_objext"'
11200   { (eval echo "$as_me:11200: \"$ac_try\"") >&5
11201   (eval $ac_try) 2>&5
11202   ac_status=$?
11203   echo "$as_me:11203: \$? = $ac_status" >&5
11204   (exit "$ac_status"); }; }; then
11205   cf_cv_xopen_source=no
11206 else
11207   echo "$as_me: failed program was:" >&5
11208 cat "conftest.$ac_ext" >&5
11209 cf_save="$CPPFLAGS"
11210
11211         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11212         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11213
11214          cat >"conftest.$ac_ext" <<_ACEOF
11215 #line 11215 "configure"
11216 #include "confdefs.h"
11217
11218 #include <stdlib.h>
11219 #include <string.h>
11220 #include <sys/types.h>
11221
11222 int
11223 main (void)
11224 {
11225
11226 #ifdef _XOPEN_SOURCE
11227 make an error
11228 #endif
11229   ;
11230   return 0;
11231 }
11232 _ACEOF
11233 rm -f "conftest.$ac_objext"
11234 if { (eval echo "$as_me:11234: \"$ac_compile\"") >&5
11235   (eval $ac_compile) 2>&5
11236   ac_status=$?
11237   echo "$as_me:11237: \$? = $ac_status" >&5
11238   (exit "$ac_status"); } &&
11239          { ac_try='test -s "conftest.$ac_objext"'
11240   { (eval echo "$as_me:11240: \"$ac_try\"") >&5
11241   (eval $ac_try) 2>&5
11242   ac_status=$?
11243   echo "$as_me:11243: \$? = $ac_status" >&5
11244   (exit "$ac_status"); }; }; then
11245   cf_cv_xopen_source=no
11246 else
11247   echo "$as_me: failed program was:" >&5
11248 cat "conftest.$ac_ext" >&5
11249 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11250 fi
11251 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11252         CPPFLAGS="$cf_save"
11253
11254 fi
11255 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11256
11257 fi
11258 echo "$as_me:11258: result: $cf_cv_xopen_source" >&5
11259 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11260
11261 if test "$cf_cv_xopen_source" != no ; then
11262
11263 CFLAGS=`echo "$CFLAGS" | \
11264         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11265                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11266
11267 CPPFLAGS=`echo "$CPPFLAGS" | \
11268         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11269                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11270
11271         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11272
11273 cf_fix_cppflags=no
11274 cf_new_cflags=
11275 cf_new_cppflags=
11276 cf_new_extra_cppflags=
11277
11278 for cf_add_cflags in $cf_temp_xopen_source
11279 do
11280 case "$cf_fix_cppflags" in
11281 (no)
11282         case "$cf_add_cflags" in
11283         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11284                 case "$cf_add_cflags" in
11285                 (-D*)
11286                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11287
11288                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11289                                 && test -z "${cf_tst_cflags}" \
11290                                 && cf_fix_cppflags=yes
11291
11292                         if test "$cf_fix_cppflags" = yes ; then
11293
11294         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11295         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11296
11297                                 continue
11298                         elif test "${cf_tst_cflags}" = "\"'" ; then
11299
11300         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11301         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11302
11303                                 continue
11304                         fi
11305                         ;;
11306                 esac
11307                 case "$CPPFLAGS" in
11308                 (*$cf_add_cflags)
11309                         ;;
11310                 (*)
11311                         case "$cf_add_cflags" in
11312                         (-D*)
11313                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11314
11315 CPPFLAGS=`echo "$CPPFLAGS" | \
11316         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11317                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11318
11319                                 ;;
11320                         esac
11321
11322         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11323         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11324
11325                         ;;
11326                 esac
11327                 ;;
11328         (*)
11329
11330         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11331         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11332
11333                 ;;
11334         esac
11335         ;;
11336 (yes)
11337
11338         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11339         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11340
11341         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11342
11343         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11344                 && test -z "${cf_tst_cflags}" \
11345                 && cf_fix_cppflags=no
11346         ;;
11347 esac
11348 done
11349
11350 if test -n "$cf_new_cflags" ; then
11351
11352         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11353         CFLAGS="${CFLAGS}$cf_new_cflags"
11354
11355 fi
11356
11357 if test -n "$cf_new_cppflags" ; then
11358
11359         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11360         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11361
11362 fi
11363
11364 if test -n "$cf_new_extra_cppflags" ; then
11365
11366         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11367         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11368
11369 fi
11370
11371 fi
11372
11373         fi
11374 fi
11375 fi # cf_cv_posix_visible
11376
11377 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11378
11379 # Work around breakage on OS X
11380
11381 echo "$as_me:11381: checking if SIGWINCH is defined" >&5
11382 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11383 if test "${cf_cv_define_sigwinch+set}" = set; then
11384   echo $ECHO_N "(cached) $ECHO_C" >&6
11385 else
11386
11387         cat >"conftest.$ac_ext" <<_ACEOF
11388 #line 11388 "configure"
11389 #include "confdefs.h"
11390
11391 #include <sys/types.h>
11392 #include <sys/signal.h>
11393
11394 int
11395 main (void)
11396 {
11397 int x = SIGWINCH; (void)x
11398   ;
11399   return 0;
11400 }
11401 _ACEOF
11402 rm -f "conftest.$ac_objext"
11403 if { (eval echo "$as_me:11403: \"$ac_compile\"") >&5
11404   (eval $ac_compile) 2>&5
11405   ac_status=$?
11406   echo "$as_me:11406: \$? = $ac_status" >&5
11407   (exit "$ac_status"); } &&
11408          { ac_try='test -s "conftest.$ac_objext"'
11409   { (eval echo "$as_me:11409: \"$ac_try\"") >&5
11410   (eval $ac_try) 2>&5
11411   ac_status=$?
11412   echo "$as_me:11412: \$? = $ac_status" >&5
11413   (exit "$ac_status"); }; }; then
11414   cf_cv_define_sigwinch=yes
11415 else
11416   echo "$as_me: failed program was:" >&5
11417 cat "conftest.$ac_ext" >&5
11418 cat >"conftest.$ac_ext" <<_ACEOF
11419 #line 11419 "configure"
11420 #include "confdefs.h"
11421
11422 #undef _XOPEN_SOURCE
11423 #undef _POSIX_SOURCE
11424 #undef _POSIX_C_SOURCE
11425 #include <sys/types.h>
11426 #include <sys/signal.h>
11427
11428 int
11429 main (void)
11430 {
11431 int x = SIGWINCH; (void)x
11432   ;
11433   return 0;
11434 }
11435 _ACEOF
11436 rm -f "conftest.$ac_objext"
11437 if { (eval echo "$as_me:11437: \"$ac_compile\"") >&5
11438   (eval $ac_compile) 2>&5
11439   ac_status=$?
11440   echo "$as_me:11440: \$? = $ac_status" >&5
11441   (exit "$ac_status"); } &&
11442          { ac_try='test -s "conftest.$ac_objext"'
11443   { (eval echo "$as_me:11443: \"$ac_try\"") >&5
11444   (eval $ac_try) 2>&5
11445   ac_status=$?
11446   echo "$as_me:11446: \$? = $ac_status" >&5
11447   (exit "$ac_status"); }; }; then
11448   cf_cv_define_sigwinch=maybe
11449 else
11450   echo "$as_me: failed program was:" >&5
11451 cat "conftest.$ac_ext" >&5
11452 cf_cv_define_sigwinch=no
11453 fi
11454 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11455
11456 fi
11457 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11458
11459 fi
11460 echo "$as_me:11460: result: $cf_cv_define_sigwinch" >&5
11461 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11462
11463 if test "$cf_cv_define_sigwinch" = maybe ; then
11464 echo "$as_me:11464: checking for actual SIGWINCH definition" >&5
11465 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11466 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11467   echo $ECHO_N "(cached) $ECHO_C" >&6
11468 else
11469
11470 cf_cv_fixup_sigwinch=unknown
11471 cf_sigwinch=32
11472 while test "$cf_sigwinch" != 1
11473 do
11474         cat >"conftest.$ac_ext" <<_ACEOF
11475 #line 11475 "configure"
11476 #include "confdefs.h"
11477
11478 #undef _XOPEN_SOURCE
11479 #undef _POSIX_SOURCE
11480 #undef _POSIX_C_SOURCE
11481 #include <sys/types.h>
11482 #include <sys/signal.h>
11483
11484 int
11485 main (void)
11486 {
11487
11488 #if SIGWINCH != $cf_sigwinch
11489 make an error
11490 #endif
11491 int x = SIGWINCH; (void)x
11492   ;
11493   return 0;
11494 }
11495 _ACEOF
11496 rm -f "conftest.$ac_objext"
11497 if { (eval echo "$as_me:11497: \"$ac_compile\"") >&5
11498   (eval $ac_compile) 2>&5
11499   ac_status=$?
11500   echo "$as_me:11500: \$? = $ac_status" >&5
11501   (exit "$ac_status"); } &&
11502          { ac_try='test -s "conftest.$ac_objext"'
11503   { (eval echo "$as_me:11503: \"$ac_try\"") >&5
11504   (eval $ac_try) 2>&5
11505   ac_status=$?
11506   echo "$as_me:11506: \$? = $ac_status" >&5
11507   (exit "$ac_status"); }; }; then
11508   cf_cv_fixup_sigwinch=$cf_sigwinch
11509          break
11510 else
11511   echo "$as_me: failed program was:" >&5
11512 cat "conftest.$ac_ext" >&5
11513 fi
11514 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11515
11516 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11517 done
11518
11519 fi
11520 echo "$as_me:11520: result: $cf_cv_fixup_sigwinch" >&5
11521 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11522
11523         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11524                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11525         fi
11526 fi
11527
11528 # Checks for CODESET support.
11529
11530 echo "$as_me:11530: checking for nl_langinfo and CODESET" >&5
11531 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11532 if test "${am_cv_langinfo_codeset+set}" = set; then
11533   echo $ECHO_N "(cached) $ECHO_C" >&6
11534 else
11535   cat >"conftest.$ac_ext" <<_ACEOF
11536 #line 11536 "configure"
11537 #include "confdefs.h"
11538 #include <langinfo.h>
11539 int
11540 main (void)
11541 {
11542 char* cs = nl_langinfo(CODESET); (void)cs
11543   ;
11544   return 0;
11545 }
11546 _ACEOF
11547 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11548 if { (eval echo "$as_me:11548: \"$ac_link\"") >&5
11549   (eval $ac_link) 2>&5
11550   ac_status=$?
11551   echo "$as_me:11551: \$? = $ac_status" >&5
11552   (exit "$ac_status"); } &&
11553          { ac_try='test -s "conftest$ac_exeext"'
11554   { (eval echo "$as_me:11554: \"$ac_try\"") >&5
11555   (eval $ac_try) 2>&5
11556   ac_status=$?
11557   echo "$as_me:11557: \$? = $ac_status" >&5
11558   (exit "$ac_status"); }; }; then
11559   am_cv_langinfo_codeset=yes
11560 else
11561   echo "$as_me: failed program was:" >&5
11562 cat "conftest.$ac_ext" >&5
11563 am_cv_langinfo_codeset=no
11564 fi
11565 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11566
11567 fi
11568 echo "$as_me:11568: result: $am_cv_langinfo_codeset" >&5
11569 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11570         if test "$am_cv_langinfo_codeset" = yes; then
11571
11572 cat >>confdefs.h <<\EOF
11573 #define HAVE_LANGINFO_CODESET 1
11574 EOF
11575
11576         fi
11577
11578 # use these variables to work around a defect in gcc's fixincludes.
11579 NCURSES_OK_WCHAR_T=
11580 NCURSES_OK_WINT_T=
11581
11582 echo "$as_me:11582: checking if you want wide-character code" >&5
11583 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11584
11585 # Check whether --enable-widec or --disable-widec was given.
11586 if test "${enable_widec+set}" = set; then
11587   enableval="$enable_widec"
11588   with_widec=$enableval
11589 else
11590   with_widec=no
11591 fi;
11592 echo "$as_me:11592: result: $with_widec" >&5
11593 echo "${ECHO_T}$with_widec" >&6
11594
11595 NCURSES_WCWIDTH_GRAPHICS=1
11596
11597 if test "x$with_widec" = xyes ; then
11598         if test "x$disable_lib_suffixes" = xno ; then
11599                 LIB_SUFFIX="w${LIB_SUFFIX}"
11600         fi
11601
11602 cat >>confdefs.h <<\EOF
11603 #define USE_WIDEC_SUPPORT 1
11604 EOF
11605
11606 cat >>confdefs.h <<\EOF
11607 #define NCURSES_WIDECHAR 1
11608 EOF
11609
11610 for ac_header in \
11611 wchar.h \
11612 wctype.h \
11613
11614 do
11615 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11616 echo "$as_me:11616: checking for $ac_header" >&5
11617 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11618 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11619   echo $ECHO_N "(cached) $ECHO_C" >&6
11620 else
11621   cat >"conftest.$ac_ext" <<_ACEOF
11622 #line 11622 "configure"
11623 #include "confdefs.h"
11624 #include <$ac_header>
11625 _ACEOF
11626 if { (eval echo "$as_me:11626: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11627   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11628   ac_status=$?
11629   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11630   rm -f conftest.er1
11631   cat conftest.err >&5
11632   echo "$as_me:11632: \$? = $ac_status" >&5
11633   (exit "$ac_status"); } >/dev/null; then
11634   if test -s conftest.err; then
11635     ac_cpp_err=$ac_c_preproc_warn_flag
11636   else
11637     ac_cpp_err=
11638   fi
11639 else
11640   ac_cpp_err=yes
11641 fi
11642 if test -z "$ac_cpp_err"; then
11643   eval "$as_ac_Header=yes"
11644 else
11645   echo "$as_me: failed program was:" >&5
11646   cat "conftest.$ac_ext" >&5
11647   eval "$as_ac_Header=no"
11648 fi
11649 rm -f conftest.err "conftest.$ac_ext"
11650 fi
11651 echo "$as_me:11651: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11652 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11653 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11654   cat >>confdefs.h <<EOF
11655 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11656 EOF
11657
11658 fi
11659 done
11660
11661 echo "$as_me:11661: checking if wchar.h can be used as is" >&5
11662 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11663 if test "${cf_cv_wchar_h_okay+set}" = set; then
11664   echo $ECHO_N "(cached) $ECHO_C" >&6
11665 else
11666
11667 cat >"conftest.$ac_ext" <<_ACEOF
11668 #line 11668 "configure"
11669 #include "confdefs.h"
11670
11671 #include <stdlib.h>
11672 #ifdef HAVE_WCHAR_H
11673 #include <wchar.h>
11674 #endif
11675 #ifdef HAVE_WCTYPE_H
11676 #include <wctype.h>
11677 #endif
11678
11679 int
11680 main (void)
11681 {
11682
11683         wint_t foo = 0;
11684         int bar = iswpunct(foo)
11685   ;
11686   return 0;
11687 }
11688 _ACEOF
11689 rm -f "conftest.$ac_objext"
11690 if { (eval echo "$as_me:11690: \"$ac_compile\"") >&5
11691   (eval $ac_compile) 2>&5
11692   ac_status=$?
11693   echo "$as_me:11693: \$? = $ac_status" >&5
11694   (exit "$ac_status"); } &&
11695          { ac_try='test -s "conftest.$ac_objext"'
11696   { (eval echo "$as_me:11696: \"$ac_try\"") >&5
11697   (eval $ac_try) 2>&5
11698   ac_status=$?
11699   echo "$as_me:11699: \$? = $ac_status" >&5
11700   (exit "$ac_status"); }; }; then
11701   cf_cv_wchar_h_okay=yes
11702 else
11703   echo "$as_me: failed program was:" >&5
11704 cat "conftest.$ac_ext" >&5
11705 cf_cv_wchar_h_okay=no
11706 fi
11707 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11708 fi
11709 echo "$as_me:11709: result: $cf_cv_wchar_h_okay" >&5
11710 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11711
11712 if test "$cf_cv_wchar_h_okay" = no
11713 then
11714
11715 echo "$as_me:11715: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11716 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11717 cat >"conftest.$ac_ext" <<_ACEOF
11718 #line 11718 "configure"
11719 #include "confdefs.h"
11720 #include <sys/types.h>
11721
11722 int
11723 main (void)
11724 {
11725
11726 #ifndef _XOPEN_SOURCE_EXTENDED
11727 make an error
11728 #endif
11729   ;
11730   return 0;
11731 }
11732 _ACEOF
11733 rm -f "conftest.$ac_objext"
11734 if { (eval echo "$as_me:11734: \"$ac_compile\"") >&5
11735   (eval $ac_compile) 2>&5
11736   ac_status=$?
11737   echo "$as_me:11737: \$? = $ac_status" >&5
11738   (exit "$ac_status"); } &&
11739          { ac_try='test -s "conftest.$ac_objext"'
11740   { (eval echo "$as_me:11740: \"$ac_try\"") >&5
11741   (eval $ac_try) 2>&5
11742   ac_status=$?
11743   echo "$as_me:11743: \$? = $ac_status" >&5
11744   (exit "$ac_status"); }; }; then
11745   cf_result=no
11746 else
11747   echo "$as_me: failed program was:" >&5
11748 cat "conftest.$ac_ext" >&5
11749 cf_result=yes
11750 fi
11751 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11752 echo "$as_me:11752: result: $cf_result" >&5
11753 echo "${ECHO_T}$cf_result" >&6
11754
11755 if test "$cf_result" = yes ; then
11756         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11757 elif test "x" != "x" ; then
11758         echo "$as_me:11758: checking checking for compatible value versus " >&5
11759 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11760         cat >"conftest.$ac_ext" <<_ACEOF
11761 #line 11761 "configure"
11762 #include "confdefs.h"
11763 #include <sys/types.h>
11764
11765 int
11766 main (void)
11767 {
11768
11769 #if _XOPEN_SOURCE_EXTENDED- < 0
11770 make an error
11771 #endif
11772   ;
11773   return 0;
11774 }
11775 _ACEOF
11776 rm -f "conftest.$ac_objext"
11777 if { (eval echo "$as_me:11777: \"$ac_compile\"") >&5
11778   (eval $ac_compile) 2>&5
11779   ac_status=$?
11780   echo "$as_me:11780: \$? = $ac_status" >&5
11781   (exit "$ac_status"); } &&
11782          { ac_try='test -s "conftest.$ac_objext"'
11783   { (eval echo "$as_me:11783: \"$ac_try\"") >&5
11784   (eval $ac_try) 2>&5
11785   ac_status=$?
11786   echo "$as_me:11786: \$? = $ac_status" >&5
11787   (exit "$ac_status"); }; }; then
11788   cf_result=yes
11789 else
11790   echo "$as_me: failed program was:" >&5
11791 cat "conftest.$ac_ext" >&5
11792 cf_result=no
11793 fi
11794 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11795         echo "$as_me:11795: result: $cf_result" >&5
11796 echo "${ECHO_T}$cf_result" >&6
11797         if test "$cf_result" = no ; then
11798                 # perhaps we can override it - try...
11799                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11800         fi
11801 fi
11802
11803 fi
11804
11805 echo "$as_me:11805: checking if wcwidth agrees graphics are single-width" >&5
11806 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11807 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11808   echo $ECHO_N "(cached) $ECHO_C" >&6
11809 else
11810
11811 cat >conftest.in <<CF_EOF
11812 -       VT100 symbols
11813 0x250c  upper left corner
11814 0x2514  lower left corner
11815 0x2510  upper right corner
11816 0x2518  lower right corner
11817 0x251c  tee pointing left
11818 0x2524  tee pointing right
11819 0x2534  tee pointing up
11820 0x252c  tee pointing down
11821 0x2500  horizontal line
11822 0x2502  vertical line
11823 0x253c  large plus or crossover
11824 0x23ba  scan line 1
11825 0x23bd  scan line 9
11826 0x25c6  diamond
11827 0x2592  checker board (stipple)
11828 0x00b0  degree symbol
11829 0x00b1  plus/minus
11830 0x00b7  bullet
11831 -       Teletype 5410v1 symbols
11832 0x2190  arrow pointing left
11833 0x2192  arrow pointing right
11834 0x2193  arrow pointing down
11835 0x2191  arrow pointing up
11836 0x2592  board of squares
11837 0x2603  lantern symbol
11838 0x25ae  solid square block
11839 -       these defaults were invented for ncurses
11840 0x23bb  scan line 3
11841 0x23bc  scan line 7
11842 0x2264  less-than-or-equal-to
11843 0x2265  greater-than-or-equal-to
11844 0x03c0  greek pi
11845 0x2260  not-equal
11846 0x00a3  pound-sterling symbol
11847 -       thick-line-drawing
11848 0x250f  upper left corner
11849 0x2517  lower left corner
11850 0x2513  upper right corner
11851 0x251b  lower right corner
11852 0x2523  tee pointing left
11853 0x252b  tee pointing right
11854 0x253b  tee pointing up
11855 0x2533  tee pointing down
11856 0x2501  horizontal line
11857 0x2503  vertical line
11858 0x254b  large plus or crossover
11859 -       double-line-drawing
11860 0x2554  upper left corner
11861 0x255a  lower left corner
11862 0x2557  upper right corner
11863 0x255d  lower right corner
11864 0x2563  tee pointing left
11865 0x2560  tee pointing right
11866 0x2569  tee pointing up
11867 0x2566  tee pointing down
11868 0x2550  horizontal line
11869 0x2551  vertical line
11870 0x256c  large plus or crossover
11871 CF_EOF
11872 if test "$cross_compiling" = yes; then
11873   cf_cv_wcwidth_graphics=unknown
11874 else
11875   cat >"conftest.$ac_ext" <<_ACEOF
11876 #line 11876 "configure"
11877 #include "confdefs.h"
11878
11879 #include <locale.h>
11880 #include <stdio.h>
11881 #include <wchar.h>
11882
11883 #define MY_LEN 80
11884
11885 int
11886 main(void)
11887 {
11888         FILE *fp;
11889         int value;
11890         char buffer[MY_LEN + 1];
11891         char notes[MY_LEN + 1];
11892         int totals = 0;
11893         int passed = 0;
11894
11895         if (setlocale(LC_ALL, "en_US.UTF8") ||
11896                 setlocale(LC_ALL, "en_US.UTF-8") ||
11897                 setlocale(LC_ALL, "en_US.utf8") ||
11898                 setlocale(LC_ALL, "en_US.utf-8")) {
11899                 if ((fp = fopen("conftest.in", "r")) != 0) {
11900                         while (fgets(buffer, MY_LEN, fp) != 0) {
11901                                 if (*buffer == '-') {
11902                                         fprintf(stderr, "\\t%s", buffer);
11903                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11904                                         ++totals;
11905                                         if (wcwidth(value) == 1)
11906                                                 ++passed;
11907                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
11908                                 } else {
11909                                         fprintf(stderr, "?\\t%s", buffer);
11910                                 }
11911                         }
11912                 }
11913         }
11914         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
11915         return (totals == passed) ? 0 : 1;
11916 }
11917
11918 _ACEOF
11919 rm -f "conftest$ac_exeext"
11920 if { (eval echo "$as_me:11920: \"$ac_link\"") >&5
11921   (eval $ac_link) 2>&5
11922   ac_status=$?
11923   echo "$as_me:11923: \$? = $ac_status" >&5
11924   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11925   { (eval echo "$as_me:11925: \"$ac_try\"") >&5
11926   (eval $ac_try) 2>&5
11927   ac_status=$?
11928   echo "$as_me:11928: \$? = $ac_status" >&5
11929   (exit "$ac_status"); }; }; then
11930   cf_cv_wcwidth_graphics=yes
11931 else
11932   echo "$as_me: program exited with status $ac_status" >&5
11933 echo "$as_me: failed program was:" >&5
11934 cat "conftest.$ac_ext" >&5
11935 cf_cv_wcwidth_graphics=no
11936 fi
11937 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11938 fi
11939
11940 fi
11941 echo "$as_me:11941: result: $cf_cv_wcwidth_graphics" >&5
11942 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11943
11944         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11945
11946         # with_overwrite=no
11947         NCURSES_CH_T=cchar_t
11948
11949 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11950 do
11951 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11952 echo "$as_me:11952: checking for $ac_func" >&5
11953 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11954 if eval "test \"\${$as_ac_var+set}\" = set"; then
11955   echo $ECHO_N "(cached) $ECHO_C" >&6
11956 else
11957   cat >"conftest.$ac_ext" <<_ACEOF
11958 #line 11958 "configure"
11959 #include "confdefs.h"
11960 #define $ac_func autoconf_temporary
11961 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11962 #undef $ac_func
11963
11964 #ifdef __cplusplus
11965 extern "C"
11966 #endif
11967
11968 /* We use char because int might match the return type of a gcc2
11969    builtin and then its argument prototype would still apply.  */
11970 char $ac_func (void);
11971
11972 int
11973 main (void)
11974 {
11975
11976 /* The GNU C library defines stubs for functions which it implements
11977     to always fail with ENOSYS.  Some functions are actually named
11978     something starting with __ and the normal name is an alias.  */
11979 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11980 #error found stub for $ac_func
11981 #endif
11982
11983         return $ac_func ();
11984   ;
11985   return 0;
11986 }
11987 _ACEOF
11988 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11989 if { (eval echo "$as_me:11989: \"$ac_link\"") >&5
11990   (eval $ac_link) 2>&5
11991   ac_status=$?
11992   echo "$as_me:11992: \$? = $ac_status" >&5
11993   (exit "$ac_status"); } &&
11994          { ac_try='test -s "conftest$ac_exeext"'
11995   { (eval echo "$as_me:11995: \"$ac_try\"") >&5
11996   (eval $ac_try) 2>&5
11997   ac_status=$?
11998   echo "$as_me:11998: \$? = $ac_status" >&5
11999   (exit "$ac_status"); }; }; then
12000   eval "$as_ac_var=yes"
12001 else
12002   echo "$as_me: failed program was:" >&5
12003 cat "conftest.$ac_ext" >&5
12004 eval "$as_ac_var=no"
12005 fi
12006 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12007 fi
12008 echo "$as_me:12008: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12009 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12010 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12011   cat >>confdefs.h <<EOF
12012 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12013 EOF
12014
12015 fi
12016 done
12017
12018         if test "x$ac_cv_func_putwc" != xyes ; then
12019
12020 echo "$as_me:12020: checking for multibyte character support" >&5
12021 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12022 if test "${cf_cv_utf8_lib+set}" = set; then
12023   echo $ECHO_N "(cached) $ECHO_C" >&6
12024 else
12025
12026         cf_save_LIBS="$LIBS"
12027         cat >"conftest.$ac_ext" <<_ACEOF
12028 #line 12028 "configure"
12029 #include "confdefs.h"
12030
12031 #include <stdlib.h>
12032 int
12033 main (void)
12034 {
12035 putwc(0,0);
12036   ;
12037   return 0;
12038 }
12039 _ACEOF
12040 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12041 if { (eval echo "$as_me:12041: \"$ac_link\"") >&5
12042   (eval $ac_link) 2>&5
12043   ac_status=$?
12044   echo "$as_me:12044: \$? = $ac_status" >&5
12045   (exit "$ac_status"); } &&
12046          { ac_try='test -s "conftest$ac_exeext"'
12047   { (eval echo "$as_me:12047: \"$ac_try\"") >&5
12048   (eval $ac_try) 2>&5
12049   ac_status=$?
12050   echo "$as_me:12050: \$? = $ac_status" >&5
12051   (exit "$ac_status"); }; }; then
12052   cf_cv_utf8_lib=yes
12053 else
12054   echo "$as_me: failed program was:" >&5
12055 cat "conftest.$ac_ext" >&5
12056
12057 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12058 # will be set on completion of the AC_TRY_LINK below.
12059 cf_cv_header_path_utf8=
12060 cf_cv_library_path_utf8=
12061
12062 echo "${as_me:-configure}:12062: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12063
12064 cf_save_LIBS="$LIBS"
12065
12066 cat >"conftest.$ac_ext" <<_ACEOF
12067 #line 12067 "configure"
12068 #include "confdefs.h"
12069
12070 #include <libutf8.h>
12071 int
12072 main (void)
12073 {
12074 putwc(0,0);
12075   ;
12076   return 0;
12077 }
12078 _ACEOF
12079 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12080 if { (eval echo "$as_me:12080: \"$ac_link\"") >&5
12081   (eval $ac_link) 2>&5
12082   ac_status=$?
12083   echo "$as_me:12083: \$? = $ac_status" >&5
12084   (exit "$ac_status"); } &&
12085          { ac_try='test -s "conftest$ac_exeext"'
12086   { (eval echo "$as_me:12086: \"$ac_try\"") >&5
12087   (eval $ac_try) 2>&5
12088   ac_status=$?
12089   echo "$as_me:12089: \$? = $ac_status" >&5
12090   (exit "$ac_status"); }; }; then
12091
12092         cf_cv_find_linkage_utf8=yes
12093         cf_cv_header_path_utf8=/usr/include
12094         cf_cv_library_path_utf8=/usr/lib
12095
12096 else
12097   echo "$as_me: failed program was:" >&5
12098 cat "conftest.$ac_ext" >&5
12099
12100 LIBS="-lutf8  $cf_save_LIBS"
12101
12102 cat >"conftest.$ac_ext" <<_ACEOF
12103 #line 12103 "configure"
12104 #include "confdefs.h"
12105
12106 #include <libutf8.h>
12107 int
12108 main (void)
12109 {
12110 putwc(0,0);
12111   ;
12112   return 0;
12113 }
12114 _ACEOF
12115 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12116 if { (eval echo "$as_me:12116: \"$ac_link\"") >&5
12117   (eval $ac_link) 2>&5
12118   ac_status=$?
12119   echo "$as_me:12119: \$? = $ac_status" >&5
12120   (exit "$ac_status"); } &&
12121          { ac_try='test -s "conftest$ac_exeext"'
12122   { (eval echo "$as_me:12122: \"$ac_try\"") >&5
12123   (eval $ac_try) 2>&5
12124   ac_status=$?
12125   echo "$as_me:12125: \$? = $ac_status" >&5
12126   (exit "$ac_status"); }; }; then
12127
12128         cf_cv_find_linkage_utf8=yes
12129         cf_cv_header_path_utf8=/usr/include
12130         cf_cv_library_path_utf8=/usr/lib
12131         cf_cv_library_file_utf8="-lutf8"
12132
12133 else
12134   echo "$as_me: failed program was:" >&5
12135 cat "conftest.$ac_ext" >&5
12136
12137         cf_cv_find_linkage_utf8=no
12138         LIBS="$cf_save_LIBS"
12139
12140         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12141
12142 echo "${as_me:-configure}:12142: testing find linkage for utf8 library ..." 1>&5
12143
12144 echo "${as_me:-configure}:12144: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12145
12146         cf_save_CPPFLAGS="$CPPFLAGS"
12147         cf_test_CPPFLAGS="$CPPFLAGS"
12148
12149 cf_search=
12150
12151 # collect the current set of include-directories from compiler flags
12152 cf_header_path_list=""
12153 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12154         for cf_header_path in $CPPFLAGS $CFLAGS
12155         do
12156                 case "$cf_header_path" in
12157                 (-I*)
12158                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12159
12160 test "x$cf_header_path" != "xNONE" && \
12161 test -d "$cf_header_path" && \
12162  {
12163         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12164         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12165         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12166         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12167         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12168         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12169 }
12170
12171                         cf_header_path_list="$cf_header_path_list $cf_search"
12172                         ;;
12173                 esac
12174         done
12175 fi
12176
12177 # add the variations for the package we are looking for
12178
12179 cf_search=
12180
12181 test "x$prefix" != "xNONE" && \
12182 test -d "$prefix" && \
12183  {
12184         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12185         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12186         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12187         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12188         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12189         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12190 }
12191
12192 for cf_subdir_prefix in \
12193         /usr \
12194         /usr/local \
12195         /usr/pkg \
12196         /opt \
12197         /opt/local \
12198         $HOME
12199 do
12200
12201 test "x$cf_subdir_prefix" != "x$prefix" && \
12202 test -d "$cf_subdir_prefix" && \
12203 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12204         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12205         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12206         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12207         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12208         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12209         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12210 }
12211
12212 done
12213
12214 test "$includedir" != NONE && \
12215 test "$includedir" != "/usr/include" && \
12216 test -d "$includedir" && {
12217         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12218         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12219 }
12220
12221 test "$oldincludedir" != NONE && \
12222 test "$oldincludedir" != "/usr/include" && \
12223 test -d "$oldincludedir" && {
12224         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12225         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12226 }
12227
12228 cf_search="$cf_search $cf_header_path_list"
12229
12230         for cf_cv_header_path_utf8 in $cf_search
12231         do
12232                 if test -d "$cf_cv_header_path_utf8" ; then
12233                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12234
12235 echo "${as_me:-configure}:12235: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12236
12237                         CPPFLAGS="$cf_save_CPPFLAGS"
12238
12239         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12240         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12241
12242                         cat >"conftest.$ac_ext" <<_ACEOF
12243 #line 12243 "configure"
12244 #include "confdefs.h"
12245
12246 #include <libutf8.h>
12247 int
12248 main (void)
12249 {
12250 putwc(0,0);
12251   ;
12252   return 0;
12253 }
12254 _ACEOF
12255 rm -f "conftest.$ac_objext"
12256 if { (eval echo "$as_me:12256: \"$ac_compile\"") >&5
12257   (eval $ac_compile) 2>&5
12258   ac_status=$?
12259   echo "$as_me:12259: \$? = $ac_status" >&5
12260   (exit "$ac_status"); } &&
12261          { ac_try='test -s "conftest.$ac_objext"'
12262   { (eval echo "$as_me:12262: \"$ac_try\"") >&5
12263   (eval $ac_try) 2>&5
12264   ac_status=$?
12265   echo "$as_me:12265: \$? = $ac_status" >&5
12266   (exit "$ac_status"); }; }; then
12267
12268                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12269
12270 echo "${as_me:-configure}:12270: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12271
12272                                 cf_cv_find_linkage_utf8=maybe
12273                                 cf_test_CPPFLAGS="$CPPFLAGS"
12274                                 break
12275 else
12276   echo "$as_me: failed program was:" >&5
12277 cat "conftest.$ac_ext" >&5
12278
12279                                 CPPFLAGS="$cf_save_CPPFLAGS"
12280
12281 fi
12282 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12283                 fi
12284         done
12285
12286         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12287
12288 echo "${as_me:-configure}:12288: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12289
12290                 cf_save_LIBS="$LIBS"
12291                 cf_save_LDFLAGS="$LDFLAGS"
12292
12293                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12294
12295 cf_search=
12296 cf_library_path_list=""
12297 if test -n "${LDFLAGS}${LIBS}" ; then
12298         for cf_library_path in $LDFLAGS $LIBS
12299         do
12300                 case "$cf_library_path" in
12301                 (-L*)
12302                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12303
12304 test "x$cf_library_path" != "xNONE" && \
12305 test -d "$cf_library_path" && \
12306  {
12307         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12308         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12309         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12310         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12311         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12312         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12313 }
12314
12315                         cf_library_path_list="$cf_library_path_list $cf_search"
12316                         ;;
12317                 esac
12318         done
12319 fi
12320
12321 cf_search=
12322
12323 test "x$prefix" != "xNONE" && \
12324 test -d "$prefix" && \
12325  {
12326         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12327         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12328         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12329         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12330         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12331         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12332 }
12333
12334 for cf_subdir_prefix in \
12335         /usr \
12336         /usr/local \
12337         /usr/pkg \
12338         /opt \
12339         /opt/local \
12340         $HOME
12341 do
12342
12343 test "x$cf_subdir_prefix" != "x$prefix" && \
12344 test -d "$cf_subdir_prefix" && \
12345 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12346         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12347         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12348         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12349         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12350         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12351         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12352 }
12353
12354 done
12355
12356 cf_search="$cf_library_path_list $cf_search"
12357
12358                         for cf_cv_library_path_utf8 in $cf_search
12359                         do
12360                                 if test -d "$cf_cv_library_path_utf8" ; then
12361                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12362
12363 echo "${as_me:-configure}:12363: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12364
12365                                         CPPFLAGS="$cf_test_CPPFLAGS"
12366                                         LIBS="-lutf8  $cf_save_LIBS"
12367                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12368                                         cat >"conftest.$ac_ext" <<_ACEOF
12369 #line 12369 "configure"
12370 #include "confdefs.h"
12371
12372 #include <libutf8.h>
12373 int
12374 main (void)
12375 {
12376 putwc(0,0);
12377   ;
12378   return 0;
12379 }
12380 _ACEOF
12381 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12382 if { (eval echo "$as_me:12382: \"$ac_link\"") >&5
12383   (eval $ac_link) 2>&5
12384   ac_status=$?
12385   echo "$as_me:12385: \$? = $ac_status" >&5
12386   (exit "$ac_status"); } &&
12387          { ac_try='test -s "conftest$ac_exeext"'
12388   { (eval echo "$as_me:12388: \"$ac_try\"") >&5
12389   (eval $ac_try) 2>&5
12390   ac_status=$?
12391   echo "$as_me:12391: \$? = $ac_status" >&5
12392   (exit "$ac_status"); }; }; then
12393
12394                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12395
12396 echo "${as_me:-configure}:12396: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12397
12398                                         cf_cv_find_linkage_utf8=yes
12399                                         cf_cv_library_file_utf8="-lutf8"
12400                                         break
12401 else
12402   echo "$as_me: failed program was:" >&5
12403 cat "conftest.$ac_ext" >&5
12404
12405                                         CPPFLAGS="$cf_save_CPPFLAGS"
12406                                         LIBS="$cf_save_LIBS"
12407                                         LDFLAGS="$cf_save_LDFLAGS"
12408
12409 fi
12410 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12411                                 fi
12412                         done
12413                         CPPFLAGS="$cf_save_CPPFLAGS"
12414                         LDFLAGS="$cf_save_LDFLAGS"
12415                 fi
12416
12417         else
12418                 cf_cv_find_linkage_utf8=no
12419         fi
12420
12421 fi
12422 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12423
12424 fi
12425 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12426
12427 LIBS="$cf_save_LIBS"
12428
12429 if test "$cf_cv_find_linkage_utf8" = yes ; then
12430 cf_cv_utf8_lib=add-on
12431 else
12432 cf_cv_utf8_lib=no
12433 fi
12434
12435 fi
12436 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12437 fi
12438 echo "$as_me:12438: result: $cf_cv_utf8_lib" >&5
12439 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12440
12441 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12442 # ncurses/ncursesw:
12443 if test "$cf_cv_utf8_lib" = "add-on" ; then
12444
12445 cat >>confdefs.h <<\EOF
12446 #define HAVE_LIBUTF8_H 1
12447 EOF
12448
12449 if test -n "$cf_cv_header_path_utf8" ; then
12450   for cf_add_incdir in $cf_cv_header_path_utf8
12451   do
12452         while test "$cf_add_incdir" != /usr/include
12453         do
12454           if test -d "$cf_add_incdir"
12455           then
12456                 cf_have_incdir=no
12457                 if test -n "$CFLAGS$CPPFLAGS" ; then
12458                   # a loop is needed to ensure we can add subdirs of existing dirs
12459                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12460                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12461                           cf_have_incdir=yes; break
12462                         fi
12463                   done
12464                 fi
12465
12466                 if test "$cf_have_incdir" = no ; then
12467                   if test "$cf_add_incdir" = /usr/local/include ; then
12468                         if test "$GCC" = yes
12469                         then
12470                           cf_save_CPPFLAGS=$CPPFLAGS
12471
12472         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12473         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12474
12475                           cat >"conftest.$ac_ext" <<_ACEOF
12476 #line 12476 "configure"
12477 #include "confdefs.h"
12478 #include <stdio.h>
12479 int
12480 main (void)
12481 {
12482 printf("Hello")
12483   ;
12484   return 0;
12485 }
12486 _ACEOF
12487 rm -f "conftest.$ac_objext"
12488 if { (eval echo "$as_me:12488: \"$ac_compile\"") >&5
12489   (eval $ac_compile) 2>&5
12490   ac_status=$?
12491   echo "$as_me:12491: \$? = $ac_status" >&5
12492   (exit "$ac_status"); } &&
12493          { ac_try='test -s "conftest.$ac_objext"'
12494   { (eval echo "$as_me:12494: \"$ac_try\"") >&5
12495   (eval $ac_try) 2>&5
12496   ac_status=$?
12497   echo "$as_me:12497: \$? = $ac_status" >&5
12498   (exit "$ac_status"); }; }; then
12499   :
12500 else
12501   echo "$as_me: failed program was:" >&5
12502 cat "conftest.$ac_ext" >&5
12503 cf_have_incdir=yes
12504 fi
12505 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12506                           CPPFLAGS=$cf_save_CPPFLAGS
12507                         fi
12508                   fi
12509                 fi
12510
12511                 if test "$cf_have_incdir" = no ; then
12512                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12513
12514 echo "${as_me:-configure}:12514: testing adding $cf_add_incdir to include-path ..." 1>&5
12515
12516                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12517
12518                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12519                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12520                   cf_add_incdir="$cf_top_incdir"
12521                 else
12522                   break
12523                 fi
12524           else
12525                 break
12526           fi
12527         done
12528   done
12529 fi
12530
12531 if test -n "$cf_cv_library_path_utf8" ; then
12532         for cf_add_libdir in $cf_cv_library_path_utf8
12533         do
12534                 if test "$cf_add_libdir" = /usr/lib ; then
12535                         :
12536                 elif test -d "$cf_add_libdir"
12537                 then
12538                         cf_have_libdir=no
12539                         if test -n "$LDFLAGS$LIBS" ; then
12540                                 # a loop is needed to ensure we can add subdirs of existing dirs
12541                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12542                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12543                                                 cf_have_libdir=yes; break
12544                                         fi
12545                                 done
12546                         fi
12547                         if test "$cf_have_libdir" = no ; then
12548                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12549
12550 echo "${as_me:-configure}:12550: testing adding $cf_add_libdir to library-path ..." 1>&5
12551
12552                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12553                         fi
12554                 fi
12555         done
12556 fi
12557
12558 cf_add_libs="$LIBS"
12559 # reverse order
12560 cf_add_0lib=
12561 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12562 # filter duplicates
12563 for cf_add_1lib in $cf_add_0lib; do
12564         for cf_add_2lib in $cf_add_libs; do
12565                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12566                         cf_add_1lib=
12567                         break
12568                 fi
12569         done
12570         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12571 done
12572 LIBS="$cf_add_libs"
12573
12574 fi
12575
12576                 if test "$cf_cv_utf8_lib" != no ; then
12577                         NCURSES_LIBUTF8=1
12578                 fi
12579         fi
12580
12581 # This is needed on Tru64 5.0 to declare mbstate_t
12582 echo "$as_me:12582: checking if we must include wchar.h to declare mbstate_t" >&5
12583 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12584 if test "${cf_cv_mbstate_t+set}" = set; then
12585   echo $ECHO_N "(cached) $ECHO_C" >&6
12586 else
12587
12588 cat >"conftest.$ac_ext" <<_ACEOF
12589 #line 12589 "configure"
12590 #include "confdefs.h"
12591
12592 #include <stdlib.h>
12593 #include <stdarg.h>
12594 #include <stdio.h>
12595 #ifdef HAVE_LIBUTF8_H
12596 #include <libutf8.h>
12597 #endif
12598 int
12599 main (void)
12600 {
12601 mbstate_t state
12602   ;
12603   return 0;
12604 }
12605 _ACEOF
12606 rm -f "conftest.$ac_objext"
12607 if { (eval echo "$as_me:12607: \"$ac_compile\"") >&5
12608   (eval $ac_compile) 2>&5
12609   ac_status=$?
12610   echo "$as_me:12610: \$? = $ac_status" >&5
12611   (exit "$ac_status"); } &&
12612          { ac_try='test -s "conftest.$ac_objext"'
12613   { (eval echo "$as_me:12613: \"$ac_try\"") >&5
12614   (eval $ac_try) 2>&5
12615   ac_status=$?
12616   echo "$as_me:12616: \$? = $ac_status" >&5
12617   (exit "$ac_status"); }; }; then
12618   cf_cv_mbstate_t=no
12619 else
12620   echo "$as_me: failed program was:" >&5
12621 cat "conftest.$ac_ext" >&5
12622 cat >"conftest.$ac_ext" <<_ACEOF
12623 #line 12623 "configure"
12624 #include "confdefs.h"
12625
12626 #include <stdlib.h>
12627 #include <stdarg.h>
12628 #include <stdio.h>
12629 #include <wchar.h>
12630 #ifdef HAVE_LIBUTF8_H
12631 #include <libutf8.h>
12632 #endif
12633 int
12634 main (void)
12635 {
12636 mbstate_t value
12637   ;
12638   return 0;
12639 }
12640 _ACEOF
12641 rm -f "conftest.$ac_objext"
12642 if { (eval echo "$as_me:12642: \"$ac_compile\"") >&5
12643   (eval $ac_compile) 2>&5
12644   ac_status=$?
12645   echo "$as_me:12645: \$? = $ac_status" >&5
12646   (exit "$ac_status"); } &&
12647          { ac_try='test -s "conftest.$ac_objext"'
12648   { (eval echo "$as_me:12648: \"$ac_try\"") >&5
12649   (eval $ac_try) 2>&5
12650   ac_status=$?
12651   echo "$as_me:12651: \$? = $ac_status" >&5
12652   (exit "$ac_status"); }; }; then
12653   cf_cv_mbstate_t=yes
12654 else
12655   echo "$as_me: failed program was:" >&5
12656 cat "conftest.$ac_ext" >&5
12657 cf_cv_mbstate_t=unknown
12658 fi
12659 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12660 fi
12661 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12662 fi
12663 echo "$as_me:12663: result: $cf_cv_mbstate_t" >&5
12664 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12665
12666 if test "$cf_cv_mbstate_t" = yes ; then
12667
12668 cat >>confdefs.h <<\EOF
12669 #define NEED_WCHAR_H 1
12670 EOF
12671
12672         NEED_WCHAR_H=1
12673 fi
12674
12675 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12676 if test "$cf_cv_mbstate_t" = unknown ; then
12677         NCURSES_MBSTATE_T=1
12678 fi
12679
12680 # This is needed on Tru64 5.0 to declare wchar_t
12681 echo "$as_me:12681: checking if we must include wchar.h to declare wchar_t" >&5
12682 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12683 if test "${cf_cv_wchar_t+set}" = set; then
12684   echo $ECHO_N "(cached) $ECHO_C" >&6
12685 else
12686
12687 cat >"conftest.$ac_ext" <<_ACEOF
12688 #line 12688 "configure"
12689 #include "confdefs.h"
12690
12691 #include <stdlib.h>
12692 #include <stdarg.h>
12693 #include <stdio.h>
12694 #ifdef HAVE_LIBUTF8_H
12695 #include <libutf8.h>
12696 #endif
12697 int
12698 main (void)
12699 {
12700 wchar_t state
12701   ;
12702   return 0;
12703 }
12704 _ACEOF
12705 rm -f "conftest.$ac_objext"
12706 if { (eval echo "$as_me:12706: \"$ac_compile\"") >&5
12707   (eval $ac_compile) 2>&5
12708   ac_status=$?
12709   echo "$as_me:12709: \$? = $ac_status" >&5
12710   (exit "$ac_status"); } &&
12711          { ac_try='test -s "conftest.$ac_objext"'
12712   { (eval echo "$as_me:12712: \"$ac_try\"") >&5
12713   (eval $ac_try) 2>&5
12714   ac_status=$?
12715   echo "$as_me:12715: \$? = $ac_status" >&5
12716   (exit "$ac_status"); }; }; then
12717   cf_cv_wchar_t=no
12718 else
12719   echo "$as_me: failed program was:" >&5
12720 cat "conftest.$ac_ext" >&5
12721 cat >"conftest.$ac_ext" <<_ACEOF
12722 #line 12722 "configure"
12723 #include "confdefs.h"
12724
12725 #include <stdlib.h>
12726 #include <stdarg.h>
12727 #include <stdio.h>
12728 #include <wchar.h>
12729 #ifdef HAVE_LIBUTF8_H
12730 #include <libutf8.h>
12731 #endif
12732 int
12733 main (void)
12734 {
12735 wchar_t value
12736   ;
12737   return 0;
12738 }
12739 _ACEOF
12740 rm -f "conftest.$ac_objext"
12741 if { (eval echo "$as_me:12741: \"$ac_compile\"") >&5
12742   (eval $ac_compile) 2>&5
12743   ac_status=$?
12744   echo "$as_me:12744: \$? = $ac_status" >&5
12745   (exit "$ac_status"); } &&
12746          { ac_try='test -s "conftest.$ac_objext"'
12747   { (eval echo "$as_me:12747: \"$ac_try\"") >&5
12748   (eval $ac_try) 2>&5
12749   ac_status=$?
12750   echo "$as_me:12750: \$? = $ac_status" >&5
12751   (exit "$ac_status"); }; }; then
12752   cf_cv_wchar_t=yes
12753 else
12754   echo "$as_me: failed program was:" >&5
12755 cat "conftest.$ac_ext" >&5
12756 cf_cv_wchar_t=unknown
12757 fi
12758 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12759 fi
12760 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12761 fi
12762 echo "$as_me:12762: result: $cf_cv_wchar_t" >&5
12763 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12764
12765 if test "$cf_cv_wchar_t" = yes ; then
12766
12767 cat >>confdefs.h <<\EOF
12768 #define NEED_WCHAR_H 1
12769 EOF
12770
12771         NEED_WCHAR_H=1
12772 fi
12773
12774 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12775 if test "$cf_cv_wchar_t" = unknown ; then
12776         NCURSES_WCHAR_T=1
12777 fi
12778
12779 # if we find wchar_t in either place, use substitution to provide a fallback.
12780 if test "$cf_cv_wchar_t" != unknown ; then
12781         NCURSES_OK_WCHAR_T=1
12782 fi
12783
12784 # This is needed on Tru64 5.0 to declare wint_t
12785 echo "$as_me:12785: checking if we must include wchar.h to declare wint_t" >&5
12786 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12787 if test "${cf_cv_wint_t+set}" = set; then
12788   echo $ECHO_N "(cached) $ECHO_C" >&6
12789 else
12790
12791 cat >"conftest.$ac_ext" <<_ACEOF
12792 #line 12792 "configure"
12793 #include "confdefs.h"
12794
12795 #include <stdlib.h>
12796 #include <stdarg.h>
12797 #include <stdio.h>
12798 #ifdef HAVE_LIBUTF8_H
12799 #include <libutf8.h>
12800 #endif
12801 int
12802 main (void)
12803 {
12804 wint_t state
12805   ;
12806   return 0;
12807 }
12808 _ACEOF
12809 rm -f "conftest.$ac_objext"
12810 if { (eval echo "$as_me:12810: \"$ac_compile\"") >&5
12811   (eval $ac_compile) 2>&5
12812   ac_status=$?
12813   echo "$as_me:12813: \$? = $ac_status" >&5
12814   (exit "$ac_status"); } &&
12815          { ac_try='test -s "conftest.$ac_objext"'
12816   { (eval echo "$as_me:12816: \"$ac_try\"") >&5
12817   (eval $ac_try) 2>&5
12818   ac_status=$?
12819   echo "$as_me:12819: \$? = $ac_status" >&5
12820   (exit "$ac_status"); }; }; then
12821   cf_cv_wint_t=no
12822 else
12823   echo "$as_me: failed program was:" >&5
12824 cat "conftest.$ac_ext" >&5
12825 cat >"conftest.$ac_ext" <<_ACEOF
12826 #line 12826 "configure"
12827 #include "confdefs.h"
12828
12829 #include <stdlib.h>
12830 #include <stdarg.h>
12831 #include <stdio.h>
12832 #include <wchar.h>
12833 #ifdef HAVE_LIBUTF8_H
12834 #include <libutf8.h>
12835 #endif
12836 int
12837 main (void)
12838 {
12839 wint_t value
12840   ;
12841   return 0;
12842 }
12843 _ACEOF
12844 rm -f "conftest.$ac_objext"
12845 if { (eval echo "$as_me:12845: \"$ac_compile\"") >&5
12846   (eval $ac_compile) 2>&5
12847   ac_status=$?
12848   echo "$as_me:12848: \$? = $ac_status" >&5
12849   (exit "$ac_status"); } &&
12850          { ac_try='test -s "conftest.$ac_objext"'
12851   { (eval echo "$as_me:12851: \"$ac_try\"") >&5
12852   (eval $ac_try) 2>&5
12853   ac_status=$?
12854   echo "$as_me:12854: \$? = $ac_status" >&5
12855   (exit "$ac_status"); }; }; then
12856   cf_cv_wint_t=yes
12857 else
12858   echo "$as_me: failed program was:" >&5
12859 cat "conftest.$ac_ext" >&5
12860 cf_cv_wint_t=unknown
12861 fi
12862 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12863 fi
12864 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12865 fi
12866 echo "$as_me:12866: result: $cf_cv_wint_t" >&5
12867 echo "${ECHO_T}$cf_cv_wint_t" >&6
12868
12869 if test "$cf_cv_wint_t" = yes ; then
12870
12871 cat >>confdefs.h <<\EOF
12872 #define NEED_WCHAR_H 1
12873 EOF
12874
12875         NEED_WCHAR_H=1
12876 fi
12877
12878 # if we do not find wint_t in either place, use substitution to provide a fallback.
12879 if test "$cf_cv_wint_t" = unknown ; then
12880         NCURSES_WINT_T=1
12881 fi
12882
12883 # if we find wint_t in either place, use substitution to provide a fallback.
12884 if test "$cf_cv_wint_t" != unknown ; then
12885         NCURSES_OK_WINT_T=1
12886 fi
12887
12888         if test "$NCURSES_MBSTATE_T" != 0; then
12889
12890 cat >>confdefs.h <<\EOF
12891 #define NEED_MBSTATE_T_DEF 1
12892 EOF
12893
12894         fi
12895 fi
12896
12897 ###   use option --disable-lp64 to allow long chtype
12898 echo "$as_me:12898: checking whether to enable _LP64 definition in curses.h" >&5
12899 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12900
12901 # Check whether --enable-lp64 or --disable-lp64 was given.
12902 if test "${enable_lp64+set}" = set; then
12903   enableval="$enable_lp64"
12904   with_lp64=$enableval
12905 else
12906   with_lp64=$cf_dft_with_lp64
12907 fi;
12908 echo "$as_me:12908: result: $with_lp64" >&5
12909 echo "${ECHO_T}$with_lp64" >&6
12910
12911 if test "x$with_lp64" = xyes ; then
12912         cf_cv_enable_lp64=1
12913 else
12914         cf_cv_enable_lp64=0
12915 fi
12916
12917 # Check whether --enable-largefile or --disable-largefile was given.
12918 if test "${enable_largefile+set}" = set; then
12919   enableval="$enable_largefile"
12920
12921 fi;
12922 if test "$enable_largefile" != no; then
12923
12924   echo "$as_me:12924: checking for special C compiler options needed for large files" >&5
12925 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12926 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12927   echo $ECHO_N "(cached) $ECHO_C" >&6
12928 else
12929   ac_cv_sys_largefile_CC=no
12930      if test "$GCC" != yes; then
12931        ac_save_CC=$CC
12932        while :; do
12933          # IRIX 6.2 and later do not support large files by default,
12934          # so use the C compiler's -n32 option if that helps.
12935          cat >"conftest.$ac_ext" <<_ACEOF
12936 #line 12936 "configure"
12937 #include "confdefs.h"
12938 #include <sys/types.h>
12939  /* Check that off_t can represent 2**63 - 1 correctly.
12940     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12941     since some C++ compilers masquerading as C compilers
12942     incorrectly reject 9223372036854775807.  */
12943 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12944   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12945                        && LARGE_OFF_T % 2147483647 == 1)
12946                       ? 1 : -1];
12947 int
12948 main (void)
12949 {
12950
12951   ;
12952   return 0;
12953 }
12954 _ACEOF
12955          rm -f "conftest.$ac_objext"
12956 if { (eval echo "$as_me:12956: \"$ac_compile\"") >&5
12957   (eval $ac_compile) 2>&5
12958   ac_status=$?
12959   echo "$as_me:12959: \$? = $ac_status" >&5
12960   (exit "$ac_status"); } &&
12961          { ac_try='test -s "conftest.$ac_objext"'
12962   { (eval echo "$as_me:12962: \"$ac_try\"") >&5
12963   (eval $ac_try) 2>&5
12964   ac_status=$?
12965   echo "$as_me:12965: \$? = $ac_status" >&5
12966   (exit "$ac_status"); }; }; then
12967   break
12968 else
12969   echo "$as_me: failed program was:" >&5
12970 cat "conftest.$ac_ext" >&5
12971 fi
12972 rm -f "conftest.$ac_objext"
12973          CC="$CC -n32"
12974          rm -f "conftest.$ac_objext"
12975 if { (eval echo "$as_me:12975: \"$ac_compile\"") >&5
12976   (eval $ac_compile) 2>&5
12977   ac_status=$?
12978   echo "$as_me:12978: \$? = $ac_status" >&5
12979   (exit "$ac_status"); } &&
12980          { ac_try='test -s "conftest.$ac_objext"'
12981   { (eval echo "$as_me:12981: \"$ac_try\"") >&5
12982   (eval $ac_try) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit "$ac_status"); }; }; then
12986   ac_cv_sys_largefile_CC=' -n32'; break
12987 else
12988   echo "$as_me: failed program was:" >&5
12989 cat "conftest.$ac_ext" >&5
12990 fi
12991 rm -f "conftest.$ac_objext"
12992          break
12993        done
12994        CC=$ac_save_CC
12995        rm -f "conftest.$ac_ext"
12996     fi
12997 fi
12998 echo "$as_me:12998: result: $ac_cv_sys_largefile_CC" >&5
12999 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13000   if test "$ac_cv_sys_largefile_CC" != no; then
13001     CC=$CC$ac_cv_sys_largefile_CC
13002   fi
13003
13004   echo "$as_me:13004: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13005 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13006 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13007   echo $ECHO_N "(cached) $ECHO_C" >&6
13008 else
13009   while :; do
13010   ac_cv_sys_file_offset_bits=no
13011   cat >"conftest.$ac_ext" <<_ACEOF
13012 #line 13012 "configure"
13013 #include "confdefs.h"
13014 #include <sys/types.h>
13015  /* Check that off_t can represent 2**63 - 1 correctly.
13016     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13017     since some C++ compilers masquerading as C compilers
13018     incorrectly reject 9223372036854775807.  */
13019 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13020   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13021                        && LARGE_OFF_T % 2147483647 == 1)
13022                       ? 1 : -1];
13023 int
13024 main (void)
13025 {
13026
13027   ;
13028   return 0;
13029 }
13030 _ACEOF
13031 rm -f "conftest.$ac_objext"
13032 if { (eval echo "$as_me:13032: \"$ac_compile\"") >&5
13033   (eval $ac_compile) 2>&5
13034   ac_status=$?
13035   echo "$as_me:13035: \$? = $ac_status" >&5
13036   (exit "$ac_status"); } &&
13037          { ac_try='test -s "conftest.$ac_objext"'
13038   { (eval echo "$as_me:13038: \"$ac_try\"") >&5
13039   (eval $ac_try) 2>&5
13040   ac_status=$?
13041   echo "$as_me:13041: \$? = $ac_status" >&5
13042   (exit "$ac_status"); }; }; then
13043   break
13044 else
13045   echo "$as_me: failed program was:" >&5
13046 cat "conftest.$ac_ext" >&5
13047 fi
13048 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13049   cat >"conftest.$ac_ext" <<_ACEOF
13050 #line 13050 "configure"
13051 #include "confdefs.h"
13052 #define _FILE_OFFSET_BITS 64
13053 #include <sys/types.h>
13054  /* Check that off_t can represent 2**63 - 1 correctly.
13055     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13056     since some C++ compilers masquerading as C compilers
13057     incorrectly reject 9223372036854775807.  */
13058 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13059   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13060                        && LARGE_OFF_T % 2147483647 == 1)
13061                       ? 1 : -1];
13062 int
13063 main (void)
13064 {
13065
13066   ;
13067   return 0;
13068 }
13069 _ACEOF
13070 rm -f "conftest.$ac_objext"
13071 if { (eval echo "$as_me:13071: \"$ac_compile\"") >&5
13072   (eval $ac_compile) 2>&5
13073   ac_status=$?
13074   echo "$as_me:13074: \$? = $ac_status" >&5
13075   (exit "$ac_status"); } &&
13076          { ac_try='test -s "conftest.$ac_objext"'
13077   { (eval echo "$as_me:13077: \"$ac_try\"") >&5
13078   (eval $ac_try) 2>&5
13079   ac_status=$?
13080   echo "$as_me:13080: \$? = $ac_status" >&5
13081   (exit "$ac_status"); }; }; then
13082   ac_cv_sys_file_offset_bits=64; break
13083 else
13084   echo "$as_me: failed program was:" >&5
13085 cat "conftest.$ac_ext" >&5
13086 fi
13087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13088   break
13089 done
13090 fi
13091 echo "$as_me:13091: result: $ac_cv_sys_file_offset_bits" >&5
13092 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13093 if test "$ac_cv_sys_file_offset_bits" != no; then
13094
13095 cat >>confdefs.h <<EOF
13096 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13097 EOF
13098
13099 fi
13100 rm -rf conftest*
13101   echo "$as_me:13101: checking for _LARGE_FILES value needed for large files" >&5
13102 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13103 if test "${ac_cv_sys_large_files+set}" = set; then
13104   echo $ECHO_N "(cached) $ECHO_C" >&6
13105 else
13106   while :; do
13107   ac_cv_sys_large_files=no
13108   cat >"conftest.$ac_ext" <<_ACEOF
13109 #line 13109 "configure"
13110 #include "confdefs.h"
13111 #include <sys/types.h>
13112  /* Check that off_t can represent 2**63 - 1 correctly.
13113     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13114     since some C++ compilers masquerading as C compilers
13115     incorrectly reject 9223372036854775807.  */
13116 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13117   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13118                        && LARGE_OFF_T % 2147483647 == 1)
13119                       ? 1 : -1];
13120 int
13121 main (void)
13122 {
13123
13124   ;
13125   return 0;
13126 }
13127 _ACEOF
13128 rm -f "conftest.$ac_objext"
13129 if { (eval echo "$as_me:13129: \"$ac_compile\"") >&5
13130   (eval $ac_compile) 2>&5
13131   ac_status=$?
13132   echo "$as_me:13132: \$? = $ac_status" >&5
13133   (exit "$ac_status"); } &&
13134          { ac_try='test -s "conftest.$ac_objext"'
13135   { (eval echo "$as_me:13135: \"$ac_try\"") >&5
13136   (eval $ac_try) 2>&5
13137   ac_status=$?
13138   echo "$as_me:13138: \$? = $ac_status" >&5
13139   (exit "$ac_status"); }; }; then
13140   break
13141 else
13142   echo "$as_me: failed program was:" >&5
13143 cat "conftest.$ac_ext" >&5
13144 fi
13145 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13146   cat >"conftest.$ac_ext" <<_ACEOF
13147 #line 13147 "configure"
13148 #include "confdefs.h"
13149 #define _LARGE_FILES 1
13150 #include <sys/types.h>
13151  /* Check that off_t can represent 2**63 - 1 correctly.
13152     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13153     since some C++ compilers masquerading as C compilers
13154     incorrectly reject 9223372036854775807.  */
13155 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13156   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13157                        && LARGE_OFF_T % 2147483647 == 1)
13158                       ? 1 : -1];
13159 int
13160 main (void)
13161 {
13162
13163   ;
13164   return 0;
13165 }
13166 _ACEOF
13167 rm -f "conftest.$ac_objext"
13168 if { (eval echo "$as_me:13168: \"$ac_compile\"") >&5
13169   (eval $ac_compile) 2>&5
13170   ac_status=$?
13171   echo "$as_me:13171: \$? = $ac_status" >&5
13172   (exit "$ac_status"); } &&
13173          { ac_try='test -s "conftest.$ac_objext"'
13174   { (eval echo "$as_me:13174: \"$ac_try\"") >&5
13175   (eval $ac_try) 2>&5
13176   ac_status=$?
13177   echo "$as_me:13177: \$? = $ac_status" >&5
13178   (exit "$ac_status"); }; }; then
13179   ac_cv_sys_large_files=1; break
13180 else
13181   echo "$as_me: failed program was:" >&5
13182 cat "conftest.$ac_ext" >&5
13183 fi
13184 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13185   break
13186 done
13187 fi
13188 echo "$as_me:13188: result: $ac_cv_sys_large_files" >&5
13189 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13190 if test "$ac_cv_sys_large_files" != no; then
13191
13192 cat >>confdefs.h <<EOF
13193 #define _LARGE_FILES $ac_cv_sys_large_files
13194 EOF
13195
13196 fi
13197 rm -rf conftest*
13198 fi
13199
13200         if test "$enable_largefile" != no ; then
13201         echo "$as_me:13201: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13202 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13203 if test "${ac_cv_sys_largefile_source+set}" = set; then
13204   echo $ECHO_N "(cached) $ECHO_C" >&6
13205 else
13206   while :; do
13207   ac_cv_sys_largefile_source=no
13208   cat >"conftest.$ac_ext" <<_ACEOF
13209 #line 13209 "configure"
13210 #include "confdefs.h"
13211 #include <stdio.h>
13212 int
13213 main (void)
13214 {
13215 return !fseeko;
13216   ;
13217   return 0;
13218 }
13219 _ACEOF
13220 rm -f "conftest.$ac_objext"
13221 if { (eval echo "$as_me:13221: \"$ac_compile\"") >&5
13222   (eval $ac_compile) 2>&5
13223   ac_status=$?
13224   echo "$as_me:13224: \$? = $ac_status" >&5
13225   (exit "$ac_status"); } &&
13226          { ac_try='test -s "conftest.$ac_objext"'
13227   { (eval echo "$as_me:13227: \"$ac_try\"") >&5
13228   (eval $ac_try) 2>&5
13229   ac_status=$?
13230   echo "$as_me:13230: \$? = $ac_status" >&5
13231   (exit "$ac_status"); }; }; then
13232   break
13233 else
13234   echo "$as_me: failed program was:" >&5
13235 cat "conftest.$ac_ext" >&5
13236 fi
13237 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13238   cat >"conftest.$ac_ext" <<_ACEOF
13239 #line 13239 "configure"
13240 #include "confdefs.h"
13241 #define _LARGEFILE_SOURCE 1
13242 #include <stdio.h>
13243 int
13244 main (void)
13245 {
13246 return !fseeko;
13247   ;
13248   return 0;
13249 }
13250 _ACEOF
13251 rm -f "conftest.$ac_objext"
13252 if { (eval echo "$as_me:13252: \"$ac_compile\"") >&5
13253   (eval $ac_compile) 2>&5
13254   ac_status=$?
13255   echo "$as_me:13255: \$? = $ac_status" >&5
13256   (exit "$ac_status"); } &&
13257          { ac_try='test -s "conftest.$ac_objext"'
13258   { (eval echo "$as_me:13258: \"$ac_try\"") >&5
13259   (eval $ac_try) 2>&5
13260   ac_status=$?
13261   echo "$as_me:13261: \$? = $ac_status" >&5
13262   (exit "$ac_status"); }; }; then
13263   ac_cv_sys_largefile_source=1; break
13264 else
13265   echo "$as_me: failed program was:" >&5
13266 cat "conftest.$ac_ext" >&5
13267 fi
13268 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13269   break
13270 done
13271 fi
13272 echo "$as_me:13272: result: $ac_cv_sys_largefile_source" >&5
13273 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13274 if test "$ac_cv_sys_largefile_source" != no; then
13275
13276 cat >>confdefs.h <<EOF
13277 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13278 EOF
13279
13280 fi
13281 rm -rf conftest*
13282
13283 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13284 # in glibc 2.1.3, but that breaks too many other things.
13285 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13286 echo "$as_me:13286: checking for fseeko" >&5
13287 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13288 if test "${ac_cv_func_fseeko+set}" = set; then
13289   echo $ECHO_N "(cached) $ECHO_C" >&6
13290 else
13291   cat >"conftest.$ac_ext" <<_ACEOF
13292 #line 13292 "configure"
13293 #include "confdefs.h"
13294 #include <stdio.h>
13295 int
13296 main (void)
13297 {
13298 return fseeko && fseeko (stdin, 0, 0);
13299   ;
13300   return 0;
13301 }
13302 _ACEOF
13303 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13304 if { (eval echo "$as_me:13304: \"$ac_link\"") >&5
13305   (eval $ac_link) 2>&5
13306   ac_status=$?
13307   echo "$as_me:13307: \$? = $ac_status" >&5
13308   (exit "$ac_status"); } &&
13309          { ac_try='test -s "conftest$ac_exeext"'
13310   { (eval echo "$as_me:13310: \"$ac_try\"") >&5
13311   (eval $ac_try) 2>&5
13312   ac_status=$?
13313   echo "$as_me:13313: \$? = $ac_status" >&5
13314   (exit "$ac_status"); }; }; then
13315   ac_cv_func_fseeko=yes
13316 else
13317   echo "$as_me: failed program was:" >&5
13318 cat "conftest.$ac_ext" >&5
13319 ac_cv_func_fseeko=no
13320 fi
13321 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13322 fi
13323 echo "$as_me:13323: result: $ac_cv_func_fseeko" >&5
13324 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13325 if test $ac_cv_func_fseeko = yes; then
13326
13327 cat >>confdefs.h <<\EOF
13328 #define HAVE_FSEEKO 1
13329 EOF
13330
13331 fi
13332
13333         # Normally we would collect these definitions in the config.h,
13334         # but (like _XOPEN_SOURCE), some environments rely on having these
13335         # defined before any of the system headers are included.  Another
13336         # case comes up with C++, e.g., on AIX the compiler compiles the
13337         # header files by themselves before looking at the body files it is
13338         # told to compile.  For ncurses, those header files do not include
13339         # the config.h
13340         if test "$ac_cv_sys_large_files" != no
13341         then
13342
13343         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13344         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13345
13346         fi
13347         if test "$ac_cv_sys_largefile_source" != no
13348         then
13349
13350         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13351         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13352
13353         fi
13354         if test "$ac_cv_sys_file_offset_bits" != no
13355         then
13356
13357         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13358         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13359
13360         fi
13361
13362         echo "$as_me:13362: checking whether to use struct dirent64" >&5
13363 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13364 if test "${cf_cv_struct_dirent64+set}" = set; then
13365   echo $ECHO_N "(cached) $ECHO_C" >&6
13366 else
13367
13368                 cat >"conftest.$ac_ext" <<_ACEOF
13369 #line 13369 "configure"
13370 #include "confdefs.h"
13371
13372 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13373 #include <sys/types.h>
13374 #include <dirent.h>
13375
13376 int
13377 main (void)
13378 {
13379
13380                 /* if transitional largefile support is setup, this is true */
13381                 extern struct dirent64 * readdir(DIR *);
13382                 struct dirent64 *x = readdir((DIR *)0);
13383                 struct dirent *y = readdir((DIR *)0);
13384                 int z = x - y;
13385                 (void)z;
13386
13387   ;
13388   return 0;
13389 }
13390 _ACEOF
13391 rm -f "conftest.$ac_objext"
13392 if { (eval echo "$as_me:13392: \"$ac_compile\"") >&5
13393   (eval $ac_compile) 2>&5
13394   ac_status=$?
13395   echo "$as_me:13395: \$? = $ac_status" >&5
13396   (exit "$ac_status"); } &&
13397          { ac_try='test -s "conftest.$ac_objext"'
13398   { (eval echo "$as_me:13398: \"$ac_try\"") >&5
13399   (eval $ac_try) 2>&5
13400   ac_status=$?
13401   echo "$as_me:13401: \$? = $ac_status" >&5
13402   (exit "$ac_status"); }; }; then
13403   cf_cv_struct_dirent64=yes
13404 else
13405   echo "$as_me: failed program was:" >&5
13406 cat "conftest.$ac_ext" >&5
13407 cf_cv_struct_dirent64=no
13408 fi
13409 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13410
13411 fi
13412 echo "$as_me:13412: result: $cf_cv_struct_dirent64" >&5
13413 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13414         test "$cf_cv_struct_dirent64" = yes &&
13415 cat >>confdefs.h <<\EOF
13416 #define HAVE_STRUCT_DIRENT64 1
13417 EOF
13418
13419         fi
13420
13421 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13422 echo "$as_me:13422: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13423 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13424
13425 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13426 if test "${enable_tparm_varargs+set}" = set; then
13427   enableval="$enable_tparm_varargs"
13428   with_tparm_varargs=$enableval
13429 else
13430   with_tparm_varargs=yes
13431 fi;
13432 echo "$as_me:13432: result: $with_tparm_varargs" >&5
13433 echo "${ECHO_T}$with_tparm_varargs" >&6
13434 NCURSES_TPARM_VARARGS=0
13435 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13436
13437 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13438 if test "$with_ticlib" != no ; then
13439 echo "$as_me:13439: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13440 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13441
13442 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13443 if test "${enable_tic_depends+set}" = set; then
13444   enableval="$enable_tic_depends"
13445   with_tic_depends=$enableval
13446 else
13447   with_tic_depends=yes
13448 fi;
13449 echo "$as_me:13449: result: $with_tic_depends" >&5
13450 echo "${ECHO_T}$with_tic_depends" >&6
13451 else
13452         with_tic_depends=no
13453 fi
13454
13455 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13456 echo "$as_me:13456: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13457 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13458
13459 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13460 if test "${enable_wattr_macros+set}" = set; then
13461   enableval="$enable_wattr_macros"
13462   with_wattr_macros=$enableval
13463 else
13464   with_wattr_macros=yes
13465 fi;
13466 if [ "x$with_wattr_macros" != xyes ]; then
13467         NCURSES_WATTR_MACROS=0
13468         echo "$as_me:13468: result: yes" >&5
13469 echo "${ECHO_T}yes" >&6
13470 else
13471         NCURSES_WATTR_MACROS=1
13472         echo "$as_me:13472: result: no" >&5
13473 echo "${ECHO_T}no" >&6
13474 fi
13475
13476 echo "$as_me:13476: checking for X11 rgb file" >&5
13477 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13478
13479 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13480 if test "${with_x11_rgb+set}" = set; then
13481   withval="$with_x11_rgb"
13482   RGB_PATH=$withval
13483 else
13484   RGB_PATH=auto
13485 fi;
13486
13487 if test "x$RGB_PATH" = xauto
13488 then
13489         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13490         for cf_path in \
13491                 /opt/local/share/X11/rgb.txt \
13492                 /opt/X11/share/X11/rgb.txt \
13493                 /usr/share/X11/rgb.txt \
13494                 /usr/X11/share/X11/rgb.txt \
13495                 /usr/X11/lib/X11/rgb.txt \
13496                 /usr/lib/X11/rgb.txt \
13497                 /etc/X11/rgb.txt \
13498                 /usr/pkg/lib/X11/rgb.txt \
13499                 /usr/X11R7/lib/X11/rgb.txt \
13500                 /usr/X11R6/lib/X11/rgb.txt \
13501                 /usr/X11R5/lib/X11/rgb.txt \
13502                 /usr/X11R4/lib/X11/rgb.txt \
13503                 /usr/local/lib/X11/rgb.txt \
13504                 /usr/local/share/X11/rgb.txt \
13505                 /usr/lib64/X11/rgb.txt
13506         do
13507                 if test -f "$cf_path" ; then
13508                         RGB_PATH="$cf_path"
13509                         break
13510                 fi
13511         done
13512 else
13513         cf_path=$RGB_PATH
13514
13515 if test "x$prefix" != xNONE; then
13516         cf_path_syntax="$prefix"
13517 else
13518         cf_path_syntax="$ac_default_prefix"
13519 fi
13520
13521 case ".$cf_path" in
13522 (.\$\(*\)*|.\'*\'*)
13523         ;;
13524 (..|./*|.\\*)
13525         ;;
13526 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13527         ;;
13528 (.\$\{*prefix\}*|.\$\{*dir\}*)
13529         eval cf_path="$cf_path"
13530         case ".$cf_path" in
13531         (.NONE/*)
13532                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13533                 ;;
13534         esac
13535         ;;
13536 (.no|.NONE/*)
13537         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13538         ;;
13539 (*)
13540         { { echo "$as_me:13540: error: expected a pathname, not \"$cf_path\"" >&5
13541 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13542    { (exit 1); exit 1; }; }
13543         ;;
13544 esac
13545
13546 fi
13547
13548 echo "$as_me:13548: result: $RGB_PATH" >&5
13549 echo "${ECHO_T}$RGB_PATH" >&6
13550
13551 cat >>confdefs.h <<EOF
13552 #define RGB_PATH "$cf_path"
13553 EOF
13554
13555 no_x11_rgb=
13556 if test "$RGB_PATH" = no
13557 then
13558         no_x11_rgb="#"
13559 fi
13560
13561 ###   use option --with-bool to override bool's type
13562 echo "$as_me:13562: checking for type of bool" >&5
13563 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13564
13565 # Check whether --with-bool or --without-bool was given.
13566 if test "${with_bool+set}" = set; then
13567   withval="$with_bool"
13568   NCURSES_BOOL="$withval"
13569 else
13570   NCURSES_BOOL=auto
13571 fi;
13572 echo "$as_me:13572: result: $NCURSES_BOOL" >&5
13573 echo "${ECHO_T}$NCURSES_BOOL" >&6
13574
13575 echo "$as_me:13575: checking for alternate terminal capabilities file" >&5
13576 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13577
13578 # Check whether --with-caps or --without-caps was given.
13579 if test "${with_caps+set}" = set; then
13580   withval="$with_caps"
13581   TERMINFO_CAPS=Caps.$withval
13582 else
13583   TERMINFO_CAPS=Caps
13584 fi;
13585 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13586 echo "$as_me:13586: result: $TERMINFO_CAPS" >&5
13587 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13588
13589 ###   use option --with-chtype to override chtype's type
13590 echo "$as_me:13590: checking for type of chtype" >&5
13591 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13592
13593 # Check whether --with-chtype or --without-chtype was given.
13594 if test "${with_chtype+set}" = set; then
13595   withval="$with_chtype"
13596   NCURSES_CHTYPE="$withval"
13597 else
13598   NCURSES_CHTYPE=$cf_dft_chtype
13599 fi;
13600 echo "$as_me:13600: result: $NCURSES_CHTYPE" >&5
13601 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13602
13603 ###   use option --with-ospeed to override ospeed's type
13604 echo "$as_me:13604: checking for type of ospeed" >&5
13605 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13606
13607 # Check whether --with-ospeed or --without-ospeed was given.
13608 if test "${with_ospeed+set}" = set; then
13609   withval="$with_ospeed"
13610   NCURSES_OSPEED="$withval"
13611 else
13612   NCURSES_OSPEED=short
13613 fi;
13614 echo "$as_me:13614: result: $NCURSES_OSPEED" >&5
13615 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13616
13617 ###   use option --with-mmask-t to override mmask_t's type
13618 echo "$as_me:13618: checking for type of mmask_t" >&5
13619 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13620
13621 # Check whether --with-mmask-t or --without-mmask-t was given.
13622 if test "${with_mmask_t+set}" = set; then
13623   withval="$with_mmask_t"
13624   NCURSES_MMASK_T="$withval"
13625 else
13626   NCURSES_MMASK_T=$cf_dft_mmask_t
13627 fi;
13628 echo "$as_me:13628: result: $NCURSES_MMASK_T" >&5
13629 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13630
13631 ###   use option --with-ccharw-max to override CCHARW_MAX size
13632 echo "$as_me:13632: checking for size CCHARW_MAX" >&5
13633 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13634
13635 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13636 if test "${with_ccharw_max+set}" = set; then
13637   withval="$with_ccharw_max"
13638   NCURSES_CCHARW_MAX="$withval"
13639 else
13640   NCURSES_CCHARW_MAX=5
13641 fi;
13642 echo "$as_me:13642: result: $NCURSES_CCHARW_MAX" >&5
13643 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13644
13645 echo "$as_me:13645: checking for ANSI C header files" >&5
13646 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13647 if test "${ac_cv_header_stdc+set}" = set; then
13648   echo $ECHO_N "(cached) $ECHO_C" >&6
13649 else
13650   cat >"conftest.$ac_ext" <<_ACEOF
13651 #line 13651 "configure"
13652 #include "confdefs.h"
13653 #include <stdlib.h>
13654 #include <stdarg.h>
13655 #include <string.h>
13656 #include <float.h>
13657
13658 _ACEOF
13659 if { (eval echo "$as_me:13659: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13660   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13661   ac_status=$?
13662   $EGREP -v '^ *\+' conftest.er1 >conftest.err
13663   rm -f conftest.er1
13664   cat conftest.err >&5
13665   echo "$as_me:13665: \$? = $ac_status" >&5
13666   (exit "$ac_status"); } >/dev/null; then
13667   if test -s conftest.err; then
13668     ac_cpp_err=$ac_c_preproc_warn_flag
13669   else
13670     ac_cpp_err=
13671   fi
13672 else
13673   ac_cpp_err=yes
13674 fi
13675 if test -z "$ac_cpp_err"; then
13676   ac_cv_header_stdc=yes
13677 else
13678   echo "$as_me: failed program was:" >&5
13679   cat "conftest.$ac_ext" >&5
13680   ac_cv_header_stdc=no
13681 fi
13682 rm -f conftest.err "conftest.$ac_ext"
13683
13684 if test $ac_cv_header_stdc = yes; then
13685   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13686   cat >"conftest.$ac_ext" <<_ACEOF
13687 #line 13687 "configure"
13688 #include "confdefs.h"
13689 #include <string.h>
13690
13691 _ACEOF
13692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13693   $EGREP "memchr" >/dev/null 2>&1; then
13694   :
13695 else
13696   ac_cv_header_stdc=no
13697 fi
13698 rm -rf conftest*
13699
13700 fi
13701
13702 if test $ac_cv_header_stdc = yes; then
13703   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13704   cat >"conftest.$ac_ext" <<_ACEOF
13705 #line 13705 "configure"
13706 #include "confdefs.h"
13707 #include <stdlib.h>
13708
13709 _ACEOF
13710 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13711   $EGREP "free" >/dev/null 2>&1; then
13712   :
13713 else
13714   ac_cv_header_stdc=no
13715 fi
13716 rm -rf conftest*
13717
13718 fi
13719
13720 if test $ac_cv_header_stdc = yes; then
13721   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13722   if test "$cross_compiling" = yes; then
13723   :
13724 else
13725   cat >"conftest.$ac_ext" <<_ACEOF
13726 #line 13726 "configure"
13727 #include "confdefs.h"
13728 #include <ctype.h>
13729 #if ((' ' & 0x0FF) == 0x020)
13730 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13731 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13732 #else
13733 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13734                      || ('j' <= (c) && (c) <= 'r') \
13735                      || ('s' <= (c) && (c) <= 'z'))
13736 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13737 #endif
13738
13739 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13740 int
13741 main (void)
13742 {
13743   int i;
13744   for (i = 0; i < 256; i++)
13745     if (XOR (islower (i), ISLOWER (i))
13746         || toupper (i) != TOUPPER (i))
13747       $ac_main_return(2);
13748   $ac_main_return (0);
13749 }
13750 _ACEOF
13751 rm -f "conftest$ac_exeext"
13752 if { (eval echo "$as_me:13752: \"$ac_link\"") >&5
13753   (eval $ac_link) 2>&5
13754   ac_status=$?
13755   echo "$as_me:13755: \$? = $ac_status" >&5
13756   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13757   { (eval echo "$as_me:13757: \"$ac_try\"") >&5
13758   (eval $ac_try) 2>&5
13759   ac_status=$?
13760   echo "$as_me:13760: \$? = $ac_status" >&5
13761   (exit "$ac_status"); }; }; then
13762   :
13763 else
13764   echo "$as_me: program exited with status $ac_status" >&5
13765 echo "$as_me: failed program was:" >&5
13766 cat "conftest.$ac_ext" >&5
13767 ac_cv_header_stdc=no
13768 fi
13769 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
13770 fi
13771 fi
13772 fi
13773 echo "$as_me:13773: result: $ac_cv_header_stdc" >&5
13774 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13775 if test $ac_cv_header_stdc = yes; then
13776
13777 cat >>confdefs.h <<\EOF
13778 #define STDC_HEADERS 1
13779 EOF
13780
13781 fi
13782
13783 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13784
13785 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13786                   inttypes.h stdint.h unistd.h
13787 do
13788 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13789 echo "$as_me:13789: checking for $ac_header" >&5
13790 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13791 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13792   echo $ECHO_N "(cached) $ECHO_C" >&6
13793 else
13794   cat >"conftest.$ac_ext" <<_ACEOF
13795 #line 13795 "configure"
13796 #include "confdefs.h"
13797 $ac_includes_default
13798 #include <$ac_header>
13799 _ACEOF
13800 rm -f "conftest.$ac_objext"
13801 if { (eval echo "$as_me:13801: \"$ac_compile\"") >&5
13802   (eval $ac_compile) 2>&5
13803   ac_status=$?
13804   echo "$as_me:13804: \$? = $ac_status" >&5
13805   (exit "$ac_status"); } &&
13806          { ac_try='test -s "conftest.$ac_objext"'
13807   { (eval echo "$as_me:13807: \"$ac_try\"") >&5
13808   (eval $ac_try) 2>&5
13809   ac_status=$?
13810   echo "$as_me:13810: \$? = $ac_status" >&5
13811   (exit "$ac_status"); }; }; then
13812   eval "$as_ac_Header=yes"
13813 else
13814   echo "$as_me: failed program was:" >&5
13815 cat "conftest.$ac_ext" >&5
13816 eval "$as_ac_Header=no"
13817 fi
13818 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13819 fi
13820 echo "$as_me:13820: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13821 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13822 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13823   cat >>confdefs.h <<EOF
13824 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13825 EOF
13826
13827 fi
13828 done
13829
13830 echo "$as_me:13830: checking for signed char" >&5
13831 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13832 if test "${ac_cv_type_signed_char+set}" = set; then
13833   echo $ECHO_N "(cached) $ECHO_C" >&6
13834 else
13835   cat >"conftest.$ac_ext" <<_ACEOF
13836 #line 13836 "configure"
13837 #include "confdefs.h"
13838 $ac_includes_default
13839 int
13840 main (void)
13841 {
13842 if ((signed char *) 0)
13843   return 0;
13844 if (sizeof (signed char))
13845   return 0;
13846   ;
13847   return 0;
13848 }
13849 _ACEOF
13850 rm -f "conftest.$ac_objext"
13851 if { (eval echo "$as_me:13851: \"$ac_compile\"") >&5
13852   (eval $ac_compile) 2>&5
13853   ac_status=$?
13854   echo "$as_me:13854: \$? = $ac_status" >&5
13855   (exit "$ac_status"); } &&
13856          { ac_try='test -s "conftest.$ac_objext"'
13857   { (eval echo "$as_me:13857: \"$ac_try\"") >&5
13858   (eval $ac_try) 2>&5
13859   ac_status=$?
13860   echo "$as_me:13860: \$? = $ac_status" >&5
13861   (exit "$ac_status"); }; }; then
13862   ac_cv_type_signed_char=yes
13863 else
13864   echo "$as_me: failed program was:" >&5
13865 cat "conftest.$ac_ext" >&5
13866 ac_cv_type_signed_char=no
13867 fi
13868 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13869 fi
13870 echo "$as_me:13870: result: $ac_cv_type_signed_char" >&5
13871 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13872
13873 echo "$as_me:13873: checking size of signed char" >&5
13874 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13875 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13876   echo $ECHO_N "(cached) $ECHO_C" >&6
13877 else
13878   if test "$ac_cv_type_signed_char" = yes; then
13879   if test "$cross_compiling" = yes; then
13880   # Depending upon the size, compute the lo and hi bounds.
13881 cat >"conftest.$ac_ext" <<_ACEOF
13882 #line 13882 "configure"
13883 #include "confdefs.h"
13884 $ac_includes_default
13885 int
13886 main (void)
13887 {
13888 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13889   ;
13890   return 0;
13891 }
13892 _ACEOF
13893 rm -f "conftest.$ac_objext"
13894 if { (eval echo "$as_me:13894: \"$ac_compile\"") >&5
13895   (eval $ac_compile) 2>&5
13896   ac_status=$?
13897   echo "$as_me:13897: \$? = $ac_status" >&5
13898   (exit "$ac_status"); } &&
13899          { ac_try='test -s "conftest.$ac_objext"'
13900   { (eval echo "$as_me:13900: \"$ac_try\"") >&5
13901   (eval $ac_try) 2>&5
13902   ac_status=$?
13903   echo "$as_me:13903: \$? = $ac_status" >&5
13904   (exit "$ac_status"); }; }; then
13905   ac_lo=0 ac_mid=0
13906   while :; do
13907     cat >"conftest.$ac_ext" <<_ACEOF
13908 #line 13908 "configure"
13909 #include "confdefs.h"
13910 $ac_includes_default
13911 int
13912 main (void)
13913 {
13914 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13915   ;
13916   return 0;
13917 }
13918 _ACEOF
13919 rm -f "conftest.$ac_objext"
13920 if { (eval echo "$as_me:13920: \"$ac_compile\"") >&5
13921   (eval $ac_compile) 2>&5
13922   ac_status=$?
13923   echo "$as_me:13923: \$? = $ac_status" >&5
13924   (exit "$ac_status"); } &&
13925          { ac_try='test -s "conftest.$ac_objext"'
13926   { (eval echo "$as_me:13926: \"$ac_try\"") >&5
13927   (eval $ac_try) 2>&5
13928   ac_status=$?
13929   echo "$as_me:13929: \$? = $ac_status" >&5
13930   (exit "$ac_status"); }; }; then
13931   ac_hi=$ac_mid; break
13932 else
13933   echo "$as_me: failed program was:" >&5
13934 cat "conftest.$ac_ext" >&5
13935 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
13936 fi
13937 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13938   done
13939 else
13940   echo "$as_me: failed program was:" >&5
13941 cat "conftest.$ac_ext" >&5
13942 ac_hi=-1 ac_mid=-1
13943   while :; do
13944     cat >"conftest.$ac_ext" <<_ACEOF
13945 #line 13945 "configure"
13946 #include "confdefs.h"
13947 $ac_includes_default
13948 int
13949 main (void)
13950 {
13951 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13952   ;
13953   return 0;
13954 }
13955 _ACEOF
13956 rm -f "conftest.$ac_objext"
13957 if { (eval echo "$as_me:13957: \"$ac_compile\"") >&5
13958   (eval $ac_compile) 2>&5
13959   ac_status=$?
13960   echo "$as_me:13960: \$? = $ac_status" >&5
13961   (exit "$ac_status"); } &&
13962          { ac_try='test -s "conftest.$ac_objext"'
13963   { (eval echo "$as_me:13963: \"$ac_try\"") >&5
13964   (eval $ac_try) 2>&5
13965   ac_status=$?
13966   echo "$as_me:13966: \$? = $ac_status" >&5
13967   (exit "$ac_status"); }; }; then
13968   ac_lo=$ac_mid; break
13969 else
13970   echo "$as_me: failed program was:" >&5
13971 cat "conftest.$ac_ext" >&5
13972 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
13973 fi
13974 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13975   done
13976 fi
13977 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13978 # Binary search between lo and hi bounds.
13979 while test "x$ac_lo" != "x$ac_hi"; do
13980   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
13981   cat >"conftest.$ac_ext" <<_ACEOF
13982 #line 13982 "configure"
13983 #include "confdefs.h"
13984 $ac_includes_default
13985 int
13986 main (void)
13987 {
13988 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13989   ;
13990   return 0;
13991 }
13992 _ACEOF
13993 rm -f "conftest.$ac_objext"
13994 if { (eval echo "$as_me:13994: \"$ac_compile\"") >&5
13995   (eval $ac_compile) 2>&5
13996   ac_status=$?
13997   echo "$as_me:13997: \$? = $ac_status" >&5
13998   (exit "$ac_status"); } &&
13999          { ac_try='test -s "conftest.$ac_objext"'
14000   { (eval echo "$as_me:14000: \"$ac_try\"") >&5
14001   (eval $ac_try) 2>&5
14002   ac_status=$?
14003   echo "$as_me:14003: \$? = $ac_status" >&5
14004   (exit "$ac_status"); }; }; then
14005   ac_hi=$ac_mid
14006 else
14007   echo "$as_me: failed program was:" >&5
14008 cat "conftest.$ac_ext" >&5
14009 ac_lo=`expr "$ac_mid" + 1`
14010 fi
14011 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14012 done
14013 ac_cv_sizeof_signed_char=$ac_lo
14014 else
14015   if test "$cross_compiling" = yes; then
14016   { { echo "$as_me:14016: error: cannot run test program while cross compiling" >&5
14017 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14018    { (exit 1); exit 1; }; }
14019 else
14020   cat >"conftest.$ac_ext" <<_ACEOF
14021 #line 14021 "configure"
14022 #include "confdefs.h"
14023 $ac_includes_default
14024 int
14025 main (void)
14026 {
14027 FILE *f = fopen ("conftest.val", "w");
14028 if (!f)
14029   $ac_main_return (1);
14030 fprintf (f, "%d", (sizeof (signed char)));
14031 fclose (f);
14032   ;
14033   return 0;
14034 }
14035 _ACEOF
14036 rm -f "conftest$ac_exeext"
14037 if { (eval echo "$as_me:14037: \"$ac_link\"") >&5
14038   (eval $ac_link) 2>&5
14039   ac_status=$?
14040   echo "$as_me:14040: \$? = $ac_status" >&5
14041   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14042   { (eval echo "$as_me:14042: \"$ac_try\"") >&5
14043   (eval $ac_try) 2>&5
14044   ac_status=$?
14045   echo "$as_me:14045: \$? = $ac_status" >&5
14046   (exit "$ac_status"); }; }; then
14047   ac_cv_sizeof_signed_char=`cat conftest.val`
14048 else
14049   echo "$as_me: program exited with status $ac_status" >&5
14050 echo "$as_me: failed program was:" >&5
14051 cat "conftest.$ac_ext" >&5
14052 fi
14053 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14054 fi
14055 fi
14056 rm -f conftest.val
14057 else
14058   ac_cv_sizeof_signed_char=0
14059 fi
14060 fi
14061 echo "$as_me:14061: result: $ac_cv_sizeof_signed_char" >&5
14062 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14063 cat >>confdefs.h <<EOF
14064 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14065 EOF
14066
14067 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14068         NCURSES_SBOOL="signed char"
14069 else
14070         NCURSES_SBOOL="char"
14071 fi
14072 echo "$as_me:14072: checking if you want to use signed Boolean array in term.h" >&5
14073 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14074
14075 # Check whether --enable-signed-char or --disable-signed-char was given.
14076 if test "${enable_signed_char+set}" = set; then
14077   enableval="$enable_signed_char"
14078   with_signed_char=$enableval
14079 else
14080   with_signed_char=no
14081 fi;
14082 echo "$as_me:14082: result: $with_signed_char" >&5
14083 echo "${ECHO_T}$with_signed_char" >&6
14084 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14085
14086 ###   use option --with-tparm-arg to override tparm's argument type
14087 echo "$as_me:14087: checking for type of tparm args" >&5
14088 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14089
14090 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14091 if test "${with_tparm_arg+set}" = set; then
14092   withval="$with_tparm_arg"
14093   NCURSES_TPARM_ARG="$withval"
14094 else
14095   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14096 fi;
14097 echo "$as_me:14097: result: $NCURSES_TPARM_ARG" >&5
14098 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14099
14100 ### Enable compiling-in rcs id's
14101 echo "$as_me:14101: checking if RCS identifiers should be compiled-in" >&5
14102 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14103
14104 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14105 if test "${with_rcs_ids+set}" = set; then
14106   withval="$with_rcs_ids"
14107   with_rcs_ids=$withval
14108 else
14109   with_rcs_ids=no
14110 fi;
14111 echo "$as_me:14111: result: $with_rcs_ids" >&5
14112 echo "${ECHO_T}$with_rcs_ids" >&6
14113 test "x$with_rcs_ids" = xyes &&
14114 cat >>confdefs.h <<\EOF
14115 #define USE_RCS_IDS 1
14116 EOF
14117
14118 ###############################################################################
14119
14120 echo "$as_me:14120: checking format of man-pages" >&5
14121 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14122
14123 # Check whether --with-manpage-format or --without-manpage-format was given.
14124 if test "${with_manpage_format+set}" = set; then
14125   withval="$with_manpage_format"
14126   MANPAGE_FORMAT=$withval
14127 else
14128   MANPAGE_FORMAT=unknown
14129 fi;
14130
14131 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14132 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14133
14134 cf_unknown=
14135
14136 case "$MANPAGE_FORMAT" in
14137 (unknown)
14138         if test -z "$MANPATH" ; then
14139                 MANPATH="/usr/man:/usr/share/man"
14140         fi
14141
14142         # look for the 'date' man-page (it's most likely to be installed!)
14143         MANPAGE_FORMAT=
14144         cf_preform="no"
14145         cf_catonly="yes"
14146         cf_example="date"
14147
14148         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14149         for cf_dir in $MANPATH; do
14150                 test -z "$cf_dir" && cf_dir=/usr/man
14151                 for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
14152                 do
14153                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14154                         if test "x$cf_test" = "x$cf_name" ; then
14155
14156                                 case "$cf_name" in
14157                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14158                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14159                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14160                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14161                                 esac
14162
14163                                 case "$cf_name" in
14164                                 ($cf_dir/man*)
14165                                         cf_catonly=no
14166                                         ;;
14167                                 ($cf_dir/cat*)
14168                                         cf_preform=yes
14169                                         ;;
14170                                 esac
14171                                 break
14172                         fi
14173
14174                         # if we found a match in either man* or cat*, stop looking
14175                         if test -n "$MANPAGE_FORMAT" ; then
14176                                 cf_found=no
14177                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14178                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14179                                 case "$cf_name" in
14180                                 ($cf_dir/cat*)
14181                                         cf_found=yes
14182                                         ;;
14183                                 esac
14184                                 test "$cf_found" = yes && break
14185                         fi
14186                 done
14187                 # only check the first directory in $MANPATH where we find manpages
14188                 if test -n "$MANPAGE_FORMAT" ; then
14189                         break
14190                 fi
14191         done
14192         # if we did not find the example, just assume it is normal
14193         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14194         IFS="$ac_save_ifs"
14195         ;;
14196 (*)
14197         for cf_option in $MANPAGE_FORMAT; do
14198         case "$cf_option" in
14199         (gzip|compress|BSDI|normal|formatted|catonly)
14200                 ;;
14201         (*)
14202                 cf_unknown="$cf_unknown $cf_option"
14203                 ;;
14204         esac
14205         done
14206         ;;
14207 esac
14208
14209 echo "$as_me:14209: result: $MANPAGE_FORMAT" >&5
14210 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14211 if test -n "$cf_unknown" ; then
14212         { echo "$as_me:14212: WARNING: Unexpected manpage-format $cf_unknown" >&5
14213 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14214 fi
14215
14216 echo "$as_me:14216: checking for manpage renaming" >&5
14217 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14218
14219 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14220 if test "${with_manpage_renames+set}" = set; then
14221   withval="$with_manpage_renames"
14222   MANPAGE_RENAMES=$withval
14223 else
14224   MANPAGE_RENAMES=yes
14225 fi;
14226
14227 case ".$MANPAGE_RENAMES" in
14228 (.no)
14229         ;;
14230 (.|.yes)
14231         # Debian 'man' program?
14232         if test -f /etc/debian_version ; then
14233                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14234         else
14235                 MANPAGE_RENAMES=no
14236         fi
14237         ;;
14238 esac
14239
14240 if test "$MANPAGE_RENAMES" != no ; then
14241         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14242                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14243         elif test ! -f "$MANPAGE_RENAMES" ; then
14244                 { { echo "$as_me:14244: error: not a filename: $MANPAGE_RENAMES" >&5
14245 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14246    { (exit 1); exit 1; }; }
14247         fi
14248
14249         test ! -d man && mkdir man
14250
14251         # Construct a sed-script to perform renaming within man-pages
14252         if test -n "$MANPAGE_RENAMES" ; then
14253                 test ! -d man && mkdir man
14254                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14255         fi
14256 fi
14257
14258 echo "$as_me:14258: result: $MANPAGE_RENAMES" >&5
14259 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14260
14261 echo "$as_me:14261: checking if manpage aliases will be installed" >&5
14262 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14263
14264 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14265 if test "${with_manpage_aliases+set}" = set; then
14266   withval="$with_manpage_aliases"
14267   MANPAGE_ALIASES=$withval
14268 else
14269   MANPAGE_ALIASES=yes
14270 fi;
14271
14272 echo "$as_me:14272: result: $MANPAGE_ALIASES" >&5
14273 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14274
14275 case "x$LN_S" in
14276 (xln*)
14277         cf_use_symlinks=yes
14278         ;;
14279 (*)
14280         cf_use_symlinks=no
14281         ;;
14282 esac
14283
14284 MANPAGE_SYMLINKS=no
14285 if test "$MANPAGE_ALIASES" = yes ; then
14286 echo "$as_me:14286: checking if manpage symlinks should be used" >&5
14287 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14288
14289 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14290 if test "${with_manpage_symlinks+set}" = set; then
14291   withval="$with_manpage_symlinks"
14292   MANPAGE_SYMLINKS=$withval
14293 else
14294   MANPAGE_SYMLINKS=$cf_use_symlinks
14295 fi;
14296
14297 if test "$$cf_use_symlinks" = no; then
14298 if test "$MANPAGE_SYMLINKS" = yes ; then
14299         { echo "$as_me:14299: WARNING: cannot make symlinks" >&5
14300 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14301         MANPAGE_SYMLINKS=no
14302 fi
14303 fi
14304
14305 echo "$as_me:14305: result: $MANPAGE_SYMLINKS" >&5
14306 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14307 fi
14308
14309 echo "$as_me:14309: checking for manpage tbl" >&5
14310 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14311
14312 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14313 if test "${with_manpage_tbl+set}" = set; then
14314   withval="$with_manpage_tbl"
14315   MANPAGE_TBL=$withval
14316 else
14317   MANPAGE_TBL=no
14318 fi;
14319
14320 echo "$as_me:14320: result: $MANPAGE_TBL" >&5
14321 echo "${ECHO_T}$MANPAGE_TBL" >&6
14322
14323 if test "$prefix" = "NONE" ; then
14324         cf_prefix="$ac_default_prefix"
14325 else
14326         cf_prefix="$prefix"
14327 fi
14328
14329 case "$MANPAGE_FORMAT" in
14330 (*catonly*)
14331         cf_format=yes
14332         cf_inboth=no
14333         ;;
14334 (*formatted*)
14335         cf_format=yes
14336         cf_inboth=yes
14337         ;;
14338 (*)
14339         cf_format=no
14340         cf_inboth=no
14341         ;;
14342 esac
14343
14344 test ! -d man && mkdir man
14345
14346 cf_so_strip=
14347 cf_compress=
14348 case "$MANPAGE_FORMAT" in
14349 (*compress*)
14350         cf_so_strip="Z"
14351         cf_compress=compress
14352         ;;
14353 (*gzip*)
14354         cf_so_strip="gz"
14355         cf_compress=gzip
14356         ;;
14357 esac
14358
14359 cf_edit_man=./edit_man.sh
14360 cf_man_alias=`pwd`/man_alias.sed
14361
14362 cat >$cf_edit_man <<CF_EOF
14363 #! $SHELL
14364 # this script is generated by the configure-script CF_MAN_PAGES macro.
14365
14366 prefix="$cf_prefix"
14367 datarootdir="$datarootdir"
14368 datadir="$datadir"
14369
14370 NCURSES_MAJOR="$NCURSES_MAJOR"
14371 NCURSES_MINOR="$NCURSES_MINOR"
14372 NCURSES_PATCH="$NCURSES_PATCH"
14373
14374 NCURSES_OSPEED="$NCURSES_OSPEED"
14375 TERMINFO="$TERMINFO"
14376
14377 INSTALL="$INSTALL"
14378 INSTALL_DATA="$INSTALL_DATA"
14379
14380 transform="$program_transform_name"
14381
14382 TMP=\${TMPDIR:=/tmp}/man\$\$
14383 trap "rm -f \$TMP" 0 1 2 3 15
14384
14385 form=\$1
14386 shift || exit 1
14387
14388 verb=\$1
14389 shift || exit 1
14390
14391 mandir=\$1
14392 shift || exit 1
14393
14394 srcdir=\$1
14395 top_srcdir=\$srcdir/..
14396 shift || exit 1
14397
14398 if test "\$form" = normal ; then
14399         if test "$cf_format" = yes ; then
14400         if test "$cf_inboth" = no ; then
14401                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14402                 exit $?
14403         fi
14404         fi
14405         cf_subdir=\$mandir/man
14406         cf_tables=$MANPAGE_TBL
14407 else
14408         cf_subdir=\$mandir/cat
14409         cf_tables=yes
14410 fi
14411
14412 # process the list of source-files
14413 for i in "\$@" ; do
14414 case \$i in
14415 (*.orig|*.rej) ;;
14416 (*.[0-9]*)
14417         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14418         if test "\$verb" = installing ; then
14419         if test ! -d "\$cf_subdir\${section}" ; then
14420                 mkdir -p "\$cf_subdir\$section"
14421         fi
14422         fi
14423
14424         # replace variables in man page
14425         if test ! -f "$cf_man_alias" ; then
14426 cat >>$cf_man_alias <<-CF_EOF2
14427                 s,@DATADIR@,\$datadir,g
14428                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14429                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14430                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14431                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14432                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14433                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14434 CF_EOF
14435
14436         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14437         do
14438                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14439                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14440 cat >>$cf_edit_man <<-CF_EOF
14441                 s,@$cf_NAME@,$cf_name,g
14442 CF_EOF
14443         done
14444
14445 cat >>$cf_edit_man <<CF_EOF
14446 CF_EOF2
14447                 echo "...made $cf_man_alias"
14448         fi
14449
14450         aliases=
14451         cf_source=\`basename "\$i"\`
14452         inalias=\$cf_source
14453         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14454         if test ! -f "\$inalias" ; then
14455                 echo ".. skipped \$cf_source"
14456                 continue
14457         fi
14458 CF_EOF
14459
14460 if test "$MANPAGE_ALIASES" != no ; then
14461 cat >>$cf_edit_man <<CF_EOF
14462         nCurses=ignore.3x
14463         test "$with_curses_h" = yes && nCurses=ncurses.3x
14464         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14465 CF_EOF
14466 fi
14467
14468 if test "$MANPAGE_RENAMES" = no ; then
14469 cat >>$cf_edit_man <<CF_EOF
14470         # perform program transformations for section 1 man pages
14471         if test \$section = 1 ; then
14472                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14473         else
14474                 cf_target=\$cf_subdir\${section}/\$cf_source
14475         fi
14476 CF_EOF
14477 else
14478 cat >>$cf_edit_man <<CF_EOF
14479         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14480         if test -z "\$cf_target" ; then
14481                 echo "? missing rename for \$cf_source"
14482                 cf_target="\$cf_source"
14483         fi
14484         cf_target="\$cf_subdir\${section}/\${cf_target}"
14485
14486 CF_EOF
14487 fi
14488
14489 cat >>$cf_edit_man <<CF_EOF
14490         sed     -f "$cf_man_alias" \\
14491 CF_EOF
14492
14493 if test -f "$MANPAGE_RENAMES" ; then
14494 cat >>$cf_edit_man <<CF_EOF
14495                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14496 CF_EOF
14497 else
14498 cat >>$cf_edit_man <<CF_EOF
14499                 < "\$i" >\$TMP
14500 CF_EOF
14501 fi
14502
14503 cat >>$cf_edit_man <<CF_EOF
14504 if test \$cf_tables = yes ; then
14505         tbl \$TMP >\$TMP.out
14506         mv \$TMP.out \$TMP
14507 fi
14508 CF_EOF
14509
14510 if test "$with_overwrite" != yes ; then
14511 cat >>$cf_edit_man <<CF_EOF
14512         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14513         mv \$TMP.out \$TMP
14514 CF_EOF
14515 fi
14516
14517 if test "$with_curses_h" != yes ; then
14518 cat >>$cf_edit_man <<CF_EOF
14519         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14520         mv \$TMP.out \$TMP
14521 CF_EOF
14522 fi
14523
14524 cat >>$cf_edit_man <<CF_EOF
14525         if test "\$form" = format ; then
14526                 nroff -man \$TMP >\$TMP.out
14527                 mv \$TMP.out \$TMP
14528         fi
14529 CF_EOF
14530
14531 if test -n "$cf_compress" ; then
14532 cat >>$cf_edit_man <<CF_EOF
14533         if test "\$verb" = installing ; then
14534         if ( "$cf_compress" -f \$TMP )
14535         then
14536                 mv \$TMP.$cf_so_strip \$TMP
14537         fi
14538         fi
14539         cf_target="\$cf_target.$cf_so_strip"
14540 CF_EOF
14541 fi
14542
14543 case "$MANPAGE_FORMAT" in
14544 (*BSDI*)
14545 cat >>$cf_edit_man <<CF_EOF
14546         if test "\$form" = format ; then
14547                 # BSDI installs only .0 suffixes in the cat directories
14548                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14549         fi
14550 CF_EOF
14551   ;;
14552 esac
14553
14554 cat >>$cf_edit_man <<CF_EOF
14555         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14556         if test "\$verb" = installing ; then
14557                 echo "\$verb \$cf_target"
14558                 \$INSTALL_DATA \$TMP "\$cf_target"
14559                 test -d "\$cf_subdir\${section}" &&
14560                 test -n "\$aliases" && (
14561                         cd "\$cf_subdir\${section}" && (
14562                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14563                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14564                                 cf_target=\`basename "\$cf_target"\`
14565                                 for cf_alias in \$aliases
14566                                 do
14567                                         if test "\$section" = 1 ; then
14568                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14569                                         fi
14570
14571                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14572                                                 if test -f "\$cf_alias\${suffix}" ; then
14573                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14574                                                         then
14575                                                                 continue
14576                                                         fi
14577                                                 fi
14578                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14579 CF_EOF
14580 case "x$LN_S" in
14581 (*-f)
14582 cat >>$cf_edit_man <<CF_EOF
14583                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14584 CF_EOF
14585         ;;
14586 (*)
14587 cat >>$cf_edit_man <<CF_EOF
14588                                                 rm -f "\$cf_alias\${suffix}"
14589                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14590 CF_EOF
14591         ;;
14592 esac
14593 cat >>$cf_edit_man <<CF_EOF
14594                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14595                                                 echo ".so \$cf_source" >\$TMP
14596 CF_EOF
14597 if test -n "$cf_compress" ; then
14598 cat >>$cf_edit_man <<CF_EOF
14599                                                 if test -n "$cf_so_strip" ; then
14600                                                         "$cf_compress" -f \$TMP
14601                                                         mv \$TMP.$cf_so_strip \$TMP
14602                                                 fi
14603 CF_EOF
14604 fi
14605 cat >>$cf_edit_man <<CF_EOF
14606                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14607                                                 rm -f "\$cf_alias\${suffix}"
14608                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14609                                         fi
14610                                 done
14611                         )
14612                 )
14613         elif test "\$verb" = removing ; then
14614                 test -f "\$cf_target" && (
14615                         echo "\$verb \$cf_target"
14616                         rm -f "\$cf_target"
14617                 )
14618                 test -d "\$cf_subdir\${section}" &&
14619                 test -n "\$aliases" && (
14620                         cd "\$cf_subdir\${section}" && (
14621                                 for cf_alias in \$aliases
14622                                 do
14623                                         if test "\$section" = 1 ; then
14624                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14625                                         fi
14626
14627                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14628                                         rm -f "\$cf_alias\${suffix}"
14629                                 done
14630                         )
14631                 )
14632         else
14633 #               echo ".hy 0"
14634                 cat \$TMP
14635         fi
14636         ;;
14637 esac
14638 done
14639
14640 if test "$cf_inboth" = yes ; then
14641 if test "\$form" != format ; then
14642         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14643 fi
14644 fi
14645
14646 exit 0
14647 CF_EOF
14648 chmod 755 "$cf_edit_man"
14649
14650 ###############################################################################
14651
14652 ### Note that some functions (such as const) are normally disabled anyway.
14653 echo "$as_me:14653: checking if you want to build with function extensions" >&5
14654 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14655
14656 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14657 if test "${enable_ext_funcs+set}" = set; then
14658   enableval="$enable_ext_funcs"
14659   with_ext_funcs=$enableval
14660 else
14661   with_ext_funcs=yes
14662 fi;
14663 echo "$as_me:14663: result: $with_ext_funcs" >&5
14664 echo "${ECHO_T}$with_ext_funcs" >&6
14665 if test "x$with_ext_funcs" = xyes ; then
14666         NCURSES_EXT_FUNCS=1
14667
14668 cat >>confdefs.h <<\EOF
14669 #define NCURSES_EXT_FUNCS 1
14670 EOF
14671
14672 cat >>confdefs.h <<\EOF
14673 #define HAVE_ASSUME_DEFAULT_COLORS 1
14674 EOF
14675
14676 cat >>confdefs.h <<\EOF
14677 #define HAVE_CURSES_VERSION 1
14678 EOF
14679
14680 cat >>confdefs.h <<\EOF
14681 #define HAVE_HAS_KEY 1
14682 EOF
14683
14684 cat >>confdefs.h <<\EOF
14685 #define HAVE_RESIZETERM 1
14686 EOF
14687
14688 cat >>confdefs.h <<\EOF
14689 #define HAVE_RESIZE_TERM 1
14690 EOF
14691
14692 cat >>confdefs.h <<\EOF
14693 #define HAVE_TERM_ENTRY_H 1
14694 EOF
14695
14696 cat >>confdefs.h <<\EOF
14697 #define HAVE_USE_DEFAULT_COLORS 1
14698 EOF
14699
14700 cat >>confdefs.h <<\EOF
14701 #define HAVE_USE_EXTENDED_NAMES 1
14702 EOF
14703
14704 cat >>confdefs.h <<\EOF
14705 #define HAVE_USE_SCREEN 1
14706 EOF
14707
14708 cat >>confdefs.h <<\EOF
14709 #define HAVE_USE_WINDOW 1
14710 EOF
14711
14712 cat >>confdefs.h <<\EOF
14713 #define HAVE_WRESIZE 1
14714 EOF
14715
14716         GENERATED_EXT_FUNCS=generated
14717         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14718 else
14719         NCURSES_EXT_FUNCS=0
14720         GENERATED_EXT_FUNCS=
14721 fi
14722
14723 echo "$as_me:14723: checking if you want to build with SCREEN extensions" >&5
14724 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14725
14726 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14727 if test "${enable_sp_funcs+set}" = set; then
14728   enableval="$enable_sp_funcs"
14729   with_sp_funcs=$enableval
14730 else
14731   with_sp_funcs=$cf_dft_ext_spfuncs
14732 fi;
14733 echo "$as_me:14733: result: $with_sp_funcs" >&5
14734 echo "${ECHO_T}$with_sp_funcs" >&6
14735 if test "x$with_sp_funcs" = xyes ; then
14736         NCURSES_SP_FUNCS=1
14737
14738 cat >>confdefs.h <<\EOF
14739 #define NCURSES_SP_FUNCS 1
14740 EOF
14741
14742 cat >>confdefs.h <<\EOF
14743 #define HAVE_TPUTS_SP 1
14744 EOF
14745
14746         GENERATED_SP_FUNCS=generated
14747 else
14748         NCURSES_SP_FUNCS=0
14749         GENERATED_SP_FUNCS=
14750 fi
14751
14752 echo "$as_me:14752: checking if you want to build with terminal-driver" >&5
14753 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14754
14755 # Check whether --enable-term-driver or --disable-term-driver was given.
14756 if test "${enable_term_driver+set}" = set; then
14757   enableval="$enable_term_driver"
14758   with_term_driver=$enableval
14759 else
14760   with_term_driver=no
14761 fi;
14762 echo "$as_me:14762: result: $with_term_driver" >&5
14763 echo "${ECHO_T}$with_term_driver" >&6
14764 if test "x$with_term_driver" = xyes ; then
14765
14766 cat >>confdefs.h <<\EOF
14767 #define USE_TERM_DRIVER 1
14768 EOF
14769
14770         if test "x$with_termlib" != xno ; then
14771                 { { echo "$as_me:14771: error: The term-driver option conflicts with the termlib option" >&5
14772 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14773    { (exit 1); exit 1; }; }
14774         fi
14775         if test "x$with_sp_funcs" != xyes ; then
14776                 { { echo "$as_me:14776: error: The term-driver option relies upon sp-funcs" >&5
14777 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14778    { (exit 1); exit 1; }; }
14779         fi
14780 fi
14781
14782 ###   use option --enable-const to turn on use of const beyond that in XSI.
14783 echo "$as_me:14783: checking for extended use of const keyword" >&5
14784 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14785
14786 # Check whether --enable-const or --disable-const was given.
14787 if test "${enable_const+set}" = set; then
14788   enableval="$enable_const"
14789   with_ext_const=$enableval
14790 else
14791   with_ext_const=$cf_dft_ext_const
14792 fi;
14793 echo "$as_me:14793: result: $with_ext_const" >&5
14794 echo "${ECHO_T}$with_ext_const" >&6
14795 NCURSES_CONST='/*nothing*/'
14796 if test "x$with_ext_const" = xyes ; then
14797         NCURSES_CONST=const
14798 fi
14799
14800 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14801 echo "$as_me:14801: checking if you want to use extended colors" >&5
14802 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14803
14804 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14805 if test "${enable_ext_colors+set}" = set; then
14806   enableval="$enable_ext_colors"
14807   with_ext_colors=$enableval
14808 else
14809   with_ext_colors=$cf_dft_ext_colors
14810 fi;
14811 echo "$as_me:14811: result: $with_ext_colors" >&5
14812 echo "${ECHO_T}$with_ext_colors" >&6
14813 NCURSES_EXT_COLORS=0
14814 if test "x$with_ext_colors" = xyes ; then
14815         if test "x$with_widec" != xyes ; then
14816                 { echo "$as_me:14816: WARNING: This option applies only to wide-character library" >&5
14817 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14818         else
14819                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14820
14821 if test "${with_abi_version+set}" != set; then
14822         case "$cf_cv_rel_version" in
14823         (5.*)
14824                 cf_cv_rel_version=6.0
14825                 cf_cv_abi_version=6
14826                 { echo "$as_me:14826: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14827 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14828                 ;;
14829         esac
14830 fi
14831
14832                 NCURSES_EXT_COLORS=1
14833
14834 cat >>confdefs.h <<\EOF
14835 #define NCURSES_EXT_COLORS 1
14836 EOF
14837
14838 cat >>confdefs.h <<\EOF
14839 #define HAVE_ALLOC_PAIR 1
14840 EOF
14841
14842 cat >>confdefs.h <<\EOF
14843 #define HAVE_INIT_EXTENDED_COLOR 1
14844 EOF
14845
14846 cat >>confdefs.h <<\EOF
14847 #define HAVE_RESET_COLOR_PAIRS 1
14848 EOF
14849
14850         fi
14851 fi
14852
14853 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14854 echo "$as_me:14854: checking if you want to use extended mouse encoding" >&5
14855 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14856
14857 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14858 if test "${enable_ext_mouse+set}" = set; then
14859   enableval="$enable_ext_mouse"
14860   with_ext_mouse=$enableval
14861 else
14862   with_ext_mouse=$cf_dft_ext_mouse
14863 fi;
14864 echo "$as_me:14864: result: $with_ext_mouse" >&5
14865 echo "${ECHO_T}$with_ext_mouse" >&6
14866 NCURSES_MOUSE_VERSION=1
14867 if test "x$with_ext_mouse" = xyes ; then
14868         NCURSES_MOUSE_VERSION=2
14869
14870 if test "${with_abi_version+set}" != set; then
14871         case "$cf_cv_rel_version" in
14872         (5.*)
14873                 cf_cv_rel_version=6.0
14874                 cf_cv_abi_version=6
14875                 { echo "$as_me:14875: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14876 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14877                 ;;
14878         esac
14879 fi
14880
14881 fi
14882
14883 ###   use option --enable-ext-putwin to turn on extended screendumps
14884 echo "$as_me:14884: checking if you want to use extended putwin/screendump" >&5
14885 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14886
14887 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14888 if test "${enable_ext_putwin+set}" = set; then
14889   enableval="$enable_ext_putwin"
14890   with_ext_putwin=$enableval
14891 else
14892   with_ext_putwin=$cf_dft_ext_putwin
14893 fi;
14894 echo "$as_me:14894: result: $with_ext_putwin" >&5
14895 echo "${ECHO_T}$with_ext_putwin" >&6
14896 if test "x$with_ext_putwin" = xyes ; then
14897
14898 cat >>confdefs.h <<\EOF
14899 #define NCURSES_EXT_PUTWIN 1
14900 EOF
14901
14902 fi
14903
14904 echo "$as_me:14904: checking if you want \$NCURSES_NO_PADDING code" >&5
14905 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14906
14907 # Check whether --enable-no-padding or --disable-no-padding was given.
14908 if test "${enable_no_padding+set}" = set; then
14909   enableval="$enable_no_padding"
14910   with_no_padding=$enableval
14911 else
14912   with_no_padding=$with_ext_funcs
14913 fi;
14914 echo "$as_me:14914: result: $with_no_padding" >&5
14915 echo "${ECHO_T}$with_no_padding" >&6
14916 test "x$with_no_padding" = xyes &&
14917 cat >>confdefs.h <<\EOF
14918 #define NCURSES_NO_PADDING 1
14919 EOF
14920
14921 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14922 echo "$as_me:14922: checking if you want SIGWINCH handler" >&5
14923 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14924
14925 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14926 if test "${enable_sigwinch+set}" = set; then
14927   enableval="$enable_sigwinch"
14928   with_sigwinch=$enableval
14929 else
14930   with_sigwinch=$with_ext_funcs
14931 fi;
14932 echo "$as_me:14932: result: $with_sigwinch" >&5
14933 echo "${ECHO_T}$with_sigwinch" >&6
14934 test "x$with_sigwinch" = xyes &&
14935 cat >>confdefs.h <<\EOF
14936 #define USE_SIGWINCH 1
14937 EOF
14938
14939 ###   use option --enable-tcap-names to allow user to define new capabilities
14940 echo "$as_me:14940: checking if you want user-definable terminal capabilities like termcap" >&5
14941 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14942
14943 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14944 if test "${enable_tcap_names+set}" = set; then
14945   enableval="$enable_tcap_names"
14946   with_tcap_names=$enableval
14947 else
14948   with_tcap_names=$with_ext_funcs
14949 fi;
14950 echo "$as_me:14950: result: $with_tcap_names" >&5
14951 echo "${ECHO_T}$with_tcap_names" >&6
14952 NCURSES_XNAMES=0
14953 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14954
14955 ##############################################################################
14956
14957 echo "$as_me:14957: checking if you want to link with the pthread library" >&5
14958 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14959
14960 # Check whether --with-pthread or --without-pthread was given.
14961 if test "${with_pthread+set}" = set; then
14962   withval="$with_pthread"
14963   with_pthread=$withval
14964 else
14965   with_pthread=no
14966 fi;
14967 echo "$as_me:14967: result: $with_pthread" >&5
14968 echo "${ECHO_T}$with_pthread" >&6
14969
14970 if test "$with_pthread" != no ; then
14971         echo "$as_me:14971: checking for pthread.h" >&5
14972 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14973 if test "${ac_cv_header_pthread_h+set}" = set; then
14974   echo $ECHO_N "(cached) $ECHO_C" >&6
14975 else
14976   cat >"conftest.$ac_ext" <<_ACEOF
14977 #line 14977 "configure"
14978 #include "confdefs.h"
14979 #include <pthread.h>
14980 _ACEOF
14981 if { (eval echo "$as_me:14981: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14982   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14983   ac_status=$?
14984   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14985   rm -f conftest.er1
14986   cat conftest.err >&5
14987   echo "$as_me:14987: \$? = $ac_status" >&5
14988   (exit "$ac_status"); } >/dev/null; then
14989   if test -s conftest.err; then
14990     ac_cpp_err=$ac_c_preproc_warn_flag
14991   else
14992     ac_cpp_err=
14993   fi
14994 else
14995   ac_cpp_err=yes
14996 fi
14997 if test -z "$ac_cpp_err"; then
14998   ac_cv_header_pthread_h=yes
14999 else
15000   echo "$as_me: failed program was:" >&5
15001   cat "conftest.$ac_ext" >&5
15002   ac_cv_header_pthread_h=no
15003 fi
15004 rm -f conftest.err "conftest.$ac_ext"
15005 fi
15006 echo "$as_me:15006: result: $ac_cv_header_pthread_h" >&5
15007 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15008 if test "$ac_cv_header_pthread_h" = yes; then
15009
15010 cat >>confdefs.h <<\EOF
15011 #define HAVE_PTHREADS_H 1
15012 EOF
15013
15014         for cf_lib_pthread in pthread c_r
15015         do
15016             echo "$as_me:15016: checking if we can link with the $cf_lib_pthread library" >&5
15017 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15018             cf_save_LIBS="$LIBS"
15019
15020 cf_add_libs="$LIBS"
15021 # reverse order
15022 cf_add_0lib=
15023 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15024 # filter duplicates
15025 for cf_add_1lib in $cf_add_0lib; do
15026         for cf_add_2lib in $cf_add_libs; do
15027                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15028                         cf_add_1lib=
15029                         break
15030                 fi
15031         done
15032         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15033 done
15034 LIBS="$cf_add_libs"
15035
15036             cat >"conftest.$ac_ext" <<_ACEOF
15037 #line 15037 "configure"
15038 #include "confdefs.h"
15039
15040 #include <pthread.h>
15041
15042 int
15043 main (void)
15044 {
15045
15046                 int rc = pthread_create(0,0,0,0);
15047                 int r2 = pthread_mutexattr_settype(0, 0);
15048
15049   ;
15050   return 0;
15051 }
15052 _ACEOF
15053 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15054 if { (eval echo "$as_me:15054: \"$ac_link\"") >&5
15055   (eval $ac_link) 2>&5
15056   ac_status=$?
15057   echo "$as_me:15057: \$? = $ac_status" >&5
15058   (exit "$ac_status"); } &&
15059          { ac_try='test -s "conftest$ac_exeext"'
15060   { (eval echo "$as_me:15060: \"$ac_try\"") >&5
15061   (eval $ac_try) 2>&5
15062   ac_status=$?
15063   echo "$as_me:15063: \$? = $ac_status" >&5
15064   (exit "$ac_status"); }; }; then
15065   with_pthread=yes
15066 else
15067   echo "$as_me: failed program was:" >&5
15068 cat "conftest.$ac_ext" >&5
15069 with_pthread=no
15070 fi
15071 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15072             LIBS="$cf_save_LIBS"
15073             echo "$as_me:15073: result: $with_pthread" >&5
15074 echo "${ECHO_T}$with_pthread" >&6
15075             test "$with_pthread" = yes && break
15076         done
15077
15078         if test "$with_pthread" = yes ; then
15079
15080 cf_add_libs="$LIBS"
15081 # reverse order
15082 cf_add_0lib=
15083 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15084 # filter duplicates
15085 for cf_add_1lib in $cf_add_0lib; do
15086         for cf_add_2lib in $cf_add_libs; do
15087                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15088                         cf_add_1lib=
15089                         break
15090                 fi
15091         done
15092         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15093 done
15094 LIBS="$cf_add_libs"
15095
15096 cat >>confdefs.h <<\EOF
15097 #define HAVE_LIBPTHREADS 1
15098 EOF
15099
15100         else
15101             { { echo "$as_me:15101: error: Cannot link with pthread library" >&5
15102 echo "$as_me: error: Cannot link with pthread library" >&2;}
15103    { (exit 1); exit 1; }; }
15104         fi
15105
15106 fi
15107
15108 fi
15109
15110 if test "x$with_pthread" != xno; then
15111         echo "$as_me:15111: checking for pthread_kill" >&5
15112 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15113 if test "${ac_cv_func_pthread_kill+set}" = set; then
15114   echo $ECHO_N "(cached) $ECHO_C" >&6
15115 else
15116   cat >"conftest.$ac_ext" <<_ACEOF
15117 #line 15117 "configure"
15118 #include "confdefs.h"
15119 #define pthread_kill autoconf_temporary
15120 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15121 #undef pthread_kill
15122
15123 #ifdef __cplusplus
15124 extern "C"
15125 #endif
15126
15127 /* We use char because int might match the return type of a gcc2
15128    builtin and then its argument prototype would still apply.  */
15129 char pthread_kill (void);
15130
15131 int
15132 main (void)
15133 {
15134
15135 /* The GNU C library defines stubs for functions which it implements
15136     to always fail with ENOSYS.  Some functions are actually named
15137     something starting with __ and the normal name is an alias.  */
15138 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15139 #error found stub for pthread_kill
15140 #endif
15141
15142         return pthread_kill ();
15143   ;
15144   return 0;
15145 }
15146 _ACEOF
15147 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15148 if { (eval echo "$as_me:15148: \"$ac_link\"") >&5
15149   (eval $ac_link) 2>&5
15150   ac_status=$?
15151   echo "$as_me:15151: \$? = $ac_status" >&5
15152   (exit "$ac_status"); } &&
15153          { ac_try='test -s "conftest$ac_exeext"'
15154   { (eval echo "$as_me:15154: \"$ac_try\"") >&5
15155   (eval $ac_try) 2>&5
15156   ac_status=$?
15157   echo "$as_me:15157: \$? = $ac_status" >&5
15158   (exit "$ac_status"); }; }; then
15159   ac_cv_func_pthread_kill=yes
15160 else
15161   echo "$as_me: failed program was:" >&5
15162 cat "conftest.$ac_ext" >&5
15163 ac_cv_func_pthread_kill=no
15164 fi
15165 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15166 fi
15167 echo "$as_me:15167: result: $ac_cv_func_pthread_kill" >&5
15168 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15169 if test "$ac_cv_func_pthread_kill" = yes; then
15170
15171                 echo "$as_me:15171: checking if you want to allow EINTR in wgetch with pthreads" >&5
15172 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15173
15174 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15175 if test "${enable_pthreads_eintr+set}" = set; then
15176   enableval="$enable_pthreads_eintr"
15177   use_pthreads_eintr=$enableval
15178 else
15179   use_pthreads_eintr=no
15180 fi;
15181                 echo "$as_me:15181: result: $use_pthreads_eintr" >&5
15182 echo "${ECHO_T}$use_pthreads_eintr" >&6
15183                 if test "x$use_pthreads_eintr" = xyes ; then
15184
15185 cat >>confdefs.h <<\EOF
15186 #define USE_PTHREADS_EINTR 1
15187 EOF
15188
15189                 fi
15190 fi
15191
15192         echo "$as_me:15192: checking if you want to use weak-symbols for pthreads" >&5
15193 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15194
15195 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15196 if test "${enable_weak_symbols+set}" = set; then
15197   enableval="$enable_weak_symbols"
15198   use_weak_symbols=$enableval
15199 else
15200   use_weak_symbols=no
15201 fi;
15202         echo "$as_me:15202: result: $use_weak_symbols" >&5
15203 echo "${ECHO_T}$use_weak_symbols" >&6
15204         if test "x$use_weak_symbols" = xyes ; then
15205
15206 echo "$as_me:15206: checking if $CC supports weak symbols" >&5
15207 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15208 if test "${cf_cv_weak_symbols+set}" = set; then
15209   echo $ECHO_N "(cached) $ECHO_C" >&6
15210 else
15211
15212 cat >"conftest.$ac_ext" <<_ACEOF
15213 #line 15213 "configure"
15214 #include "confdefs.h"
15215
15216 #include <stdio.h>
15217 int
15218 main (void)
15219 {
15220
15221 #if defined(__GNUC__)
15222 #  if defined __USE_ISOC99
15223 #    define _cat_pragma(exp)    _Pragma(#exp)
15224 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15225 #  else
15226 #    define _weak_pragma(exp)
15227 #  endif
15228 #  define _declare(name)        __extension__ extern __typeof__(name) name
15229 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15230 #endif
15231
15232 weak_symbol(fopen);
15233
15234   ;
15235   return 0;
15236 }
15237 _ACEOF
15238 rm -f "conftest.$ac_objext"
15239 if { (eval echo "$as_me:15239: \"$ac_compile\"") >&5
15240   (eval $ac_compile) 2>&5
15241   ac_status=$?
15242   echo "$as_me:15242: \$? = $ac_status" >&5
15243   (exit "$ac_status"); } &&
15244          { ac_try='test -s "conftest.$ac_objext"'
15245   { (eval echo "$as_me:15245: \"$ac_try\"") >&5
15246   (eval $ac_try) 2>&5
15247   ac_status=$?
15248   echo "$as_me:15248: \$? = $ac_status" >&5
15249   (exit "$ac_status"); }; }; then
15250   cf_cv_weak_symbols=yes
15251 else
15252   echo "$as_me: failed program was:" >&5
15253 cat "conftest.$ac_ext" >&5
15254 cf_cv_weak_symbols=no
15255 fi
15256 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15257
15258 fi
15259 echo "$as_me:15259: result: $cf_cv_weak_symbols" >&5
15260 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15261
15262         else
15263                 cf_cv_weak_symbols=no
15264         fi
15265
15266         if test "x$cf_cv_weak_symbols" = xyes ; then
15267
15268 cat >>confdefs.h <<\EOF
15269 #define USE_WEAK_SYMBOLS 1
15270 EOF
15271
15272         fi
15273 fi
15274
15275 PTHREAD=
15276 if test "x$with_pthread" = "xyes" ; then
15277
15278 cat >>confdefs.h <<\EOF
15279 #define USE_PTHREADS 1
15280 EOF
15281
15282         enable_reentrant=yes
15283         if test "x$cf_cv_weak_symbols" = xyes ; then
15284                 PTHREAD=-lpthread
15285
15286 cf_add_libs="$PRIVATE_LIBS"
15287 # reverse order
15288 cf_add_0lib=
15289 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15290 # filter duplicates
15291 for cf_add_1lib in $cf_add_0lib; do
15292         for cf_add_2lib in $cf_add_libs; do
15293                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15294                         cf_add_1lib=
15295                         break
15296                 fi
15297         done
15298         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15299 done
15300 PRIVATE_LIBS="$cf_add_libs"
15301
15302         fi
15303 fi
15304
15305 # Reentrant code has to be opaque; there's little advantage to making ncurses
15306 # opaque outside of that, so there is no --enable-opaque option.  We can use
15307 # this option without --with-pthreads, but this will be always set for
15308 # pthreads.
15309 echo "$as_me:15309: checking if you want reentrant code" >&5
15310 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15311
15312 # Check whether --enable-reentrant or --disable-reentrant was given.
15313 if test "${enable_reentrant+set}" = set; then
15314   enableval="$enable_reentrant"
15315   with_reentrant=$enableval
15316 else
15317   with_reentrant=no
15318 fi;
15319 echo "$as_me:15319: result: $with_reentrant" >&5
15320 echo "${ECHO_T}$with_reentrant" >&6
15321 if test "x$with_reentrant" = xyes ; then
15322         cf_cv_enable_reentrant=1
15323         cf_cv_enable_opaque="NCURSES_INTERNALS"
15324         NCURSES_SIZE_T=int
15325         if test "x$cf_cv_weak_symbols" = xyes ; then
15326
15327 # remove pthread library from $LIBS
15328 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15329
15330 cf_add_libs="$TEST_LIBS"
15331 # reverse order
15332 cf_add_0lib=
15333 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15334 # filter duplicates
15335 for cf_add_1lib in $cf_add_0lib; do
15336         for cf_add_2lib in $cf_add_libs; do
15337                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15338                         cf_add_1lib=
15339                         break
15340                 fi
15341         done
15342         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15343 done
15344 TEST_LIBS="$cf_add_libs"
15345
15346 cf_add_libs="$TEST_LIBS2"
15347 # reverse order
15348 cf_add_0lib=
15349 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15350 # filter duplicates
15351 for cf_add_1lib in $cf_add_0lib; do
15352         for cf_add_2lib in $cf_add_libs; do
15353                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15354                         cf_add_1lib=
15355                         break
15356                 fi
15357         done
15358         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15359 done
15360 TEST_LIBS2="$cf_add_libs"
15361
15362 cf_add_libs="$PRIVATE_LIBS"
15363 # reverse order
15364 cf_add_0lib=
15365 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15366 # filter duplicates
15367 for cf_add_1lib in $cf_add_0lib; do
15368         for cf_add_2lib in $cf_add_libs; do
15369                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15370                         cf_add_1lib=
15371                         break
15372                 fi
15373         done
15374         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15375 done
15376 PRIVATE_LIBS="$cf_add_libs"
15377
15378         else
15379                 # when not using weak symbols but with_reentrant,
15380                 # add 't' to the library suffix on all platforms
15381                 # except cygwin, where we only do that if ALSO
15382                 # compiling with full thread support.
15383                 case "$host" in
15384                 (*cygwin* | *msys*)
15385                         if test "$with_pthread" = "yes" ; then
15386                                 if test "x$disable_lib_suffixes" = "xno" ; then
15387                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15388                                 fi
15389                         fi ;;
15390                 (*)
15391                         if test "x$disable_lib_suffixes" = "xno" ; then
15392                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15393                         fi
15394                         ;;
15395                 esac
15396         fi
15397
15398 cat >>confdefs.h <<\EOF
15399 #define USE_REENTRANT 1
15400 EOF
15401
15402 if test "${with_abi_version+set}" != set; then
15403         case "$cf_cv_rel_version" in
15404         (5.*)
15405                 cf_cv_rel_version=6.0
15406                 cf_cv_abi_version=6
15407                 { echo "$as_me:15407: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15408 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15409                 ;;
15410         esac
15411 fi
15412
15413 else
15414         cf_cv_enable_reentrant=0
15415         cf_cv_enable_opaque="NCURSES_OPAQUE"
15416         NCURSES_SIZE_T=short
15417 fi
15418
15419 echo "$as_me:15419: checking if you want opaque curses-library structures" >&5
15420 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15421
15422 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15423 if test "${enable_opaque_curses+set}" = set; then
15424   enableval="$enable_opaque_curses"
15425   test "$enableval" != yes && enableval=no
15426         if test "$enableval" != "no" ; then
15427     enable_opaque_curses=yes
15428         else
15429
15430          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15431          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15432
15433         fi
15434 else
15435   enableval=no
15436
15437          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15438          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15439
15440 fi;
15441 echo "$as_me:15441: result: $enable_opaque_curses" >&5
15442 echo "${ECHO_T}$enable_opaque_curses" >&6
15443
15444 test "$cf_cv_enable_reentrant" = 1 && \
15445 test "$enable_opaque_curses" = no && \
15446 { { echo "$as_me:15446: error: reentrant configuration requires opaque library" >&5
15447 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15448    { (exit 1); exit 1; }; }
15449
15450 echo "$as_me:15450: checking if you want opaque form-library structures" >&5
15451 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15452
15453 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15454 if test "${enable_opaque_form+set}" = set; then
15455   enableval="$enable_opaque_form"
15456   enable_opaque_form=yes
15457 else
15458   enable_opaque_form=no
15459 fi;
15460 echo "$as_me:15460: result: $enable_opaque_form" >&5
15461 echo "${ECHO_T}$enable_opaque_form" >&6
15462
15463 echo "$as_me:15463: checking if you want opaque menu-library structures" >&5
15464 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15465
15466 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15467 if test "${enable_opaque_menu+set}" = set; then
15468   enableval="$enable_opaque_menu"
15469   enable_opaque_menu=yes
15470 else
15471   enable_opaque_menu=no
15472 fi;
15473 echo "$as_me:15473: result: $enable_opaque_menu" >&5
15474 echo "${ECHO_T}$enable_opaque_menu" >&6
15475
15476 echo "$as_me:15476: checking if you want opaque panel-library structures" >&5
15477 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15478
15479 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15480 if test "${enable_opaque_panel+set}" = set; then
15481   enableval="$enable_opaque_panel"
15482   enable_opaque_panel=yes
15483 else
15484   enable_opaque_panel=no
15485 fi;
15486 echo "$as_me:15486: result: $enable_opaque_panel" >&5
15487 echo "${ECHO_T}$enable_opaque_panel" >&6
15488
15489 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15490 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15491 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15492 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15493
15494 ### Allow using a different wrap-prefix
15495 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15496         echo "$as_me:15496: checking for prefix used to wrap public variables" >&5
15497 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15498
15499 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15500 if test "${with_wrap_prefix+set}" = set; then
15501   withval="$with_wrap_prefix"
15502   NCURSES_WRAP_PREFIX=$withval
15503 else
15504   NCURSES_WRAP_PREFIX=_nc_
15505 fi;
15506         echo "$as_me:15506: result: $NCURSES_WRAP_PREFIX" >&5
15507 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15508 else
15509         NCURSES_WRAP_PREFIX=_nc_
15510 fi
15511
15512 cat >>confdefs.h <<EOF
15513 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15514 EOF
15515
15516 ###############################################################################
15517 # These options are relatively safe to experiment with.
15518
15519 echo "$as_me:15519: checking if you want all development code" >&5
15520 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15521
15522 # Check whether --with-develop or --without-develop was given.
15523 if test "${with_develop+set}" = set; then
15524   withval="$with_develop"
15525   with_develop=$withval
15526 else
15527   with_develop=no
15528 fi;
15529 echo "$as_me:15529: result: $with_develop" >&5
15530 echo "${ECHO_T}$with_develop" >&6
15531
15532 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15533 echo "$as_me:15533: checking if you want hard-tabs code" >&5
15534 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15535
15536 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15537 if test "${enable_hard_tabs+set}" = set; then
15538   enableval="$enable_hard_tabs"
15539
15540 else
15541   enable_hard_tabs=$with_develop
15542 fi;
15543 echo "$as_me:15543: result: $enable_hard_tabs" >&5
15544 echo "${ECHO_T}$enable_hard_tabs" >&6
15545 test "x$enable_hard_tabs" = xyes &&
15546 cat >>confdefs.h <<\EOF
15547 #define USE_HARD_TABS 1
15548 EOF
15549
15550 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15551 echo "$as_me:15551: checking if you want limited support for xmc" >&5
15552 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15553
15554 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15555 if test "${enable_xmc_glitch+set}" = set; then
15556   enableval="$enable_xmc_glitch"
15557
15558 else
15559   enable_xmc_glitch=$with_develop
15560 fi;
15561 echo "$as_me:15561: result: $enable_xmc_glitch" >&5
15562 echo "${ECHO_T}$enable_xmc_glitch" >&6
15563 test "x$enable_xmc_glitch" = xyes &&
15564 cat >>confdefs.h <<\EOF
15565 #define USE_XMC_SUPPORT 1
15566 EOF
15567
15568 ###############################################################################
15569 # These are just experimental, probably should not be in a package:
15570
15571 echo "$as_me:15571: checking if you do not want to assume colors are white-on-black" >&5
15572 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15573
15574 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15575 if test "${enable_assumed_color+set}" = set; then
15576   enableval="$enable_assumed_color"
15577   with_assumed_color=$enableval
15578 else
15579   with_assumed_color=yes
15580 fi;
15581 echo "$as_me:15581: result: $with_assumed_color" >&5
15582 echo "${ECHO_T}$with_assumed_color" >&6
15583 test "x$with_assumed_color" = xyes &&
15584 cat >>confdefs.h <<\EOF
15585 #define USE_ASSUMED_COLOR 1
15586 EOF
15587
15588 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15589 echo "$as_me:15589: checking if you want hashmap scrolling-optimization code" >&5
15590 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15591
15592 # Check whether --enable-hashmap or --disable-hashmap was given.
15593 if test "${enable_hashmap+set}" = set; then
15594   enableval="$enable_hashmap"
15595   with_hashmap=$enableval
15596 else
15597   with_hashmap=yes
15598 fi;
15599 echo "$as_me:15599: result: $with_hashmap" >&5
15600 echo "${ECHO_T}$with_hashmap" >&6
15601 test "x$with_hashmap" = xyes &&
15602 cat >>confdefs.h <<\EOF
15603 #define USE_HASHMAP 1
15604 EOF
15605
15606 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15607 echo "$as_me:15607: checking if you want colorfgbg code" >&5
15608 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15609
15610 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15611 if test "${enable_colorfgbg+set}" = set; then
15612   enableval="$enable_colorfgbg"
15613   with_colorfgbg=$enableval
15614 else
15615   with_colorfgbg=no
15616 fi;
15617 echo "$as_me:15617: result: $with_colorfgbg" >&5
15618 echo "${ECHO_T}$with_colorfgbg" >&6
15619 test "x$with_colorfgbg" = xyes &&
15620 cat >>confdefs.h <<\EOF
15621 #define USE_COLORFGBG 1
15622 EOF
15623
15624 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15625 echo "$as_me:15625: checking if you want to use gcc -fvisibility option" >&5
15626 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15627
15628 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15629 if test "${enable_fvisibility+set}" = set; then
15630   enableval="$enable_fvisibility"
15631   cf_with_fvisibility=$enableval
15632 else
15633   cf_with_fvisibility=no
15634 fi;
15635 echo "$as_me:15635: result: $cf_with_fvisibility" >&5
15636 echo "${ECHO_T}$cf_with_fvisibility" >&6
15637
15638 NCURSES_IMPEXP=
15639 NCURSES_CXX_IMPEXP=
15640 if test "x$cf_with_fvisibility" = xyes; then
15641
15642 echo "$as_me:15642: checking if $CC -fvisibility=hidden option works" >&5
15643 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15644 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15645   echo $ECHO_N "(cached) $ECHO_C" >&6
15646 else
15647
15648     cf_save_cflags="$CFLAGS"
15649     CFLAGS="$CFLAGS -fvisibility=hidden"
15650     cat >"conftest.$ac_ext" <<_ACEOF
15651 #line 15651 "configure"
15652 #include "confdefs.h"
15653
15654 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15655
15656 int
15657 main (void)
15658 {
15659
15660         if (somefunc()) return 1;
15661
15662   ;
15663   return 0;
15664 }
15665 _ACEOF
15666 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15667 if { (eval echo "$as_me:15667: \"$ac_link\"") >&5
15668   (eval $ac_link) 2>&5
15669   ac_status=$?
15670   echo "$as_me:15670: \$? = $ac_status" >&5
15671   (exit "$ac_status"); } &&
15672          { ac_try='test -s "conftest$ac_exeext"'
15673   { (eval echo "$as_me:15673: \"$ac_try\"") >&5
15674   (eval $ac_try) 2>&5
15675   ac_status=$?
15676   echo "$as_me:15676: \$? = $ac_status" >&5
15677   (exit "$ac_status"); }; }; then
15678   cf_cv_fvisibility_hidden=yes
15679 else
15680   echo "$as_me: failed program was:" >&5
15681 cat "conftest.$ac_ext" >&5
15682 cf_cv_fvisibility_hidden=no
15683 fi
15684 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15685     CFLAGS=$cf_save_cflags
15686
15687 fi
15688 echo "$as_me:15688: result: $cf_cv_fvisibility_hidden" >&5
15689 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15690
15691         if test "x$cf_cv_fvisibility_hidden" = xyes
15692         then
15693
15694 cf_fix_cppflags=no
15695 cf_new_cflags=
15696 cf_new_cppflags=
15697 cf_new_extra_cppflags=
15698
15699 for cf_add_cflags in -fvisibility=hidden
15700 do
15701 case "$cf_fix_cppflags" in
15702 (no)
15703         case "$cf_add_cflags" in
15704         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15705                 case "$cf_add_cflags" in
15706                 (-D*)
15707                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15708
15709                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15710                                 && test -z "${cf_tst_cflags}" \
15711                                 && cf_fix_cppflags=yes
15712
15713                         if test "$cf_fix_cppflags" = yes ; then
15714
15715         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15716         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15717
15718                                 continue
15719                         elif test "${cf_tst_cflags}" = "\"'" ; then
15720
15721         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15722         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15723
15724                                 continue
15725                         fi
15726                         ;;
15727                 esac
15728                 case "$CPPFLAGS" in
15729                 (*$cf_add_cflags)
15730                         ;;
15731                 (*)
15732                         case "$cf_add_cflags" in
15733                         (-D*)
15734                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15735
15736 CPPFLAGS=`echo "$CPPFLAGS" | \
15737         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15738                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15739
15740                                 ;;
15741                         esac
15742
15743         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15744         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15745
15746                         ;;
15747                 esac
15748                 ;;
15749         (*)
15750
15751         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15752         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15753
15754                 ;;
15755         esac
15756         ;;
15757 (yes)
15758
15759         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15760         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15761
15762         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15763
15764         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15765                 && test -z "${cf_tst_cflags}" \
15766                 && cf_fix_cppflags=no
15767         ;;
15768 esac
15769 done
15770
15771 if test -n "$cf_new_cflags" ; then
15772
15773         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15774         CFLAGS="${CFLAGS}$cf_new_cflags"
15775
15776 fi
15777
15778 if test -n "$cf_new_cppflags" ; then
15779
15780         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15781         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15782
15783 fi
15784
15785 if test -n "$cf_new_extra_cppflags" ; then
15786
15787         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15788         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15789
15790 fi
15791
15792                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15793         fi
15794         if test -n "$CXX"
15795         then
15796                 ac_ext=cc
15797 ac_cpp='$CXXCPP $CPPFLAGS'
15798 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15799 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15800 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15801 ac_main_return="return"
15802
15803 echo "$as_me:15803: checking if $CXX -fvisibility=hidden option works" >&5
15804 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15805 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15806   echo $ECHO_N "(cached) $ECHO_C" >&6
15807 else
15808
15809     cf_save_cflags="$CXXFLAGS"
15810     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15811     cat >"conftest.$ac_ext" <<_ACEOF
15812 #line 15812 "configure"
15813 #include "confdefs.h"
15814
15815 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15816
15817 int
15818 main (void)
15819 {
15820
15821         if (somefunc()) return 1;
15822
15823   ;
15824   return 0;
15825 }
15826 _ACEOF
15827 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15828 if { (eval echo "$as_me:15828: \"$ac_link\"") >&5
15829   (eval $ac_link) 2>&5
15830   ac_status=$?
15831   echo "$as_me:15831: \$? = $ac_status" >&5
15832   (exit "$ac_status"); } &&
15833          { ac_try='test -s "conftest$ac_exeext"'
15834   { (eval echo "$as_me:15834: \"$ac_try\"") >&5
15835   (eval $ac_try) 2>&5
15836   ac_status=$?
15837   echo "$as_me:15837: \$? = $ac_status" >&5
15838   (exit "$ac_status"); }; }; then
15839   cf_cv_fvisibility_hidden2=yes
15840 else
15841   echo "$as_me: failed program was:" >&5
15842 cat "conftest.$ac_ext" >&5
15843 cf_cv_fvisibility_hidden2=no
15844 fi
15845 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15846     CXXFLAGS=$cf_save_cflags
15847
15848 fi
15849 echo "$as_me:15849: result: $cf_cv_fvisibility_hidden2" >&5
15850 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15851
15852                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15853                 then
15854
15855 cf_save_CXXFLAGS="$CFLAGS"
15856 CFLAGS="$CXXFLAGS"
15857
15858 cf_fix_cppflags=no
15859 cf_new_cflags=
15860 cf_new_cppflags=
15861 cf_new_extra_cppflags=
15862
15863 for cf_add_cflags in -fvisibility=hidden
15864 do
15865 case "$cf_fix_cppflags" in
15866 (no)
15867         case "$cf_add_cflags" in
15868         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15869                 case "$cf_add_cflags" in
15870                 (-D*)
15871                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15872
15873                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15874                                 && test -z "${cf_tst_cflags}" \
15875                                 && cf_fix_cppflags=yes
15876
15877                         if test "$cf_fix_cppflags" = yes ; then
15878
15879         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15880         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15881
15882                                 continue
15883                         elif test "${cf_tst_cflags}" = "\"'" ; then
15884
15885         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15886         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15887
15888                                 continue
15889                         fi
15890                         ;;
15891                 esac
15892                 case "$CPPFLAGS" in
15893                 (*$cf_add_cflags)
15894                         ;;
15895                 (*)
15896                         case "$cf_add_cflags" in
15897                         (-D*)
15898                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15899
15900 CPPFLAGS=`echo "$CPPFLAGS" | \
15901         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15902                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15903
15904                                 ;;
15905                         esac
15906
15907         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15908         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15909
15910                         ;;
15911                 esac
15912                 ;;
15913         (*)
15914
15915         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15916         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15917
15918                 ;;
15919         esac
15920         ;;
15921 (yes)
15922
15923         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15924         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15925
15926         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15927
15928         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15929                 && test -z "${cf_tst_cflags}" \
15930                 && cf_fix_cppflags=no
15931         ;;
15932 esac
15933 done
15934
15935 if test -n "$cf_new_cflags" ; then
15936
15937         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15938         CFLAGS="${CFLAGS}$cf_new_cflags"
15939
15940 fi
15941
15942 if test -n "$cf_new_cppflags" ; then
15943
15944         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15945         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15946
15947 fi
15948
15949 if test -n "$cf_new_extra_cppflags" ; then
15950
15951         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15952         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15953
15954 fi
15955
15956 CXXFLAGS="$CFLAGS"
15957 CFLAGS="$cf_save_CXXFLAGS"
15958
15959                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15960                 fi
15961                 ac_ext=c
15962 ac_cpp='$CPP $CPPFLAGS'
15963 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15964 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15965 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15966 ac_main_return="return"
15967
15968         fi
15969 fi
15970
15971 ###   use option --enable-interop to turn on use of bindings used for interop
15972 echo "$as_me:15972: checking if you want interop bindings" >&5
15973 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15974
15975 # Check whether --enable-interop or --disable-interop was given.
15976 if test "${enable_interop+set}" = set; then
15977   enableval="$enable_interop"
15978   with_exp_interop=$enableval
15979 else
15980   with_exp_interop=$cf_dft_interop
15981 fi;
15982 echo "$as_me:15982: result: $with_exp_interop" >&5
15983 echo "${ECHO_T}$with_exp_interop" >&6
15984
15985 NCURSES_INTEROP_FUNCS=0
15986 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15987
15988 echo "$as_me:15988: checking if you want experimental safe-sprintf code" >&5
15989 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15990
15991 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15992 if test "${enable_safe_sprintf+set}" = set; then
15993   enableval="$enable_safe_sprintf"
15994   with_safe_sprintf=$enableval
15995 else
15996   with_safe_sprintf=no
15997 fi;
15998 echo "$as_me:15998: result: $with_safe_sprintf" >&5
15999 echo "${ECHO_T}$with_safe_sprintf" >&6
16000
16001 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16002 # when hashmap is used scroll hints are useless
16003 if test "$with_hashmap" = no ; then
16004 echo "$as_me:16004: checking if you want to experiment without scrolling-hints code" >&5
16005 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16006
16007 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16008 if test "${enable_scroll_hints+set}" = set; then
16009   enableval="$enable_scroll_hints"
16010   with_scroll_hints=$enableval
16011 else
16012   with_scroll_hints=yes
16013 fi;
16014 echo "$as_me:16014: result: $with_scroll_hints" >&5
16015 echo "${ECHO_T}$with_scroll_hints" >&6
16016 test "x$with_scroll_hints" = xyes &&
16017 cat >>confdefs.h <<\EOF
16018 #define USE_SCROLL_HINTS 1
16019 EOF
16020
16021 fi
16022
16023 echo "$as_me:16023: checking if you want wgetch-events code" >&5
16024 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16025
16026 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16027 if test "${enable_wgetch_events+set}" = set; then
16028   enableval="$enable_wgetch_events"
16029   with_wgetch_events=$enableval
16030 else
16031   with_wgetch_events=no
16032 fi;
16033 echo "$as_me:16033: result: $with_wgetch_events" >&5
16034 echo "${ECHO_T}$with_wgetch_events" >&6
16035 if test "x$with_wgetch_events" = xyes ; then
16036
16037 cat >>confdefs.h <<\EOF
16038 #define NCURSES_WGETCH_EVENTS 1
16039 EOF
16040
16041         NCURSES_WGETCH_EVENTS=1
16042 else
16043         NCURSES_WGETCH_EVENTS=0
16044 fi
16045
16046 case "$cf_cv_system_name" in
16047 (*mingw32*|*mingw64*|*-msvc*)
16048         echo "$as_me:16048: checking if you want experimental-Windows driver" >&5
16049 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16050
16051 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16052 if test "${enable_exp_win32+set}" = set; then
16053   enableval="$enable_exp_win32"
16054   with_exp_win32=$enableval
16055 else
16056   with_exp_win32=no
16057 fi;
16058         echo "$as_me:16058: result: $with_exp_win32" >&5
16059 echo "${ECHO_T}$with_exp_win32" >&6
16060         if test "x$with_exp_win32" = xyes
16061         then
16062
16063 cat >>confdefs.h <<\EOF
16064 #define EXP_WIN32_DRIVER 1
16065 EOF
16066
16067                 EXP_WIN32_DRIVER=1
16068                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16069         else
16070                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16071                 EXP_WIN32_DRIVER=0
16072         fi
16073         ;;
16074 (*)
16075         EXP_WIN32_DRIVER=0
16076         INTERNALS_HDR=
16077         ;;
16078 esac
16079
16080 ###############################################################################
16081
16082 ###     use option --disable-echo to suppress full display compiling commands
16083
16084 echo "$as_me:16084: checking if you want to see long compiling messages" >&5
16085 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16086
16087 # Check whether --enable-echo or --disable-echo was given.
16088 if test "${enable_echo+set}" = set; then
16089   enableval="$enable_echo"
16090   test "$enableval" != no && enableval=yes
16091         if test "$enableval" != "yes" ; then
16092
16093         ECHO_LT='--silent'
16094         ECHO_LD='@echo linking $@;'
16095         RULE_CC='@echo compiling $<'
16096         SHOW_CC='@echo compiling $@'
16097         ECHO_CC='@'
16098
16099         else
16100
16101         ECHO_LT=''
16102         ECHO_LD=''
16103         RULE_CC=''
16104         SHOW_CC=''
16105         ECHO_CC=''
16106
16107         fi
16108 else
16109   enableval=yes
16110
16111         ECHO_LT=''
16112         ECHO_LD=''
16113         RULE_CC=''
16114         SHOW_CC=''
16115         ECHO_CC=''
16116
16117 fi;
16118 echo "$as_me:16118: result: $enableval" >&5
16119 echo "${ECHO_T}$enableval" >&6
16120
16121 if test "x$enable_echo" = xyes; then
16122         ECHO_LINK=
16123 else
16124         ECHO_LINK='@ echo linking $@ ... ;'
16125         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16126         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16127 fi
16128
16129 # --disable-stripping is used for debugging
16130
16131 echo "$as_me:16131: checking if you want to install stripped executables" >&5
16132 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16133
16134 # Check whether --enable-stripping or --disable-stripping was given.
16135 if test "${enable_stripping+set}" = set; then
16136   enableval="$enable_stripping"
16137   test "$enableval" != no && enableval=yes
16138         if test "$enableval" != "yes" ; then
16139     enable_stripping=no
16140         else
16141                 enable_stripping=yes
16142         fi
16143 else
16144   enableval=yes
16145         enable_stripping=yes
16146
16147 fi;
16148 echo "$as_me:16148: result: $enable_stripping" >&5
16149 echo "${ECHO_T}$enable_stripping" >&6
16150
16151 if test "$enable_stripping" = yes
16152 then
16153         INSTALL_OPT_S="-s"
16154 else
16155         INSTALL_OPT_S=
16156 fi
16157
16158 : "${INSTALL:=install}"
16159 echo "$as_me:16159: checking if install accepts -p option" >&5
16160 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16161 if test "${cf_cv_install_p+set}" = set; then
16162   echo $ECHO_N "(cached) $ECHO_C" >&6
16163 else
16164
16165         rm -rf ./conftest*
16166         date >conftest.in
16167         mkdir conftest.out
16168         sleep 3
16169         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16170         then
16171                 if test -f conftest.out/conftest.in
16172                 then
16173                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16174                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16175                         if test -s conftest.err
16176                         then
16177                                 cf_cv_install_p=no
16178                         else
16179                                 cf_cv_install_p=yes
16180                         fi
16181                 else
16182                         cf_cv_install_p=no
16183                 fi
16184         else
16185                 cf_cv_install_p=no
16186         fi
16187         rm -rf ./conftest*
16188
16189 fi
16190 echo "$as_me:16190: result: $cf_cv_install_p" >&5
16191 echo "${ECHO_T}$cf_cv_install_p" >&6
16192
16193 echo "$as_me:16193: checking if install needs to be told about ownership" >&5
16194 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16195 case `$ac_config_guess` in
16196 (*minix)
16197         with_install_o=yes
16198         ;;
16199 (*)
16200         with_install_o=no
16201         ;;
16202 esac
16203
16204 echo "$as_me:16204: result: $with_install_o" >&5
16205 echo "${ECHO_T}$with_install_o" >&6
16206 if test "x$with_install_o" = xyes
16207 then
16208         INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
16209 else
16210         INSTALL_OPT_O=
16211 fi
16212
16213 # If we're avoiding relinking of shared libraries during install, that is to
16214 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16215 # the install program has "-p" (for preserving timestamps).
16216 cf_cv_do_reranlib=yes
16217 if test "x$cf_cv_install_p" = xyes
16218 then
16219         if test "x$cf_cv_do_relink" != xyes
16220         then
16221                 cf_cv_do_reranlib=no
16222                 INSTALL_OPT_P="-p"
16223                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16224         fi
16225 fi
16226
16227 ###     use option --enable-warnings to turn on all gcc warnings
16228
16229 echo "$as_me:16229: checking if you want to use C11 _Noreturn feature" >&5
16230 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16231
16232 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16233 if test "${enable_stdnoreturn+set}" = set; then
16234   enableval="$enable_stdnoreturn"
16235   test "$enableval" != yes && enableval=no
16236         if test "$enableval" != "no" ; then
16237     enable_stdnoreturn=yes
16238         else
16239                 enable_stdnoreturn=no
16240         fi
16241 else
16242   enableval=no
16243         enable_stdnoreturn=no
16244
16245 fi;
16246 echo "$as_me:16246: result: $enable_stdnoreturn" >&5
16247 echo "${ECHO_T}$enable_stdnoreturn" >&6
16248
16249 if test $enable_stdnoreturn = yes; then
16250 echo "$as_me:16250: checking for C11 _Noreturn feature" >&5
16251 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16252 if test "${cf_cv_c11_noreturn+set}" = set; then
16253   echo $ECHO_N "(cached) $ECHO_C" >&6
16254 else
16255   cat >"conftest.$ac_ext" <<_ACEOF
16256 #line 16256 "configure"
16257 #include "confdefs.h"
16258
16259 #include <stdio.h>
16260 #include <stdlib.h>
16261 #include <stdnoreturn.h>
16262 static _Noreturn void giveup(void) { exit(0); }
16263
16264 int
16265 main (void)
16266 {
16267 if (feof(stdin)) giveup()
16268   ;
16269   return 0;
16270 }
16271 _ACEOF
16272 rm -f "conftest.$ac_objext"
16273 if { (eval echo "$as_me:16273: \"$ac_compile\"") >&5
16274   (eval $ac_compile) 2>&5
16275   ac_status=$?
16276   echo "$as_me:16276: \$? = $ac_status" >&5
16277   (exit "$ac_status"); } &&
16278          { ac_try='test -s "conftest.$ac_objext"'
16279   { (eval echo "$as_me:16279: \"$ac_try\"") >&5
16280   (eval $ac_try) 2>&5
16281   ac_status=$?
16282   echo "$as_me:16282: \$? = $ac_status" >&5
16283   (exit "$ac_status"); }; }; then
16284   cf_cv_c11_noreturn=yes
16285 else
16286   echo "$as_me: failed program was:" >&5
16287 cat "conftest.$ac_ext" >&5
16288 cf_cv_c11_noreturn=no
16289 fi
16290 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16291
16292 fi
16293 echo "$as_me:16293: result: $cf_cv_c11_noreturn" >&5
16294 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16295 else
16296         cf_cv_c11_noreturn=no,
16297 fi
16298
16299 if test "$cf_cv_c11_noreturn" = yes; then
16300
16301 cat >>confdefs.h <<\EOF
16302 #define HAVE_STDNORETURN_H 1
16303 EOF
16304
16305 cat >>confdefs.h <<EOF
16306 #define STDC_NORETURN _Noreturn
16307 EOF
16308
16309         HAVE_STDNORETURN_H=1
16310 else
16311         HAVE_STDNORETURN_H=0
16312 fi
16313
16314 if test "$GCC" = yes || test "$GXX" = yes
16315 then
16316
16317 if test "$GCC" = yes || test "$GXX" = yes
16318 then
16319         case $CFLAGS in
16320         (*-Werror=*)
16321                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16322
16323 echo "${as_me:-configure}:16323: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16324
16325                 cf_temp_flags=
16326                 for cf_temp_scan in $CFLAGS
16327                 do
16328                         case "x$cf_temp_scan" in
16329                         (x-Werror=*)
16330
16331         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16332         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16333
16334                                 ;;
16335                         (*)
16336
16337         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16338         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16339
16340                                 ;;
16341                         esac
16342                 done
16343                 CFLAGS="$cf_temp_flags"
16344                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16345
16346 echo "${as_me:-configure}:16346: testing ... fixed $CFLAGS ..." 1>&5
16347
16348                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16349
16350 echo "${as_me:-configure}:16350: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16351
16352                 ;;
16353         esac
16354 fi
16355
16356 if test "$GCC" = yes || test "$GXX" = yes
16357 then
16358         case $CPPFLAGS in
16359         (*-Werror=*)
16360                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16361
16362 echo "${as_me:-configure}:16362: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16363
16364                 cf_temp_flags=
16365                 for cf_temp_scan in $CPPFLAGS
16366                 do
16367                         case "x$cf_temp_scan" in
16368                         (x-Werror=*)
16369
16370         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16371         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16372
16373                                 ;;
16374                         (*)
16375
16376         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16377         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16378
16379                                 ;;
16380                         esac
16381                 done
16382                 CPPFLAGS="$cf_temp_flags"
16383                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16384
16385 echo "${as_me:-configure}:16385: testing ... fixed $CPPFLAGS ..." 1>&5
16386
16387                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16388
16389 echo "${as_me:-configure}:16389: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16390
16391                 ;;
16392         esac
16393 fi
16394
16395 if test "$GCC" = yes || test "$GXX" = yes
16396 then
16397         case $LDFLAGS in
16398         (*-Werror=*)
16399                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16400
16401 echo "${as_me:-configure}:16401: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16402
16403                 cf_temp_flags=
16404                 for cf_temp_scan in $LDFLAGS
16405                 do
16406                         case "x$cf_temp_scan" in
16407                         (x-Werror=*)
16408
16409         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16410         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16411
16412                                 ;;
16413                         (*)
16414
16415         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16416         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16417
16418                                 ;;
16419                         esac
16420                 done
16421                 LDFLAGS="$cf_temp_flags"
16422                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16423
16424 echo "${as_me:-configure}:16424: testing ... fixed $LDFLAGS ..." 1>&5
16425
16426                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16427
16428 echo "${as_me:-configure}:16428: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16429
16430                 ;;
16431         esac
16432 fi
16433
16434 echo "$as_me:16434: checking if you want to turn on gcc warnings" >&5
16435 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16436
16437 # Check whether --enable-warnings or --disable-warnings was given.
16438 if test "${enable_warnings+set}" = set; then
16439   enableval="$enable_warnings"
16440   test "$enableval" != yes && enableval=no
16441         if test "$enableval" != "no" ; then
16442     enable_warnings=yes
16443         else
16444                 enable_warnings=no
16445         fi
16446 else
16447   enableval=no
16448         enable_warnings=no
16449
16450 fi;
16451 echo "$as_me:16451: result: $enable_warnings" >&5
16452 echo "${ECHO_T}$enable_warnings" >&6
16453 if test "$enable_warnings" = "yes"
16454 then
16455
16456 if test "x$have_x" = xyes; then
16457
16458 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16459 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16460 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16461 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16462 for cf_X_CFLAGS in $X_CFLAGS
16463 do
16464         case "x$cf_X_CFLAGS" in
16465         x-[IUD]*)
16466                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16467                 ;;
16468         *)
16469                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16470                 ;;
16471         esac
16472 done
16473
16474 cat >"conftest.$ac_ext" <<_ACEOF
16475 #line 16475 "configure"
16476 #include "confdefs.h"
16477
16478 #include <stdlib.h>
16479 #include <X11/Intrinsic.h>
16480
16481 int
16482 main (void)
16483 {
16484 String foo = malloc(1); (void)foo
16485   ;
16486   return 0;
16487 }
16488 _ACEOF
16489 rm -f "conftest.$ac_objext"
16490 if { (eval echo "$as_me:16490: \"$ac_compile\"") >&5
16491   (eval $ac_compile) 2>&5
16492   ac_status=$?
16493   echo "$as_me:16493: \$? = $ac_status" >&5
16494   (exit "$ac_status"); } &&
16495          { ac_try='test -s "conftest.$ac_objext"'
16496   { (eval echo "$as_me:16496: \"$ac_try\"") >&5
16497   (eval $ac_try) 2>&5
16498   ac_status=$?
16499   echo "$as_me:16499: \$? = $ac_status" >&5
16500   (exit "$ac_status"); }; }; then
16501
16502 echo "$as_me:16502: checking for X11/Xt const-feature" >&5
16503 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16504 if test "${cf_cv_const_x_string+set}" = set; then
16505   echo $ECHO_N "(cached) $ECHO_C" >&6
16506 else
16507
16508         cat >"conftest.$ac_ext" <<_ACEOF
16509 #line 16509 "configure"
16510 #include "confdefs.h"
16511
16512 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16513 #undef  XTSTRINGDEFINES /* X11R5 and later */
16514 #include <stdlib.h>
16515 #include <X11/Intrinsic.h>
16516
16517 int
16518 main (void)
16519 {
16520 String foo = malloc(1); *foo = 0
16521   ;
16522   return 0;
16523 }
16524 _ACEOF
16525 rm -f "conftest.$ac_objext"
16526 if { (eval echo "$as_me:16526: \"$ac_compile\"") >&5
16527   (eval $ac_compile) 2>&5
16528   ac_status=$?
16529   echo "$as_me:16529: \$? = $ac_status" >&5
16530   (exit "$ac_status"); } &&
16531          { ac_try='test -s "conftest.$ac_objext"'
16532   { (eval echo "$as_me:16532: \"$ac_try\"") >&5
16533   (eval $ac_try) 2>&5
16534   ac_status=$?
16535   echo "$as_me:16535: \$? = $ac_status" >&5
16536   (exit "$ac_status"); }; }; then
16537
16538                         cf_cv_const_x_string=no
16539
16540 else
16541   echo "$as_me: failed program was:" >&5
16542 cat "conftest.$ac_ext" >&5
16543
16544                         cf_cv_const_x_string=yes
16545
16546 fi
16547 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16548
16549 fi
16550 echo "$as_me:16550: result: $cf_cv_const_x_string" >&5
16551 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16552
16553 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16554 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16555 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16556
16557 case "$cf_cv_const_x_string" in
16558 (no)
16559
16560         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16561         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16562
16563         ;;
16564 (*)
16565
16566         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16567         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16568
16569         ;;
16570 esac
16571
16572 else
16573   echo "$as_me: failed program was:" >&5
16574 cat "conftest.$ac_ext" >&5
16575 fi
16576 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16577  fi
16578 cat > "conftest.$ac_ext" <<EOF
16579 #line 16579 "${as_me:-configure}"
16580 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16581 EOF
16582 if test "$INTEL_COMPILER" = yes
16583 then
16584 # The "-wdXXX" options suppress warnings:
16585 # remark #1419: external declaration in primary source file
16586 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16587 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16588 # remark #193: zero used for undefined preprocessing identifier
16589 # remark #593: variable "curs_sb_left_arrow" was set but never used
16590 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16591 # remark #869: parameter "tw" was never referenced
16592 # remark #981: operands are evaluated in unspecified order
16593 # warning #279: controlling expression is constant
16594
16595         { echo "$as_me:16595: checking for $CC warning options..." >&5
16596 echo "$as_me: checking for $CC warning options..." >&6;}
16597         cf_save_CFLAGS="$CFLAGS"
16598         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16599         for cf_opt in \
16600                 wd1419 \
16601                 wd1683 \
16602                 wd1684 \
16603                 wd193 \
16604                 wd593 \
16605                 wd279 \
16606                 wd810 \
16607                 wd869 \
16608                 wd981
16609         do
16610                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16611                 if { (eval echo "$as_me:16611: \"$ac_compile\"") >&5
16612   (eval $ac_compile) 2>&5
16613   ac_status=$?
16614   echo "$as_me:16614: \$? = $ac_status" >&5
16615   (exit "$ac_status"); }; then
16616                         test -n "$verbose" && echo "$as_me:16616: result: ... -$cf_opt" >&5
16617 echo "${ECHO_T}... -$cf_opt" >&6
16618                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16619                 fi
16620         done
16621         CFLAGS="$cf_save_CFLAGS"
16622 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16623 then
16624         { echo "$as_me:16624: checking for $CC warning options..." >&5
16625 echo "$as_me: checking for $CC warning options..." >&6;}
16626         cf_save_CFLAGS="$CFLAGS"
16627         cf_warn_CONST=""
16628         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16629         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16630         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16631         for cf_opt in W Wall \
16632                 Wbad-function-cast \
16633                 Wcast-align \
16634                 Wcast-qual \
16635                 Wdeclaration-after-statement \
16636                 Wextra \
16637                 Winline \
16638                 Wmissing-declarations \
16639                 Wmissing-prototypes \
16640                 Wnested-externs \
16641                 Wpointer-arith \
16642                 Wshadow \
16643                 Wstrict-prototypes \
16644                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16645         do
16646                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16647                 if { (eval echo "$as_me:16647: \"$ac_compile\"") >&5
16648   (eval $ac_compile) 2>&5
16649   ac_status=$?
16650   echo "$as_me:16650: \$? = $ac_status" >&5
16651   (exit "$ac_status"); }; then
16652                         test -n "$verbose" && echo "$as_me:16652: result: ... -$cf_opt" >&5
16653 echo "${ECHO_T}... -$cf_opt" >&6
16654                         case "$cf_opt" in
16655                         (Winline)
16656                                 case "$GCC_VERSION" in
16657                                 ([34].*)
16658                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16659
16660 echo "${as_me:-configure}:16660: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16661
16662                                         continue;;
16663                                 esac
16664                                 ;;
16665                         (Wpointer-arith)
16666                                 case "$GCC_VERSION" in
16667                                 ([12].*)
16668                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16669
16670 echo "${as_me:-configure}:16670: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16671
16672                                         continue;;
16673                                 esac
16674                                 ;;
16675                         esac
16676                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16677                 fi
16678         done
16679         CFLAGS="$cf_save_CFLAGS"
16680 fi
16681 rm -rf ./conftest*
16682
16683 fi
16684
16685 if test "$GCC" = yes || test "$GXX" = yes
16686 then
16687 cat > conftest.i <<EOF
16688 #ifndef GCC_PRINTF
16689 #define GCC_PRINTF 0
16690 #endif
16691 #ifndef GCC_SCANF
16692 #define GCC_SCANF 0
16693 #endif
16694 #ifndef GCC_NORETURN
16695 #define GCC_NORETURN /* nothing */
16696 #endif
16697 #ifndef GCC_UNUSED
16698 #define GCC_UNUSED /* nothing */
16699 #endif
16700 EOF
16701 if test "$GCC" = yes
16702 then
16703         { echo "$as_me:16703: checking for $CC __attribute__ directives..." >&5
16704 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16705 cat > "conftest.$ac_ext" <<EOF
16706 #line 16706 "${as_me:-configure}"
16707 #include "confdefs.h"
16708 #include "conftest.h"
16709 #include "conftest.i"
16710 #if     GCC_PRINTF
16711 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16712 #else
16713 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16714 #endif
16715 #if     GCC_SCANF
16716 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16717 #else
16718 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16719 #endif
16720 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16721 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
16722 extern GCC_NORETURN void foo(void);
16723 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16724 EOF
16725         cf_printf_attribute=no
16726         cf_scanf_attribute=no
16727         for cf_attribute in scanf printf unused noreturn
16728         do
16729
16730 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16731
16732                 cf_directive="__attribute__(($cf_attribute))"
16733                 echo "checking for $CC $cf_directive" 1>&5
16734
16735                 case "$cf_attribute" in
16736                 (printf)
16737                         cf_printf_attribute=yes
16738                         cat >conftest.h <<EOF
16739 #define GCC_$cf_ATTRIBUTE 1
16740 EOF
16741                         ;;
16742                 (scanf)
16743                         cf_scanf_attribute=yes
16744                         cat >conftest.h <<EOF
16745 #define GCC_$cf_ATTRIBUTE 1
16746 EOF
16747                         ;;
16748                 (*)
16749                         cat >conftest.h <<EOF
16750 #define GCC_$cf_ATTRIBUTE $cf_directive
16751 EOF
16752                         ;;
16753                 esac
16754
16755                 if { (eval echo "$as_me:16755: \"$ac_compile\"") >&5
16756   (eval $ac_compile) 2>&5
16757   ac_status=$?
16758   echo "$as_me:16758: \$? = $ac_status" >&5
16759   (exit "$ac_status"); }; then
16760                         test -n "$verbose" && echo "$as_me:16760: result: ... $cf_attribute" >&5
16761 echo "${ECHO_T}... $cf_attribute" >&6
16762                         cat conftest.h >>confdefs.h
16763                         case "$cf_attribute" in
16764                         (noreturn)
16765
16766 cat >>confdefs.h <<EOF
16767 #define GCC_NORETURN $cf_directive
16768 EOF
16769
16770                                 ;;
16771                         (printf)
16772                                 cf_value='/* nothing */'
16773                                 if test "$cf_printf_attribute" != no ; then
16774                                         cf_value='__attribute__((format(printf,fmt,var)))'
16775
16776 cat >>confdefs.h <<\EOF
16777 #define GCC_PRINTF 1
16778 EOF
16779
16780                                 fi
16781
16782 cat >>confdefs.h <<EOF
16783 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16784 EOF
16785
16786                                 ;;
16787                         (scanf)
16788                                 cf_value='/* nothing */'
16789                                 if test "$cf_scanf_attribute" != no ; then
16790                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16791
16792 cat >>confdefs.h <<\EOF
16793 #define GCC_SCANF 1
16794 EOF
16795
16796                                 fi
16797
16798 cat >>confdefs.h <<EOF
16799 #define GCC_SCANFLIKE(fmt,var) $cf_value
16800 EOF
16801
16802                                 ;;
16803                         (unused)
16804
16805 cat >>confdefs.h <<EOF
16806 #define GCC_UNUSED $cf_directive
16807 EOF
16808
16809                                 ;;
16810                         esac
16811                 fi
16812         done
16813 else
16814         ${FGREP-fgrep} define conftest.i >>confdefs.h
16815 fi
16816 rm -rf ./conftest*
16817 fi
16818
16819 fi
16820
16821 if test "x$enable_warnings" = "xyes"; then
16822
16823         ADAFLAGS="$ADAFLAGS -gnatg"
16824
16825         if test "x$cf_with_cxx" = xyes ; then
16826
16827 INTEL_CPLUSPLUS=no
16828
16829 if test "$GCC" = yes ; then
16830         case "$host_os" in
16831         (linux*|gnu*)
16832                 echo "$as_me:16832: checking if this is really Intel C++ compiler" >&5
16833 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16834                 cf_save_CFLAGS="$CXXFLAGS"
16835                 CXXFLAGS="$CXXFLAGS -no-gcc"
16836                 cat >"conftest.$ac_ext" <<_ACEOF
16837 #line 16837 "configure"
16838 #include "confdefs.h"
16839
16840 int
16841 main (void)
16842 {
16843
16844 #ifdef __INTEL_COMPILER
16845 #else
16846 make an error
16847 #endif
16848
16849   ;
16850   return 0;
16851 }
16852 _ACEOF
16853 rm -f "conftest.$ac_objext"
16854 if { (eval echo "$as_me:16854: \"$ac_compile\"") >&5
16855   (eval $ac_compile) 2>&5
16856   ac_status=$?
16857   echo "$as_me:16857: \$? = $ac_status" >&5
16858   (exit "$ac_status"); } &&
16859          { ac_try='test -s "conftest.$ac_objext"'
16860   { (eval echo "$as_me:16860: \"$ac_try\"") >&5
16861   (eval $ac_try) 2>&5
16862   ac_status=$?
16863   echo "$as_me:16863: \$? = $ac_status" >&5
16864   (exit "$ac_status"); }; }; then
16865   INTEL_CPLUSPLUS=yes
16866 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16867
16868 else
16869   echo "$as_me: failed program was:" >&5
16870 cat "conftest.$ac_ext" >&5
16871 fi
16872 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16873                 CXXFLAGS="$cf_save_CFLAGS"
16874                 echo "$as_me:16874: result: $INTEL_CPLUSPLUS" >&5
16875 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16876                 ;;
16877         esac
16878 fi
16879
16880 CLANG_CPLUSPLUS=no
16881
16882 if test "$GCC" = yes ; then
16883         echo "$as_me:16883: checking if this is really Clang C++ compiler" >&5
16884 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16885         cf_save_CFLAGS="$CXXFLAGS"
16886         cat >"conftest.$ac_ext" <<_ACEOF
16887 #line 16887 "configure"
16888 #include "confdefs.h"
16889
16890 int
16891 main (void)
16892 {
16893
16894 #ifdef __clang__
16895 #else
16896 make an error
16897 #endif
16898
16899   ;
16900   return 0;
16901 }
16902 _ACEOF
16903 rm -f "conftest.$ac_objext"
16904 if { (eval echo "$as_me:16904: \"$ac_compile\"") >&5
16905   (eval $ac_compile) 2>&5
16906   ac_status=$?
16907   echo "$as_me:16907: \$? = $ac_status" >&5
16908   (exit "$ac_status"); } &&
16909          { ac_try='test -s "conftest.$ac_objext"'
16910   { (eval echo "$as_me:16910: \"$ac_try\"") >&5
16911   (eval $ac_try) 2>&5
16912   ac_status=$?
16913   echo "$as_me:16913: \$? = $ac_status" >&5
16914   (exit "$ac_status"); }; }; then
16915   CLANG_CPLUSPLUS=yes
16916
16917 else
16918   echo "$as_me: failed program was:" >&5
16919 cat "conftest.$ac_ext" >&5
16920 fi
16921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16922         CXXFLAGS="$cf_save_CFLAGS"
16923         echo "$as_me:16923: result: $CLANG_CPLUSPLUS" >&5
16924 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16925 fi
16926
16927 CLANG_VERSION=none
16928
16929 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
16930         case "$CC" in
16931         (c[1-9][0-9]|*/c[1-9][0-9])
16932                 { echo "$as_me:16932: WARNING: replacing broken compiler alias $CC" >&5
16933 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
16934                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
16935                 CC=clang
16936                 ;;
16937         esac
16938
16939         echo "$as_me:16939: checking version of $CC" >&5
16940 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
16941         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
16942         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
16943         echo "$as_me:16943: result: $CLANG_VERSION" >&5
16944 echo "${ECHO_T}$CLANG_VERSION" >&6
16945
16946         for cf_clang_opt in \
16947                 -Qunused-arguments \
16948                 -Wno-error=implicit-function-declaration
16949         do
16950                 echo "$as_me:16950: checking if option $cf_clang_opt works" >&5
16951 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
16952                 cf_save_CFLAGS="$CFLAGS"
16953                 CFLAGS="$CFLAGS $cf_clang_opt"
16954                 cat >"conftest.$ac_ext" <<_ACEOF
16955 #line 16955 "configure"
16956 #include "confdefs.h"
16957
16958                         #include <stdio.h>
16959 int
16960 main (void)
16961 {
16962
16963                         printf("hello!\\n");
16964   ;
16965   return 0;
16966 }
16967 _ACEOF
16968 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16969 if { (eval echo "$as_me:16969: \"$ac_link\"") >&5
16970   (eval $ac_link) 2>&5
16971   ac_status=$?
16972   echo "$as_me:16972: \$? = $ac_status" >&5
16973   (exit "$ac_status"); } &&
16974          { ac_try='test -s "conftest$ac_exeext"'
16975   { (eval echo "$as_me:16975: \"$ac_try\"") >&5
16976   (eval $ac_try) 2>&5
16977   ac_status=$?
16978   echo "$as_me:16978: \$? = $ac_status" >&5
16979   (exit "$ac_status"); }; }; then
16980
16981                         cf_clang_optok=yes
16982 else
16983   echo "$as_me: failed program was:" >&5
16984 cat "conftest.$ac_ext" >&5
16985
16986                         cf_clang_optok=no
16987 fi
16988 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16989                 echo "$as_me:16989: result: $cf_clang_optok" >&5
16990 echo "${ECHO_T}$cf_clang_optok" >&6
16991                 CFLAGS="$cf_save_CFLAGS"
16992                 if test "$cf_clang_optok" = yes; then
16993                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
16994
16995 echo "${as_me:-configure}:16995: testing adding option $cf_clang_opt ..." 1>&5
16996
16997         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16998         CFLAGS="${CFLAGS}$cf_clang_opt"
16999
17000                 fi
17001         done
17002 fi
17003
17004 ac_ext=cc
17005 ac_cpp='$CXXCPP $CPPFLAGS'
17006 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17007 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17008 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17009 ac_main_return="return"
17010
17011 cat > conftest.$ac_ext <<EOF
17012 #line 17012 "configure"
17013 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17014 EOF
17015
17016 if test "$INTEL_CPLUSPLUS" = yes
17017 then
17018 # The "-wdXXX" options suppress warnings:
17019 # remark #1419: external declaration in primary source file
17020 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17021 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17022 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17023 # remark #193: zero used for undefined preprocessing identifier
17024 # remark #593: variable "curs_sb_left_arrow" was set but never used
17025 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17026 # remark #869: parameter "tw" was never referenced
17027 # remark #981: operands are evaluated in unspecified order
17028 # warning #269: invalid format string conversion
17029
17030         { echo "$as_me:17030: checking for $CC warning options..." >&5
17031 echo "$as_me: checking for $CC warning options..." >&6;}
17032         cf_save_CXXFLAGS="$CXXFLAGS"
17033         EXTRA_CXXFLAGS="-Wall"
17034         for cf_opt in \
17035                 wd1419 \
17036                 wd1682 \
17037                 wd1683 \
17038                 wd1684 \
17039                 wd193 \
17040                 wd279 \
17041                 wd593 \
17042                 wd810 \
17043                 wd869 \
17044                 wd981
17045         do
17046                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17047                 if { (eval echo "$as_me:17047: \"$ac_compile\"") >&5
17048   (eval $ac_compile) 2>&5
17049   ac_status=$?
17050   echo "$as_me:17050: \$? = $ac_status" >&5
17051   (exit "$ac_status"); }; then
17052                         test -n "$verbose" && echo "$as_me:17052: result: ... -$cf_opt" >&5
17053 echo "${ECHO_T}... -$cf_opt" >&6
17054                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17055                 fi
17056         done
17057         CXXFLAGS="$cf_save_CXXFLAGS"
17058
17059 elif test "$GXX" = yes
17060 then
17061         { echo "$as_me:17061: checking for $CXX warning options..." >&5
17062 echo "$as_me: checking for $CXX warning options..." >&6;}
17063         cf_save_CXXFLAGS="$CXXFLAGS"
17064         EXTRA_CXXFLAGS="-W -Wall"
17065         cf_gxx_extra_warnings=""
17066         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17067         case "$GXX_VERSION" in
17068         ([1-2].*)
17069                 ;;
17070         (*)
17071                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17072                 ;;
17073         esac
17074         for cf_opt in \
17075                 Wabi \
17076                 fabi-version=0 \
17077                 Wextra \
17078                 Wignored-qualifiers \
17079                 Wlogical-op \
17080                 Woverloaded-virtual \
17081                 Wsign-promo \
17082                 Wsynth \
17083                 Wold-style-cast \
17084                 Wcast-align \
17085                 Wcast-qual \
17086                 Wpointer-arith \
17087                 Wshadow \
17088                 Wundef $cf_gxx_extra_warnings Wno-unused
17089         do
17090                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17091                 if { (eval echo "$as_me:17091: \"$ac_compile\"") >&5
17092   (eval $ac_compile) 2>&5
17093   ac_status=$?
17094   echo "$as_me:17094: \$? = $ac_status" >&5
17095   (exit "$ac_status"); }; then
17096                         test -n "$verbose" && echo "$as_me:17096: result: ... -$cf_opt" >&5
17097 echo "${ECHO_T}... -$cf_opt" >&6
17098                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17099                 else
17100                         test -n "$verbose" && echo "$as_me:17100: result: ... no -$cf_opt" >&5
17101 echo "${ECHO_T}... no -$cf_opt" >&6
17102                 fi
17103         done
17104         CXXFLAGS="$cf_save_CXXFLAGS"
17105 fi
17106
17107 rm -rf ./conftest*
17108 ac_ext=c
17109 ac_cpp='$CPP $CPPFLAGS'
17110 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17111 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17112 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17113 ac_main_return="return"
17114
17115         fi
17116 fi
17117
17118 echo "$as_me:17118: checking if you want to work around bogus compiler/loader warnings" >&5
17119 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17120
17121 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17122 if test "${enable_string_hacks+set}" = set; then
17123   enableval="$enable_string_hacks"
17124   enable_string_hacks=$enableval
17125 else
17126   enable_string_hacks=no
17127 fi;
17128 echo "$as_me:17128: result: $enable_string_hacks" >&5
17129 echo "${ECHO_T}$enable_string_hacks" >&6
17130
17131 if test "x$enable_string_hacks" = "xyes"; then
17132
17133 cat >>confdefs.h <<\EOF
17134 #define USE_STRING_HACKS 1
17135 EOF
17136
17137         { echo "$as_me:17137: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17138 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17139         echo "$as_me:17139: checking for strlcat" >&5
17140 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17141 if test "${ac_cv_func_strlcat+set}" = set; then
17142   echo $ECHO_N "(cached) $ECHO_C" >&6
17143 else
17144   cat >"conftest.$ac_ext" <<_ACEOF
17145 #line 17145 "configure"
17146 #include "confdefs.h"
17147 #define strlcat autoconf_temporary
17148 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17149 #undef strlcat
17150
17151 #ifdef __cplusplus
17152 extern "C"
17153 #endif
17154
17155 /* We use char because int might match the return type of a gcc2
17156    builtin and then its argument prototype would still apply.  */
17157 char strlcat (void);
17158
17159 int
17160 main (void)
17161 {
17162
17163 /* The GNU C library defines stubs for functions which it implements
17164     to always fail with ENOSYS.  Some functions are actually named
17165     something starting with __ and the normal name is an alias.  */
17166 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17167 #error found stub for strlcat
17168 #endif
17169
17170         return strlcat ();
17171   ;
17172   return 0;
17173 }
17174 _ACEOF
17175 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17176 if { (eval echo "$as_me:17176: \"$ac_link\"") >&5
17177   (eval $ac_link) 2>&5
17178   ac_status=$?
17179   echo "$as_me:17179: \$? = $ac_status" >&5
17180   (exit "$ac_status"); } &&
17181          { ac_try='test -s "conftest$ac_exeext"'
17182   { (eval echo "$as_me:17182: \"$ac_try\"") >&5
17183   (eval $ac_try) 2>&5
17184   ac_status=$?
17185   echo "$as_me:17185: \$? = $ac_status" >&5
17186   (exit "$ac_status"); }; }; then
17187   ac_cv_func_strlcat=yes
17188 else
17189   echo "$as_me: failed program was:" >&5
17190 cat "conftest.$ac_ext" >&5
17191 ac_cv_func_strlcat=no
17192 fi
17193 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17194 fi
17195 echo "$as_me:17195: result: $ac_cv_func_strlcat" >&5
17196 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17197 if test "$ac_cv_func_strlcat" = yes; then
17198
17199 cat >>confdefs.h <<\EOF
17200 #define HAVE_STRLCAT 1
17201 EOF
17202
17203 else
17204
17205                 echo "$as_me:17205: checking for strlcat in -lbsd" >&5
17206 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17207 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17208   echo $ECHO_N "(cached) $ECHO_C" >&6
17209 else
17210   ac_check_lib_save_LIBS=$LIBS
17211 LIBS="-lbsd  $LIBS"
17212 cat >"conftest.$ac_ext" <<_ACEOF
17213 #line 17213 "configure"
17214 #include "confdefs.h"
17215
17216 /* Override any gcc2 internal prototype to avoid an error.  */
17217 #ifdef __cplusplus
17218 extern "C"
17219 #endif
17220 /* We use char because int might match the return type of a gcc2
17221    builtin and then its argument prototype would still apply.  */
17222 char strlcat ();
17223 int
17224 main (void)
17225 {
17226 strlcat ();
17227   ;
17228   return 0;
17229 }
17230 _ACEOF
17231 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17232 if { (eval echo "$as_me:17232: \"$ac_link\"") >&5
17233   (eval $ac_link) 2>&5
17234   ac_status=$?
17235   echo "$as_me:17235: \$? = $ac_status" >&5
17236   (exit "$ac_status"); } &&
17237          { ac_try='test -s "conftest$ac_exeext"'
17238   { (eval echo "$as_me:17238: \"$ac_try\"") >&5
17239   (eval $ac_try) 2>&5
17240   ac_status=$?
17241   echo "$as_me:17241: \$? = $ac_status" >&5
17242   (exit "$ac_status"); }; }; then
17243   ac_cv_lib_bsd_strlcat=yes
17244 else
17245   echo "$as_me: failed program was:" >&5
17246 cat "conftest.$ac_ext" >&5
17247 ac_cv_lib_bsd_strlcat=no
17248 fi
17249 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17250 LIBS=$ac_check_lib_save_LIBS
17251 fi
17252 echo "$as_me:17252: result: $ac_cv_lib_bsd_strlcat" >&5
17253 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17254 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17255
17256 cf_add_libs="$LIBS"
17257 # reverse order
17258 cf_add_0lib=
17259 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17260 # filter duplicates
17261 for cf_add_1lib in $cf_add_0lib; do
17262         for cf_add_2lib in $cf_add_libs; do
17263                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17264                         cf_add_1lib=
17265                         break
17266                 fi
17267         done
17268         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17269 done
17270 LIBS="$cf_add_libs"
17271
17272 for ac_header in bsd/string.h
17273 do
17274 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17275 echo "$as_me:17275: checking for $ac_header" >&5
17276 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17277 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17278   echo $ECHO_N "(cached) $ECHO_C" >&6
17279 else
17280   cat >"conftest.$ac_ext" <<_ACEOF
17281 #line 17281 "configure"
17282 #include "confdefs.h"
17283 #include <$ac_header>
17284 _ACEOF
17285 if { (eval echo "$as_me:17285: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17286   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17287   ac_status=$?
17288   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17289   rm -f conftest.er1
17290   cat conftest.err >&5
17291   echo "$as_me:17291: \$? = $ac_status" >&5
17292   (exit "$ac_status"); } >/dev/null; then
17293   if test -s conftest.err; then
17294     ac_cpp_err=$ac_c_preproc_warn_flag
17295   else
17296     ac_cpp_err=
17297   fi
17298 else
17299   ac_cpp_err=yes
17300 fi
17301 if test -z "$ac_cpp_err"; then
17302   eval "$as_ac_Header=yes"
17303 else
17304   echo "$as_me: failed program was:" >&5
17305   cat "conftest.$ac_ext" >&5
17306   eval "$as_ac_Header=no"
17307 fi
17308 rm -f conftest.err "conftest.$ac_ext"
17309 fi
17310 echo "$as_me:17310: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17311 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17312 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17313   cat >>confdefs.h <<EOF
17314 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17315 EOF
17316
17317 fi
17318 done
17319
17320 cat >>confdefs.h <<\EOF
17321 #define HAVE_STRLCAT 1
17322 EOF
17323
17324 fi
17325
17326 fi
17327
17328 for ac_func in strlcpy snprintf
17329 do
17330 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17331 echo "$as_me:17331: checking for $ac_func" >&5
17332 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17333 if eval "test \"\${$as_ac_var+set}\" = set"; then
17334   echo $ECHO_N "(cached) $ECHO_C" >&6
17335 else
17336   cat >"conftest.$ac_ext" <<_ACEOF
17337 #line 17337 "configure"
17338 #include "confdefs.h"
17339 #define $ac_func autoconf_temporary
17340 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17341 #undef $ac_func
17342
17343 #ifdef __cplusplus
17344 extern "C"
17345 #endif
17346
17347 /* We use char because int might match the return type of a gcc2
17348    builtin and then its argument prototype would still apply.  */
17349 char $ac_func (void);
17350
17351 int
17352 main (void)
17353 {
17354
17355 /* The GNU C library defines stubs for functions which it implements
17356     to always fail with ENOSYS.  Some functions are actually named
17357     something starting with __ and the normal name is an alias.  */
17358 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17359 #error found stub for $ac_func
17360 #endif
17361
17362         return $ac_func ();
17363   ;
17364   return 0;
17365 }
17366 _ACEOF
17367 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17368 if { (eval echo "$as_me:17368: \"$ac_link\"") >&5
17369   (eval $ac_link) 2>&5
17370   ac_status=$?
17371   echo "$as_me:17371: \$? = $ac_status" >&5
17372   (exit "$ac_status"); } &&
17373          { ac_try='test -s "conftest$ac_exeext"'
17374   { (eval echo "$as_me:17374: \"$ac_try\"") >&5
17375   (eval $ac_try) 2>&5
17376   ac_status=$?
17377   echo "$as_me:17377: \$? = $ac_status" >&5
17378   (exit "$ac_status"); }; }; then
17379   eval "$as_ac_var=yes"
17380 else
17381   echo "$as_me: failed program was:" >&5
17382 cat "conftest.$ac_ext" >&5
17383 eval "$as_ac_var=no"
17384 fi
17385 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17386 fi
17387 echo "$as_me:17387: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17388 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17389 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17390   cat >>confdefs.h <<EOF
17391 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17392 EOF
17393
17394 fi
17395 done
17396
17397 fi
17398
17399 ###     use option --enable-assertions to turn on generation of assertion code
17400 echo "$as_me:17400: checking if you want to enable runtime assertions" >&5
17401 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17402
17403 # Check whether --enable-assertions or --disable-assertions was given.
17404 if test "${enable_assertions+set}" = set; then
17405   enableval="$enable_assertions"
17406   with_assertions=$enableval
17407 else
17408   with_assertions=no
17409 fi;
17410 echo "$as_me:17410: result: $with_assertions" >&5
17411 echo "${ECHO_T}$with_assertions" >&6
17412 if test -n "$GCC"
17413 then
17414         if test "$with_assertions" = no
17415         then
17416                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17417         else
17418
17419         ADAFLAGS="$ADAFLAGS -gnata"
17420
17421         fi
17422 fi
17423
17424 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17425
17426 echo "$as_me:17426: checking if you want to use dmalloc for testing" >&5
17427 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17428
17429 # Check whether --with-dmalloc or --without-dmalloc was given.
17430 if test "${with_dmalloc+set}" = set; then
17431   withval="$with_dmalloc"
17432
17433 cat >>confdefs.h <<EOF
17434 #define USE_DMALLOC 1
17435 EOF
17436
17437         : "${with_cflags:=-g}"
17438         : "${enable_leaks:=no}"
17439          with_dmalloc=yes
17440 else
17441   with_dmalloc=
17442 fi;
17443 echo "$as_me:17443: result: ${with_dmalloc:-no}" >&5
17444 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17445
17446 case ".$with_cflags" in
17447 (.*-g*)
17448         case .$CFLAGS in
17449         (.*-g*)
17450                 ;;
17451         (*)
17452
17453 cf_fix_cppflags=no
17454 cf_new_cflags=
17455 cf_new_cppflags=
17456 cf_new_extra_cppflags=
17457
17458 for cf_add_cflags in -g
17459 do
17460 case "$cf_fix_cppflags" in
17461 (no)
17462         case "$cf_add_cflags" in
17463         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17464                 case "$cf_add_cflags" in
17465                 (-D*)
17466                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17467
17468                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17469                                 && test -z "${cf_tst_cflags}" \
17470                                 && cf_fix_cppflags=yes
17471
17472                         if test "$cf_fix_cppflags" = yes ; then
17473
17474         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17475         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17476
17477                                 continue
17478                         elif test "${cf_tst_cflags}" = "\"'" ; then
17479
17480         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17481         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17482
17483                                 continue
17484                         fi
17485                         ;;
17486                 esac
17487                 case "$CPPFLAGS" in
17488                 (*$cf_add_cflags)
17489                         ;;
17490                 (*)
17491                         case "$cf_add_cflags" in
17492                         (-D*)
17493                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17494
17495 CPPFLAGS=`echo "$CPPFLAGS" | \
17496         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17497                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17498
17499                                 ;;
17500                         esac
17501
17502         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17503         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17504
17505                         ;;
17506                 esac
17507                 ;;
17508         (*)
17509
17510         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17511         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17512
17513                 ;;
17514         esac
17515         ;;
17516 (yes)
17517
17518         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17519         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17520
17521         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17522
17523         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17524                 && test -z "${cf_tst_cflags}" \
17525                 && cf_fix_cppflags=no
17526         ;;
17527 esac
17528 done
17529
17530 if test -n "$cf_new_cflags" ; then
17531
17532         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17533         CFLAGS="${CFLAGS}$cf_new_cflags"
17534
17535 fi
17536
17537 if test -n "$cf_new_cppflags" ; then
17538
17539         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17540         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17541
17542 fi
17543
17544 if test -n "$cf_new_extra_cppflags" ; then
17545
17546         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17547         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17548
17549 fi
17550
17551                 ;;
17552         esac
17553         ;;
17554 esac
17555
17556 if test "$with_dmalloc" = yes ; then
17557         echo "$as_me:17557: checking for dmalloc.h" >&5
17558 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17559 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17560   echo $ECHO_N "(cached) $ECHO_C" >&6
17561 else
17562   cat >"conftest.$ac_ext" <<_ACEOF
17563 #line 17563 "configure"
17564 #include "confdefs.h"
17565 #include <dmalloc.h>
17566 _ACEOF
17567 if { (eval echo "$as_me:17567: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17568   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17569   ac_status=$?
17570   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17571   rm -f conftest.er1
17572   cat conftest.err >&5
17573   echo "$as_me:17573: \$? = $ac_status" >&5
17574   (exit "$ac_status"); } >/dev/null; then
17575   if test -s conftest.err; then
17576     ac_cpp_err=$ac_c_preproc_warn_flag
17577   else
17578     ac_cpp_err=
17579   fi
17580 else
17581   ac_cpp_err=yes
17582 fi
17583 if test -z "$ac_cpp_err"; then
17584   ac_cv_header_dmalloc_h=yes
17585 else
17586   echo "$as_me: failed program was:" >&5
17587   cat "conftest.$ac_ext" >&5
17588   ac_cv_header_dmalloc_h=no
17589 fi
17590 rm -f conftest.err "conftest.$ac_ext"
17591 fi
17592 echo "$as_me:17592: result: $ac_cv_header_dmalloc_h" >&5
17593 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17594 if test "$ac_cv_header_dmalloc_h" = yes; then
17595
17596 echo "$as_me:17596: checking for dmalloc_debug in -ldmalloc" >&5
17597 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17598 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17599   echo $ECHO_N "(cached) $ECHO_C" >&6
17600 else
17601   ac_check_lib_save_LIBS=$LIBS
17602 LIBS="-ldmalloc  $LIBS"
17603 cat >"conftest.$ac_ext" <<_ACEOF
17604 #line 17604 "configure"
17605 #include "confdefs.h"
17606
17607 /* Override any gcc2 internal prototype to avoid an error.  */
17608 #ifdef __cplusplus
17609 extern "C"
17610 #endif
17611 /* We use char because int might match the return type of a gcc2
17612    builtin and then its argument prototype would still apply.  */
17613 char dmalloc_debug ();
17614 int
17615 main (void)
17616 {
17617 dmalloc_debug ();
17618   ;
17619   return 0;
17620 }
17621 _ACEOF
17622 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17623 if { (eval echo "$as_me:17623: \"$ac_link\"") >&5
17624   (eval $ac_link) 2>&5
17625   ac_status=$?
17626   echo "$as_me:17626: \$? = $ac_status" >&5
17627   (exit "$ac_status"); } &&
17628          { ac_try='test -s "conftest$ac_exeext"'
17629   { (eval echo "$as_me:17629: \"$ac_try\"") >&5
17630   (eval $ac_try) 2>&5
17631   ac_status=$?
17632   echo "$as_me:17632: \$? = $ac_status" >&5
17633   (exit "$ac_status"); }; }; then
17634   ac_cv_lib_dmalloc_dmalloc_debug=yes
17635 else
17636   echo "$as_me: failed program was:" >&5
17637 cat "conftest.$ac_ext" >&5
17638 ac_cv_lib_dmalloc_dmalloc_debug=no
17639 fi
17640 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17641 LIBS=$ac_check_lib_save_LIBS
17642 fi
17643 echo "$as_me:17643: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17644 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17645 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
17646   cat >>confdefs.h <<EOF
17647 #define HAVE_LIBDMALLOC 1
17648 EOF
17649
17650   LIBS="-ldmalloc $LIBS"
17651
17652 fi
17653
17654 fi
17655
17656 fi
17657
17658 echo "$as_me:17658: checking if you want to use dbmalloc for testing" >&5
17659 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17660
17661 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17662 if test "${with_dbmalloc+set}" = set; then
17663   withval="$with_dbmalloc"
17664
17665 cat >>confdefs.h <<EOF
17666 #define USE_DBMALLOC 1
17667 EOF
17668
17669         : "${with_cflags:=-g}"
17670         : "${enable_leaks:=no}"
17671          with_dbmalloc=yes
17672 else
17673   with_dbmalloc=
17674 fi;
17675 echo "$as_me:17675: result: ${with_dbmalloc:-no}" >&5
17676 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17677
17678 case ".$with_cflags" in
17679 (.*-g*)
17680         case .$CFLAGS in
17681         (.*-g*)
17682                 ;;
17683         (*)
17684
17685 cf_fix_cppflags=no
17686 cf_new_cflags=
17687 cf_new_cppflags=
17688 cf_new_extra_cppflags=
17689
17690 for cf_add_cflags in -g
17691 do
17692 case "$cf_fix_cppflags" in
17693 (no)
17694         case "$cf_add_cflags" in
17695         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17696                 case "$cf_add_cflags" in
17697                 (-D*)
17698                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17699
17700                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17701                                 && test -z "${cf_tst_cflags}" \
17702                                 && cf_fix_cppflags=yes
17703
17704                         if test "$cf_fix_cppflags" = yes ; then
17705
17706         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17707         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17708
17709                                 continue
17710                         elif test "${cf_tst_cflags}" = "\"'" ; then
17711
17712         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17713         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17714
17715                                 continue
17716                         fi
17717                         ;;
17718                 esac
17719                 case "$CPPFLAGS" in
17720                 (*$cf_add_cflags)
17721                         ;;
17722                 (*)
17723                         case "$cf_add_cflags" in
17724                         (-D*)
17725                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17726
17727 CPPFLAGS=`echo "$CPPFLAGS" | \
17728         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17729                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17730
17731                                 ;;
17732                         esac
17733
17734         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17735         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17736
17737                         ;;
17738                 esac
17739                 ;;
17740         (*)
17741
17742         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17743         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17744
17745                 ;;
17746         esac
17747         ;;
17748 (yes)
17749
17750         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17751         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17752
17753         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17754
17755         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17756                 && test -z "${cf_tst_cflags}" \
17757                 && cf_fix_cppflags=no
17758         ;;
17759 esac
17760 done
17761
17762 if test -n "$cf_new_cflags" ; then
17763
17764         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17765         CFLAGS="${CFLAGS}$cf_new_cflags"
17766
17767 fi
17768
17769 if test -n "$cf_new_cppflags" ; then
17770
17771         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17772         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17773
17774 fi
17775
17776 if test -n "$cf_new_extra_cppflags" ; then
17777
17778         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17779         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17780
17781 fi
17782
17783                 ;;
17784         esac
17785         ;;
17786 esac
17787
17788 if test "$with_dbmalloc" = yes ; then
17789         echo "$as_me:17789: checking for dbmalloc.h" >&5
17790 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17791 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17792   echo $ECHO_N "(cached) $ECHO_C" >&6
17793 else
17794   cat >"conftest.$ac_ext" <<_ACEOF
17795 #line 17795 "configure"
17796 #include "confdefs.h"
17797 #include <dbmalloc.h>
17798 _ACEOF
17799 if { (eval echo "$as_me:17799: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17800   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17801   ac_status=$?
17802   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17803   rm -f conftest.er1
17804   cat conftest.err >&5
17805   echo "$as_me:17805: \$? = $ac_status" >&5
17806   (exit "$ac_status"); } >/dev/null; then
17807   if test -s conftest.err; then
17808     ac_cpp_err=$ac_c_preproc_warn_flag
17809   else
17810     ac_cpp_err=
17811   fi
17812 else
17813   ac_cpp_err=yes
17814 fi
17815 if test -z "$ac_cpp_err"; then
17816   ac_cv_header_dbmalloc_h=yes
17817 else
17818   echo "$as_me: failed program was:" >&5
17819   cat "conftest.$ac_ext" >&5
17820   ac_cv_header_dbmalloc_h=no
17821 fi
17822 rm -f conftest.err "conftest.$ac_ext"
17823 fi
17824 echo "$as_me:17824: result: $ac_cv_header_dbmalloc_h" >&5
17825 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17826 if test "$ac_cv_header_dbmalloc_h" = yes; then
17827
17828 echo "$as_me:17828: checking for debug_malloc in -ldbmalloc" >&5
17829 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17830 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17831   echo $ECHO_N "(cached) $ECHO_C" >&6
17832 else
17833   ac_check_lib_save_LIBS=$LIBS
17834 LIBS="-ldbmalloc  $LIBS"
17835 cat >"conftest.$ac_ext" <<_ACEOF
17836 #line 17836 "configure"
17837 #include "confdefs.h"
17838
17839 /* Override any gcc2 internal prototype to avoid an error.  */
17840 #ifdef __cplusplus
17841 extern "C"
17842 #endif
17843 /* We use char because int might match the return type of a gcc2
17844    builtin and then its argument prototype would still apply.  */
17845 char debug_malloc ();
17846 int
17847 main (void)
17848 {
17849 debug_malloc ();
17850   ;
17851   return 0;
17852 }
17853 _ACEOF
17854 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17855 if { (eval echo "$as_me:17855: \"$ac_link\"") >&5
17856   (eval $ac_link) 2>&5
17857   ac_status=$?
17858   echo "$as_me:17858: \$? = $ac_status" >&5
17859   (exit "$ac_status"); } &&
17860          { ac_try='test -s "conftest$ac_exeext"'
17861   { (eval echo "$as_me:17861: \"$ac_try\"") >&5
17862   (eval $ac_try) 2>&5
17863   ac_status=$?
17864   echo "$as_me:17864: \$? = $ac_status" >&5
17865   (exit "$ac_status"); }; }; then
17866   ac_cv_lib_dbmalloc_debug_malloc=yes
17867 else
17868   echo "$as_me: failed program was:" >&5
17869 cat "conftest.$ac_ext" >&5
17870 ac_cv_lib_dbmalloc_debug_malloc=no
17871 fi
17872 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17873 LIBS=$ac_check_lib_save_LIBS
17874 fi
17875 echo "$as_me:17875: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17876 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17877 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
17878   cat >>confdefs.h <<EOF
17879 #define HAVE_LIBDBMALLOC 1
17880 EOF
17881
17882   LIBS="-ldbmalloc $LIBS"
17883
17884 fi
17885
17886 fi
17887
17888 fi
17889
17890 echo "$as_me:17890: checking if you want to use valgrind for testing" >&5
17891 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17892
17893 # Check whether --with-valgrind or --without-valgrind was given.
17894 if test "${with_valgrind+set}" = set; then
17895   withval="$with_valgrind"
17896
17897 cat >>confdefs.h <<EOF
17898 #define USE_VALGRIND 1
17899 EOF
17900
17901         : "${with_cflags:=-g}"
17902         : "${enable_leaks:=no}"
17903          with_valgrind=yes
17904 else
17905   with_valgrind=
17906 fi;
17907 echo "$as_me:17907: result: ${with_valgrind:-no}" >&5
17908 echo "${ECHO_T}${with_valgrind:-no}" >&6
17909
17910 case ".$with_cflags" in
17911 (.*-g*)
17912         case .$CFLAGS in
17913         (.*-g*)
17914                 ;;
17915         (*)
17916
17917 cf_fix_cppflags=no
17918 cf_new_cflags=
17919 cf_new_cppflags=
17920 cf_new_extra_cppflags=
17921
17922 for cf_add_cflags in -g
17923 do
17924 case "$cf_fix_cppflags" in
17925 (no)
17926         case "$cf_add_cflags" in
17927         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17928                 case "$cf_add_cflags" in
17929                 (-D*)
17930                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17931
17932                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17933                                 && test -z "${cf_tst_cflags}" \
17934                                 && cf_fix_cppflags=yes
17935
17936                         if test "$cf_fix_cppflags" = yes ; then
17937
17938         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17939         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17940
17941                                 continue
17942                         elif test "${cf_tst_cflags}" = "\"'" ; then
17943
17944         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17945         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17946
17947                                 continue
17948                         fi
17949                         ;;
17950                 esac
17951                 case "$CPPFLAGS" in
17952                 (*$cf_add_cflags)
17953                         ;;
17954                 (*)
17955                         case "$cf_add_cflags" in
17956                         (-D*)
17957                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17958
17959 CPPFLAGS=`echo "$CPPFLAGS" | \
17960         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17961                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17962
17963                                 ;;
17964                         esac
17965
17966         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17967         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17968
17969                         ;;
17970                 esac
17971                 ;;
17972         (*)
17973
17974         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17975         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17976
17977                 ;;
17978         esac
17979         ;;
17980 (yes)
17981
17982         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17983         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17984
17985         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17986
17987         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17988                 && test -z "${cf_tst_cflags}" \
17989                 && cf_fix_cppflags=no
17990         ;;
17991 esac
17992 done
17993
17994 if test -n "$cf_new_cflags" ; then
17995
17996         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17997         CFLAGS="${CFLAGS}$cf_new_cflags"
17998
17999 fi
18000
18001 if test -n "$cf_new_cppflags" ; then
18002
18003         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18004         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18005
18006 fi
18007
18008 if test -n "$cf_new_extra_cppflags" ; then
18009
18010         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18011         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18012
18013 fi
18014
18015                 ;;
18016         esac
18017         ;;
18018 esac
18019
18020 echo "$as_me:18020: checking if you want to perform memory-leak testing" >&5
18021 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18022
18023 # Check whether --enable-leaks or --disable-leaks was given.
18024 if test "${enable_leaks+set}" = set; then
18025   enableval="$enable_leaks"
18026   enable_leaks=$enableval
18027 else
18028   enable_leaks=yes
18029 fi;
18030 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18031 echo "$as_me:18031: result: $with_no_leaks" >&5
18032 echo "${ECHO_T}$with_no_leaks" >&6
18033
18034 if test "$enable_leaks" = no ; then
18035
18036 cat >>confdefs.h <<\EOF
18037 #define NO_LEAKS 1
18038 EOF
18039
18040 cat >>confdefs.h <<\EOF
18041 #define YY_NO_LEAKS 1
18042 EOF
18043
18044 fi
18045
18046 cat >>confdefs.h <<\EOF
18047 #define HAVE_NC_ALLOC_H 1
18048 EOF
18049
18050 ###     use option --enable-expanded to generate certain macros as functions
18051
18052 # Check whether --enable-expanded or --disable-expanded was given.
18053 if test "${enable_expanded+set}" = set; then
18054   enableval="$enable_expanded"
18055   test "x$enableval" = xyes &&
18056 cat >>confdefs.h <<\EOF
18057 #define NCURSES_EXPANDED 1
18058 EOF
18059
18060 fi;
18061
18062 ###     use option --disable-macros to suppress macros in favor of functions
18063
18064 # Check whether --enable-macros or --disable-macros was given.
18065 if test "${enable_macros+set}" = set; then
18066   enableval="$enable_macros"
18067   test "$enableval" = no &&
18068 cat >>confdefs.h <<\EOF
18069 #define NCURSES_NOMACROS 1
18070 EOF
18071
18072 fi;
18073
18074 # Normally we only add trace() to the debug-library.  Allow this to be
18075 # extended to all models of the ncurses library:
18076 cf_all_traces=no
18077 case "$CFLAGS $CPPFLAGS" in
18078 (*-DTRACE*)
18079         cf_all_traces=yes
18080         ;;
18081 esac
18082
18083 echo "$as_me:18083: checking whether to add trace feature to all models" >&5
18084 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18085
18086 # Check whether --with-trace or --without-trace was given.
18087 if test "${with_trace+set}" = set; then
18088   withval="$with_trace"
18089   cf_with_trace=$withval
18090 else
18091   cf_with_trace=$cf_all_traces
18092 fi;
18093 echo "$as_me:18093: result: $cf_with_trace" >&5
18094 echo "${ECHO_T}$cf_with_trace" >&6
18095
18096 if test "x$cf_with_trace" = xyes ; then
18097         LIB_TRACING=all
18098         ADA_TRACE=TRUE
18099
18100 cf_fix_cppflags=no
18101 cf_new_cflags=
18102 cf_new_cppflags=
18103 cf_new_extra_cppflags=
18104
18105 for cf_add_cflags in -DTRACE
18106 do
18107 case "$cf_fix_cppflags" in
18108 (no)
18109         case "$cf_add_cflags" in
18110         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18111                 case "$cf_add_cflags" in
18112                 (-D*)
18113                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18114
18115                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18116                                 && test -z "${cf_tst_cflags}" \
18117                                 && cf_fix_cppflags=yes
18118
18119                         if test "$cf_fix_cppflags" = yes ; then
18120
18121         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18122         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18123
18124                                 continue
18125                         elif test "${cf_tst_cflags}" = "\"'" ; then
18126
18127         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18128         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18129
18130                                 continue
18131                         fi
18132                         ;;
18133                 esac
18134                 case "$CPPFLAGS" in
18135                 (*$cf_add_cflags)
18136                         ;;
18137                 (*)
18138                         case "$cf_add_cflags" in
18139                         (-D*)
18140                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18141
18142 CPPFLAGS=`echo "$CPPFLAGS" | \
18143         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18144                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18145
18146                                 ;;
18147                         esac
18148
18149         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18150         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18151
18152                         ;;
18153                 esac
18154                 ;;
18155         (*)
18156
18157         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18158         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18159
18160                 ;;
18161         esac
18162         ;;
18163 (yes)
18164
18165         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18166         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18167
18168         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18169
18170         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18171                 && test -z "${cf_tst_cflags}" \
18172                 && cf_fix_cppflags=no
18173         ;;
18174 esac
18175 done
18176
18177 if test -n "$cf_new_cflags" ; then
18178
18179         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18180         CFLAGS="${CFLAGS}$cf_new_cflags"
18181
18182 fi
18183
18184 if test -n "$cf_new_cppflags" ; then
18185
18186         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18187         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18188
18189 fi
18190
18191 if test -n "$cf_new_extra_cppflags" ; then
18192
18193         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18194         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18195
18196 fi
18197
18198 cat >>confdefs.h <<\EOF
18199 #define HAVE__TRACEF 1
18200 EOF
18201
18202 else
18203         LIB_TRACING=DEBUG
18204         ADA_TRACE=FALSE
18205 fi
18206
18207 echo "$as_me:18207: checking if we want to use GNAT projects" >&5
18208 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18209
18210 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18211 if test "${enable_gnat_projects+set}" = set; then
18212   enableval="$enable_gnat_projects"
18213   test "$enableval" != no && enableval=yes
18214         if test "$enableval" != "yes" ; then
18215     enable_gnat_projects=no
18216         else
18217                 enable_gnat_projects=yes
18218         fi
18219 else
18220   enableval=yes
18221         enable_gnat_projects=yes
18222
18223 fi;
18224 echo "$as_me:18224: result: $enable_gnat_projects" >&5
18225 echo "${ECHO_T}$enable_gnat_projects" >&6
18226
18227 ###     Checks for libraries.
18228 case "$cf_cv_system_name" in
18229 (*mingw32*|*mingw64*)
18230         if test "x$with_exp_win32" = xyes ; then
18231         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18232         else
18233         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18234         fi
18235         # Note: WINVER may be a problem with Windows 10
18236         ;;
18237 (*)
18238 echo "$as_me:18238: checking for gettimeofday" >&5
18239 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18240 if test "${ac_cv_func_gettimeofday+set}" = set; then
18241   echo $ECHO_N "(cached) $ECHO_C" >&6
18242 else
18243   cat >"conftest.$ac_ext" <<_ACEOF
18244 #line 18244 "configure"
18245 #include "confdefs.h"
18246 #define gettimeofday autoconf_temporary
18247 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18248 #undef gettimeofday
18249
18250 #ifdef __cplusplus
18251 extern "C"
18252 #endif
18253
18254 /* We use char because int might match the return type of a gcc2
18255    builtin and then its argument prototype would still apply.  */
18256 char gettimeofday (void);
18257
18258 int
18259 main (void)
18260 {
18261
18262 /* The GNU C library defines stubs for functions which it implements
18263     to always fail with ENOSYS.  Some functions are actually named
18264     something starting with __ and the normal name is an alias.  */
18265 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18266 #error found stub for gettimeofday
18267 #endif
18268
18269         return gettimeofday ();
18270   ;
18271   return 0;
18272 }
18273 _ACEOF
18274 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18275 if { (eval echo "$as_me:18275: \"$ac_link\"") >&5
18276   (eval $ac_link) 2>&5
18277   ac_status=$?
18278   echo "$as_me:18278: \$? = $ac_status" >&5
18279   (exit "$ac_status"); } &&
18280          { ac_try='test -s "conftest$ac_exeext"'
18281   { (eval echo "$as_me:18281: \"$ac_try\"") >&5
18282   (eval $ac_try) 2>&5
18283   ac_status=$?
18284   echo "$as_me:18284: \$? = $ac_status" >&5
18285   (exit "$ac_status"); }; }; then
18286   ac_cv_func_gettimeofday=yes
18287 else
18288   echo "$as_me: failed program was:" >&5
18289 cat "conftest.$ac_ext" >&5
18290 ac_cv_func_gettimeofday=no
18291 fi
18292 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18293 fi
18294 echo "$as_me:18294: result: $ac_cv_func_gettimeofday" >&5
18295 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18296 if test "$ac_cv_func_gettimeofday" = yes; then
18297
18298 cat >>confdefs.h <<\EOF
18299 #define HAVE_GETTIMEOFDAY 1
18300 EOF
18301
18302 else
18303
18304 echo "$as_me:18304: checking for gettimeofday in -lbsd" >&5
18305 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18306 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18307   echo $ECHO_N "(cached) $ECHO_C" >&6
18308 else
18309   ac_check_lib_save_LIBS=$LIBS
18310 LIBS="-lbsd  $LIBS"
18311 cat >"conftest.$ac_ext" <<_ACEOF
18312 #line 18312 "configure"
18313 #include "confdefs.h"
18314
18315 /* Override any gcc2 internal prototype to avoid an error.  */
18316 #ifdef __cplusplus
18317 extern "C"
18318 #endif
18319 /* We use char because int might match the return type of a gcc2
18320    builtin and then its argument prototype would still apply.  */
18321 char gettimeofday ();
18322 int
18323 main (void)
18324 {
18325 gettimeofday ();
18326   ;
18327   return 0;
18328 }
18329 _ACEOF
18330 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18331 if { (eval echo "$as_me:18331: \"$ac_link\"") >&5
18332   (eval $ac_link) 2>&5
18333   ac_status=$?
18334   echo "$as_me:18334: \$? = $ac_status" >&5
18335   (exit "$ac_status"); } &&
18336          { ac_try='test -s "conftest$ac_exeext"'
18337   { (eval echo "$as_me:18337: \"$ac_try\"") >&5
18338   (eval $ac_try) 2>&5
18339   ac_status=$?
18340   echo "$as_me:18340: \$? = $ac_status" >&5
18341   (exit "$ac_status"); }; }; then
18342   ac_cv_lib_bsd_gettimeofday=yes
18343 else
18344   echo "$as_me: failed program was:" >&5
18345 cat "conftest.$ac_ext" >&5
18346 ac_cv_lib_bsd_gettimeofday=no
18347 fi
18348 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18349 LIBS=$ac_check_lib_save_LIBS
18350 fi
18351 echo "$as_me:18351: result: $ac_cv_lib_bsd_gettimeofday" >&5
18352 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18353 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18354
18355 cat >>confdefs.h <<\EOF
18356 #define HAVE_GETTIMEOFDAY 1
18357 EOF
18358
18359 cf_add_libs="$LIBS"
18360 # reverse order
18361 cf_add_0lib=
18362 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18363 # filter duplicates
18364 for cf_add_1lib in $cf_add_0lib; do
18365         for cf_add_2lib in $cf_add_libs; do
18366                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18367                         cf_add_1lib=
18368                         break
18369                 fi
18370         done
18371         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18372 done
18373 LIBS="$cf_add_libs"
18374
18375 fi
18376
18377 fi
18378         ;;
18379 esac
18380
18381 echo "$as_me:18381: checking if -lm needed for math functions" >&5
18382 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18383 if test "${cf_cv_need_libm+set}" = set; then
18384   echo $ECHO_N "(cached) $ECHO_C" >&6
18385 else
18386
18387         cat >"conftest.$ac_ext" <<_ACEOF
18388 #line 18388 "configure"
18389 #include "confdefs.h"
18390
18391         #include <stdio.h>
18392         #include <stdlib.h>
18393         #include <math.h>
18394
18395 int
18396 main (void)
18397 {
18398 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18399   ;
18400   return 0;
18401 }
18402 _ACEOF
18403 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18404 if { (eval echo "$as_me:18404: \"$ac_link\"") >&5
18405   (eval $ac_link) 2>&5
18406   ac_status=$?
18407   echo "$as_me:18407: \$? = $ac_status" >&5
18408   (exit "$ac_status"); } &&
18409          { ac_try='test -s "conftest$ac_exeext"'
18410   { (eval echo "$as_me:18410: \"$ac_try\"") >&5
18411   (eval $ac_try) 2>&5
18412   ac_status=$?
18413   echo "$as_me:18413: \$? = $ac_status" >&5
18414   (exit "$ac_status"); }; }; then
18415   cf_cv_need_libm=no
18416 else
18417   echo "$as_me: failed program was:" >&5
18418 cat "conftest.$ac_ext" >&5
18419 cf_cv_need_libm=yes
18420 fi
18421 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18422 fi
18423 echo "$as_me:18423: result: $cf_cv_need_libm" >&5
18424 echo "${ECHO_T}$cf_cv_need_libm" >&6
18425 if test "$cf_cv_need_libm" = yes
18426 then
18427 MATH_LIB=-lm
18428 fi
18429
18430 ###     Checks for header files.
18431 echo "$as_me:18431: checking for ANSI C header files" >&5
18432 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18433 if test "${ac_cv_header_stdc+set}" = set; then
18434   echo $ECHO_N "(cached) $ECHO_C" >&6
18435 else
18436   cat >"conftest.$ac_ext" <<_ACEOF
18437 #line 18437 "configure"
18438 #include "confdefs.h"
18439 #include <stdlib.h>
18440 #include <stdarg.h>
18441 #include <string.h>
18442 #include <float.h>
18443
18444 _ACEOF
18445 if { (eval echo "$as_me:18445: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18446   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18447   ac_status=$?
18448   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18449   rm -f conftest.er1
18450   cat conftest.err >&5
18451   echo "$as_me:18451: \$? = $ac_status" >&5
18452   (exit "$ac_status"); } >/dev/null; then
18453   if test -s conftest.err; then
18454     ac_cpp_err=$ac_c_preproc_warn_flag
18455   else
18456     ac_cpp_err=
18457   fi
18458 else
18459   ac_cpp_err=yes
18460 fi
18461 if test -z "$ac_cpp_err"; then
18462   ac_cv_header_stdc=yes
18463 else
18464   echo "$as_me: failed program was:" >&5
18465   cat "conftest.$ac_ext" >&5
18466   ac_cv_header_stdc=no
18467 fi
18468 rm -f conftest.err "conftest.$ac_ext"
18469
18470 if test $ac_cv_header_stdc = yes; then
18471   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18472   cat >"conftest.$ac_ext" <<_ACEOF
18473 #line 18473 "configure"
18474 #include "confdefs.h"
18475 #include <string.h>
18476
18477 _ACEOF
18478 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18479   $EGREP "memchr" >/dev/null 2>&1; then
18480   :
18481 else
18482   ac_cv_header_stdc=no
18483 fi
18484 rm -rf conftest*
18485
18486 fi
18487
18488 if test $ac_cv_header_stdc = yes; then
18489   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18490   cat >"conftest.$ac_ext" <<_ACEOF
18491 #line 18491 "configure"
18492 #include "confdefs.h"
18493 #include <stdlib.h>
18494
18495 _ACEOF
18496 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18497   $EGREP "free" >/dev/null 2>&1; then
18498   :
18499 else
18500   ac_cv_header_stdc=no
18501 fi
18502 rm -rf conftest*
18503
18504 fi
18505
18506 if test $ac_cv_header_stdc = yes; then
18507   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18508   if test "$cross_compiling" = yes; then
18509   :
18510 else
18511   cat >"conftest.$ac_ext" <<_ACEOF
18512 #line 18512 "configure"
18513 #include "confdefs.h"
18514 #include <ctype.h>
18515 #if ((' ' & 0x0FF) == 0x020)
18516 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18517 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18518 #else
18519 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18520                      || ('j' <= (c) && (c) <= 'r') \
18521                      || ('s' <= (c) && (c) <= 'z'))
18522 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18523 #endif
18524
18525 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18526 int
18527 main (void)
18528 {
18529   int i;
18530   for (i = 0; i < 256; i++)
18531     if (XOR (islower (i), ISLOWER (i))
18532         || toupper (i) != TOUPPER (i))
18533       $ac_main_return(2);
18534   $ac_main_return (0);
18535 }
18536 _ACEOF
18537 rm -f "conftest$ac_exeext"
18538 if { (eval echo "$as_me:18538: \"$ac_link\"") >&5
18539   (eval $ac_link) 2>&5
18540   ac_status=$?
18541   echo "$as_me:18541: \$? = $ac_status" >&5
18542   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18543   { (eval echo "$as_me:18543: \"$ac_try\"") >&5
18544   (eval $ac_try) 2>&5
18545   ac_status=$?
18546   echo "$as_me:18546: \$? = $ac_status" >&5
18547   (exit "$ac_status"); }; }; then
18548   :
18549 else
18550   echo "$as_me: program exited with status $ac_status" >&5
18551 echo "$as_me: failed program was:" >&5
18552 cat "conftest.$ac_ext" >&5
18553 ac_cv_header_stdc=no
18554 fi
18555 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18556 fi
18557 fi
18558 fi
18559 echo "$as_me:18559: result: $ac_cv_header_stdc" >&5
18560 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18561 if test $ac_cv_header_stdc = yes; then
18562
18563 cat >>confdefs.h <<\EOF
18564 #define STDC_HEADERS 1
18565 EOF
18566
18567 fi
18568
18569 ac_header_dirent=no
18570 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18571   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18572 echo "$as_me:18572: checking for $ac_hdr that defines DIR" >&5
18573 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18574 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18575   echo $ECHO_N "(cached) $ECHO_C" >&6
18576 else
18577   cat >"conftest.$ac_ext" <<_ACEOF
18578 #line 18578 "configure"
18579 #include "confdefs.h"
18580 #include <sys/types.h>
18581 #include <$ac_hdr>
18582
18583 int
18584 main (void)
18585 {
18586 if ((DIR *) 0)
18587 return 0;
18588   ;
18589   return 0;
18590 }
18591 _ACEOF
18592 rm -f "conftest.$ac_objext"
18593 if { (eval echo "$as_me:18593: \"$ac_compile\"") >&5
18594   (eval $ac_compile) 2>&5
18595   ac_status=$?
18596   echo "$as_me:18596: \$? = $ac_status" >&5
18597   (exit "$ac_status"); } &&
18598          { ac_try='test -s "conftest.$ac_objext"'
18599   { (eval echo "$as_me:18599: \"$ac_try\"") >&5
18600   (eval $ac_try) 2>&5
18601   ac_status=$?
18602   echo "$as_me:18602: \$? = $ac_status" >&5
18603   (exit "$ac_status"); }; }; then
18604   eval "$as_ac_Header=yes"
18605 else
18606   echo "$as_me: failed program was:" >&5
18607 cat "conftest.$ac_ext" >&5
18608 eval "$as_ac_Header=no"
18609 fi
18610 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18611 fi
18612 echo "$as_me:18612: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18613 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18614 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18615   cat >>confdefs.h <<EOF
18616 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18617 EOF
18618
18619 ac_header_dirent=$ac_hdr; break
18620 fi
18621
18622 done
18623 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18624 if test $ac_header_dirent = dirent.h; then
18625   echo "$as_me:18625: checking for opendir in -ldir" >&5
18626 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18627 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18628   echo $ECHO_N "(cached) $ECHO_C" >&6
18629 else
18630   ac_check_lib_save_LIBS=$LIBS
18631 LIBS="-ldir  $LIBS"
18632 cat >"conftest.$ac_ext" <<_ACEOF
18633 #line 18633 "configure"
18634 #include "confdefs.h"
18635
18636 /* Override any gcc2 internal prototype to avoid an error.  */
18637 #ifdef __cplusplus
18638 extern "C"
18639 #endif
18640 /* We use char because int might match the return type of a gcc2
18641    builtin and then its argument prototype would still apply.  */
18642 char opendir ();
18643 int
18644 main (void)
18645 {
18646 opendir ();
18647   ;
18648   return 0;
18649 }
18650 _ACEOF
18651 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18652 if { (eval echo "$as_me:18652: \"$ac_link\"") >&5
18653   (eval $ac_link) 2>&5
18654   ac_status=$?
18655   echo "$as_me:18655: \$? = $ac_status" >&5
18656   (exit "$ac_status"); } &&
18657          { ac_try='test -s "conftest$ac_exeext"'
18658   { (eval echo "$as_me:18658: \"$ac_try\"") >&5
18659   (eval $ac_try) 2>&5
18660   ac_status=$?
18661   echo "$as_me:18661: \$? = $ac_status" >&5
18662   (exit "$ac_status"); }; }; then
18663   ac_cv_lib_dir_opendir=yes
18664 else
18665   echo "$as_me: failed program was:" >&5
18666 cat "conftest.$ac_ext" >&5
18667 ac_cv_lib_dir_opendir=no
18668 fi
18669 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18670 LIBS=$ac_check_lib_save_LIBS
18671 fi
18672 echo "$as_me:18672: result: $ac_cv_lib_dir_opendir" >&5
18673 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18674 if test "$ac_cv_lib_dir_opendir" = yes; then
18675   LIBS="$LIBS -ldir"
18676 fi
18677
18678 else
18679   echo "$as_me:18679: checking for opendir in -lx" >&5
18680 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18681 if test "${ac_cv_lib_x_opendir+set}" = set; then
18682   echo $ECHO_N "(cached) $ECHO_C" >&6
18683 else
18684   ac_check_lib_save_LIBS=$LIBS
18685 LIBS="-lx  $LIBS"
18686 cat >"conftest.$ac_ext" <<_ACEOF
18687 #line 18687 "configure"
18688 #include "confdefs.h"
18689
18690 /* Override any gcc2 internal prototype to avoid an error.  */
18691 #ifdef __cplusplus
18692 extern "C"
18693 #endif
18694 /* We use char because int might match the return type of a gcc2
18695    builtin and then its argument prototype would still apply.  */
18696 char opendir ();
18697 int
18698 main (void)
18699 {
18700 opendir ();
18701   ;
18702   return 0;
18703 }
18704 _ACEOF
18705 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18706 if { (eval echo "$as_me:18706: \"$ac_link\"") >&5
18707   (eval $ac_link) 2>&5
18708   ac_status=$?
18709   echo "$as_me:18709: \$? = $ac_status" >&5
18710   (exit "$ac_status"); } &&
18711          { ac_try='test -s "conftest$ac_exeext"'
18712   { (eval echo "$as_me:18712: \"$ac_try\"") >&5
18713   (eval $ac_try) 2>&5
18714   ac_status=$?
18715   echo "$as_me:18715: \$? = $ac_status" >&5
18716   (exit "$ac_status"); }; }; then
18717   ac_cv_lib_x_opendir=yes
18718 else
18719   echo "$as_me: failed program was:" >&5
18720 cat "conftest.$ac_ext" >&5
18721 ac_cv_lib_x_opendir=no
18722 fi
18723 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18724 LIBS=$ac_check_lib_save_LIBS
18725 fi
18726 echo "$as_me:18726: result: $ac_cv_lib_x_opendir" >&5
18727 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18728 if test "$ac_cv_lib_x_opendir" = yes; then
18729   LIBS="$LIBS -lx"
18730 fi
18731
18732 fi
18733
18734 echo "$as_me:18734: checking whether time.h and sys/time.h may both be included" >&5
18735 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18736 if test "${ac_cv_header_time+set}" = set; then
18737   echo $ECHO_N "(cached) $ECHO_C" >&6
18738 else
18739   cat >"conftest.$ac_ext" <<_ACEOF
18740 #line 18740 "configure"
18741 #include "confdefs.h"
18742 #include <sys/types.h>
18743 #include <sys/time.h>
18744 #include <time.h>
18745
18746 int
18747 main (void)
18748 {
18749 if ((struct tm *) 0)
18750 return 0;
18751   ;
18752   return 0;
18753 }
18754 _ACEOF
18755 rm -f "conftest.$ac_objext"
18756 if { (eval echo "$as_me:18756: \"$ac_compile\"") >&5
18757   (eval $ac_compile) 2>&5
18758   ac_status=$?
18759   echo "$as_me:18759: \$? = $ac_status" >&5
18760   (exit "$ac_status"); } &&
18761          { ac_try='test -s "conftest.$ac_objext"'
18762   { (eval echo "$as_me:18762: \"$ac_try\"") >&5
18763   (eval $ac_try) 2>&5
18764   ac_status=$?
18765   echo "$as_me:18765: \$? = $ac_status" >&5
18766   (exit "$ac_status"); }; }; then
18767   ac_cv_header_time=yes
18768 else
18769   echo "$as_me: failed program was:" >&5
18770 cat "conftest.$ac_ext" >&5
18771 ac_cv_header_time=no
18772 fi
18773 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18774 fi
18775 echo "$as_me:18775: result: $ac_cv_header_time" >&5
18776 echo "${ECHO_T}$ac_cv_header_time" >&6
18777 if test $ac_cv_header_time = yes; then
18778
18779 cat >>confdefs.h <<\EOF
18780 #define TIME_WITH_SYS_TIME 1
18781 EOF
18782
18783 fi
18784
18785 cf_regex_func=no
18786 cf_regex_libs=
18787 case "$host_os" in
18788 (mingw*)
18789         # -lsystre -ltre -lintl -liconv
18790         echo "$as_me:18790: checking for regcomp in -lsystre" >&5
18791 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
18792 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
18793   echo $ECHO_N "(cached) $ECHO_C" >&6
18794 else
18795   ac_check_lib_save_LIBS=$LIBS
18796 LIBS="-lsystre  $LIBS"
18797 cat >"conftest.$ac_ext" <<_ACEOF
18798 #line 18798 "configure"
18799 #include "confdefs.h"
18800
18801 /* Override any gcc2 internal prototype to avoid an error.  */
18802 #ifdef __cplusplus
18803 extern "C"
18804 #endif
18805 /* We use char because int might match the return type of a gcc2
18806    builtin and then its argument prototype would still apply.  */
18807 char regcomp ();
18808 int
18809 main (void)
18810 {
18811 regcomp ();
18812   ;
18813   return 0;
18814 }
18815 _ACEOF
18816 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18817 if { (eval echo "$as_me:18817: \"$ac_link\"") >&5
18818   (eval $ac_link) 2>&5
18819   ac_status=$?
18820   echo "$as_me:18820: \$? = $ac_status" >&5
18821   (exit "$ac_status"); } &&
18822          { ac_try='test -s "conftest$ac_exeext"'
18823   { (eval echo "$as_me:18823: \"$ac_try\"") >&5
18824   (eval $ac_try) 2>&5
18825   ac_status=$?
18826   echo "$as_me:18826: \$? = $ac_status" >&5
18827   (exit "$ac_status"); }; }; then
18828   ac_cv_lib_systre_regcomp=yes
18829 else
18830   echo "$as_me: failed program was:" >&5
18831 cat "conftest.$ac_ext" >&5
18832 ac_cv_lib_systre_regcomp=no
18833 fi
18834 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18835 LIBS=$ac_check_lib_save_LIBS
18836 fi
18837 echo "$as_me:18837: result: $ac_cv_lib_systre_regcomp" >&5
18838 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
18839 if test "$ac_cv_lib_systre_regcomp" = yes; then
18840
18841                 echo "$as_me:18841: checking for libiconv_open in -liconv" >&5
18842 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
18843 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
18844   echo $ECHO_N "(cached) $ECHO_C" >&6
18845 else
18846   ac_check_lib_save_LIBS=$LIBS
18847 LIBS="-liconv  $LIBS"
18848 cat >"conftest.$ac_ext" <<_ACEOF
18849 #line 18849 "configure"
18850 #include "confdefs.h"
18851
18852 /* Override any gcc2 internal prototype to avoid an error.  */
18853 #ifdef __cplusplus
18854 extern "C"
18855 #endif
18856 /* We use char because int might match the return type of a gcc2
18857    builtin and then its argument prototype would still apply.  */
18858 char libiconv_open ();
18859 int
18860 main (void)
18861 {
18862 libiconv_open ();
18863   ;
18864   return 0;
18865 }
18866 _ACEOF
18867 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18868 if { (eval echo "$as_me:18868: \"$ac_link\"") >&5
18869   (eval $ac_link) 2>&5
18870   ac_status=$?
18871   echo "$as_me:18871: \$? = $ac_status" >&5
18872   (exit "$ac_status"); } &&
18873          { ac_try='test -s "conftest$ac_exeext"'
18874   { (eval echo "$as_me:18874: \"$ac_try\"") >&5
18875   (eval $ac_try) 2>&5
18876   ac_status=$?
18877   echo "$as_me:18877: \$? = $ac_status" >&5
18878   (exit "$ac_status"); }; }; then
18879   ac_cv_lib_iconv_libiconv_open=yes
18880 else
18881   echo "$as_me: failed program was:" >&5
18882 cat "conftest.$ac_ext" >&5
18883 ac_cv_lib_iconv_libiconv_open=no
18884 fi
18885 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18886 LIBS=$ac_check_lib_save_LIBS
18887 fi
18888 echo "$as_me:18888: result: $ac_cv_lib_iconv_libiconv_open" >&5
18889 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
18890 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
18891
18892 cf_add_libs="$LIBS"
18893 # reverse order
18894 cf_add_0lib=
18895 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18896 # filter duplicates
18897 for cf_add_1lib in $cf_add_0lib; do
18898         for cf_add_2lib in $cf_add_libs; do
18899                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18900                         cf_add_1lib=
18901                         break
18902                 fi
18903         done
18904         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18905 done
18906 LIBS="$cf_add_libs"
18907
18908 fi
18909
18910                 echo "$as_me:18910: checking for libintl_gettext in -lintl" >&5
18911 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
18912 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
18913   echo $ECHO_N "(cached) $ECHO_C" >&6
18914 else
18915   ac_check_lib_save_LIBS=$LIBS
18916 LIBS="-lintl  $LIBS"
18917 cat >"conftest.$ac_ext" <<_ACEOF
18918 #line 18918 "configure"
18919 #include "confdefs.h"
18920
18921 /* Override any gcc2 internal prototype to avoid an error.  */
18922 #ifdef __cplusplus
18923 extern "C"
18924 #endif
18925 /* We use char because int might match the return type of a gcc2
18926    builtin and then its argument prototype would still apply.  */
18927 char libintl_gettext ();
18928 int
18929 main (void)
18930 {
18931 libintl_gettext ();
18932   ;
18933   return 0;
18934 }
18935 _ACEOF
18936 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18937 if { (eval echo "$as_me:18937: \"$ac_link\"") >&5
18938   (eval $ac_link) 2>&5
18939   ac_status=$?
18940   echo "$as_me:18940: \$? = $ac_status" >&5
18941   (exit "$ac_status"); } &&
18942          { ac_try='test -s "conftest$ac_exeext"'
18943   { (eval echo "$as_me:18943: \"$ac_try\"") >&5
18944   (eval $ac_try) 2>&5
18945   ac_status=$?
18946   echo "$as_me:18946: \$? = $ac_status" >&5
18947   (exit "$ac_status"); }; }; then
18948   ac_cv_lib_intl_libintl_gettext=yes
18949 else
18950   echo "$as_me: failed program was:" >&5
18951 cat "conftest.$ac_ext" >&5
18952 ac_cv_lib_intl_libintl_gettext=no
18953 fi
18954 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18955 LIBS=$ac_check_lib_save_LIBS
18956 fi
18957 echo "$as_me:18957: result: $ac_cv_lib_intl_libintl_gettext" >&5
18958 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
18959 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
18960
18961 cf_add_libs="$LIBS"
18962 # reverse order
18963 cf_add_0lib=
18964 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18965 # filter duplicates
18966 for cf_add_1lib in $cf_add_0lib; do
18967         for cf_add_2lib in $cf_add_libs; do
18968                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18969                         cf_add_1lib=
18970                         break
18971                 fi
18972         done
18973         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18974 done
18975 LIBS="$cf_add_libs"
18976
18977 fi
18978
18979                 echo "$as_me:18979: checking for tre_regcomp in -ltre" >&5
18980 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
18981 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
18982   echo $ECHO_N "(cached) $ECHO_C" >&6
18983 else
18984   ac_check_lib_save_LIBS=$LIBS
18985 LIBS="-ltre  $LIBS"
18986 cat >"conftest.$ac_ext" <<_ACEOF
18987 #line 18987 "configure"
18988 #include "confdefs.h"
18989
18990 /* Override any gcc2 internal prototype to avoid an error.  */
18991 #ifdef __cplusplus
18992 extern "C"
18993 #endif
18994 /* We use char because int might match the return type of a gcc2
18995    builtin and then its argument prototype would still apply.  */
18996 char tre_regcomp ();
18997 int
18998 main (void)
18999 {
19000 tre_regcomp ();
19001   ;
19002   return 0;
19003 }
19004 _ACEOF
19005 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19006 if { (eval echo "$as_me:19006: \"$ac_link\"") >&5
19007   (eval $ac_link) 2>&5
19008   ac_status=$?
19009   echo "$as_me:19009: \$? = $ac_status" >&5
19010   (exit "$ac_status"); } &&
19011          { ac_try='test -s "conftest$ac_exeext"'
19012   { (eval echo "$as_me:19012: \"$ac_try\"") >&5
19013   (eval $ac_try) 2>&5
19014   ac_status=$?
19015   echo "$as_me:19015: \$? = $ac_status" >&5
19016   (exit "$ac_status"); }; }; then
19017   ac_cv_lib_tre_tre_regcomp=yes
19018 else
19019   echo "$as_me: failed program was:" >&5
19020 cat "conftest.$ac_ext" >&5
19021 ac_cv_lib_tre_tre_regcomp=no
19022 fi
19023 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19024 LIBS=$ac_check_lib_save_LIBS
19025 fi
19026 echo "$as_me:19026: result: $ac_cv_lib_tre_tre_regcomp" >&5
19027 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19028 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19029
19030 cf_add_libs="$LIBS"
19031 # reverse order
19032 cf_add_0lib=
19033 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19034 # filter duplicates
19035 for cf_add_1lib in $cf_add_0lib; do
19036         for cf_add_2lib in $cf_add_libs; do
19037                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19038                         cf_add_1lib=
19039                         break
19040                 fi
19041         done
19042         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19043 done
19044 LIBS="$cf_add_libs"
19045
19046 fi
19047
19048 cf_add_libs="$LIBS"
19049 # reverse order
19050 cf_add_0lib=
19051 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19052 # filter duplicates
19053 for cf_add_1lib in $cf_add_0lib; do
19054         for cf_add_2lib in $cf_add_libs; do
19055                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19056                         cf_add_1lib=
19057                         break
19058                 fi
19059         done
19060         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19061 done
19062 LIBS="$cf_add_libs"
19063
19064                 cf_regex_func=regcomp
19065
19066 else
19067
19068                 echo "$as_me:19068: checking for regcomp in -lgnurx" >&5
19069 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19070 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19071   echo $ECHO_N "(cached) $ECHO_C" >&6
19072 else
19073   ac_check_lib_save_LIBS=$LIBS
19074 LIBS="-lgnurx  $LIBS"
19075 cat >"conftest.$ac_ext" <<_ACEOF
19076 #line 19076 "configure"
19077 #include "confdefs.h"
19078
19079 /* Override any gcc2 internal prototype to avoid an error.  */
19080 #ifdef __cplusplus
19081 extern "C"
19082 #endif
19083 /* We use char because int might match the return type of a gcc2
19084    builtin and then its argument prototype would still apply.  */
19085 char regcomp ();
19086 int
19087 main (void)
19088 {
19089 regcomp ();
19090   ;
19091   return 0;
19092 }
19093 _ACEOF
19094 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19095 if { (eval echo "$as_me:19095: \"$ac_link\"") >&5
19096   (eval $ac_link) 2>&5
19097   ac_status=$?
19098   echo "$as_me:19098: \$? = $ac_status" >&5
19099   (exit "$ac_status"); } &&
19100          { ac_try='test -s "conftest$ac_exeext"'
19101   { (eval echo "$as_me:19101: \"$ac_try\"") >&5
19102   (eval $ac_try) 2>&5
19103   ac_status=$?
19104   echo "$as_me:19104: \$? = $ac_status" >&5
19105   (exit "$ac_status"); }; }; then
19106   ac_cv_lib_gnurx_regcomp=yes
19107 else
19108   echo "$as_me: failed program was:" >&5
19109 cat "conftest.$ac_ext" >&5
19110 ac_cv_lib_gnurx_regcomp=no
19111 fi
19112 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19113 LIBS=$ac_check_lib_save_LIBS
19114 fi
19115 echo "$as_me:19115: result: $ac_cv_lib_gnurx_regcomp" >&5
19116 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19117 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19118
19119 cf_add_libs="$LIBS"
19120 # reverse order
19121 cf_add_0lib=
19122 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19123 # filter duplicates
19124 for cf_add_1lib in $cf_add_0lib; do
19125         for cf_add_2lib in $cf_add_libs; do
19126                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19127                         cf_add_1lib=
19128                         break
19129                 fi
19130         done
19131         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19132 done
19133 LIBS="$cf_add_libs"
19134
19135                         cf_regex_func=regcomp
19136 fi
19137
19138 fi
19139
19140         ;;
19141 (*)
19142         cf_regex_libs="regex re"
19143         echo "$as_me:19143: checking for regcomp" >&5
19144 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19145 if test "${ac_cv_func_regcomp+set}" = set; then
19146   echo $ECHO_N "(cached) $ECHO_C" >&6
19147 else
19148   cat >"conftest.$ac_ext" <<_ACEOF
19149 #line 19149 "configure"
19150 #include "confdefs.h"
19151 #define regcomp autoconf_temporary
19152 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19153 #undef regcomp
19154
19155 #ifdef __cplusplus
19156 extern "C"
19157 #endif
19158
19159 /* We use char because int might match the return type of a gcc2
19160    builtin and then its argument prototype would still apply.  */
19161 char regcomp (void);
19162
19163 int
19164 main (void)
19165 {
19166
19167 /* The GNU C library defines stubs for functions which it implements
19168     to always fail with ENOSYS.  Some functions are actually named
19169     something starting with __ and the normal name is an alias.  */
19170 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19171 #error found stub for regcomp
19172 #endif
19173
19174         return regcomp ();
19175   ;
19176   return 0;
19177 }
19178 _ACEOF
19179 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19180 if { (eval echo "$as_me:19180: \"$ac_link\"") >&5
19181   (eval $ac_link) 2>&5
19182   ac_status=$?
19183   echo "$as_me:19183: \$? = $ac_status" >&5
19184   (exit "$ac_status"); } &&
19185          { ac_try='test -s "conftest$ac_exeext"'
19186   { (eval echo "$as_me:19186: \"$ac_try\"") >&5
19187   (eval $ac_try) 2>&5
19188   ac_status=$?
19189   echo "$as_me:19189: \$? = $ac_status" >&5
19190   (exit "$ac_status"); }; }; then
19191   ac_cv_func_regcomp=yes
19192 else
19193   echo "$as_me: failed program was:" >&5
19194 cat "conftest.$ac_ext" >&5
19195 ac_cv_func_regcomp=no
19196 fi
19197 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19198 fi
19199 echo "$as_me:19199: result: $ac_cv_func_regcomp" >&5
19200 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19201 if test "$ac_cv_func_regcomp" = yes; then
19202   cf_regex_func=regcomp
19203 else
19204
19205                 for cf_regex_lib in $cf_regex_libs
19206                 do
19207                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19208 echo "$as_me:19208: checking for regcomp in -l$cf_regex_lib" >&5
19209 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19210 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19211   echo $ECHO_N "(cached) $ECHO_C" >&6
19212 else
19213   ac_check_lib_save_LIBS=$LIBS
19214 LIBS="-l$cf_regex_lib  $LIBS"
19215 cat >"conftest.$ac_ext" <<_ACEOF
19216 #line 19216 "configure"
19217 #include "confdefs.h"
19218
19219 /* Override any gcc2 internal prototype to avoid an error.  */
19220 #ifdef __cplusplus
19221 extern "C"
19222 #endif
19223 /* We use char because int might match the return type of a gcc2
19224    builtin and then its argument prototype would still apply.  */
19225 char regcomp ();
19226 int
19227 main (void)
19228 {
19229 regcomp ();
19230   ;
19231   return 0;
19232 }
19233 _ACEOF
19234 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19235 if { (eval echo "$as_me:19235: \"$ac_link\"") >&5
19236   (eval $ac_link) 2>&5
19237   ac_status=$?
19238   echo "$as_me:19238: \$? = $ac_status" >&5
19239   (exit "$ac_status"); } &&
19240          { ac_try='test -s "conftest$ac_exeext"'
19241   { (eval echo "$as_me:19241: \"$ac_try\"") >&5
19242   (eval $ac_try) 2>&5
19243   ac_status=$?
19244   echo "$as_me:19244: \$? = $ac_status" >&5
19245   (exit "$ac_status"); }; }; then
19246   eval "$as_ac_Lib=yes"
19247 else
19248   echo "$as_me: failed program was:" >&5
19249 cat "conftest.$ac_ext" >&5
19250 eval "$as_ac_Lib=no"
19251 fi
19252 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19253 LIBS=$ac_check_lib_save_LIBS
19254 fi
19255 echo "$as_me:19255: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19256 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19257 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19258
19259 cf_add_libs="$LIBS"
19260 # reverse order
19261 cf_add_0lib=
19262 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19263 # filter duplicates
19264 for cf_add_1lib in $cf_add_0lib; do
19265         for cf_add_2lib in $cf_add_libs; do
19266                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19267                         cf_add_1lib=
19268                         break
19269                 fi
19270         done
19271         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19272 done
19273 LIBS="$cf_add_libs"
19274
19275                                         cf_regex_func=regcomp
19276                                         break
19277 fi
19278
19279                 done
19280
19281 fi
19282
19283         ;;
19284 esac
19285
19286 if test "$cf_regex_func" = no ; then
19287         echo "$as_me:19287: checking for compile" >&5
19288 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19289 if test "${ac_cv_func_compile+set}" = set; then
19290   echo $ECHO_N "(cached) $ECHO_C" >&6
19291 else
19292   cat >"conftest.$ac_ext" <<_ACEOF
19293 #line 19293 "configure"
19294 #include "confdefs.h"
19295 #define compile autoconf_temporary
19296 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19297 #undef compile
19298
19299 #ifdef __cplusplus
19300 extern "C"
19301 #endif
19302
19303 /* We use char because int might match the return type of a gcc2
19304    builtin and then its argument prototype would still apply.  */
19305 char compile (void);
19306
19307 int
19308 main (void)
19309 {
19310
19311 /* The GNU C library defines stubs for functions which it implements
19312     to always fail with ENOSYS.  Some functions are actually named
19313     something starting with __ and the normal name is an alias.  */
19314 #if defined (__stub_compile) || defined (__stub___compile)
19315 #error found stub for compile
19316 #endif
19317
19318         return compile ();
19319   ;
19320   return 0;
19321 }
19322 _ACEOF
19323 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19324 if { (eval echo "$as_me:19324: \"$ac_link\"") >&5
19325   (eval $ac_link) 2>&5
19326   ac_status=$?
19327   echo "$as_me:19327: \$? = $ac_status" >&5
19328   (exit "$ac_status"); } &&
19329          { ac_try='test -s "conftest$ac_exeext"'
19330   { (eval echo "$as_me:19330: \"$ac_try\"") >&5
19331   (eval $ac_try) 2>&5
19332   ac_status=$?
19333   echo "$as_me:19333: \$? = $ac_status" >&5
19334   (exit "$ac_status"); }; }; then
19335   ac_cv_func_compile=yes
19336 else
19337   echo "$as_me: failed program was:" >&5
19338 cat "conftest.$ac_ext" >&5
19339 ac_cv_func_compile=no
19340 fi
19341 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19342 fi
19343 echo "$as_me:19343: result: $ac_cv_func_compile" >&5
19344 echo "${ECHO_T}$ac_cv_func_compile" >&6
19345 if test "$ac_cv_func_compile" = yes; then
19346   cf_regex_func=compile
19347 else
19348
19349                 echo "$as_me:19349: checking for compile in -lgen" >&5
19350 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19351 if test "${ac_cv_lib_gen_compile+set}" = set; then
19352   echo $ECHO_N "(cached) $ECHO_C" >&6
19353 else
19354   ac_check_lib_save_LIBS=$LIBS
19355 LIBS="-lgen  $LIBS"
19356 cat >"conftest.$ac_ext" <<_ACEOF
19357 #line 19357 "configure"
19358 #include "confdefs.h"
19359
19360 /* Override any gcc2 internal prototype to avoid an error.  */
19361 #ifdef __cplusplus
19362 extern "C"
19363 #endif
19364 /* We use char because int might match the return type of a gcc2
19365    builtin and then its argument prototype would still apply.  */
19366 char compile ();
19367 int
19368 main (void)
19369 {
19370 compile ();
19371   ;
19372   return 0;
19373 }
19374 _ACEOF
19375 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19376 if { (eval echo "$as_me:19376: \"$ac_link\"") >&5
19377   (eval $ac_link) 2>&5
19378   ac_status=$?
19379   echo "$as_me:19379: \$? = $ac_status" >&5
19380   (exit "$ac_status"); } &&
19381          { ac_try='test -s "conftest$ac_exeext"'
19382   { (eval echo "$as_me:19382: \"$ac_try\"") >&5
19383   (eval $ac_try) 2>&5
19384   ac_status=$?
19385   echo "$as_me:19385: \$? = $ac_status" >&5
19386   (exit "$ac_status"); }; }; then
19387   ac_cv_lib_gen_compile=yes
19388 else
19389   echo "$as_me: failed program was:" >&5
19390 cat "conftest.$ac_ext" >&5
19391 ac_cv_lib_gen_compile=no
19392 fi
19393 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19394 LIBS=$ac_check_lib_save_LIBS
19395 fi
19396 echo "$as_me:19396: result: $ac_cv_lib_gen_compile" >&5
19397 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19398 if test "$ac_cv_lib_gen_compile" = yes; then
19399
19400 cf_add_libs="$LIBS"
19401 # reverse order
19402 cf_add_0lib=
19403 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19404 # filter duplicates
19405 for cf_add_1lib in $cf_add_0lib; do
19406         for cf_add_2lib in $cf_add_libs; do
19407                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19408                         cf_add_1lib=
19409                         break
19410                 fi
19411         done
19412         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19413 done
19414 LIBS="$cf_add_libs"
19415
19416                                 cf_regex_func=compile
19417 fi
19418
19419 fi
19420
19421 fi
19422
19423 if test "$cf_regex_func" = no ; then
19424         { echo "$as_me:19424: WARNING: cannot find regular expression library" >&5
19425 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19426 fi
19427
19428 echo "$as_me:19428: checking for regular-expression headers" >&5
19429 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19430 if test "${cf_cv_regex_hdrs+set}" = set; then
19431   echo $ECHO_N "(cached) $ECHO_C" >&6
19432 else
19433
19434 cf_cv_regex_hdrs=no
19435 case "$cf_regex_func" in
19436 (compile)
19437         for cf_regex_hdr in regexp.h regexpr.h
19438         do
19439                 cat >"conftest.$ac_ext" <<_ACEOF
19440 #line 19440 "configure"
19441 #include "confdefs.h"
19442 #include <$cf_regex_hdr>
19443 int
19444 main (void)
19445 {
19446
19447                         char *p = compile("", "", "", 0);
19448                         int x = step("", "");
19449                         (void)p;
19450                         (void)x;
19451
19452   ;
19453   return 0;
19454 }
19455 _ACEOF
19456 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19457 if { (eval echo "$as_me:19457: \"$ac_link\"") >&5
19458   (eval $ac_link) 2>&5
19459   ac_status=$?
19460   echo "$as_me:19460: \$? = $ac_status" >&5
19461   (exit "$ac_status"); } &&
19462          { ac_try='test -s "conftest$ac_exeext"'
19463   { (eval echo "$as_me:19463: \"$ac_try\"") >&5
19464   (eval $ac_try) 2>&5
19465   ac_status=$?
19466   echo "$as_me:19466: \$? = $ac_status" >&5
19467   (exit "$ac_status"); }; }; then
19468
19469                         cf_cv_regex_hdrs=$cf_regex_hdr
19470                         break
19471
19472 else
19473   echo "$as_me: failed program was:" >&5
19474 cat "conftest.$ac_ext" >&5
19475 fi
19476 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19477         done
19478         ;;
19479 (*)
19480         for cf_regex_hdr in regex.h
19481         do
19482                 cat >"conftest.$ac_ext" <<_ACEOF
19483 #line 19483 "configure"
19484 #include "confdefs.h"
19485 #include <sys/types.h>
19486 #include <$cf_regex_hdr>
19487 int
19488 main (void)
19489 {
19490
19491                         regex_t *p = 0;
19492                         int x = regcomp(p, "", 0);
19493                         int y = regexec(p, "", 0, 0, 0);
19494                         (void)x;
19495                         (void)y;
19496                         regfree(p);
19497
19498   ;
19499   return 0;
19500 }
19501 _ACEOF
19502 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19503 if { (eval echo "$as_me:19503: \"$ac_link\"") >&5
19504   (eval $ac_link) 2>&5
19505   ac_status=$?
19506   echo "$as_me:19506: \$? = $ac_status" >&5
19507   (exit "$ac_status"); } &&
19508          { ac_try='test -s "conftest$ac_exeext"'
19509   { (eval echo "$as_me:19509: \"$ac_try\"") >&5
19510   (eval $ac_try) 2>&5
19511   ac_status=$?
19512   echo "$as_me:19512: \$? = $ac_status" >&5
19513   (exit "$ac_status"); }; }; then
19514
19515                         cf_cv_regex_hdrs=$cf_regex_hdr
19516                         break
19517
19518 else
19519   echo "$as_me: failed program was:" >&5
19520 cat "conftest.$ac_ext" >&5
19521 fi
19522 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19523         done
19524         ;;
19525 esac
19526
19527 fi
19528 echo "$as_me:19528: result: $cf_cv_regex_hdrs" >&5
19529 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19530
19531 case "$cf_cv_regex_hdrs" in
19532         (no)            { echo "$as_me:19532: WARNING: no regular expression header found" >&5
19533 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19534         (regex.h)
19535 cat >>confdefs.h <<\EOF
19536 #define HAVE_REGEX_H_FUNCS 1
19537 EOF
19538  ;;
19539         (regexp.h)
19540 cat >>confdefs.h <<\EOF
19541 #define HAVE_REGEXP_H_FUNCS 1
19542 EOF
19543  ;;
19544         (regexpr.h)
19545 cat >>confdefs.h <<\EOF
19546 #define HAVE_REGEXPR_H_FUNCS 1
19547 EOF
19548  ;;
19549 esac
19550
19551 for ac_header in \
19552 fcntl.h \
19553 getopt.h \
19554 limits.h \
19555 locale.h \
19556 math.h \
19557 poll.h \
19558 sys/ioctl.h \
19559 sys/param.h \
19560 sys/poll.h \
19561 sys/select.h \
19562 sys/time.h \
19563 sys/times.h \
19564 ttyent.h \
19565 unistd.h \
19566 wctype.h \
19567
19568 do
19569 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19570 echo "$as_me:19570: checking for $ac_header" >&5
19571 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19572 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19573   echo $ECHO_N "(cached) $ECHO_C" >&6
19574 else
19575   cat >"conftest.$ac_ext" <<_ACEOF
19576 #line 19576 "configure"
19577 #include "confdefs.h"
19578 #include <$ac_header>
19579 _ACEOF
19580 if { (eval echo "$as_me:19580: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19581   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19582   ac_status=$?
19583   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19584   rm -f conftest.er1
19585   cat conftest.err >&5
19586   echo "$as_me:19586: \$? = $ac_status" >&5
19587   (exit "$ac_status"); } >/dev/null; then
19588   if test -s conftest.err; then
19589     ac_cpp_err=$ac_c_preproc_warn_flag
19590   else
19591     ac_cpp_err=
19592   fi
19593 else
19594   ac_cpp_err=yes
19595 fi
19596 if test -z "$ac_cpp_err"; then
19597   eval "$as_ac_Header=yes"
19598 else
19599   echo "$as_me: failed program was:" >&5
19600   cat "conftest.$ac_ext" >&5
19601   eval "$as_ac_Header=no"
19602 fi
19603 rm -f conftest.err "conftest.$ac_ext"
19604 fi
19605 echo "$as_me:19605: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19606 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19607 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19608   cat >>confdefs.h <<EOF
19609 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19610 EOF
19611
19612 fi
19613 done
19614
19615 for ac_header in unistd.h getopt.h
19616 do
19617 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19618 echo "$as_me:19618: checking for $ac_header" >&5
19619 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19620 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19621   echo $ECHO_N "(cached) $ECHO_C" >&6
19622 else
19623   cat >"conftest.$ac_ext" <<_ACEOF
19624 #line 19624 "configure"
19625 #include "confdefs.h"
19626 #include <$ac_header>
19627 _ACEOF
19628 if { (eval echo "$as_me:19628: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19629   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19630   ac_status=$?
19631   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19632   rm -f conftest.er1
19633   cat conftest.err >&5
19634   echo "$as_me:19634: \$? = $ac_status" >&5
19635   (exit "$ac_status"); } >/dev/null; then
19636   if test -s conftest.err; then
19637     ac_cpp_err=$ac_c_preproc_warn_flag
19638   else
19639     ac_cpp_err=
19640   fi
19641 else
19642   ac_cpp_err=yes
19643 fi
19644 if test -z "$ac_cpp_err"; then
19645   eval "$as_ac_Header=yes"
19646 else
19647   echo "$as_me: failed program was:" >&5
19648   cat "conftest.$ac_ext" >&5
19649   eval "$as_ac_Header=no"
19650 fi
19651 rm -f conftest.err "conftest.$ac_ext"
19652 fi
19653 echo "$as_me:19653: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19654 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19655 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19656   cat >>confdefs.h <<EOF
19657 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19658 EOF
19659
19660 fi
19661 done
19662
19663 echo "$as_me:19663: checking for header declaring getopt variables" >&5
19664 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19665 if test "${cf_cv_getopt_header+set}" = set; then
19666   echo $ECHO_N "(cached) $ECHO_C" >&6
19667 else
19668
19669 cf_cv_getopt_header=none
19670 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19671 do
19672 cat >"conftest.$ac_ext" <<_ACEOF
19673 #line 19673 "configure"
19674 #include "confdefs.h"
19675
19676 #include <$cf_header>
19677 int
19678 main (void)
19679 {
19680 int x = optind; char *y = optarg
19681   ;
19682   return 0;
19683 }
19684 _ACEOF
19685 rm -f "conftest.$ac_objext"
19686 if { (eval echo "$as_me:19686: \"$ac_compile\"") >&5
19687   (eval $ac_compile) 2>&5
19688   ac_status=$?
19689   echo "$as_me:19689: \$? = $ac_status" >&5
19690   (exit "$ac_status"); } &&
19691          { ac_try='test -s "conftest.$ac_objext"'
19692   { (eval echo "$as_me:19692: \"$ac_try\"") >&5
19693   (eval $ac_try) 2>&5
19694   ac_status=$?
19695   echo "$as_me:19695: \$? = $ac_status" >&5
19696   (exit "$ac_status"); }; }; then
19697   cf_cv_getopt_header=$cf_header
19698  break
19699 else
19700   echo "$as_me: failed program was:" >&5
19701 cat "conftest.$ac_ext" >&5
19702 fi
19703 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19704 done
19705
19706 fi
19707 echo "$as_me:19707: result: $cf_cv_getopt_header" >&5
19708 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19709 if test "$cf_cv_getopt_header" != none ; then
19710
19711 cat >>confdefs.h <<\EOF
19712 #define HAVE_GETOPT_HEADER 1
19713 EOF
19714
19715 fi
19716 if test "$cf_cv_getopt_header" = getopt.h ; then
19717
19718 cat >>confdefs.h <<\EOF
19719 #define NEED_GETOPT_H 1
19720 EOF
19721
19722 fi
19723
19724 echo "$as_me:19724: checking if external environ is declared" >&5
19725 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19726 if test "${cf_cv_dcl_environ+set}" = set; then
19727   echo $ECHO_N "(cached) $ECHO_C" >&6
19728 else
19729
19730     cat >"conftest.$ac_ext" <<_ACEOF
19731 #line 19731 "configure"
19732 #include "confdefs.h"
19733
19734 #ifdef HAVE_STDLIB_H
19735 #include <stdlib.h>
19736 #endif
19737 #include <unistd.h>
19738 int
19739 main (void)
19740 {
19741 int x = (int) environ
19742   ;
19743   return 0;
19744 }
19745 _ACEOF
19746 rm -f "conftest.$ac_objext"
19747 if { (eval echo "$as_me:19747: \"$ac_compile\"") >&5
19748   (eval $ac_compile) 2>&5
19749   ac_status=$?
19750   echo "$as_me:19750: \$? = $ac_status" >&5
19751   (exit "$ac_status"); } &&
19752          { ac_try='test -s "conftest.$ac_objext"'
19753   { (eval echo "$as_me:19753: \"$ac_try\"") >&5
19754   (eval $ac_try) 2>&5
19755   ac_status=$?
19756   echo "$as_me:19756: \$? = $ac_status" >&5
19757   (exit "$ac_status"); }; }; then
19758   cf_cv_dcl_environ=yes
19759 else
19760   echo "$as_me: failed program was:" >&5
19761 cat "conftest.$ac_ext" >&5
19762 cf_cv_dcl_environ=no
19763 fi
19764 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19765
19766 fi
19767 echo "$as_me:19767: result: $cf_cv_dcl_environ" >&5
19768 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19769
19770 if test "$cf_cv_dcl_environ" = no ; then
19771
19772 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19773
19774     cat >>confdefs.h <<EOF
19775 #define $cf_result 1
19776 EOF
19777
19778 fi
19779
19780 # It's possible (for near-UNIX clones) that the data doesn't exist
19781
19782 echo "$as_me:19782: checking if external environ exists" >&5
19783 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19784 if test "${cf_cv_have_environ+set}" = set; then
19785   echo $ECHO_N "(cached) $ECHO_C" >&6
19786 else
19787
19788         cat >"conftest.$ac_ext" <<_ACEOF
19789 #line 19789 "configure"
19790 #include "confdefs.h"
19791
19792 #undef environ
19793 extern int environ;
19794
19795 int
19796 main (void)
19797 {
19798 environ = 2
19799   ;
19800   return 0;
19801 }
19802 _ACEOF
19803 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19804 if { (eval echo "$as_me:19804: \"$ac_link\"") >&5
19805   (eval $ac_link) 2>&5
19806   ac_status=$?
19807   echo "$as_me:19807: \$? = $ac_status" >&5
19808   (exit "$ac_status"); } &&
19809          { ac_try='test -s "conftest$ac_exeext"'
19810   { (eval echo "$as_me:19810: \"$ac_try\"") >&5
19811   (eval $ac_try) 2>&5
19812   ac_status=$?
19813   echo "$as_me:19813: \$? = $ac_status" >&5
19814   (exit "$ac_status"); }; }; then
19815   cf_cv_have_environ=yes
19816 else
19817   echo "$as_me: failed program was:" >&5
19818 cat "conftest.$ac_ext" >&5
19819 cf_cv_have_environ=no
19820 fi
19821 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19822
19823 fi
19824 echo "$as_me:19824: result: $cf_cv_have_environ" >&5
19825 echo "${ECHO_T}$cf_cv_have_environ" >&6
19826
19827 if test "$cf_cv_have_environ" = yes ; then
19828
19829 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19830
19831         cat >>confdefs.h <<EOF
19832 #define $cf_result 1
19833 EOF
19834
19835 fi
19836
19837 echo "$as_me:19837: checking for getenv" >&5
19838 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19839 if test "${ac_cv_func_getenv+set}" = set; then
19840   echo $ECHO_N "(cached) $ECHO_C" >&6
19841 else
19842   cat >"conftest.$ac_ext" <<_ACEOF
19843 #line 19843 "configure"
19844 #include "confdefs.h"
19845 #define getenv autoconf_temporary
19846 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19847 #undef getenv
19848
19849 #ifdef __cplusplus
19850 extern "C"
19851 #endif
19852
19853 /* We use char because int might match the return type of a gcc2
19854    builtin and then its argument prototype would still apply.  */
19855 char getenv (void);
19856
19857 int
19858 main (void)
19859 {
19860
19861 /* The GNU C library defines stubs for functions which it implements
19862     to always fail with ENOSYS.  Some functions are actually named
19863     something starting with __ and the normal name is an alias.  */
19864 #if defined (__stub_getenv) || defined (__stub___getenv)
19865 #error found stub for getenv
19866 #endif
19867
19868         return getenv ();
19869   ;
19870   return 0;
19871 }
19872 _ACEOF
19873 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19874 if { (eval echo "$as_me:19874: \"$ac_link\"") >&5
19875   (eval $ac_link) 2>&5
19876   ac_status=$?
19877   echo "$as_me:19877: \$? = $ac_status" >&5
19878   (exit "$ac_status"); } &&
19879          { ac_try='test -s "conftest$ac_exeext"'
19880   { (eval echo "$as_me:19880: \"$ac_try\"") >&5
19881   (eval $ac_try) 2>&5
19882   ac_status=$?
19883   echo "$as_me:19883: \$? = $ac_status" >&5
19884   (exit "$ac_status"); }; }; then
19885   ac_cv_func_getenv=yes
19886 else
19887   echo "$as_me: failed program was:" >&5
19888 cat "conftest.$ac_ext" >&5
19889 ac_cv_func_getenv=no
19890 fi
19891 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19892 fi
19893 echo "$as_me:19893: result: $ac_cv_func_getenv" >&5
19894 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19895
19896 for ac_func in putenv setenv strdup
19897 do
19898 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19899 echo "$as_me:19899: checking for $ac_func" >&5
19900 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19901 if eval "test \"\${$as_ac_var+set}\" = set"; then
19902   echo $ECHO_N "(cached) $ECHO_C" >&6
19903 else
19904   cat >"conftest.$ac_ext" <<_ACEOF
19905 #line 19905 "configure"
19906 #include "confdefs.h"
19907 #define $ac_func autoconf_temporary
19908 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19909 #undef $ac_func
19910
19911 #ifdef __cplusplus
19912 extern "C"
19913 #endif
19914
19915 /* We use char because int might match the return type of a gcc2
19916    builtin and then its argument prototype would still apply.  */
19917 char $ac_func (void);
19918
19919 int
19920 main (void)
19921 {
19922
19923 /* The GNU C library defines stubs for functions which it implements
19924     to always fail with ENOSYS.  Some functions are actually named
19925     something starting with __ and the normal name is an alias.  */
19926 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19927 #error found stub for $ac_func
19928 #endif
19929
19930         return $ac_func ();
19931   ;
19932   return 0;
19933 }
19934 _ACEOF
19935 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19936 if { (eval echo "$as_me:19936: \"$ac_link\"") >&5
19937   (eval $ac_link) 2>&5
19938   ac_status=$?
19939   echo "$as_me:19939: \$? = $ac_status" >&5
19940   (exit "$ac_status"); } &&
19941          { ac_try='test -s "conftest$ac_exeext"'
19942   { (eval echo "$as_me:19942: \"$ac_try\"") >&5
19943   (eval $ac_try) 2>&5
19944   ac_status=$?
19945   echo "$as_me:19945: \$? = $ac_status" >&5
19946   (exit "$ac_status"); }; }; then
19947   eval "$as_ac_var=yes"
19948 else
19949   echo "$as_me: failed program was:" >&5
19950 cat "conftest.$ac_ext" >&5
19951 eval "$as_ac_var=no"
19952 fi
19953 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19954 fi
19955 echo "$as_me:19955: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19956 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19957 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19958   cat >>confdefs.h <<EOF
19959 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19960 EOF
19961
19962 fi
19963 done
19964
19965 echo "$as_me:19965: checking if getenv returns consistent values" >&5
19966 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19967 if test "${cf_cv_consistent_getenv+set}" = set; then
19968   echo $ECHO_N "(cached) $ECHO_C" >&6
19969 else
19970
19971 if test "$cross_compiling" = yes; then
19972   cf_cv_consistent_getenv=unknown
19973 else
19974   cat >"conftest.$ac_ext" <<_ACEOF
19975 #line 19975 "configure"
19976 #include "confdefs.h"
19977
19978 #include <stdlib.h>
19979 #include <unistd.h>
19980 #include <stdio.h>
19981 #include <string.h>
19982 #include <sys/types.h>
19983
19984 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19985 extern char **environ;  /* POSIX, but some systems are not... */
19986 #endif
19987
19988 #if defined(HAVE_STRDUP)
19989 #define str_alloc(s) strdup(s)
19990 #else
19991 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19992 #endif
19993
19994 static void set_value(const char *name, const char *value)
19995 {
19996 #if defined(HAVE_SETENV)
19997         setenv(name, value, 1);
19998 #elif defined(HAVE_PUTENV)
19999         char buffer[1024];
20000         sprintf(buffer, "%s=%s", name, value);
20001         putenv(str_alloc(buffer));
20002 #else
20003 #error neither putenv/setenv found
20004 #endif
20005 }
20006 int main(void)
20007 {
20008         int pass;
20009         size_t numenv, limit, j;
20010         char **mynames;
20011         char **myvalues;
20012         char **mypointer;
20013         char *equals;
20014         for (numenv = 0; environ[numenv]; ++numenv) ;
20015         limit = numenv + 10;
20016         mynames = (char **) calloc(limit + 1, sizeof(char *));
20017         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20018         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20019 #if defined(HAVE_ENVIRON)
20020         for (j = 0; environ[j]; ++j) {
20021                 mynames[j] = str_alloc(environ[j]);
20022                 equals = strchr(mynames[j], '=');
20023                 if (equals != 0) {
20024                         *equals++ = '\\0';
20025                         myvalues[j] = str_alloc(equals);
20026                 } else {
20027                         myvalues[j] = str_alloc("");
20028                 }
20029         }
20030 #endif
20031         for (j = numenv; j < limit; ++j) {
20032                 char name[80];
20033                 char value[80];
20034                 size_t found;
20035                 size_t k = 0;
20036                 do {
20037                         size_t jk;
20038                         found = 0;
20039                         sprintf(name, "TERM%lu", (unsigned long) k);
20040                         for (jk = 0; jk < j; ++jk) {
20041                                 if (!strcmp(name, mynames[jk])) {
20042                                         found = 1;
20043                                         ++k;
20044                                         break;
20045                                 }
20046                         }
20047                 } while (found);
20048                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20049                 set_value(name, value);
20050                 mynames[j] = str_alloc(name);
20051                 myvalues[j] = str_alloc(value);
20052         }
20053         for (pass = 0; pass < 3; ++pass) {
20054                 for (j = 0; j < limit; ++j) {
20055                         char *value = getenv(mynames[j]);
20056                         if (pass) {
20057                                 if (value == 0) {
20058                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20059                                         ${cf_cv_main_return:-return}(1);
20060                                 } else if (value != mypointer[j]) {
20061                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20062                                         ${cf_cv_main_return:-return}(1);
20063                                 } else if (strcmp(value, myvalues[j])) {
20064                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20065                                         ${cf_cv_main_return:-return}(1);
20066                                 }
20067                         } else {
20068                                 size_t k;
20069                                 mypointer[j] = value;
20070                                 for (k = 0; k < j; ++k) {
20071                                         if (mypointer[j] == mypointer[k]) {
20072                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20073                                                 ${cf_cv_main_return:-return}(1);
20074                                         }
20075                                 }
20076                         }
20077                 }
20078         }
20079         ${cf_cv_main_return:-return}(0);
20080 }
20081
20082 _ACEOF
20083 rm -f "conftest$ac_exeext"
20084 if { (eval echo "$as_me:20084: \"$ac_link\"") >&5
20085   (eval $ac_link) 2>&5
20086   ac_status=$?
20087   echo "$as_me:20087: \$? = $ac_status" >&5
20088   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20089   { (eval echo "$as_me:20089: \"$ac_try\"") >&5
20090   (eval $ac_try) 2>&5
20091   ac_status=$?
20092   echo "$as_me:20092: \$? = $ac_status" >&5
20093   (exit "$ac_status"); }; }; then
20094   cf_cv_consistent_getenv=yes
20095 else
20096   echo "$as_me: program exited with status $ac_status" >&5
20097 echo "$as_me: failed program was:" >&5
20098 cat "conftest.$ac_ext" >&5
20099 cf_cv_consistent_getenv=no
20100 fi
20101 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20102 fi
20103
20104 fi
20105 echo "$as_me:20105: result: $cf_cv_consistent_getenv" >&5
20106 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20107
20108 if test "x$cf_cv_consistent_getenv" = xno
20109 then
20110
20111 cat >>confdefs.h <<\EOF
20112 #define HAVE_CONSISTENT_GETENV 1
20113 EOF
20114
20115 fi
20116
20117 if test "x$cf_cv_consistent_getenv" = xno && \
20118         test "x$cf_with_trace" = xyes
20119 then
20120         { echo "$as_me:20120: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20121 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20122 fi
20123
20124 echo "$as_me:20124: checking if sys/time.h works with sys/select.h" >&5
20125 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20126 if test "${cf_cv_sys_time_select+set}" = set; then
20127   echo $ECHO_N "(cached) $ECHO_C" >&6
20128 else
20129
20130 cat >"conftest.$ac_ext" <<_ACEOF
20131 #line 20131 "configure"
20132 #include "confdefs.h"
20133
20134 #include <sys/types.h>
20135 #ifdef HAVE_SYS_TIME_H
20136 #include <sys/time.h>
20137 #endif
20138 #ifdef HAVE_SYS_SELECT_H
20139 #include <sys/select.h>
20140 #endif
20141
20142 int
20143 main (void)
20144 {
20145
20146   ;
20147   return 0;
20148 }
20149 _ACEOF
20150 rm -f "conftest.$ac_objext"
20151 if { (eval echo "$as_me:20151: \"$ac_compile\"") >&5
20152   (eval $ac_compile) 2>&5
20153   ac_status=$?
20154   echo "$as_me:20154: \$? = $ac_status" >&5
20155   (exit "$ac_status"); } &&
20156          { ac_try='test -s "conftest.$ac_objext"'
20157   { (eval echo "$as_me:20157: \"$ac_try\"") >&5
20158   (eval $ac_try) 2>&5
20159   ac_status=$?
20160   echo "$as_me:20160: \$? = $ac_status" >&5
20161   (exit "$ac_status"); }; }; then
20162   cf_cv_sys_time_select=yes
20163 else
20164   echo "$as_me: failed program was:" >&5
20165 cat "conftest.$ac_ext" >&5
20166 cf_cv_sys_time_select=no
20167 fi
20168 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20169
20170 fi
20171
20172 echo "$as_me:20172: result: $cf_cv_sys_time_select" >&5
20173 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20174 test "$cf_cv_sys_time_select" = yes &&
20175 cat >>confdefs.h <<\EOF
20176 #define HAVE_SYS_TIME_SELECT 1
20177 EOF
20178
20179 ###     checks for compiler characteristics
20180 ac_ext=c
20181 ac_cpp='$CPP $CPPFLAGS'
20182 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20183 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20184 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20185 ac_main_return="return"
20186
20187 echo "$as_me:20187: checking for an ANSI C-conforming const" >&5
20188 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20189 if test "${ac_cv_c_const+set}" = set; then
20190   echo $ECHO_N "(cached) $ECHO_C" >&6
20191 else
20192   cat >"conftest.$ac_ext" <<_ACEOF
20193 #line 20193 "configure"
20194 #include "confdefs.h"
20195
20196 int
20197 main (void)
20198 {
20199 /* FIXME: Include the comments suggested by Paul. */
20200 #ifndef __cplusplus
20201   /* Ultrix mips cc rejects this.  */
20202   typedef int charset[2];
20203   const charset x;
20204   /* SunOS 4.1.1 cc rejects this.  */
20205   char const *const *ccp;
20206   char **p;
20207   /* NEC SVR4.0.2 mips cc rejects this.  */
20208   struct point {int x, y;};
20209   static struct point const zero = {0,0};
20210   /* AIX XL C 1.02.0.0 rejects this.
20211      It does not let you subtract one const X* pointer from another in
20212      an arm of an if-expression whose if-part is not a constant
20213      expression */
20214   const char *g = "string";
20215   ccp = &g + (g ? g-g : 0);
20216   /* HPUX 7.0 cc rejects these. */
20217   ++ccp;
20218   p = (char**) ccp;
20219   ccp = (char const *const *) p;
20220   { /* SCO 3.2v4 cc rejects this.  */
20221     char *t;
20222     char const *s = 0 ? (char *) 0 : (char const *) 0;
20223
20224     *t++ = 0;
20225   }
20226   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20227     int x[] = {25, 17};
20228     const int *foo = &x[0];
20229     ++foo;
20230   }
20231   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20232     typedef const int *iptr;
20233     iptr p = 0;
20234     ++p;
20235   }
20236   { /* AIX XL C 1.02.0.0 rejects this saying
20237        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20238     struct s { int j; const int *ap[3]; };
20239     struct s *b; b->j = 5;
20240   }
20241   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20242     const int foo = 10;
20243   }
20244 #endif
20245
20246   ;
20247   return 0;
20248 }
20249 _ACEOF
20250 rm -f "conftest.$ac_objext"
20251 if { (eval echo "$as_me:20251: \"$ac_compile\"") >&5
20252   (eval $ac_compile) 2>&5
20253   ac_status=$?
20254   echo "$as_me:20254: \$? = $ac_status" >&5
20255   (exit "$ac_status"); } &&
20256          { ac_try='test -s "conftest.$ac_objext"'
20257   { (eval echo "$as_me:20257: \"$ac_try\"") >&5
20258   (eval $ac_try) 2>&5
20259   ac_status=$?
20260   echo "$as_me:20260: \$? = $ac_status" >&5
20261   (exit "$ac_status"); }; }; then
20262   ac_cv_c_const=yes
20263 else
20264   echo "$as_me: failed program was:" >&5
20265 cat "conftest.$ac_ext" >&5
20266 ac_cv_c_const=no
20267 fi
20268 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20269 fi
20270 echo "$as_me:20270: result: $ac_cv_c_const" >&5
20271 echo "${ECHO_T}$ac_cv_c_const" >&6
20272 if test $ac_cv_c_const = no; then
20273
20274 cat >>confdefs.h <<\EOF
20275 #define const
20276 EOF
20277
20278 fi
20279
20280 echo "$as_me:20280: checking for inline" >&5
20281 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20282 if test "${ac_cv_c_inline+set}" = set; then
20283   echo $ECHO_N "(cached) $ECHO_C" >&6
20284 else
20285   ac_cv_c_inline=no
20286 for ac_kw in inline __inline__ __inline; do
20287   cat >"conftest.$ac_ext" <<_ACEOF
20288 #line 20288 "configure"
20289 #include "confdefs.h"
20290 #ifndef __cplusplus
20291 static $ac_kw int static_foo () {return 0; }
20292 $ac_kw int foo () {return 0; }
20293 #endif
20294
20295 _ACEOF
20296 rm -f "conftest.$ac_objext"
20297 if { (eval echo "$as_me:20297: \"$ac_compile\"") >&5
20298   (eval $ac_compile) 2>&5
20299   ac_status=$?
20300   echo "$as_me:20300: \$? = $ac_status" >&5
20301   (exit "$ac_status"); } &&
20302          { ac_try='test -s "conftest.$ac_objext"'
20303   { (eval echo "$as_me:20303: \"$ac_try\"") >&5
20304   (eval $ac_try) 2>&5
20305   ac_status=$?
20306   echo "$as_me:20306: \$? = $ac_status" >&5
20307   (exit "$ac_status"); }; }; then
20308   ac_cv_c_inline=$ac_kw; break
20309 else
20310   echo "$as_me: failed program was:" >&5
20311 cat "conftest.$ac_ext" >&5
20312 fi
20313 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20314 done
20315
20316 fi
20317 echo "$as_me:20317: result: $ac_cv_c_inline" >&5
20318 echo "${ECHO_T}$ac_cv_c_inline" >&6
20319 case $ac_cv_c_inline in
20320   inline | yes) ;;
20321   no)
20322 cat >>confdefs.h <<\EOF
20323 #define inline
20324 EOF
20325  ;;
20326   *)  cat >>confdefs.h <<EOF
20327 #define inline $ac_cv_c_inline
20328 EOF
20329  ;;
20330 esac
20331
20332 NCURSES_INLINE=
20333 if test "$ac_cv_c_inline" != no ; then
20334         NCURSES_INLINE=inline
20335         if test "$INTEL_COMPILER" = yes
20336         then
20337                 :
20338         elif test "$CLANG_COMPILER" = yes
20339         then
20340                 :
20341         elif test "$GCC" = yes
20342         then
20343                 echo "$as_me:20343: checking if $CC supports options to tune inlining" >&5
20344 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20345 if test "${cf_cv_gcc_inline+set}" = set; then
20346   echo $ECHO_N "(cached) $ECHO_C" >&6
20347 else
20348
20349                 cf_save_CFLAGS=$CFLAGS
20350                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20351                 cat >"conftest.$ac_ext" <<_ACEOF
20352 #line 20352 "configure"
20353 #include "confdefs.h"
20354 inline int foo(void) { return 1; }
20355 int
20356 main (void)
20357 {
20358 ${cf_cv_main_return:-return} foo()
20359   ;
20360   return 0;
20361 }
20362 _ACEOF
20363 rm -f "conftest.$ac_objext"
20364 if { (eval echo "$as_me:20364: \"$ac_compile\"") >&5
20365   (eval $ac_compile) 2>&5
20366   ac_status=$?
20367   echo "$as_me:20367: \$? = $ac_status" >&5
20368   (exit "$ac_status"); } &&
20369          { ac_try='test -s "conftest.$ac_objext"'
20370   { (eval echo "$as_me:20370: \"$ac_try\"") >&5
20371   (eval $ac_try) 2>&5
20372   ac_status=$?
20373   echo "$as_me:20373: \$? = $ac_status" >&5
20374   (exit "$ac_status"); }; }; then
20375   cf_cv_gcc_inline=yes
20376 else
20377   echo "$as_me: failed program was:" >&5
20378 cat "conftest.$ac_ext" >&5
20379 cf_cv_gcc_inline=no
20380 fi
20381 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20382                 CFLAGS=$cf_save_CFLAGS
20383
20384 fi
20385 echo "$as_me:20385: result: $cf_cv_gcc_inline" >&5
20386 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20387                 if test "$cf_cv_gcc_inline" = yes ; then
20388
20389 cf_fix_cppflags=no
20390 cf_new_cflags=
20391 cf_new_cppflags=
20392 cf_new_extra_cppflags=
20393
20394 for cf_add_cflags in --param max-inline-insns-single=1200
20395 do
20396 case "$cf_fix_cppflags" in
20397 (no)
20398         case "$cf_add_cflags" in
20399         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20400                 case "$cf_add_cflags" in
20401                 (-D*)
20402                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20403
20404                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20405                                 && test -z "${cf_tst_cflags}" \
20406                                 && cf_fix_cppflags=yes
20407
20408                         if test "$cf_fix_cppflags" = yes ; then
20409
20410         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20411         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20412
20413                                 continue
20414                         elif test "${cf_tst_cflags}" = "\"'" ; then
20415
20416         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20417         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20418
20419                                 continue
20420                         fi
20421                         ;;
20422                 esac
20423                 case "$CPPFLAGS" in
20424                 (*$cf_add_cflags)
20425                         ;;
20426                 (*)
20427                         case "$cf_add_cflags" in
20428                         (-D*)
20429                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20430
20431 CPPFLAGS=`echo "$CPPFLAGS" | \
20432         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20433                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20434
20435                                 ;;
20436                         esac
20437
20438         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20439         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20440
20441                         ;;
20442                 esac
20443                 ;;
20444         (*)
20445
20446         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20447         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20448
20449                 ;;
20450         esac
20451         ;;
20452 (yes)
20453
20454         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20455         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20456
20457         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20458
20459         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20460                 && test -z "${cf_tst_cflags}" \
20461                 && cf_fix_cppflags=no
20462         ;;
20463 esac
20464 done
20465
20466 if test -n "$cf_new_cflags" ; then
20467
20468         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20469         CFLAGS="${CFLAGS}$cf_new_cflags"
20470
20471 fi
20472
20473 if test -n "$cf_new_cppflags" ; then
20474
20475         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20476         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20477
20478 fi
20479
20480 if test -n "$cf_new_extra_cppflags" ; then
20481
20482         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20483         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20484
20485 fi
20486
20487                 fi
20488         fi
20489 fi
20490
20491 echo "$as_me:20491: checking for signal global datatype" >&5
20492 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20493 if test "${cf_cv_sig_atomic_t+set}" = set; then
20494   echo $ECHO_N "(cached) $ECHO_C" >&6
20495 else
20496
20497         for cf_type in \
20498                 "volatile sig_atomic_t" \
20499                 "sig_atomic_t" \
20500                 "int"
20501         do
20502         cat >"conftest.$ac_ext" <<_ACEOF
20503 #line 20503 "configure"
20504 #include "confdefs.h"
20505
20506 #include <sys/types.h>
20507 #include <signal.h>
20508 #include <stdio.h>
20509
20510 extern $cf_type x;
20511 $cf_type x;
20512 static void handler(int sig)
20513 {
20514         (void)sig;
20515         x = 5;
20516 }
20517 int
20518 main (void)
20519 {
20520 signal(SIGINT, handler);
20521                  x = 1
20522   ;
20523   return 0;
20524 }
20525 _ACEOF
20526 rm -f "conftest.$ac_objext"
20527 if { (eval echo "$as_me:20527: \"$ac_compile\"") >&5
20528   (eval $ac_compile) 2>&5
20529   ac_status=$?
20530   echo "$as_me:20530: \$? = $ac_status" >&5
20531   (exit "$ac_status"); } &&
20532          { ac_try='test -s "conftest.$ac_objext"'
20533   { (eval echo "$as_me:20533: \"$ac_try\"") >&5
20534   (eval $ac_try) 2>&5
20535   ac_status=$?
20536   echo "$as_me:20536: \$? = $ac_status" >&5
20537   (exit "$ac_status"); }; }; then
20538   cf_cv_sig_atomic_t=$cf_type
20539 else
20540   echo "$as_me: failed program was:" >&5
20541 cat "conftest.$ac_ext" >&5
20542 cf_cv_sig_atomic_t=no
20543 fi
20544 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20545                 test "$cf_cv_sig_atomic_t" != no && break
20546         done
20547
20548 fi
20549
20550 echo "$as_me:20550: result: $cf_cv_sig_atomic_t" >&5
20551 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20552 test "$cf_cv_sig_atomic_t" != no &&
20553 cat >>confdefs.h <<EOF
20554 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20555 EOF
20556
20557 if test "$NCURSES_CHTYPE" = auto ; then
20558
20559 echo "$as_me:20559: checking for type of chtype" >&5
20560 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20561 if test "${cf_cv_typeof_chtype+set}" = set; then
20562   echo $ECHO_N "(cached) $ECHO_C" >&6
20563 else
20564
20565                 if test "$cross_compiling" = yes; then
20566   cf_cv_typeof_chtype=long
20567 else
20568   cat >"conftest.$ac_ext" <<_ACEOF
20569 #line 20569 "configure"
20570 #include "confdefs.h"
20571
20572 #define WANT_BITS 31
20573 #include <stdio.h>
20574 int main(void)
20575 {
20576         FILE *fp = fopen("cf_test.out", "w");
20577         if (fp != 0) {
20578                 char *result = "long";
20579                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20580                         int n;
20581                         unsigned int x, y;
20582                         for (n = 0; n < WANT_BITS; n++) {
20583                                 x = (1 << n);
20584                                 y = (x >> n);
20585                                 if (y != 1 || x == 0) {
20586                                         x = 0;
20587                                         break;
20588                                 }
20589                         }
20590                         /*
20591                          * If x is nonzero, an int is big enough for the bits
20592                          * that we want.
20593                          */
20594                         result = (x != 0) ? "int" : "long";
20595                 }
20596                 fputs(result, fp);
20597                 fclose(fp);
20598         }
20599         ${cf_cv_main_return:-return}(0);
20600 }
20601
20602 _ACEOF
20603 rm -f "conftest$ac_exeext"
20604 if { (eval echo "$as_me:20604: \"$ac_link\"") >&5
20605   (eval $ac_link) 2>&5
20606   ac_status=$?
20607   echo "$as_me:20607: \$? = $ac_status" >&5
20608   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20609   { (eval echo "$as_me:20609: \"$ac_try\"") >&5
20610   (eval $ac_try) 2>&5
20611   ac_status=$?
20612   echo "$as_me:20612: \$? = $ac_status" >&5
20613   (exit "$ac_status"); }; }; then
20614   cf_cv_typeof_chtype=`cat cf_test.out`
20615 else
20616   echo "$as_me: program exited with status $ac_status" >&5
20617 echo "$as_me: failed program was:" >&5
20618 cat "conftest.$ac_ext" >&5
20619 cf_cv_typeof_chtype=long
20620 fi
20621 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20622 fi
20623                 rm -f cf_test.out
20624
20625 fi
20626
20627 echo "$as_me:20627: result: $cf_cv_typeof_chtype" >&5
20628 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20629
20630 cat >>confdefs.h <<EOF
20631 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20632 EOF
20633
20634 else
20635         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20636 fi
20637 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20638
20639 echo "$as_me:20639: checking if unsigned literals are legal" >&5
20640 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20641 if test "${cf_cv_unsigned_literals+set}" = set; then
20642   echo $ECHO_N "(cached) $ECHO_C" >&6
20643 else
20644
20645         cat >"conftest.$ac_ext" <<_ACEOF
20646 #line 20646 "configure"
20647 #include "confdefs.h"
20648
20649 int
20650 main (void)
20651 {
20652 long x = 1L + 1UL + 1U + 1
20653   ;
20654   return 0;
20655 }
20656 _ACEOF
20657 rm -f "conftest.$ac_objext"
20658 if { (eval echo "$as_me:20658: \"$ac_compile\"") >&5
20659   (eval $ac_compile) 2>&5
20660   ac_status=$?
20661   echo "$as_me:20661: \$? = $ac_status" >&5
20662   (exit "$ac_status"); } &&
20663          { ac_try='test -s "conftest.$ac_objext"'
20664   { (eval echo "$as_me:20664: \"$ac_try\"") >&5
20665   (eval $ac_try) 2>&5
20666   ac_status=$?
20667   echo "$as_me:20667: \$? = $ac_status" >&5
20668   (exit "$ac_status"); }; }; then
20669   cf_cv_unsigned_literals=yes
20670 else
20671   echo "$as_me: failed program was:" >&5
20672 cat "conftest.$ac_ext" >&5
20673 cf_cv_unsigned_literals=no
20674 fi
20675 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20676
20677 fi
20678
20679 echo "$as_me:20679: result: $cf_cv_unsigned_literals" >&5
20680 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20681
20682 cf_cv_1UL="1"
20683 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20684 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20685
20686 if test "$NCURSES_MMASK_T" = auto ; then
20687         cf_cv_typeof_mmask_t=long
20688 else
20689         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20690 fi
20691 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20692
20693 ###     Checks for external-data
20694
20695 echo "$as_me:20695: checking if external errno is declared" >&5
20696 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20697 if test "${cf_cv_dcl_errno+set}" = set; then
20698   echo $ECHO_N "(cached) $ECHO_C" >&6
20699 else
20700
20701         cat >"conftest.$ac_ext" <<_ACEOF
20702 #line 20702 "configure"
20703 #include "confdefs.h"
20704
20705 #ifdef HAVE_STDLIB_H
20706 #include <stdlib.h>
20707 #endif
20708 #include <stdio.h>
20709 #include <sys/types.h>
20710 #include <errno.h>
20711 int
20712 main (void)
20713 {
20714 int x = (int) errno; (void)x
20715   ;
20716   return 0;
20717 }
20718 _ACEOF
20719 rm -f "conftest.$ac_objext"
20720 if { (eval echo "$as_me:20720: \"$ac_compile\"") >&5
20721   (eval $ac_compile) 2>&5
20722   ac_status=$?
20723   echo "$as_me:20723: \$? = $ac_status" >&5
20724   (exit "$ac_status"); } &&
20725          { ac_try='test -s "conftest.$ac_objext"'
20726   { (eval echo "$as_me:20726: \"$ac_try\"") >&5
20727   (eval $ac_try) 2>&5
20728   ac_status=$?
20729   echo "$as_me:20729: \$? = $ac_status" >&5
20730   (exit "$ac_status"); }; }; then
20731   cf_cv_dcl_errno=yes
20732 else
20733   echo "$as_me: failed program was:" >&5
20734 cat "conftest.$ac_ext" >&5
20735 cf_cv_dcl_errno=no
20736 fi
20737 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20738
20739 fi
20740 echo "$as_me:20740: result: $cf_cv_dcl_errno" >&5
20741 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20742
20743 if test "$cf_cv_dcl_errno" = no ; then
20744
20745 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20746
20747         cat >>confdefs.h <<EOF
20748 #define $cf_result 1
20749 EOF
20750
20751 fi
20752
20753 # It's possible (for near-UNIX clones) that the data doesn't exist
20754
20755 echo "$as_me:20755: checking if external errno exists" >&5
20756 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20757 if test "${cf_cv_have_errno+set}" = set; then
20758   echo $ECHO_N "(cached) $ECHO_C" >&6
20759 else
20760
20761         cat >"conftest.$ac_ext" <<_ACEOF
20762 #line 20762 "configure"
20763 #include "confdefs.h"
20764
20765 #undef errno
20766 extern int errno;
20767
20768 int
20769 main (void)
20770 {
20771 errno = 2
20772   ;
20773   return 0;
20774 }
20775 _ACEOF
20776 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20777 if { (eval echo "$as_me:20777: \"$ac_link\"") >&5
20778   (eval $ac_link) 2>&5
20779   ac_status=$?
20780   echo "$as_me:20780: \$? = $ac_status" >&5
20781   (exit "$ac_status"); } &&
20782          { ac_try='test -s "conftest$ac_exeext"'
20783   { (eval echo "$as_me:20783: \"$ac_try\"") >&5
20784   (eval $ac_try) 2>&5
20785   ac_status=$?
20786   echo "$as_me:20786: \$? = $ac_status" >&5
20787   (exit "$ac_status"); }; }; then
20788   cf_cv_have_errno=yes
20789 else
20790   echo "$as_me: failed program was:" >&5
20791 cat "conftest.$ac_ext" >&5
20792 cf_cv_have_errno=no
20793 fi
20794 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20795
20796 fi
20797 echo "$as_me:20797: result: $cf_cv_have_errno" >&5
20798 echo "${ECHO_T}$cf_cv_have_errno" >&6
20799
20800 if test "$cf_cv_have_errno" = yes ; then
20801
20802 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20803
20804         cat >>confdefs.h <<EOF
20805 #define $cf_result 1
20806 EOF
20807
20808 fi
20809
20810 echo "$as_me:20810: checking if data-only library module links" >&5
20811 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20812 if test "${cf_cv_link_dataonly+set}" = set; then
20813   echo $ECHO_N "(cached) $ECHO_C" >&6
20814 else
20815
20816         rm -f conftest.a
20817         cat >conftest.$ac_ext <<EOF
20818 #line 20818 "configure"
20819 int     testdata[3] = { 123, 456, 789 };
20820 EOF
20821         if { (eval echo "$as_me:20821: \"$ac_compile\"") >&5
20822   (eval $ac_compile) 2>&5
20823   ac_status=$?
20824   echo "$as_me:20824: \$? = $ac_status" >&5
20825   (exit "$ac_status"); } ; then
20826                 mv conftest.o data.o && \
20827                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20828         fi
20829         rm -f conftest.$ac_ext data.o
20830         cat >conftest.$ac_ext <<EOF
20831 #line 20831 "configure"
20832 int     testfunc(void)
20833 {
20834 #if defined(NeXT)
20835         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20836 #else
20837         extern int testdata[3];
20838         return testdata[0] == 123
20839            &&  testdata[1] == 456
20840            &&  testdata[2] == 789;
20841 #endif
20842 }
20843 EOF
20844         if { (eval echo "$as_me:20844: \"$ac_compile\"") >&5
20845   (eval $ac_compile) 2>&5
20846   ac_status=$?
20847   echo "$as_me:20847: \$? = $ac_status" >&5
20848   (exit "$ac_status"); }; then
20849                 mv conftest.o func.o && \
20850                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20851         fi
20852         rm -f conftest.$ac_ext func.o
20853         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20854         cf_saveLIBS="$LIBS"
20855         LIBS="conftest.a $LIBS"
20856         if test "$cross_compiling" = yes; then
20857   cf_cv_link_dataonly=unknown
20858 else
20859   cat >"conftest.$ac_ext" <<_ACEOF
20860 #line 20860 "configure"
20861 #include "confdefs.h"
20862
20863         int main(void)
20864         {
20865                 extern int testfunc();
20866                 ${cf_cv_main_return:-return} (!testfunc());
20867         }
20868
20869 _ACEOF
20870 rm -f "conftest$ac_exeext"
20871 if { (eval echo "$as_me:20871: \"$ac_link\"") >&5
20872   (eval $ac_link) 2>&5
20873   ac_status=$?
20874   echo "$as_me:20874: \$? = $ac_status" >&5
20875   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20876   { (eval echo "$as_me:20876: \"$ac_try\"") >&5
20877   (eval $ac_try) 2>&5
20878   ac_status=$?
20879   echo "$as_me:20879: \$? = $ac_status" >&5
20880   (exit "$ac_status"); }; }; then
20881   cf_cv_link_dataonly=yes
20882 else
20883   echo "$as_me: program exited with status $ac_status" >&5
20884 echo "$as_me: failed program was:" >&5
20885 cat "conftest.$ac_ext" >&5
20886 cf_cv_link_dataonly=no
20887 fi
20888 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20889 fi
20890         LIBS="$cf_saveLIBS"
20891
20892 fi
20893
20894 echo "$as_me:20894: result: $cf_cv_link_dataonly" >&5
20895 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20896
20897 if test "$cf_cv_link_dataonly" = no ; then
20898
20899 cat >>confdefs.h <<\EOF
20900 #define BROKEN_LINKER 1
20901 EOF
20902
20903         BROKEN_LINKER=1
20904 fi
20905
20906 ###     Checks for library functions.
20907
20908 for ac_func in \
20909 getcwd \
20910 getegid \
20911 geteuid \
20912 getopt \
20913 getttynam \
20914 issetugid \
20915 localeconv \
20916 poll \
20917 putenv \
20918 remove \
20919 select \
20920 setbuf \
20921 setbuffer \
20922 setenv \
20923 setvbuf \
20924 sigaction \
20925 sigvec \
20926 snprintf \
20927 strdup \
20928 strstr \
20929 sysconf \
20930 tcgetpgrp \
20931 times \
20932 tsearch \
20933 vsnprintf \
20934
20935 do
20936 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20937 echo "$as_me:20937: checking for $ac_func" >&5
20938 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20939 if eval "test \"\${$as_ac_var+set}\" = set"; then
20940   echo $ECHO_N "(cached) $ECHO_C" >&6
20941 else
20942   cat >"conftest.$ac_ext" <<_ACEOF
20943 #line 20943 "configure"
20944 #include "confdefs.h"
20945 #define $ac_func autoconf_temporary
20946 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20947 #undef $ac_func
20948
20949 #ifdef __cplusplus
20950 extern "C"
20951 #endif
20952
20953 /* We use char because int might match the return type of a gcc2
20954    builtin and then its argument prototype would still apply.  */
20955 char $ac_func (void);
20956
20957 int
20958 main (void)
20959 {
20960
20961 /* The GNU C library defines stubs for functions which it implements
20962     to always fail with ENOSYS.  Some functions are actually named
20963     something starting with __ and the normal name is an alias.  */
20964 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20965 #error found stub for $ac_func
20966 #endif
20967
20968         return $ac_func ();
20969   ;
20970   return 0;
20971 }
20972 _ACEOF
20973 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20974 if { (eval echo "$as_me:20974: \"$ac_link\"") >&5
20975   (eval $ac_link) 2>&5
20976   ac_status=$?
20977   echo "$as_me:20977: \$? = $ac_status" >&5
20978   (exit "$ac_status"); } &&
20979          { ac_try='test -s "conftest$ac_exeext"'
20980   { (eval echo "$as_me:20980: \"$ac_try\"") >&5
20981   (eval $ac_try) 2>&5
20982   ac_status=$?
20983   echo "$as_me:20983: \$? = $ac_status" >&5
20984   (exit "$ac_status"); }; }; then
20985   eval "$as_ac_var=yes"
20986 else
20987   echo "$as_me: failed program was:" >&5
20988 cat "conftest.$ac_ext" >&5
20989 eval "$as_ac_var=no"
20990 fi
20991 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20992 fi
20993 echo "$as_me:20993: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20994 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20995 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20996   cat >>confdefs.h <<EOF
20997 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20998 EOF
20999
21000 fi
21001 done
21002
21003 if test "x$ac_cv_func_getopt" = xno && \
21004    test "x$cf_with_progs$cf_with_tests" != xnono; then
21005         { { echo "$as_me:21005: error: getopt is required for building programs" >&5
21006 echo "$as_me: error: getopt is required for building programs" >&2;}
21007    { (exit 1); exit 1; }; }
21008 fi
21009
21010 if test "x$with_safe_sprintf" = xyes
21011 then
21012         if test "x$ac_cv_func_vsnprintf" = xyes
21013         then
21014                 { echo "$as_me:21014: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21015 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21016         else
21017
21018 cat >>confdefs.h <<\EOF
21019 #define USE_SAFE_SPRINTF 1
21020 EOF
21021
21022         fi
21023 fi
21024
21025 if test "x$with_getcap" = "xyes" ; then
21026
21027 echo "$as_me:21027: checking for terminal-capability database functions" >&5
21028 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21029 if test "${cf_cv_cgetent+set}" = set; then
21030   echo $ECHO_N "(cached) $ECHO_C" >&6
21031 else
21032
21033 cat >"conftest.$ac_ext" <<_ACEOF
21034 #line 21034 "configure"
21035 #include "confdefs.h"
21036
21037 #include <stdlib.h>
21038 int
21039 main (void)
21040 {
21041
21042         char temp[128];
21043         char *buf = temp;
21044         char *db_array = temp;
21045         cgetent(&buf, &db_array, "vt100");
21046         cgetcap(buf, "tc", '=');
21047         cgetmatch(buf, "tc");
21048
21049   ;
21050   return 0;
21051 }
21052 _ACEOF
21053 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21054 if { (eval echo "$as_me:21054: \"$ac_link\"") >&5
21055   (eval $ac_link) 2>&5
21056   ac_status=$?
21057   echo "$as_me:21057: \$? = $ac_status" >&5
21058   (exit "$ac_status"); } &&
21059          { ac_try='test -s "conftest$ac_exeext"'
21060   { (eval echo "$as_me:21060: \"$ac_try\"") >&5
21061   (eval $ac_try) 2>&5
21062   ac_status=$?
21063   echo "$as_me:21063: \$? = $ac_status" >&5
21064   (exit "$ac_status"); }; }; then
21065   cf_cv_cgetent=yes
21066 else
21067   echo "$as_me: failed program was:" >&5
21068 cat "conftest.$ac_ext" >&5
21069 cf_cv_cgetent=no
21070 fi
21071 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21072
21073 fi
21074 echo "$as_me:21074: result: $cf_cv_cgetent" >&5
21075 echo "${ECHO_T}$cf_cv_cgetent" >&6
21076
21077 if test "$cf_cv_cgetent" = yes
21078 then
21079
21080 cat >>confdefs.h <<\EOF
21081 #define HAVE_BSD_CGETENT 1
21082 EOF
21083
21084 echo "$as_me:21084: checking if cgetent uses const parameter" >&5
21085 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21086 if test "${cf_cv_cgetent_const+set}" = set; then
21087   echo $ECHO_N "(cached) $ECHO_C" >&6
21088 else
21089
21090 cat >"conftest.$ac_ext" <<_ACEOF
21091 #line 21091 "configure"
21092 #include "confdefs.h"
21093
21094 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21095 #include <stdlib.h>
21096 int
21097 main (void)
21098 {
21099
21100         char temp[128];
21101         char *buf = temp;
21102 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21103         const char *db_array = temp;
21104         cgetent(&buf, &db_array, "vt100");
21105 #endif
21106         cgetcap(buf, "tc", '=');
21107         cgetmatch(buf, "tc");
21108
21109   ;
21110   return 0;
21111 }
21112 _ACEOF
21113 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21114 if { (eval echo "$as_me:21114: \"$ac_link\"") >&5
21115   (eval $ac_link) 2>&5
21116   ac_status=$?
21117   echo "$as_me:21117: \$? = $ac_status" >&5
21118   (exit "$ac_status"); } &&
21119          { ac_try='test -s "conftest$ac_exeext"'
21120   { (eval echo "$as_me:21120: \"$ac_try\"") >&5
21121   (eval $ac_try) 2>&5
21122   ac_status=$?
21123   echo "$as_me:21123: \$? = $ac_status" >&5
21124   (exit "$ac_status"); }; }; then
21125   cf_cv_cgetent_const=yes
21126 else
21127   echo "$as_me: failed program was:" >&5
21128 cat "conftest.$ac_ext" >&5
21129 cf_cv_cgetent_const=no
21130 fi
21131 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21132
21133 fi
21134 echo "$as_me:21134: result: $cf_cv_cgetent_const" >&5
21135 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21136         if test "$cf_cv_cgetent_const" = yes
21137         then
21138
21139 cat >>confdefs.h <<EOF
21140 #define CGETENT_CONST const
21141 EOF
21142
21143         fi
21144 fi
21145
21146 fi
21147
21148 echo "$as_me:21148: checking for isascii" >&5
21149 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21150 if test "${cf_cv_have_isascii+set}" = set; then
21151   echo $ECHO_N "(cached) $ECHO_C" >&6
21152 else
21153
21154         cat >"conftest.$ac_ext" <<_ACEOF
21155 #line 21155 "configure"
21156 #include "confdefs.h"
21157 #include <ctype.h>
21158 int
21159 main (void)
21160 {
21161 int x = isascii(' ')
21162   ;
21163   return 0;
21164 }
21165 _ACEOF
21166 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21167 if { (eval echo "$as_me:21167: \"$ac_link\"") >&5
21168   (eval $ac_link) 2>&5
21169   ac_status=$?
21170   echo "$as_me:21170: \$? = $ac_status" >&5
21171   (exit "$ac_status"); } &&
21172          { ac_try='test -s "conftest$ac_exeext"'
21173   { (eval echo "$as_me:21173: \"$ac_try\"") >&5
21174   (eval $ac_try) 2>&5
21175   ac_status=$?
21176   echo "$as_me:21176: \$? = $ac_status" >&5
21177   (exit "$ac_status"); }; }; then
21178   cf_cv_have_isascii=yes
21179 else
21180   echo "$as_me: failed program was:" >&5
21181 cat "conftest.$ac_ext" >&5
21182 cf_cv_have_isascii=no
21183 fi
21184 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21185
21186 fi
21187 echo "$as_me:21187: result: $cf_cv_have_isascii" >&5
21188 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21189 test "$cf_cv_have_isascii" = yes &&
21190 cat >>confdefs.h <<\EOF
21191 #define HAVE_ISASCII 1
21192 EOF
21193
21194 if test "$ac_cv_func_sigaction" = yes; then
21195 echo "$as_me:21195: checking whether sigaction needs _POSIX_SOURCE" >&5
21196 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21197 cat >"conftest.$ac_ext" <<_ACEOF
21198 #line 21198 "configure"
21199 #include "confdefs.h"
21200
21201 #include <sys/types.h>
21202 #include <signal.h>
21203 int
21204 main (void)
21205 {
21206 struct sigaction act
21207   ;
21208   return 0;
21209 }
21210 _ACEOF
21211 rm -f "conftest.$ac_objext"
21212 if { (eval echo "$as_me:21212: \"$ac_compile\"") >&5
21213   (eval $ac_compile) 2>&5
21214   ac_status=$?
21215   echo "$as_me:21215: \$? = $ac_status" >&5
21216   (exit "$ac_status"); } &&
21217          { ac_try='test -s "conftest.$ac_objext"'
21218   { (eval echo "$as_me:21218: \"$ac_try\"") >&5
21219   (eval $ac_try) 2>&5
21220   ac_status=$?
21221   echo "$as_me:21221: \$? = $ac_status" >&5
21222   (exit "$ac_status"); }; }; then
21223   sigact_bad=no
21224 else
21225   echo "$as_me: failed program was:" >&5
21226 cat "conftest.$ac_ext" >&5
21227
21228 cat >"conftest.$ac_ext" <<_ACEOF
21229 #line 21229 "configure"
21230 #include "confdefs.h"
21231
21232 #define _POSIX_SOURCE
21233 #include <sys/types.h>
21234 #include <signal.h>
21235 int
21236 main (void)
21237 {
21238 struct sigaction act
21239   ;
21240   return 0;
21241 }
21242 _ACEOF
21243 rm -f "conftest.$ac_objext"
21244 if { (eval echo "$as_me:21244: \"$ac_compile\"") >&5
21245   (eval $ac_compile) 2>&5
21246   ac_status=$?
21247   echo "$as_me:21247: \$? = $ac_status" >&5
21248   (exit "$ac_status"); } &&
21249          { ac_try='test -s "conftest.$ac_objext"'
21250   { (eval echo "$as_me:21250: \"$ac_try\"") >&5
21251   (eval $ac_try) 2>&5
21252   ac_status=$?
21253   echo "$as_me:21253: \$? = $ac_status" >&5
21254   (exit "$ac_status"); }; }; then
21255   sigact_bad=yes
21256
21257 cat >>confdefs.h <<\EOF
21258 #define _POSIX_SOURCE 1
21259 EOF
21260
21261 else
21262   echo "$as_me: failed program was:" >&5
21263 cat "conftest.$ac_ext" >&5
21264 sigact_bad=unknown
21265 fi
21266 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21267 fi
21268 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21269 echo "$as_me:21269: result: $sigact_bad" >&5
21270 echo "${ECHO_T}$sigact_bad" >&6
21271 fi
21272
21273 echo "$as_me:21273: checking if nanosleep really works" >&5
21274 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21275 if test "${cf_cv_func_nanosleep+set}" = set; then
21276   echo $ECHO_N "(cached) $ECHO_C" >&6
21277 else
21278
21279 if test "$cross_compiling" = yes; then
21280   cf_cv_func_nanosleep=unknown
21281 else
21282   cat >"conftest.$ac_ext" <<_ACEOF
21283 #line 21283 "configure"
21284 #include "confdefs.h"
21285
21286 #include <stdio.h>
21287 #include <errno.h>
21288 #include <time.h>
21289
21290 #ifdef HAVE_SYS_TIME_H
21291 #include <sys/time.h>
21292 #endif
21293
21294 int main(void) {
21295         struct timespec ts1, ts2;
21296         int code;
21297         ts1.tv_sec  = 0;
21298         ts1.tv_nsec = 750000000;
21299         ts2.tv_sec  = 0;
21300         ts2.tv_nsec = 0;
21301         errno = 0;
21302         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21303         ${cf_cv_main_return:-return}(code != 0);
21304 }
21305
21306 _ACEOF
21307 rm -f "conftest$ac_exeext"
21308 if { (eval echo "$as_me:21308: \"$ac_link\"") >&5
21309   (eval $ac_link) 2>&5
21310   ac_status=$?
21311   echo "$as_me:21311: \$? = $ac_status" >&5
21312   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21313   { (eval echo "$as_me:21313: \"$ac_try\"") >&5
21314   (eval $ac_try) 2>&5
21315   ac_status=$?
21316   echo "$as_me:21316: \$? = $ac_status" >&5
21317   (exit "$ac_status"); }; }; then
21318   cf_cv_func_nanosleep=yes
21319 else
21320   echo "$as_me: program exited with status $ac_status" >&5
21321 echo "$as_me: failed program was:" >&5
21322 cat "conftest.$ac_ext" >&5
21323 cf_cv_func_nanosleep=no
21324 fi
21325 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21326 fi
21327 fi
21328 echo "$as_me:21328: result: $cf_cv_func_nanosleep" >&5
21329 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21330
21331 test "$cf_cv_func_nanosleep" = "yes" &&
21332 cat >>confdefs.h <<\EOF
21333 #define HAVE_NANOSLEEP 1
21334 EOF
21335
21336 for ac_header in \
21337 termio.h \
21338 termios.h \
21339 unistd.h \
21340 sys/ioctl.h \
21341 sys/termio.h \
21342
21343 do
21344 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21345 echo "$as_me:21345: checking for $ac_header" >&5
21346 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21347 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21348   echo $ECHO_N "(cached) $ECHO_C" >&6
21349 else
21350   cat >"conftest.$ac_ext" <<_ACEOF
21351 #line 21351 "configure"
21352 #include "confdefs.h"
21353 #include <$ac_header>
21354 _ACEOF
21355 if { (eval echo "$as_me:21355: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21356   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21357   ac_status=$?
21358   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21359   rm -f conftest.er1
21360   cat conftest.err >&5
21361   echo "$as_me:21361: \$? = $ac_status" >&5
21362   (exit "$ac_status"); } >/dev/null; then
21363   if test -s conftest.err; then
21364     ac_cpp_err=$ac_c_preproc_warn_flag
21365   else
21366     ac_cpp_err=
21367   fi
21368 else
21369   ac_cpp_err=yes
21370 fi
21371 if test -z "$ac_cpp_err"; then
21372   eval "$as_ac_Header=yes"
21373 else
21374   echo "$as_me: failed program was:" >&5
21375   cat "conftest.$ac_ext" >&5
21376   eval "$as_ac_Header=no"
21377 fi
21378 rm -f conftest.err "conftest.$ac_ext"
21379 fi
21380 echo "$as_me:21380: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21381 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21382 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21383   cat >>confdefs.h <<EOF
21384 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21385 EOF
21386
21387 fi
21388 done
21389
21390 if test "$ac_cv_header_termios_h" = yes ; then
21391         case "$CFLAGS $CPPFLAGS" in
21392         (*-D_POSIX_SOURCE*)
21393                 termios_bad=dunno ;;
21394         (*)     termios_bad=maybe ;;
21395         esac
21396         if test "$termios_bad" = maybe ; then
21397         echo "$as_me:21397: checking whether termios.h needs _POSIX_SOURCE" >&5
21398 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21399         cat >"conftest.$ac_ext" <<_ACEOF
21400 #line 21400 "configure"
21401 #include "confdefs.h"
21402 #include <termios.h>
21403 int
21404 main (void)
21405 {
21406 struct termios foo; int x = foo.c_iflag = 1; (void)x
21407   ;
21408   return 0;
21409 }
21410 _ACEOF
21411 rm -f "conftest.$ac_objext"
21412 if { (eval echo "$as_me:21412: \"$ac_compile\"") >&5
21413   (eval $ac_compile) 2>&5
21414   ac_status=$?
21415   echo "$as_me:21415: \$? = $ac_status" >&5
21416   (exit "$ac_status"); } &&
21417          { ac_try='test -s "conftest.$ac_objext"'
21418   { (eval echo "$as_me:21418: \"$ac_try\"") >&5
21419   (eval $ac_try) 2>&5
21420   ac_status=$?
21421   echo "$as_me:21421: \$? = $ac_status" >&5
21422   (exit "$ac_status"); }; }; then
21423   termios_bad=no
21424 else
21425   echo "$as_me: failed program was:" >&5
21426 cat "conftest.$ac_ext" >&5
21427
21428                 cat >"conftest.$ac_ext" <<_ACEOF
21429 #line 21429 "configure"
21430 #include "confdefs.h"
21431
21432 #define _POSIX_SOURCE
21433 #include <termios.h>
21434 int
21435 main (void)
21436 {
21437 struct termios foo; int x = foo.c_iflag = 2; (void)x
21438   ;
21439   return 0;
21440 }
21441 _ACEOF
21442 rm -f "conftest.$ac_objext"
21443 if { (eval echo "$as_me:21443: \"$ac_compile\"") >&5
21444   (eval $ac_compile) 2>&5
21445   ac_status=$?
21446   echo "$as_me:21446: \$? = $ac_status" >&5
21447   (exit "$ac_status"); } &&
21448          { ac_try='test -s "conftest.$ac_objext"'
21449   { (eval echo "$as_me:21449: \"$ac_try\"") >&5
21450   (eval $ac_try) 2>&5
21451   ac_status=$?
21452   echo "$as_me:21452: \$? = $ac_status" >&5
21453   (exit "$ac_status"); }; }; then
21454   termios_bad=unknown
21455 else
21456   echo "$as_me: failed program was:" >&5
21457 cat "conftest.$ac_ext" >&5
21458 termios_bad=yes
21459 cat >>confdefs.h <<\EOF
21460 #define _POSIX_SOURCE 1
21461 EOF
21462
21463 fi
21464 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21465
21466 fi
21467 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21468         echo "$as_me:21468: result: $termios_bad" >&5
21469 echo "${ECHO_T}$termios_bad" >&6
21470         fi
21471 fi
21472
21473 echo "$as_me:21473: checking for tcgetattr" >&5
21474 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21475 if test "${cf_cv_have_tcgetattr+set}" = set; then
21476   echo $ECHO_N "(cached) $ECHO_C" >&6
21477 else
21478
21479 cat >"conftest.$ac_ext" <<_ACEOF
21480 #line 21480 "configure"
21481 #include "confdefs.h"
21482
21483 #include <sys/types.h>
21484 #ifdef HAVE_UNISTD_H
21485 #include <unistd.h>
21486 #endif
21487 #ifdef HAVE_TERMIOS_H
21488 #include <termios.h>
21489 #define TTY struct termios
21490 #else
21491 #ifdef HAVE_TERMIO_H
21492 #include <termio.h>
21493 #define TTY struct termio
21494 #endif
21495 #endif
21496
21497 int
21498 main (void)
21499 {
21500
21501 TTY foo;
21502 tcgetattr(1, &foo);
21503   ;
21504   return 0;
21505 }
21506 _ACEOF
21507 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21508 if { (eval echo "$as_me:21508: \"$ac_link\"") >&5
21509   (eval $ac_link) 2>&5
21510   ac_status=$?
21511   echo "$as_me:21511: \$? = $ac_status" >&5
21512   (exit "$ac_status"); } &&
21513          { ac_try='test -s "conftest$ac_exeext"'
21514   { (eval echo "$as_me:21514: \"$ac_try\"") >&5
21515   (eval $ac_try) 2>&5
21516   ac_status=$?
21517   echo "$as_me:21517: \$? = $ac_status" >&5
21518   (exit "$ac_status"); }; }; then
21519   cf_cv_have_tcgetattr=yes
21520 else
21521   echo "$as_me: failed program was:" >&5
21522 cat "conftest.$ac_ext" >&5
21523 cf_cv_have_tcgetattr=no
21524 fi
21525 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21526 fi
21527 echo "$as_me:21527: result: $cf_cv_have_tcgetattr" >&5
21528 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21529 test "$cf_cv_have_tcgetattr" = yes &&
21530 cat >>confdefs.h <<\EOF
21531 #define HAVE_TCGETATTR 1
21532 EOF
21533
21534 echo "$as_me:21534: checking for vsscanf function or workaround" >&5
21535 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21536 if test "${cf_cv_func_vsscanf+set}" = set; then
21537   echo $ECHO_N "(cached) $ECHO_C" >&6
21538 else
21539
21540 cat >"conftest.$ac_ext" <<_ACEOF
21541 #line 21541 "configure"
21542 #include "confdefs.h"
21543
21544 #include <stdarg.h>
21545 #include <stdio.h>
21546 int
21547 main (void)
21548 {
21549
21550         va_list ap;
21551         vsscanf("from", "%d", ap)
21552   ;
21553   return 0;
21554 }
21555 _ACEOF
21556 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21557 if { (eval echo "$as_me:21557: \"$ac_link\"") >&5
21558   (eval $ac_link) 2>&5
21559   ac_status=$?
21560   echo "$as_me:21560: \$? = $ac_status" >&5
21561   (exit "$ac_status"); } &&
21562          { ac_try='test -s "conftest$ac_exeext"'
21563   { (eval echo "$as_me:21563: \"$ac_try\"") >&5
21564   (eval $ac_try) 2>&5
21565   ac_status=$?
21566   echo "$as_me:21566: \$? = $ac_status" >&5
21567   (exit "$ac_status"); }; }; then
21568   cf_cv_func_vsscanf=vsscanf
21569 else
21570   echo "$as_me: failed program was:" >&5
21571 cat "conftest.$ac_ext" >&5
21572
21573 cat >"conftest.$ac_ext" <<_ACEOF
21574 #line 21574 "configure"
21575 #include "confdefs.h"
21576
21577 #include <stdarg.h>
21578 #include <stdio.h>
21579 int
21580 main (void)
21581 {
21582
21583         FILE strbuf;
21584         char *str = "from";
21585
21586         strbuf._flag = _IOREAD;
21587         strbuf._ptr = strbuf._base = (unsigned char *) str;
21588         strbuf._cnt = strlen(str);
21589         strbuf._file = _NFILE;
21590         return (vfscanf(&strbuf, "%d", ap))
21591   ;
21592   return 0;
21593 }
21594 _ACEOF
21595 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21596 if { (eval echo "$as_me:21596: \"$ac_link\"") >&5
21597   (eval $ac_link) 2>&5
21598   ac_status=$?
21599   echo "$as_me:21599: \$? = $ac_status" >&5
21600   (exit "$ac_status"); } &&
21601          { ac_try='test -s "conftest$ac_exeext"'
21602   { (eval echo "$as_me:21602: \"$ac_try\"") >&5
21603   (eval $ac_try) 2>&5
21604   ac_status=$?
21605   echo "$as_me:21605: \$? = $ac_status" >&5
21606   (exit "$ac_status"); }; }; then
21607   cf_cv_func_vsscanf=vfscanf
21608 else
21609   echo "$as_me: failed program was:" >&5
21610 cat "conftest.$ac_ext" >&5
21611
21612 cat >"conftest.$ac_ext" <<_ACEOF
21613 #line 21613 "configure"
21614 #include "confdefs.h"
21615
21616 #include <stdarg.h>
21617 #include <stdio.h>
21618 int
21619 main (void)
21620 {
21621
21622         FILE strbuf;
21623         char *str = "from";
21624
21625         strbuf._flag = _IOREAD;
21626         strbuf._ptr = strbuf._base = (unsigned char *) str;
21627         strbuf._cnt = strlen(str);
21628         strbuf._file = _NFILE;
21629         return (_doscan(&strbuf, "%d", ap))
21630   ;
21631   return 0;
21632 }
21633 _ACEOF
21634 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21635 if { (eval echo "$as_me:21635: \"$ac_link\"") >&5
21636   (eval $ac_link) 2>&5
21637   ac_status=$?
21638   echo "$as_me:21638: \$? = $ac_status" >&5
21639   (exit "$ac_status"); } &&
21640          { ac_try='test -s "conftest$ac_exeext"'
21641   { (eval echo "$as_me:21641: \"$ac_try\"") >&5
21642   (eval $ac_try) 2>&5
21643   ac_status=$?
21644   echo "$as_me:21644: \$? = $ac_status" >&5
21645   (exit "$ac_status"); }; }; then
21646   cf_cv_func_vsscanf=_doscan
21647 else
21648   echo "$as_me: failed program was:" >&5
21649 cat "conftest.$ac_ext" >&5
21650
21651 cf_cv_func_vsscanf=no
21652 fi
21653 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21654 fi
21655 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21656 fi
21657 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21658 fi
21659 echo "$as_me:21659: result: $cf_cv_func_vsscanf" >&5
21660 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21661
21662 case "$cf_cv_func_vsscanf" in
21663 (vsscanf)
21664 cat >>confdefs.h <<\EOF
21665 #define HAVE_VSSCANF 1
21666 EOF
21667 ;;
21668 (vfscanf)
21669 cat >>confdefs.h <<\EOF
21670 #define HAVE_VFSCANF 1
21671 EOF
21672 ;;
21673 (_doscan)
21674 cat >>confdefs.h <<\EOF
21675 #define HAVE__DOSCAN 1
21676 EOF
21677 ;;
21678 esac
21679
21680 for ac_header in \
21681 unistd.h \
21682
21683 do
21684 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21685 echo "$as_me:21685: checking for $ac_header" >&5
21686 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21687 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21688   echo $ECHO_N "(cached) $ECHO_C" >&6
21689 else
21690   cat >"conftest.$ac_ext" <<_ACEOF
21691 #line 21691 "configure"
21692 #include "confdefs.h"
21693 #include <$ac_header>
21694 _ACEOF
21695 if { (eval echo "$as_me:21695: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21696   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21697   ac_status=$?
21698   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21699   rm -f conftest.er1
21700   cat conftest.err >&5
21701   echo "$as_me:21701: \$? = $ac_status" >&5
21702   (exit "$ac_status"); } >/dev/null; then
21703   if test -s conftest.err; then
21704     ac_cpp_err=$ac_c_preproc_warn_flag
21705   else
21706     ac_cpp_err=
21707   fi
21708 else
21709   ac_cpp_err=yes
21710 fi
21711 if test -z "$ac_cpp_err"; then
21712   eval "$as_ac_Header=yes"
21713 else
21714   echo "$as_me: failed program was:" >&5
21715   cat "conftest.$ac_ext" >&5
21716   eval "$as_ac_Header=no"
21717 fi
21718 rm -f conftest.err "conftest.$ac_ext"
21719 fi
21720 echo "$as_me:21720: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21721 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21722 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21723   cat >>confdefs.h <<EOF
21724 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21725 EOF
21726
21727 fi
21728 done
21729
21730 echo "$as_me:21730: checking for working mkstemp" >&5
21731 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21732 if test "${cf_cv_func_mkstemp+set}" = set; then
21733   echo $ECHO_N "(cached) $ECHO_C" >&6
21734 else
21735
21736 rm -rf ./conftest*
21737 if test "$cross_compiling" = yes; then
21738   cf_cv_func_mkstemp=maybe
21739 else
21740   cat >"conftest.$ac_ext" <<_ACEOF
21741 #line 21741 "configure"
21742 #include "confdefs.h"
21743
21744 #include <sys/types.h>
21745 #ifdef HAVE_UNISTD_H
21746 #include <unistd.h>
21747 #endif
21748 #include <stdlib.h>
21749 #include <stdio.h>
21750 #include <string.h>
21751 #include <sys/stat.h>
21752 int main(void)
21753 {
21754         char *tmpl = "conftestXXXXXX";
21755         char name[2][80];
21756         int n;
21757         int result = 0;
21758         int fd;
21759         struct stat sb;
21760
21761         umask(077);
21762         for (n = 0; n < 2; ++n) {
21763                 strcpy(name[n], tmpl);
21764                 if ((fd = mkstemp(name[n])) >= 0) {
21765                         if (!strcmp(name[n], tmpl)
21766                          || stat(name[n], &sb) != 0
21767                          || (sb.st_mode & S_IFMT) != S_IFREG
21768                          || (sb.st_mode & 077) != 0) {
21769                                 result = 1;
21770                         }
21771                         close(fd);
21772                 }
21773         }
21774         if (result == 0
21775          && !strcmp(name[0], name[1]))
21776                 result = 1;
21777         ${cf_cv_main_return:-return}(result);
21778 }
21779
21780 _ACEOF
21781 rm -f "conftest$ac_exeext"
21782 if { (eval echo "$as_me:21782: \"$ac_link\"") >&5
21783   (eval $ac_link) 2>&5
21784   ac_status=$?
21785   echo "$as_me:21785: \$? = $ac_status" >&5
21786   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21787   { (eval echo "$as_me:21787: \"$ac_try\"") >&5
21788   (eval $ac_try) 2>&5
21789   ac_status=$?
21790   echo "$as_me:21790: \$? = $ac_status" >&5
21791   (exit "$ac_status"); }; }; then
21792   cf_cv_func_mkstemp=yes
21793
21794 else
21795   echo "$as_me: program exited with status $ac_status" >&5
21796 echo "$as_me: failed program was:" >&5
21797 cat "conftest.$ac_ext" >&5
21798 cf_cv_func_mkstemp=no
21799
21800 fi
21801 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21802 fi
21803
21804 fi
21805 echo "$as_me:21805: result: $cf_cv_func_mkstemp" >&5
21806 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21807 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21808         echo "$as_me:21808: checking for mkstemp" >&5
21809 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21810 if test "${ac_cv_func_mkstemp+set}" = set; then
21811   echo $ECHO_N "(cached) $ECHO_C" >&6
21812 else
21813   cat >"conftest.$ac_ext" <<_ACEOF
21814 #line 21814 "configure"
21815 #include "confdefs.h"
21816 #define mkstemp autoconf_temporary
21817 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21818 #undef mkstemp
21819
21820 #ifdef __cplusplus
21821 extern "C"
21822 #endif
21823
21824 /* We use char because int might match the return type of a gcc2
21825    builtin and then its argument prototype would still apply.  */
21826 char mkstemp (void);
21827
21828 int
21829 main (void)
21830 {
21831
21832 /* The GNU C library defines stubs for functions which it implements
21833     to always fail with ENOSYS.  Some functions are actually named
21834     something starting with __ and the normal name is an alias.  */
21835 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21836 #error found stub for mkstemp
21837 #endif
21838
21839         return mkstemp ();
21840   ;
21841   return 0;
21842 }
21843 _ACEOF
21844 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21845 if { (eval echo "$as_me:21845: \"$ac_link\"") >&5
21846   (eval $ac_link) 2>&5
21847   ac_status=$?
21848   echo "$as_me:21848: \$? = $ac_status" >&5
21849   (exit "$ac_status"); } &&
21850          { ac_try='test -s "conftest$ac_exeext"'
21851   { (eval echo "$as_me:21851: \"$ac_try\"") >&5
21852   (eval $ac_try) 2>&5
21853   ac_status=$?
21854   echo "$as_me:21854: \$? = $ac_status" >&5
21855   (exit "$ac_status"); }; }; then
21856   ac_cv_func_mkstemp=yes
21857 else
21858   echo "$as_me: failed program was:" >&5
21859 cat "conftest.$ac_ext" >&5
21860 ac_cv_func_mkstemp=no
21861 fi
21862 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21863 fi
21864 echo "$as_me:21864: result: $ac_cv_func_mkstemp" >&5
21865 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21866
21867 fi
21868 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21869
21870 cat >>confdefs.h <<\EOF
21871 #define HAVE_MKSTEMP 1
21872 EOF
21873
21874 fi
21875
21876 # setup for prototype of fallback for vsscanf()
21877
21878 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21879         HAVE_VSSCANF=1
21880 else
21881         HAVE_VSSCANF=0
21882 fi
21883
21884 if test "x$cross_compiling" = xyes ; then
21885         { echo "$as_me:21885: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21886 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21887 else
21888         echo "$as_me:21888: checking whether setvbuf arguments are reversed" >&5
21889 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21890 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21891   echo $ECHO_N "(cached) $ECHO_C" >&6
21892 else
21893   if test "$cross_compiling" = yes; then
21894   { { echo "$as_me:21894: error: cannot run test program while cross compiling" >&5
21895 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21896    { (exit 1); exit 1; }; }
21897 else
21898   cat >"conftest.$ac_ext" <<_ACEOF
21899 #line 21899 "configure"
21900 #include "confdefs.h"
21901 #include <stdio.h>
21902 /* If setvbuf has the reversed format, exit 0. */
21903 int
21904 main (void)
21905 {
21906   /* This call has the arguments reversed.
21907      A reversed system may check and see that the address of main
21908      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21909   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21910     $ac_main_return(1);
21911   putc('\r', stdout);
21912   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21913 }
21914 _ACEOF
21915 rm -f "conftest$ac_exeext"
21916 if { (eval echo "$as_me:21916: \"$ac_link\"") >&5
21917   (eval $ac_link) 2>&5
21918   ac_status=$?
21919   echo "$as_me:21919: \$? = $ac_status" >&5
21920   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21921   { (eval echo "$as_me:21921: \"$ac_try\"") >&5
21922   (eval $ac_try) 2>&5
21923   ac_status=$?
21924   echo "$as_me:21924: \$? = $ac_status" >&5
21925   (exit "$ac_status"); }; }; then
21926   ac_cv_func_setvbuf_reversed=yes
21927 else
21928   echo "$as_me: program exited with status $ac_status" >&5
21929 echo "$as_me: failed program was:" >&5
21930 cat "conftest.$ac_ext" >&5
21931 ac_cv_func_setvbuf_reversed=no
21932 fi
21933 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21934 fi
21935 rm -f core ./core.* ./*.core
21936 fi
21937 echo "$as_me:21937: result: $ac_cv_func_setvbuf_reversed" >&5
21938 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21939 if test $ac_cv_func_setvbuf_reversed = yes; then
21940
21941 cat >>confdefs.h <<\EOF
21942 #define SETVBUF_REVERSED 1
21943 EOF
21944
21945 fi
21946
21947 fi
21948 echo "$as_me:21948: checking for intptr_t" >&5
21949 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21950 if test "${ac_cv_type_intptr_t+set}" = set; then
21951   echo $ECHO_N "(cached) $ECHO_C" >&6
21952 else
21953   cat >"conftest.$ac_ext" <<_ACEOF
21954 #line 21954 "configure"
21955 #include "confdefs.h"
21956 $ac_includes_default
21957 int
21958 main (void)
21959 {
21960 if ((intptr_t *) 0)
21961   return 0;
21962 if (sizeof (intptr_t))
21963   return 0;
21964   ;
21965   return 0;
21966 }
21967 _ACEOF
21968 rm -f "conftest.$ac_objext"
21969 if { (eval echo "$as_me:21969: \"$ac_compile\"") >&5
21970   (eval $ac_compile) 2>&5
21971   ac_status=$?
21972   echo "$as_me:21972: \$? = $ac_status" >&5
21973   (exit "$ac_status"); } &&
21974          { ac_try='test -s "conftest.$ac_objext"'
21975   { (eval echo "$as_me:21975: \"$ac_try\"") >&5
21976   (eval $ac_try) 2>&5
21977   ac_status=$?
21978   echo "$as_me:21978: \$? = $ac_status" >&5
21979   (exit "$ac_status"); }; }; then
21980   ac_cv_type_intptr_t=yes
21981 else
21982   echo "$as_me: failed program was:" >&5
21983 cat "conftest.$ac_ext" >&5
21984 ac_cv_type_intptr_t=no
21985 fi
21986 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21987 fi
21988 echo "$as_me:21988: result: $ac_cv_type_intptr_t" >&5
21989 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21990 if test "$ac_cv_type_intptr_t" = yes; then
21991   :
21992 else
21993
21994 cat >>confdefs.h <<EOF
21995 #define intptr_t long
21996 EOF
21997
21998 fi
21999
22000 echo "$as_me:22000: checking for ssize_t" >&5
22001 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22002 if test "${ac_cv_type_ssize_t+set}" = set; then
22003   echo $ECHO_N "(cached) $ECHO_C" >&6
22004 else
22005   cat >"conftest.$ac_ext" <<_ACEOF
22006 #line 22006 "configure"
22007 #include "confdefs.h"
22008 $ac_includes_default
22009 int
22010 main (void)
22011 {
22012 if ((ssize_t *) 0)
22013   return 0;
22014 if (sizeof (ssize_t))
22015   return 0;
22016   ;
22017   return 0;
22018 }
22019 _ACEOF
22020 rm -f "conftest.$ac_objext"
22021 if { (eval echo "$as_me:22021: \"$ac_compile\"") >&5
22022   (eval $ac_compile) 2>&5
22023   ac_status=$?
22024   echo "$as_me:22024: \$? = $ac_status" >&5
22025   (exit "$ac_status"); } &&
22026          { ac_try='test -s "conftest.$ac_objext"'
22027   { (eval echo "$as_me:22027: \"$ac_try\"") >&5
22028   (eval $ac_try) 2>&5
22029   ac_status=$?
22030   echo "$as_me:22030: \$? = $ac_status" >&5
22031   (exit "$ac_status"); }; }; then
22032   ac_cv_type_ssize_t=yes
22033 else
22034   echo "$as_me: failed program was:" >&5
22035 cat "conftest.$ac_ext" >&5
22036 ac_cv_type_ssize_t=no
22037 fi
22038 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22039 fi
22040 echo "$as_me:22040: result: $ac_cv_type_ssize_t" >&5
22041 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22042 if test "$ac_cv_type_ssize_t" = yes; then
22043   :
22044 else
22045
22046 cat >>confdefs.h <<EOF
22047 #define ssize_t int
22048 EOF
22049
22050 fi
22051
22052 echo "$as_me:22052: checking for type sigaction_t" >&5
22053 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22054 if test "${cf_cv_type_sigaction+set}" = set; then
22055   echo $ECHO_N "(cached) $ECHO_C" >&6
22056 else
22057
22058         cat >"conftest.$ac_ext" <<_ACEOF
22059 #line 22059 "configure"
22060 #include "confdefs.h"
22061
22062 #include <signal.h>
22063 int
22064 main (void)
22065 {
22066 sigaction_t x
22067   ;
22068   return 0;
22069 }
22070 _ACEOF
22071 rm -f "conftest.$ac_objext"
22072 if { (eval echo "$as_me:22072: \"$ac_compile\"") >&5
22073   (eval $ac_compile) 2>&5
22074   ac_status=$?
22075   echo "$as_me:22075: \$? = $ac_status" >&5
22076   (exit "$ac_status"); } &&
22077          { ac_try='test -s "conftest.$ac_objext"'
22078   { (eval echo "$as_me:22078: \"$ac_try\"") >&5
22079   (eval $ac_try) 2>&5
22080   ac_status=$?
22081   echo "$as_me:22081: \$? = $ac_status" >&5
22082   (exit "$ac_status"); }; }; then
22083   cf_cv_type_sigaction=yes
22084 else
22085   echo "$as_me: failed program was:" >&5
22086 cat "conftest.$ac_ext" >&5
22087 cf_cv_type_sigaction=no
22088 fi
22089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22090 fi
22091
22092 echo "$as_me:22092: result: $cf_cv_type_sigaction" >&5
22093 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22094 test "$cf_cv_type_sigaction" = yes &&
22095 cat >>confdefs.h <<\EOF
22096 #define HAVE_TYPE_SIGACTION 1
22097 EOF
22098
22099 echo "$as_me:22099: checking declaration of size-change" >&5
22100 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22101 if test "${cf_cv_sizechange+set}" = set; then
22102   echo $ECHO_N "(cached) $ECHO_C" >&6
22103 else
22104
22105         cf_cv_sizechange=unknown
22106         cf_save_CPPFLAGS="$CPPFLAGS"
22107
22108 for cf_opts in "" "NEED_PTEM_H"
22109 do
22110
22111         CPPFLAGS="$cf_save_CPPFLAGS"
22112         if test -n "$cf_opts"
22113         then
22114
22115         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22116         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22117
22118         fi
22119         cat >"conftest.$ac_ext" <<_ACEOF
22120 #line 22120 "configure"
22121 #include "confdefs.h"
22122 #include <sys/types.h>
22123 #ifdef HAVE_TERMIOS_H
22124 #include <termios.h>
22125 #else
22126 #ifdef HAVE_TERMIO_H
22127 #include <termio.h>
22128 #endif
22129 #endif
22130
22131 #ifdef NEED_PTEM_H
22132 /* This is a workaround for SCO:  they neglected to define struct winsize in
22133  * termios.h -- it's only in termio.h and ptem.h
22134  */
22135 #include <sys/stream.h>
22136 #include <sys/ptem.h>
22137 #endif
22138
22139 #ifdef HAVE_SYS_IOCTL_H
22140 #include <sys/ioctl.h>
22141 #endif
22142
22143 int
22144 main (void)
22145 {
22146
22147 #ifdef TIOCGSIZE
22148         struct ttysize win;     /* SunOS 3.0... */
22149         int y = win.ts_lines = 2;
22150         int x = win.ts_cols = 1;
22151         (void)y;
22152         (void)x;
22153 #else
22154 #ifdef TIOCGWINSZ
22155         struct winsize win;     /* everything else */
22156         int y = win.ws_row = 2;
22157         int x = win.ws_col = 1;
22158         (void)y;
22159         (void)x;
22160 #else
22161         no TIOCGSIZE or TIOCGWINSZ
22162 #endif /* TIOCGWINSZ */
22163 #endif /* TIOCGSIZE */
22164
22165   ;
22166   return 0;
22167 }
22168 _ACEOF
22169 rm -f "conftest.$ac_objext"
22170 if { (eval echo "$as_me:22170: \"$ac_compile\"") >&5
22171   (eval $ac_compile) 2>&5
22172   ac_status=$?
22173   echo "$as_me:22173: \$? = $ac_status" >&5
22174   (exit "$ac_status"); } &&
22175          { ac_try='test -s "conftest.$ac_objext"'
22176   { (eval echo "$as_me:22176: \"$ac_try\"") >&5
22177   (eval $ac_try) 2>&5
22178   ac_status=$?
22179   echo "$as_me:22179: \$? = $ac_status" >&5
22180   (exit "$ac_status"); }; }; then
22181   cf_cv_sizechange=yes
22182 else
22183   echo "$as_me: failed program was:" >&5
22184 cat "conftest.$ac_ext" >&5
22185 cf_cv_sizechange=no
22186 fi
22187 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22188
22189         CPPFLAGS="$cf_save_CPPFLAGS"
22190         if test "$cf_cv_sizechange" = yes ; then
22191                 echo "size-change succeeded ($cf_opts)" >&5
22192                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22193                 break
22194         fi
22195 done
22196
22197 fi
22198 echo "$as_me:22198: result: $cf_cv_sizechange" >&5
22199 echo "${ECHO_T}$cf_cv_sizechange" >&6
22200 if test "$cf_cv_sizechange" != no ; then
22201
22202 cat >>confdefs.h <<\EOF
22203 #define HAVE_SIZECHANGE 1
22204 EOF
22205
22206         case "$cf_cv_sizechange" in
22207         (NEED*)
22208                 cat >>confdefs.h <<EOF
22209 #define $cf_cv_sizechange  1
22210 EOF
22211
22212                 ;;
22213         esac
22214 fi
22215
22216 echo "$as_me:22216: checking for memmove" >&5
22217 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22218 if test "${ac_cv_func_memmove+set}" = set; then
22219   echo $ECHO_N "(cached) $ECHO_C" >&6
22220 else
22221   cat >"conftest.$ac_ext" <<_ACEOF
22222 #line 22222 "configure"
22223 #include "confdefs.h"
22224 #define memmove autoconf_temporary
22225 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22226 #undef memmove
22227
22228 #ifdef __cplusplus
22229 extern "C"
22230 #endif
22231
22232 /* We use char because int might match the return type of a gcc2
22233    builtin and then its argument prototype would still apply.  */
22234 char memmove (void);
22235
22236 int
22237 main (void)
22238 {
22239
22240 /* The GNU C library defines stubs for functions which it implements
22241     to always fail with ENOSYS.  Some functions are actually named
22242     something starting with __ and the normal name is an alias.  */
22243 #if defined (__stub_memmove) || defined (__stub___memmove)
22244 #error found stub for memmove
22245 #endif
22246
22247         return memmove ();
22248   ;
22249   return 0;
22250 }
22251 _ACEOF
22252 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22253 if { (eval echo "$as_me:22253: \"$ac_link\"") >&5
22254   (eval $ac_link) 2>&5
22255   ac_status=$?
22256   echo "$as_me:22256: \$? = $ac_status" >&5
22257   (exit "$ac_status"); } &&
22258          { ac_try='test -s "conftest$ac_exeext"'
22259   { (eval echo "$as_me:22259: \"$ac_try\"") >&5
22260   (eval $ac_try) 2>&5
22261   ac_status=$?
22262   echo "$as_me:22262: \$? = $ac_status" >&5
22263   (exit "$ac_status"); }; }; then
22264   ac_cv_func_memmove=yes
22265 else
22266   echo "$as_me: failed program was:" >&5
22267 cat "conftest.$ac_ext" >&5
22268 ac_cv_func_memmove=no
22269 fi
22270 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22271 fi
22272 echo "$as_me:22272: result: $ac_cv_func_memmove" >&5
22273 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22274 if test "$ac_cv_func_memmove" = yes; then
22275   :
22276 else
22277
22278 echo "$as_me:22278: checking for bcopy" >&5
22279 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22280 if test "${ac_cv_func_bcopy+set}" = set; then
22281   echo $ECHO_N "(cached) $ECHO_C" >&6
22282 else
22283   cat >"conftest.$ac_ext" <<_ACEOF
22284 #line 22284 "configure"
22285 #include "confdefs.h"
22286 #define bcopy autoconf_temporary
22287 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22288 #undef bcopy
22289
22290 #ifdef __cplusplus
22291 extern "C"
22292 #endif
22293
22294 /* We use char because int might match the return type of a gcc2
22295    builtin and then its argument prototype would still apply.  */
22296 char bcopy (void);
22297
22298 int
22299 main (void)
22300 {
22301
22302 /* The GNU C library defines stubs for functions which it implements
22303     to always fail with ENOSYS.  Some functions are actually named
22304     something starting with __ and the normal name is an alias.  */
22305 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22306 #error found stub for bcopy
22307 #endif
22308
22309         return bcopy ();
22310   ;
22311   return 0;
22312 }
22313 _ACEOF
22314 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22315 if { (eval echo "$as_me:22315: \"$ac_link\"") >&5
22316   (eval $ac_link) 2>&5
22317   ac_status=$?
22318   echo "$as_me:22318: \$? = $ac_status" >&5
22319   (exit "$ac_status"); } &&
22320          { ac_try='test -s "conftest$ac_exeext"'
22321   { (eval echo "$as_me:22321: \"$ac_try\"") >&5
22322   (eval $ac_try) 2>&5
22323   ac_status=$?
22324   echo "$as_me:22324: \$? = $ac_status" >&5
22325   (exit "$ac_status"); }; }; then
22326   ac_cv_func_bcopy=yes
22327 else
22328   echo "$as_me: failed program was:" >&5
22329 cat "conftest.$ac_ext" >&5
22330 ac_cv_func_bcopy=no
22331 fi
22332 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22333 fi
22334 echo "$as_me:22334: result: $ac_cv_func_bcopy" >&5
22335 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22336 if test "$ac_cv_func_bcopy" = yes; then
22337
22338         echo "$as_me:22338: checking if bcopy does overlapping moves" >&5
22339 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22340 if test "${cf_cv_good_bcopy+set}" = set; then
22341   echo $ECHO_N "(cached) $ECHO_C" >&6
22342 else
22343
22344                 if test "$cross_compiling" = yes; then
22345   cf_cv_good_bcopy=unknown
22346 else
22347   cat >"conftest.$ac_ext" <<_ACEOF
22348 #line 22348 "configure"
22349 #include "confdefs.h"
22350
22351 int main(void) {
22352         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22353         char temp[40];
22354         bcopy(data, temp, sizeof(data));
22355         bcopy(temp+10, temp, 15);
22356         bcopy(temp+5, temp+15, 10);
22357         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22358 }
22359
22360 _ACEOF
22361 rm -f "conftest$ac_exeext"
22362 if { (eval echo "$as_me:22362: \"$ac_link\"") >&5
22363   (eval $ac_link) 2>&5
22364   ac_status=$?
22365   echo "$as_me:22365: \$? = $ac_status" >&5
22366   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22367   { (eval echo "$as_me:22367: \"$ac_try\"") >&5
22368   (eval $ac_try) 2>&5
22369   ac_status=$?
22370   echo "$as_me:22370: \$? = $ac_status" >&5
22371   (exit "$ac_status"); }; }; then
22372   cf_cv_good_bcopy=yes
22373 else
22374   echo "$as_me: program exited with status $ac_status" >&5
22375 echo "$as_me: failed program was:" >&5
22376 cat "conftest.$ac_ext" >&5
22377 cf_cv_good_bcopy=no
22378 fi
22379 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22380 fi
22381
22382 fi
22383 echo "$as_me:22383: result: $cf_cv_good_bcopy" >&5
22384 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22385
22386 else
22387   cf_cv_good_bcopy=no
22388 fi
22389
22390         if test "$cf_cv_good_bcopy" = yes ; then
22391
22392 cat >>confdefs.h <<\EOF
22393 #define USE_OK_BCOPY 1
22394 EOF
22395
22396         else
22397
22398 cat >>confdefs.h <<\EOF
22399 #define USE_MY_MEMMOVE 1
22400 EOF
22401
22402         fi
22403
22404 fi
22405
22406 tty >/dev/null 2>&1 || {
22407 for ac_func in posix_openpt
22408 do
22409 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22410 echo "$as_me:22410: checking for $ac_func" >&5
22411 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22412 if eval "test \"\${$as_ac_var+set}\" = set"; then
22413   echo $ECHO_N "(cached) $ECHO_C" >&6
22414 else
22415   cat >"conftest.$ac_ext" <<_ACEOF
22416 #line 22416 "configure"
22417 #include "confdefs.h"
22418 #define $ac_func autoconf_temporary
22419 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22420 #undef $ac_func
22421
22422 #ifdef __cplusplus
22423 extern "C"
22424 #endif
22425
22426 /* We use char because int might match the return type of a gcc2
22427    builtin and then its argument prototype would still apply.  */
22428 char $ac_func (void);
22429
22430 int
22431 main (void)
22432 {
22433
22434 /* The GNU C library defines stubs for functions which it implements
22435     to always fail with ENOSYS.  Some functions are actually named
22436     something starting with __ and the normal name is an alias.  */
22437 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22438 #error found stub for $ac_func
22439 #endif
22440
22441         return $ac_func ();
22442   ;
22443   return 0;
22444 }
22445 _ACEOF
22446 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22447 if { (eval echo "$as_me:22447: \"$ac_link\"") >&5
22448   (eval $ac_link) 2>&5
22449   ac_status=$?
22450   echo "$as_me:22450: \$? = $ac_status" >&5
22451   (exit "$ac_status"); } &&
22452          { ac_try='test -s "conftest$ac_exeext"'
22453   { (eval echo "$as_me:22453: \"$ac_try\"") >&5
22454   (eval $ac_try) 2>&5
22455   ac_status=$?
22456   echo "$as_me:22456: \$? = $ac_status" >&5
22457   (exit "$ac_status"); }; }; then
22458   eval "$as_ac_var=yes"
22459 else
22460   echo "$as_me: failed program was:" >&5
22461 cat "conftest.$ac_ext" >&5
22462 eval "$as_ac_var=no"
22463 fi
22464 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22465 fi
22466 echo "$as_me:22466: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22467 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22468 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22469   cat >>confdefs.h <<EOF
22470 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22471 EOF
22472
22473 fi
22474 done
22475  }
22476 echo "$as_me:22476: checking if poll really works" >&5
22477 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22478 if test "${cf_cv_working_poll+set}" = set; then
22479   echo $ECHO_N "(cached) $ECHO_C" >&6
22480 else
22481
22482 if test "$cross_compiling" = yes; then
22483   cf_cv_working_poll=unknown
22484 else
22485   cat >"conftest.$ac_ext" <<_ACEOF
22486 #line 22486 "configure"
22487 #include "confdefs.h"
22488
22489 #include <stdlib.h>
22490 #include <stdio.h>
22491 #include <unistd.h>
22492 #include <fcntl.h>
22493 #ifdef HAVE_POLL_H
22494 #include <poll.h>
22495 #else
22496 #include <sys/poll.h>
22497 #endif
22498 int main(void) {
22499         struct pollfd myfds;
22500         int ret;
22501
22502         /* check for Darwin bug with respect to "devices" */
22503         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22504         if (myfds.fd < 0)
22505                 myfds.fd = 0;
22506         myfds.events = POLLIN;
22507         myfds.revents = 0;
22508
22509         ret = poll(&myfds, 1, 100);
22510
22511         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22512                 ret = -1;
22513         } else {
22514                 int fd = 0;
22515                 if (!isatty(fd)) {
22516                         fd = open("/dev/tty", 2);       /* O_RDWR */
22517                 }
22518 #ifdef HAVE_POSIX_OPENPT
22519                 if (fd < 0) {
22520                         fd = posix_openpt(O_RDWR);
22521                 }
22522 #endif
22523
22524                 if (fd >= 0) {
22525                         /* also check with standard input */
22526                         myfds.fd = fd;
22527                         myfds.events = POLLIN;
22528                         myfds.revents = 0;
22529                         ret = poll(&myfds, 1, 100);
22530                 } else {
22531                         ret = -1;
22532                 }
22533         }
22534         ${cf_cv_main_return:-return}(ret < 0);
22535 }
22536 _ACEOF
22537 rm -f "conftest$ac_exeext"
22538 if { (eval echo "$as_me:22538: \"$ac_link\"") >&5
22539   (eval $ac_link) 2>&5
22540   ac_status=$?
22541   echo "$as_me:22541: \$? = $ac_status" >&5
22542   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22543   { (eval echo "$as_me:22543: \"$ac_try\"") >&5
22544   (eval $ac_try) 2>&5
22545   ac_status=$?
22546   echo "$as_me:22546: \$? = $ac_status" >&5
22547   (exit "$ac_status"); }; }; then
22548   cf_cv_working_poll=yes
22549 else
22550   echo "$as_me: program exited with status $ac_status" >&5
22551 echo "$as_me: failed program was:" >&5
22552 cat "conftest.$ac_ext" >&5
22553 cf_cv_working_poll=no
22554 fi
22555 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22556 fi
22557 fi
22558 echo "$as_me:22558: result: $cf_cv_working_poll" >&5
22559 echo "${ECHO_T}$cf_cv_working_poll" >&6
22560 test "$cf_cv_working_poll" = "yes" &&
22561 cat >>confdefs.h <<\EOF
22562 #define HAVE_WORKING_POLL 1
22563 EOF
22564
22565 echo "$as_me:22565: checking for va_copy" >&5
22566 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22567 if test "${cf_cv_have_va_copy+set}" = set; then
22568   echo $ECHO_N "(cached) $ECHO_C" >&6
22569 else
22570
22571 cat >"conftest.$ac_ext" <<_ACEOF
22572 #line 22572 "configure"
22573 #include "confdefs.h"
22574
22575 #include <stdarg.h>
22576
22577 int
22578 main (void)
22579 {
22580
22581         static va_list dst;
22582         static va_list src;
22583         va_copy(dst, src)
22584   ;
22585   return 0;
22586 }
22587 _ACEOF
22588 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22589 if { (eval echo "$as_me:22589: \"$ac_link\"") >&5
22590   (eval $ac_link) 2>&5
22591   ac_status=$?
22592   echo "$as_me:22592: \$? = $ac_status" >&5
22593   (exit "$ac_status"); } &&
22594          { ac_try='test -s "conftest$ac_exeext"'
22595   { (eval echo "$as_me:22595: \"$ac_try\"") >&5
22596   (eval $ac_try) 2>&5
22597   ac_status=$?
22598   echo "$as_me:22598: \$? = $ac_status" >&5
22599   (exit "$ac_status"); }; }; then
22600   cf_cv_have_va_copy=yes
22601 else
22602   echo "$as_me: failed program was:" >&5
22603 cat "conftest.$ac_ext" >&5
22604 cf_cv_have_va_copy=no
22605 fi
22606 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22607 fi
22608 echo "$as_me:22608: result: $cf_cv_have_va_copy" >&5
22609 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22610
22611 if test "$cf_cv_have_va_copy" = yes;
22612 then
22613
22614 cat >>confdefs.h <<\EOF
22615 #define HAVE_VA_COPY 1
22616 EOF
22617
22618 else # !cf_cv_have_va_copy
22619
22620 echo "$as_me:22620: checking for __va_copy" >&5
22621 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22622 if test "${cf_cv_have___va_copy+set}" = set; then
22623   echo $ECHO_N "(cached) $ECHO_C" >&6
22624 else
22625
22626 cat >"conftest.$ac_ext" <<_ACEOF
22627 #line 22627 "configure"
22628 #include "confdefs.h"
22629
22630 #include <stdarg.h>
22631
22632 int
22633 main (void)
22634 {
22635
22636         static va_list dst;
22637         static va_list src;
22638         __va_copy(dst, src)
22639   ;
22640   return 0;
22641 }
22642 _ACEOF
22643 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22644 if { (eval echo "$as_me:22644: \"$ac_link\"") >&5
22645   (eval $ac_link) 2>&5
22646   ac_status=$?
22647   echo "$as_me:22647: \$? = $ac_status" >&5
22648   (exit "$ac_status"); } &&
22649          { ac_try='test -s "conftest$ac_exeext"'
22650   { (eval echo "$as_me:22650: \"$ac_try\"") >&5
22651   (eval $ac_try) 2>&5
22652   ac_status=$?
22653   echo "$as_me:22653: \$? = $ac_status" >&5
22654   (exit "$ac_status"); }; }; then
22655   cf_cv_have___va_copy=yes
22656 else
22657   echo "$as_me: failed program was:" >&5
22658 cat "conftest.$ac_ext" >&5
22659 cf_cv_have___va_copy=no
22660 fi
22661 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22662 fi
22663 echo "$as_me:22663: result: $cf_cv_have___va_copy" >&5
22664 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22665
22666 if test "$cf_cv_have___va_copy" = yes
22667 then
22668
22669 cat >>confdefs.h <<\EOF
22670 #define HAVE___VA_COPY 1
22671 EOF
22672
22673 else # !cf_cv_have___va_copy
22674
22675 echo "$as_me:22675: checking for __builtin_va_copy" >&5
22676 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22677 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22678   echo $ECHO_N "(cached) $ECHO_C" >&6
22679 else
22680
22681 cat >"conftest.$ac_ext" <<_ACEOF
22682 #line 22682 "configure"
22683 #include "confdefs.h"
22684
22685 #include <stdarg.h>
22686
22687 int
22688 main (void)
22689 {
22690
22691         static va_list dst;
22692         static va_list src;
22693         __builtin_va_copy(dst, src)
22694   ;
22695   return 0;
22696 }
22697 _ACEOF
22698 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22699 if { (eval echo "$as_me:22699: \"$ac_link\"") >&5
22700   (eval $ac_link) 2>&5
22701   ac_status=$?
22702   echo "$as_me:22702: \$? = $ac_status" >&5
22703   (exit "$ac_status"); } &&
22704          { ac_try='test -s "conftest$ac_exeext"'
22705   { (eval echo "$as_me:22705: \"$ac_try\"") >&5
22706   (eval $ac_try) 2>&5
22707   ac_status=$?
22708   echo "$as_me:22708: \$? = $ac_status" >&5
22709   (exit "$ac_status"); }; }; then
22710   cf_cv_have___builtin_va_copy=yes
22711 else
22712   echo "$as_me: failed program was:" >&5
22713 cat "conftest.$ac_ext" >&5
22714 cf_cv_have___builtin_va_copy=no
22715 fi
22716 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22717 fi
22718 echo "$as_me:22718: result: $cf_cv_have___builtin_va_copy" >&5
22719 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22720
22721 test "$cf_cv_have___builtin_va_copy" = yes &&
22722
22723 cat >>confdefs.h <<\EOF
22724 #define HAVE___BUILTIN_VA_COPY 1
22725 EOF
22726
22727 fi # cf_cv_have___va_copy
22728
22729 fi # cf_cv_have_va_copy
22730
22731 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22732 (*yes*)
22733         ;;
22734
22735 (*)
22736         echo "$as_me:22736: checking if we can simply copy va_list" >&5
22737 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22738 if test "${cf_cv_pointer_va_list+set}" = set; then
22739   echo $ECHO_N "(cached) $ECHO_C" >&6
22740 else
22741
22742 cat >"conftest.$ac_ext" <<_ACEOF
22743 #line 22743 "configure"
22744 #include "confdefs.h"
22745
22746 #include <stdarg.h>
22747
22748 int
22749 main (void)
22750 {
22751
22752         va_list dst;
22753         va_list src;
22754         dst = src
22755   ;
22756   return 0;
22757 }
22758 _ACEOF
22759 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22760 if { (eval echo "$as_me:22760: \"$ac_link\"") >&5
22761   (eval $ac_link) 2>&5
22762   ac_status=$?
22763   echo "$as_me:22763: \$? = $ac_status" >&5
22764   (exit "$ac_status"); } &&
22765          { ac_try='test -s "conftest$ac_exeext"'
22766   { (eval echo "$as_me:22766: \"$ac_try\"") >&5
22767   (eval $ac_try) 2>&5
22768   ac_status=$?
22769   echo "$as_me:22769: \$? = $ac_status" >&5
22770   (exit "$ac_status"); }; }; then
22771   cf_cv_pointer_va_list=yes
22772 else
22773   echo "$as_me: failed program was:" >&5
22774 cat "conftest.$ac_ext" >&5
22775 cf_cv_pointer_va_list=no
22776 fi
22777 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22778 fi
22779 echo "$as_me:22779: result: $cf_cv_pointer_va_list" >&5
22780 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22781
22782         if test "$cf_cv_pointer_va_list" = no
22783         then
22784                 echo "$as_me:22784: checking if we can copy va_list indirectly" >&5
22785 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22786 if test "${cf_cv_array_va_list+set}" = set; then
22787   echo $ECHO_N "(cached) $ECHO_C" >&6
22788 else
22789
22790 cat >"conftest.$ac_ext" <<_ACEOF
22791 #line 22791 "configure"
22792 #include "confdefs.h"
22793
22794 #include <stdarg.h>
22795
22796 int
22797 main (void)
22798 {
22799
22800         va_list dst;
22801         va_list src;
22802         *dst = *src
22803   ;
22804   return 0;
22805 }
22806 _ACEOF
22807 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22808 if { (eval echo "$as_me:22808: \"$ac_link\"") >&5
22809   (eval $ac_link) 2>&5
22810   ac_status=$?
22811   echo "$as_me:22811: \$? = $ac_status" >&5
22812   (exit "$ac_status"); } &&
22813          { ac_try='test -s "conftest$ac_exeext"'
22814   { (eval echo "$as_me:22814: \"$ac_try\"") >&5
22815   (eval $ac_try) 2>&5
22816   ac_status=$?
22817   echo "$as_me:22817: \$? = $ac_status" >&5
22818   (exit "$ac_status"); }; }; then
22819   cf_cv_array_va_list=yes
22820 else
22821   echo "$as_me: failed program was:" >&5
22822 cat "conftest.$ac_ext" >&5
22823 cf_cv_array_va_list=no
22824 fi
22825 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22826 fi
22827 echo "$as_me:22827: result: $cf_cv_array_va_list" >&5
22828 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22829                 test "$cf_cv_array_va_list" = yes &&
22830 cat >>confdefs.h <<\EOF
22831 #define ARRAY_VA_LIST 1
22832 EOF
22833
22834         fi
22835         ;;
22836 esac
22837
22838 echo "$as_me:22838: checking for pid_t" >&5
22839 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22840 if test "${ac_cv_type_pid_t+set}" = set; then
22841   echo $ECHO_N "(cached) $ECHO_C" >&6
22842 else
22843   cat >"conftest.$ac_ext" <<_ACEOF
22844 #line 22844 "configure"
22845 #include "confdefs.h"
22846 $ac_includes_default
22847 int
22848 main (void)
22849 {
22850 if ((pid_t *) 0)
22851   return 0;
22852 if (sizeof (pid_t))
22853   return 0;
22854   ;
22855   return 0;
22856 }
22857 _ACEOF
22858 rm -f "conftest.$ac_objext"
22859 if { (eval echo "$as_me:22859: \"$ac_compile\"") >&5
22860   (eval $ac_compile) 2>&5
22861   ac_status=$?
22862   echo "$as_me:22862: \$? = $ac_status" >&5
22863   (exit "$ac_status"); } &&
22864          { ac_try='test -s "conftest.$ac_objext"'
22865   { (eval echo "$as_me:22865: \"$ac_try\"") >&5
22866   (eval $ac_try) 2>&5
22867   ac_status=$?
22868   echo "$as_me:22868: \$? = $ac_status" >&5
22869   (exit "$ac_status"); }; }; then
22870   ac_cv_type_pid_t=yes
22871 else
22872   echo "$as_me: failed program was:" >&5
22873 cat "conftest.$ac_ext" >&5
22874 ac_cv_type_pid_t=no
22875 fi
22876 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22877 fi
22878 echo "$as_me:22878: result: $ac_cv_type_pid_t" >&5
22879 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22880 if test "$ac_cv_type_pid_t" = yes; then
22881   :
22882 else
22883
22884 cat >>confdefs.h <<EOF
22885 #define pid_t int
22886 EOF
22887
22888 fi
22889
22890 for ac_header in unistd.h vfork.h
22891 do
22892 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22893 echo "$as_me:22893: checking for $ac_header" >&5
22894 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22895 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22896   echo $ECHO_N "(cached) $ECHO_C" >&6
22897 else
22898   cat >"conftest.$ac_ext" <<_ACEOF
22899 #line 22899 "configure"
22900 #include "confdefs.h"
22901 #include <$ac_header>
22902 _ACEOF
22903 if { (eval echo "$as_me:22903: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22904   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22905   ac_status=$?
22906   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22907   rm -f conftest.er1
22908   cat conftest.err >&5
22909   echo "$as_me:22909: \$? = $ac_status" >&5
22910   (exit "$ac_status"); } >/dev/null; then
22911   if test -s conftest.err; then
22912     ac_cpp_err=$ac_c_preproc_warn_flag
22913   else
22914     ac_cpp_err=
22915   fi
22916 else
22917   ac_cpp_err=yes
22918 fi
22919 if test -z "$ac_cpp_err"; then
22920   eval "$as_ac_Header=yes"
22921 else
22922   echo "$as_me: failed program was:" >&5
22923   cat "conftest.$ac_ext" >&5
22924   eval "$as_ac_Header=no"
22925 fi
22926 rm -f conftest.err "conftest.$ac_ext"
22927 fi
22928 echo "$as_me:22928: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22929 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22930 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22931   cat >>confdefs.h <<EOF
22932 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22933 EOF
22934
22935 fi
22936 done
22937
22938 for ac_func in fork vfork
22939 do
22940 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22941 echo "$as_me:22941: checking for $ac_func" >&5
22942 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22943 if eval "test \"\${$as_ac_var+set}\" = set"; then
22944   echo $ECHO_N "(cached) $ECHO_C" >&6
22945 else
22946   cat >"conftest.$ac_ext" <<_ACEOF
22947 #line 22947 "configure"
22948 #include "confdefs.h"
22949 #define $ac_func autoconf_temporary
22950 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22951 #undef $ac_func
22952
22953 #ifdef __cplusplus
22954 extern "C"
22955 #endif
22956
22957 /* We use char because int might match the return type of a gcc2
22958    builtin and then its argument prototype would still apply.  */
22959 char $ac_func (void);
22960
22961 int
22962 main (void)
22963 {
22964
22965 /* The GNU C library defines stubs for functions which it implements
22966     to always fail with ENOSYS.  Some functions are actually named
22967     something starting with __ and the normal name is an alias.  */
22968 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22969 #error found stub for $ac_func
22970 #endif
22971
22972         return $ac_func ();
22973   ;
22974   return 0;
22975 }
22976 _ACEOF
22977 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22978 if { (eval echo "$as_me:22978: \"$ac_link\"") >&5
22979   (eval $ac_link) 2>&5
22980   ac_status=$?
22981   echo "$as_me:22981: \$? = $ac_status" >&5
22982   (exit "$ac_status"); } &&
22983          { ac_try='test -s "conftest$ac_exeext"'
22984   { (eval echo "$as_me:22984: \"$ac_try\"") >&5
22985   (eval $ac_try) 2>&5
22986   ac_status=$?
22987   echo "$as_me:22987: \$? = $ac_status" >&5
22988   (exit "$ac_status"); }; }; then
22989   eval "$as_ac_var=yes"
22990 else
22991   echo "$as_me: failed program was:" >&5
22992 cat "conftest.$ac_ext" >&5
22993 eval "$as_ac_var=no"
22994 fi
22995 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22996 fi
22997 echo "$as_me:22997: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22998 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22999 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23000   cat >>confdefs.h <<EOF
23001 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23002 EOF
23003
23004 fi
23005 done
23006
23007 ac_cv_func_fork_works=$ac_cv_func_fork
23008 if test "x$ac_cv_func_fork" = xyes; then
23009   echo "$as_me:23009: checking for working fork" >&5
23010 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23011 if test "${ac_cv_func_fork_works+set}" = set; then
23012   echo $ECHO_N "(cached) $ECHO_C" >&6
23013 else
23014   if test "$cross_compiling" = yes; then
23015   ac_cv_func_fork_works=cross
23016 else
23017   cat >"conftest.$ac_ext" <<_ACEOF
23018 /* By Rüdiger Kuhlmann. */
23019       #include <sys/types.h>
23020       #if HAVE_UNISTD_H
23021       # include <unistd.h>
23022       #endif
23023       /* Some systems only have a dummy stub for fork() */
23024       int main (void)
23025       {
23026         if (fork() < 0)
23027           $ac_main_return (1);
23028         $ac_main_return (0);
23029       }
23030 _ACEOF
23031 rm -f "conftest$ac_exeext"
23032 if { (eval echo "$as_me:23032: \"$ac_link\"") >&5
23033   (eval $ac_link) 2>&5
23034   ac_status=$?
23035   echo "$as_me:23035: \$? = $ac_status" >&5
23036   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23037   { (eval echo "$as_me:23037: \"$ac_try\"") >&5
23038   (eval $ac_try) 2>&5
23039   ac_status=$?
23040   echo "$as_me:23040: \$? = $ac_status" >&5
23041   (exit "$ac_status"); }; }; then
23042   ac_cv_func_fork_works=yes
23043 else
23044   echo "$as_me: program exited with status $ac_status" >&5
23045 echo "$as_me: failed program was:" >&5
23046 cat "conftest.$ac_ext" >&5
23047 ac_cv_func_fork_works=no
23048 fi
23049 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23050 fi
23051 fi
23052 echo "$as_me:23052: result: $ac_cv_func_fork_works" >&5
23053 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23054
23055 fi
23056 if test "x$ac_cv_func_fork_works" = xcross; then
23057   case $host in
23058     *-*-amigaos* | *-*-msdosdjgpp*)
23059       # Override, as these systems have only a dummy fork() stub
23060       ac_cv_func_fork_works=no
23061       ;;
23062     *)
23063       ac_cv_func_fork_works=yes
23064       ;;
23065   esac
23066   { echo "$as_me:23066: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23067 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23068 fi
23069 ac_cv_func_vfork_works=$ac_cv_func_vfork
23070 if test "x$ac_cv_func_vfork" = xyes; then
23071   echo "$as_me:23071: checking for working vfork" >&5
23072 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23073 if test "${ac_cv_func_vfork_works+set}" = set; then
23074   echo $ECHO_N "(cached) $ECHO_C" >&6
23075 else
23076   if test "$cross_compiling" = yes; then
23077   ac_cv_func_vfork_works=cross
23078 else
23079   cat >"conftest.$ac_ext" <<_ACEOF
23080 #line 23080 "configure"
23081 #include "confdefs.h"
23082 /* Thanks to Paul Eggert for this test.  */
23083 #include <stdio.h>
23084 #include <sys/types.h>
23085 #include <sys/stat.h>
23086 #if HAVE_UNISTD_H
23087 # include <unistd.h>
23088 #endif
23089 #if HAVE_VFORK_H
23090 # include <vfork.h>
23091 #endif
23092 /* On some sparc systems, changes by the child to local and incoming
23093    argument registers are propagated back to the parent.  The compiler
23094    is told about this with #include <vfork.h>, but some compilers
23095    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23096    static variable whose address is put into a register that is
23097    clobbered by the vfork.  */
23098 static
23099 #ifdef __cplusplus
23100 sparc_address_test (int arg)
23101 # else
23102 sparc_address_test (arg) int arg;
23103 #endif
23104 {
23105   static pid_t child;
23106   if (!child) {
23107     child = vfork ();
23108     if (child < 0) {
23109       perror ("vfork");
23110       _exit(2);
23111     }
23112     if (!child) {
23113       arg = getpid();
23114       write(-1, "", 0);
23115       _exit (arg);
23116     }
23117   }
23118 }
23119
23120 int
23121 main (void)
23122 {
23123   pid_t parent = getpid ();
23124   pid_t child;
23125
23126   sparc_address_test ();
23127
23128   child = vfork ();
23129
23130   if (child == 0) {
23131     /* Here is another test for sparc vfork register problems.  This
23132        test uses lots of local variables, at least as many local
23133        variables as main has allocated so far including compiler
23134        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23135        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23136        reuse the register of parent for one of the local variables,
23137        since it will think that parent can't possibly be used any more
23138        in this routine.  Assigning to the local variable will thus
23139        munge parent in the parent process.  */
23140     pid_t
23141       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23142       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23143     /* Convince the compiler that p..p7 are live; otherwise, it might
23144        use the same hardware register for all 8 local variables.  */
23145     if (p != p1 || p != p2 || p != p3 || p != p4
23146         || p != p5 || p != p6 || p != p7)
23147       _exit(1);
23148
23149     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23150        from child file descriptors.  If the child closes a descriptor
23151        before it execs or exits, this munges the parent's descriptor
23152        as well.  Test for this by closing stdout in the child.  */
23153     _exit(close(fileno(stdout)) != 0);
23154   } else {
23155     int status;
23156     struct stat st;
23157
23158     while (wait(&status) != child)
23159       ;
23160     $ac_main_return(
23161          /* Was there some problem with vforking?  */
23162          child < 0
23163
23164          /* Did the child fail?  (This shouldn't happen.)  */
23165          || status
23166
23167          /* Did the vfork/compiler bug occur?  */
23168          || parent != getpid()
23169
23170          /* Did the file descriptor bug occur?  */
23171          || fstat(fileno(stdout), &st) != 0
23172          );
23173   }
23174 }
23175 _ACEOF
23176 rm -f "conftest$ac_exeext"
23177 if { (eval echo "$as_me:23177: \"$ac_link\"") >&5
23178   (eval $ac_link) 2>&5
23179   ac_status=$?
23180   echo "$as_me:23180: \$? = $ac_status" >&5
23181   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23182   { (eval echo "$as_me:23182: \"$ac_try\"") >&5
23183   (eval $ac_try) 2>&5
23184   ac_status=$?
23185   echo "$as_me:23185: \$? = $ac_status" >&5
23186   (exit "$ac_status"); }; }; then
23187   ac_cv_func_vfork_works=yes
23188 else
23189   echo "$as_me: program exited with status $ac_status" >&5
23190 echo "$as_me: failed program was:" >&5
23191 cat "conftest.$ac_ext" >&5
23192 ac_cv_func_vfork_works=no
23193 fi
23194 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23195 fi
23196 fi
23197 echo "$as_me:23197: result: $ac_cv_func_vfork_works" >&5
23198 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23199
23200 fi;
23201 if test "x$ac_cv_func_fork_works" = xcross; then
23202   ac_cv_func_vfork_works=ac_cv_func_vfork
23203   { echo "$as_me:23203: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23204 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23205 fi
23206
23207 if test "x$ac_cv_func_vfork_works" = xyes; then
23208
23209 cat >>confdefs.h <<\EOF
23210 #define HAVE_WORKING_VFORK 1
23211 EOF
23212
23213 else
23214
23215 cat >>confdefs.h <<\EOF
23216 #define vfork fork
23217 EOF
23218
23219 fi
23220 if test "x$ac_cv_func_fork_works" = xyes; then
23221
23222 cat >>confdefs.h <<\EOF
23223 #define HAVE_WORKING_FORK 1
23224 EOF
23225
23226 fi
23227
23228 echo "$as_me:23228: checking if fopen accepts explicit binary mode" >&5
23229 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23230 if test "${cf_cv_fopen_bin_r+set}" = set; then
23231   echo $ECHO_N "(cached) $ECHO_C" >&6
23232 else
23233
23234         if test "$cross_compiling" = yes; then
23235   cf_cv_fopen_bin_r=unknown
23236 else
23237   cat >"conftest.$ac_ext" <<_ACEOF
23238 #line 23238 "configure"
23239 #include "confdefs.h"
23240
23241 #include <stdio.h>
23242 int main(void) {
23243         FILE *fp = fopen("conftest.tmp", "wb");
23244         int rc = 0;
23245         if (fp != 0) {
23246                 int p, q;
23247                 for (p = 0; p < 256; ++p) {
23248                         fputc(p, fp);
23249                 }
23250                 fclose(fp);
23251                 fp = fopen("conftest.tmp", "rb");
23252                 if (fp != 0) {
23253                         for (p = 0; p < 256; ++p) {
23254                                 q = fgetc(fp);
23255                                 if (q != p) {
23256                                         rc = 1;
23257                                         break;
23258                                 }
23259                         }
23260                 } else {
23261                         rc = 1;
23262                 }
23263         } else {
23264                 rc = 1;
23265         }
23266         ${cf_cv_main_return:-return} (rc);
23267 }
23268
23269 _ACEOF
23270 rm -f "conftest$ac_exeext"
23271 if { (eval echo "$as_me:23271: \"$ac_link\"") >&5
23272   (eval $ac_link) 2>&5
23273   ac_status=$?
23274   echo "$as_me:23274: \$? = $ac_status" >&5
23275   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23276   { (eval echo "$as_me:23276: \"$ac_try\"") >&5
23277   (eval $ac_try) 2>&5
23278   ac_status=$?
23279   echo "$as_me:23279: \$? = $ac_status" >&5
23280   (exit "$ac_status"); }; }; then
23281   cf_cv_fopen_bin_r=yes
23282 else
23283   echo "$as_me: program exited with status $ac_status" >&5
23284 echo "$as_me: failed program was:" >&5
23285 cat "conftest.$ac_ext" >&5
23286 cf_cv_fopen_bin_r=no
23287 fi
23288 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23289 fi
23290
23291 fi
23292 echo "$as_me:23292: result: $cf_cv_fopen_bin_r" >&5
23293 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23294 test "x$cf_cv_fopen_bin_r" != xno &&
23295 cat >>confdefs.h <<\EOF
23296 #define USE_FOPEN_BIN_R 1
23297 EOF
23298
23299 # special check for test/ditto.c
23300
23301 echo "$as_me:23301: checking for openpty in -lutil" >&5
23302 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23303 if test "${ac_cv_lib_util_openpty+set}" = set; then
23304   echo $ECHO_N "(cached) $ECHO_C" >&6
23305 else
23306   ac_check_lib_save_LIBS=$LIBS
23307 LIBS="-lutil  $LIBS"
23308 cat >"conftest.$ac_ext" <<_ACEOF
23309 #line 23309 "configure"
23310 #include "confdefs.h"
23311
23312 /* Override any gcc2 internal prototype to avoid an error.  */
23313 #ifdef __cplusplus
23314 extern "C"
23315 #endif
23316 /* We use char because int might match the return type of a gcc2
23317    builtin and then its argument prototype would still apply.  */
23318 char openpty ();
23319 int
23320 main (void)
23321 {
23322 openpty ();
23323   ;
23324   return 0;
23325 }
23326 _ACEOF
23327 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23328 if { (eval echo "$as_me:23328: \"$ac_link\"") >&5
23329   (eval $ac_link) 2>&5
23330   ac_status=$?
23331   echo "$as_me:23331: \$? = $ac_status" >&5
23332   (exit "$ac_status"); } &&
23333          { ac_try='test -s "conftest$ac_exeext"'
23334   { (eval echo "$as_me:23334: \"$ac_try\"") >&5
23335   (eval $ac_try) 2>&5
23336   ac_status=$?
23337   echo "$as_me:23337: \$? = $ac_status" >&5
23338   (exit "$ac_status"); }; }; then
23339   ac_cv_lib_util_openpty=yes
23340 else
23341   echo "$as_me: failed program was:" >&5
23342 cat "conftest.$ac_ext" >&5
23343 ac_cv_lib_util_openpty=no
23344 fi
23345 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23346 LIBS=$ac_check_lib_save_LIBS
23347 fi
23348 echo "$as_me:23348: result: $ac_cv_lib_util_openpty" >&5
23349 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23350 if test "$ac_cv_lib_util_openpty" = yes; then
23351   cf_cv_lib_util=yes
23352 else
23353   cf_cv_lib_util=no
23354 fi
23355
23356 echo "$as_me:23356: checking for openpty header" >&5
23357 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23358 if test "${cf_cv_func_openpty+set}" = set; then
23359   echo $ECHO_N "(cached) $ECHO_C" >&6
23360 else
23361
23362         cf_save_LIBS="$LIBS"
23363         test "$cf_cv_lib_util" = yes && {
23364 cf_add_libs="$LIBS"
23365 # reverse order
23366 cf_add_0lib=
23367 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23368 # filter duplicates
23369 for cf_add_1lib in $cf_add_0lib; do
23370         for cf_add_2lib in $cf_add_libs; do
23371                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23372                         cf_add_1lib=
23373                         break
23374                 fi
23375         done
23376         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23377 done
23378 LIBS="$cf_add_libs"
23379  }
23380         for cf_header in pty.h libutil.h util.h
23381         do
23382         cat >"conftest.$ac_ext" <<_ACEOF
23383 #line 23383 "configure"
23384 #include "confdefs.h"
23385
23386 #include <$cf_header>
23387
23388 int
23389 main (void)
23390 {
23391
23392         int x = openpty((int *)0, (int *)0, (char *)0,
23393                                    (struct termios *)0, (struct winsize *)0);
23394
23395   ;
23396   return 0;
23397 }
23398 _ACEOF
23399 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23400 if { (eval echo "$as_me:23400: \"$ac_link\"") >&5
23401   (eval $ac_link) 2>&5
23402   ac_status=$?
23403   echo "$as_me:23403: \$? = $ac_status" >&5
23404   (exit "$ac_status"); } &&
23405          { ac_try='test -s "conftest$ac_exeext"'
23406   { (eval echo "$as_me:23406: \"$ac_try\"") >&5
23407   (eval $ac_try) 2>&5
23408   ac_status=$?
23409   echo "$as_me:23409: \$? = $ac_status" >&5
23410   (exit "$ac_status"); }; }; then
23411
23412                 cf_cv_func_openpty=$cf_header
23413                 break
23414
23415 else
23416   echo "$as_me: failed program was:" >&5
23417 cat "conftest.$ac_ext" >&5
23418
23419                 cf_cv_func_openpty=no
23420
23421 fi
23422 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23423         done
23424         LIBS="$cf_save_LIBS"
23425
23426 fi
23427 echo "$as_me:23427: result: $cf_cv_func_openpty" >&5
23428 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23429
23430 if test "$cf_cv_func_openpty" != no ; then
23431
23432 cat >>confdefs.h <<EOF
23433 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23434 EOF
23435
23436 cat >>confdefs.h <<\EOF
23437 #define USE_XTERM_PTY 1
23438 EOF
23439
23440         if test "x$cf_cv_lib_util" = xyes ; then
23441
23442 cf_add_libs="$TEST_LIBS"
23443 # reverse order
23444 cf_add_0lib=
23445 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23446 # filter duplicates
23447 for cf_add_1lib in $cf_add_0lib; do
23448         for cf_add_2lib in $cf_add_libs; do
23449                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23450                         cf_add_1lib=
23451                         break
23452                 fi
23453         done
23454         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23455 done
23456 TEST_LIBS="$cf_add_libs"
23457
23458         fi
23459 fi
23460
23461 if test "$with_hashed_db" != no ; then
23462
23463 cat >>confdefs.h <<\EOF
23464 #define USE_HASHED_DB 1
23465 EOF
23466
23467 case $with_hashed_db in
23468 (yes|*able*)
23469         ;;
23470 (*)
23471         if test -d "$with_hashed_db" ; then
23472
23473 if test -n "$with_hashed_db/include" ; then
23474   for cf_add_incdir in $with_hashed_db/include
23475   do
23476         while test "$cf_add_incdir" != /usr/include
23477         do
23478           if test -d "$cf_add_incdir"
23479           then
23480                 cf_have_incdir=no
23481                 if test -n "$CFLAGS$CPPFLAGS" ; then
23482                   # a loop is needed to ensure we can add subdirs of existing dirs
23483                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23484                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23485                           cf_have_incdir=yes; break
23486                         fi
23487                   done
23488                 fi
23489
23490                 if test "$cf_have_incdir" = no ; then
23491                   if test "$cf_add_incdir" = /usr/local/include ; then
23492                         if test "$GCC" = yes
23493                         then
23494                           cf_save_CPPFLAGS=$CPPFLAGS
23495
23496         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23497         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23498
23499                           cat >"conftest.$ac_ext" <<_ACEOF
23500 #line 23500 "configure"
23501 #include "confdefs.h"
23502 #include <stdio.h>
23503 int
23504 main (void)
23505 {
23506 printf("Hello")
23507   ;
23508   return 0;
23509 }
23510 _ACEOF
23511 rm -f "conftest.$ac_objext"
23512 if { (eval echo "$as_me:23512: \"$ac_compile\"") >&5
23513   (eval $ac_compile) 2>&5
23514   ac_status=$?
23515   echo "$as_me:23515: \$? = $ac_status" >&5
23516   (exit "$ac_status"); } &&
23517          { ac_try='test -s "conftest.$ac_objext"'
23518   { (eval echo "$as_me:23518: \"$ac_try\"") >&5
23519   (eval $ac_try) 2>&5
23520   ac_status=$?
23521   echo "$as_me:23521: \$? = $ac_status" >&5
23522   (exit "$ac_status"); }; }; then
23523   :
23524 else
23525   echo "$as_me: failed program was:" >&5
23526 cat "conftest.$ac_ext" >&5
23527 cf_have_incdir=yes
23528 fi
23529 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23530                           CPPFLAGS=$cf_save_CPPFLAGS
23531                         fi
23532                   fi
23533                 fi
23534
23535                 if test "$cf_have_incdir" = no ; then
23536                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23537
23538 echo "${as_me:-configure}:23538: testing adding $cf_add_incdir to include-path ..." 1>&5
23539
23540                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23541
23542                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23543                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23544                   cf_add_incdir="$cf_top_incdir"
23545                 else
23546                   break
23547                 fi
23548           else
23549                 break
23550           fi
23551         done
23552   done
23553 fi
23554
23555 if test -n "$with_hashed_db/lib" ; then
23556         for cf_add_libdir in $with_hashed_db/lib
23557         do
23558                 if test "$cf_add_libdir" = /usr/lib ; then
23559                         :
23560                 elif test -d "$cf_add_libdir"
23561                 then
23562                         cf_have_libdir=no
23563                         if test -n "$LDFLAGS$LIBS" ; then
23564                                 # a loop is needed to ensure we can add subdirs of existing dirs
23565                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23566                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23567                                                 cf_have_libdir=yes; break
23568                                         fi
23569                                 done
23570                         fi
23571                         if test "$cf_have_libdir" = no ; then
23572                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23573
23574 echo "${as_me:-configure}:23574: testing adding $cf_add_libdir to library-path ..." 1>&5
23575
23576                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23577                         fi
23578                 fi
23579         done
23580 fi
23581
23582         else
23583                 case "$with_hashed_db" in
23584                 (./*|../*|/*)
23585                         { echo "$as_me:23585: WARNING: no such directory $with_hashed_db" >&5
23586 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23587                         ;;
23588                 (*)
23589
23590 cf_search=
23591
23592 test "x$prefix" != "xNONE" && \
23593 test -d "$prefix" && \
23594  {
23595         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23596         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23597         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23598         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23599         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23600         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23601 }
23602
23603 for cf_subdir_prefix in \
23604         /usr \
23605         /usr/local \
23606         /usr/pkg \
23607         /opt \
23608         /opt/local \
23609         $HOME
23610 do
23611
23612 test "x$cf_subdir_prefix" != "x$prefix" && \
23613 test -d "$cf_subdir_prefix" && \
23614 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23615         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23616         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
23617         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23618         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23619         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23620         test -d "$cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db"
23621 }
23622
23623 done
23624
23625         for cf_item in $cf_search
23626         do
23627                 case "$cf_item" in
23628                 (*/$with_hashed_db)
23629
23630 if test -n "$cf_item" ; then
23631   for cf_add_incdir in $cf_item
23632   do
23633         while test "$cf_add_incdir" != /usr/include
23634         do
23635           if test -d "$cf_add_incdir"
23636           then
23637                 cf_have_incdir=no
23638                 if test -n "$CFLAGS$CPPFLAGS" ; then
23639                   # a loop is needed to ensure we can add subdirs of existing dirs
23640                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23641                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23642                           cf_have_incdir=yes; break
23643                         fi
23644                   done
23645                 fi
23646
23647                 if test "$cf_have_incdir" = no ; then
23648                   if test "$cf_add_incdir" = /usr/local/include ; then
23649                         if test "$GCC" = yes
23650                         then
23651                           cf_save_CPPFLAGS=$CPPFLAGS
23652
23653         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23654         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23655
23656                           cat >"conftest.$ac_ext" <<_ACEOF
23657 #line 23657 "configure"
23658 #include "confdefs.h"
23659 #include <stdio.h>
23660 int
23661 main (void)
23662 {
23663 printf("Hello")
23664   ;
23665   return 0;
23666 }
23667 _ACEOF
23668 rm -f "conftest.$ac_objext"
23669 if { (eval echo "$as_me:23669: \"$ac_compile\"") >&5
23670   (eval $ac_compile) 2>&5
23671   ac_status=$?
23672   echo "$as_me:23672: \$? = $ac_status" >&5
23673   (exit "$ac_status"); } &&
23674          { ac_try='test -s "conftest.$ac_objext"'
23675   { (eval echo "$as_me:23675: \"$ac_try\"") >&5
23676   (eval $ac_try) 2>&5
23677   ac_status=$?
23678   echo "$as_me:23678: \$? = $ac_status" >&5
23679   (exit "$ac_status"); }; }; then
23680   :
23681 else
23682   echo "$as_me: failed program was:" >&5
23683 cat "conftest.$ac_ext" >&5
23684 cf_have_incdir=yes
23685 fi
23686 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23687                           CPPFLAGS=$cf_save_CPPFLAGS
23688                         fi
23689                   fi
23690                 fi
23691
23692                 if test "$cf_have_incdir" = no ; then
23693                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23694
23695 echo "${as_me:-configure}:23695: testing adding $cf_add_incdir to include-path ..." 1>&5
23696
23697                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23698
23699                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23700                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23701                   cf_add_incdir="$cf_top_incdir"
23702                 else
23703                   break
23704                 fi
23705           else
23706                 break
23707           fi
23708         done
23709   done
23710 fi
23711
23712                         ;;
23713                 esac
23714         done
23715
23716 cf_search=
23717
23718 test "x$prefix" != "xNONE" && \
23719 test -d "$prefix" && \
23720  {
23721         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23722         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
23723         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23724         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23725         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23726         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23727 }
23728
23729 for cf_subdir_prefix in \
23730         /usr \
23731         /usr/local \
23732         /usr/pkg \
23733         /opt \
23734         /opt/local \
23735         $HOME
23736 do
23737
23738 test "x$cf_subdir_prefix" != "x$prefix" && \
23739 test -d "$cf_subdir_prefix" && \
23740 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23741         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23742         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23743         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23744         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23745         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23746         test -d "$cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db"
23747 }
23748
23749 done
23750
23751         for cf_item in $cf_search
23752         do
23753                 case "$cf_item" in
23754                 (*/$with_hashed_db)
23755
23756 if test -n "$cf_item" ; then
23757         for cf_add_libdir in $cf_item
23758         do
23759                 if test "$cf_add_libdir" = /usr/lib ; then
23760                         :
23761                 elif test -d "$cf_add_libdir"
23762                 then
23763                         cf_have_libdir=no
23764                         if test -n "$LDFLAGS$LIBS" ; then
23765                                 # a loop is needed to ensure we can add subdirs of existing dirs
23766                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23767                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23768                                                 cf_have_libdir=yes; break
23769                                         fi
23770                                 done
23771                         fi
23772                         if test "$cf_have_libdir" = no ; then
23773                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23774
23775 echo "${as_me:-configure}:23775: testing adding $cf_add_libdir to library-path ..." 1>&5
23776
23777                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23778                         fi
23779                 fi
23780         done
23781 fi
23782
23783                         ;;
23784                 esac
23785         done
23786
23787                         ;;
23788                 esac
23789         fi
23790 esac
23791
23792 echo "$as_me:23792: checking for db.h" >&5
23793 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23794 if test "${ac_cv_header_db_h+set}" = set; then
23795   echo $ECHO_N "(cached) $ECHO_C" >&6
23796 else
23797   cat >"conftest.$ac_ext" <<_ACEOF
23798 #line 23798 "configure"
23799 #include "confdefs.h"
23800 #include <db.h>
23801 _ACEOF
23802 if { (eval echo "$as_me:23802: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23803   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23804   ac_status=$?
23805   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23806   rm -f conftest.er1
23807   cat conftest.err >&5
23808   echo "$as_me:23808: \$? = $ac_status" >&5
23809   (exit "$ac_status"); } >/dev/null; then
23810   if test -s conftest.err; then
23811     ac_cpp_err=$ac_c_preproc_warn_flag
23812   else
23813     ac_cpp_err=
23814   fi
23815 else
23816   ac_cpp_err=yes
23817 fi
23818 if test -z "$ac_cpp_err"; then
23819   ac_cv_header_db_h=yes
23820 else
23821   echo "$as_me: failed program was:" >&5
23822   cat "conftest.$ac_ext" >&5
23823   ac_cv_header_db_h=no
23824 fi
23825 rm -f conftest.err "conftest.$ac_ext"
23826 fi
23827 echo "$as_me:23827: result: $ac_cv_header_db_h" >&5
23828 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23829 if test "$ac_cv_header_db_h" = yes; then
23830
23831 echo "$as_me:23831: checking for version of db" >&5
23832 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23833 if test "${cf_cv_hashed_db_version+set}" = set; then
23834   echo $ECHO_N "(cached) $ECHO_C" >&6
23835 else
23836
23837 cf_cv_hashed_db_version=unknown
23838
23839 for cf_db_version in 1 2 3 4 5 6
23840 do
23841
23842 echo "${as_me:-configure}:23842: testing checking for db version $cf_db_version ..." 1>&5
23843
23844         cat >"conftest.$ac_ext" <<_ACEOF
23845 #line 23845 "configure"
23846 #include "confdefs.h"
23847
23848 $ac_includes_default
23849 #include <db.h>
23850
23851 #ifdef DB_VERSION_MAJOR
23852         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23853 #if $cf_db_version == DB_VERSION_MAJOR
23854         /* ok */
23855 #else
23856         make an error
23857 #endif
23858 #else
23859 #if $cf_db_version == 1
23860         /* ok: assuming this is DB 1.8.5 */
23861 #else
23862         make an error
23863 #endif
23864 #endif
23865
23866 int
23867 main (void)
23868 {
23869 DBT *foo = 0
23870   ;
23871   return 0;
23872 }
23873 _ACEOF
23874 rm -f "conftest.$ac_objext"
23875 if { (eval echo "$as_me:23875: \"$ac_compile\"") >&5
23876   (eval $ac_compile) 2>&5
23877   ac_status=$?
23878   echo "$as_me:23878: \$? = $ac_status" >&5
23879   (exit "$ac_status"); } &&
23880          { ac_try='test -s "conftest.$ac_objext"'
23881   { (eval echo "$as_me:23881: \"$ac_try\"") >&5
23882   (eval $ac_try) 2>&5
23883   ac_status=$?
23884   echo "$as_me:23884: \$? = $ac_status" >&5
23885   (exit "$ac_status"); }; }; then
23886
23887         cf_cv_hashed_db_version=$cf_db_version
23888         break
23889
23890 else
23891   echo "$as_me: failed program was:" >&5
23892 cat "conftest.$ac_ext" >&5
23893 fi
23894 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23895 done
23896
23897 fi
23898 echo "$as_me:23898: result: $cf_cv_hashed_db_version" >&5
23899 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23900
23901 if test "$cf_cv_hashed_db_version" = unknown ; then
23902         { { echo "$as_me:23902: error: Cannot determine version of db" >&5
23903 echo "$as_me: error: Cannot determine version of db" >&2;}
23904    { (exit 1); exit 1; }; }
23905 else
23906
23907 echo "$as_me:23907: checking for db libraries" >&5
23908 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23909 if test "${cf_cv_hashed_db_libs+set}" = set; then
23910   echo $ECHO_N "(cached) $ECHO_C" >&6
23911 else
23912
23913 cf_cv_hashed_db_libs=unknown
23914 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23915 do
23916         cf_save_libs="$LIBS"
23917         if test -n "$cf_db_libs"; then
23918
23919 cf_add_libs="$LIBS"
23920 # reverse order
23921 cf_add_0lib=
23922 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23923 # filter duplicates
23924 for cf_add_1lib in $cf_add_0lib; do
23925         for cf_add_2lib in $cf_add_libs; do
23926                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23927                         cf_add_1lib=
23928                         break
23929                 fi
23930         done
23931         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23932 done
23933 LIBS="$cf_add_libs"
23934
23935         fi
23936
23937 echo "${as_me:-configure}:23937: testing checking for library $cf_db_libs ..." 1>&5
23938
23939         cat >"conftest.$ac_ext" <<_ACEOF
23940 #line 23940 "configure"
23941 #include "confdefs.h"
23942
23943 $ac_includes_default
23944 #include <db.h>
23945
23946 int
23947 main (void)
23948 {
23949
23950         char *path = "/tmp/foo";
23951 #ifdef DB_VERSION_MAJOR
23952 #if DB_VERSION_MAJOR >= 4
23953         DB *result = 0;
23954         db_create(&result, NULL, 0);
23955         result->open(result,
23956                 NULL,
23957                 path,
23958                 path,
23959                 DB_HASH,
23960                 DB_CREATE,
23961                 0644);
23962 #elif DB_VERSION_MAJOR >= 3
23963         DB *result = 0;
23964         db_create(&result, NULL, 0);
23965         result->open(result,
23966                 path,
23967                 path,
23968                 DB_HASH,
23969                 DB_CREATE,
23970                 0644);
23971 #elif DB_VERSION_MAJOR >= 2
23972         DB *result = 0;
23973         db_open(path,
23974                 DB_HASH,
23975                 DB_CREATE,
23976                 0644,
23977                 (DB_ENV *) 0,
23978                 (DB_INFO *) 0,
23979                 &result);
23980 #endif /* DB_VERSION_MAJOR */
23981 #else
23982         DB *result = dbopen(path,
23983                      2,
23984                      0644,
23985                      DB_HASH,
23986                      0);
23987 #endif
23988         ${cf_cv_main_return:-return}(result != 0)
23989
23990   ;
23991   return 0;
23992 }
23993 _ACEOF
23994 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23995 if { (eval echo "$as_me:23995: \"$ac_link\"") >&5
23996   (eval $ac_link) 2>&5
23997   ac_status=$?
23998   echo "$as_me:23998: \$? = $ac_status" >&5
23999   (exit "$ac_status"); } &&
24000          { ac_try='test -s "conftest$ac_exeext"'
24001   { (eval echo "$as_me:24001: \"$ac_try\"") >&5
24002   (eval $ac_try) 2>&5
24003   ac_status=$?
24004   echo "$as_me:24004: \$? = $ac_status" >&5
24005   (exit "$ac_status"); }; }; then
24006
24007         if test -n "$cf_db_libs" ; then
24008                 cf_cv_hashed_db_libs=$cf_db_libs
24009         else
24010                 cf_cv_hashed_db_libs=default
24011         fi
24012         LIBS="$cf_save_libs"
24013         break
24014
24015 else
24016   echo "$as_me: failed program was:" >&5
24017 cat "conftest.$ac_ext" >&5
24018 fi
24019 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24020         LIBS="$cf_save_libs"
24021 done
24022
24023 fi
24024 echo "$as_me:24024: result: $cf_cv_hashed_db_libs" >&5
24025 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24026
24027         if test "$cf_cv_hashed_db_libs" = unknown ; then
24028                 { { echo "$as_me:24028: error: Cannot determine library for db" >&5
24029 echo "$as_me: error: Cannot determine library for db" >&2;}
24030    { (exit 1); exit 1; }; }
24031         elif test "$cf_cv_hashed_db_libs" != default ; then
24032
24033 cf_add_libs="$LIBS"
24034 # reverse order
24035 cf_add_0lib=
24036 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24037 # filter duplicates
24038 for cf_add_1lib in $cf_add_0lib; do
24039         for cf_add_2lib in $cf_add_libs; do
24040                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24041                         cf_add_1lib=
24042                         break
24043                 fi
24044         done
24045         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24046 done
24047 LIBS="$cf_add_libs"
24048
24049         fi
24050 fi
24051
24052 else
24053
24054         { { echo "$as_me:24054: error: Cannot find db.h" >&5
24055 echo "$as_me: error: Cannot find db.h" >&2;}
24056    { (exit 1); exit 1; }; }
24057
24058 fi
24059
24060 fi
24061
24062 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24063         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24064         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24065 fi
24066
24067 # Just in case, check if the C compiler has a bool type.
24068
24069 echo "$as_me:24069: checking if we should include stdbool.h" >&5
24070 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24071
24072 if test "${cf_cv_header_stdbool_h+set}" = set; then
24073   echo $ECHO_N "(cached) $ECHO_C" >&6
24074 else
24075
24076         cat >"conftest.$ac_ext" <<_ACEOF
24077 #line 24077 "configure"
24078 #include "confdefs.h"
24079
24080 int
24081 main (void)
24082 {
24083 bool foo = false
24084   ;
24085   return 0;
24086 }
24087 _ACEOF
24088 rm -f "conftest.$ac_objext"
24089 if { (eval echo "$as_me:24089: \"$ac_compile\"") >&5
24090   (eval $ac_compile) 2>&5
24091   ac_status=$?
24092   echo "$as_me:24092: \$? = $ac_status" >&5
24093   (exit "$ac_status"); } &&
24094          { ac_try='test -s "conftest.$ac_objext"'
24095   { (eval echo "$as_me:24095: \"$ac_try\"") >&5
24096   (eval $ac_try) 2>&5
24097   ac_status=$?
24098   echo "$as_me:24098: \$? = $ac_status" >&5
24099   (exit "$ac_status"); }; }; then
24100   cf_cv_header_stdbool_h=0
24101 else
24102   echo "$as_me: failed program was:" >&5
24103 cat "conftest.$ac_ext" >&5
24104 cat >"conftest.$ac_ext" <<_ACEOF
24105 #line 24105 "configure"
24106 #include "confdefs.h"
24107
24108 #ifndef __BEOS__
24109 #include <stdbool.h>
24110 #endif
24111
24112 int
24113 main (void)
24114 {
24115 bool foo = false
24116   ;
24117   return 0;
24118 }
24119 _ACEOF
24120 rm -f "conftest.$ac_objext"
24121 if { (eval echo "$as_me:24121: \"$ac_compile\"") >&5
24122   (eval $ac_compile) 2>&5
24123   ac_status=$?
24124   echo "$as_me:24124: \$? = $ac_status" >&5
24125   (exit "$ac_status"); } &&
24126          { ac_try='test -s "conftest.$ac_objext"'
24127   { (eval echo "$as_me:24127: \"$ac_try\"") >&5
24128   (eval $ac_try) 2>&5
24129   ac_status=$?
24130   echo "$as_me:24130: \$? = $ac_status" >&5
24131   (exit "$ac_status"); }; }; then
24132   cf_cv_header_stdbool_h=1
24133 else
24134   echo "$as_me: failed program was:" >&5
24135 cat "conftest.$ac_ext" >&5
24136 cf_cv_header_stdbool_h=0
24137 fi
24138 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24139 fi
24140 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24141 fi
24142
24143 if test "$cf_cv_header_stdbool_h" = 1
24144 then    echo "$as_me:24144: result: yes" >&5
24145 echo "${ECHO_T}yes" >&6
24146 else    echo "$as_me:24146: result: no" >&5
24147 echo "${ECHO_T}no" >&6
24148 fi
24149
24150 echo "$as_me:24150: checking for builtin bool type" >&5
24151 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24152
24153 if test "${cf_cv_cc_bool_type+set}" = set; then
24154   echo $ECHO_N "(cached) $ECHO_C" >&6
24155 else
24156
24157         cat >"conftest.$ac_ext" <<_ACEOF
24158 #line 24158 "configure"
24159 #include "confdefs.h"
24160
24161 #include <stdio.h>
24162 #include <sys/types.h>
24163
24164 int
24165 main (void)
24166 {
24167 bool x = false
24168   ;
24169   return 0;
24170 }
24171 _ACEOF
24172 rm -f "conftest.$ac_objext"
24173 if { (eval echo "$as_me:24173: \"$ac_compile\"") >&5
24174   (eval $ac_compile) 2>&5
24175   ac_status=$?
24176   echo "$as_me:24176: \$? = $ac_status" >&5
24177   (exit "$ac_status"); } &&
24178          { ac_try='test -s "conftest.$ac_objext"'
24179   { (eval echo "$as_me:24179: \"$ac_try\"") >&5
24180   (eval $ac_try) 2>&5
24181   ac_status=$?
24182   echo "$as_me:24182: \$? = $ac_status" >&5
24183   (exit "$ac_status"); }; }; then
24184   cf_cv_cc_bool_type=1
24185 else
24186   echo "$as_me: failed program was:" >&5
24187 cat "conftest.$ac_ext" >&5
24188 cf_cv_cc_bool_type=0
24189 fi
24190 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24191
24192 fi
24193
24194 if test "$cf_cv_cc_bool_type" = 1
24195 then    echo "$as_me:24195: result: yes" >&5
24196 echo "${ECHO_T}yes" >&6
24197 else    echo "$as_me:24197: result: no" >&5
24198 echo "${ECHO_T}no" >&6
24199 fi
24200
24201 # Check for C++ compiler characteristics (and ensure that it's there!)
24202 if test -n "$CXX" ; then
24203         ac_ext=cc
24204 ac_cpp='$CXXCPP $CPPFLAGS'
24205 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24206 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24207 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24208 ac_main_return="return"
24209
24210 if test -n "$GXX" ; then
24211
24212         cf_save="$LIBS"
24213         LIBS="$LIBS $CXXLIBS"
24214         echo "$as_me:24214: checking if we already have C++ library" >&5
24215 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24216         cat >"conftest.$ac_ext" <<_ACEOF
24217 #line 24217 "configure"
24218 #include "confdefs.h"
24219
24220                         #include <iostream>
24221 int
24222 main (void)
24223 {
24224
24225                         std::cout << "Hello World!" << std::endl;
24226   ;
24227   return 0;
24228 }
24229 _ACEOF
24230 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24231 if { (eval echo "$as_me:24231: \"$ac_link\"") >&5
24232   (eval $ac_link) 2>&5
24233   ac_status=$?
24234   echo "$as_me:24234: \$? = $ac_status" >&5
24235   (exit "$ac_status"); } &&
24236          { ac_try='test -s "conftest$ac_exeext"'
24237   { (eval echo "$as_me:24237: \"$ac_try\"") >&5
24238   (eval $ac_try) 2>&5
24239   ac_status=$?
24240   echo "$as_me:24240: \$? = $ac_status" >&5
24241   (exit "$ac_status"); }; }; then
24242   cf_have_libstdcpp=yes
24243 else
24244   echo "$as_me: failed program was:" >&5
24245 cat "conftest.$ac_ext" >&5
24246 cf_have_libstdcpp=no
24247 fi
24248 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24249         echo "$as_me:24249: result: $cf_have_libstdcpp" >&5
24250 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24251         LIBS="$cf_save"
24252
24253         if test "$cf_have_libstdcpp" != yes
24254         then
24255                 case "$cf_cv_system_name" in
24256                 (os2*)
24257                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24258                                 cf_stdcpp_libname=stdcpp
24259                         else
24260                                 cf_stdcpp_libname=stdc++
24261                         fi
24262                         ;;
24263                 (*)
24264                         cf_stdcpp_libname=stdc++
24265                         ;;
24266                 esac
24267
24268                 echo "$as_me:24268: checking for library $cf_stdcpp_libname" >&5
24269 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24270 if test "${cf_cv_libstdcpp+set}" = set; then
24271   echo $ECHO_N "(cached) $ECHO_C" >&6
24272 else
24273
24274                         cf_save="$LIBS"
24275                         LIBS="$LIBS $CXXLIBS"
24276
24277 cf_add_libs="$LIBS"
24278 # reverse order
24279 cf_add_0lib=
24280 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24281 # filter duplicates
24282 for cf_add_1lib in $cf_add_0lib; do
24283         for cf_add_2lib in $cf_add_libs; do
24284                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24285                         cf_add_1lib=
24286                         break
24287                 fi
24288         done
24289         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24290 done
24291 LIBS="$cf_add_libs"
24292
24293                 cat >"conftest.$ac_ext" <<_ACEOF
24294 #line 24294 "configure"
24295 #include "confdefs.h"
24296
24297                                 #include <iostream>
24298 int
24299 main (void)
24300 {
24301
24302                                 std::cout << "Hello World!" << std::endl;
24303   ;
24304   return 0;
24305 }
24306 _ACEOF
24307 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24308 if { (eval echo "$as_me:24308: \"$ac_link\"") >&5
24309   (eval $ac_link) 2>&5
24310   ac_status=$?
24311   echo "$as_me:24311: \$? = $ac_status" >&5
24312   (exit "$ac_status"); } &&
24313          { ac_try='test -s "conftest$ac_exeext"'
24314   { (eval echo "$as_me:24314: \"$ac_try\"") >&5
24315   (eval $ac_try) 2>&5
24316   ac_status=$?
24317   echo "$as_me:24317: \$? = $ac_status" >&5
24318   (exit "$ac_status"); }; }; then
24319   cf_cv_libstdcpp=yes
24320 else
24321   echo "$as_me: failed program was:" >&5
24322 cat "conftest.$ac_ext" >&5
24323 cf_cv_libstdcpp=no
24324 fi
24325 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24326                         LIBS="$cf_save"
24327
24328 fi
24329 echo "$as_me:24329: result: $cf_cv_libstdcpp" >&5
24330 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24331                 test "$cf_cv_libstdcpp" = yes && {
24332 cf_add_libs="$CXXLIBS"
24333 # reverse order
24334 cf_add_0lib=
24335 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24336 # filter duplicates
24337 for cf_add_1lib in $cf_add_0lib; do
24338         for cf_add_2lib in $cf_add_libs; do
24339                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24340                         cf_add_1lib=
24341                         break
24342                 fi
24343         done
24344         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24345 done
24346 CXXLIBS="$cf_add_libs"
24347  }
24348         fi
24349 fi
24350
24351         echo "$as_me:24351: checking whether $CXX understands -c and -o together" >&5
24352 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24353 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24354   echo $ECHO_N "(cached) $ECHO_C" >&6
24355 else
24356
24357 cat > conftest.$ac_ext <<CF_EOF
24358 int main(void)
24359 {
24360         ${cf_cv_main_return:-return}(0);
24361 }
24362 CF_EOF
24363 # We do the test twice because some compilers refuse to overwrite an
24364 # existing .o file with -o, though they will create one.
24365 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24366 if { (eval echo "$as_me:24366: \"$ac_try\"") >&5
24367   (eval $ac_try) 2>&5
24368   ac_status=$?
24369   echo "$as_me:24369: \$? = $ac_status" >&5
24370   (exit "$ac_status"); } &&
24371   test -f conftest2.$ac_objext && { (eval echo "$as_me:24371: \"$ac_try\"") >&5
24372   (eval $ac_try) 2>&5
24373   ac_status=$?
24374   echo "$as_me:24374: \$? = $ac_status" >&5
24375   (exit "$ac_status"); };
24376 then
24377   eval cf_cv_prog_CXX_c_o=yes
24378 else
24379   eval cf_cv_prog_CXX_c_o=no
24380 fi
24381 rm -rf ./conftest*
24382
24383 fi
24384 if test "$cf_cv_prog_CXX_c_o" = yes; then
24385   echo "$as_me:24385: result: yes" >&5
24386 echo "${ECHO_T}yes" >&6
24387 else
24388   echo "$as_me:24388: result: no" >&5
24389 echo "${ECHO_T}no" >&6
24390 fi
24391
24392         case "$GXX_VERSION" in
24393         (1.*|2.[0-6]*|[1-9][0-9].*)
24394                 cf_cxx_library=yes
24395                 ;;
24396         (*-2.7*|2.7*)
24397
24398 cf_cxx_library=unknown
24399 case "$cf_cv_system_name" in
24400 (os2*)
24401         cf_gpp_libname=gpp
24402         ;;
24403 (*)
24404         cf_gpp_libname=g++
24405         ;;
24406 esac
24407 if test "$GXX" = yes; then
24408         echo "$as_me:24408: checking for lib$cf_gpp_libname" >&5
24409 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24410         cf_save="$LIBS"
24411
24412 cf_add_libs="$LIBS"
24413 # reverse order
24414 cf_add_0lib=
24415 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24416 # filter duplicates
24417 for cf_add_1lib in $cf_add_0lib; do
24418         for cf_add_2lib in $cf_add_libs; do
24419                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24420                         cf_add_1lib=
24421                         break
24422                 fi
24423         done
24424         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24425 done
24426 LIBS="$cf_add_libs"
24427
24428         cat >"conftest.$ac_ext" <<_ACEOF
24429 #line 24429 "configure"
24430 #include "confdefs.h"
24431
24432 #include <$cf_gpp_libname/builtin.h>
24433
24434 int
24435 main (void)
24436 {
24437 two_arg_error_handler_t foo2 = lib_error_handler
24438   ;
24439   return 0;
24440 }
24441 _ACEOF
24442 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24443 if { (eval echo "$as_me:24443: \"$ac_link\"") >&5
24444   (eval $ac_link) 2>&5
24445   ac_status=$?
24446   echo "$as_me:24446: \$? = $ac_status" >&5
24447   (exit "$ac_status"); } &&
24448          { ac_try='test -s "conftest$ac_exeext"'
24449   { (eval echo "$as_me:24449: \"$ac_try\"") >&5
24450   (eval $ac_try) 2>&5
24451   ac_status=$?
24452   echo "$as_me:24452: \$? = $ac_status" >&5
24453   (exit "$ac_status"); }; }; then
24454   cf_cxx_library=yes
24455
24456 cf_add_libs="$CXXLIBS"
24457 # reverse order
24458 cf_add_0lib=
24459 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24460 # filter duplicates
24461 for cf_add_1lib in $cf_add_0lib; do
24462         for cf_add_2lib in $cf_add_libs; do
24463                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24464                         cf_add_1lib=
24465                         break
24466                 fi
24467         done
24468         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24469 done
24470 CXXLIBS="$cf_add_libs"
24471
24472          if test "$cf_gpp_libname" = cpp ; then
24473
24474 cat >>confdefs.h <<\EOF
24475 #define HAVE_GPP_BUILTIN_H 1
24476 EOF
24477
24478          else
24479
24480 cat >>confdefs.h <<\EOF
24481 #define HAVE_GXX_BUILTIN_H 1
24482 EOF
24483
24484          fi
24485 else
24486   echo "$as_me: failed program was:" >&5
24487 cat "conftest.$ac_ext" >&5
24488 cat >"conftest.$ac_ext" <<_ACEOF
24489 #line 24489 "configure"
24490 #include "confdefs.h"
24491
24492 #include <builtin.h>
24493
24494 int
24495 main (void)
24496 {
24497 two_arg_error_handler_t foo2 = lib_error_handler
24498   ;
24499   return 0;
24500 }
24501 _ACEOF
24502 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24503 if { (eval echo "$as_me:24503: \"$ac_link\"") >&5
24504   (eval $ac_link) 2>&5
24505   ac_status=$?
24506   echo "$as_me:24506: \$? = $ac_status" >&5
24507   (exit "$ac_status"); } &&
24508          { ac_try='test -s "conftest$ac_exeext"'
24509   { (eval echo "$as_me:24509: \"$ac_try\"") >&5
24510   (eval $ac_try) 2>&5
24511   ac_status=$?
24512   echo "$as_me:24512: \$? = $ac_status" >&5
24513   (exit "$ac_status"); }; }; then
24514   cf_cxx_library=yes
24515
24516 cf_add_libs="$CXXLIBS"
24517 # reverse order
24518 cf_add_0lib=
24519 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24520 # filter duplicates
24521 for cf_add_1lib in $cf_add_0lib; do
24522         for cf_add_2lib in $cf_add_libs; do
24523                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24524                         cf_add_1lib=
24525                         break
24526                 fi
24527         done
24528         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24529 done
24530 CXXLIBS="$cf_add_libs"
24531
24532 cat >>confdefs.h <<\EOF
24533 #define HAVE_BUILTIN_H 1
24534 EOF
24535
24536 else
24537   echo "$as_me: failed program was:" >&5
24538 cat "conftest.$ac_ext" >&5
24539 cf_cxx_library=no
24540 fi
24541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24542 fi
24543 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24544         LIBS="$cf_save"
24545         echo "$as_me:24545: result: $cf_cxx_library" >&5
24546 echo "${ECHO_T}$cf_cxx_library" >&6
24547 fi
24548
24549                 ;;
24550         (*)
24551                 cf_cxx_library=no
24552                 ;;
24553         esac
24554
24555         ac_ext=cc
24556 ac_cpp='$CXXCPP $CPPFLAGS'
24557 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24558 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24559 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24560 ac_main_return="return"
24561 echo "$as_me:24561: checking how to run the C++ preprocessor" >&5
24562 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24563 if test -z "$CXXCPP"; then
24564   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24565   echo $ECHO_N "(cached) $ECHO_C" >&6
24566 else
24567       # Double quotes because CXXCPP needs to be expanded
24568     for CXXCPP in "$CXX -E" "/lib/cpp"
24569     do
24570       ac_preproc_ok=false
24571 for ac_cxx_preproc_warn_flag in '' yes
24572 do
24573   # Use a header file that comes with gcc, so configuring glibc
24574   # with a fresh cross-compiler works.
24575   # On the NeXT, cc -E runs the code through the compiler's parser,
24576   # not just through cpp. "Syntax error" is here to catch this case.
24577   cat >"conftest.$ac_ext" <<_ACEOF
24578 #line 24578 "configure"
24579 #include "confdefs.h"
24580 #include <assert.h>
24581                      Syntax error
24582 _ACEOF
24583 if { (eval echo "$as_me:24583: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24584   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24585   ac_status=$?
24586   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24587   rm -f conftest.er1
24588   cat conftest.err >&5
24589   echo "$as_me:24589: \$? = $ac_status" >&5
24590   (exit "$ac_status"); } >/dev/null; then
24591   if test -s conftest.err; then
24592     ac_cpp_err=$ac_cxx_preproc_warn_flag
24593   else
24594     ac_cpp_err=
24595   fi
24596 else
24597   ac_cpp_err=yes
24598 fi
24599 if test -z "$ac_cpp_err"; then
24600   :
24601 else
24602   echo "$as_me: failed program was:" >&5
24603   cat "conftest.$ac_ext" >&5
24604   # Broken: fails on valid input.
24605 continue
24606 fi
24607 rm -f conftest.err "conftest.$ac_ext"
24608
24609   # OK, works on sane cases.  Now check whether non-existent headers
24610   # can be detected and how.
24611   cat >"conftest.$ac_ext" <<_ACEOF
24612 #line 24612 "configure"
24613 #include "confdefs.h"
24614 #include <ac_nonexistent.h>
24615 _ACEOF
24616 if { (eval echo "$as_me:24616: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24617   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24618   ac_status=$?
24619   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24620   rm -f conftest.er1
24621   cat conftest.err >&5
24622   echo "$as_me:24622: \$? = $ac_status" >&5
24623   (exit "$ac_status"); } >/dev/null; then
24624   if test -s conftest.err; then
24625     ac_cpp_err=$ac_cxx_preproc_warn_flag
24626   else
24627     ac_cpp_err=
24628   fi
24629 else
24630   ac_cpp_err=yes
24631 fi
24632 if test -z "$ac_cpp_err"; then
24633   # Broken: success on invalid input.
24634 continue
24635 else
24636   echo "$as_me: failed program was:" >&5
24637   cat "conftest.$ac_ext" >&5
24638   # Passes both tests.
24639 ac_preproc_ok=:
24640 break
24641 fi
24642 rm -f conftest.err "conftest.$ac_ext"
24643
24644 done
24645 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24646 rm -f conftest.err "conftest.$ac_ext"
24647 if $ac_preproc_ok; then
24648   break
24649 fi
24650
24651     done
24652     ac_cv_prog_CXXCPP=$CXXCPP
24653
24654 fi
24655   CXXCPP=$ac_cv_prog_CXXCPP
24656 else
24657   ac_cv_prog_CXXCPP=$CXXCPP
24658 fi
24659 echo "$as_me:24659: result: $CXXCPP" >&5
24660 echo "${ECHO_T}$CXXCPP" >&6
24661 ac_preproc_ok=false
24662 for ac_cxx_preproc_warn_flag in '' yes
24663 do
24664   # Use a header file that comes with gcc, so configuring glibc
24665   # with a fresh cross-compiler works.
24666   # On the NeXT, cc -E runs the code through the compiler's parser,
24667   # not just through cpp. "Syntax error" is here to catch this case.
24668   cat >"conftest.$ac_ext" <<_ACEOF
24669 #line 24669 "configure"
24670 #include "confdefs.h"
24671 #include <assert.h>
24672                      Syntax error
24673 _ACEOF
24674 if { (eval echo "$as_me:24674: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24675   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24676   ac_status=$?
24677   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24678   rm -f conftest.er1
24679   cat conftest.err >&5
24680   echo "$as_me:24680: \$? = $ac_status" >&5
24681   (exit "$ac_status"); } >/dev/null; then
24682   if test -s conftest.err; then
24683     ac_cpp_err=$ac_cxx_preproc_warn_flag
24684   else
24685     ac_cpp_err=
24686   fi
24687 else
24688   ac_cpp_err=yes
24689 fi
24690 if test -z "$ac_cpp_err"; then
24691   :
24692 else
24693   echo "$as_me: failed program was:" >&5
24694   cat "conftest.$ac_ext" >&5
24695   # Broken: fails on valid input.
24696 continue
24697 fi
24698 rm -f conftest.err "conftest.$ac_ext"
24699
24700   # OK, works on sane cases.  Now check whether non-existent headers
24701   # can be detected and how.
24702   cat >"conftest.$ac_ext" <<_ACEOF
24703 #line 24703 "configure"
24704 #include "confdefs.h"
24705 #include <ac_nonexistent.h>
24706 _ACEOF
24707 if { (eval echo "$as_me:24707: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24708   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24709   ac_status=$?
24710   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24711   rm -f conftest.er1
24712   cat conftest.err >&5
24713   echo "$as_me:24713: \$? = $ac_status" >&5
24714   (exit "$ac_status"); } >/dev/null; then
24715   if test -s conftest.err; then
24716     ac_cpp_err=$ac_cxx_preproc_warn_flag
24717   else
24718     ac_cpp_err=
24719   fi
24720 else
24721   ac_cpp_err=yes
24722 fi
24723 if test -z "$ac_cpp_err"; then
24724   # Broken: success on invalid input.
24725 continue
24726 else
24727   echo "$as_me: failed program was:" >&5
24728   cat "conftest.$ac_ext" >&5
24729   # Passes both tests.
24730 ac_preproc_ok=:
24731 break
24732 fi
24733 rm -f conftest.err "conftest.$ac_ext"
24734
24735 done
24736 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24737 rm -f conftest.err "conftest.$ac_ext"
24738 if $ac_preproc_ok; then
24739   :
24740 else
24741   { { echo "$as_me:24741: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24742 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24743    { (exit 1); exit 1; }; }
24744 fi
24745
24746 ac_ext=cc
24747 ac_cpp='$CXXCPP $CPPFLAGS'
24748 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24749 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24750 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24751 ac_main_return="return"
24752
24753 for ac_header in typeinfo
24754 do
24755 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24756 echo "$as_me:24756: checking for $ac_header" >&5
24757 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24758 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24759   echo $ECHO_N "(cached) $ECHO_C" >&6
24760 else
24761   cat >"conftest.$ac_ext" <<_ACEOF
24762 #line 24762 "configure"
24763 #include "confdefs.h"
24764 #include <$ac_header>
24765 _ACEOF
24766 if { (eval echo "$as_me:24766: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24767   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24768   ac_status=$?
24769   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24770   rm -f conftest.er1
24771   cat conftest.err >&5
24772   echo "$as_me:24772: \$? = $ac_status" >&5
24773   (exit "$ac_status"); } >/dev/null; then
24774   if test -s conftest.err; then
24775     ac_cpp_err=$ac_cxx_preproc_warn_flag
24776   else
24777     ac_cpp_err=
24778   fi
24779 else
24780   ac_cpp_err=yes
24781 fi
24782 if test -z "$ac_cpp_err"; then
24783   eval "$as_ac_Header=yes"
24784 else
24785   echo "$as_me: failed program was:" >&5
24786   cat "conftest.$ac_ext" >&5
24787   eval "$as_ac_Header=no"
24788 fi
24789 rm -f conftest.err "conftest.$ac_ext"
24790 fi
24791 echo "$as_me:24791: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24792 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24793 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24794   cat >>confdefs.h <<EOF
24795 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24796 EOF
24797
24798 fi
24799 done
24800
24801 for ac_header in iostream
24802 do
24803 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24804 echo "$as_me:24804: checking for $ac_header" >&5
24805 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24806 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24807   echo $ECHO_N "(cached) $ECHO_C" >&6
24808 else
24809   cat >"conftest.$ac_ext" <<_ACEOF
24810 #line 24810 "configure"
24811 #include "confdefs.h"
24812 #include <$ac_header>
24813 _ACEOF
24814 if { (eval echo "$as_me:24814: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24815   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24816   ac_status=$?
24817   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24818   rm -f conftest.er1
24819   cat conftest.err >&5
24820   echo "$as_me:24820: \$? = $ac_status" >&5
24821   (exit "$ac_status"); } >/dev/null; then
24822   if test -s conftest.err; then
24823     ac_cpp_err=$ac_cxx_preproc_warn_flag
24824   else
24825     ac_cpp_err=
24826   fi
24827 else
24828   ac_cpp_err=yes
24829 fi
24830 if test -z "$ac_cpp_err"; then
24831   eval "$as_ac_Header=yes"
24832 else
24833   echo "$as_me: failed program was:" >&5
24834   cat "conftest.$ac_ext" >&5
24835   eval "$as_ac_Header=no"
24836 fi
24837 rm -f conftest.err "conftest.$ac_ext"
24838 fi
24839 echo "$as_me:24839: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24840 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24841 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24842   cat >>confdefs.h <<EOF
24843 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24844 EOF
24845
24846 fi
24847 done
24848
24849 if test x"$ac_cv_header_iostream" = xyes ; then
24850         echo "$as_me:24850: checking if iostream uses std-namespace" >&5
24851 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24852         cat >"conftest.$ac_ext" <<_ACEOF
24853 #line 24853 "configure"
24854 #include "confdefs.h"
24855
24856 #include <iostream>
24857 using std::endl;
24858 using std::cerr;
24859 int
24860 main (void)
24861 {
24862
24863 cerr << "testing" << endl;
24864
24865   ;
24866   return 0;
24867 }
24868 _ACEOF
24869 rm -f "conftest.$ac_objext"
24870 if { (eval echo "$as_me:24870: \"$ac_compile\"") >&5
24871   (eval $ac_compile) 2>&5
24872   ac_status=$?
24873   echo "$as_me:24873: \$? = $ac_status" >&5
24874   (exit "$ac_status"); } &&
24875          { ac_try='test -s "conftest.$ac_objext"'
24876   { (eval echo "$as_me:24876: \"$ac_try\"") >&5
24877   (eval $ac_try) 2>&5
24878   ac_status=$?
24879   echo "$as_me:24879: \$? = $ac_status" >&5
24880   (exit "$ac_status"); }; }; then
24881   cf_iostream_namespace=yes
24882 else
24883   echo "$as_me: failed program was:" >&5
24884 cat "conftest.$ac_ext" >&5
24885 cf_iostream_namespace=no
24886 fi
24887 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24888         echo "$as_me:24888: result: $cf_iostream_namespace" >&5
24889 echo "${ECHO_T}$cf_iostream_namespace" >&6
24890         if test "$cf_iostream_namespace" = yes ; then
24891
24892 cat >>confdefs.h <<\EOF
24893 #define IOSTREAM_NAMESPACE 1
24894 EOF
24895
24896         fi
24897 fi
24898
24899 echo "$as_me:24899: checking if we should include stdbool.h" >&5
24900 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24901
24902 if test "${cf_cv_header_stdbool_h+set}" = set; then
24903   echo $ECHO_N "(cached) $ECHO_C" >&6
24904 else
24905
24906         cat >"conftest.$ac_ext" <<_ACEOF
24907 #line 24907 "configure"
24908 #include "confdefs.h"
24909
24910 int
24911 main (void)
24912 {
24913 bool foo = false
24914   ;
24915   return 0;
24916 }
24917 _ACEOF
24918 rm -f "conftest.$ac_objext"
24919 if { (eval echo "$as_me:24919: \"$ac_compile\"") >&5
24920   (eval $ac_compile) 2>&5
24921   ac_status=$?
24922   echo "$as_me:24922: \$? = $ac_status" >&5
24923   (exit "$ac_status"); } &&
24924          { ac_try='test -s "conftest.$ac_objext"'
24925   { (eval echo "$as_me:24925: \"$ac_try\"") >&5
24926   (eval $ac_try) 2>&5
24927   ac_status=$?
24928   echo "$as_me:24928: \$? = $ac_status" >&5
24929   (exit "$ac_status"); }; }; then
24930   cf_cv_header_stdbool_h=0
24931 else
24932   echo "$as_me: failed program was:" >&5
24933 cat "conftest.$ac_ext" >&5
24934 cat >"conftest.$ac_ext" <<_ACEOF
24935 #line 24935 "configure"
24936 #include "confdefs.h"
24937
24938 #ifndef __BEOS__
24939 #include <stdbool.h>
24940 #endif
24941
24942 int
24943 main (void)
24944 {
24945 bool foo = false
24946   ;
24947   return 0;
24948 }
24949 _ACEOF
24950 rm -f "conftest.$ac_objext"
24951 if { (eval echo "$as_me:24951: \"$ac_compile\"") >&5
24952   (eval $ac_compile) 2>&5
24953   ac_status=$?
24954   echo "$as_me:24954: \$? = $ac_status" >&5
24955   (exit "$ac_status"); } &&
24956          { ac_try='test -s "conftest.$ac_objext"'
24957   { (eval echo "$as_me:24957: \"$ac_try\"") >&5
24958   (eval $ac_try) 2>&5
24959   ac_status=$?
24960   echo "$as_me:24960: \$? = $ac_status" >&5
24961   (exit "$ac_status"); }; }; then
24962   cf_cv_header_stdbool_h=1
24963 else
24964   echo "$as_me: failed program was:" >&5
24965 cat "conftest.$ac_ext" >&5
24966 cf_cv_header_stdbool_h=0
24967 fi
24968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24969 fi
24970 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24971 fi
24972
24973 if test "$cf_cv_header_stdbool_h" = 1
24974 then    echo "$as_me:24974: result: yes" >&5
24975 echo "${ECHO_T}yes" >&6
24976 else    echo "$as_me:24976: result: no" >&5
24977 echo "${ECHO_T}no" >&6
24978 fi
24979
24980 echo "$as_me:24980: checking for builtin bool type" >&5
24981 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24982
24983 if test "${cf_cv_builtin_bool+set}" = set; then
24984   echo $ECHO_N "(cached) $ECHO_C" >&6
24985 else
24986
24987         cat >"conftest.$ac_ext" <<_ACEOF
24988 #line 24988 "configure"
24989 #include "confdefs.h"
24990
24991 #include <stdio.h>
24992 #include <sys/types.h>
24993
24994 int
24995 main (void)
24996 {
24997 bool x = false
24998   ;
24999   return 0;
25000 }
25001 _ACEOF
25002 rm -f "conftest.$ac_objext"
25003 if { (eval echo "$as_me:25003: \"$ac_compile\"") >&5
25004   (eval $ac_compile) 2>&5
25005   ac_status=$?
25006   echo "$as_me:25006: \$? = $ac_status" >&5
25007   (exit "$ac_status"); } &&
25008          { ac_try='test -s "conftest.$ac_objext"'
25009   { (eval echo "$as_me:25009: \"$ac_try\"") >&5
25010   (eval $ac_try) 2>&5
25011   ac_status=$?
25012   echo "$as_me:25012: \$? = $ac_status" >&5
25013   (exit "$ac_status"); }; }; then
25014   cf_cv_builtin_bool=1
25015 else
25016   echo "$as_me: failed program was:" >&5
25017 cat "conftest.$ac_ext" >&5
25018 cf_cv_builtin_bool=0
25019 fi
25020 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25021
25022 fi
25023
25024 if test "$cf_cv_builtin_bool" = 1
25025 then    echo "$as_me:25025: result: yes" >&5
25026 echo "${ECHO_T}yes" >&6
25027 else    echo "$as_me:25027: result: no" >&5
25028 echo "${ECHO_T}no" >&6
25029 fi
25030
25031 echo "$as_me:25031: checking for bool" >&5
25032 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25033 if test "${ac_cv_type_bool+set}" = set; then
25034   echo $ECHO_N "(cached) $ECHO_C" >&6
25035 else
25036   cat >"conftest.$ac_ext" <<_ACEOF
25037 #line 25037 "configure"
25038 #include "confdefs.h"
25039
25040 #include <stdlib.h>
25041 #include <stdio.h>
25042
25043 #if defined(__cplusplus)
25044
25045 #ifdef HAVE_GXX_BUILTIN_H
25046 #include <g++/builtin.h>
25047 #elif HAVE_GPP_BUILTIN_H
25048 #include <gpp/builtin.h>
25049 #elif HAVE_BUILTIN_H
25050 #include <builtin.h>
25051 #endif
25052
25053 #else
25054
25055 #if $cf_cv_header_stdbool_h
25056 #include <stdbool.h>
25057 #endif
25058
25059 #endif
25060
25061 int
25062 main (void)
25063 {
25064 if ((bool *) 0)
25065   return 0;
25066 if (sizeof (bool))
25067   return 0;
25068   ;
25069   return 0;
25070 }
25071 _ACEOF
25072 rm -f "conftest.$ac_objext"
25073 if { (eval echo "$as_me:25073: \"$ac_compile\"") >&5
25074   (eval $ac_compile) 2>&5
25075   ac_status=$?
25076   echo "$as_me:25076: \$? = $ac_status" >&5
25077   (exit "$ac_status"); } &&
25078          { ac_try='test -s "conftest.$ac_objext"'
25079   { (eval echo "$as_me:25079: \"$ac_try\"") >&5
25080   (eval $ac_try) 2>&5
25081   ac_status=$?
25082   echo "$as_me:25082: \$? = $ac_status" >&5
25083   (exit "$ac_status"); }; }; then
25084   ac_cv_type_bool=yes
25085 else
25086   echo "$as_me: failed program was:" >&5
25087 cat "conftest.$ac_ext" >&5
25088 ac_cv_type_bool=no
25089 fi
25090 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25091 fi
25092 echo "$as_me:25092: result: $ac_cv_type_bool" >&5
25093 echo "${ECHO_T}$ac_cv_type_bool" >&6
25094
25095 echo "$as_me:25095: checking size of bool" >&5
25096 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25097 if test "${ac_cv_sizeof_bool+set}" = set; then
25098   echo $ECHO_N "(cached) $ECHO_C" >&6
25099 else
25100   if test "$ac_cv_type_bool" = yes; then
25101   if test "$cross_compiling" = yes; then
25102   # Depending upon the size, compute the lo and hi bounds.
25103 cat >"conftest.$ac_ext" <<_ACEOF
25104 #line 25104 "configure"
25105 #include "confdefs.h"
25106
25107 #include <stdlib.h>
25108 #include <stdio.h>
25109
25110 #if defined(__cplusplus)
25111
25112 #ifdef HAVE_GXX_BUILTIN_H
25113 #include <g++/builtin.h>
25114 #elif HAVE_GPP_BUILTIN_H
25115 #include <gpp/builtin.h>
25116 #elif HAVE_BUILTIN_H
25117 #include <builtin.h>
25118 #endif
25119
25120 #else
25121
25122 #if $cf_cv_header_stdbool_h
25123 #include <stdbool.h>
25124 #endif
25125
25126 #endif
25127
25128 int
25129 main (void)
25130 {
25131 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25132   ;
25133   return 0;
25134 }
25135 _ACEOF
25136 rm -f "conftest.$ac_objext"
25137 if { (eval echo "$as_me:25137: \"$ac_compile\"") >&5
25138   (eval $ac_compile) 2>&5
25139   ac_status=$?
25140   echo "$as_me:25140: \$? = $ac_status" >&5
25141   (exit "$ac_status"); } &&
25142          { ac_try='test -s "conftest.$ac_objext"'
25143   { (eval echo "$as_me:25143: \"$ac_try\"") >&5
25144   (eval $ac_try) 2>&5
25145   ac_status=$?
25146   echo "$as_me:25146: \$? = $ac_status" >&5
25147   (exit "$ac_status"); }; }; then
25148   ac_lo=0 ac_mid=0
25149   while :; do
25150     cat >"conftest.$ac_ext" <<_ACEOF
25151 #line 25151 "configure"
25152 #include "confdefs.h"
25153
25154 #include <stdlib.h>
25155 #include <stdio.h>
25156
25157 #if defined(__cplusplus)
25158
25159 #ifdef HAVE_GXX_BUILTIN_H
25160 #include <g++/builtin.h>
25161 #elif HAVE_GPP_BUILTIN_H
25162 #include <gpp/builtin.h>
25163 #elif HAVE_BUILTIN_H
25164 #include <builtin.h>
25165 #endif
25166
25167 #else
25168
25169 #if $cf_cv_header_stdbool_h
25170 #include <stdbool.h>
25171 #endif
25172
25173 #endif
25174
25175 int
25176 main (void)
25177 {
25178 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25179   ;
25180   return 0;
25181 }
25182 _ACEOF
25183 rm -f "conftest.$ac_objext"
25184 if { (eval echo "$as_me:25184: \"$ac_compile\"") >&5
25185   (eval $ac_compile) 2>&5
25186   ac_status=$?
25187   echo "$as_me:25187: \$? = $ac_status" >&5
25188   (exit "$ac_status"); } &&
25189          { ac_try='test -s "conftest.$ac_objext"'
25190   { (eval echo "$as_me:25190: \"$ac_try\"") >&5
25191   (eval $ac_try) 2>&5
25192   ac_status=$?
25193   echo "$as_me:25193: \$? = $ac_status" >&5
25194   (exit "$ac_status"); }; }; then
25195   ac_hi=$ac_mid; break
25196 else
25197   echo "$as_me: failed program was:" >&5
25198 cat "conftest.$ac_ext" >&5
25199 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25200 fi
25201 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25202   done
25203 else
25204   echo "$as_me: failed program was:" >&5
25205 cat "conftest.$ac_ext" >&5
25206 ac_hi=-1 ac_mid=-1
25207   while :; do
25208     cat >"conftest.$ac_ext" <<_ACEOF
25209 #line 25209 "configure"
25210 #include "confdefs.h"
25211
25212 #include <stdlib.h>
25213 #include <stdio.h>
25214
25215 #if defined(__cplusplus)
25216
25217 #ifdef HAVE_GXX_BUILTIN_H
25218 #include <g++/builtin.h>
25219 #elif HAVE_GPP_BUILTIN_H
25220 #include <gpp/builtin.h>
25221 #elif HAVE_BUILTIN_H
25222 #include <builtin.h>
25223 #endif
25224
25225 #else
25226
25227 #if $cf_cv_header_stdbool_h
25228 #include <stdbool.h>
25229 #endif
25230
25231 #endif
25232
25233 int
25234 main (void)
25235 {
25236 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25237   ;
25238   return 0;
25239 }
25240 _ACEOF
25241 rm -f "conftest.$ac_objext"
25242 if { (eval echo "$as_me:25242: \"$ac_compile\"") >&5
25243   (eval $ac_compile) 2>&5
25244   ac_status=$?
25245   echo "$as_me:25245: \$? = $ac_status" >&5
25246   (exit "$ac_status"); } &&
25247          { ac_try='test -s "conftest.$ac_objext"'
25248   { (eval echo "$as_me:25248: \"$ac_try\"") >&5
25249   (eval $ac_try) 2>&5
25250   ac_status=$?
25251   echo "$as_me:25251: \$? = $ac_status" >&5
25252   (exit "$ac_status"); }; }; then
25253   ac_lo=$ac_mid; break
25254 else
25255   echo "$as_me: failed program was:" >&5
25256 cat "conftest.$ac_ext" >&5
25257 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25258 fi
25259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25260   done
25261 fi
25262 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25263 # Binary search between lo and hi bounds.
25264 while test "x$ac_lo" != "x$ac_hi"; do
25265   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25266   cat >"conftest.$ac_ext" <<_ACEOF
25267 #line 25267 "configure"
25268 #include "confdefs.h"
25269
25270 #include <stdlib.h>
25271 #include <stdio.h>
25272
25273 #if defined(__cplusplus)
25274
25275 #ifdef HAVE_GXX_BUILTIN_H
25276 #include <g++/builtin.h>
25277 #elif HAVE_GPP_BUILTIN_H
25278 #include <gpp/builtin.h>
25279 #elif HAVE_BUILTIN_H
25280 #include <builtin.h>
25281 #endif
25282
25283 #else
25284
25285 #if $cf_cv_header_stdbool_h
25286 #include <stdbool.h>
25287 #endif
25288
25289 #endif
25290
25291 int
25292 main (void)
25293 {
25294 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25295   ;
25296   return 0;
25297 }
25298 _ACEOF
25299 rm -f "conftest.$ac_objext"
25300 if { (eval echo "$as_me:25300: \"$ac_compile\"") >&5
25301   (eval $ac_compile) 2>&5
25302   ac_status=$?
25303   echo "$as_me:25303: \$? = $ac_status" >&5
25304   (exit "$ac_status"); } &&
25305          { ac_try='test -s "conftest.$ac_objext"'
25306   { (eval echo "$as_me:25306: \"$ac_try\"") >&5
25307   (eval $ac_try) 2>&5
25308   ac_status=$?
25309   echo "$as_me:25309: \$? = $ac_status" >&5
25310   (exit "$ac_status"); }; }; then
25311   ac_hi=$ac_mid
25312 else
25313   echo "$as_me: failed program was:" >&5
25314 cat "conftest.$ac_ext" >&5
25315 ac_lo=`expr "$ac_mid" + 1`
25316 fi
25317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25318 done
25319 ac_cv_sizeof_bool=$ac_lo
25320 else
25321   if test "$cross_compiling" = yes; then
25322   { { echo "$as_me:25322: error: cannot run test program while cross compiling" >&5
25323 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25324    { (exit 1); exit 1; }; }
25325 else
25326   cat >"conftest.$ac_ext" <<_ACEOF
25327 #line 25327 "configure"
25328 #include "confdefs.h"
25329
25330 #include <stdlib.h>
25331 #include <stdio.h>
25332
25333 #if defined(__cplusplus)
25334
25335 #ifdef HAVE_GXX_BUILTIN_H
25336 #include <g++/builtin.h>
25337 #elif HAVE_GPP_BUILTIN_H
25338 #include <gpp/builtin.h>
25339 #elif HAVE_BUILTIN_H
25340 #include <builtin.h>
25341 #endif
25342
25343 #else
25344
25345 #if $cf_cv_header_stdbool_h
25346 #include <stdbool.h>
25347 #endif
25348
25349 #endif
25350
25351 int
25352 main (void)
25353 {
25354 FILE *f = fopen ("conftest.val", "w");
25355 if (!f)
25356   $ac_main_return (1);
25357 fprintf (f, "%d", (sizeof (bool)));
25358 fclose (f);
25359   ;
25360   return 0;
25361 }
25362 _ACEOF
25363 rm -f "conftest$ac_exeext"
25364 if { (eval echo "$as_me:25364: \"$ac_link\"") >&5
25365   (eval $ac_link) 2>&5
25366   ac_status=$?
25367   echo "$as_me:25367: \$? = $ac_status" >&5
25368   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25369   { (eval echo "$as_me:25369: \"$ac_try\"") >&5
25370   (eval $ac_try) 2>&5
25371   ac_status=$?
25372   echo "$as_me:25372: \$? = $ac_status" >&5
25373   (exit "$ac_status"); }; }; then
25374   ac_cv_sizeof_bool=`cat conftest.val`
25375 else
25376   echo "$as_me: program exited with status $ac_status" >&5
25377 echo "$as_me: failed program was:" >&5
25378 cat "conftest.$ac_ext" >&5
25379 fi
25380 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25381 fi
25382 fi
25383 rm -f conftest.val
25384 else
25385   ac_cv_sizeof_bool=0
25386 fi
25387 fi
25388 echo "$as_me:25388: result: $ac_cv_sizeof_bool" >&5
25389 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25390 cat >>confdefs.h <<EOF
25391 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25392 EOF
25393
25394 echo "$as_me:25394: checking for type of bool" >&5
25395 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25396 if test "${cf_cv_type_of_bool+set}" = set; then
25397   echo $ECHO_N "(cached) $ECHO_C" >&6
25398 else
25399
25400         rm -f cf_test.out
25401         if test "$cross_compiling" = yes; then
25402
25403                 case x$ac_cv_sizeof_bool in
25404                 (x1) cf_cv_type_of_bool="unsigned char";;
25405                 (x2) cf_cv_type_of_bool="unsigned short";;
25406                 (x4) cf_cv_type_of_bool="unsigned int";;
25407                 (x8) cf_cv_type_of_bool="unsigned long";;
25408                 (*)  cf_cv_type_of_bool=unknown;;
25409                 esac
25410
25411 else
25412   cat >"conftest.$ac_ext" <<_ACEOF
25413 #line 25413 "configure"
25414 #include "confdefs.h"
25415
25416 #include <stdlib.h>
25417 #include <stdio.h>
25418
25419 #if defined(__cplusplus)
25420
25421 #ifdef HAVE_GXX_BUILTIN_H
25422 #include <g++/builtin.h>
25423 #elif HAVE_GPP_BUILTIN_H
25424 #include <gpp/builtin.h>
25425 #elif HAVE_BUILTIN_H
25426 #include <builtin.h>
25427 #endif
25428
25429 #else
25430
25431 #if $cf_cv_header_stdbool_h
25432 #include <stdbool.h>
25433 #endif
25434
25435 #endif
25436
25437 int main(void)
25438 {
25439         FILE *fp = fopen("cf_test.out", "w");
25440         if (fp != 0) {
25441                 bool x = true;
25442                 if ((bool)(-x) >= 0)
25443                         fputs("unsigned ", fp);
25444                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25445                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25446                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25447                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25448                 fclose(fp);
25449         }
25450         ${cf_cv_main_return:-return}(0);
25451 }
25452
25453 _ACEOF
25454 rm -f "conftest$ac_exeext"
25455 if { (eval echo "$as_me:25455: \"$ac_link\"") >&5
25456   (eval $ac_link) 2>&5
25457   ac_status=$?
25458   echo "$as_me:25458: \$? = $ac_status" >&5
25459   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25460   { (eval echo "$as_me:25460: \"$ac_try\"") >&5
25461   (eval $ac_try) 2>&5
25462   ac_status=$?
25463   echo "$as_me:25463: \$? = $ac_status" >&5
25464   (exit "$ac_status"); }; }; then
25465   cf_cv_type_of_bool=`cat cf_test.out`
25466                  if test -z "$cf_cv_type_of_bool"; then
25467                    cf_cv_type_of_bool=unknown
25468                  fi
25469 else
25470   echo "$as_me: program exited with status $ac_status" >&5
25471 echo "$as_me: failed program was:" >&5
25472 cat "conftest.$ac_ext" >&5
25473 cf_cv_type_of_bool=unknown
25474 fi
25475 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25476 fi
25477         rm -f cf_test.out
25478
25479 fi
25480 echo "$as_me:25480: result: $cf_cv_type_of_bool" >&5
25481 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25482
25483 if test "$cf_cv_type_of_bool" = unknown ; then
25484         case .$NCURSES_BOOL in
25485         (.auto|.) NCURSES_BOOL=unsigned;;
25486         esac
25487         { echo "$as_me:25487: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25488 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25489         cf_cv_type_of_bool=$NCURSES_BOOL
25490 fi
25491
25492 echo "$as_me:25492: checking for special defines needed for etip.h" >&5
25493 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25494 cf_save_CXXFLAGS="$CXXFLAGS"
25495 cf_result="none"
25496
25497 # etip.h includes ncurses.h which includes ncurses_dll.h
25498 # But ncurses_dll.h is generated - fix here.
25499 test -d include || mkdir include
25500 test -f include/ncurses_dll.h || sed -e 's/@NCURSES_WRAP_PREFIX@/'$NCURSES_WRAP_PREFIX'/g' "${srcdir}/include/ncurses_dll.h.in" >include/ncurses_dll.h
25501
25502 for cf_math in "" MATH_H
25503 do
25504 for cf_excp in "" MATH_EXCEPTION
25505 do
25506         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25507         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25508         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25509 cat >"conftest.$ac_ext" <<_ACEOF
25510 #line 25510 "configure"
25511 #include "confdefs.h"
25512
25513 #include <etip.h.in>
25514
25515 int
25516 main (void)
25517 {
25518
25519   ;
25520   return 0;
25521 }
25522 _ACEOF
25523 rm -f "conftest.$ac_objext"
25524 if { (eval echo "$as_me:25524: \"$ac_compile\"") >&5
25525   (eval $ac_compile) 2>&5
25526   ac_status=$?
25527   echo "$as_me:25527: \$? = $ac_status" >&5
25528   (exit "$ac_status"); } &&
25529          { ac_try='test -s "conftest.$ac_objext"'
25530   { (eval echo "$as_me:25530: \"$ac_try\"") >&5
25531   (eval $ac_try) 2>&5
25532   ac_status=$?
25533   echo "$as_me:25533: \$? = $ac_status" >&5
25534   (exit "$ac_status"); }; }; then
25535
25536         test -n "$cf_math" && cat >>confdefs.h <<EOF
25537 #define ETIP_NEEDS_${cf_math} 1
25538 EOF
25539
25540         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25541 #define ETIP_NEEDS_${cf_excp} 1
25542 EOF
25543
25544         cf_result="$cf_math $cf_excp"
25545         break 2
25546
25547 else
25548   echo "$as_me: failed program was:" >&5
25549 cat "conftest.$ac_ext" >&5
25550 fi
25551 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25552 done
25553 done
25554 echo "$as_me:25554: result: $cf_result" >&5
25555 echo "${ECHO_T}$cf_result" >&6
25556 CXXFLAGS="$cf_save_CXXFLAGS"
25557
25558 if test -n "$CXX"; then
25559 echo "$as_me:25559: checking if $CXX accepts parameter initialization" >&5
25560 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25561 if test "${cf_cv_cpp_param_init+set}" = set; then
25562   echo $ECHO_N "(cached) $ECHO_C" >&6
25563 else
25564
25565         ac_ext=cc
25566 ac_cpp='$CXXCPP $CPPFLAGS'
25567 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25568 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25569 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25570 ac_main_return="return"
25571
25572         if test "$cross_compiling" = yes; then
25573   cf_cv_cpp_param_init=unknown
25574 else
25575   cat >"conftest.$ac_ext" <<_ACEOF
25576 #line 25576 "configure"
25577 #include "confdefs.h"
25578
25579 class TEST {
25580 private:
25581         int value;
25582 public:
25583         TEST(int x = 1);
25584         ~TEST();
25585 };
25586
25587 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25588 {
25589         value = x;
25590 }
25591 int main(void) { }
25592
25593 _ACEOF
25594 rm -f "conftest$ac_exeext"
25595 if { (eval echo "$as_me:25595: \"$ac_link\"") >&5
25596   (eval $ac_link) 2>&5
25597   ac_status=$?
25598   echo "$as_me:25598: \$? = $ac_status" >&5
25599   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25600   { (eval echo "$as_me:25600: \"$ac_try\"") >&5
25601   (eval $ac_try) 2>&5
25602   ac_status=$?
25603   echo "$as_me:25603: \$? = $ac_status" >&5
25604   (exit "$ac_status"); }; }; then
25605   cf_cv_cpp_param_init=yes
25606 else
25607   echo "$as_me: program exited with status $ac_status" >&5
25608 echo "$as_me: failed program was:" >&5
25609 cat "conftest.$ac_ext" >&5
25610 cf_cv_cpp_param_init=no
25611 fi
25612 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25613 fi
25614         ac_ext=cc
25615 ac_cpp='$CXXCPP $CPPFLAGS'
25616 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25617 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25618 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25619 ac_main_return="return"
25620
25621 fi
25622 echo "$as_me:25622: result: $cf_cv_cpp_param_init" >&5
25623 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25624 fi
25625 test "$cf_cv_cpp_param_init" = yes &&
25626 cat >>confdefs.h <<\EOF
25627 #define CPP_HAS_PARAM_INIT 1
25628 EOF
25629
25630 if test -n "$CXX"; then
25631
25632 echo "$as_me:25632: checking if $CXX accepts static_cast" >&5
25633 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25634 if test "${cf_cv_cpp_static_cast+set}" = set; then
25635   echo $ECHO_N "(cached) $ECHO_C" >&6
25636 else
25637
25638         ac_ext=cc
25639 ac_cpp='$CXXCPP $CPPFLAGS'
25640 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25641 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25642 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25643 ac_main_return="return"
25644
25645         cat >"conftest.$ac_ext" <<_ACEOF
25646 #line 25646 "configure"
25647 #include "confdefs.h"
25648
25649 class NCursesPanel
25650 {
25651 public:
25652   NCursesPanel(int nlines,
25653                int ncols,
25654                int begin_y = 0,
25655                int begin_x = 0)
25656   {
25657   }
25658   NCursesPanel();
25659   ~NCursesPanel();
25660 };
25661
25662 template<class T> class NCursesUserPanel : public NCursesPanel
25663 {
25664 public:
25665   NCursesUserPanel (int nlines,
25666                     int ncols,
25667                     int begin_y = 0,
25668                     int begin_x = 0,
25669                     const T* p_UserData = static_cast<T*>(0))
25670     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25671   {
25672   };
25673   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25674   {
25675   };
25676
25677   virtual ~NCursesUserPanel() {};
25678 };
25679
25680 int
25681 main (void)
25682 {
25683
25684         const char* p_UserData = static_cast<char*>(0)
25685   ;
25686   return 0;
25687 }
25688 _ACEOF
25689 rm -f "conftest.$ac_objext"
25690 if { (eval echo "$as_me:25690: \"$ac_compile\"") >&5
25691   (eval $ac_compile) 2>&5
25692   ac_status=$?
25693   echo "$as_me:25693: \$? = $ac_status" >&5
25694   (exit "$ac_status"); } &&
25695          { ac_try='test -s "conftest.$ac_objext"'
25696   { (eval echo "$as_me:25696: \"$ac_try\"") >&5
25697   (eval $ac_try) 2>&5
25698   ac_status=$?
25699   echo "$as_me:25699: \$? = $ac_status" >&5
25700   (exit "$ac_status"); }; }; then
25701   cf_cv_cpp_static_cast=yes
25702 else
25703   echo "$as_me: failed program was:" >&5
25704 cat "conftest.$ac_ext" >&5
25705 cf_cv_cpp_static_cast=no
25706 fi
25707 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25708
25709         ac_ext=cc
25710 ac_cpp='$CXXCPP $CPPFLAGS'
25711 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25712 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25713 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25714 ac_main_return="return"
25715
25716 fi
25717 echo "$as_me:25717: result: $cf_cv_cpp_static_cast" >&5
25718 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25719
25720 fi
25721
25722 test "$cf_cv_cpp_static_cast" = yes &&
25723 cat >>confdefs.h <<\EOF
25724 #define CPP_HAS_STATIC_CAST 1
25725 EOF
25726
25727         CXX_AR='$(AR)'
25728         CXX_ARFLAGS='$(ARFLAGS)'
25729         case "$cf_cv_system_name" in
25730         (irix*)
25731             if test "$GXX" != yes ; then
25732                 CXX_AR='$(CXX)'
25733                 CXX_ARFLAGS='-ar -o'
25734             fi
25735             ;;
25736         (sco3.2v5*)
25737             CXXLDFLAGS="-u main"
25738             ;;
25739         (solaris2*)
25740             if test "$GXX" != yes ; then
25741                 CXX_AR='$(CXX)'
25742                 CXX_ARFLAGS='-xar -o'
25743             fi
25744             ;;
25745         esac
25746
25747 else
25748         cf_cxx_library=no
25749         cf_cv_builtin_bool=1
25750
25751         # Just because we are not configuring against C++ right now does not
25752         # mean that a user will not want to use C++.  Some distributors disable
25753         # the C++ portion of this configuration as a shortcut (or just to avoid
25754         # compiling the demo in the c++ directory).  So we need a reasonable
25755         # default for the 'bool' type.
25756         #
25757         # Caveat: since the storage of the bool type is not standardized, it
25758         # may change.
25759
25760         if test "$NCURSES_BOOL" != auto ; then
25761                 cf_cv_type_of_bool=$NCURSES_BOOL
25762                 cf_cv_header_stdbool_h=0
25763         else
25764                 if test "$cf_cv_header_stdbool_h" = 1 ; then
25765
25766 echo "$as_me:25766: checking for bool" >&5
25767 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25768 if test "${ac_cv_type_bool+set}" = set; then
25769   echo $ECHO_N "(cached) $ECHO_C" >&6
25770 else
25771   cat >"conftest.$ac_ext" <<_ACEOF
25772 #line 25772 "configure"
25773 #include "confdefs.h"
25774
25775 #include <stdlib.h>
25776 #include <stdio.h>
25777
25778 #if defined(__cplusplus)
25779
25780 #ifdef HAVE_GXX_BUILTIN_H
25781 #include <g++/builtin.h>
25782 #elif HAVE_GPP_BUILTIN_H
25783 #include <gpp/builtin.h>
25784 #elif HAVE_BUILTIN_H
25785 #include <builtin.h>
25786 #endif
25787
25788 #else
25789
25790 #if $cf_cv_header_stdbool_h
25791 #include <stdbool.h>
25792 #endif
25793
25794 #endif
25795
25796 int
25797 main (void)
25798 {
25799 if ((bool *) 0)
25800   return 0;
25801 if (sizeof (bool))
25802   return 0;
25803   ;
25804   return 0;
25805 }
25806 _ACEOF
25807 rm -f "conftest.$ac_objext"
25808 if { (eval echo "$as_me:25808: \"$ac_compile\"") >&5
25809   (eval $ac_compile) 2>&5
25810   ac_status=$?
25811   echo "$as_me:25811: \$? = $ac_status" >&5
25812   (exit "$ac_status"); } &&
25813          { ac_try='test -s "conftest.$ac_objext"'
25814   { (eval echo "$as_me:25814: \"$ac_try\"") >&5
25815   (eval $ac_try) 2>&5
25816   ac_status=$?
25817   echo "$as_me:25817: \$? = $ac_status" >&5
25818   (exit "$ac_status"); }; }; then
25819   ac_cv_type_bool=yes
25820 else
25821   echo "$as_me: failed program was:" >&5
25822 cat "conftest.$ac_ext" >&5
25823 ac_cv_type_bool=no
25824 fi
25825 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25826 fi
25827 echo "$as_me:25827: result: $ac_cv_type_bool" >&5
25828 echo "${ECHO_T}$ac_cv_type_bool" >&6
25829
25830 echo "$as_me:25830: checking size of bool" >&5
25831 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25832 if test "${ac_cv_sizeof_bool+set}" = set; then
25833   echo $ECHO_N "(cached) $ECHO_C" >&6
25834 else
25835   if test "$ac_cv_type_bool" = yes; then
25836   if test "$cross_compiling" = yes; then
25837   # Depending upon the size, compute the lo and hi bounds.
25838 cat >"conftest.$ac_ext" <<_ACEOF
25839 #line 25839 "configure"
25840 #include "confdefs.h"
25841
25842 #include <stdlib.h>
25843 #include <stdio.h>
25844
25845 #if defined(__cplusplus)
25846
25847 #ifdef HAVE_GXX_BUILTIN_H
25848 #include <g++/builtin.h>
25849 #elif HAVE_GPP_BUILTIN_H
25850 #include <gpp/builtin.h>
25851 #elif HAVE_BUILTIN_H
25852 #include <builtin.h>
25853 #endif
25854
25855 #else
25856
25857 #if $cf_cv_header_stdbool_h
25858 #include <stdbool.h>
25859 #endif
25860
25861 #endif
25862
25863 int
25864 main (void)
25865 {
25866 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25867   ;
25868   return 0;
25869 }
25870 _ACEOF
25871 rm -f "conftest.$ac_objext"
25872 if { (eval echo "$as_me:25872: \"$ac_compile\"") >&5
25873   (eval $ac_compile) 2>&5
25874   ac_status=$?
25875   echo "$as_me:25875: \$? = $ac_status" >&5
25876   (exit "$ac_status"); } &&
25877          { ac_try='test -s "conftest.$ac_objext"'
25878   { (eval echo "$as_me:25878: \"$ac_try\"") >&5
25879   (eval $ac_try) 2>&5
25880   ac_status=$?
25881   echo "$as_me:25881: \$? = $ac_status" >&5
25882   (exit "$ac_status"); }; }; then
25883   ac_lo=0 ac_mid=0
25884   while :; do
25885     cat >"conftest.$ac_ext" <<_ACEOF
25886 #line 25886 "configure"
25887 #include "confdefs.h"
25888
25889 #include <stdlib.h>
25890 #include <stdio.h>
25891
25892 #if defined(__cplusplus)
25893
25894 #ifdef HAVE_GXX_BUILTIN_H
25895 #include <g++/builtin.h>
25896 #elif HAVE_GPP_BUILTIN_H
25897 #include <gpp/builtin.h>
25898 #elif HAVE_BUILTIN_H
25899 #include <builtin.h>
25900 #endif
25901
25902 #else
25903
25904 #if $cf_cv_header_stdbool_h
25905 #include <stdbool.h>
25906 #endif
25907
25908 #endif
25909
25910 int
25911 main (void)
25912 {
25913 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25914   ;
25915   return 0;
25916 }
25917 _ACEOF
25918 rm -f "conftest.$ac_objext"
25919 if { (eval echo "$as_me:25919: \"$ac_compile\"") >&5
25920   (eval $ac_compile) 2>&5
25921   ac_status=$?
25922   echo "$as_me:25922: \$? = $ac_status" >&5
25923   (exit "$ac_status"); } &&
25924          { ac_try='test -s "conftest.$ac_objext"'
25925   { (eval echo "$as_me:25925: \"$ac_try\"") >&5
25926   (eval $ac_try) 2>&5
25927   ac_status=$?
25928   echo "$as_me:25928: \$? = $ac_status" >&5
25929   (exit "$ac_status"); }; }; then
25930   ac_hi=$ac_mid; break
25931 else
25932   echo "$as_me: failed program was:" >&5
25933 cat "conftest.$ac_ext" >&5
25934 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25935 fi
25936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25937   done
25938 else
25939   echo "$as_me: failed program was:" >&5
25940 cat "conftest.$ac_ext" >&5
25941 ac_hi=-1 ac_mid=-1
25942   while :; do
25943     cat >"conftest.$ac_ext" <<_ACEOF
25944 #line 25944 "configure"
25945 #include "confdefs.h"
25946
25947 #include <stdlib.h>
25948 #include <stdio.h>
25949
25950 #if defined(__cplusplus)
25951
25952 #ifdef HAVE_GXX_BUILTIN_H
25953 #include <g++/builtin.h>
25954 #elif HAVE_GPP_BUILTIN_H
25955 #include <gpp/builtin.h>
25956 #elif HAVE_BUILTIN_H
25957 #include <builtin.h>
25958 #endif
25959
25960 #else
25961
25962 #if $cf_cv_header_stdbool_h
25963 #include <stdbool.h>
25964 #endif
25965
25966 #endif
25967
25968 int
25969 main (void)
25970 {
25971 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25972   ;
25973   return 0;
25974 }
25975 _ACEOF
25976 rm -f "conftest.$ac_objext"
25977 if { (eval echo "$as_me:25977: \"$ac_compile\"") >&5
25978   (eval $ac_compile) 2>&5
25979   ac_status=$?
25980   echo "$as_me:25980: \$? = $ac_status" >&5
25981   (exit "$ac_status"); } &&
25982          { ac_try='test -s "conftest.$ac_objext"'
25983   { (eval echo "$as_me:25983: \"$ac_try\"") >&5
25984   (eval $ac_try) 2>&5
25985   ac_status=$?
25986   echo "$as_me:25986: \$? = $ac_status" >&5
25987   (exit "$ac_status"); }; }; then
25988   ac_lo=$ac_mid; break
25989 else
25990   echo "$as_me: failed program was:" >&5
25991 cat "conftest.$ac_ext" >&5
25992 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25993 fi
25994 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25995   done
25996 fi
25997 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25998 # Binary search between lo and hi bounds.
25999 while test "x$ac_lo" != "x$ac_hi"; do
26000   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26001   cat >"conftest.$ac_ext" <<_ACEOF
26002 #line 26002 "configure"
26003 #include "confdefs.h"
26004
26005 #include <stdlib.h>
26006 #include <stdio.h>
26007
26008 #if defined(__cplusplus)
26009
26010 #ifdef HAVE_GXX_BUILTIN_H
26011 #include <g++/builtin.h>
26012 #elif HAVE_GPP_BUILTIN_H
26013 #include <gpp/builtin.h>
26014 #elif HAVE_BUILTIN_H
26015 #include <builtin.h>
26016 #endif
26017
26018 #else
26019
26020 #if $cf_cv_header_stdbool_h
26021 #include <stdbool.h>
26022 #endif
26023
26024 #endif
26025
26026 int
26027 main (void)
26028 {
26029 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26030   ;
26031   return 0;
26032 }
26033 _ACEOF
26034 rm -f "conftest.$ac_objext"
26035 if { (eval echo "$as_me:26035: \"$ac_compile\"") >&5
26036   (eval $ac_compile) 2>&5
26037   ac_status=$?
26038   echo "$as_me:26038: \$? = $ac_status" >&5
26039   (exit "$ac_status"); } &&
26040          { ac_try='test -s "conftest.$ac_objext"'
26041   { (eval echo "$as_me:26041: \"$ac_try\"") >&5
26042   (eval $ac_try) 2>&5
26043   ac_status=$?
26044   echo "$as_me:26044: \$? = $ac_status" >&5
26045   (exit "$ac_status"); }; }; then
26046   ac_hi=$ac_mid
26047 else
26048   echo "$as_me: failed program was:" >&5
26049 cat "conftest.$ac_ext" >&5
26050 ac_lo=`expr "$ac_mid" + 1`
26051 fi
26052 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26053 done
26054 ac_cv_sizeof_bool=$ac_lo
26055 else
26056   if test "$cross_compiling" = yes; then
26057   { { echo "$as_me:26057: error: cannot run test program while cross compiling" >&5
26058 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26059    { (exit 1); exit 1; }; }
26060 else
26061   cat >"conftest.$ac_ext" <<_ACEOF
26062 #line 26062 "configure"
26063 #include "confdefs.h"
26064
26065 #include <stdlib.h>
26066 #include <stdio.h>
26067
26068 #if defined(__cplusplus)
26069
26070 #ifdef HAVE_GXX_BUILTIN_H
26071 #include <g++/builtin.h>
26072 #elif HAVE_GPP_BUILTIN_H
26073 #include <gpp/builtin.h>
26074 #elif HAVE_BUILTIN_H
26075 #include <builtin.h>
26076 #endif
26077
26078 #else
26079
26080 #if $cf_cv_header_stdbool_h
26081 #include <stdbool.h>
26082 #endif
26083
26084 #endif
26085
26086 int
26087 main (void)
26088 {
26089 FILE *f = fopen ("conftest.val", "w");
26090 if (!f)
26091   $ac_main_return (1);
26092 fprintf (f, "%d", (sizeof (bool)));
26093 fclose (f);
26094   ;
26095   return 0;
26096 }
26097 _ACEOF
26098 rm -f "conftest$ac_exeext"
26099 if { (eval echo "$as_me:26099: \"$ac_link\"") >&5
26100   (eval $ac_link) 2>&5
26101   ac_status=$?
26102   echo "$as_me:26102: \$? = $ac_status" >&5
26103   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26104   { (eval echo "$as_me:26104: \"$ac_try\"") >&5
26105   (eval $ac_try) 2>&5
26106   ac_status=$?
26107   echo "$as_me:26107: \$? = $ac_status" >&5
26108   (exit "$ac_status"); }; }; then
26109   ac_cv_sizeof_bool=`cat conftest.val`
26110 else
26111   echo "$as_me: program exited with status $ac_status" >&5
26112 echo "$as_me: failed program was:" >&5
26113 cat "conftest.$ac_ext" >&5
26114 fi
26115 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26116 fi
26117 fi
26118 rm -f conftest.val
26119 else
26120   ac_cv_sizeof_bool=0
26121 fi
26122 fi
26123 echo "$as_me:26123: result: $ac_cv_sizeof_bool" >&5
26124 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26125 cat >>confdefs.h <<EOF
26126 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26127 EOF
26128
26129 echo "$as_me:26129: checking for type of bool" >&5
26130 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26131 if test "${cf_cv_type_of_bool+set}" = set; then
26132   echo $ECHO_N "(cached) $ECHO_C" >&6
26133 else
26134
26135         rm -f cf_test.out
26136         if test "$cross_compiling" = yes; then
26137
26138                 case x$ac_cv_sizeof_bool in
26139                 (x1) cf_cv_type_of_bool="unsigned char";;
26140                 (x2) cf_cv_type_of_bool="unsigned short";;
26141                 (x4) cf_cv_type_of_bool="unsigned int";;
26142                 (x8) cf_cv_type_of_bool="unsigned long";;
26143                 (*)  cf_cv_type_of_bool=unknown;;
26144                 esac
26145
26146 else
26147   cat >"conftest.$ac_ext" <<_ACEOF
26148 #line 26148 "configure"
26149 #include "confdefs.h"
26150
26151 #include <stdlib.h>
26152 #include <stdio.h>
26153
26154 #if defined(__cplusplus)
26155
26156 #ifdef HAVE_GXX_BUILTIN_H
26157 #include <g++/builtin.h>
26158 #elif HAVE_GPP_BUILTIN_H
26159 #include <gpp/builtin.h>
26160 #elif HAVE_BUILTIN_H
26161 #include <builtin.h>
26162 #endif
26163
26164 #else
26165
26166 #if $cf_cv_header_stdbool_h
26167 #include <stdbool.h>
26168 #endif
26169
26170 #endif
26171
26172 int main(void)
26173 {
26174         FILE *fp = fopen("cf_test.out", "w");
26175         if (fp != 0) {
26176                 bool x = true;
26177                 if ((bool)(-x) >= 0)
26178                         fputs("unsigned ", fp);
26179                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26180                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26181                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26182                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26183                 fclose(fp);
26184         }
26185         ${cf_cv_main_return:-return}(0);
26186 }
26187
26188 _ACEOF
26189 rm -f "conftest$ac_exeext"
26190 if { (eval echo "$as_me:26190: \"$ac_link\"") >&5
26191   (eval $ac_link) 2>&5
26192   ac_status=$?
26193   echo "$as_me:26193: \$? = $ac_status" >&5
26194   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26195   { (eval echo "$as_me:26195: \"$ac_try\"") >&5
26196   (eval $ac_try) 2>&5
26197   ac_status=$?
26198   echo "$as_me:26198: \$? = $ac_status" >&5
26199   (exit "$ac_status"); }; }; then
26200   cf_cv_type_of_bool=`cat cf_test.out`
26201                  if test -z "$cf_cv_type_of_bool"; then
26202                    cf_cv_type_of_bool=unknown
26203                  fi
26204 else
26205   echo "$as_me: program exited with status $ac_status" >&5
26206 echo "$as_me: failed program was:" >&5
26207 cat "conftest.$ac_ext" >&5
26208 cf_cv_type_of_bool=unknown
26209 fi
26210 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26211 fi
26212         rm -f cf_test.out
26213
26214 fi
26215 echo "$as_me:26215: result: $cf_cv_type_of_bool" >&5
26216 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26217
26218 if test "$cf_cv_type_of_bool" = unknown ; then
26219         case .$NCURSES_BOOL in
26220         (.auto|.) NCURSES_BOOL=unsigned;;
26221         esac
26222         { echo "$as_me:26222: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26223 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26224         cf_cv_type_of_bool=$NCURSES_BOOL
26225 fi
26226
26227                 else
26228                         echo "$as_me:26228: checking for fallback type of bool" >&5
26229 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26230                         case "$host_cpu" in
26231                         (i?86)  cf_cv_type_of_bool=char ;;
26232                         (*)     cf_cv_type_of_bool=int  ;;
26233                         esac
26234                         echo "$as_me:26234: result: $cf_cv_type_of_bool" >&5
26235 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26236                 fi
26237         fi
26238 fi
26239
26240 # If the C compiler did not declare bool, and we did not determine that the C++
26241 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26242 # ncurses library use the same type as C++ bool.  Note that this allows one to
26243 # specify the type of bool in a configure-script option and postpone
26244 # integration with the C++ compiler provided that the types are compatible.
26245 USE_CXX_BOOL=1
26246 if test "$cf_cv_cc_bool_type" = 1
26247 then
26248         # oops: C has a bool.  Unlikely, but C++ could differ.
26249         USE_CXX_BOOL=0
26250 elif test "$cf_cv_builtin_bool" = 0
26251 then
26252         # C++ has no bool
26253         USE_CXX_BOOL=0
26254 else
26255         # this is the normal case
26256         USE_CXX_BOOL='defined(__cplusplus)'
26257 fi
26258
26259 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26260
26261         if test "$cf_with_ada" != "no" ; then
26262                 if test "$with_libtool" != "no"; then
26263                         { echo "$as_me:26263: WARNING: libtool does not support Ada - disabling feature" >&5
26264 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26265                         cf_with_ada=no
26266                 fi
26267         fi
26268
26269         if test "$cf_with_ada" != "no" ; then
26270
26271 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26272 do
26273
26274 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26275
26276         unset ac_cv_path_cf_TEMP_gnat
26277         unset cf_TEMP_gnat
26278         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26279 set dummy $cf_prog_gnat; ac_word=$2
26280 echo "$as_me:26280: checking for $ac_word" >&5
26281 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26282 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26283   echo $ECHO_N "(cached) $ECHO_C" >&6
26284 else
26285   case $cf_TEMP_gnat in
26286   [\\/]* | ?:[\\/]*)
26287   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26288   ;;
26289   *)
26290   ac_save_IFS=$IFS; IFS=$ac_path_separator
26291 ac_dummy="$PATH"
26292 for ac_dir in $ac_dummy; do
26293   IFS=$ac_save_IFS
26294   test -z "$ac_dir" && ac_dir=.
26295   if $as_executable_p "$ac_dir/$ac_word"; then
26296    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26297    echo "$as_me:26297: found $ac_dir/$ac_word" >&5
26298    break
26299 fi
26300 done
26301
26302   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26303   ;;
26304 esac
26305 fi
26306 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26307
26308 if test -n "$cf_TEMP_gnat"; then
26309   echo "$as_me:26309: result: $cf_TEMP_gnat" >&5
26310 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26311 else
26312   echo "$as_me:26312: result: no" >&5
26313 echo "${ECHO_T}no" >&6
26314 fi
26315
26316         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26317
26318         if test "x$cf_TEMP_gnat" != xno; then
26319                 unset cf_cv_gnat_version
26320                 unset cf_TEMP_gnat
26321
26322 echo "$as_me:26322: checking for $cf_prog_gnat version" >&5
26323 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26324 if test "${cf_cv_gnat_version+set}" = set; then
26325   echo $ECHO_N "(cached) $ECHO_C" >&6
26326 else
26327
26328 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26329         grep '[0-9].[0-9][0-9]*' |\
26330         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26331
26332 fi
26333 echo "$as_me:26333: result: $cf_cv_gnat_version" >&5
26334 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26335 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26336 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26337
26338         fi
26339         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26340
26341         unset cf_TEMP_gnat
26342         unset cf_cv_gnat_version
26343         unset ac_cv_path_cf_TEMP_gnat
26344 done
26345
26346 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26347         cf_ada_make=
26348         cf_cv_prog_gnat_correct=no
26349 else
26350         cf_ada_make=gnatmake
26351         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26352                 # gprconfig is newer than gnatmake; we can continue...
26353                 cf_ada_config="##"
26354         else
26355                 rm -rf ./conftest* ./*~conftest*
26356                 if mkdir conftest.src
26357                 then
26358                         cf_ada_config=""
26359                         cd conftest.src
26360                         for cf_gprconfig in Ada C
26361                         do
26362                                 echo "$as_me:26362: checking for gprconfig name for $cf_gprconfig" >&5
26363 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26364                                 if test "$cf_gprconfig" = C
26365                                 then
26366                                         for cf_gprconfig_param in \
26367                                                 "$cf_gprconfig,,,,GNATGCC" \
26368                                                 "$cf_gprconfig,,,,GCC" \
26369                                                 "$cf_gprconfig"
26370                                         do
26371                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26372                                                 test -n "$cf_gprconfig_value" && break
26373                                         done
26374                                 else
26375                                         cf_gprconfig_param=$cf_gprconfig
26376                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26377                                 fi
26378                                 if test -n "$cf_gprconfig_value"
26379                                 then
26380                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26381                                         echo "$as_me:26381: result: $cf_gprconfig_value" >&5
26382 echo "${ECHO_T}$cf_gprconfig_value" >&6
26383                                 else
26384                                         echo "$as_me:26384: result: missing" >&5
26385 echo "${ECHO_T}missing" >&6
26386                                         cf_ada_config="#"
26387                                         break
26388                                 fi
26389                         done
26390                         cd ..
26391                         rm -rf ./conftest* ./*~conftest*
26392                 fi
26393         fi
26394         if test "x$cf_ada_config" != "x#"
26395         then
26396
26397 echo "$as_me:26397: checking for gnat version" >&5
26398 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26399 if test "${cf_cv_gnat_version+set}" = set; then
26400   echo $ECHO_N "(cached) $ECHO_C" >&6
26401 else
26402
26403 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26404         grep '[0-9].[0-9][0-9]*' |\
26405         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26406
26407 fi
26408 echo "$as_me:26408: result: $cf_cv_gnat_version" >&5
26409 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26410 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26411
26412 case "$cf_cv_gnat_version" in
26413 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26414         cf_cv_prog_gnat_correct=yes
26415         ;;
26416 (*)
26417         { echo "$as_me:26417: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26418 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26419         cf_cv_prog_gnat_correct=no
26420         ;;
26421 esac
26422
26423                 # Extract the first word of "m4", so it can be a program name with args.
26424 set dummy m4; ac_word=$2
26425 echo "$as_me:26425: checking for $ac_word" >&5
26426 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26427 if test "${ac_cv_prog_M4_exists+set}" = set; then
26428   echo $ECHO_N "(cached) $ECHO_C" >&6
26429 else
26430   if test -n "$M4_exists"; then
26431   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26432 else
26433   ac_save_IFS=$IFS; IFS=$ac_path_separator
26434 ac_dummy="$PATH"
26435 for ac_dir in $ac_dummy; do
26436   IFS=$ac_save_IFS
26437   test -z "$ac_dir" && ac_dir=.
26438   $as_executable_p "$ac_dir/$ac_word" || continue
26439 ac_cv_prog_M4_exists="yes"
26440 echo "$as_me:26440: found $ac_dir/$ac_word" >&5
26441 break
26442 done
26443
26444   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26445 fi
26446 fi
26447 M4_exists=$ac_cv_prog_M4_exists
26448 if test -n "$M4_exists"; then
26449   echo "$as_me:26449: result: $M4_exists" >&5
26450 echo "${ECHO_T}$M4_exists" >&6
26451 else
26452   echo "$as_me:26452: result: no" >&5
26453 echo "${ECHO_T}no" >&6
26454 fi
26455
26456                 if test "$ac_cv_prog_M4_exists" = no; then
26457                         cf_cv_prog_gnat_correct=no
26458                         { echo "$as_me:26458: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26459 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26460                 fi
26461                 if test "$cf_cv_prog_gnat_correct" = yes; then
26462                         echo "$as_me:26462: checking if GNAT works" >&5
26463 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26464
26465 rm -rf ./conftest* ./*~conftest*
26466 cat >>conftest.ads <<CF_EOF
26467 procedure conftest;
26468 CF_EOF
26469 cat >>conftest.adb <<CF_EOF
26470 with Text_IO;
26471 with GNAT.OS_Lib;
26472 procedure conftest is
26473 begin
26474    Text_IO.Put ("Hello World");
26475    Text_IO.New_Line;
26476    GNAT.OS_Lib.OS_Exit (0);
26477 end conftest;
26478 CF_EOF
26479 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26480    if ( ./conftest 1>&5 2>&1 ) ; then
26481       cf_cv_prog_gnat_correct=yes
26482    else
26483       cf_cv_prog_gnat_correct=no
26484    fi
26485 else
26486    cf_cv_prog_gnat_correct=no
26487 fi
26488 rm -rf ./conftest* ./*~conftest*
26489
26490                         echo "$as_me:26490: result: $cf_cv_prog_gnat_correct" >&5
26491 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26492                 fi
26493         else
26494                 cf_cv_prog_gnat_correct=no
26495         fi
26496 fi
26497
26498                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26499
26500         ADAFLAGS="$ADAFLAGS -gnatpn"
26501
26502         echo "$as_me:26502: checking optimization options for ADAFLAGS" >&5
26503 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26504         case "$CFLAGS" in
26505         (*-g*)
26506
26507         ADAFLAGS="$ADAFLAGS -g"
26508
26509                 ;;
26510         esac
26511         case "$CFLAGS" in
26512         (*-O*)
26513                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26514
26515         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26516
26517                 ;;
26518         esac
26519         echo "$as_me:26519: result: $ADAFLAGS" >&5
26520 echo "${ECHO_T}$ADAFLAGS" >&6
26521
26522 echo "$as_me:26522: checking if GNATPREP supports -T option" >&5
26523 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26524 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26525   echo $ECHO_N "(cached) $ECHO_C" >&6
26526 else
26527
26528 cf_cv_gnatprep_opt_t=no
26529 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26530
26531 fi
26532 echo "$as_me:26532: result: $cf_cv_gnatprep_opt_t" >&5
26533 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26534 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26535
26536 echo "$as_me:26536: checking if GNAT supports generics" >&5
26537 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26538 case "$cf_cv_gnat_version" in
26539 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26540         cf_gnat_generics=yes
26541         ;;
26542 (*)
26543         cf_gnat_generics=no
26544         ;;
26545 esac
26546 echo "$as_me:26546: result: $cf_gnat_generics" >&5
26547 echo "${ECHO_T}$cf_gnat_generics" >&6
26548
26549 if test "$cf_gnat_generics" = yes
26550 then
26551         cf_compile_generics=generics
26552         cf_generic_objects="\${GENOBJS}"
26553 else
26554         cf_compile_generics=
26555         cf_generic_objects=
26556 fi
26557
26558 echo "$as_me:26558: checking if GNAT supports SIGINT" >&5
26559 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26560 if test "${cf_cv_gnat_sigint+set}" = set; then
26561   echo $ECHO_N "(cached) $ECHO_C" >&6
26562 else
26563
26564 rm -rf ./conftest* ./*~conftest*
26565 cat >>conftest.ads <<CF_EOF
26566 with Ada.Interrupts.Names;
26567
26568 package ConfTest is
26569
26570    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26571    pragma Unreserve_All_Interrupts;
26572    pragma Warnings (On);
26573
26574    protected Process is
26575       procedure Stop;
26576       function Continue return Boolean;
26577       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26578    private
26579       Done : Boolean := False;
26580    end Process;
26581
26582 end ConfTest;
26583 CF_EOF
26584 cat >>conftest.adb <<CF_EOF
26585 package body ConfTest is
26586    protected body Process is
26587       procedure Stop is
26588       begin
26589          Done := True;
26590       end Stop;
26591       function Continue return Boolean is
26592       begin
26593          return not Done;
26594       end Continue;
26595    end Process;
26596 end ConfTest;
26597 CF_EOF
26598 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26599       cf_cv_gnat_sigint=yes
26600 else
26601    cf_cv_gnat_sigint=no
26602 fi
26603 rm -rf ./conftest* ./*~conftest*
26604
26605 fi
26606 echo "$as_me:26606: result: $cf_cv_gnat_sigint" >&5
26607 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26608
26609 if test "$cf_cv_gnat_sigint" = yes ; then
26610         USE_GNAT_SIGINT=""
26611 else
26612         USE_GNAT_SIGINT="#"
26613 fi
26614
26615 cf_gnat_libraries=no
26616 cf_gnat_projects=no
26617
26618 if test "$enable_gnat_projects" != no ; then
26619 echo "$as_me:26619: checking if GNAT supports project files" >&5
26620 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26621 case "$cf_cv_gnat_version" in
26622 (3.[0-9]*)
26623         ;;
26624 (*)
26625         case "$cf_cv_system_name" in
26626         (cygwin*|msys*)
26627                 ;;
26628         (*)
26629                 rm -rf ./conftest* ./*~conftest*
26630                 if mkdir conftest.src conftest.bin conftest.lib
26631                 then
26632                         cd conftest.src
26633                         rm -rf ./conftest* ./*~conftest*
26634                         cat >>library.gpr <<CF_EOF
26635 project Library is
26636   Kind := External ("LIB_KIND");
26637   for Library_Name use "ConfTest";
26638   for Object_Dir use ".";
26639   for Library_ALI_Dir use External("LIBRARY_DIR");
26640   for Library_Version use External ("SONAME");
26641   for Library_Kind use Kind;
26642   for Library_Dir use External("BUILD_DIR");
26643   Source_Dir := External ("SOURCE_DIR");
26644   for Source_Dirs use (Source_Dir);
26645 end Library;
26646 CF_EOF
26647                         cat >>confpackage.ads <<CF_EOF
26648 package ConfPackage is
26649    procedure conftest;
26650 end ConfPackage;
26651 CF_EOF
26652                         cat >>confpackage.adb <<CF_EOF
26653 with Text_IO;
26654 package body ConfPackage is
26655    procedure conftest is
26656    begin
26657       Text_IO.Put ("Hello World");
26658       Text_IO.New_Line;
26659    end conftest;
26660 end ConfPackage;
26661 CF_EOF
26662                         if ( "$cf_ada_make" $ADAFLAGS \
26663                                         -Plibrary.gpr \
26664                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
26665                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
26666                                         -XSOURCE_DIR="`pwd`" \
26667                                         -XSONAME=libConfTest.so.1 \
26668                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26669                                 cf_gnat_projects=yes
26670                         fi
26671                         cd ..
26672                 fi
26673                 if test -f conftest.lib/confpackage.ali
26674                 then
26675                         cf_gnat_libraries=yes
26676                 fi
26677                 rm -rf ./conftest* ./*~conftest*
26678                 ;;
26679         esac
26680         ;;
26681 esac
26682 echo "$as_me:26682: result: $cf_gnat_projects" >&5
26683 echo "${ECHO_T}$cf_gnat_projects" >&6
26684 fi # enable_gnat_projects
26685
26686 if test "$cf_gnat_projects" = yes
26687 then
26688         echo "$as_me:26688: checking if GNAT supports libraries" >&5
26689 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26690         echo "$as_me:26690: result: $cf_gnat_libraries" >&5
26691 echo "${ECHO_T}$cf_gnat_libraries" >&6
26692 fi
26693
26694 USE_OLD_MAKERULES=""
26695 USE_GNAT_PROJECTS="#"
26696 USE_GNAT_MAKE_GPR="#"
26697 USE_GNAT_GPRBUILD="#"
26698
26699 if test "$cf_gnat_projects" = yes
26700 then
26701         USE_OLD_MAKERULES="#"
26702         USE_GNAT_PROJECTS=""
26703         if test "$cf_cv_VERSION_GPRBUILD" != no
26704         then
26705                 USE_GNAT_GPRBUILD=""
26706         elif test "$cf_cv_VERSION_GNATMAKE" != no
26707         then
26708                 USE_GNAT_MAKE_GPR=""
26709         else
26710                 { echo "$as_me:26710: WARNING: use old makefile rules since tools are missing" >&5
26711 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
26712         fi
26713 fi
26714
26715 if test "$cf_gnat_libraries" = yes
26716 then
26717         USE_GNAT_LIBRARIES=""
26718 else
26719         USE_GNAT_LIBRARIES="#"
26720 fi
26721
26722 echo "$as_me:26722: checking for ada-compiler" >&5
26723 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26724
26725 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26726 if test "${with_ada_compiler+set}" = set; then
26727   withval="$with_ada_compiler"
26728   cf_ada_compiler=$withval
26729 else
26730   cf_ada_compiler=gnatmake
26731 fi;
26732
26733 echo "$as_me:26733: result: $cf_ada_compiler" >&5
26734 echo "${ECHO_T}$cf_ada_compiler" >&6
26735
26736                         cf_ada_package=terminal_interface
26737
26738 echo "$as_me:26738: checking for ada-include" >&5
26739 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26740
26741 # Check whether --with-ada-include or --without-ada-include was given.
26742 if test "${with_ada_include+set}" = set; then
26743   withval="$with_ada_include"
26744
26745 else
26746   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26747 fi; if test -n "$prefix/share/ada/adainclude" ; then
26748
26749 if test "x$prefix" != xNONE; then
26750         cf_path_syntax="$prefix"
26751 else
26752         cf_path_syntax="$ac_default_prefix"
26753 fi
26754
26755 case ".$withval" in
26756 (.\$\(*\)*|.\'*\'*)
26757         ;;
26758 (..|./*|.\\*)
26759         ;;
26760 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26761         ;;
26762 (.\$\{*prefix\}*|.\$\{*dir\}*)
26763         eval withval="$withval"
26764         case ".$withval" in
26765         (.NONE/*)
26766                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26767                 ;;
26768         esac
26769         ;;
26770 (.no|.NONE/*)
26771         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26772         ;;
26773 (*)
26774         { { echo "$as_me:26774: error: expected a pathname, not \"$withval\"" >&5
26775 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26776    { (exit 1); exit 1; }; }
26777         ;;
26778 esac
26779
26780 fi
26781 eval ADA_INCLUDE="$withval"
26782
26783 echo "$as_me:26783: result: $ADA_INCLUDE" >&5
26784 echo "${ECHO_T}$ADA_INCLUDE" >&6
26785
26786 echo "$as_me:26786: checking for ada-objects" >&5
26787 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
26788
26789 # Check whether --with-ada-objects or --without-ada-objects was given.
26790 if test "${with_ada_objects+set}" = set; then
26791   withval="$with_ada_objects"
26792
26793 else
26794   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
26795 fi; if test -n "$prefix/lib/ada/adalib" ; then
26796
26797 if test "x$prefix" != xNONE; then
26798         cf_path_syntax="$prefix"
26799 else
26800         cf_path_syntax="$ac_default_prefix"
26801 fi
26802
26803 case ".$withval" in
26804 (.\$\(*\)*|.\'*\'*)
26805         ;;
26806 (..|./*|.\\*)
26807         ;;
26808 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26809         ;;
26810 (.\$\{*prefix\}*|.\$\{*dir\}*)
26811         eval withval="$withval"
26812         case ".$withval" in
26813         (.NONE/*)
26814                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26815                 ;;
26816         esac
26817         ;;
26818 (.no|.NONE/*)
26819         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26820         ;;
26821 (*)
26822         { { echo "$as_me:26822: error: expected a pathname, not \"$withval\"" >&5
26823 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26824    { (exit 1); exit 1; }; }
26825         ;;
26826 esac
26827
26828 fi
26829 eval ADA_OBJECTS="$withval"
26830
26831 echo "$as_me:26831: result: $ADA_OBJECTS" >&5
26832 echo "${ECHO_T}$ADA_OBJECTS" >&6
26833
26834 echo "$as_me:26834: checking if an Ada95 shared-library should be built" >&5
26835 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
26836
26837 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
26838 if test "${with_ada_sharedlib+set}" = set; then
26839   withval="$with_ada_sharedlib"
26840   with_ada_sharedlib=$withval
26841 else
26842   with_ada_sharedlib=no
26843 fi;
26844 echo "$as_me:26844: result: $with_ada_sharedlib" >&5
26845 echo "${ECHO_T}$with_ada_sharedlib" >&6
26846
26847 if test "x$with_ada_sharedlib" != xno
26848 then
26849         if test "x$cf_gnat_projects" != xyes
26850         then
26851                 { echo "$as_me:26851: WARNING: disabling shared-library since GNAT projects are not supported" >&5
26852 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
26853                 with_ada_sharedlib=no
26854         fi
26855 fi
26856
26857 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
26858 MAKE_ADA_SHAREDLIB="#"
26859
26860 if test "x$with_ada_sharedlib" != xno
26861 then
26862         MAKE_ADA_SHAREDLIB=
26863         if test "x$with_ada_sharedlib" != xyes
26864         then
26865                 ADA_SHAREDLIB="$with_ada_sharedlib"
26866         fi
26867 fi
26868
26869                         # allow the Ada binding to be renamed
26870
26871 echo "$as_me:26871: checking for ada-libname" >&5
26872 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
26873
26874 # Check whether --with-ada-libname or --without-ada-libname was given.
26875 if test "${with_ada_libname+set}" = set; then
26876   withval="$with_ada_libname"
26877   ADA_LIBNAME=$withval
26878 else
26879   ADA_LIBNAME=AdaCurses
26880 fi;
26881 case "x$ADA_LIBNAME" in
26882 (x|xyes|xno)
26883         ADA_LIBNAME=AdaCurses
26884         ;;
26885 esac
26886
26887 echo "$as_me:26887: result: $ADA_LIBNAME" >&5
26888 echo "${ECHO_T}$ADA_LIBNAME" >&6
26889
26890                 fi
26891         fi
26892 else
26893         cf_with_ada=no
26894 fi
26895
26896 # do this "late" to avoid conflict with header-checks
26897 if test "x$with_widec" = xyes ; then
26898         echo "$as_me:26898: checking for wchar_t" >&5
26899 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
26900 if test "${ac_cv_type_wchar_t+set}" = set; then
26901   echo $ECHO_N "(cached) $ECHO_C" >&6
26902 else
26903   cat >"conftest.$ac_ext" <<_ACEOF
26904 #line 26904 "configure"
26905 #include "confdefs.h"
26906 $ac_includes_default
26907 int
26908 main (void)
26909 {
26910 if ((wchar_t *) 0)
26911   return 0;
26912 if (sizeof (wchar_t))
26913   return 0;
26914   ;
26915   return 0;
26916 }
26917 _ACEOF
26918 rm -f "conftest.$ac_objext"
26919 if { (eval echo "$as_me:26919: \"$ac_compile\"") >&5
26920   (eval $ac_compile) 2>&5
26921   ac_status=$?
26922   echo "$as_me:26922: \$? = $ac_status" >&5
26923   (exit "$ac_status"); } &&
26924          { ac_try='test -s "conftest.$ac_objext"'
26925   { (eval echo "$as_me:26925: \"$ac_try\"") >&5
26926   (eval $ac_try) 2>&5
26927   ac_status=$?
26928   echo "$as_me:26928: \$? = $ac_status" >&5
26929   (exit "$ac_status"); }; }; then
26930   ac_cv_type_wchar_t=yes
26931 else
26932   echo "$as_me: failed program was:" >&5
26933 cat "conftest.$ac_ext" >&5
26934 ac_cv_type_wchar_t=no
26935 fi
26936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26937 fi
26938 echo "$as_me:26938: result: $ac_cv_type_wchar_t" >&5
26939 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
26940
26941 echo "$as_me:26941: checking size of wchar_t" >&5
26942 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
26943 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
26944   echo $ECHO_N "(cached) $ECHO_C" >&6
26945 else
26946   if test "$ac_cv_type_wchar_t" = yes; then
26947   if test "$cross_compiling" = yes; then
26948   # Depending upon the size, compute the lo and hi bounds.
26949 cat >"conftest.$ac_ext" <<_ACEOF
26950 #line 26950 "configure"
26951 #include "confdefs.h"
26952 $ac_includes_default
26953 int
26954 main (void)
26955 {
26956 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
26957   ;
26958   return 0;
26959 }
26960 _ACEOF
26961 rm -f "conftest.$ac_objext"
26962 if { (eval echo "$as_me:26962: \"$ac_compile\"") >&5
26963   (eval $ac_compile) 2>&5
26964   ac_status=$?
26965   echo "$as_me:26965: \$? = $ac_status" >&5
26966   (exit "$ac_status"); } &&
26967          { ac_try='test -s "conftest.$ac_objext"'
26968   { (eval echo "$as_me:26968: \"$ac_try\"") >&5
26969   (eval $ac_try) 2>&5
26970   ac_status=$?
26971   echo "$as_me:26971: \$? = $ac_status" >&5
26972   (exit "$ac_status"); }; }; then
26973   ac_lo=0 ac_mid=0
26974   while :; do
26975     cat >"conftest.$ac_ext" <<_ACEOF
26976 #line 26976 "configure"
26977 #include "confdefs.h"
26978 $ac_includes_default
26979 int
26980 main (void)
26981 {
26982 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
26983   ;
26984   return 0;
26985 }
26986 _ACEOF
26987 rm -f "conftest.$ac_objext"
26988 if { (eval echo "$as_me:26988: \"$ac_compile\"") >&5
26989   (eval $ac_compile) 2>&5
26990   ac_status=$?
26991   echo "$as_me:26991: \$? = $ac_status" >&5
26992   (exit "$ac_status"); } &&
26993          { ac_try='test -s "conftest.$ac_objext"'
26994   { (eval echo "$as_me:26994: \"$ac_try\"") >&5
26995   (eval $ac_try) 2>&5
26996   ac_status=$?
26997   echo "$as_me:26997: \$? = $ac_status" >&5
26998   (exit "$ac_status"); }; }; then
26999   ac_hi=$ac_mid; break
27000 else
27001   echo "$as_me: failed program was:" >&5
27002 cat "conftest.$ac_ext" >&5
27003 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27004 fi
27005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27006   done
27007 else
27008   echo "$as_me: failed program was:" >&5
27009 cat "conftest.$ac_ext" >&5
27010 ac_hi=-1 ac_mid=-1
27011   while :; do
27012     cat >"conftest.$ac_ext" <<_ACEOF
27013 #line 27013 "configure"
27014 #include "confdefs.h"
27015 $ac_includes_default
27016 int
27017 main (void)
27018 {
27019 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27020   ;
27021   return 0;
27022 }
27023 _ACEOF
27024 rm -f "conftest.$ac_objext"
27025 if { (eval echo "$as_me:27025: \"$ac_compile\"") >&5
27026   (eval $ac_compile) 2>&5
27027   ac_status=$?
27028   echo "$as_me:27028: \$? = $ac_status" >&5
27029   (exit "$ac_status"); } &&
27030          { ac_try='test -s "conftest.$ac_objext"'
27031   { (eval echo "$as_me:27031: \"$ac_try\"") >&5
27032   (eval $ac_try) 2>&5
27033   ac_status=$?
27034   echo "$as_me:27034: \$? = $ac_status" >&5
27035   (exit "$ac_status"); }; }; then
27036   ac_lo=$ac_mid; break
27037 else
27038   echo "$as_me: failed program was:" >&5
27039 cat "conftest.$ac_ext" >&5
27040 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27041 fi
27042 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27043   done
27044 fi
27045 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27046 # Binary search between lo and hi bounds.
27047 while test "x$ac_lo" != "x$ac_hi"; do
27048   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27049   cat >"conftest.$ac_ext" <<_ACEOF
27050 #line 27050 "configure"
27051 #include "confdefs.h"
27052 $ac_includes_default
27053 int
27054 main (void)
27055 {
27056 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27057   ;
27058   return 0;
27059 }
27060 _ACEOF
27061 rm -f "conftest.$ac_objext"
27062 if { (eval echo "$as_me:27062: \"$ac_compile\"") >&5
27063   (eval $ac_compile) 2>&5
27064   ac_status=$?
27065   echo "$as_me:27065: \$? = $ac_status" >&5
27066   (exit "$ac_status"); } &&
27067          { ac_try='test -s "conftest.$ac_objext"'
27068   { (eval echo "$as_me:27068: \"$ac_try\"") >&5
27069   (eval $ac_try) 2>&5
27070   ac_status=$?
27071   echo "$as_me:27071: \$? = $ac_status" >&5
27072   (exit "$ac_status"); }; }; then
27073   ac_hi=$ac_mid
27074 else
27075   echo "$as_me: failed program was:" >&5
27076 cat "conftest.$ac_ext" >&5
27077 ac_lo=`expr "$ac_mid" + 1`
27078 fi
27079 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27080 done
27081 ac_cv_sizeof_wchar_t=$ac_lo
27082 else
27083   if test "$cross_compiling" = yes; then
27084   { { echo "$as_me:27084: error: cannot run test program while cross compiling" >&5
27085 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27086    { (exit 1); exit 1; }; }
27087 else
27088   cat >"conftest.$ac_ext" <<_ACEOF
27089 #line 27089 "configure"
27090 #include "confdefs.h"
27091 $ac_includes_default
27092 int
27093 main (void)
27094 {
27095 FILE *f = fopen ("conftest.val", "w");
27096 if (!f)
27097   $ac_main_return (1);
27098 fprintf (f, "%d", (sizeof (wchar_t)));
27099 fclose (f);
27100   ;
27101   return 0;
27102 }
27103 _ACEOF
27104 rm -f "conftest$ac_exeext"
27105 if { (eval echo "$as_me:27105: \"$ac_link\"") >&5
27106   (eval $ac_link) 2>&5
27107   ac_status=$?
27108   echo "$as_me:27108: \$? = $ac_status" >&5
27109   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27110   { (eval echo "$as_me:27110: \"$ac_try\"") >&5
27111   (eval $ac_try) 2>&5
27112   ac_status=$?
27113   echo "$as_me:27113: \$? = $ac_status" >&5
27114   (exit "$ac_status"); }; }; then
27115   ac_cv_sizeof_wchar_t=`cat conftest.val`
27116 else
27117   echo "$as_me: program exited with status $ac_status" >&5
27118 echo "$as_me: failed program was:" >&5
27119 cat "conftest.$ac_ext" >&5
27120 fi
27121 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27122 fi
27123 fi
27124 rm -f conftest.val
27125 else
27126   ac_cv_sizeof_wchar_t=0
27127 fi
27128 fi
27129 echo "$as_me:27129: result: $ac_cv_sizeof_wchar_t" >&5
27130 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27131 cat >>confdefs.h <<EOF
27132 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27133 EOF
27134
27135         # cross-compiling to mingw can run into the problem that attempting to
27136         # link with the regex library fails, causing the test to not set this to
27137         # a number.  "recent" autoconf does not address this problem either -TD
27138         if test -z "$ac_cv_sizeof_wchar_t"
27139         then
27140                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27141
27142 echo "${as_me:-configure}:27142: testing test failed (assume 2) ..." 1>&5
27143
27144                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27145                 mv confdefs.tmp confdefs.h
27146                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27147         fi
27148 fi
27149
27150 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27151 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27152 ###
27153 ### ticlib modules may be a separate library, otherwise contained in termlib.
27154 ### termlib modules may be a separate library, otherwise contained in ncurses.
27155 ###
27156 ### The of "+" or " " between the tokens controls the way the script
27157 ### chooses to split module lists into libraries.
27158 ###
27159 ### (see CF_LIB_RULES).
27160 echo "$as_me:27160: checking for library subsets" >&5
27161 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27162 LIB_SUBSETS=
27163
27164 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27165         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27166         if test "$with_ticlib" != no ; then
27167                 LIB_SUBSETS="${LIB_SUBSETS} "
27168         else
27169                 LIB_SUBSETS="${LIB_SUBSETS}+"
27170         fi
27171 fi
27172
27173 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27174 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27175
27176 if test "$with_termlib" != no ; then
27177         LIB_SUBSETS="${LIB_SUBSETS} "
27178 else
27179         LIB_SUBSETS="${LIB_SUBSETS}+"
27180 fi
27181
27182 LIB_SUBSETS="${LIB_SUBSETS}base"
27183
27184 # Most term-driver calls are to tinfo, but some like init_pair are to the
27185 # base library (so it resides in base).
27186 if test "$with_term_driver" != no ; then
27187         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27188         case "$cf_cv_system_name" in
27189         (*mingw32*|*mingw64*)
27190                 if test "x$with_exp_win32" = xyes ; then
27191                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27192                 else
27193                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27194                 fi
27195                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27196                 ;;
27197         (*)
27198                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27199                 ;;
27200         esac
27201 elif test "x$with_exp_win32" = xyes ; then
27202         case "$cf_cv_system_name" in
27203         (*mingw32*|*mingw64*)
27204                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27205                 ;;
27206         (*)
27207                 ;;
27208         esac
27209 fi
27210
27211 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27212 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27213
27214 echo "$as_me:27214: result: $LIB_SUBSETS" >&5
27215 echo "${ECHO_T}$LIB_SUBSETS" >&6
27216
27217 ### Construct the list of include-directories to be generated
27218
27219 if test "$srcdir" != "."; then
27220         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27221 fi
27222 CPPFLAGS="-I../include $CPPFLAGS"
27223 if test "$srcdir" != "."; then
27224         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27225 fi
27226 CPPFLAGS="-I. $CPPFLAGS"
27227
27228 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27229 if test "$srcdir" != "."; then
27230         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27231 fi
27232 if test "$GCC" != yes; then
27233         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27234 elif test "$includedir" != "/usr/include"; then
27235         if test "$includedir" = '${prefix}/include' ; then
27236                 if test x$prefix != x/usr ; then
27237                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27238                 fi
27239         else
27240                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27241         fi
27242 fi
27243
27244 ### Build up pieces for makefile rules
27245 echo "$as_me:27245: checking default library suffix" >&5
27246 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27247
27248         case $DFT_LWR_MODEL in
27249         (libtool) DFT_ARG_SUFFIX=''   ;;
27250         (normal)  DFT_ARG_SUFFIX=''   ;;
27251         (debug)   DFT_ARG_SUFFIX='_g' ;;
27252         (profile) DFT_ARG_SUFFIX='_p' ;;
27253         (shared)  DFT_ARG_SUFFIX=''   ;;
27254         esac
27255         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27256 echo "$as_me:27256: result: $DFT_ARG_SUFFIX" >&5
27257 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27258
27259 echo "$as_me:27259: checking default library-dependency suffix" >&5
27260 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27261
27262         case X$DFT_LWR_MODEL in
27263         (Xlibtool)
27264                 DFT_LIB_SUFFIX='.la'
27265                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27266                 ;;
27267         (Xdebug)
27268                 case "$cf_cv_system_name" in
27269                 (*-msvc*)
27270                         DFT_LIB_SUFFIX='_g.lib'
27271                         ;;
27272                 (*)
27273                         DFT_LIB_SUFFIX='_g.a'
27274                         ;;
27275                 esac
27276                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27277                 ;;
27278         (Xprofile)
27279                 case "$cf_cv_system_name" in
27280                 (*-msvc*)
27281                         DFT_LIB_SUFFIX='_p.lib'
27282                         ;;
27283                 (*)
27284                         DFT_LIB_SUFFIX='_p.a'
27285                         ;;
27286                 esac
27287                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27288                 ;;
27289         (Xshared)
27290                 case "$cf_cv_system_name" in
27291                 (aix[5-7]*)
27292                         DFT_LIB_SUFFIX='.so'
27293                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27294                         ;;
27295                 (*-msvc*)
27296                         DFT_LIB_SUFFIX='.dll'
27297                         DFT_DEP_SUFFIX='.dll.lib'
27298                         ;;
27299                 (cygwin*|msys*|mingw*)
27300                         DFT_LIB_SUFFIX='.dll'
27301                         DFT_DEP_SUFFIX='.dll.a'
27302                         ;;
27303                 (darwin*)
27304                         DFT_LIB_SUFFIX='.dylib'
27305                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27306                         ;;
27307                 (hpux*)
27308                         case "$target" in
27309                         (ia64*)
27310                                 DFT_LIB_SUFFIX='.so'
27311                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27312                                 ;;
27313                         (*)
27314                                 DFT_LIB_SUFFIX='.sl'
27315                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27316                                 ;;
27317                         esac
27318                         ;;
27319                 (*)
27320                         DFT_LIB_SUFFIX='.so'
27321                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27322                         ;;
27323                 esac
27324                 ;;
27325         (*)
27326                 case "$target" in
27327                 (*-msvc*)
27328                         DFT_LIB_SUFFIX='.lib'
27329                         ;;
27330                 (*)
27331                         DFT_LIB_SUFFIX='.a'
27332                         ;;
27333                 esac
27334                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27335                 ;;
27336         esac
27337         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27338         then
27339                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27340                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27341         fi
27342 echo "$as_me:27342: result: $DFT_DEP_SUFFIX" >&5
27343 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27344
27345 echo "$as_me:27345: checking default object directory" >&5
27346 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27347
27348         case $DFT_LWR_MODEL in
27349         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27350         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27351         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27352         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27353         (shared)
27354                 case "$cf_cv_system_name" in
27355                 (cygwin|msys)
27356                         DFT_OBJ_SUBDIR='objects' ;;
27357                 (*)
27358                         DFT_OBJ_SUBDIR='obj_s' ;;
27359                 esac
27360         esac
27361 echo "$as_me:27361: result: $DFT_OBJ_SUBDIR" >&5
27362 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27363
27364 if test "x$cf_with_cxx" = xyes ; then
27365 echo "$as_me:27365: checking c++ library-dependency suffix" >&5
27366 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27367 if test "$with_libtool" != "no"; then
27368         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27369         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27370 elif test "$with_shared_cxx" != "no"; then
27371         # also for g++ users...
27372         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27373 else
27374         # we normally make a static library because C/C++ library rules differ
27375
27376         case Xnormal in
27377         (Xlibtool)
27378                 CXX_LIB_SUFFIX='.la'
27379                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27380                 ;;
27381         (Xdebug)
27382                 case "$cf_cv_system_name" in
27383                 (*-msvc*)
27384                         CXX_LIB_SUFFIX='_g.lib'
27385                         ;;
27386                 (*)
27387                         CXX_LIB_SUFFIX='_g.a'
27388                         ;;
27389                 esac
27390                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27391                 ;;
27392         (Xprofile)
27393                 case "$cf_cv_system_name" in
27394                 (*-msvc*)
27395                         CXX_LIB_SUFFIX='_p.lib'
27396                         ;;
27397                 (*)
27398                         CXX_LIB_SUFFIX='_p.a'
27399                         ;;
27400                 esac
27401                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27402                 ;;
27403         (Xshared)
27404                 case "$cf_cv_system_name" in
27405                 (aix[5-7]*)
27406                         CXX_LIB_SUFFIX='.so'
27407                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27408                         ;;
27409                 (*-msvc*)
27410                         CXX_LIB_SUFFIX='.dll'
27411                         CXX_DEP_SUFFIX='.dll.lib'
27412                         ;;
27413                 (cygwin*|msys*|mingw*)
27414                         CXX_LIB_SUFFIX='.dll'
27415                         CXX_DEP_SUFFIX='.dll.a'
27416                         ;;
27417                 (darwin*)
27418                         CXX_LIB_SUFFIX='.dylib'
27419                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27420                         ;;
27421                 (hpux*)
27422                         case "$target" in
27423                         (ia64*)
27424                                 CXX_LIB_SUFFIX='.so'
27425                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27426                                 ;;
27427                         (*)
27428                                 CXX_LIB_SUFFIX='.sl'
27429                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27430                                 ;;
27431                         esac
27432                         ;;
27433                 (*)
27434                         CXX_LIB_SUFFIX='.so'
27435                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27436                         ;;
27437                 esac
27438                 ;;
27439         (*)
27440                 case "$target" in
27441                 (*-msvc*)
27442                         CXX_LIB_SUFFIX='.lib'
27443                         ;;
27444                 (*)
27445                         CXX_LIB_SUFFIX='.a'
27446                         ;;
27447                 esac
27448                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27449                 ;;
27450         esac
27451         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27452         then
27453                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27454                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27455         fi
27456
27457 fi
27458 echo "$as_me:27458: result: $CXX_LIB_SUFFIX" >&5
27459 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27460
27461 fi
27462
27463 # do not want -ldl in build except as needed for -lncurses dependency
27464 if test "x$with_dlsym" = xyes ; then
27465 if test "$DFT_LWR_MODEL" = shared || \
27466    test "$DFT_LWR_MODEL" = libtool ; then
27467
27468 # remove dl library from $LIBS
27469 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27470
27471 fi
27472 fi
27473 ### Set up low-level terminfo dependencies for makefiles.
27474
27475 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27476 # do not need libdl
27477 TICS_LIST=
27478 if test "x$with_dlsym" = xyes ; then
27479
27480 # remove dl library from $SHLIB_LIST
27481 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27482
27483 fi
27484
27485 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27486 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27487 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27488 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27489 then
27490         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27491 fi
27492
27493 if test "$with_ticlib" != no ; then
27494
27495         if test "x$with_ticlib" != xyes ; then
27496                 TICS_NAME=$with_ticlib
27497                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27498                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27499                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27500                 TICS_LIB_SUFFIX="${with_ticlib}"
27501         else
27502                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27503                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27504                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27505                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27506         fi
27507         TICS_LDFLAGS="-L${LIB_DIR}"
27508         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27509 else
27510         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27511         TICS_LDFLAGS="-L${LIB_DIR}"
27512         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27513 fi
27514
27515 if test "$with_termlib" != no ; then
27516
27517         if test "x$with_termlib" != xyes ; then
27518                 TINFO_NAME=$with_termlib
27519                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27520                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27521                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27522                 TINFO_LIB_SUFFIX="${with_termlib}"
27523         else
27524                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27525                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27526                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27527                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27528         fi
27529
27530         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27531         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27532         if test "$DFT_LWR_MODEL" = "libtool"; then
27533                 TEST_ARGS="${TEST_DEPS}"
27534                 TEST_ARG2="${TEST_DEP2}"
27535                 TINFO_LDFLAGS="-L${LIB_DIR}"
27536                 TINFO_LIBS="$TEST_ARGS"
27537                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27538                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27539         else
27540                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27541                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27542                 if test "x$with_term_driver" != xno ; then
27543                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27544                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27545                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27546                 else
27547                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27548                         TINFO_LIBS="$TEST_ARGS"
27549                 fi
27550                 TINFO_LDFLAGS="-L${LIB_DIR}"
27551                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27552         fi
27553 else
27554         # the next lines are needed for linking libtic over libncurses
27555         TINFO_NAME=${LIB_NAME}
27556         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27557         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27558         if test "x$with_tic_depends" = xyes ; then
27559                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27560         else
27561                 TICS_LIST="$SHLIB_LIST"
27562         fi
27563
27564         TINFO_LDFLAGS="-L${LIB_DIR}"
27565         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27566 fi
27567
27568 if test "$DFT_LWR_MODEL" = shared ; then
27569         case "$cf_cv_system_name" in
27570         (cygwin*|msys*)
27571                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27572                 TINFO_SUFFIX=.dll
27573                 ;;
27574         esac
27575 fi
27576
27577 if test "x$with_dlsym" = xyes ; then
27578
27579 # remove dl library from $TICS_LIST
27580 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27581
27582 fi
27583
27584 if test "$DFT_LWR_MODEL" = "libtool"; then
27585         OBJEXT=lo
27586 fi
27587
27588 # needed for Ada95
27589 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27590
27591 case "$DFT_LWR_MODEL" in
27592 (normal|debug|profile)
27593
27594 if test "$GCC" = yes ; then
27595         case "$cf_cv_system_name" in
27596         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27597                 LDFLAGS_STATIC=
27598                 LDFLAGS_SHARED=
27599                 ;;
27600         (*)     # normally, except when broken
27601                 LDFLAGS_STATIC=-static
27602                 LDFLAGS_SHARED=-dynamic
27603                 ;;
27604         esac
27605 else
27606         case "$cf_cv_system_name" in
27607         (aix[4-7]*)     # from ld manpage
27608                 LDFLAGS_STATIC=-bstatic
27609                 LDFLAGS_SHARED=-bdynamic
27610                 ;;
27611         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27612                 # We could also use just "archive" and "shared".
27613                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27614                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27615                 ;;
27616         (irix*)         # from ld manpage IRIX64
27617                 LDFLAGS_STATIC=-Bstatic
27618                 LDFLAGS_SHARED=-Bdynamic
27619                 ;;
27620         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27621                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27622                 LDFLAGS_STATIC=-noso
27623                 LDFLAGS_SHARED=-so_archive
27624                 ;;
27625         (solaris2*)
27626                 LDFLAGS_STATIC=-Bstatic
27627                 LDFLAGS_SHARED=-Bdynamic
27628                 ;;
27629         esac
27630 fi
27631
27632 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27633 then
27634         echo "$as_me:27634: checking if linker supports switching between static/dynamic" >&5
27635 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27636
27637         rm -f libconftest.a
27638         cat >conftest.$ac_ext <<EOF
27639 #line 27639 "configure"
27640 #include <stdio.h>
27641 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27642 EOF
27643         if { (eval echo "$as_me:27643: \"$ac_compile\"") >&5
27644   (eval $ac_compile) 2>&5
27645   ac_status=$?
27646   echo "$as_me:27646: \$? = $ac_status" >&5
27647   (exit "$ac_status"); } ; then
27648                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27649                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27650         fi
27651         rm -f conftest.*
27652
27653         cf_save_LIBS="$LIBS"
27654
27655         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27656         cat >"conftest.$ac_ext" <<_ACEOF
27657 #line 27657 "configure"
27658 #include "confdefs.h"
27659
27660 #line 27660 "configure"
27661 #include <stdio.h>
27662 int cf_ldflags_static(FILE *fp);
27663
27664 int
27665 main (void)
27666 {
27667
27668         return cf_ldflags_static(stdin);
27669
27670   ;
27671   return 0;
27672 }
27673 _ACEOF
27674 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27675 if { (eval echo "$as_me:27675: \"$ac_link\"") >&5
27676   (eval $ac_link) 2>&5
27677   ac_status=$?
27678   echo "$as_me:27678: \$? = $ac_status" >&5
27679   (exit "$ac_status"); } &&
27680          { ac_try='test -s "conftest$ac_exeext"'
27681   { (eval echo "$as_me:27681: \"$ac_try\"") >&5
27682   (eval $ac_try) 2>&5
27683   ac_status=$?
27684   echo "$as_me:27684: \$? = $ac_status" >&5
27685   (exit "$ac_status"); }; }; then
27686
27687         # some linkers simply ignore the -dynamic
27688         case x`file "conftest$ac_exeext" 2>/dev/null` in
27689         (*static*)
27690                 cf_ldflags_static=no
27691                 ;;
27692         (*)
27693                 cf_ldflags_static=yes
27694                 ;;
27695         esac
27696
27697 else
27698   echo "$as_me: failed program was:" >&5
27699 cat "conftest.$ac_ext" >&5
27700 cf_ldflags_static=no
27701 fi
27702 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27703
27704         rm -f libconftest.*
27705         LIBS="$cf_save_LIBS"
27706
27707         echo "$as_me:27707: result: $cf_ldflags_static" >&5
27708 echo "${ECHO_T}$cf_ldflags_static" >&6
27709
27710         if test "$cf_ldflags_static" != yes
27711         then
27712                 LDFLAGS_STATIC=
27713                 LDFLAGS_SHARED=
27714         fi
27715 else
27716         LDFLAGS_STATIC=
27717         LDFLAGS_SHARED=
27718 fi
27719
27720         ;;
27721 esac
27722
27723 echo "$as_me:27723: checking where we will install curses.h" >&5
27724 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27725
27726 includesubdir=
27727 if test "$with_overwrite" = no && \
27728  { test "x$includedir" = 'x${prefix}/include' || \
27729    test "x$includedir" = "x${prefix}/include"; }
27730 then
27731         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27732 fi
27733 echo "$as_me:27733: result: ${includedir}${includesubdir}" >&5
27734 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27735
27736 ### Resolve a conflict between normal and wide-curses by forcing applications
27737 ### that will need libutf8 to add it to their configure script.
27738 if test "$with_overwrite" != no ; then
27739 if test "$NCURSES_LIBUTF8" = 1 ; then
27740         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27741         { echo "$as_me:27741: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27742 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27743 fi
27744 fi
27745 WITH_OVERWRITE=$with_overwrite
27746
27747 ### At least on MinGW a shared library build without libtool
27748 ### requires adding the additional libs to the link list.
27749 case "$cf_cv_system_name" in
27750 (*mingw32*|*mingw64*)
27751         if test "$DFT_LWR_MODEL" != "libtool"; then
27752            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
27753         fi
27754         ;;
27755 *)      ;;
27756 esac
27757
27758 # used to separate tack out of the tree
27759 NCURSES_TREE=
27760
27761 ### predefined stuff for the test programs
27762
27763 cat >>confdefs.h <<\EOF
27764 #define HAVE_SLK_COLOR 1
27765 EOF
27766
27767 # pkgsrc uses these
27768
27769 echo "$as_me:27769: checking for desired basename for form library" >&5
27770 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
27771
27772 # Check whether --with-form-libname or --without-form-libname was given.
27773 if test "${with_form_libname+set}" = set; then
27774   withval="$with_form_libname"
27775   with_lib_basename=$withval
27776 else
27777   with_lib_basename=form
27778 fi;
27779 FORM_NAME="$with_lib_basename"
27780
27781 case "x$FORM_NAME" in
27782 (x|xno|xnone|xyes)
27783         FORM_NAME=form
27784         ;;
27785 (*)
27786         ;;
27787 esac
27788
27789 echo "$as_me:27789: result: $FORM_NAME" >&5
27790 echo "${ECHO_T}$FORM_NAME" >&6
27791
27792 echo "$as_me:27792: checking for desired basename for menu library" >&5
27793 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
27794
27795 # Check whether --with-menu-libname or --without-menu-libname was given.
27796 if test "${with_menu_libname+set}" = set; then
27797   withval="$with_menu_libname"
27798   with_lib_basename=$withval
27799 else
27800   with_lib_basename=menu
27801 fi;
27802 MENU_NAME="$with_lib_basename"
27803
27804 case "x$MENU_NAME" in
27805 (x|xno|xnone|xyes)
27806         MENU_NAME=menu
27807         ;;
27808 (*)
27809         ;;
27810 esac
27811
27812 echo "$as_me:27812: result: $MENU_NAME" >&5
27813 echo "${ECHO_T}$MENU_NAME" >&6
27814
27815 echo "$as_me:27815: checking for desired basename for panel library" >&5
27816 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
27817
27818 # Check whether --with-panel-libname or --without-panel-libname was given.
27819 if test "${with_panel_libname+set}" = set; then
27820   withval="$with_panel_libname"
27821   with_lib_basename=$withval
27822 else
27823   with_lib_basename=panel
27824 fi;
27825 PANEL_NAME="$with_lib_basename"
27826
27827 case "x$PANEL_NAME" in
27828 (x|xno|xnone|xyes)
27829         PANEL_NAME=panel
27830         ;;
27831 (*)
27832         ;;
27833 esac
27834
27835 echo "$as_me:27835: result: $PANEL_NAME" >&5
27836 echo "${ECHO_T}$PANEL_NAME" >&6
27837
27838 echo "$as_me:27838: checking for desired basename for cxx library" >&5
27839 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
27840
27841 # Check whether --with-cxx-libname or --without-cxx-libname was given.
27842 if test "${with_cxx_libname+set}" = set; then
27843   withval="$with_cxx_libname"
27844   with_lib_basename=$withval
27845 else
27846   with_lib_basename=ncurses++
27847 fi;
27848 CXX_NAME="$with_lib_basename"
27849
27850 case "x$CXX_NAME" in
27851 (x|xno|xnone|xyes)
27852         CXX_NAME=ncurses++
27853         ;;
27854 (*)
27855         ;;
27856 esac
27857
27858 echo "$as_me:27858: result: $CXX_NAME" >&5
27859 echo "${ECHO_T}$CXX_NAME" >&6
27860
27861 ### Construct the list of subdirectories for which we'll customize makefiles
27862 ### with the appropriate compile-rules.
27863
27864 echo "$as_me:27864: checking for src modules" >&5
27865 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
27866
27867 # dependencies and linker-arguments for test-programs
27868 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
27869 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
27870 if test "$DFT_LWR_MODEL" = "libtool"; then
27871         TEST_ARGS="${TEST_DEPS}"
27872         TEST_ARG2="${TEST_DEP2}"
27873 else
27874         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27875         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
27876 fi
27877
27878 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
27879 cf_cv_src_modules=
27880 for cf_dir in $modules_to_build
27881 do
27882         if test -f "$srcdir/$cf_dir/modules" ; then
27883
27884                 # We may/may not have tack in the distribution, though the
27885                 # makefile is.
27886                 if test "$cf_dir" = tack ; then
27887                         if test "x$cf_with_tack" != "xyes"; then
27888                                 continue
27889                         fi
27890                 fi
27891
27892                 if test -z "$cf_cv_src_modules"; then
27893                         cf_cv_src_modules=$cf_dir
27894                 else
27895                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
27896                 fi
27897
27898                 # Make the ncurses_cfg.h file record the library interface files as
27899                 # well.  These are header files that are the same name as their
27900                 # directory.  Ncurses is the only library that does not follow
27901                 # that pattern.
27902                 if test "$cf_dir" = tack ; then
27903                         continue
27904                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
27905
27906 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27907
27908                         cat >>confdefs.h <<EOF
27909 #define HAVE_${cf_have_include}_H 1
27910 EOF
27911
27912                         cat >>confdefs.h <<EOF
27913 #define HAVE_LIB${cf_have_include} 1
27914 EOF
27915
27916 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27917
27918 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
27919
27920                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
27921                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
27922                         if test "$DFT_LWR_MODEL" = "libtool"; then
27923                                 TEST_ARGS="${TEST_DEPS}"
27924                                 TEST_ARG2="${TEST_DEP2}"
27925                         else
27926                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
27927                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
27928                         fi
27929                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
27930                 fi
27931         fi
27932 done
27933 echo "$as_me:27933: result: $cf_cv_src_modules" >&5
27934 echo "${ECHO_T}$cf_cv_src_modules" >&6
27935
27936 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
27937 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
27938
27939 SRC_SUBDIRS=
27940 if test "x$cf_with_manpages" != xno ; then
27941         SRC_SUBDIRS="$SRC_SUBDIRS man"
27942 fi
27943 SRC_SUBDIRS="$SRC_SUBDIRS include"
27944 for cf_dir in $cf_cv_src_modules
27945 do
27946         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
27947 done
27948 if test "x$cf_with_tests" != "xno" ; then
27949         SRC_SUBDIRS="$SRC_SUBDIRS test"
27950 fi
27951 # always make this, to install the ncurses-config script
27952 SRC_SUBDIRS="$SRC_SUBDIRS misc"
27953 if test "$cf_with_cxx_binding" != no; then
27954         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
27955         SRC_SUBDIRS="$SRC_SUBDIRS c++"
27956 fi
27957
27958 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
27959 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
27960
27961 ADA_SUBDIRS=
27962 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
27963         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
27964         ADA_SUBDIRS="gen src"
27965         if test "x$cf_with_tests" != "xno" ; then
27966                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
27967         fi
27968 fi
27969
27970 SUB_MAKEFILES=
27971 for cf_dir in $SRC_SUBDIRS
27972 do
27973         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
27974 done
27975
27976 if test -n "$ADA_SUBDIRS"; then
27977         for cf_dir in $ADA_SUBDIRS
27978         do
27979                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
27980         done
27981
27982 fi
27983
27984 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
27985    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
27986    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
27987    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
27988 fi
27989
27990 DIRS_TO_MAKE="lib"
27991 for cf_item in $cf_list_models
27992 do
27993
27994         case $cf_item in
27995         (libtool) cf_subdir='obj_lo'  ;;
27996         (normal)  cf_subdir='objects' ;;
27997         (debug)   cf_subdir='obj_g' ;;
27998         (profile) cf_subdir='obj_p' ;;
27999         (shared)
28000                 case "$cf_cv_system_name" in
28001                 (cygwin|msys)
28002                         cf_subdir='objects' ;;
28003                 (*)
28004                         cf_subdir='obj_s' ;;
28005                 esac
28006         esac
28007
28008         for cf_item2 in $DIRS_TO_MAKE
28009         do
28010                 test "$cf_item2" = "$cf_subdir" && break
28011         done
28012         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28013 done
28014 for cf_dir in $DIRS_TO_MAKE
28015 do
28016         test ! -d "$cf_dir" && mkdir "$cf_dir"
28017 done
28018
28019 # symbols that differ when compiling Ada95 by itself.
28020 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28021
28022 # values to use as strings
28023
28024 cat >>confdefs.h <<EOF
28025 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28026 EOF
28027
28028 cat >>confdefs.h <<EOF
28029 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28030 EOF
28031
28032 ### Define substitutions for header files to avoid name-pollution
28033
28034 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28035         HAVE_TCGETATTR=1
28036 else
28037         HAVE_TCGETATTR=0
28038 fi
28039
28040 if test "x$ac_cv_header_stdint_h" = xyes ; then
28041         HAVE_STDINT_H=1
28042 else
28043         HAVE_STDINT_H=0
28044 fi
28045
28046 if test "x$ac_cv_header_termio_h" = xyes ; then
28047         HAVE_TERMIO_H=1
28048 else
28049         HAVE_TERMIO_H=0
28050 fi
28051
28052 if test "x$ac_cv_header_termios_h" = xyes ; then
28053         HAVE_TERMIOS_H=1
28054 else
28055         HAVE_TERMIOS_H=0
28056 fi
28057
28058 ################################################################################
28059 test "x$use_database" = xyes && \
28060 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28061
28062 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28063 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28064
28065 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28066 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28067 fi
28068
28069 if test "x$cf_with_tests" != xno ; then
28070         MAKE_TESTS=
28071 else
28072         MAKE_TESTS="#"
28073 fi
28074
28075 ADAHTML_DIR=../../doc/html/ada
28076
28077 # workaround for OS/2 (20151017)
28078 case "$cf_cv_system_name" in
28079 (os2*)
28080         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28081         ;;
28082 (*)
28083         LIBTOOL_OPTS_CXX=
28084         ;;
28085 esac
28086
28087 # workaround for g++ versus Solaris (20131116)
28088 case "$cf_cv_system_name" in
28089 (solaris2*)
28090         case "x$CPPFLAGS" in
28091         (*-D_XOPEN_SOURCE_EXTENDED*)
28092                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28093
28094 echo "${as_me:-configure}:28094: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28095
28096                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28097                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28098                 ;;
28099         esac
28100         ;;
28101 esac
28102
28103 # Help to automatically enable the extended curses features when using either
28104 # the *-config or the ".pc" files by adding defines.
28105 echo "$as_me:28105: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28106 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28107 PKG_CFLAGS=
28108 for cf_loop1 in $CPPFLAGS_after_XOPEN
28109 do
28110         cf_found=no
28111         for cf_loop2 in $CPPFLAGS_before_XOPEN
28112         do
28113                 if test "x$cf_loop1" = "x$cf_loop2"
28114                 then
28115                         cf_found=yes
28116                         break
28117                 fi
28118         done
28119         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28120 done
28121 echo "$as_me:28121: result: $PKG_CFLAGS" >&5
28122 echo "${ECHO_T}$PKG_CFLAGS" >&6
28123
28124 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28125 case "x$NCURSES_OSPEED" in
28126 (*short*)
28127         cf_compatible=1
28128         ;;
28129 (*)
28130         cf_compatible=0
28131         ;;
28132 esac
28133
28134 cat >>confdefs.h <<EOF
28135 #define NCURSES_OSPEED_COMPAT $cf_compatible
28136 EOF
28137
28138 case "x$cf_cv_typeof_chtype" in
28139 (xshort|xint|xlong)
28140         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28141         ;;
28142 esac
28143
28144 case "x$cf_cv_typeof_mmask_t" in
28145 (xshort|xint|xlong)
28146         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28147         ;;
28148 esac
28149
28150 # substitute into misc/Makefile to suppress
28151 # (un)install.data from the
28152 # (un)install rules.
28153 if test "x$cf_with_db_install" = "xno"; then
28154         MISC_INSTALL_DATA=
28155         MISC_UNINSTALL_DATA=
28156 else
28157         MISC_INSTALL_DATA=install.data
28158         MISC_UNINSTALL_DATA=uninstall.data
28159 fi
28160
28161 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28162         MAKE_DATABASE="#"
28163 else
28164         MAKE_DATABASE="$MAKE_TERMINFO"
28165 fi
28166
28167 if test -n "$PACKAGE"
28168 then
28169         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28170         export PACKAGE
28171         echo "package: $PACKAGE"
28172 fi
28173
28174 UNALTERED_SYMS=
28175 cf_filter_syms=no
28176
28177 if test -n "$RESULTING_SYMS"
28178 then
28179         cf_filter_syms=$cf_dft_filter_syms
28180         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28181
28182 echo "${as_me:-configure}:28182: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28183
28184 fi
28185
28186 if test "x$WILDCARD_SYMS" = xno
28187 then
28188         cf_filter_syms=yes
28189 fi
28190
28191 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28192
28193 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28194 if test "$cf_filter_syms" = yes
28195 then
28196         RESULTING_SYMS=resulting.map
28197 fi
28198
28199 if test "x$cross_compiling" = xyes ; then
28200         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28201         CHECK_BUILD="#"
28202 else
28203         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28204         CHECK_BUILD=
28205 fi
28206
28207 # This is used for the *-config script and *.pc data files.
28208
28209 echo "$as_me:28209: checking for linker search path" >&5
28210 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28211 if test "${cf_cv_ld_searchpath+set}" = set; then
28212   echo $ECHO_N "(cached) $ECHO_C" >&6
28213 else
28214
28215 if test "$cross_compiling" != yes ; then
28216
28217 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28218 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28219
28220 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28221 # update the cache, which makes it run faster.
28222 test -z "$cf_pathlist" && \
28223         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28224
28225 test -z "$cf_pathlist" &&
28226         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28227
28228 # This works with OpenBSD 6.5, which lists only filenames
28229 test -z "$cf_pathlist" &&
28230         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28231
28232 if test -z "$cf_pathlist"
28233 then
28234         # dyld default path with MacOS
28235         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28236         then
28237                 # do this to bypass check
28238                 cf_cv_ld_searchpath='$HOME/lib'
28239                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28240         fi
28241 fi
28242
28243 if test -z "$cf_pathlist"
28244 then
28245         # Solaris is "SunOS"
28246         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28247         then
28248                 case x`(isainfo -b)` in
28249                 (x64)
28250                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28251                         ;;
28252                 (x32)
28253                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28254                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28255                         ;;
28256                 (*)
28257                         { echo "$as_me:28257: WARNING: problem with Solaris architecture" >&5
28258 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28259                         ;;
28260                 esac
28261         fi
28262 fi
28263
28264 if test -z "$cf_pathlist"
28265 then
28266         # HP-UX
28267         if test x"`uname -s`" = xHP-UX
28268         then
28269                 case x`getconf LONG_BIT` in
28270                 (x64)
28271                         cf_pathlist="/usr/lib/hpux64"
28272                         ;;
28273                 (x*)
28274                         cf_pathlist="/usr/lib/hpux32"
28275                         ;;
28276                 esac
28277         fi
28278 fi
28279
28280 fi
28281
28282 # If nothing else, assume it is conventional
28283 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28284
28285 # Finally, check that this is only directories
28286 for cf_path in $0 $cf_pathlist
28287 do
28288         if test -d "$cf_path"; then
28289                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28290                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28291         fi
28292 done
28293
28294 # Ensure that it is nonempty
28295 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28296
28297 fi
28298 echo "$as_me:28298: result: $cf_cv_ld_searchpath" >&5
28299 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28300
28301 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28302
28303 cat >>confdefs.h <<\EOF
28304 #define HAVE_CURSES_DATA_BOOLNAMES 1
28305 EOF
28306
28307 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
28308 ac_config_commands="$ac_config_commands default"
28309 cat >confcache <<\_ACEOF
28310 # This file is a shell script that caches the results of configure
28311 # tests run on this system so they can be shared between configure
28312 # scripts and configure runs, see configure's option --config-cache.
28313 # It is not useful on other systems.  If it contains results you don't
28314 # want to keep, you may remove or edit it.
28315 #
28316 # config.status only pays attention to the cache file if you give it
28317 # the --recheck option to rerun configure.
28318 #
28319 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28320 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28321 # following values.
28322
28323 _ACEOF
28324
28325 # The following way of writing the cache mishandles newlines in values,
28326 # but we know of no workaround that is simple, portable, and efficient.
28327 # So, don't put newlines in cache variables' values.
28328 # Ultrix sh set writes to stderr and can't be redirected directly,
28329 # and sets the high bit in the cache file unless we assign to the vars.
28330 {
28331   (set) 2>&1 |
28332     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28333     *ac_space=\ *)
28334       # `set' does not quote correctly, so add quotes (double-quote
28335       # substitution turns \\\\ into \\, and sed turns \\ into \).
28336       sed -n \
28337         "s/'/'\\\\''/g;
28338           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28339       ;;
28340     *)
28341       # `set' quotes correctly as required by POSIX, so do not add quotes.
28342       sed -n \
28343         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28344       ;;
28345     esac;
28346 } |
28347   sed '
28348      t clear
28349      : clear
28350      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28351      t end
28352      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28353      : end' >>confcache
28354 if cmp -s $cache_file confcache; then :; else
28355   if test -w $cache_file; then
28356     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28357     cat confcache >$cache_file
28358   else
28359     echo "not updating unwritable cache $cache_file"
28360   fi
28361 fi
28362 rm -f confcache
28363
28364 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28365 # Let make expand exec_prefix.
28366 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28367
28368 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28369 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28370 # trailing colons and then remove the whole line if VPATH becomes empty
28371 # (actually we leave an empty line to preserve line numbers).
28372 if test "x$srcdir" = x.; then
28373   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28374 s/:*\$(srcdir):*/:/;
28375 s/:*\${srcdir}:*/:/;
28376 s/:*@srcdir@:*/:/;
28377 s/^\([^=]*=[    ]*\):*/\1/;
28378 s/:*$//;
28379 s/^[^=]*=[      ]*$//;
28380 }'
28381 fi
28382
28383 DEFS=-DHAVE_CONFIG_H
28384
28385 : "${CONFIG_STATUS=./config.status}"
28386 ac_clean_files_save=$ac_clean_files
28387 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28388 { echo "$as_me:28388: creating $CONFIG_STATUS" >&5
28389 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28390 cat >"$CONFIG_STATUS" <<_ACEOF
28391 #! $SHELL
28392 # Generated automatically by configure.
28393 # Run this file to recreate the current configuration.
28394 # Compiler output produced by configure, useful for debugging
28395 # configure, is in config.log if it exists.
28396
28397 debug=false
28398 SHELL=\${CONFIG_SHELL-$SHELL}
28399 ac_cs_invocation="\$0 \$@"
28400
28401 CLICOLOR_FORCE= GREP_OPTIONS=
28402 unset CLICOLOR_FORCE GREP_OPTIONS
28403 _ACEOF
28404
28405 cat >>"$CONFIG_STATUS" <<\_ACEOF
28406 # Be Bourne compatible
28407 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28408   emulate sh
28409   NULLCMD=:
28410 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28411   set -o posix
28412 fi
28413
28414 # Name of the executable.
28415 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28416
28417 if expr a : '\(a\)' >/dev/null 2>&1; then
28418   as_expr=expr
28419 else
28420   as_expr=false
28421 fi
28422
28423 rm -f conf$$ conf$$.exe conf$$.file
28424 echo >conf$$.file
28425 if ln -s conf$$.file conf$$ 2>/dev/null; then
28426   # We could just check for DJGPP; but this test a) works b) is more generic
28427   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28428   if test -f conf$$.exe; then
28429     # Don't use ln at all; we don't have any links
28430     as_ln_s='cp -p'
28431   else
28432     as_ln_s='ln -s'
28433   fi
28434 elif ln conf$$.file conf$$ 2>/dev/null; then
28435   as_ln_s=ln
28436 else
28437   as_ln_s='cp -p'
28438 fi
28439 rm -f conf$$ conf$$.exe conf$$.file
28440
28441 as_executable_p="test -f"
28442
28443 # Support unset when possible.
28444 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28445   as_unset="unset"
28446 else
28447   as_unset="false"
28448 fi
28449
28450 # NLS nuisances.
28451 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28452 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28453 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28454 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28455 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28456 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28457 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28458 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28459
28460 # IFS
28461 # We need space, tab and new line, in precisely that order.
28462 as_nl='
28463 '
28464 IFS="   $as_nl"
28465
28466 # CDPATH.
28467 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28468
28469 exec 6>&1
28470
28471 _ACEOF
28472
28473 # Files that config.status was made for.
28474 if test -n "$ac_config_files"; then
28475   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28476 fi
28477
28478 if test -n "$ac_config_headers"; then
28479   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28480 fi
28481
28482 if test -n "$ac_config_links"; then
28483   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28484 fi
28485
28486 if test -n "$ac_config_commands"; then
28487   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28488 fi
28489
28490 cat >>"$CONFIG_STATUS" <<\EOF
28491
28492 ac_cs_usage="\
28493 \`$as_me' instantiates files from templates according to the
28494 current configuration.
28495
28496 Usage: $0 [OPTIONS] [FILE]...
28497
28498   -h, --help       print this help, then exit
28499   -V, --version    print version number, then exit
28500   -d, --debug      don't remove temporary files
28501       --recheck    update $as_me by reconfiguring in the same conditions
28502   --file=FILE[:TEMPLATE]
28503                    instantiate the configuration file FILE
28504   --header=FILE[:TEMPLATE]
28505                    instantiate the configuration header FILE
28506
28507 Configuration files:
28508 $config_files
28509
28510 Configuration headers:
28511 $config_headers
28512
28513 Configuration commands:
28514 $config_commands
28515
28516 Report bugs to <dickey@invisible-island.net>."
28517 EOF
28518
28519 cat >>"$CONFIG_STATUS" <<EOF
28520 ac_cs_version="\\
28521 config.status
28522 configured by $0, generated by GNU Autoconf 2.52.20210105,
28523   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28524
28525 Copyright 2003-2020,2021        Thomas E. Dickey
28526 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28527 Free Software Foundation, Inc.
28528 This config.status script is free software; the Free Software Foundation
28529 gives unlimited permission to copy, distribute and modify it."
28530 srcdir="$srcdir"
28531 INSTALL="$INSTALL"
28532 EOF
28533
28534 cat >>"$CONFIG_STATUS" <<\EOF
28535 # If no file are specified by the user, then we need to provide default
28536 # value.  By we need to know if files were specified by the user.
28537 ac_need_defaults=:
28538 while test $# != 0
28539 do
28540   case $1 in
28541   --*=*)
28542     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28543     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28544     shift
28545     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28546     shift
28547     ;;
28548   -*);;
28549   *) # This is not an option, so the user has probably given explicit
28550      # arguments.
28551      ac_need_defaults=false;;
28552   esac
28553
28554   case $1 in
28555   # Handling of the options.
28556 EOF
28557 cat >>"$CONFIG_STATUS" <<EOF
28558   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28559     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28560     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28561 EOF
28562 cat >>"$CONFIG_STATUS" <<\EOF
28563   --version | --vers* | -V )
28564     echo "$ac_cs_version"; exit 0 ;;
28565   --he | --h)
28566     # Conflict between --help and --header
28567     { { echo "$as_me:28567: error: ambiguous option: $1
28568 Try \`$0 --help' for more information." >&5
28569 echo "$as_me: error: ambiguous option: $1
28570 Try \`$0 --help' for more information." >&2;}
28571    { (exit 1); exit 1; }; };;
28572   --help | --hel | -h )
28573     echo "$ac_cs_usage"; exit 0 ;;
28574   --debug | --d* | -d )
28575     debug=: ;;
28576   --file | --fil | --fi | --f )
28577     shift
28578     CONFIG_FILES="$CONFIG_FILES $1"
28579     ac_need_defaults=false;;
28580   --header | --heade | --head | --hea )
28581     shift
28582     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28583     ac_need_defaults=false;;
28584
28585   # This is an error.
28586   -*) { { echo "$as_me:28586: error: unrecognized option: $1
28587 Try \`$0 --help' for more information." >&5
28588 echo "$as_me: error: unrecognized option: $1
28589 Try \`$0 --help' for more information." >&2;}
28590    { (exit 1); exit 1; }; } ;;
28591
28592   *) ac_config_targets="$ac_config_targets $1" ;;
28593
28594   esac
28595   shift
28596 done
28597
28598 exec 5>>config.log
28599 cat >&5 << _ACEOF
28600
28601 ## ----------------------- ##
28602 ## Running config.status.  ##
28603 ## ----------------------- ##
28604
28605 This file was extended by $as_me 2.52.20210105, executed with
28606   CONFIG_FILES    = $CONFIG_FILES
28607   CONFIG_HEADERS  = $CONFIG_HEADERS
28608   CONFIG_LINKS    = $CONFIG_LINKS
28609   CONFIG_COMMANDS = $CONFIG_COMMANDS
28610   > "$ac_cs_invocation"
28611 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28612
28613 _ACEOF
28614 EOF
28615
28616 cat >>"$CONFIG_STATUS" <<EOF
28617 #
28618 # INIT-COMMANDS section.
28619 #
28620
28621 ### Special initialization commands, used to pass information from the
28622 ### configuration-run into config.status
28623
28624 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28625 AWK="$AWK"
28626 CXX_NAME="$CXX_NAME"
28627 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28628 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28629 ECHO_LD="$ECHO_LD"
28630 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28631 FORM_NAME="$FORM_NAME"
28632 LDCONFIG="$LDCONFIG"
28633 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28634 LIB_NAME="$LIB_NAME"
28635 LIB_PREFIX="$LIB_PREFIX"
28636 LIB_SUBSETS="$LIB_SUBSETS"
28637 LIB_SUFFIX="$LIB_SUFFIX"
28638 LIB_TRACING="$LIB_TRACING"
28639 LN_S="$LN_S"
28640 MAKE_TERMINFO="$MAKE_TERMINFO"
28641 MENU_NAME="$MENU_NAME"
28642 NCURSES_MAJOR="$NCURSES_MAJOR"
28643 NCURSES_MINOR="$NCURSES_MINOR"
28644 NCURSES_OSPEED="$NCURSES_OSPEED"
28645 NCURSES_PATCH="$NCURSES_PATCH"
28646 PANEL_NAME="$PANEL_NAME"
28647 SRC_SUBDIRS="$SRC_SUBDIRS"
28648 TERMINFO="$TERMINFO"
28649 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28650 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28651 TICS_NAME="$TICS_NAME"
28652 TICS_SUFFIX="$TICS_SUFFIX"
28653 TIC_PATH="$TIC_PATH"
28654 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28655 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28656 TINFO_NAME="$TINFO_NAME"
28657 TINFO_SUFFIX="$TINFO_SUFFIX"
28658 UNALTERED_SYMS="$UNALTERED_SYMS"
28659 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28660 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28661 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28662 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28663 WILDCARD_SYMS="$WILDCARD_SYMS"
28664 WITH_CURSES_H="$with_curses_h"
28665 WITH_ECHO="${enable_echo:=yes}"
28666 WITH_OVERWRITE="$with_overwrite"
28667 cf_LIST_MODELS="$cf_list_models"
28668 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
28669 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
28670 cf_cv_abi_version="$cf_cv_abi_version"
28671 cf_cv_do_relink="$cf_cv_do_relink"
28672 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28673 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28674 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28675 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28676 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28677 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28678 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28679 cf_cv_rel_version="$cf_cv_rel_version"
28680 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28681 cf_cv_shared_soname='$cf_cv_shared_soname'
28682 cf_cv_shlib_version="$cf_cv_shlib_version"
28683 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28684 cf_cv_system_name="$cf_cv_system_name"
28685 cf_cv_term_driver="$with_term_driver"
28686 cf_with_ada="$cf_with_ada"
28687 cf_with_cxx_binding="$cf_with_cxx_binding"
28688 cf_with_db_install="$cf_with_db_install"
28689 cf_with_manpages="$cf_with_manpages"
28690 cf_with_tests="$cf_with_tests"
28691 host="$host"
28692 target="$target"
28693 with_shared_cxx="$with_shared_cxx"
28694
28695 EOF
28696
28697 cat >>"$CONFIG_STATUS" <<\EOF
28698 for ac_config_target in $ac_config_targets
28699 do
28700   case "$ac_config_target" in
28701   # Handling of arguments.
28702   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28703   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28704   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28705   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28706   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28707   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28708   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28709   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28710   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28711   *) { { echo "$as_me:28711: error: invalid argument: $ac_config_target" >&5
28712 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28713    { (exit 1); exit 1; }; };;
28714   esac
28715 done
28716
28717 # If the user did not use the arguments to specify the items to instantiate,
28718 # then the envvar interface is used.  Set only those that are not.
28719 # We use the long form for the default assignment because of an extremely
28720 # bizarre bug on SunOS 4.1.3.
28721 if "$ac_need_defaults"; then
28722   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28723   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28724   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28725 fi
28726
28727 # Create a temporary directory, and hook for its removal unless debugging.
28728 $debug ||
28729 {
28730   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28731   trap '{ (exit 1); exit 1; }' 1 2 13 15
28732 }
28733
28734 # Create a (secure) tmp directory for tmp files.
28735 : ${TMPDIR=/tmp}
28736 {
28737   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28738   test -n "$tmp" && test -d "$tmp"
28739 }  ||
28740 {
28741   tmp=$TMPDIR/cs$$-$RANDOM
28742   (umask 077 && mkdir $tmp)
28743 } ||
28744 {
28745    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28746    { (exit 1); exit 1; }
28747 }
28748
28749 EOF
28750
28751 cat >>"$CONFIG_STATUS" <<EOF
28752
28753 #
28754 # CONFIG_FILES section.
28755 #
28756
28757 # No need to generate the scripts if there are no CONFIG_FILES.
28758 # This happens for instance when ./config.status config.h
28759 if test -n "\$CONFIG_FILES"; then
28760   # Protect against being on the right side of a sed subst in config.status.
28761   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
28762    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
28763 s,@SHELL@,$SHELL,;t t
28764 s,@exec_prefix@,$exec_prefix,;t t
28765 s,@prefix@,$prefix,;t t
28766 s,@program_transform_name@,$program_transform_name,;t t
28767 s,@bindir@,$bindir,;t t
28768 s,@sbindir@,$sbindir,;t t
28769 s,@libexecdir@,$libexecdir,;t t
28770 s,@datarootdir@,$datarootdir,;t t
28771 s,@datadir@,$datadir,;t t
28772 s,@sysconfdir@,$sysconfdir,;t t
28773 s,@sharedstatedir@,$sharedstatedir,;t t
28774 s,@localstatedir@,$localstatedir,;t t
28775 s,@runstatedir@,$runstatedir,;t t
28776 s,@libdir@,$libdir,;t t
28777 s,@includedir@,$includedir,;t t
28778 s,@oldincludedir@,$oldincludedir,;t t
28779 s,@infodir@,$infodir,;t t
28780 s,@mandir@,$mandir,;t t
28781 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
28782 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
28783 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
28784 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
28785 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
28786 s,@build_alias@,$build_alias,;t t
28787 s,@host_alias@,$host_alias,;t t
28788 s,@target_alias@,$target_alias,;t t
28789 s,@ECHO_C@,$ECHO_C,;t t
28790 s,@ECHO_N@,$ECHO_N,;t t
28791 s,@ECHO_T@,$ECHO_T,;t t
28792 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
28793 s,@DEFS@,$DEFS,;t t
28794 s,@LIBS@,$LIBS,;t t
28795 s,@top_builddir@,$top_builddir,;t t
28796 s,@GREP@,$GREP,;t t
28797 s,@EGREP@,$EGREP,;t t
28798 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
28799 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
28800 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
28801 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
28802 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
28803 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
28804 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
28805 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
28806 s,@VERSION@,$VERSION,;t t
28807 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
28808 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
28809 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
28810 s,@PACKAGE@,$PACKAGE,;t t
28811 s,@build@,$build,;t t
28812 s,@build_cpu@,$build_cpu,;t t
28813 s,@build_vendor@,$build_vendor,;t t
28814 s,@build_os@,$build_os,;t t
28815 s,@host@,$host,;t t
28816 s,@host_cpu@,$host_cpu,;t t
28817 s,@host_vendor@,$host_vendor,;t t
28818 s,@host_os@,$host_os,;t t
28819 s,@target@,$target,;t t
28820 s,@target_cpu@,$target_cpu,;t t
28821 s,@target_vendor@,$target_vendor,;t t
28822 s,@target_os@,$target_os,;t t
28823 s,@FGREP@,$FGREP,;t t
28824 s,@CC@,$CC,;t t
28825 s,@CFLAGS@,$CFLAGS,;t t
28826 s,@LDFLAGS@,$LDFLAGS,;t t
28827 s,@CPPFLAGS@,$CPPFLAGS,;t t
28828 s,@ac_ct_CC@,$ac_ct_CC,;t t
28829 s,@EXEEXT@,$EXEEXT,;t t
28830 s,@OBJEXT@,$OBJEXT,;t t
28831 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
28832 s,@CPP@,$CPP,;t t
28833 s,@LDCONFIG@,$LDCONFIG,;t t
28834 s,@CXX@,$CXX,;t t
28835 s,@CXXFLAGS@,$CXXFLAGS,;t t
28836 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
28837 s,@AWK@,$AWK,;t t
28838 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
28839 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
28840 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
28841 s,@LINT@,$LINT,;t t
28842 s,@LINT_OPTS@,$LINT_OPTS,;t t
28843 s,@LN_S@,$LN_S,;t t
28844 s,@cf_config_suffix@,$cf_config_suffix,;t t
28845 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
28846 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
28847 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
28848 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
28849 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
28850 s,@SET_MAKE@,$SET_MAKE,;t t
28851 s,@CTAGS@,$CTAGS,;t t
28852 s,@ETAGS@,$ETAGS,;t t
28853 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
28854 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
28855 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
28856 s,@RANLIB@,$RANLIB,;t t
28857 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
28858 s,@LD@,$LD,;t t
28859 s,@ac_ct_LD@,$ac_ct_LD,;t t
28860 s,@AR@,$AR,;t t
28861 s,@ac_ct_AR@,$ac_ct_AR,;t t
28862 s,@NM@,$NM,;t t
28863 s,@ac_ct_NM@,$ac_ct_NM,;t t
28864 s,@ARFLAGS@,$ARFLAGS,;t t
28865 s,@DESTDIR@,$DESTDIR,;t t
28866 s,@BUILD_CC@,$BUILD_CC,;t t
28867 s,@BUILD_CPP@,$BUILD_CPP,;t t
28868 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
28869 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
28870 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
28871 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
28872 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
28873 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
28874 s,@cf_list_models@,$cf_list_models,;t t
28875 s,@ABI_VERSION@,$ABI_VERSION,;t t
28876 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
28877 s,@LIBTOOL@,$LIBTOOL,;t t
28878 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
28879 s,@LT_UNDEF@,$LT_UNDEF,;t t
28880 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
28881 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
28882 s,@LIB_CREATE@,$LIB_CREATE,;t t
28883 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
28884 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
28885 s,@LIB_PREP@,$LIB_PREP,;t t
28886 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
28887 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
28888 s,@LIB_LINK@,$LIB_LINK,;t t
28889 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
28890 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
28891 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
28892 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
28893 s,@TICS_NAME@,$TICS_NAME,;t t
28894 s,@TINFO_NAME@,$TINFO_NAME,;t t
28895 s,@LIB_NAME@,$LIB_NAME,;t t
28896 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
28897 s,@CC_G_OPT@,$CC_G_OPT,;t t
28898 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
28899 s,@LD_MODEL@,$LD_MODEL,;t t
28900 s,@shlibdir@,$shlibdir,;t t
28901 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
28902 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
28903 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
28904 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
28905 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
28906 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
28907 s,@LINK_PROGS@,$LINK_PROGS,;t t
28908 s,@LINK_TESTS@,$LINK_TESTS,;t t
28909 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
28910 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
28911 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
28912 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
28913 s,@RPATH_LIST@,$RPATH_LIST,;t t
28914 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
28915 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
28916 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
28917 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
28918 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
28919 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
28920 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
28921 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
28922 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
28923 s,@TIC@,$TIC,;t t
28924 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
28925 s,@INFOCMP@,$INFOCMP,;t t
28926 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
28927 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
28928 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
28929 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
28930 s,@XTERM_KBS@,$XTERM_KBS,;t t
28931 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
28932 s,@TERMINFO@,$TERMINFO,;t t
28933 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
28934 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
28935 s,@TERMPATH@,$TERMPATH,;t t
28936 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
28937 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
28938 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
28939 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
28940 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
28941 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
28942 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
28943 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
28944 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
28945 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
28946 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
28947 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
28948 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
28949 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
28950 s,@RGB_PATH@,$RGB_PATH,;t t
28951 s,@no_x11_rgb@,$no_x11_rgb,;t t
28952 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
28953 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
28954 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
28955 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
28956 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
28957 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
28958 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
28959 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
28960 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
28961 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
28962 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
28963 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
28964 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
28965 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
28966 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
28967 s,@PTHREAD@,$PTHREAD,;t t
28968 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
28969 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
28970 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
28971 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
28972 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
28973 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
28974 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
28975 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
28976 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
28977 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
28978 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
28979 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
28980 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
28981 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
28982 s,@ECHO_LT@,$ECHO_LT,;t t
28983 s,@ECHO_LD@,$ECHO_LD,;t t
28984 s,@RULE_CC@,$RULE_CC,;t t
28985 s,@SHOW_CC@,$SHOW_CC,;t t
28986 s,@ECHO_CC@,$ECHO_CC,;t t
28987 s,@ECHO_LINK@,$ECHO_LINK,;t t
28988 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
28989 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
28990 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
28991 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
28992 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
28993 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
28994 s,@ADAFLAGS@,$ADAFLAGS,;t t
28995 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
28996 s,@ADA_TRACE@,$ADA_TRACE,;t t
28997 s,@MATH_LIB@,$MATH_LIB,;t t
28998 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
28999 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29000 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29001 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29002 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29003 s,@TEST_LIBS@,$TEST_LIBS,;t t
29004 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29005 s,@CXXCPP@,$CXXCPP,;t t
29006 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29007 s,@CXX_AR@,$CXX_AR,;t t
29008 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29009 s,@CXXLIBS@,$CXXLIBS,;t t
29010 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29011 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29012 s,@M4_exists@,$M4_exists,;t t
29013 s,@cf_ada_make@,$cf_ada_make,;t t
29014 s,@cf_ada_config@,$cf_ada_config,;t t
29015 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29016 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29017 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29018 s,@cf_compile_generics@,$cf_compile_generics,;t t
29019 s,@cf_generic_objects@,$cf_generic_objects,;t t
29020 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29021 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29022 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29023 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29024 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29025 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29026 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29027 s,@cf_ada_package@,$cf_ada_package,;t t
29028 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29029 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29030 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29031 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29032 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29033 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29034 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29035 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29036 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29037 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29038 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29039 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29040 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29041 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29042 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29043 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29044 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29045 s,@TICS_LIBS@,$TICS_LIBS,;t t
29046 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29047 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29048 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29049 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29050 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29051 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29052 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29053 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29054 s,@includesubdir@,$includesubdir,;t t
29055 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29056 s,@TICS_LIST@,$TICS_LIST,;t t
29057 s,@TINFO_LIST@,$TINFO_LIST,;t t
29058 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29059 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29060 s,@FORM_NAME@,$FORM_NAME,;t t
29061 s,@MENU_NAME@,$MENU_NAME,;t t
29062 s,@PANEL_NAME@,$PANEL_NAME,;t t
29063 s,@CXX_NAME@,$CXX_NAME,;t t
29064 s,@TEST_ARGS@,$TEST_ARGS,;t t
29065 s,@TEST_DEPS@,$TEST_DEPS,;t t
29066 s,@TEST_ARG2@,$TEST_ARG2,;t t
29067 s,@TEST_DEP2@,$TEST_DEP2,;t t
29068 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29069 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29070 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29071 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29072 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29073 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29074 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29075 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29076 s,@cross_compiling@,$cross_compiling,;t t
29077 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29078 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29079 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29080 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29081 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29082 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29083 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29084 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29085 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29086 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29087 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29088 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29089 CEOF
29090
29091 EOF
29092
29093   cat >>"$CONFIG_STATUS" <<\EOF
29094   # Split the substitutions into bite-sized pieces for seds with
29095   # small command number limits, like on Digital OSF/1 and HP-UX.
29096   ac_max_sed_lines=48
29097   ac_sed_frag=1 # Number of current file.
29098   ac_beg=1 # First line for current file.
29099   ac_end=$ac_max_sed_lines # Line after last line for current file.
29100   ac_more_lines=:
29101   ac_sed_cmds=
29102   while "$ac_more_lines"; do
29103     if test "$ac_beg" -gt 1; then
29104       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29105     else
29106       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29107     fi
29108     if test ! -s $tmp/subs.frag; then
29109       ac_more_lines=false
29110     else
29111       # The purpose of the label and of the branching condition is to
29112       # speed up the sed processing (if there are no `@' at all, there
29113       # is no need to browse any of the substitutions).
29114       # These are the two extra sed commands mentioned above.
29115       (echo ':t
29116   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29117       # It is possible to make a multiline substitution using escaped newlines.
29118       # Ensure that we do not split the substitution between script fragments.
29119       ac_BEG=$ac_end
29120       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29121       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29122       if test -s $tmp/subs.next; then
29123         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29124         if test ! -s $tmp/subs.edit; then
29125           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29126           if test ! -s $tmp/subs.edit; then
29127             if test "$ac_beg" -gt 1; then
29128               ac_end=`expr "$ac_end" - 1`
29129               continue
29130             fi
29131           fi
29132         fi
29133       fi
29134
29135       if test -z "$ac_sed_cmds"; then
29136         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29137       else
29138         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29139       fi
29140       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29141       ac_beg=$ac_end
29142       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29143     fi
29144   done
29145   if test -z "$ac_sed_cmds"; then
29146     ac_sed_cmds=cat
29147   fi
29148 fi # test -n "$CONFIG_FILES"
29149
29150 EOF
29151 cat >>"$CONFIG_STATUS" <<\EOF
29152 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29153   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29154   case "$ac_file" in
29155   - | *:- | *:-:* ) # input from stdin
29156         cat >$tmp/stdin
29157         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29158         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29159   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29160         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29161   * )   ac_file_in=$ac_file.in ;;
29162   esac
29163
29164   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29165   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29166          X"$ac_file" : 'X\(//\)[^/]' \| \
29167          X"$ac_file" : 'X\(//\)$' \| \
29168          X"$ac_file" : 'X\(/\)' \| \
29169          .     : '\(.\)' 2>/dev/null ||
29170 echo X"$ac_file" |
29171     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29172           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29173           /^X\(\/\/\)$/{ s//\1/; q; }
29174           /^X\(\/\).*/{ s//\1/; q; }
29175           s/.*/./; q'`
29176   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29177     { case "$ac_dir" in
29178   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29179   *)                      as_incr_dir=.;;
29180 esac
29181 as_dummy="$ac_dir"
29182 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29183   case $as_mkdir_dir in
29184     # Skip DOS drivespec
29185     ?:) as_incr_dir=$as_mkdir_dir ;;
29186     *)
29187       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29188       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29189     ;;
29190   esac
29191 done; }
29192
29193     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29194     # A "../" for each directory in $ac_dir_suffix.
29195     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29196   else
29197     ac_dir_suffix= ac_dots=
29198   fi
29199
29200   case "$srcdir" in
29201   .)  ac_srcdir=.
29202       if test -z "$ac_dots"; then
29203          ac_top_srcdir=.
29204       else
29205          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29206       fi ;;
29207   [\\/]* | ?:[\\/]* )
29208       ac_srcdir="$srcdir$ac_dir_suffix";
29209       ac_top_srcdir="$srcdir" ;;
29210   *) # Relative path.
29211     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29212     ac_top_srcdir="$ac_dots$srcdir" ;;
29213   esac
29214
29215   case $INSTALL in
29216   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29217   *) ac_INSTALL=$ac_dots$INSTALL ;;
29218   esac
29219
29220   if test x"$ac_file" != x-; then
29221     { echo "$as_me:29221: creating $ac_file" >&5
29222 echo "$as_me: creating $ac_file" >&6;}
29223     rm -f "$ac_file"
29224   fi
29225   # Let's still pretend it is `configure' which instantiates (i.e., don't
29226   # use $as_me), people would be surprised to read:
29227   #    /* config.h.  Generated automatically by config.status.  */
29228   configure_input="Generated automatically from `echo $ac_file_in |
29229                                                  sed 's,.*/,,'` by configure."
29230
29231   # First look for the input files in the build tree, otherwise in the
29232   # src tree.
29233   ac_file_inputs=`IFS=:
29234     for f in $ac_file_in; do
29235       case $f in
29236       -) echo $tmp/stdin ;;
29237       [\\/$]*)
29238          # Absolute (can't be DOS-style, as IFS=:)
29239          test -f "$f" || { { echo "$as_me:29239: error: cannot find input file: $f" >&5
29240 echo "$as_me: error: cannot find input file: $f" >&2;}
29241    { (exit 1); exit 1; }; }
29242          echo $f;;
29243       *) # Relative
29244          if test -f "$f"; then
29245            # Build tree
29246            echo $f
29247          elif test -f "$srcdir/$f"; then
29248            # Source tree
29249            echo "$srcdir/$f"
29250          else
29251            # /dev/null tree
29252            { { echo "$as_me:29252: error: cannot find input file: $f" >&5
29253 echo "$as_me: error: cannot find input file: $f" >&2;}
29254    { (exit 1); exit 1; }; }
29255          fi;;
29256       esac
29257     done` || { (exit 1); exit 1; }
29258 EOF
29259 cat >>"$CONFIG_STATUS" <<\EOF
29260   ac_warn_datarootdir=no
29261   if test x"$ac_file" != x-; then
29262     for ac_item in $ac_file_inputs
29263     do
29264       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29265       if test -n "$ac_seen"; then
29266         ac_used=`grep '@datarootdir@' "$ac_item"`
29267         if test -z "$ac_used"; then
29268           { echo "$as_me:29268: WARNING: datarootdir was used implicitly but not set:
29269 $ac_seen" >&5
29270 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29271 $ac_seen" >&2;}
29272           ac_warn_datarootdir=yes
29273         fi
29274       fi
29275       ac_seen=`grep '${datarootdir}' "$ac_item"`
29276       if test -n "$ac_seen"; then
29277         { echo "$as_me:29277: WARNING: datarootdir was used explicitly but not set:
29278 $ac_seen" >&5
29279 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29280 $ac_seen" >&2;}
29281         ac_warn_datarootdir=yes
29282       fi
29283     done
29284   fi
29285
29286 if test "x$ac_warn_datarootdir" = xyes; then
29287   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29288 fi
29289
29290 EOF
29291 cat >>"$CONFIG_STATUS" <<EOF
29292   sed "$ac_vpsub
29293 $extrasub
29294 EOF
29295 cat >>"$CONFIG_STATUS" <<\EOF
29296 :t
29297 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29298 s,@configure_input@,$configure_input,;t t
29299 s,@srcdir@,$ac_srcdir,;t t
29300 s,@top_srcdir@,$ac_top_srcdir,;t t
29301 s,@INSTALL@,$ac_INSTALL,;t t
29302 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29303   rm -f $tmp/stdin
29304   if test x"$ac_file" != x-; then
29305     cp "$tmp/out" "$ac_file"
29306
29307     for ac_name in prefix exec_prefix datarootdir
29308     do
29309         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29310         if test -n "$ac_seen"; then
29311             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29312             if test -z "$ac_init"; then
29313               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29314               { echo "$as_me:29314: WARNING: Variable $ac_name is used but was not set:
29315 $ac_seen" >&5
29316 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29317 $ac_seen" >&2;}
29318             fi
29319         fi
29320     done
29321     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29322     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29323     if test -s $tmp/out; then
29324       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29325       { echo "$as_me:29325: WARNING: Some variables may not be substituted:
29326 $ac_seen" >&5
29327 echo "$as_me: WARNING: Some variables may not be substituted:
29328 $ac_seen" >&2;}
29329     fi
29330   else
29331     cat $tmp/out
29332   fi
29333   rm -f $tmp/out
29334
29335 done
29336 EOF
29337 cat >>"$CONFIG_STATUS" <<\EOF
29338
29339 #
29340 # CONFIG_HEADER section.
29341 #
29342
29343 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29344 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29345 #
29346 # ac_d sets the value in "#define NAME VALUE" lines.
29347 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29348 ac_dB='[        ].*$,\1#\2'
29349 ac_dC=' '
29350 ac_dD=',;t'
29351 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29352 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29353 ac_iB='\([      ]\),\1#\2define\3'
29354 ac_iC=' '
29355 ac_iD='\4,;t'
29356 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29357 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29358 ac_uB='$,\1#\2define\3'
29359 ac_uC=' '
29360 ac_uD=',;t'
29361
29362 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29363   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29364   case "$ac_file" in
29365   - | *:- | *:-:* ) # input from stdin
29366         cat >$tmp/stdin
29367         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29368         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29369   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29370         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29371   * )   ac_file_in=$ac_file.in ;;
29372   esac
29373
29374   test x"$ac_file" != x- && { echo "$as_me:29374: creating $ac_file" >&5
29375 echo "$as_me: creating $ac_file" >&6;}
29376
29377   # First look for the input files in the build tree, otherwise in the
29378   # src tree.
29379   ac_file_inputs=`IFS=:
29380     for f in $ac_file_in; do
29381       case $f in
29382       -) echo $tmp/stdin ;;
29383       [\\/$]*)
29384          # Absolute (can't be DOS-style, as IFS=:)
29385          test -f "$f" || { { echo "$as_me:29385: error: cannot find input file: $f" >&5
29386 echo "$as_me: error: cannot find input file: $f" >&2;}
29387    { (exit 1); exit 1; }; }
29388          echo $f;;
29389       *) # Relative
29390          if test -f "$f"; then
29391            # Build tree
29392            echo $f
29393          elif test -f "$srcdir/$f"; then
29394            # Source tree
29395            echo "$srcdir/$f"
29396          else
29397            # /dev/null tree
29398            { { echo "$as_me:29398: error: cannot find input file: $f" >&5
29399 echo "$as_me: error: cannot find input file: $f" >&2;}
29400    { (exit 1); exit 1; }; }
29401          fi;;
29402       esac
29403     done` || { (exit 1); exit 1; }
29404   # Remove the trailing spaces.
29405   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29406
29407 EOF
29408
29409 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29410 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29411 # be either 'cat' or 'sort'.
29412 cat confdefs.h | uniq >conftest.vals
29413
29414 # Break up conftest.vals because some shells have a limit on
29415 # the size of here documents, and old seds have small limits too.
29416
29417 rm -f conftest.tail
29418 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29419 while grep . conftest.vals >/dev/null
29420 do
29421   # Write chunks of a limited-size here document to conftest.frag.
29422   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29423   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29424   echo 'CEOF' >> "$CONFIG_STATUS"
29425   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29426   rm -f conftest.vals
29427   mv conftest.tail conftest.vals
29428 done
29429 rm -f conftest.vals
29430
29431 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29432 # marker @DEFS@.
29433 echo '  cat >> conftest.edit <<CEOF
29434 /@DEFS@/r conftest.frag
29435 /@DEFS@/d
29436 CEOF
29437 sed -f conftest.edit $tmp/in > $tmp/out
29438 rm -f $tmp/in
29439 mv $tmp/out $tmp/in
29440 rm -f conftest.edit conftest.frag
29441 ' >> "$CONFIG_STATUS"
29442
29443 cat >>"$CONFIG_STATUS" <<\EOF
29444   # Let's still pretend it is `configure' which instantiates (i.e., don't
29445   # use $as_me), people would be surprised to read:
29446   #    /* config.h.  Generated automatically by config.status.  */
29447   if test x"$ac_file" = x-; then
29448     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29449   else
29450     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29451   fi
29452   cat $tmp/in >>$tmp/config.h
29453   rm -f $tmp/in
29454   if test x"$ac_file" != x-; then
29455     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29456       { echo "$as_me:29456: $ac_file is unchanged" >&5
29457 echo "$as_me: $ac_file is unchanged" >&6;}
29458     else
29459       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29460          X"$ac_file" : 'X\(//\)[^/]' \| \
29461          X"$ac_file" : 'X\(//\)$' \| \
29462          X"$ac_file" : 'X\(/\)' \| \
29463          .     : '\(.\)' 2>/dev/null ||
29464 echo X"$ac_file" |
29465     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29466           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29467           /^X\(\/\/\)$/{ s//\1/; q; }
29468           /^X\(\/\).*/{ s//\1/; q; }
29469           s/.*/./; q'`
29470       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29471         { case "$ac_dir" in
29472   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29473   *)                      as_incr_dir=.;;
29474 esac
29475 as_dummy="$ac_dir"
29476 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29477   case $as_mkdir_dir in
29478     # Skip DOS drivespec
29479     ?:) as_incr_dir=$as_mkdir_dir ;;
29480     *)
29481       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29482       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29483     ;;
29484   esac
29485 done; }
29486
29487       fi
29488       rm -f "$ac_file"
29489       mv "$tmp/config.h" "$ac_file"
29490     fi
29491   else
29492     cat $tmp/config.h
29493     rm -f $tmp/config.h
29494   fi
29495 done
29496 EOF
29497 cat >>"$CONFIG_STATUS" <<\EOF
29498 #
29499 # CONFIG_COMMANDS section.
29500 #
29501 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29502   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29503   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29504
29505   case "$ac_dest" in
29506     default )
29507 if test "x$cf_with_tests" != xno ; then
29508
29509 for cf_dir in test
29510 do
29511         if test ! -d "$srcdir/$cf_dir" ; then
29512                 continue
29513         elif test -f "$srcdir/$cf_dir/programs" ; then
29514                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29515         fi
29516 done
29517
29518 fi
29519
29520 cf_prefix=$LIB_PREFIX
29521
29522 case "$cf_cv_shlib_version" in
29523 (cygdll|msysdll|mingw|msvcdll)
29524         TINFO_NAME=$TINFO_ARG_SUFFIX
29525         TINFO_SUFFIX=.dll
29526         ;;
29527 esac
29528
29529 if test -n "$TINFO_SUFFIX" ; then
29530         case "$TINFO_SUFFIX" in
29531         (tw*)
29532                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29533                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29534                 ;;
29535         (t*)
29536                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29537                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29538                 ;;
29539         (w*)
29540                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29541                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29542                 ;;
29543         esac
29544 fi
29545
29546 for cf_dir in $SRC_SUBDIRS
29547 do
29548         if test ! -d "$srcdir/$cf_dir" ; then
29549                 continue
29550         elif test -f "$srcdir/$cf_dir/modules" ; then
29551
29552                 SHARED_LIB=
29553                 Libs_To_Make=
29554                 cf_awk_program=
29555                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29556                 then
29557                         cf_awk_program="$cf_awk_program\
29558 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29559 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29560 "
29561                 fi
29562
29563                 if test "x$WILDCARD_SYMS" = xno
29564                 then
29565                         cf_awk_program="$cf_awk_program\
29566 /[      ]_\\*;/ { skip=1; next; }\
29567 "
29568                 fi
29569
29570                 if test "x$cf_awk_program" != "x"
29571                 then
29572                         cat >>$cf_dir/Makefile <<CF_EOF
29573
29574 # Generated by CF_LIB_RULES
29575 resulting.map: $UNALTERED_SYMS
29576         $AWK 'BEGIN { skip = 1; last=""; } \
29577 $cf_awk_program \
29578 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29579  skip = 0; last = \$\$0; } \
29580 END { print last; }' < "$UNALTERED_SYMS" >\$@
29581
29582 distclean::
29583         rm -f resulting.map
29584 CF_EOF
29585                 fi
29586
29587                 for cf_item in $cf_LIST_MODELS
29588                 do
29589
29590         case X$cf_item in
29591         (Xlibtool)
29592                 cf_suffix='.la'
29593                 cf_depsuf=$cf_suffix
29594                 ;;
29595         (Xdebug)
29596                 case "$cf_cv_system_name" in
29597                 (*-msvc*)
29598                         cf_suffix='_g.lib'
29599                         ;;
29600                 (*)
29601                         cf_suffix='_g.a'
29602                         ;;
29603                 esac
29604                 cf_depsuf=$cf_suffix
29605                 ;;
29606         (Xprofile)
29607                 case "$cf_cv_system_name" in
29608                 (*-msvc*)
29609                         cf_suffix='_p.lib'
29610                         ;;
29611                 (*)
29612                         cf_suffix='_p.a'
29613                         ;;
29614                 esac
29615                 cf_depsuf=$cf_suffix
29616                 ;;
29617         (Xshared)
29618                 case "$cf_cv_system_name" in
29619                 (aix[5-7]*)
29620                         cf_suffix='.so'
29621                         cf_depsuf=$cf_suffix
29622                         ;;
29623                 (*-msvc*)
29624                         cf_suffix='.dll'
29625                         cf_depsuf='.dll.lib'
29626                         ;;
29627                 (cygwin*|msys*|mingw*)
29628                         cf_suffix='.dll'
29629                         cf_depsuf='.dll.a'
29630                         ;;
29631                 (darwin*)
29632                         cf_suffix='.dylib'
29633                         cf_depsuf=$cf_suffix
29634                         ;;
29635                 (hpux*)
29636                         case "$target" in
29637                         (ia64*)
29638                                 cf_suffix='.so'
29639                                 cf_depsuf=$cf_suffix
29640                                 ;;
29641                         (*)
29642                                 cf_suffix='.sl'
29643                                 cf_depsuf=$cf_suffix
29644                                 ;;
29645                         esac
29646                         ;;
29647                 (*)
29648                         cf_suffix='.so'
29649                         cf_depsuf=$cf_suffix
29650                         ;;
29651                 esac
29652                 ;;
29653         (*)
29654                 case "$target" in
29655                 (*-msvc*)
29656                         cf_suffix='.lib'
29657                         ;;
29658                 (*)
29659                         cf_suffix='.a'
29660                         ;;
29661                 esac
29662                 cf_depsuf=$cf_suffix
29663                 ;;
29664         esac
29665         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29666         then
29667                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29668                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29669         fi
29670
29671                         if test "$cf_dir" = "c++"
29672                         then
29673
29674 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29675
29676 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29677
29678                         else
29679
29680 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29681
29682 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29683
29684                         fi
29685                         test -z "$cf_libname" && cf_libname="$cf_dir"
29686                         if test "$cf_item" = shared ; then
29687                                 if test -n "${LIB_SUFFIX}"
29688                                 then
29689                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29690                                 else
29691                                         cf_shared_suffix="$cf_suffix"
29692                                 fi
29693                                 if test "$cf_cv_do_symlinks" = yes ; then
29694                                         cf_version_name=
29695
29696                                         case "$cf_cv_shlib_version" in
29697                                         (rel)
29698                                                 cf_version_name=REL_VERSION
29699                                                 ;;
29700                                         (abi)
29701                                                 cf_version_name=ABI_VERSION
29702                                                 ;;
29703                                         esac
29704
29705                                         if test -n "$cf_version_name"
29706                                         then
29707                                                 case "$cf_cv_system_name" in
29708                                                 (darwin*)
29709                                                         # "w", etc?
29710                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29711                                                         ;;
29712                                                 (*)
29713                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29714                                                         ;;
29715                                                 esac
29716                                         fi
29717                                         if test -n "${USE_LIB_SUFFIX}"
29718                                         then
29719                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29720                                         else
29721                                                 cf_shared_suffix="$cf_suffix"
29722                                         fi
29723                                 fi
29724                                 # cygwin needs import library, and has unique naming convention
29725                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29726                                 # use 'cyg' prefix for shared lib.
29727                                 case "$cf_cv_shlib_version" in
29728                                 (cygdll)
29729                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29730                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29731                                         ;;
29732                                 (msysdll)
29733                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29734                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29735                                         ;;
29736                                 (mingw)
29737                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29738                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29739                                         ;;
29740                                 (msvcdll)
29741                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29742                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29743                                         ;;
29744                                 (*)
29745                                         cf_add_lib=
29746                                         ;;
29747                                 esac
29748                                 if test -n "$cf_add_lib"
29749                                 then
29750                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29751                                         continue
29752                                 fi
29753                         fi
29754                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
29755                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29756                 done
29757
29758                 if test "$cf_dir" = ncurses ; then
29759                         cf_subsets="$LIB_SUBSETS"
29760                         cf_r_parts="$cf_subsets"
29761                         cf_liblist="$Libs_To_Make"
29762
29763                         while test -n "$cf_r_parts"
29764                         do
29765                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
29766                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
29767                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
29768                                         cf_add_lib=
29769                                         case "$cf_l_parts" in
29770                                         (*termlib*)
29771                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
29772                                                 ;;
29773                                         (*ticlib*)
29774                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
29775                                                 ;;
29776                                         (*)
29777                                                 break
29778                                                 ;;
29779                                         esac
29780                                         if test -n "$cf_add_lib"; then
29781                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
29782                                         fi
29783                                 else
29784                                         break
29785                                 fi
29786                         done
29787                 else
29788                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
29789                 fi
29790
29791                 if test "$cf_dir" = c++; then
29792                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
29793                                 cf_list=
29794                                 for cf_item in $Libs_To_Make
29795                                 do
29796                                         case "$cf_item" in
29797                                         (*.a)
29798                                                 ;;
29799                                         (*)
29800                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
29801                                                 ;;
29802                                         esac
29803                                         for cf_test in $cf_list
29804                                         do
29805                                                 if test "$cf_test" = "$cf_item"
29806                                                 then
29807                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
29808                                                         cf_item=
29809                                                         break
29810                                                 fi
29811                                         done
29812                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
29813                                 done
29814                                 Libs_To_Make="$cf_list"
29815                         fi
29816                 fi
29817
29818                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
29819                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
29820                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
29821                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
29822
29823                 $AWK -f "$srcdir/mk-0th.awk" \
29824                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
29825                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
29826
29827                 for cf_subset in $cf_subsets
29828                 do
29829                         cf_subdirs=
29830                         for cf_item in $cf_LIST_MODELS
29831                         do
29832
29833                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
29834
29835 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29836
29837                         CXX_MODEL=$cf_ITEM
29838                         if test "$CXX_MODEL" = SHARED; then
29839                                 case "$cf_cv_shlib_version" in
29840                                 (cygdll|msysdll|mingw|msvcdll)
29841                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
29842
29843 echo "${as_me:-configure}:29843: testing overriding CXX_MODEL to SHARED ..." 1>&5
29844
29845                                         with_shared_cxx=yes
29846                                         ;;
29847                                 (*)
29848                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
29849                                         ;;
29850                                 esac
29851                         fi
29852
29853         case X$cf_item in
29854         (Xlibtool)
29855                 cf_suffix='.la'
29856                 cf_depsuf=$cf_suffix
29857                 ;;
29858         (Xdebug)
29859                 case "$cf_cv_system_name" in
29860                 (*-msvc*)
29861                         cf_suffix='_g.lib'
29862                         ;;
29863                 (*)
29864                         cf_suffix='_g.a'
29865                         ;;
29866                 esac
29867                 cf_depsuf=$cf_suffix
29868                 ;;
29869         (Xprofile)
29870                 case "$cf_cv_system_name" in
29871                 (*-msvc*)
29872                         cf_suffix='_p.lib'
29873                         ;;
29874                 (*)
29875                         cf_suffix='_p.a'
29876                         ;;
29877                 esac
29878                 cf_depsuf=$cf_suffix
29879                 ;;
29880         (Xshared)
29881                 case "$cf_cv_system_name" in
29882                 (aix[5-7]*)
29883                         cf_suffix='.so'
29884                         cf_depsuf=$cf_suffix
29885                         ;;
29886                 (*-msvc*)
29887                         cf_suffix='.dll'
29888                         cf_depsuf='.dll.lib'
29889                         ;;
29890                 (cygwin*|msys*|mingw*)
29891                         cf_suffix='.dll'
29892                         cf_depsuf='.dll.a'
29893                         ;;
29894                 (darwin*)
29895                         cf_suffix='.dylib'
29896                         cf_depsuf=$cf_suffix
29897                         ;;
29898                 (hpux*)
29899                         case "$target" in
29900                         (ia64*)
29901                                 cf_suffix='.so'
29902                                 cf_depsuf=$cf_suffix
29903                                 ;;
29904                         (*)
29905                                 cf_suffix='.sl'
29906                                 cf_depsuf=$cf_suffix
29907                                 ;;
29908                         esac
29909                         ;;
29910                 (*)
29911                         cf_suffix='.so'
29912                         cf_depsuf=$cf_suffix
29913                         ;;
29914                 esac
29915                 ;;
29916         (*)
29917                 case "$target" in
29918                 (*-msvc*)
29919                         cf_suffix='.lib'
29920                         ;;
29921                 (*)
29922                         cf_suffix='.a'
29923                         ;;
29924                 esac
29925                 cf_depsuf=$cf_suffix
29926                 ;;
29927         esac
29928         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29929         then
29930                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29931                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29932         fi
29933
29934         case $cf_item in
29935         (libtool) cf_subdir='obj_lo'  ;;
29936         (normal)  cf_subdir='objects' ;;
29937         (debug)   cf_subdir='obj_g' ;;
29938         (profile) cf_subdir='obj_p' ;;
29939         (shared)
29940                 case "$cf_cv_system_name" in
29941                 (cygwin|msys)
29942                         cf_subdir='objects' ;;
29943                 (*)
29944                         cf_subdir='obj_s' ;;
29945                 esac
29946         esac
29947
29948                         # Test for case where we build libtinfo with a different name.
29949                         cf_libname=$cf_dir
29950                         if test "$cf_dir" = ncurses ; then
29951                                 case "$cf_subset" in
29952                                 (*base*)
29953                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
29954                                         ;;
29955                                 (*termlib*)
29956                                         cf_libname=$TINFO_LIB_SUFFIX
29957                                         ;;
29958                                 (ticlib*)
29959                                         cf_libname=$TICS_LIB_SUFFIX
29960                                         ;;
29961                                 esac
29962                         elif test "$cf_dir" = c++ ; then
29963
29964 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29965
29966 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29967
29968                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29969                         else
29970
29971 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29972
29973 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29974
29975                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29976                         fi
29977                         if test -n "${USE_ARG_SUFFIX}" ; then
29978                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
29979                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
29980                         fi
29981
29982                         # These dependencies really are for development, not
29983                         # builds, but they are useful in porting, too.
29984                         cf_depend="../include/ncurses_cfg.h"
29985                         if test "$srcdir" = "."; then
29986                                 cf_reldir="."
29987                         else
29988                                 cf_reldir="\${srcdir}"
29989                         fi
29990
29991                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
29992                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
29993                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
29994                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
29995                         fi
29996
29997                         cf_dir_suffix=
29998                         old_cf_suffix="$cf_suffix"
29999                         if test "$cf_cv_shlib_version_infix" = yes ; then
30000                         if test -n "$USE_LIB_SUFFIX" ; then
30001                                 case "$USE_LIB_SUFFIX" in
30002                                 (tw*)
30003                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30004                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30005                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30006                                         ;;
30007                                 (t*)
30008                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30009                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30010                                         cf_dir_suffix=t$EXTRA_SUFFIX
30011                                         ;;
30012                                 (w*)
30013                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30014                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30015                                         cf_dir_suffix=w$EXTRA_SUFFIX
30016                                         ;;
30017                                 (*)
30018                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30019                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30020                                         cf_dir_suffix=$EXTRA_SUFFIX
30021                                         ;;
30022                                 esac
30023                         fi
30024                         fi
30025
30026                         $AWK -f "$srcdir/mk-1st.awk" \
30027                                 name=${cf_libname}${cf_dir_suffix} \
30028                                 traces=$LIB_TRACING \
30029                                 MODEL=$cf_ITEM \
30030                                 CXX_MODEL=$CXX_MODEL \
30031                                 model=$cf_subdir \
30032                                 prefix=$cf_prefix \
30033                                 suffix=$cf_suffix \
30034                                 subset=$cf_subset \
30035                                 driver=$cf_cv_term_driver \
30036                                 SymLink="$LN_S" \
30037                                 TermlibRoot=$TINFO_NAME \
30038                                 TermlibSuffix=$TINFO_SUFFIX \
30039                                 ShlibVer=$cf_cv_shlib_version \
30040                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30041                                 ReLink=${cf_cv_do_relink:-no} \
30042                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30043                                 DoLinks=$cf_cv_do_symlinks \
30044                                 rmSoLocs=$cf_cv_rm_so_locs \
30045                                 ldconfig="$LDCONFIG" \
30046                                 overwrite=$WITH_OVERWRITE \
30047                                 depend="$cf_depend" \
30048                                 host="$host" \
30049                                 libtool_version="$LIBTOOL_VERSION" \
30050                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30051
30052                         cf_suffix="$old_cf_suffix"
30053
30054                         for cf_subdir2 in $cf_subdirs lib
30055                         do
30056                                 test "$cf_subdir" = "$cf_subdir2" && break
30057                         done
30058                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30059                         $AWK -f "$srcdir/mk-2nd.awk" \
30060                                 name=$cf_dir \
30061                                 traces=$LIB_TRACING \
30062                                 MODEL=$cf_ITEM \
30063                                 model=$cf_subdir \
30064                                 subset=$cf_subset \
30065                                 srcdir=$srcdir \
30066                                 echo=$WITH_ECHO \
30067                                 crenames=$cf_cv_prog_CC_c_o \
30068                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30069                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30070                         cf_subdirs="$cf_subdirs $cf_subdir"
30071                         done
30072                 done
30073         fi
30074
30075         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30076 done
30077
30078 for cf_dir in $SRC_SUBDIRS
30079 do
30080         if test ! -d "$srcdir/$cf_dir" ; then
30081                 continue
30082         fi
30083
30084         if test -f "$cf_dir/Makefile" ; then
30085                 case "$cf_dir" in
30086                 (Ada95)
30087                         echo 'libs \' >> Makefile
30088                         echo 'install.libs \' >> Makefile
30089                         echo 'uninstall.libs ::' >> Makefile
30090                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30091                         ;;
30092                 esac
30093         fi
30094
30095         if test -f "$srcdir/$cf_dir/modules" ; then
30096                 echo >> Makefile
30097                 if test -f "$srcdir/$cf_dir/headers" ; then
30098 cat >> Makefile <<CF_EOF
30099 install.includes \\
30100 uninstall.includes \\
30101 CF_EOF
30102                 fi
30103
30104 echo 'lint \' >> Makefile
30105
30106 cat >> Makefile <<CF_EOF
30107 libs \\
30108 lintlib \\
30109 install.libs \\
30110 uninstall.libs \\
30111 install.$cf_dir \\
30112 uninstall.$cf_dir ::
30113         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30114 CF_EOF
30115         elif test -f "$srcdir/$cf_dir/headers" ; then
30116 cat >> Makefile <<CF_EOF
30117
30118 libs \\
30119 install.libs \\
30120 uninstall.libs \\
30121 install.includes \\
30122 uninstall.includes ::
30123         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30124 CF_EOF
30125 fi
30126 done
30127
30128 if test "x$cf_with_db_install" = xyes; then
30129 cat >> Makefile <<CF_EOF
30130
30131 install.libs uninstall.libs \\
30132 install.data uninstall.data ::
30133 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30134 CF_EOF
30135 else
30136 cat >> Makefile <<CF_EOF
30137
30138 install.libs uninstall.libs ::
30139         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30140 CF_EOF
30141 fi
30142
30143 if test "x$cf_with_manpages" = xyes; then
30144 cat >> Makefile <<CF_EOF
30145
30146 install.man \\
30147 uninstall.man ::
30148         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30149 CF_EOF
30150 fi
30151
30152 cat >> Makefile <<CF_EOF
30153
30154 distclean ::
30155         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30156         rm -f headers.sh headers.sed mk_shared_lib.sh
30157         rm -f edit_man.* man_alias.*
30158         rm -rf \${DIRS_TO_MAKE}
30159 CF_EOF
30160
30161 # Special case: tack's manpage lives in its own directory.
30162 if test "x$cf_with_manpages" = xyes; then
30163 if test "x$cf_with_tack" = "xyes"; then
30164 cat >> Makefile <<CF_EOF
30165
30166 install.man \\
30167 uninstall.man ::
30168         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30169 CF_EOF
30170 fi
30171 fi
30172
30173 rm -f headers.sed headers.sh
30174
30175 echo creating headers.sh
30176 cat >headers.sh <<CF_EOF
30177 #! $SHELL
30178 # This shell script is generated by the 'configure' script.  It is invoked in a
30179 # subdirectory of the build tree.  It generates a sed-script in the parent
30180 # directory that is used to adjust includes for header files that reside in a
30181 # subdirectory of /usr/include, etc.
30182 PRG=""
30183 while test \$# != 3
30184 do
30185 PRG="\$PRG \$1"; shift
30186 done
30187 DST=\$1
30188 REF=\$2
30189 SRC=\$3
30190 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30191 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30192 echo installing \$SRC in \$DST
30193 CF_EOF
30194
30195 if test "$WITH_CURSES_H" = yes; then
30196         cat >>headers.sh <<CF_EOF
30197 case \$DST in
30198 (/*/include/*)
30199         END=\`basename \$DST\`
30200         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30201         do
30202                 NAME=\`basename \$i\`
30203                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30204         done
30205         ;;
30206 (*)
30207         echo "" >> \$TMPSED
30208         ;;
30209 esac
30210 CF_EOF
30211
30212 else
30213         cat >>headers.sh <<CF_EOF
30214 case \$DST in
30215 (/*/include/*)
30216         END=\`basename \$DST\`
30217         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30218         do
30219                 NAME=\`basename \$i\`
30220                 if test "\$NAME" = "curses.h"
30221                 then
30222                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30223                         NAME=ncurses.h
30224                 fi
30225                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30226         done
30227         ;;
30228 (*)
30229         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30230         ;;
30231 esac
30232 CF_EOF
30233 fi
30234 cat >>headers.sh <<CF_EOF
30235 rm -f \$TMPSRC
30236 sed -f \$TMPSED \$SRC > \$TMPSRC
30237 NAME=\`basename \$SRC\`
30238 CF_EOF
30239 if test "$WITH_CURSES_H" != yes; then
30240         cat >>headers.sh <<CF_EOF
30241 test "\$NAME" = "curses.h" && NAME=ncurses.h
30242 CF_EOF
30243 fi
30244 cat >>headers.sh <<CF_EOF
30245 # Just in case someone gzip'd manpages, remove the conflicting copy.
30246 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30247
30248 eval \$PRG \$TMPSRC \$DST/\$NAME
30249 rm -f \$TMPSRC \$TMPSED
30250 CF_EOF
30251
30252 chmod 0755 headers.sh
30253
30254 for cf_dir in $SRC_SUBDIRS
30255 do
30256         if test ! -d "$srcdir/$cf_dir" ; then
30257                 continue
30258         fi
30259
30260         if test -f "$srcdir/$cf_dir/headers" ; then
30261                 $AWK -f "$srcdir/mk-hdr.awk" \
30262                         subset="$LIB_SUBSETS" \
30263                         compat="$WITH_CURSES_H" \
30264                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30265         fi
30266
30267         if test -f "$srcdir/$cf_dir/modules" ; then
30268                 if test "$cf_dir" != "c++" ; then
30269                         cat >>$cf_dir/Makefile <<"CF_EOF"
30270 depend : ${AUTO_SRC}
30271         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30272
30273 # DO NOT DELETE THIS LINE -- make depend depends on it.
30274 CF_EOF
30275                 fi
30276         fi
30277 done
30278
30279 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30280 if test -z "$USE_OLD_MAKERULES" ; then
30281         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30282 fi
30283 fi
30284  ;;
30285   esac
30286 done
30287 EOF
30288
30289 cat >>"$CONFIG_STATUS" <<\EOF
30290
30291 { (exit 0); exit 0; }
30292 EOF
30293 chmod +x "$CONFIG_STATUS"
30294 ac_clean_files=$ac_clean_files_save
30295
30296 # configure is writing to config.log, and then calls config.status.
30297 # config.status does its own redirection, appending to config.log.
30298 # Unfortunately, on DOS this fails, as config.log is still kept open
30299 # by configure, so config.status won't be able to write to it; its
30300 # output is simply discarded.  So we exec the FD to /dev/null,
30301 # effectively closing config.log, so it can be properly (re)opened and
30302 # appended to by config.status.  When coming back to configure, we
30303 # need to make the FD available again.
30304 if test "$no_create" != yes; then
30305   ac_cs_success=:
30306   exec 5>/dev/null
30307   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30308   exec 5>>config.log
30309   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30310   # would make configure fail if this is the last instruction.
30311   "$ac_cs_success" || { (exit 1); exit 1; }
30312 fi
30313 ${MAKE:-make} preinstall