]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20230423
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.762 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20230114.
5 #
6 # Copyright 2003-2022,2023      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   --with-abi-altered=XXX  override visible ABI version, for packaging
720   --without-ada           suppress check for Ada compiler, don't build demo
721   --without-cxx           do not adjust ncurses bool to match C++
722   --without-cxx-binding   do not build C++ binding and demo
723   --disable-db-install    suppress install of terminal database
724   --without-manpages      suppress install of manpages
725   --without-progs         suppress build/install with programs (e.g., tic)
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 root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --disable-setuid-environ restrict setuid use of ncurses environment variables
789   --enable-symlinks       make tic use symbolic links not hard links
790   --enable-broken_linker  compile with broken-linker support code
791   --enable-bsdpad         recognize BSD-style prefix padding
792   --enable-widec          compile with wide-char/UTF-8 code
793   --disable-lp64          allow chtype to be long (ignore _LP64)
794   --disable-largefile     omit support for large files
795   --disable-tparm-varargs compile tparm() without varargs interface
796   --disable-tic-depends   link tic library without explicit dependency on ncurses library
797   --enable-wattr-macros   enable wattr* macros
798   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
799   --with-bool=TYPE        override fallback type of bool variable
800   --with-caps=alt         compile with alternate Caps file
801   --with-chtype=TYPE      override type of chtype
802   --with-ospeed=TYPE      override type of ospeed variable
803   --with-mmask-t=TYPE     override type of mmask_t
804   --with-ccharw-max=XXX   override size CCHARW_MAX
805   --enable-signed-char    compile using signed Boolean's in term.h
806   --with-tparm-arg=TYPE   override parameter type of tparm
807   --with-rcs-ids          compile-in RCS identifiers
808 Options to Specify How Manpages are Installed:
809   --with-manpage-format   specify manpage-format: gzip/compress/bzip2/xz,
810                           BSDI/normal and optionally formatted/catonly,
811                           e.g., gzip,formatted
812   --with-manpage-renames  specify manpage-renaming
813   --with-manpage-aliases  specify manpage-aliases using .so
814   --with-manpage-symlinks specify manpage-aliases using symlinks
815   --with-manpage-tbl      specify manpage processing with tbl
816 Extensions:
817   --disable-ext-funcs     disable function-extensions
818   --enable-sp-funcs       enable SCREEN-extensions
819   --enable-term-driver    enable terminal-driver
820   --enable-const          compile with extra/non-standard const
821   --enable-ext-colors     compile for 256-color support
822   --enable-ext-mouse      compile for extended mouse-encoding
823   --enable-ext-putwin     compile with extended putwin/screendump
824   --enable-no-padding     compile with $NCURSES_NO_PADDING code
825   --enable-sigwinch       compile with SIGWINCH handler
826   --enable-tcap-names     compile with user-definable terminal capabilities
827 Reentrant Code:
828   --with-pthread          use POSIX thread library
829   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
830   --enable-weak-symbols   enable weak-symbols for pthreads
831   --enable-reentrant      compile with reentrant code
832   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
833   --enable-opaque-form    make form-library structures "opaque"
834   --enable-opaque-menu    make menu-library structures "opaque"
835   --enable-opaque-panel   make panel-library structures "opaque"
836   --with-wrap-prefix=XXX  override prefix used for public variables
837 Development Code:
838   --without-develop       disable development options
839   --enable-hard-tabs      compile with hard-tabs code
840   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
841 Experimental Code:
842   --disable-assumed-color do not assume anything about default-colors
843   --disable-hashmap       compile without hashmap scrolling-optimization
844   --enable-colorfgbg      compile-in experimental $COLORFGBG code
845   --enable-fvisibility    compile with -fvisibility=hidden
846   --enable-interop        compile-in interop bindings
847   --enable-safe-sprintf   compile with experimental safe-sprintf code
848   --disable-scroll-hints  compile without scroll-hints code
849   --enable-wgetch-events  compile with wgetch-events code
850   --enable-exp-win32      compile with experimental-Windows driver
851 Testing/development Options:
852   --disable-echo          do not display "compiling" commands
853   --disable-stripping     do not strip (debug info) installed executables
854   --enable-warnings       test: turn on gcc compiler warnings
855   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
856   --enable-string-hacks   work around bogus compiler/loader warnings
857   --enable-assertions     test: turn on generation of assertion code
858   --with-dmalloc          test: use Gray Watson's dmalloc library
859   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
860   --with-valgrind         test: use valgrind
861   --disable-leaks         test: free permanent memory, analyze leaks
862   --enable-expanded       test: generate functions for certain macros
863   --disable-macros        test: use functions rather than macros
864   --with-trace            test: add trace() function to all models of ncurses
865   --disable-gnat-projects test: disable GNAT projects even if usable
866 Ada Binding Options:
867   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
868   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
869   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
870   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
871   --with-ada-libname=XXX  override default Ada library-name
872   --with-form-libname=XXX override form basename of library
873   --with-menu-libname=XXX override menu basename of library
874   --with-panel-libname=XXX override panel basename of library
875   --with-cxx-libname=XXX override ncurses++ basename of library
876
877 Some influential environment variables:
878   CC          C compiler command
879   CFLAGS      C compiler flags
880   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
881               nonstandard directory <lib dir>
882   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
883               headers in a nonstandard directory <include dir>
884   CPP         C preprocessor
885   CXX         C++ compiler command
886   CXXFLAGS    C++ compiler flags
887   CXXCPP      C++ preprocessor
888
889 Use these variables to override the choices made by `configure' or to help
890 it to find libraries and programs with nonstandard names/locations.
891
892 EOF
893 fi
894
895 if test "$ac_init_help" = "recursive"; then
896   # If there are subdirs, report their specific --help.
897   ac_popdir=`pwd`
898   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
899     cd "$ac_subdir"
900     # A "../" for each directory in /$ac_subdir.
901     ac_dots=`echo "$ac_subdir" |
902              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
903
904     case "$srcdir" in
905     .) # No --srcdir option.  We are building in place.
906       ac_sub_srcdir="$srcdir" ;;
907     [\\/]* | ?:[\\/]* ) # Absolute path.
908       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
909     *) # Relative path.
910       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
911     esac
912
913     # Check for guested configure; otherwise get Cygnus style configure.
914     if test -f "$ac_sub_srcdir/configure.gnu"; then
915       echo
916       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
917     elif test -f "$ac_sub_srcdir/configure"; then
918       echo
919       $SHELL "$ac_sub_srcdir/configure" --help=recursive
920     elif test -f "$ac_sub_srcdir/configure.ac" ||
921            test -f "$ac_sub_srcdir/configure.in"; then
922       echo
923       "$ac_configure" --help
924     else
925       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
926     fi
927     cd "$ac_popdir"
928   done
929 fi
930
931 test -n "$ac_init_help" && exit 0
932 if "$ac_init_version"; then
933   cat <<\EOF
934
935 Copyright 2003-2022,2023        Thomas E. Dickey
936 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
937 Free Software Foundation, Inc.
938 This configure script is free software; the Free Software Foundation
939 gives unlimited permission to copy, distribute and modify it.
940 EOF
941   exit 0
942 fi
943 exec 5>config.log
944 cat >&5 <<EOF
945 This file contains any messages produced by compilers while
946 running configure, to aid debugging if configure makes a mistake.
947
948 It was created by $as_me, which was
949 generated by GNU Autoconf 2.52.20230114.  Invocation command line was
950
951   $ $0 $@
952
953 EOF
954 {
955 cat <<_ASUNAME
956 ## ---------- ##
957 ## Platform.  ##
958 ## ---------- ##
959
960 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
961 uname -m = `(uname -m) 2>/dev/null || echo unknown`
962 uname -r = `(uname -r) 2>/dev/null || echo unknown`
963 uname -s = `(uname -s) 2>/dev/null || echo unknown`
964 uname -v = `(uname -v) 2>/dev/null || echo unknown`
965
966 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
967 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
968
969 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
970 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
971 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
972 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
973 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
974 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
975 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
976
977 PATH = $PATH
978
979 _ASUNAME
980 } >&5
981
982 cat >&5 <<EOF
983 ## ------------ ##
984 ## Core tests.  ##
985 ## ------------ ##
986
987 EOF
988
989 # Keep a trace of the command line.
990 # Strip out --no-create and --no-recursion so they do not pile up.
991 # Also quote any args containing shell meta-characters.
992 ac_configure_args=
993 ac_sep=
994 for ac_arg
995 do
996   case "$ac_arg" in
997   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
998   | --no-cr | --no-c) ;;
999   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1000   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1001   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1002     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1003     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1004     ac_sep=" " ;;
1005   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1006      ac_sep=" " ;;
1007   esac
1008   # Get rid of the leading space.
1009 done
1010
1011 # When interrupted or exit'd, cleanup temporary files, and complete
1012 # config.log.  We remove comments because anyway the quotes in there
1013 # would cause problems or look ugly.
1014 trap 'exit_status=$?
1015   # Save into config.log some information that might help in debugging.
1016   echo >&5
1017   echo "## ----------------- ##" >&5
1018   echo "## Cache variables.  ##" >&5
1019   echo "## ----------------- ##" >&5
1020   echo >&5
1021   # The following way of writing the cache mishandles newlines in values,
1022 {
1023   (set) 2>&1 |
1024     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1025     *ac_space=\ *)
1026       sed -n \
1027         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1028           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1029       ;;
1030     *)
1031       sed -n \
1032         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1033       ;;
1034     esac;
1035 } >&5
1036   sed "/^$/d" confdefs.h >conftest.log
1037   if test -s conftest.log; then
1038     echo >&5
1039     echo "## ------------ ##" >&5
1040     echo "## confdefs.h.  ##" >&5
1041     echo "## ------------ ##" >&5
1042     echo >&5
1043     cat conftest.log >&5
1044   fi
1045   (echo; echo) >&5
1046   test "$ac_signal" != 0 &&
1047     echo "$as_me: caught signal $ac_signal" >&5
1048   echo "$as_me: exit $exit_status" >&5
1049   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1050     exit $exit_status
1051      ' 0
1052 for ac_signal in 1 2 13 15; do
1053   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1054 done
1055 ac_signal=0
1056
1057 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1058 rm -rf conftest* confdefs.h
1059 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1060 echo >confdefs.h
1061
1062 # Let the site file select an alternate cache file if it wants to.
1063 # Prefer explicitly selected file to automatically selected ones.
1064 if test -z "$CONFIG_SITE"; then
1065   if test "x$prefix" != xNONE; then
1066     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1067   else
1068     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1069   fi
1070 fi
1071 for ac_site_file in $CONFIG_SITE; do
1072   if test -r "$ac_site_file"; then
1073     { echo "$as_me:1073: loading site script $ac_site_file" >&5
1074 echo "$as_me: loading site script $ac_site_file" >&6;}
1075     cat "$ac_site_file" >&5
1076     . "$ac_site_file"
1077   fi
1078 done
1079
1080 if test -r "$cache_file"; then
1081   # Some versions of bash will fail to source /dev/null (special
1082   # files actually), so we avoid doing that.
1083   if test -f "$cache_file"; then
1084     { echo "$as_me:1084: loading cache $cache_file" >&5
1085 echo "$as_me: loading cache $cache_file" >&6;}
1086     case $cache_file in
1087       [\\/]* | ?:[\\/]* ) . $cache_file;;
1088       *)                      . ./$cache_file;;
1089     esac
1090   fi
1091 else
1092   { echo "$as_me:1092: creating cache $cache_file" >&5
1093 echo "$as_me: creating cache $cache_file" >&6;}
1094   >$cache_file
1095 fi
1096
1097 # Check that the precious variables saved in the cache have kept the same
1098 # value.
1099 ac_cache_corrupted=false
1100 for ac_var in `(set) 2>&1 |
1101                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1102   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1103   eval ac_new_set=\$ac_env_${ac_var}_set
1104   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1105   eval ac_new_val="\$ac_env_${ac_var}_value"
1106   case "$ac_old_set,$ac_new_set" in
1107     set,)
1108       { echo "$as_me:1108: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1109 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1110       ac_cache_corrupted=: ;;
1111     ,set)
1112       { echo "$as_me:1112: error: \`$ac_var' was not set in the previous run" >&5
1113 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1114       ac_cache_corrupted=: ;;
1115     ,);;
1116     *)
1117       if test "x$ac_old_val" != "x$ac_new_val"; then
1118         { echo "$as_me:1118: error: \`$ac_var' has changed since the previous run:" >&5
1119 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1120         { echo "$as_me:1120:   former value:  $ac_old_val" >&5
1121 echo "$as_me:   former value:  $ac_old_val" >&2;}
1122         { echo "$as_me:1122:   current value: $ac_new_val" >&5
1123 echo "$as_me:   current value: $ac_new_val" >&2;}
1124         ac_cache_corrupted=:
1125       fi;;
1126   esac
1127   # Pass precious variables to config.status.  It doesn't matter if
1128   # we pass some twice (in addition to the command line arguments).
1129   if test "$ac_new_set" = set; then
1130     case "$ac_new_val" in
1131     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1132       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1133       ac_configure_args="$ac_configure_args '$ac_arg'"
1134       ;;
1135     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1136        ;;
1137     esac
1138   fi
1139 done
1140 if "$ac_cache_corrupted"; then
1141   { echo "$as_me:1141: error: changes in the environment can compromise the build" >&5
1142 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1143   { { echo "$as_me:1143: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1144 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1145    { (exit 1); exit 1; }; }
1146 fi
1147
1148 ac_ext=c
1149 ac_cpp='$CPP $CPPFLAGS'
1150 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1151 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1152 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1153 ac_main_return="return"
1154
1155 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1156   *c*,-n*) ECHO_N=
1157            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1158            ECHO_T='     '
1159            ;;
1160   *c*,*  ) ECHO_N=-n
1161            ECHO_C=
1162            ECHO_T=
1163            ;;
1164   *)       ECHO_N=
1165            ECHO_C='\c'
1166            ECHO_T=
1167            ;;
1168 esac
1169 echo "#! $SHELL" >conftest.sh
1170 echo  "exit 0"   >>conftest.sh
1171 chmod +x conftest.sh
1172 if { (echo "$as_me:1172: PATH=\".;.\"; conftest.sh") >&5
1173   (PATH=".;."; conftest.sh) 2>&5
1174   ac_status=$?
1175   echo "$as_me:1175: \$? = $ac_status" >&5
1176   (exit "$ac_status"); }; then
1177   ac_path_separator=';'
1178 else
1179   ac_path_separator=:
1180 fi
1181 PATH_SEPARATOR="$ac_path_separator"
1182 rm -f conftest.sh
1183
1184 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1185
1186 top_builddir=`pwd`
1187
1188 for ac_prog in ggrep grep
1189 do
1190   # Extract the first word of "$ac_prog", so it can be a program name with args.
1191 set dummy $ac_prog; ac_word=$2
1192 echo "$as_me:1192: checking for $ac_word" >&5
1193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1194 if test "${ac_cv_prog_GREP+set}" = set; then
1195   echo $ECHO_N "(cached) $ECHO_C" >&6
1196 else
1197   if test -n "$GREP"; then
1198   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1199 else
1200   ac_save_IFS=$IFS; IFS=$ac_path_separator
1201 ac_dummy="$PATH"
1202 for ac_dir in $ac_dummy; do
1203   IFS=$ac_save_IFS
1204   test -z "$ac_dir" && ac_dir=.
1205   $as_executable_p "$ac_dir/$ac_word" || continue
1206 ac_cv_prog_GREP="$ac_prog"
1207 echo "$as_me:1207: found $ac_dir/$ac_word" >&5
1208 break
1209 done
1210
1211 fi
1212 fi
1213 GREP=$ac_cv_prog_GREP
1214 if test -n "$GREP"; then
1215   echo "$as_me:1215: result: $GREP" >&5
1216 echo "${ECHO_T}$GREP" >&6
1217 else
1218   echo "$as_me:1218: result: no" >&5
1219 echo "${ECHO_T}no" >&6
1220 fi
1221
1222   test -n "$GREP" && break
1223 done
1224 test -n "$GREP" || GREP=": "
1225
1226 echo "$as_me:1226: checking for egrep" >&5
1227 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1228 if test "${ac_cv_path_EGREP+set}" = set; then
1229   echo $ECHO_N "(cached) $ECHO_C" >&6
1230 else
1231   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1232    then ac_cv_path_EGREP="$GREP -E"
1233    else
1234      for ac_prog in gegrep egrep
1235 do
1236   # Extract the first word of "$ac_prog", so it can be a program name with args.
1237 set dummy $ac_prog; ac_word=$2
1238 echo "$as_me:1238: checking for $ac_word" >&5
1239 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1240 if test "${ac_cv_path_EGREP+set}" = set; then
1241   echo $ECHO_N "(cached) $ECHO_C" >&6
1242 else
1243   case $EGREP in
1244   [\\/]* | ?:[\\/]*)
1245   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1246   ;;
1247   *)
1248   ac_save_IFS=$IFS; IFS=$ac_path_separator
1249 ac_dummy="$PATH"
1250 for ac_dir in $ac_dummy; do
1251   IFS=$ac_save_IFS
1252   test -z "$ac_dir" && ac_dir=.
1253   if $as_executable_p "$ac_dir/$ac_word"; then
1254    ac_cv_path_EGREP="$ac_dir/$ac_word"
1255    echo "$as_me:1255: found $ac_dir/$ac_word" >&5
1256    break
1257 fi
1258 done
1259
1260   ;;
1261 esac
1262 fi
1263 EGREP=$ac_cv_path_EGREP
1264
1265 if test -n "$EGREP"; then
1266   echo "$as_me:1266: result: $EGREP" >&5
1267 echo "${ECHO_T}$EGREP" >&6
1268 else
1269   echo "$as_me:1269: result: no" >&5
1270 echo "${ECHO_T}no" >&6
1271 fi
1272
1273   test -n "$EGREP" && break
1274 done
1275 test -n "$EGREP" || EGREP=": "
1276
1277      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1277: error: cannot find workable egrep" >&5
1278 echo "$as_me: error: cannot find workable egrep" >&2;}
1279    { (exit 1); exit 1; }; }
1280    fi
1281 fi
1282 echo "$as_me:1282: result: $ac_cv_path_EGREP" >&5
1283 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1284  EGREP="$ac_cv_path_EGREP"
1285
1286 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1288 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1289 cf_cv_abi_version=${NCURSES_MAJOR}
1290 cf_cv_abi_default=${NCURSES_MAJOR}
1291 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1292 cf_cv_timestamp=`date`
1293 echo "$as_me:1293: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1294 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1295
1296 if test -f "$srcdir/VERSION" ; then
1297         echo "$as_me:1297: checking for package version" >&5
1298 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1299
1300         # if there are not enough fields, cut returns the last one...
1301         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1302         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1303         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1304
1305         # this is how CF_BUNDLED_INTL uses $VERSION:
1306         VERSION="$cf_field1"
1307
1308         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1309         test -z "$VERSION_MAJOR" && { { echo "$as_me:1309: error: missing major-version" >&5
1310 echo "$as_me: error: missing major-version" >&2;}
1311    { (exit 1); exit 1; }; }
1312
1313         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1314         test -z "$VERSION_MINOR" && { { echo "$as_me:1314: error: missing minor-version" >&5
1315 echo "$as_me: error: missing minor-version" >&2;}
1316    { (exit 1); exit 1; }; }
1317
1318         echo "$as_me:1318: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1319 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1320
1321         echo "$as_me:1321: checking for package patch date" >&5
1322 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1323         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1324         case .$VERSION_PATCH in
1325         (.)
1326                 { { echo "$as_me:1326: error: missing patch-date $VERSION_PATCH" >&5
1327 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1328    { (exit 1); exit 1; }; }
1329                 ;;
1330         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1331                 ;;
1332         (*)
1333                 { { echo "$as_me:1333: error: illegal patch-date $VERSION_PATCH" >&5
1334 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1335    { (exit 1); exit 1; }; }
1336                 ;;
1337         esac
1338         echo "$as_me:1338: result: $VERSION_PATCH" >&5
1339 echo "${ECHO_T}$VERSION_PATCH" >&6
1340 else
1341         { { echo "$as_me:1341: error: did not find $srcdir/VERSION" >&5
1342 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1343    { (exit 1); exit 1; }; }
1344 fi
1345
1346 # show the actual data that we have for versions:
1347 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1348
1349 echo "${as_me:-configure}:1349: testing ABI VERSION $VERSION ..." 1>&5
1350
1351 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1352
1353 echo "${as_me:-configure}:1353: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1354
1355 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1356
1357 echo "${as_me:-configure}:1357: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1358
1359 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1360
1361 echo "${as_me:-configure}:1361: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1362
1363         cf_PACKAGE=NCURSES
1364         PACKAGE=ncurses
1365
1366 cat >>confdefs.h <<EOF
1367 #define PACKAGE "$PACKAGE"
1368 EOF
1369
1370 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1371
1372         cat >>confdefs.h <<EOF
1373 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1374 EOF
1375
1376         cat >>confdefs.h <<EOF
1377 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1378 EOF
1379
1380 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1381
1382 # Check whether --with-rel-version or --without-rel-version was given.
1383 if test "${with_rel_version+set}" = set; then
1384   withval="$with_rel_version"
1385   { echo "$as_me:1385: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1386 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1387  cf_cv_rel_version=$withval
1388 fi;
1389
1390  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1391  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1392
1393 if test -n "$NCURSES_MAJOR" ; then
1394   case $NCURSES_MAJOR in
1395   ([0-9]*)
1396         ;;
1397   (*)
1398         { { echo "$as_me:1398: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1399 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1400    { (exit 1); exit 1; }; }
1401         ;;
1402   esac
1403 else
1404   { { echo "$as_me:1404: error: Release major-version value is empty" >&5
1405 echo "$as_me: error: Release major-version value is empty" >&2;}
1406    { (exit 1); exit 1; }; }
1407 fi
1408
1409 if test -n "$NCURSES_MINOR" ; then
1410   case $NCURSES_MINOR in
1411   ([0-9]*)
1412         ;;
1413   (*)
1414         { { echo "$as_me:1414: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1415 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1416    { (exit 1); exit 1; }; }
1417         ;;
1418   esac
1419 else
1420   { { echo "$as_me:1420: error: Release minor-version value is empty" >&5
1421 echo "$as_me: error: Release minor-version value is empty" >&2;}
1422    { (exit 1); exit 1; }; }
1423 fi
1424
1425 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1426
1427 # Check whether --with-abi-version or --without-abi-version was given.
1428 if test "${with_abi_version+set}" = set; then
1429   withval="$with_abi_version"
1430
1431         if test "x$cf_cv_abi_version" != "x$withval"
1432         then
1433                 { echo "$as_me:1433: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1434 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1435                 case "$cf_cv_rel_version" in
1436                 (5.*)
1437                         cf_cv_rel_version=$withval.0
1438                         ;;
1439                 (6.*)
1440                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1441                         ;;
1442                 esac
1443         fi
1444         cf_cv_abi_version=$withval
1445 fi;
1446
1447 if test -n "$cf_cv_abi_version" ; then
1448   case $cf_cv_abi_version in
1449   ([0-9]*)
1450         ;;
1451   (*)
1452         { { echo "$as_me:1452: error: ABI version is not a number: $cf_cv_abi_version" >&5
1453 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1454    { (exit 1); exit 1; }; }
1455         ;;
1456   esac
1457 else
1458   { { echo "$as_me:1458: error: ABI version value is empty" >&5
1459 echo "$as_me: error: ABI version value is empty" >&2;}
1460    { (exit 1); exit 1; }; }
1461 fi
1462
1463 cf_cv_abi_default=$cf_cv_abi_version
1464
1465 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1466 then
1467         case "$cf_cv_rel_version" in
1468         (5.*)
1469                 cf_cv_rel_version=$with_abi_version.0
1470                 ;;
1471         esac
1472 fi
1473
1474 ac_aux_dir=
1475 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1476   if test -f "$ac_dir/install-sh"; then
1477     ac_aux_dir=$ac_dir
1478     ac_install_sh="$ac_aux_dir/install-sh -c"
1479     break
1480   elif test -f "$ac_dir/install.sh"; then
1481     ac_aux_dir=$ac_dir
1482     ac_install_sh="$ac_aux_dir/install.sh -c"
1483     break
1484   elif test -f "$ac_dir/shtool"; then
1485     ac_aux_dir=$ac_dir
1486     ac_install_sh="$ac_aux_dir/shtool install -c"
1487     break
1488   fi
1489 done
1490 if test -z "$ac_aux_dir"; then
1491   { { echo "$as_me:1491: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1492 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1493    { (exit 1); exit 1; }; }
1494 fi
1495 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1496 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1497 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1498
1499 # Make sure we can run config.sub.
1500 $ac_config_sub sun4 >/dev/null 2>&1 ||
1501   { { echo "$as_me:1501: error: cannot run $ac_config_sub" >&5
1502 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1503    { (exit 1); exit 1; }; }
1504
1505 echo "$as_me:1505: checking build system type" >&5
1506 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1507 if test "${ac_cv_build+set}" = set; then
1508   echo $ECHO_N "(cached) $ECHO_C" >&6
1509 else
1510   ac_cv_build_alias=$build_alias
1511 test -z "$ac_cv_build_alias" &&
1512   ac_cv_build_alias=`$ac_config_guess`
1513 test -z "$ac_cv_build_alias" &&
1514   { { echo "$as_me:1514: error: cannot guess build type; you must specify one" >&5
1515 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1516    { (exit 1); exit 1; }; }
1517 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1518   { { echo "$as_me:1518: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1519 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1520    { (exit 1); exit 1; }; }
1521
1522 fi
1523 echo "$as_me:1523: result: $ac_cv_build" >&5
1524 echo "${ECHO_T}$ac_cv_build" >&6
1525 build=$ac_cv_build
1526 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1527 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1528 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1529
1530 echo "$as_me:1530: checking host system type" >&5
1531 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1532 if test "${ac_cv_host+set}" = set; then
1533   echo $ECHO_N "(cached) $ECHO_C" >&6
1534 else
1535   ac_cv_host_alias=$host_alias
1536 test -z "$ac_cv_host_alias" &&
1537   ac_cv_host_alias=$ac_cv_build_alias
1538 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1539   { { echo "$as_me:1539: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1540 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1541    { (exit 1); exit 1; }; }
1542
1543 fi
1544 echo "$as_me:1544: result: $ac_cv_host" >&5
1545 echo "${ECHO_T}$ac_cv_host" >&6
1546 host=$ac_cv_host
1547 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1548 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1549 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1550
1551 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1552         echo "$as_me:1552: checking target system type" >&5
1553 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1554 if test "${ac_cv_target+set}" = set; then
1555   echo $ECHO_N "(cached) $ECHO_C" >&6
1556 else
1557   ac_cv_target_alias=$target_alias
1558 test "x$ac_cv_target_alias" = "x" &&
1559   ac_cv_target_alias=$ac_cv_host_alias
1560 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1561   { { echo "$as_me:1561: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1562 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1563    { (exit 1); exit 1; }; }
1564
1565 fi
1566 echo "$as_me:1566: result: $ac_cv_target" >&5
1567 echo "${ECHO_T}$ac_cv_target" >&6
1568 target=$ac_cv_target
1569 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1570 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1571 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1572
1573 # The aliases save the names the user supplied, while $host etc.
1574 # will get canonicalized.
1575 test -n "$target_alias" &&
1576   test "$program_prefix$program_suffix$program_transform_name" = \
1577     NONENONEs,x,x, &&
1578   program_prefix=${target_alias}-
1579         system_name="$host_os"
1580 else
1581         system_name="`(uname -s -r) 2>/dev/null`"
1582         if test -z "$system_name" ; then
1583                 system_name="`(hostname) 2>/dev/null`"
1584         fi
1585 fi
1586 test -n "$system_name" &&
1587 cat >>confdefs.h <<EOF
1588 #define SYSTEM_NAME "$system_name"
1589 EOF
1590
1591 if test "${cf_cv_system_name+set}" = set; then
1592   echo $ECHO_N "(cached) $ECHO_C" >&6
1593 else
1594   cf_cv_system_name="$system_name"
1595 fi
1596
1597 test -z "$system_name" && system_name="$cf_cv_system_name"
1598 test -n "$cf_cv_system_name" && echo "$as_me:1598: result: Configuring for $cf_cv_system_name" >&5
1599 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1600
1601 if test ".$system_name" != ".$cf_cv_system_name" ; then
1602         echo "$as_me:1602: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1603 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1604         { { echo "$as_me:1604: error: \"Please remove config.cache and try again.\"" >&5
1605 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1606    { (exit 1); exit 1; }; }
1607 fi
1608
1609 # Check whether --with-system-type or --without-system-type was given.
1610 if test "${with_system_type+set}" = set; then
1611   withval="$with_system_type"
1612   { echo "$as_me:1612: WARNING: overriding system type to $withval" >&5
1613 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1614         cf_cv_system_name=$withval
1615         host_os=$withval
1616
1617 fi;
1618
1619 ###     Save the given $CFLAGS to allow user-override.
1620 cf_user_CFLAGS="$CFLAGS"
1621
1622 ###     Default install-location
1623 echo "$as_me:1623: checking for fgrep" >&5
1624 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1625 if test "${ac_cv_path_FGREP+set}" = set; then
1626   echo $ECHO_N "(cached) $ECHO_C" >&6
1627 else
1628   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1629    then ac_cv_path_FGREP="$GREP -F"
1630    else
1631      for ac_prog in gfgrep fgrep
1632 do
1633   # Extract the first word of "$ac_prog", so it can be a program name with args.
1634 set dummy $ac_prog; ac_word=$2
1635 echo "$as_me:1635: checking for $ac_word" >&5
1636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1637 if test "${ac_cv_path_FGREP+set}" = set; then
1638   echo $ECHO_N "(cached) $ECHO_C" >&6
1639 else
1640   case $FGREP in
1641   [\\/]* | ?:[\\/]*)
1642   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1643   ;;
1644   *)
1645   ac_save_IFS=$IFS; IFS=$ac_path_separator
1646 ac_dummy="$PATH"
1647 for ac_dir in $ac_dummy; do
1648   IFS=$ac_save_IFS
1649   test -z "$ac_dir" && ac_dir=.
1650   if $as_executable_p "$ac_dir/$ac_word"; then
1651    ac_cv_path_FGREP="$ac_dir/$ac_word"
1652    echo "$as_me:1652: found $ac_dir/$ac_word" >&5
1653    break
1654 fi
1655 done
1656
1657   ;;
1658 esac
1659 fi
1660 FGREP=$ac_cv_path_FGREP
1661
1662 if test -n "$FGREP"; then
1663   echo "$as_me:1663: result: $FGREP" >&5
1664 echo "${ECHO_T}$FGREP" >&6
1665 else
1666   echo "$as_me:1666: result: no" >&5
1667 echo "${ECHO_T}no" >&6
1668 fi
1669
1670   test -n "$FGREP" && break
1671 done
1672 test -n "$FGREP" || FGREP=": "
1673
1674      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1674: error: cannot find workable fgrep" >&5
1675 echo "$as_me: error: cannot find workable fgrep" >&2;}
1676    { (exit 1); exit 1; }; }
1677    fi
1678 fi
1679 echo "$as_me:1679: result: $ac_cv_path_FGREP" >&5
1680 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1681  FGREP="$ac_cv_path_FGREP"
1682
1683 echo "$as_me:1683: checking for prefix" >&5
1684 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1685 if test "x$prefix" = "xNONE" ; then
1686         case "$cf_cv_system_name" in
1687                 # non-vendor systems don't have a conflict
1688         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1689                 prefix=/usr
1690                 ;;
1691         (*)     prefix=$ac_default_prefix
1692                 ;;
1693         esac
1694 fi
1695 echo "$as_me:1695: result: $prefix" >&5
1696 echo "${ECHO_T}$prefix" >&6
1697
1698 if test "x$prefix" = "xNONE" ; then
1699 echo "$as_me:1699: checking for default include-directory" >&5
1700 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1701 test -n "$verbose" && echo 1>&6
1702 for cf_symbol in \
1703         "$includedir" \
1704         "$includedir/ncurses" \
1705         "$prefix/include" \
1706         "$prefix/include/ncurses" \
1707         /usr/local/include \
1708         /usr/local/include/ncurses \
1709         /usr/include \
1710         /usr/include/ncurses
1711 do
1712         cf_dir=`eval echo "$cf_symbol"`
1713         if test -f "$cf_dir/curses.h" ; then
1714         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1715                 includedir="$cf_symbol"
1716                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1717                 break
1718         fi
1719         fi
1720         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1721 done
1722 echo "$as_me:1722: result: $includedir" >&5
1723 echo "${ECHO_T}$includedir" >&6
1724 fi
1725
1726 ### Defaults for ncurses ABI
1727
1728 # ABI 5 defaults:
1729 cf_dft_ccharw_max=5
1730 cf_dft_chtype=auto
1731 cf_dft_ext_colors=no
1732 cf_dft_ext_const=no
1733 cf_dft_ext_mouse=no
1734 cf_dft_ext_putwin=no
1735 cf_dft_ext_spfuncs=no
1736 cf_dft_filter_syms=no
1737 cf_dft_interop=no
1738 cf_dft_mmask_t=auto
1739 cf_dft_opaque_curses=no
1740 cf_dft_ordinate_type=short
1741 cf_dft_signed_char=no
1742 cf_dft_tparm_arg=long
1743 cf_dft_with_lp64=no
1744
1745 # ABI 6 defaults:
1746 case x$cf_cv_abi_default in
1747 (x[6789])
1748         cf_dft_chtype=uint32_t
1749         cf_dft_ext_colors=yes
1750         cf_dft_ext_const=yes
1751         cf_dft_ext_mouse=yes
1752         cf_dft_ext_putwin=yes
1753         cf_dft_ext_spfuncs=yes
1754         cf_dft_filter_syms=yes
1755         cf_dft_interop=yes
1756         cf_dft_mmask_t=uint32_t
1757         cf_dft_tparm_arg=intptr_t
1758         cf_dft_with_lp64=yes
1759         ;;
1760 esac
1761
1762 # ABI 7 defaults:
1763 case x$cf_cv_abi_default in
1764 (x[789])
1765         cf_dft_ccharw_max=6
1766         cf_dft_mmask_t=uint64_t
1767         cf_dft_opaque_curses=yes
1768         cf_dft_ordinate_type=int
1769         cf_dft_signed_char=yes
1770         # also: remove the wgetch-events feature in ABI 7
1771         ;;
1772 esac
1773
1774 ### override ABI version, e.g., packagers
1775
1776 # Check whether --with-abi-altered or --without-abi-altered was given.
1777 if test "${with_abi_altered+set}" = set; then
1778   withval="$with_abi_altered"
1779
1780 if test -n "$withval" ; then
1781   case $withval in
1782   ([0-9]*)
1783         ;;
1784   (*)
1785         { { echo "$as_me:1785: error: ABI altered is not a number: $withval" >&5
1786 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1787    { (exit 1); exit 1; }; }
1788         ;;
1789   esac
1790 else
1791   { { echo "$as_me:1791: error: ABI altered value is empty" >&5
1792 echo "$as_me: error: ABI altered value is empty" >&2;}
1793    { (exit 1); exit 1; }; }
1794 fi
1795
1796         if test "$cf_cv_abi_version" != "$withval"
1797         then
1798                 { echo "$as_me:1798: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1799 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1800                 cf_cv_abi_version=$withval
1801         fi
1802
1803 fi;
1804
1805 ###     Checks for programs.
1806
1807 # Check whether --with-ada or --without-ada was given.
1808 if test "${with_ada+set}" = set; then
1809   withval="$with_ada"
1810   cf_with_ada=$withval
1811 else
1812   cf_with_ada=yes
1813 fi;
1814
1815 if test "x$cf_with_ada" = xyes
1816 then
1817         cf_prog_cc="gnatgcc gcc cc"
1818 else
1819         cf_prog_cc="gcc cc"
1820 fi
1821
1822 ac_ext=c
1823 ac_cpp='$CPP $CPPFLAGS'
1824 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1825 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1826 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1827 ac_main_return="return"
1828 if test -n "$ac_tool_prefix"; then
1829   for ac_prog in $cf_prog_cc
1830   do
1831     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1832 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1833 echo "$as_me:1833: checking for $ac_word" >&5
1834 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1835 if test "${ac_cv_prog_CC+set}" = set; then
1836   echo $ECHO_N "(cached) $ECHO_C" >&6
1837 else
1838   if test -n "$CC"; then
1839   ac_cv_prog_CC="$CC" # Let the user override the test.
1840 else
1841   ac_save_IFS=$IFS; IFS=$ac_path_separator
1842 ac_dummy="$PATH"
1843 for ac_dir in $ac_dummy; do
1844   IFS=$ac_save_IFS
1845   test -z "$ac_dir" && ac_dir=.
1846   $as_executable_p "$ac_dir/$ac_word" || continue
1847 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1848 echo "$as_me:1848: found $ac_dir/$ac_word" >&5
1849 break
1850 done
1851
1852 fi
1853 fi
1854 CC=$ac_cv_prog_CC
1855 if test -n "$CC"; then
1856   echo "$as_me:1856: result: $CC" >&5
1857 echo "${ECHO_T}$CC" >&6
1858 else
1859   echo "$as_me:1859: result: no" >&5
1860 echo "${ECHO_T}no" >&6
1861 fi
1862
1863     test -n "$CC" && break
1864   done
1865 fi
1866 if test -z "$CC"; then
1867   ac_ct_CC=$CC
1868   for ac_prog in $cf_prog_cc
1869 do
1870   # Extract the first word of "$ac_prog", so it can be a program name with args.
1871 set dummy $ac_prog; ac_word=$2
1872 echo "$as_me:1872: checking for $ac_word" >&5
1873 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1874 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1875   echo $ECHO_N "(cached) $ECHO_C" >&6
1876 else
1877   if test -n "$ac_ct_CC"; then
1878   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1879 else
1880   ac_save_IFS=$IFS; IFS=$ac_path_separator
1881 ac_dummy="$PATH"
1882 for ac_dir in $ac_dummy; do
1883   IFS=$ac_save_IFS
1884   test -z "$ac_dir" && ac_dir=.
1885   $as_executable_p "$ac_dir/$ac_word" || continue
1886 ac_cv_prog_ac_ct_CC="$ac_prog"
1887 echo "$as_me:1887: found $ac_dir/$ac_word" >&5
1888 break
1889 done
1890
1891 fi
1892 fi
1893 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1894 if test -n "$ac_ct_CC"; then
1895   echo "$as_me:1895: result: $ac_ct_CC" >&5
1896 echo "${ECHO_T}$ac_ct_CC" >&6
1897 else
1898   echo "$as_me:1898: result: no" >&5
1899 echo "${ECHO_T}no" >&6
1900 fi
1901
1902   test -n "$ac_ct_CC" && break
1903 done
1904
1905   CC=$ac_ct_CC
1906 fi
1907
1908 test -z "$CC" && { { echo "$as_me:1908: error: no acceptable cc found in \$PATH" >&5
1909 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1910    { (exit 1); exit 1; }; }
1911
1912 # Provide some information about the compiler.
1913 echo "$as_me:1913:" \
1914      "checking for C compiler version" >&5
1915 ac_compiler=`set X $ac_compile; echo "$2"`
1916 { (eval echo "$as_me:1916: \"$ac_compiler --version </dev/null >&5\"") >&5
1917   (eval $ac_compiler --version </dev/null >&5) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit "$ac_status"); }
1921 { (eval echo "$as_me:1921: \"$ac_compiler -v </dev/null >&5\"") >&5
1922   (eval $ac_compiler -v </dev/null >&5) 2>&5
1923   ac_status=$?
1924   echo "$as_me:1924: \$? = $ac_status" >&5
1925   (exit "$ac_status"); }
1926 { (eval echo "$as_me:1926: \"$ac_compiler -V </dev/null >&5\"") >&5
1927   (eval $ac_compiler -V </dev/null >&5) 2>&5
1928   ac_status=$?
1929   echo "$as_me:1929: \$? = $ac_status" >&5
1930   (exit "$ac_status"); }
1931
1932 cat >"conftest.$ac_ext" <<_ACEOF
1933 #line 1933 "configure"
1934 #include "confdefs.h"
1935
1936 int
1937 main (void)
1938 {
1939
1940   ;
1941   return 0;
1942 }
1943 _ACEOF
1944 ac_clean_files_save=$ac_clean_files
1945 ac_clean_files="$ac_clean_files a.out a.exe"
1946 # Try to create an executable without -o first, disregard a.out.
1947 # It will help us diagnose broken compilers, and finding out an intuition
1948 # of exeext.
1949 echo "$as_me:1949: checking for C compiler default output" >&5
1950 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1951 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1952 if { (eval echo "$as_me:1952: \"$ac_link_default\"") >&5
1953   (eval $ac_link_default) 2>&5
1954   ac_status=$?
1955   echo "$as_me:1955: \$? = $ac_status" >&5
1956   (exit "$ac_status"); }; then
1957   # Find the output, starting from the most likely.  This scheme is
1958 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1959 # resort.
1960 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1961                 ls a.out conftest 2>/dev/null;
1962                 ls a.* conftest.* 2>/dev/null`; do
1963   case $ac_file in
1964     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1965     a.out ) # We found the default executable, but exeext='' is most
1966             # certainly right.
1967             break;;
1968     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1969           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1970           export ac_cv_exeext
1971           break;;
1972     * ) break;;
1973   esac
1974 done
1975 else
1976   echo "$as_me: failed program was:" >&5
1977 cat "conftest.$ac_ext" >&5
1978 { { echo "$as_me:1978: error: C compiler cannot create executables" >&5
1979 echo "$as_me: error: C compiler cannot create executables" >&2;}
1980    { (exit 77); exit 77; }; }
1981 fi
1982
1983 ac_exeext=$ac_cv_exeext
1984 echo "$as_me:1984: result: $ac_file" >&5
1985 echo "${ECHO_T}$ac_file" >&6
1986
1987 # Check the compiler produces executables we can run.  If not, either
1988 # the compiler is broken, or we cross compile.
1989 echo "$as_me:1989: checking whether the C compiler works" >&5
1990 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1991 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1992 # If not cross compiling, check that we can run a simple program.
1993 if test "$cross_compiling" != yes; then
1994   if { ac_try='./$ac_file'
1995   { (eval echo "$as_me:1995: \"$ac_try\"") >&5
1996   (eval $ac_try) 2>&5
1997   ac_status=$?
1998   echo "$as_me:1998: \$? = $ac_status" >&5
1999   (exit "$ac_status"); }; }; then
2000     cross_compiling=no
2001   else
2002     if test "$cross_compiling" = maybe; then
2003         cross_compiling=yes
2004     else
2005         { { echo "$as_me:2005: error: cannot run C compiled programs.
2006 If you meant to cross compile, use \`--host'." >&5
2007 echo "$as_me: error: cannot run C compiled programs.
2008 If you meant to cross compile, use \`--host'." >&2;}
2009    { (exit 1); exit 1; }; }
2010     fi
2011   fi
2012 fi
2013 echo "$as_me:2013: result: yes" >&5
2014 echo "${ECHO_T}yes" >&6
2015
2016 rm -f a.out a.exe "conftest$ac_cv_exeext"
2017 ac_clean_files=$ac_clean_files_save
2018 # Check the compiler produces executables we can run.  If not, either
2019 # the compiler is broken, or we cross compile.
2020 echo "$as_me:2020: checking whether we are cross compiling" >&5
2021 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2022 echo "$as_me:2022: result: $cross_compiling" >&5
2023 echo "${ECHO_T}$cross_compiling" >&6
2024
2025 echo "$as_me:2025: checking for executable suffix" >&5
2026 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2027 if { (eval echo "$as_me:2027: \"$ac_link\"") >&5
2028   (eval $ac_link) 2>&5
2029   ac_status=$?
2030   echo "$as_me:2030: \$? = $ac_status" >&5
2031   (exit "$ac_status"); }; then
2032   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2033 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2034 # work properly (i.e., refer to `conftest.exe'), while it won't with
2035 # `rm'.
2036 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2037   case $ac_file in
2038     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2039     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2040           export ac_cv_exeext
2041           break;;
2042     * ) break;;
2043   esac
2044 done
2045 else
2046   { { echo "$as_me:2046: error: cannot compute EXEEXT: cannot compile and link" >&5
2047 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2048    { (exit 1); exit 1; }; }
2049 fi
2050
2051 rm -f "conftest$ac_cv_exeext"
2052 echo "$as_me:2052: result: $ac_cv_exeext" >&5
2053 echo "${ECHO_T}$ac_cv_exeext" >&6
2054
2055 rm -f "conftest.$ac_ext"
2056 EXEEXT=$ac_cv_exeext
2057 ac_exeext=$EXEEXT
2058 echo "$as_me:2058: checking for object suffix" >&5
2059 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2060 if test "${ac_cv_objext+set}" = set; then
2061   echo $ECHO_N "(cached) $ECHO_C" >&6
2062 else
2063   cat >"conftest.$ac_ext" <<_ACEOF
2064 #line 2064 "configure"
2065 #include "confdefs.h"
2066
2067 int
2068 main (void)
2069 {
2070
2071   ;
2072   return 0;
2073 }
2074 _ACEOF
2075 rm -f conftest.o conftest.obj
2076 if { (eval echo "$as_me:2076: \"$ac_compile\"") >&5
2077   (eval $ac_compile) 2>&5
2078   ac_status=$?
2079   echo "$as_me:2079: \$? = $ac_status" >&5
2080   (exit "$ac_status"); }; then
2081   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2082   case $ac_file in
2083     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2084     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2085        break;;
2086   esac
2087 done
2088 else
2089   echo "$as_me: failed program was:" >&5
2090 cat "conftest.$ac_ext" >&5
2091 { { echo "$as_me:2091: error: cannot compute OBJEXT: cannot compile" >&5
2092 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2093    { (exit 1); exit 1; }; }
2094 fi
2095
2096 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2097 fi
2098 echo "$as_me:2098: result: $ac_cv_objext" >&5
2099 echo "${ECHO_T}$ac_cv_objext" >&6
2100 OBJEXT=$ac_cv_objext
2101 ac_objext=$OBJEXT
2102 echo "$as_me:2102: checking whether we are using the GNU C compiler" >&5
2103 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2104 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2105   echo $ECHO_N "(cached) $ECHO_C" >&6
2106 else
2107   cat >"conftest.$ac_ext" <<_ACEOF
2108 #line 2108 "configure"
2109 #include "confdefs.h"
2110
2111 int
2112 main (void)
2113 {
2114 #ifndef __GNUC__
2115        choke me
2116 #endif
2117
2118   ;
2119   return 0;
2120 }
2121 _ACEOF
2122 rm -f "conftest.$ac_objext"
2123 if { (eval echo "$as_me:2123: \"$ac_compile\"") >&5
2124   (eval $ac_compile) 2>&5
2125   ac_status=$?
2126   echo "$as_me:2126: \$? = $ac_status" >&5
2127   (exit "$ac_status"); } &&
2128          { ac_try='test -s "conftest.$ac_objext"'
2129   { (eval echo "$as_me:2129: \"$ac_try\"") >&5
2130   (eval $ac_try) 2>&5
2131   ac_status=$?
2132   echo "$as_me:2132: \$? = $ac_status" >&5
2133   (exit "$ac_status"); }; }; then
2134   ac_compiler_gnu=yes
2135 else
2136   echo "$as_me: failed program was:" >&5
2137 cat "conftest.$ac_ext" >&5
2138 ac_compiler_gnu=no
2139 fi
2140 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2141 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2142
2143 fi
2144 echo "$as_me:2144: result: $ac_cv_c_compiler_gnu" >&5
2145 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2146 GCC=`test $ac_compiler_gnu = yes && echo yes`
2147 ac_test_CFLAGS=${CFLAGS+set}
2148 ac_save_CFLAGS=$CFLAGS
2149 CFLAGS="-g"
2150 echo "$as_me:2150: checking whether $CC accepts -g" >&5
2151 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2152 if test "${ac_cv_prog_cc_g+set}" = set; then
2153   echo $ECHO_N "(cached) $ECHO_C" >&6
2154 else
2155   cat >"conftest.$ac_ext" <<_ACEOF
2156 #line 2156 "configure"
2157 #include "confdefs.h"
2158
2159 int
2160 main (void)
2161 {
2162
2163   ;
2164   return 0;
2165 }
2166 _ACEOF
2167 rm -f "conftest.$ac_objext"
2168 if { (eval echo "$as_me:2168: \"$ac_compile\"") >&5
2169   (eval $ac_compile) 2>&5
2170   ac_status=$?
2171   echo "$as_me:2171: \$? = $ac_status" >&5
2172   (exit "$ac_status"); } &&
2173          { ac_try='test -s "conftest.$ac_objext"'
2174   { (eval echo "$as_me:2174: \"$ac_try\"") >&5
2175   (eval $ac_try) 2>&5
2176   ac_status=$?
2177   echo "$as_me:2177: \$? = $ac_status" >&5
2178   (exit "$ac_status"); }; }; then
2179   ac_cv_prog_cc_g=yes
2180 else
2181   echo "$as_me: failed program was:" >&5
2182 cat "conftest.$ac_ext" >&5
2183 ac_cv_prog_cc_g=no
2184 fi
2185 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2186 fi
2187 echo "$as_me:2187: result: $ac_cv_prog_cc_g" >&5
2188 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2189 if test "$ac_test_CFLAGS" = set; then
2190   CFLAGS=$ac_save_CFLAGS
2191 elif test $ac_cv_prog_cc_g = yes; then
2192   if test "$GCC" = yes; then
2193     CFLAGS="-g -O2"
2194   else
2195     CFLAGS="-g"
2196   fi
2197 else
2198   if test "$GCC" = yes; then
2199     CFLAGS="-O2"
2200   else
2201     CFLAGS=
2202   fi
2203 fi
2204 # Some people use a C++ compiler to compile C.  Since we use `exit',
2205 # in C++ we need to declare it.  In case someone uses the same compiler
2206 # for both compiling C and C++ we need to have the C++ compiler decide
2207 # the declaration of exit, since it's the most demanding environment.
2208 cat >"conftest.$ac_ext" <<_ACEOF
2209 #ifndef __cplusplus
2210   choke me
2211 #endif
2212 _ACEOF
2213 rm -f "conftest.$ac_objext"
2214 if { (eval echo "$as_me:2214: \"$ac_compile\"") >&5
2215   (eval $ac_compile) 2>&5
2216   ac_status=$?
2217   echo "$as_me:2217: \$? = $ac_status" >&5
2218   (exit "$ac_status"); } &&
2219          { ac_try='test -s "conftest.$ac_objext"'
2220   { (eval echo "$as_me:2220: \"$ac_try\"") >&5
2221   (eval $ac_try) 2>&5
2222   ac_status=$?
2223   echo "$as_me:2223: \$? = $ac_status" >&5
2224   (exit "$ac_status"); }; }; then
2225   for ac_declaration in \
2226    ''\
2227    '#include <stdlib.h>' \
2228    'extern "C" void std::exit (int) throw (); using std::exit;' \
2229    'extern "C" void std::exit (int); using std::exit;' \
2230    'extern "C" void exit (int) throw ();' \
2231    'extern "C" void exit (int);' \
2232    'void exit (int);'
2233 do
2234   cat >"conftest.$ac_ext" <<_ACEOF
2235 #line 2235 "configure"
2236 #include "confdefs.h"
2237 #include <stdlib.h>
2238 $ac_declaration
2239 int
2240 main (void)
2241 {
2242 exit (42);
2243   ;
2244   return 0;
2245 }
2246 _ACEOF
2247 rm -f "conftest.$ac_objext"
2248 if { (eval echo "$as_me:2248: \"$ac_compile\"") >&5
2249   (eval $ac_compile) 2>&5
2250   ac_status=$?
2251   echo "$as_me:2251: \$? = $ac_status" >&5
2252   (exit "$ac_status"); } &&
2253          { ac_try='test -s "conftest.$ac_objext"'
2254   { (eval echo "$as_me:2254: \"$ac_try\"") >&5
2255   (eval $ac_try) 2>&5
2256   ac_status=$?
2257   echo "$as_me:2257: \$? = $ac_status" >&5
2258   (exit "$ac_status"); }; }; then
2259   :
2260 else
2261   echo "$as_me: failed program was:" >&5
2262 cat "conftest.$ac_ext" >&5
2263 continue
2264 fi
2265 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2266   cat >"conftest.$ac_ext" <<_ACEOF
2267 #line 2267 "configure"
2268 #include "confdefs.h"
2269 $ac_declaration
2270 int
2271 main (void)
2272 {
2273 exit (42);
2274   ;
2275   return 0;
2276 }
2277 _ACEOF
2278 rm -f "conftest.$ac_objext"
2279 if { (eval echo "$as_me:2279: \"$ac_compile\"") >&5
2280   (eval $ac_compile) 2>&5
2281   ac_status=$?
2282   echo "$as_me:2282: \$? = $ac_status" >&5
2283   (exit "$ac_status"); } &&
2284          { ac_try='test -s "conftest.$ac_objext"'
2285   { (eval echo "$as_me:2285: \"$ac_try\"") >&5
2286   (eval $ac_try) 2>&5
2287   ac_status=$?
2288   echo "$as_me:2288: \$? = $ac_status" >&5
2289   (exit "$ac_status"); }; }; then
2290   break
2291 else
2292   echo "$as_me: failed program was:" >&5
2293 cat "conftest.$ac_ext" >&5
2294 fi
2295 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2296 done
2297 rm -rf conftest*
2298 if test -n "$ac_declaration"; then
2299   echo '#ifdef __cplusplus' >>confdefs.h
2300   echo "$ac_declaration"    >>confdefs.h
2301   echo '#endif'             >>confdefs.h
2302 fi
2303
2304 else
2305   echo "$as_me: failed program was:" >&5
2306 cat "conftest.$ac_ext" >&5
2307 fi
2308 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2309 ac_ext=c
2310 ac_cpp='$CPP $CPPFLAGS'
2311 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2312 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2314 ac_main_return="return"
2315
2316 GCC_VERSION=none
2317 if test "$GCC" = yes ; then
2318         echo "$as_me:2318: checking version of $CC" >&5
2319 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2320         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2321         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2322         echo "$as_me:2322: result: $GCC_VERSION" >&5
2323 echo "${ECHO_T}$GCC_VERSION" >&6
2324 fi
2325
2326 INTEL_COMPILER=no
2327
2328 if test "$GCC" = yes ; then
2329         case "$host_os" in
2330         (linux*|gnu*)
2331                 echo "$as_me:2331: checking if this is really Intel C compiler" >&5
2332 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2333                 cf_save_CFLAGS="$CFLAGS"
2334                 CFLAGS="$CFLAGS -no-gcc"
2335                 cat >"conftest.$ac_ext" <<_ACEOF
2336 #line 2336 "configure"
2337 #include "confdefs.h"
2338
2339 int
2340 main (void)
2341 {
2342
2343 #ifdef __INTEL_COMPILER
2344 #else
2345 #error __INTEL_COMPILER is not defined
2346 #endif
2347
2348   ;
2349   return 0;
2350 }
2351 _ACEOF
2352 rm -f "conftest.$ac_objext"
2353 if { (eval echo "$as_me:2353: \"$ac_compile\"") >&5
2354   (eval $ac_compile) 2>&5
2355   ac_status=$?
2356   echo "$as_me:2356: \$? = $ac_status" >&5
2357   (exit "$ac_status"); } &&
2358          { ac_try='test -s "conftest.$ac_objext"'
2359   { (eval echo "$as_me:2359: \"$ac_try\"") >&5
2360   (eval $ac_try) 2>&5
2361   ac_status=$?
2362   echo "$as_me:2362: \$? = $ac_status" >&5
2363   (exit "$ac_status"); }; }; then
2364   INTEL_COMPILER=yes
2365 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2366
2367 else
2368   echo "$as_me: failed program was:" >&5
2369 cat "conftest.$ac_ext" >&5
2370 fi
2371 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2372                 CFLAGS="$cf_save_CFLAGS"
2373                 echo "$as_me:2373: result: $INTEL_COMPILER" >&5
2374 echo "${ECHO_T}$INTEL_COMPILER" >&6
2375                 ;;
2376         esac
2377 fi
2378
2379 CLANG_COMPILER=no
2380
2381 if test "$GCC" = yes ; then
2382         echo "$as_me:2382: checking if this is really Clang C compiler" >&5
2383 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2384         cf_save_CFLAGS="$CFLAGS"
2385         cat >"conftest.$ac_ext" <<_ACEOF
2386 #line 2386 "configure"
2387 #include "confdefs.h"
2388
2389 int
2390 main (void)
2391 {
2392
2393 #ifdef __clang__
2394 #else
2395 #error __clang__ is not defined
2396 #endif
2397
2398   ;
2399   return 0;
2400 }
2401 _ACEOF
2402 rm -f "conftest.$ac_objext"
2403 if { (eval echo "$as_me:2403: \"$ac_compile\"") >&5
2404   (eval $ac_compile) 2>&5
2405   ac_status=$?
2406   echo "$as_me:2406: \$? = $ac_status" >&5
2407   (exit "$ac_status"); } &&
2408          { ac_try='test -s "conftest.$ac_objext"'
2409   { (eval echo "$as_me:2409: \"$ac_try\"") >&5
2410   (eval $ac_try) 2>&5
2411   ac_status=$?
2412   echo "$as_me:2412: \$? = $ac_status" >&5
2413   (exit "$ac_status"); }; }; then
2414   CLANG_COMPILER=yes
2415
2416 else
2417   echo "$as_me: failed program was:" >&5
2418 cat "conftest.$ac_ext" >&5
2419 fi
2420 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2421         CFLAGS="$cf_save_CFLAGS"
2422         echo "$as_me:2422: result: $CLANG_COMPILER" >&5
2423 echo "${ECHO_T}$CLANG_COMPILER" >&6
2424 fi
2425
2426 CLANG_VERSION=none
2427
2428 if test "x$CLANG_COMPILER" = "xyes" ; then
2429         case "$CC" in
2430         (c[1-9][0-9]|*/c[1-9][0-9])
2431                 { echo "$as_me:2431: WARNING: replacing broken compiler alias $CC" >&5
2432 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2433                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2434                 CC=clang
2435                 ;;
2436         esac
2437
2438         echo "$as_me:2438: checking version of $CC" >&5
2439 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2440         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.].*//'`"
2441         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2442         echo "$as_me:2442: result: $CLANG_VERSION" >&5
2443 echo "${ECHO_T}$CLANG_VERSION" >&6
2444
2445         for cf_clang_opt in \
2446                 -Qunused-arguments \
2447                 -Wno-error=implicit-function-declaration
2448         do
2449                 echo "$as_me:2449: checking if option $cf_clang_opt works" >&5
2450 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2451                 cf_save_CFLAGS="$CFLAGS"
2452                 CFLAGS="$CFLAGS $cf_clang_opt"
2453                 cat >"conftest.$ac_ext" <<_ACEOF
2454 #line 2454 "configure"
2455 #include "confdefs.h"
2456
2457                         #include <stdio.h>
2458 int
2459 main (void)
2460 {
2461
2462                         printf("hello!\\n");
2463   ;
2464   return 0;
2465 }
2466 _ACEOF
2467 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2468 if { (eval echo "$as_me:2468: \"$ac_link\"") >&5
2469   (eval $ac_link) 2>&5
2470   ac_status=$?
2471   echo "$as_me:2471: \$? = $ac_status" >&5
2472   (exit "$ac_status"); } &&
2473          { ac_try='test -s "conftest$ac_exeext"'
2474   { (eval echo "$as_me:2474: \"$ac_try\"") >&5
2475   (eval $ac_try) 2>&5
2476   ac_status=$?
2477   echo "$as_me:2477: \$? = $ac_status" >&5
2478   (exit "$ac_status"); }; }; then
2479
2480                         cf_clang_optok=yes
2481 else
2482   echo "$as_me: failed program was:" >&5
2483 cat "conftest.$ac_ext" >&5
2484
2485                         cf_clang_optok=no
2486 fi
2487 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2488                 echo "$as_me:2488: result: $cf_clang_optok" >&5
2489 echo "${ECHO_T}$cf_clang_optok" >&6
2490                 CFLAGS="$cf_save_CFLAGS"
2491                 if test "$cf_clang_optok" = yes; then
2492                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2493
2494 echo "${as_me:-configure}:2494: testing adding option $cf_clang_opt ..." 1>&5
2495
2496         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2497         CFLAGS="${CFLAGS}$cf_clang_opt"
2498
2499                 fi
2500         done
2501 fi
2502
2503 echo "$as_me:2503: checking for $CC option to accept ANSI C" >&5
2504 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2505 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2506   echo $ECHO_N "(cached) $ECHO_C" >&6
2507 else
2508   ac_cv_prog_cc_stdc=no
2509 ac_save_CC=$CC
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <stdarg.h>
2514 #include <stdio.h>
2515 #include <sys/types.h>
2516 #include <sys/stat.h>
2517 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2518 struct buf { int x; };
2519 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2520 static char *e (char **p, int i)
2521 {
2522   return p[i];
2523 }
2524 static char *f (char * (*g) (char **, int), char **p, ...)
2525 {
2526   char *s;
2527   va_list v;
2528   va_start (v,p);
2529   s = g (p, va_arg (v,int));
2530   va_end (v);
2531   return s;
2532 }
2533 int test (int i, double x);
2534 struct s1 {int (*f) (int a);};
2535 struct s2 {int (*f) (double a);};
2536 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2537 int argc;
2538 char **argv;
2539 int
2540 main (void)
2541 {
2542 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2543   ;
2544   return 0;
2545 }
2546 _ACEOF
2547 # Don't try gcc -ansi; that turns off useful extensions and
2548 # breaks some systems' header files.
2549 # AIX                   -qlanglvl=ansi
2550 # Ultrix and OSF/1      -std1
2551 # HP-UX 10.20 and later -Ae
2552 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2553 # SVR4                  -Xc -D__EXTENSIONS__
2554 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2555 do
2556   CC="$ac_save_CC $ac_arg"
2557   rm -f "conftest.$ac_objext"
2558 if { (eval echo "$as_me:2558: \"$ac_compile\"") >&5
2559   (eval $ac_compile) 2>&5
2560   ac_status=$?
2561   echo "$as_me:2561: \$? = $ac_status" >&5
2562   (exit "$ac_status"); } &&
2563          { ac_try='test -s "conftest.$ac_objext"'
2564   { (eval echo "$as_me:2564: \"$ac_try\"") >&5
2565   (eval $ac_try) 2>&5
2566   ac_status=$?
2567   echo "$as_me:2567: \$? = $ac_status" >&5
2568   (exit "$ac_status"); }; }; then
2569   ac_cv_prog_cc_stdc=$ac_arg
2570 break
2571 else
2572   echo "$as_me: failed program was:" >&5
2573 cat "conftest.$ac_ext" >&5
2574 fi
2575 rm -f "conftest.$ac_objext"
2576 done
2577 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2578 CC=$ac_save_CC
2579
2580 fi
2581
2582 case "x$ac_cv_prog_cc_stdc" in
2583   x|xno)
2584     echo "$as_me:2584: result: none needed" >&5
2585 echo "${ECHO_T}none needed" >&6 ;;
2586   *)
2587     echo "$as_me:2587: result: $ac_cv_prog_cc_stdc" >&5
2588 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2589     CC="$CC $ac_cv_prog_cc_stdc" ;;
2590 esac
2591
2592 # This should have been defined by AC_PROG_CC
2593 : "${CC:=cc}"
2594
2595 echo "$as_me:2595: checking \$CFLAGS variable" >&5
2596 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2597 case "x$CFLAGS" in
2598 (*-[IUD]*)
2599         echo "$as_me:2599: result: broken" >&5
2600 echo "${ECHO_T}broken" >&6
2601         { echo "$as_me:2601: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2602 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2603         cf_flags="$CFLAGS"
2604         CFLAGS=
2605         for cf_arg in $cf_flags
2606         do
2607
2608 cf_fix_cppflags=no
2609 cf_new_cflags=
2610 cf_new_cppflags=
2611 cf_new_extra_cppflags=
2612
2613 for cf_add_cflags in $cf_arg
2614 do
2615 case "$cf_fix_cppflags" in
2616 (no)
2617         case "$cf_add_cflags" in
2618         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2619                 case "$cf_add_cflags" in
2620                 (-D*)
2621                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2622
2623                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2624                                 && test -z "${cf_tst_cflags}" \
2625                                 && cf_fix_cppflags=yes
2626
2627                         if test "$cf_fix_cppflags" = yes ; then
2628
2629         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2630         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2631
2632                                 continue
2633                         elif test "${cf_tst_cflags}" = "\"'" ; then
2634
2635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2637
2638                                 continue
2639                         fi
2640                         ;;
2641                 esac
2642                 case "$CPPFLAGS" in
2643                 (*$cf_add_cflags)
2644                         ;;
2645                 (*)
2646                         case "$cf_add_cflags" in
2647                         (-D*)
2648                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2649
2650 CPPFLAGS=`echo "$CPPFLAGS" | \
2651         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2652                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2653
2654                                 ;;
2655                         esac
2656
2657         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2658         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2659
2660                         ;;
2661                 esac
2662                 ;;
2663         (*)
2664
2665         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2666         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2667
2668                 ;;
2669         esac
2670         ;;
2671 (yes)
2672
2673         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2674         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2675
2676         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2677
2678         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2679                 && test -z "${cf_tst_cflags}" \
2680                 && cf_fix_cppflags=no
2681         ;;
2682 esac
2683 done
2684
2685 if test -n "$cf_new_cflags" ; then
2686
2687         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2688         CFLAGS="${CFLAGS}$cf_new_cflags"
2689
2690 fi
2691
2692 if test -n "$cf_new_cppflags" ; then
2693
2694         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2695         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2696
2697 fi
2698
2699 if test -n "$cf_new_extra_cppflags" ; then
2700
2701         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2702         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2703
2704 fi
2705
2706         done
2707         ;;
2708 (*)
2709         echo "$as_me:2709: result: ok" >&5
2710 echo "${ECHO_T}ok" >&6
2711         ;;
2712 esac
2713
2714 echo "$as_me:2714: checking \$CC variable" >&5
2715 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2716 case "$CC" in
2717 (*[\ \  ]-*)
2718         echo "$as_me:2718: result: broken" >&5
2719 echo "${ECHO_T}broken" >&6
2720         { echo "$as_me:2720: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2721 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2722         # humor him...
2723         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2724         cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2725         CC="$cf_prog"
2726         for cf_arg in $cf_flags
2727         do
2728                 case "x$cf_arg" in
2729                 (x-[IUDfgOW]*)
2730
2731 cf_fix_cppflags=no
2732 cf_new_cflags=
2733 cf_new_cppflags=
2734 cf_new_extra_cppflags=
2735
2736 for cf_add_cflags in $cf_arg
2737 do
2738 case "$cf_fix_cppflags" in
2739 (no)
2740         case "$cf_add_cflags" in
2741         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2742                 case "$cf_add_cflags" in
2743                 (-D*)
2744                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2745
2746                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2747                                 && test -z "${cf_tst_cflags}" \
2748                                 && cf_fix_cppflags=yes
2749
2750                         if test "$cf_fix_cppflags" = yes ; then
2751
2752         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2753         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2754
2755                                 continue
2756                         elif test "${cf_tst_cflags}" = "\"'" ; then
2757
2758         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2759         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2760
2761                                 continue
2762                         fi
2763                         ;;
2764                 esac
2765                 case "$CPPFLAGS" in
2766                 (*$cf_add_cflags)
2767                         ;;
2768                 (*)
2769                         case "$cf_add_cflags" in
2770                         (-D*)
2771                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2772
2773 CPPFLAGS=`echo "$CPPFLAGS" | \
2774         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2775                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2776
2777                                 ;;
2778                         esac
2779
2780         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2781         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2782
2783                         ;;
2784                 esac
2785                 ;;
2786         (*)
2787
2788         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2789         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2790
2791                 ;;
2792         esac
2793         ;;
2794 (yes)
2795
2796         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2797         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2798
2799         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2800
2801         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2802                 && test -z "${cf_tst_cflags}" \
2803                 && cf_fix_cppflags=no
2804         ;;
2805 esac
2806 done
2807
2808 if test -n "$cf_new_cflags" ; then
2809
2810         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2811         CFLAGS="${CFLAGS}$cf_new_cflags"
2812
2813 fi
2814
2815 if test -n "$cf_new_cppflags" ; then
2816
2817         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2818         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2819
2820 fi
2821
2822 if test -n "$cf_new_extra_cppflags" ; then
2823
2824         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2825         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2826
2827 fi
2828
2829                         ;;
2830                 (*)
2831                         CC="$CC $cf_arg"
2832                         ;;
2833                 esac
2834         done
2835         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2836
2837 echo "${as_me:-configure}:2837: testing resulting CC: '$CC' ..." 1>&5
2838
2839         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2840
2841 echo "${as_me:-configure}:2841: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2842
2843         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2844
2845 echo "${as_me:-configure}:2845: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2846
2847         ;;
2848 (*)
2849         echo "$as_me:2849: result: ok" >&5
2850 echo "${ECHO_T}ok" >&6
2851         ;;
2852 esac
2853
2854 ac_ext=c
2855 ac_cpp='$CPP $CPPFLAGS'
2856 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2857 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2858 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2859 ac_main_return="return"
2860 echo "$as_me:2860: checking how to run the C preprocessor" >&5
2861 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2862 # On Suns, sometimes $CPP names a directory.
2863 if test -n "$CPP" && test -d "$CPP"; then
2864   CPP=
2865 fi
2866 if test -z "$CPP"; then
2867   if test "${ac_cv_prog_CPP+set}" = set; then
2868   echo $ECHO_N "(cached) $ECHO_C" >&6
2869 else
2870       # Double quotes because CPP needs to be expanded
2871     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2872     do
2873       ac_preproc_ok=false
2874 for ac_c_preproc_warn_flag in '' yes
2875 do
2876   # Use a header file that comes with gcc, so configuring glibc
2877   # with a fresh cross-compiler works.
2878   # On the NeXT, cc -E runs the code through the compiler's parser,
2879   # not just through cpp. "Syntax error" is here to catch this case.
2880   cat >"conftest.$ac_ext" <<_ACEOF
2881 #line 2881 "configure"
2882 #include "confdefs.h"
2883 #include <assert.h>
2884                      Syntax error
2885 _ACEOF
2886 if { (eval echo "$as_me:2886: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2887   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2888   ac_status=$?
2889   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2890   rm -f conftest.er1
2891   cat conftest.err >&5
2892   echo "$as_me:2892: \$? = $ac_status" >&5
2893   (exit "$ac_status"); } >/dev/null; then
2894   if test -s conftest.err; then
2895     ac_cpp_err=$ac_c_preproc_warn_flag
2896   else
2897     ac_cpp_err=
2898   fi
2899 else
2900   ac_cpp_err=yes
2901 fi
2902 if test -z "$ac_cpp_err"; then
2903   :
2904 else
2905   echo "$as_me: failed program was:" >&5
2906   cat "conftest.$ac_ext" >&5
2907   # Broken: fails on valid input.
2908 continue
2909 fi
2910 rm -f conftest.err "conftest.$ac_ext"
2911
2912   # OK, works on sane cases.  Now check whether non-existent headers
2913   # can be detected and how.
2914   cat >"conftest.$ac_ext" <<_ACEOF
2915 #line 2915 "configure"
2916 #include "confdefs.h"
2917 #include <ac_nonexistent.h>
2918 _ACEOF
2919 if { (eval echo "$as_me:2919: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2920   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2921   ac_status=$?
2922   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2923   rm -f conftest.er1
2924   cat conftest.err >&5
2925   echo "$as_me:2925: \$? = $ac_status" >&5
2926   (exit "$ac_status"); } >/dev/null; then
2927   if test -s conftest.err; then
2928     ac_cpp_err=$ac_c_preproc_warn_flag
2929   else
2930     ac_cpp_err=
2931   fi
2932 else
2933   ac_cpp_err=yes
2934 fi
2935 if test -z "$ac_cpp_err"; then
2936   # Broken: success on invalid input.
2937 continue
2938 else
2939   echo "$as_me: failed program was:" >&5
2940   cat "conftest.$ac_ext" >&5
2941   # Passes both tests.
2942 ac_preproc_ok=:
2943 break
2944 fi
2945 rm -f conftest.err "conftest.$ac_ext"
2946
2947 done
2948 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2949 rm -f conftest.err "conftest.$ac_ext"
2950 if $ac_preproc_ok; then
2951   break
2952 fi
2953
2954     done
2955     ac_cv_prog_CPP=$CPP
2956
2957 fi
2958   CPP=$ac_cv_prog_CPP
2959 else
2960   ac_cv_prog_CPP=$CPP
2961 fi
2962 echo "$as_me:2962: result: $CPP" >&5
2963 echo "${ECHO_T}$CPP" >&6
2964 ac_preproc_ok=false
2965 for ac_c_preproc_warn_flag in '' yes
2966 do
2967   # Use a header file that comes with gcc, so configuring glibc
2968   # with a fresh cross-compiler works.
2969   # On the NeXT, cc -E runs the code through the compiler's parser,
2970   # not just through cpp. "Syntax error" is here to catch this case.
2971   cat >"conftest.$ac_ext" <<_ACEOF
2972 #line 2972 "configure"
2973 #include "confdefs.h"
2974 #include <assert.h>
2975                      Syntax error
2976 _ACEOF
2977 if { (eval echo "$as_me:2977: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2978   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2979   ac_status=$?
2980   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2981   rm -f conftest.er1
2982   cat conftest.err >&5
2983   echo "$as_me:2983: \$? = $ac_status" >&5
2984   (exit "$ac_status"); } >/dev/null; then
2985   if test -s conftest.err; then
2986     ac_cpp_err=$ac_c_preproc_warn_flag
2987   else
2988     ac_cpp_err=
2989   fi
2990 else
2991   ac_cpp_err=yes
2992 fi
2993 if test -z "$ac_cpp_err"; then
2994   :
2995 else
2996   echo "$as_me: failed program was:" >&5
2997   cat "conftest.$ac_ext" >&5
2998   # Broken: fails on valid input.
2999 continue
3000 fi
3001 rm -f conftest.err "conftest.$ac_ext"
3002
3003   # OK, works on sane cases.  Now check whether non-existent headers
3004   # can be detected and how.
3005   cat >"conftest.$ac_ext" <<_ACEOF
3006 #line 3006 "configure"
3007 #include "confdefs.h"
3008 #include <ac_nonexistent.h>
3009 _ACEOF
3010 if { (eval echo "$as_me:3010: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3011   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3012   ac_status=$?
3013   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3014   rm -f conftest.er1
3015   cat conftest.err >&5
3016   echo "$as_me:3016: \$? = $ac_status" >&5
3017   (exit "$ac_status"); } >/dev/null; then
3018   if test -s conftest.err; then
3019     ac_cpp_err=$ac_c_preproc_warn_flag
3020   else
3021     ac_cpp_err=
3022   fi
3023 else
3024   ac_cpp_err=yes
3025 fi
3026 if test -z "$ac_cpp_err"; then
3027   # Broken: success on invalid input.
3028 continue
3029 else
3030   echo "$as_me: failed program was:" >&5
3031   cat "conftest.$ac_ext" >&5
3032   # Passes both tests.
3033 ac_preproc_ok=:
3034 break
3035 fi
3036 rm -f conftest.err "conftest.$ac_ext"
3037
3038 done
3039 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3040 rm -f conftest.err "conftest.$ac_ext"
3041 if $ac_preproc_ok; then
3042   :
3043 else
3044   { { echo "$as_me:3044: error: C preprocessor \"$CPP\" fails sanity check" >&5
3045 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3046    { (exit 1); exit 1; }; }
3047 fi
3048
3049 ac_ext=c
3050 ac_cpp='$CPP $CPPFLAGS'
3051 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3052 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3053 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3054 ac_main_return="return"
3055
3056 if test $ac_cv_c_compiler_gnu = yes; then
3057     echo "$as_me:3057: checking whether $CC needs -traditional" >&5
3058 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3059 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3060   echo $ECHO_N "(cached) $ECHO_C" >&6
3061 else
3062     ac_pattern="Autoconf.*'x'"
3063   cat >"conftest.$ac_ext" <<_ACEOF
3064 #line 3064 "configure"
3065 #include "confdefs.h"
3066 #include <sgtty.h>
3067 int Autoconf = TIOCGETP;
3068 _ACEOF
3069 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3070   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3071   ac_cv_prog_gcc_traditional=yes
3072 else
3073   ac_cv_prog_gcc_traditional=no
3074 fi
3075 rm -rf conftest*
3076
3077   if test $ac_cv_prog_gcc_traditional = no; then
3078     cat >"conftest.$ac_ext" <<_ACEOF
3079 #line 3079 "configure"
3080 #include "confdefs.h"
3081 #include <termio.h>
3082 int Autoconf = TCGETA;
3083 _ACEOF
3084 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3085   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3086   ac_cv_prog_gcc_traditional=yes
3087 fi
3088 rm -rf conftest*
3089
3090   fi
3091 fi
3092 echo "$as_me:3092: result: $ac_cv_prog_gcc_traditional" >&5
3093 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3094   if test $ac_cv_prog_gcc_traditional = yes; then
3095     CC="$CC -traditional"
3096   fi
3097 fi
3098
3099 echo "$as_me:3099: checking whether $CC understands -c and -o together" >&5
3100 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3101 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3102   echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104
3105 cat > conftest.$ac_ext <<CF_EOF
3106 int main(void)
3107 {
3108         ${cf_cv_main_return:-return}(0);
3109 }
3110 CF_EOF
3111 # We do the test twice because some compilers refuse to overwrite an
3112 # existing .o file with -o, though they will create one.
3113 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3114 if { (eval echo "$as_me:3114: \"$ac_try\"") >&5
3115   (eval $ac_try) 2>&5
3116   ac_status=$?
3117   echo "$as_me:3117: \$? = $ac_status" >&5
3118   (exit "$ac_status"); } &&
3119   test -f conftest2.$ac_objext && { (eval echo "$as_me:3119: \"$ac_try\"") >&5
3120   (eval $ac_try) 2>&5
3121   ac_status=$?
3122   echo "$as_me:3122: \$? = $ac_status" >&5
3123   (exit "$ac_status"); };
3124 then
3125   eval cf_cv_prog_CC_c_o=yes
3126 else
3127   eval cf_cv_prog_CC_c_o=no
3128 fi
3129 rm -rf ./conftest*
3130
3131 fi
3132 if test "$cf_cv_prog_CC_c_o" = yes; then
3133   echo "$as_me:3133: result: yes" >&5
3134 echo "${ECHO_T}yes" >&6
3135 else
3136   echo "$as_me:3136: result: no" >&5
3137 echo "${ECHO_T}no" >&6
3138 fi
3139
3140 if test "$cross_compiling" = yes ; then
3141         LDCONFIG=:
3142 else
3143         case "$cf_cv_system_name" in
3144         (dragonfly*|mirbsd*|freebsd*)
3145                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3146                 ;;
3147         (*) LDPATH=$PATH:/sbin:/usr/sbin
3148                 # Extract the first word of "ldconfig", so it can be a program name with args.
3149 set dummy ldconfig; ac_word=$2
3150 echo "$as_me:3150: checking for $ac_word" >&5
3151 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3152 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3153   echo $ECHO_N "(cached) $ECHO_C" >&6
3154 else
3155   case $LDCONFIG in
3156   [\\/]* | ?:[\\/]*)
3157   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3158   ;;
3159   *)
3160   ac_save_IFS=$IFS; IFS=$ac_path_separator
3161 ac_dummy="$LDPATH"
3162 for ac_dir in $ac_dummy; do
3163   IFS=$ac_save_IFS
3164   test -z "$ac_dir" && ac_dir=.
3165   if $as_executable_p "$ac_dir/$ac_word"; then
3166    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3167    echo "$as_me:3167: found $ac_dir/$ac_word" >&5
3168    break
3169 fi
3170 done
3171
3172   ;;
3173 esac
3174 fi
3175 LDCONFIG=$ac_cv_path_LDCONFIG
3176
3177 if test -n "$LDCONFIG"; then
3178   echo "$as_me:3178: result: $LDCONFIG" >&5
3179 echo "${ECHO_T}$LDCONFIG" >&6
3180 else
3181   echo "$as_me:3181: result: no" >&5
3182 echo "${ECHO_T}no" >&6
3183 fi
3184
3185                 ;;
3186         esac
3187 fi
3188
3189 echo "$as_me:3189: checking if you want to ensure bool is consistent with C++" >&5
3190 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3191
3192 # Check whether --with-cxx or --without-cxx was given.
3193 if test "${with_cxx+set}" = set; then
3194   withval="$with_cxx"
3195   cf_with_cxx=$withval
3196 else
3197   cf_with_cxx=yes
3198 fi;
3199 echo "$as_me:3199: result: $cf_with_cxx" >&5
3200 echo "${ECHO_T}$cf_with_cxx" >&6
3201 if test "X$cf_with_cxx" = Xno ; then
3202         CXX=""
3203         GXX=""
3204 else
3205         # with autoconf 2.13, we can change the error to a warning:
3206                 ac_ext=cc
3207 ac_cpp='$CXXCPP $CPPFLAGS'
3208 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3209 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3210 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3211 ac_main_return="return"
3212 if test -n "$ac_tool_prefix"; then
3213   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3214   do
3215     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3216 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3217 echo "$as_me:3217: checking for $ac_word" >&5
3218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3219 if test "${ac_cv_prog_CXX+set}" = set; then
3220   echo $ECHO_N "(cached) $ECHO_C" >&6
3221 else
3222   if test -n "$CXX"; then
3223   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3224 else
3225   ac_save_IFS=$IFS; IFS=$ac_path_separator
3226 ac_dummy="$PATH"
3227 for ac_dir in $ac_dummy; do
3228   IFS=$ac_save_IFS
3229   test -z "$ac_dir" && ac_dir=.
3230   $as_executable_p "$ac_dir/$ac_word" || continue
3231 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3232 echo "$as_me:3232: found $ac_dir/$ac_word" >&5
3233 break
3234 done
3235
3236 fi
3237 fi
3238 CXX=$ac_cv_prog_CXX
3239 if test -n "$CXX"; then
3240   echo "$as_me:3240: result: $CXX" >&5
3241 echo "${ECHO_T}$CXX" >&6
3242 else
3243   echo "$as_me:3243: result: no" >&5
3244 echo "${ECHO_T}no" >&6
3245 fi
3246
3247     test -n "$CXX" && break
3248   done
3249 fi
3250 if test -z "$CXX"; then
3251   ac_ct_CXX=$CXX
3252   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3253 do
3254   # Extract the first word of "$ac_prog", so it can be a program name with args.
3255 set dummy $ac_prog; ac_word=$2
3256 echo "$as_me:3256: checking for $ac_word" >&5
3257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3258 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3259   echo $ECHO_N "(cached) $ECHO_C" >&6
3260 else
3261   if test -n "$ac_ct_CXX"; then
3262   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3263 else
3264   ac_save_IFS=$IFS; IFS=$ac_path_separator
3265 ac_dummy="$PATH"
3266 for ac_dir in $ac_dummy; do
3267   IFS=$ac_save_IFS
3268   test -z "$ac_dir" && ac_dir=.
3269   $as_executable_p "$ac_dir/$ac_word" || continue
3270 ac_cv_prog_ac_ct_CXX="$ac_prog"
3271 echo "$as_me:3271: found $ac_dir/$ac_word" >&5
3272 break
3273 done
3274
3275 fi
3276 fi
3277 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3278 if test -n "$ac_ct_CXX"; then
3279   echo "$as_me:3279: result: $ac_ct_CXX" >&5
3280 echo "${ECHO_T}$ac_ct_CXX" >&6
3281 else
3282   echo "$as_me:3282: result: no" >&5
3283 echo "${ECHO_T}no" >&6
3284 fi
3285
3286   test -n "$ac_ct_CXX" && break
3287 done
3288 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3289
3290   CXX=$ac_ct_CXX
3291 fi
3292
3293 # Provide some information about the compiler.
3294 echo "$as_me:3294:" \
3295      "checking for C++ compiler version" >&5
3296 ac_compiler=`set X $ac_compile; echo $2`
3297 { (eval echo "$as_me:3297: \"$ac_compiler --version </dev/null >&5\"") >&5
3298   (eval $ac_compiler --version </dev/null >&5) 2>&5
3299   ac_status=$?
3300   echo "$as_me:3300: \$? = $ac_status" >&5
3301   (exit "$ac_status"); }
3302 { (eval echo "$as_me:3302: \"$ac_compiler -v </dev/null >&5\"") >&5
3303   (eval $ac_compiler -v </dev/null >&5) 2>&5
3304   ac_status=$?
3305   echo "$as_me:3305: \$? = $ac_status" >&5
3306   (exit "$ac_status"); }
3307 { (eval echo "$as_me:3307: \"$ac_compiler -V </dev/null >&5\"") >&5
3308   (eval $ac_compiler -V </dev/null >&5) 2>&5
3309   ac_status=$?
3310   echo "$as_me:3310: \$? = $ac_status" >&5
3311   (exit "$ac_status"); }
3312
3313 echo "$as_me:3313: checking whether we are using the GNU C++ compiler" >&5
3314 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3315 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3316   echo $ECHO_N "(cached) $ECHO_C" >&6
3317 else
3318   cat >"conftest.$ac_ext" <<_ACEOF
3319 #line 3319 "configure"
3320 #include "confdefs.h"
3321
3322 int
3323 main (void)
3324 {
3325 #ifndef __GNUC__
3326        choke me
3327 #endif
3328
3329   ;
3330   return 0;
3331 }
3332 _ACEOF
3333 rm -f "conftest.$ac_objext"
3334 if { (eval echo "$as_me:3334: \"$ac_compile\"") >&5
3335   (eval $ac_compile) 2>&5
3336   ac_status=$?
3337   echo "$as_me:3337: \$? = $ac_status" >&5
3338   (exit "$ac_status"); } &&
3339          { ac_try='test -s "conftest.$ac_objext"'
3340   { (eval echo "$as_me:3340: \"$ac_try\"") >&5
3341   (eval $ac_try) 2>&5
3342   ac_status=$?
3343   echo "$as_me:3343: \$? = $ac_status" >&5
3344   (exit "$ac_status"); }; }; then
3345   ac_compiler_gnu=yes
3346 else
3347   echo "$as_me: failed program was:" >&5
3348 cat "conftest.$ac_ext" >&5
3349 ac_compiler_gnu=no
3350 fi
3351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3352 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3353
3354 fi
3355 echo "$as_me:3355: result: $ac_cv_cxx_compiler_gnu" >&5
3356 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3357 GXX=`test $ac_compiler_gnu = yes && echo yes`
3358 ac_test_CXXFLAGS=${CXXFLAGS+set}
3359 ac_save_CXXFLAGS=$CXXFLAGS
3360 CXXFLAGS="-g"
3361 echo "$as_me:3361: checking whether $CXX accepts -g" >&5
3362 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3363 if test "${ac_cv_prog_cxx_g+set}" = set; then
3364   echo $ECHO_N "(cached) $ECHO_C" >&6
3365 else
3366   cat >"conftest.$ac_ext" <<_ACEOF
3367 #line 3367 "configure"
3368 #include "confdefs.h"
3369
3370 int
3371 main (void)
3372 {
3373
3374   ;
3375   return 0;
3376 }
3377 _ACEOF
3378 rm -f "conftest.$ac_objext"
3379 if { (eval echo "$as_me:3379: \"$ac_compile\"") >&5
3380   (eval $ac_compile) 2>&5
3381   ac_status=$?
3382   echo "$as_me:3382: \$? = $ac_status" >&5
3383   (exit "$ac_status"); } &&
3384          { ac_try='test -s "conftest.$ac_objext"'
3385   { (eval echo "$as_me:3385: \"$ac_try\"") >&5
3386   (eval $ac_try) 2>&5
3387   ac_status=$?
3388   echo "$as_me:3388: \$? = $ac_status" >&5
3389   (exit "$ac_status"); }; }; then
3390   ac_cv_prog_cxx_g=yes
3391 else
3392   echo "$as_me: failed program was:" >&5
3393 cat "conftest.$ac_ext" >&5
3394 ac_cv_prog_cxx_g=no
3395 fi
3396 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3397 fi
3398 echo "$as_me:3398: result: $ac_cv_prog_cxx_g" >&5
3399 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3400 if test "$ac_test_CXXFLAGS" = set; then
3401   CXXFLAGS=$ac_save_CXXFLAGS
3402 elif test $ac_cv_prog_cxx_g = yes; then
3403   if test "$GXX" = yes; then
3404     CXXFLAGS="-g -O2"
3405   else
3406     CXXFLAGS="-g"
3407   fi
3408 else
3409   if test "$GXX" = yes; then
3410     CXXFLAGS="-O2"
3411   else
3412     CXXFLAGS=
3413   fi
3414 fi
3415 for ac_declaration in \
3416    ''\
3417    '#include <stdlib.h>' \
3418    'extern "C" void std::exit (int) throw (); using std::exit;' \
3419    'extern "C" void std::exit (int); using std::exit;' \
3420    'extern "C" void exit (int) throw ();' \
3421    'extern "C" void exit (int);' \
3422    'void exit (int);'
3423 do
3424   cat >"conftest.$ac_ext" <<_ACEOF
3425 #line 3425 "configure"
3426 #include "confdefs.h"
3427 #include <stdlib.h>
3428 $ac_declaration
3429 int
3430 main (void)
3431 {
3432 exit (42);
3433   ;
3434   return 0;
3435 }
3436 _ACEOF
3437 rm -f "conftest.$ac_objext"
3438 if { (eval echo "$as_me:3438: \"$ac_compile\"") >&5
3439   (eval $ac_compile) 2>&5
3440   ac_status=$?
3441   echo "$as_me:3441: \$? = $ac_status" >&5
3442   (exit "$ac_status"); } &&
3443          { ac_try='test -s "conftest.$ac_objext"'
3444   { (eval echo "$as_me:3444: \"$ac_try\"") >&5
3445   (eval $ac_try) 2>&5
3446   ac_status=$?
3447   echo "$as_me:3447: \$? = $ac_status" >&5
3448   (exit "$ac_status"); }; }; then
3449   :
3450 else
3451   echo "$as_me: failed program was:" >&5
3452 cat "conftest.$ac_ext" >&5
3453 continue
3454 fi
3455 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3456   cat >"conftest.$ac_ext" <<_ACEOF
3457 #line 3457 "configure"
3458 #include "confdefs.h"
3459 $ac_declaration
3460 int
3461 main (void)
3462 {
3463 exit (42);
3464   ;
3465   return 0;
3466 }
3467 _ACEOF
3468 rm -f "conftest.$ac_objext"
3469 if { (eval echo "$as_me:3469: \"$ac_compile\"") >&5
3470   (eval $ac_compile) 2>&5
3471   ac_status=$?
3472   echo "$as_me:3472: \$? = $ac_status" >&5
3473   (exit "$ac_status"); } &&
3474          { ac_try='test -s "conftest.$ac_objext"'
3475   { (eval echo "$as_me:3475: \"$ac_try\"") >&5
3476   (eval $ac_try) 2>&5
3477   ac_status=$?
3478   echo "$as_me:3478: \$? = $ac_status" >&5
3479   (exit "$ac_status"); }; }; then
3480   break
3481 else
3482   echo "$as_me: failed program was:" >&5
3483 cat "conftest.$ac_ext" >&5
3484 fi
3485 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3486 done
3487 rm -rf conftest*
3488 if test -n "$ac_declaration"; then
3489   echo '#ifdef __cplusplus' >>confdefs.h
3490   echo "$ac_declaration"    >>confdefs.h
3491   echo '#endif'             >>confdefs.h
3492 fi
3493
3494 ac_ext=c
3495 ac_cpp='$CPP $CPPFLAGS'
3496 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3497 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3498 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3499 ac_main_return="return"
3500
3501         ac_ext=cc
3502 ac_cpp='$CXXCPP $CPPFLAGS'
3503 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3504 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3505 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3506 ac_main_return="return"
3507
3508         if test "x$cf_with_cxx" != xno
3509         then
3510                 # Several of the C++ configurations do not work, particularly when
3511                 # cross-compiling (20140913 -TD)
3512                 echo "$as_me:3512: checking if $CXX works" >&5
3513 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3514
3515                 save_CPPFLAGS="$CPPFLAGS"
3516                 eval cf_includedir=${includedir}
3517                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3518
3519 cat >"conftest.$ac_ext" <<_ACEOF
3520 #line 3520 "configure"
3521 #include "confdefs.h"
3522
3523 #include <stdlib.h>
3524 #include <stdio.h>
3525
3526 int
3527 main (void)
3528 {
3529
3530                 printf("Hello world!\n")
3531
3532   ;
3533   return 0;
3534 }
3535 _ACEOF
3536 rm -f "conftest.$ac_objext"
3537 if { (eval echo "$as_me:3537: \"$ac_compile\"") >&5
3538   (eval $ac_compile) 2>&5
3539   ac_status=$?
3540   echo "$as_me:3540: \$? = $ac_status" >&5
3541   (exit "$ac_status"); } &&
3542          { ac_try='test -s "conftest.$ac_objext"'
3543   { (eval echo "$as_me:3543: \"$ac_try\"") >&5
3544   (eval $ac_try) 2>&5
3545   ac_status=$?
3546   echo "$as_me:3546: \$? = $ac_status" >&5
3547   (exit "$ac_status"); }; }; then
3548   cf_cxx_works=yes
3549 else
3550   echo "$as_me: failed program was:" >&5
3551 cat "conftest.$ac_ext" >&5
3552 cf_cxx_works=no
3553 fi
3554 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3555                 CPPFLAGS="$save_CPPFLAGS"
3556
3557                 echo "$as_me:3557: result: $cf_cxx_works" >&5
3558 echo "${ECHO_T}$cf_cxx_works" >&6
3559                 if test "x$cf_cxx_works" = xno
3560                 then
3561                         { echo "$as_me:3561: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3562 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3563                         cf_with_cxx=no; CXX=""; GXX="";
3564                 fi
3565         fi
3566         ac_ext=c
3567 ac_cpp='$CPP $CPPFLAGS'
3568 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3569 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3570 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3571 ac_main_return="return"
3572
3573         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3574         if test "$CXX" = "g++" ; then
3575                 # Extract the first word of "g++", so it can be a program name with args.
3576 set dummy g++; ac_word=$2
3577 echo "$as_me:3577: checking for $ac_word" >&5
3578 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3579 if test "${ac_cv_path_CXX+set}" = set; then
3580   echo $ECHO_N "(cached) $ECHO_C" >&6
3581 else
3582   case $CXX in
3583   [\\/]* | ?:[\\/]*)
3584   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3585   ;;
3586   *)
3587   ac_save_IFS=$IFS; IFS=$ac_path_separator
3588 ac_dummy="$PATH"
3589 for ac_dir in $ac_dummy; do
3590   IFS=$ac_save_IFS
3591   test -z "$ac_dir" && ac_dir=.
3592   if $as_executable_p "$ac_dir/$ac_word"; then
3593    ac_cv_path_CXX="$ac_dir/$ac_word"
3594    echo "$as_me:3594: found $ac_dir/$ac_word" >&5
3595    break
3596 fi
3597 done
3598
3599   ;;
3600 esac
3601 fi
3602 CXX=$ac_cv_path_CXX
3603
3604 if test -n "$CXX"; then
3605   echo "$as_me:3605: result: $CXX" >&5
3606 echo "${ECHO_T}$CXX" >&6
3607 else
3608   echo "$as_me:3608: result: no" >&5
3609 echo "${ECHO_T}no" >&6
3610 fi
3611
3612         fi
3613         case "x$CXX" in
3614         (x|xg++)
3615                 { echo "$as_me:3615: WARNING: You don't have any C++ compiler, too bad" >&5
3616 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3617                 cf_with_cxx=no; CXX=""; GXX="";
3618                 ;;
3619         esac
3620 fi
3621
3622 GXX_VERSION=none
3623 if test "$GXX" = yes; then
3624         echo "$as_me:3624: checking version of ${CXX:-g++}" >&5
3625 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3626         GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3627         if test -z "$GXX_VERSION"
3628         then
3629                 GXX_VERSION=unknown
3630                 GXX=no
3631         fi
3632         echo "$as_me:3632: result: $GXX_VERSION" >&5
3633 echo "${ECHO_T}$GXX_VERSION" >&6
3634 fi
3635
3636 case "$GXX_VERSION" in
3637 ([1-9][0-9].*)
3638         ;;
3639 (1.*|2.[0-6]*)
3640         { echo "$as_me:3640: WARNING: templates do not work" >&5
3641 echo "$as_me: WARNING: templates do not work" >&2;}
3642         ;;
3643 esac
3644
3645 echo "$as_me:3645: checking if you want to build C++ binding and demo" >&5
3646 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3647
3648 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3649 if test "${with_cxx_binding+set}" = set; then
3650   withval="$with_cxx_binding"
3651   cf_with_cxx_binding=$withval
3652 else
3653   cf_with_cxx_binding=$cf_with_cxx
3654 fi;
3655 echo "$as_me:3655: result: $cf_with_cxx_binding" >&5
3656 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3657
3658 echo "$as_me:3658: checking if you want to build with Ada" >&5
3659 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3660 echo "$as_me:3660: result: $cf_with_ada" >&5
3661 echo "${ECHO_T}$cf_with_ada" >&6
3662
3663 echo "$as_me:3663: checking if you want to install terminal database" >&5
3664 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3665
3666 # Check whether --enable-db-install or --disable-db-install was given.
3667 if test "${enable_db_install+set}" = set; then
3668   enableval="$enable_db_install"
3669   cf_with_db_install=$enableval
3670 else
3671   cf_with_db_install=yes
3672 fi;
3673 echo "$as_me:3673: result: $cf_with_db_install" >&5
3674 echo "${ECHO_T}$cf_with_db_install" >&6
3675
3676 echo "$as_me:3676: checking if you want to install manpages" >&5
3677 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3678
3679 # Check whether --with-manpages or --without-manpages was given.
3680 if test "${with_manpages+set}" = set; then
3681   withval="$with_manpages"
3682   cf_with_manpages=$withval
3683 else
3684   cf_with_manpages=yes
3685 fi;
3686 echo "$as_me:3686: result: $cf_with_manpages" >&5
3687 echo "${ECHO_T}$cf_with_manpages" >&6
3688
3689 echo "$as_me:3689: checking if you want to build programs such as tic" >&5
3690 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3691
3692 # Check whether --with-progs or --without-progs was given.
3693 if test "${with_progs+set}" = set; then
3694   withval="$with_progs"
3695   cf_with_progs=$withval
3696 else
3697   cf_with_progs=yes
3698 fi;
3699 echo "$as_me:3699: result: $cf_with_progs" >&5
3700 echo "${ECHO_T}$cf_with_progs" >&6
3701
3702 echo "$as_me:3702: checking if you want to build test-programs" >&5
3703 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3704
3705 # Check whether --with-tests or --without-tests was given.
3706 if test "${with_tests+set}" = set; then
3707   withval="$with_tests"
3708   cf_with_tests=$withval
3709 else
3710   cf_with_tests=yes
3711 fi;
3712 echo "$as_me:3712: result: $cf_with_tests" >&5
3713 echo "${ECHO_T}$cf_with_tests" >&6
3714
3715 echo "$as_me:3715: checking if you wish to install curses.h" >&5
3716 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3717
3718 # Check whether --with-curses-h or --without-curses-h was given.
3719 if test "${with_curses_h+set}" = set; then
3720   withval="$with_curses_h"
3721   with_curses_h=$withval
3722 else
3723   with_curses_h=yes
3724 fi;
3725 echo "$as_me:3725: result: $with_curses_h" >&5
3726 echo "${ECHO_T}$with_curses_h" >&6
3727
3728 modules_to_build="ncurses"
3729 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3730 modules_to_build="$modules_to_build panel menu form"
3731
3732 test "$program_prefix" != NONE &&
3733   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3734 # Use a double $ so make ignores it.
3735 test "$program_suffix" != NONE &&
3736   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3737 # Double any \ or $.  echo might interpret backslashes.
3738 # By default was `s,x,x', remove it if useless.
3739 cat <<\_ACEOF >conftest.sed
3740 s/[\\$]/&&/g;s/;s,x,x,$//
3741 _ACEOF
3742 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3743 rm conftest.sed
3744
3745 for ac_prog in mawk gawk nawk awk
3746 do
3747   # Extract the first word of "$ac_prog", so it can be a program name with args.
3748 set dummy $ac_prog; ac_word=$2
3749 echo "$as_me:3749: checking for $ac_word" >&5
3750 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3751 if test "${ac_cv_prog_AWK+set}" = set; then
3752   echo $ECHO_N "(cached) $ECHO_C" >&6
3753 else
3754   if test -n "$AWK"; then
3755   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3756 else
3757   ac_save_IFS=$IFS; IFS=$ac_path_separator
3758 ac_dummy="$PATH"
3759 for ac_dir in $ac_dummy; do
3760   IFS=$ac_save_IFS
3761   test -z "$ac_dir" && ac_dir=.
3762   $as_executable_p "$ac_dir/$ac_word" || continue
3763 ac_cv_prog_AWK="$ac_prog"
3764 echo "$as_me:3764: found $ac_dir/$ac_word" >&5
3765 break
3766 done
3767
3768 fi
3769 fi
3770 AWK=$ac_cv_prog_AWK
3771 if test -n "$AWK"; then
3772   echo "$as_me:3772: result: $AWK" >&5
3773 echo "${ECHO_T}$AWK" >&6
3774 else
3775   echo "$as_me:3775: result: no" >&5
3776 echo "${ECHO_T}no" >&6
3777 fi
3778
3779   test -n "$AWK" && break
3780 done
3781
3782 test -z "$AWK" && { { echo "$as_me:3782: error: No awk program found" >&5
3783 echo "$as_me: error: No awk program found" >&2;}
3784    { (exit 1); exit 1; }; }
3785
3786 # Find a good install program.  We prefer a C program (faster),
3787 # so one script is as good as another.  But avoid the broken or
3788 # incompatible versions:
3789 # SysV /etc/install, /usr/sbin/install
3790 # SunOS /usr/etc/install
3791 # IRIX /sbin/install
3792 # AIX /bin/install
3793 # AmigaOS /C/install, which installs bootblocks on floppy discs
3794 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3795 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3796 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3797 # ./install, which can be erroneously created by make from ./install.sh.
3798 echo "$as_me:3798: checking for a BSD compatible install" >&5
3799 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3800 if test -z "$INSTALL"; then
3801 if test "${ac_cv_path_install+set}" = set; then
3802   echo $ECHO_N "(cached) $ECHO_C" >&6
3803 else
3804     ac_save_IFS=$IFS; IFS=$ac_path_separator
3805   for ac_dir in $PATH; do
3806     IFS=$ac_save_IFS
3807     # Account for people who put trailing slashes in PATH elements.
3808     case $ac_dir/ in
3809     / | ./ | .// | /cC/* \
3810     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3811     | /usr/ucb/* ) ;;
3812     *)
3813       # OSF1 and SCO ODT 3.0 have their own names for install.
3814       # Don't use installbsd from OSF since it installs stuff as root
3815       # by default.
3816       for ac_prog in ginstall scoinst install; do
3817         if $as_executable_p "$ac_dir/$ac_prog"; then
3818           if test $ac_prog = install &&
3819             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3820             # AIX install.  It has an incompatible calling convention.
3821             :
3822           elif test $ac_prog = install &&
3823             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3824             # program-specific install script used by HP pwplus--don't use.
3825             :
3826           else
3827             ac_cv_path_install="$ac_dir/$ac_prog -c"
3828             break 2
3829           fi
3830         fi
3831       done
3832       ;;
3833     esac
3834   done
3835
3836 fi
3837   if test "${ac_cv_path_install+set}" = set; then
3838     INSTALL=$ac_cv_path_install
3839   else
3840     # As a last resort, use the slow shell script.  We don't cache a
3841     # path for INSTALL within a source directory, because that will
3842     # break other packages using the cache if that directory is
3843     # removed, or if the path is relative.
3844     INSTALL=$ac_install_sh
3845   fi
3846 fi
3847 echo "$as_me:3847: result: $INSTALL" >&5
3848 echo "${ECHO_T}$INSTALL" >&6
3849
3850 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3851 # It thinks the first close brace ends the variable substitution.
3852 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3853
3854 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3855
3856 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3857
3858 case $INSTALL in
3859 (/*)
3860         ;;
3861 (*)
3862         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3863         test -z "$cf_dir" && cf_dir=.
3864         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3865         ;;
3866 esac
3867
3868 for ac_prog in lint cppcheck splint
3869 do
3870   # Extract the first word of "$ac_prog", so it can be a program name with args.
3871 set dummy $ac_prog; ac_word=$2
3872 echo "$as_me:3872: checking for $ac_word" >&5
3873 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3874 if test "${ac_cv_prog_LINT+set}" = set; then
3875   echo $ECHO_N "(cached) $ECHO_C" >&6
3876 else
3877   if test -n "$LINT"; then
3878   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3879 else
3880   ac_save_IFS=$IFS; IFS=$ac_path_separator
3881 ac_dummy="$PATH"
3882 for ac_dir in $ac_dummy; do
3883   IFS=$ac_save_IFS
3884   test -z "$ac_dir" && ac_dir=.
3885   $as_executable_p "$ac_dir/$ac_word" || continue
3886 ac_cv_prog_LINT="$ac_prog"
3887 echo "$as_me:3887: found $ac_dir/$ac_word" >&5
3888 break
3889 done
3890
3891 fi
3892 fi
3893 LINT=$ac_cv_prog_LINT
3894 if test -n "$LINT"; then
3895   echo "$as_me:3895: result: $LINT" >&5
3896 echo "${ECHO_T}$LINT" >&6
3897 else
3898   echo "$as_me:3898: result: no" >&5
3899 echo "${ECHO_T}no" >&6
3900 fi
3901
3902   test -n "$LINT" && break
3903 done
3904
3905 case "x$LINT" in
3906 (xcppcheck|x*/cppcheck)
3907         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3908         ;;
3909 esac
3910
3911 echo "$as_me:3911: checking whether ln -s works" >&5
3912 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3913 LN_S=$as_ln_s
3914 if test "$LN_S" = "ln -s"; then
3915   echo "$as_me:3915: result: yes" >&5
3916 echo "${ECHO_T}yes" >&6
3917 else
3918   echo "$as_me:3918: result: no, using $LN_S" >&5
3919 echo "${ECHO_T}no, using $LN_S" >&6
3920 fi
3921
3922 echo "$as_me:3922: checking if $LN_S -f options work" >&5
3923 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3924
3925 rm -f conf$$.src conf$$dst
3926 echo >conf$$.dst
3927 echo first >conf$$.src
3928 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3929         cf_prog_ln_sf=yes
3930 else
3931         cf_prog_ln_sf=no
3932 fi
3933 rm -f conf$$.dst conf$$src
3934 echo "$as_me:3934: result: $cf_prog_ln_sf" >&5
3935 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3936
3937 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3938
3939 echo "$as_me:3939: checking for long file names" >&5
3940 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3941 if test "${ac_cv_sys_long_file_names+set}" = set; then
3942   echo $ECHO_N "(cached) $ECHO_C" >&6
3943 else
3944   ac_cv_sys_long_file_names=yes
3945 # Test for long file names in all the places we know might matter:
3946 #      .                the current directory, where building will happen
3947 #      $prefix/lib      where we will be installing things
3948 #      $exec_prefix/lib likewise
3949 # eval it to expand exec_prefix.
3950 #      $TMPDIR          if set, where it might want to write temporary files
3951 # if $TMPDIR is not set:
3952 #      /tmp             where it might want to write temporary files
3953 #      /var/tmp         likewise
3954 #      /usr/tmp         likewise
3955 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3956   ac_tmpdirs=$TMPDIR
3957 else
3958   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3959 fi
3960 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3961   test -d "$ac_dir" || continue
3962   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3963   ac_xdir=$ac_dir/cf$$
3964   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3965   ac_tf1=$ac_xdir/conftest9012345
3966   ac_tf2=$ac_xdir/conftest9012346
3967   (echo 1 >"$ac_tf1") 2>/dev/null
3968   (echo 2 >"$ac_tf2") 2>/dev/null
3969   ac_val=`cat "$ac_tf1" 2>/dev/null`
3970   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3971     ac_cv_sys_long_file_names=no
3972     rm -rf "$ac_xdir" 2>/dev/null
3973     break
3974   fi
3975   rm -rf "$ac_xdir" 2>/dev/null
3976 done
3977 fi
3978 echo "$as_me:3978: result: $ac_cv_sys_long_file_names" >&5
3979 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3980 if test "$ac_cv_sys_long_file_names" = yes; then
3981
3982 cat >>confdefs.h <<\EOF
3983 #define HAVE_LONG_FILE_NAMES 1
3984 EOF
3985
3986 fi
3987
3988 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3989 # of package conflict.
3990 cf_config_suffix=
3991
3992 # Check whether --with-config-suffix or --without-config-suffix was given.
3993 if test "${with_config_suffix+set}" = set; then
3994   withval="$with_config_suffix"
3995   case "x$withval" in
3996         (xyes|xno)
3997                 { echo "$as_me:3997: WARNING: expected a value for config-suffix option" >&5
3998 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3999                 ;;
4000         (*)     cf_config_suffix="$withval"
4001                 ;;
4002         esac
4003 fi;
4004
4005 # If we find pkg-config, check if we should install the ".pc" files.
4006
4007 echo "$as_me:4007: checking if you want to use pkg-config" >&5
4008 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4009
4010 # Check whether --with-pkg-config or --without-pkg-config was given.
4011 if test "${with_pkg_config+set}" = set; then
4012   withval="$with_pkg_config"
4013   cf_pkg_config=$withval
4014 else
4015   cf_pkg_config=yes
4016 fi;
4017 echo "$as_me:4017: result: $cf_pkg_config" >&5
4018 echo "${ECHO_T}$cf_pkg_config" >&6
4019
4020 case "$cf_pkg_config" in
4021 (no)
4022         PKG_CONFIG=none
4023         ;;
4024 (yes)
4025
4026 if test -n "$ac_tool_prefix"; then
4027   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4028 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4029 echo "$as_me:4029: checking for $ac_word" >&5
4030 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4031 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4032   echo $ECHO_N "(cached) $ECHO_C" >&6
4033 else
4034   case $PKG_CONFIG in
4035   [\\/]* | ?:[\\/]*)
4036   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4037   ;;
4038   *)
4039   ac_save_IFS=$IFS; IFS=$ac_path_separator
4040 ac_dummy="$PATH"
4041 for ac_dir in $ac_dummy; do
4042   IFS=$ac_save_IFS
4043   test -z "$ac_dir" && ac_dir=.
4044   if $as_executable_p "$ac_dir/$ac_word"; then
4045    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4046    echo "$as_me:4046: found $ac_dir/$ac_word" >&5
4047    break
4048 fi
4049 done
4050
4051   ;;
4052 esac
4053 fi
4054 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4055
4056 if test -n "$PKG_CONFIG"; then
4057   echo "$as_me:4057: result: $PKG_CONFIG" >&5
4058 echo "${ECHO_T}$PKG_CONFIG" >&6
4059 else
4060   echo "$as_me:4060: result: no" >&5
4061 echo "${ECHO_T}no" >&6
4062 fi
4063
4064 fi
4065 if test -z "$ac_cv_path_PKG_CONFIG"; then
4066   ac_pt_PKG_CONFIG=$PKG_CONFIG
4067   # Extract the first word of "pkg-config", so it can be a program name with args.
4068 set dummy pkg-config; ac_word=$2
4069 echo "$as_me:4069: checking for $ac_word" >&5
4070 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4071 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4072   echo $ECHO_N "(cached) $ECHO_C" >&6
4073 else
4074   case $ac_pt_PKG_CONFIG in
4075   [\\/]* | ?:[\\/]*)
4076   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4077   ;;
4078   *)
4079   ac_save_IFS=$IFS; IFS=$ac_path_separator
4080 ac_dummy="$PATH"
4081 for ac_dir in $ac_dummy; do
4082   IFS=$ac_save_IFS
4083   test -z "$ac_dir" && ac_dir=.
4084   if $as_executable_p "$ac_dir/$ac_word"; then
4085    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4086    echo "$as_me:4086: found $ac_dir/$ac_word" >&5
4087    break
4088 fi
4089 done
4090
4091   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4092   ;;
4093 esac
4094 fi
4095 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4096
4097 if test -n "$ac_pt_PKG_CONFIG"; then
4098   echo "$as_me:4098: result: $ac_pt_PKG_CONFIG" >&5
4099 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4100 else
4101   echo "$as_me:4101: result: no" >&5
4102 echo "${ECHO_T}no" >&6
4103 fi
4104
4105   PKG_CONFIG=$ac_pt_PKG_CONFIG
4106 else
4107   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4108 fi
4109
4110         ;;
4111 (*)
4112         PKG_CONFIG=$withval
4113         ;;
4114 esac
4115
4116 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4117 if test "$PKG_CONFIG" != none ; then
4118
4119 if test "x$prefix" != xNONE; then
4120         cf_path_syntax="$prefix"
4121 else
4122         cf_path_syntax="$ac_default_prefix"
4123 fi
4124
4125 case ".$PKG_CONFIG" in
4126 (.\$\(*\)*|.\'*\'*)
4127         ;;
4128 (..|./*|.\\*)
4129         ;;
4130 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4131         ;;
4132 (.\$\{*prefix\}*|.\$\{*dir\}*)
4133         eval PKG_CONFIG="$PKG_CONFIG"
4134         case ".$PKG_CONFIG" in
4135         (.NONE/*)
4136                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4137                 ;;
4138         esac
4139         ;;
4140 (.no|.NONE/*)
4141         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4142         ;;
4143 (*)
4144         { { echo "$as_me:4144: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4145 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4146    { (exit 1); exit 1; }; }
4147         ;;
4148 esac
4149
4150 elif test "x$cf_pkg_config" != xno ; then
4151         { echo "$as_me:4151: WARNING: pkg-config is not installed" >&5
4152 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4153 fi
4154
4155 case "$PKG_CONFIG" in
4156 (no|none|yes)
4157         echo "$as_me:4157: checking for pkg-config library directory" >&5
4158 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4159         ;;
4160 (*)
4161         echo "$as_me:4161: checking for $PKG_CONFIG library directory" >&5
4162 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4163         ;;
4164 esac
4165
4166 # if $PKG_CONFIG_LIBDIR is set, try to use that
4167 if test -n "$PKG_CONFIG_PATH"; then
4168         cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[     ]*,,' -e 's,[   ]*$,,'`
4169 elif test -n "$PKG_CONFIG_LIBDIR"; then
4170         cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,' -e 's,[   ]*$,,'`
4171 else
4172         cf_search_path=auto
4173 fi
4174
4175 # if the option is used, let that override.  otherwise default to "libdir"
4176
4177 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4178 if test "${with_pkg_config_libdir+set}" = set; then
4179   withval="$with_pkg_config_libdir"
4180   cf_search_path=$withval
4181 else
4182   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4183 fi;
4184
4185 case "x$cf_search_path" in
4186 (xlibdir)
4187         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4188         echo "$as_me:4188: result: $PKG_CONFIG_LIBDIR" >&5
4189 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4190         cf_search_path=
4191         ;;
4192 (x)
4193         ;;
4194 (x/*\ *)
4195         PKG_CONFIG_LIBDIR=
4196         ;;
4197 (x/*)
4198         PKG_CONFIG_LIBDIR="$cf_search_path"
4199         echo "$as_me:4199: result: $PKG_CONFIG_LIBDIR" >&5
4200 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4201         cf_search_path=
4202         ;;
4203 (xyes|xauto)
4204         echo "$as_me:4204: result: auto" >&5
4205 echo "${ECHO_T}auto" >&6
4206         cf_search_path=
4207         # Look for the library directory using the same prefix as the executable
4208         echo "$as_me:4208: checking for search-list" >&5
4209 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4210         if test "x$PKG_CONFIG" != xnone
4211         then
4212                 # works for pkg-config since version 0.24 (2009)
4213                 # works for pkgconf since version 0.8.3 (2012)
4214                 for cf_pkg_program in \
4215                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4216                         pkg-config \
4217                         pkgconf
4218                 do
4219                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4220                         test -n "$cf_search_path" && break
4221                 done
4222
4223                 # works for pkg-config since import in 2005 of original 2001 HP code.
4224                 test -z "$cf_search_path" && \
4225                 cf_search_path=`
4226                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4227 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4228         sub(\"^[^']*'\",\"\"); \
4229         sub(\"'.*\",\"\"); \
4230         printf \" %s\", \\$0; } \
4231 { next; } \
4232 "`
4233         fi
4234
4235         echo "$as_me:4235: result: $cf_search_path" >&5
4236 echo "${ECHO_T}$cf_search_path" >&6
4237         ;;
4238 (*)
4239         { { echo "$as_me:4239: error: Unexpected option value: $cf_search_path" >&5
4240 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4241    { (exit 1); exit 1; }; }
4242         ;;
4243 esac
4244
4245 if test -n "$cf_search_path"
4246 then
4247         echo "$as_me:4247: checking for first directory" >&5
4248 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4249         cf_pkg_config_path=none
4250         for cf_config in $cf_search_path
4251         do
4252                 if test -d "$cf_config"
4253                 then
4254                         cf_pkg_config_path=$cf_config
4255                         break
4256                 fi
4257         done
4258         echo "$as_me:4258: result: $cf_pkg_config_path" >&5
4259 echo "${ECHO_T}$cf_pkg_config_path" >&6
4260
4261         if test "x$cf_pkg_config_path" != xnone ; then
4262                 # limit this to the first directory found
4263                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4264         fi
4265
4266         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4267         then
4268                 echo "$as_me:4268: checking for workaround" >&5
4269 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4270                 if test "$prefix" = "NONE" ; then
4271                         cf_prefix="$ac_default_prefix"
4272                 else
4273                         cf_prefix="$prefix"
4274                 fi
4275                 eval cf_libdir=$libdir
4276                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4277                 cf_backup=
4278                 for cf_config in $cf_search_path
4279                 do
4280                         case $cf_config in
4281                         $cf_libdir/pkgconfig)
4282                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4283                                 break
4284                                 ;;
4285                         *)
4286                                 test -z "$cf_backup" && cf_backup=$cf_config
4287                                 ;;
4288                         esac
4289                 done
4290                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4291                 echo "$as_me:4291: result: $PKG_CONFIG_LIBDIR" >&5
4292 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4293         fi
4294 fi
4295
4296 if test "x$PKG_CONFIG" != xnone
4297 then
4298         echo "$as_me:4298: checking if we should install .pc files for $PKG_CONFIG" >&5
4299 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4300 else
4301         echo "$as_me:4301: checking if we should install .pc files" >&5
4302 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4303 fi
4304
4305 # Check whether --enable-pc-files or --disable-pc-files was given.
4306 if test "${enable_pc_files+set}" = set; then
4307   enableval="$enable_pc_files"
4308   enable_pc_files=$enableval
4309 else
4310   enable_pc_files=no
4311 fi;
4312 echo "$as_me:4312: result: $enable_pc_files" >&5
4313 echo "${ECHO_T}$enable_pc_files" >&6
4314
4315 if test "x$enable_pc_files" != xno
4316 then
4317         MAKE_PC_FILES=
4318         case "x$PKG_CONFIG_LIBDIR" in
4319         (xno|xnone|xyes|x)
4320                 { echo "$as_me:4320: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4321 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4322                 ;;
4323         (*)
4324                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4325
4326 if test "x$prefix" != xNONE; then
4327         cf_path_syntax="$prefix"
4328 else
4329         cf_path_syntax="$ac_default_prefix"
4330 fi
4331
4332 case ".$cf_pkg_config_libdir" in
4333 (.\$\(*\)*|.\'*\'*)
4334         ;;
4335 (..|./*|.\\*)
4336         ;;
4337 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4338         ;;
4339 (.\$\{*prefix\}*|.\$\{*dir\}*)
4340         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4341         case ".$cf_pkg_config_libdir" in
4342         (.NONE/*)
4343                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4344                 ;;
4345         esac
4346         ;;
4347 (.no|.NONE/*)
4348         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4349         ;;
4350 (*)
4351         { { echo "$as_me:4351: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4352 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4353    { (exit 1); exit 1; }; }
4354         ;;
4355 esac
4356
4357                 ;;
4358         esac
4359 else
4360         MAKE_PC_FILES="#"
4361 fi
4362
4363 if test -z "$MAKE_PC_FILES"
4364 then
4365         echo "$as_me:4365: checking for suffix to add to pc-files" >&5
4366 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4367
4368 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4369 if test "${with_pc_suffix+set}" = set; then
4370   withval="$with_pc_suffix"
4371   case "x$withval" in
4372         (xyes|xno)
4373                 PC_MODULE_SUFFIX=
4374                 ;;
4375         (*)     PC_MODULE_SUFFIX="$withval"
4376                 ;;
4377         esac
4378 fi;
4379         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4380         echo "$as_me:4380: result: $PC_MODULE_SUFFIX" >&5
4381 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4382         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4383
4384 fi
4385
4386 echo "$as_me:4386: checking if we should assume mixed-case filenames" >&5
4387 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4388
4389 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4390 if test "${enable_mixed_case+set}" = set; then
4391   enableval="$enable_mixed_case"
4392   enable_mixedcase=$enableval
4393 else
4394   enable_mixedcase=auto
4395 fi;
4396 echo "$as_me:4396: result: $enable_mixedcase" >&5
4397 echo "${ECHO_T}$enable_mixedcase" >&6
4398 if test "$enable_mixedcase" = "auto" ; then
4399
4400 echo "$as_me:4400: checking if filesystem supports mixed-case filenames" >&5
4401 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4402 if test "${cf_cv_mixedcase+set}" = set; then
4403   echo $ECHO_N "(cached) $ECHO_C" >&6
4404 else
4405
4406 if test "$cross_compiling" = yes ; then
4407         case "$target_alias" in
4408         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4409                 cf_cv_mixedcase=no
4410                 ;;
4411         (*)
4412                 cf_cv_mixedcase=yes
4413                 ;;
4414         esac
4415 else
4416         rm -f conftest CONFTEST
4417         echo test >conftest
4418         if test -f CONFTEST ; then
4419                 cf_cv_mixedcase=no
4420         else
4421                 cf_cv_mixedcase=yes
4422         fi
4423         rm -f conftest CONFTEST
4424 fi
4425
4426 fi
4427 echo "$as_me:4427: result: $cf_cv_mixedcase" >&5
4428 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4429 test "$cf_cv_mixedcase" = yes &&
4430 cat >>confdefs.h <<\EOF
4431 #define MIXEDCASE_FILENAMES 1
4432 EOF
4433
4434 else
4435         cf_cv_mixedcase=$enable_mixedcase
4436         if test "x$enable_mixedcase" = "xyes" ; then
4437
4438 cat >>confdefs.h <<\EOF
4439 #define MIXEDCASE_FILENAMES 1
4440 EOF
4441
4442         fi
4443 fi
4444
4445 # do this after mixed-case option (tags/TAGS is not as important as tic).
4446 echo "$as_me:4446: checking whether ${MAKE-make} sets \${MAKE}" >&5
4447 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4448 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4449 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4450   echo $ECHO_N "(cached) $ECHO_C" >&6
4451 else
4452   cat >conftest.make <<\EOF
4453 all:
4454         @echo 'ac_maketemp="${MAKE}"'
4455 EOF
4456 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4457 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4458 if test -n "$ac_maketemp"; then
4459   eval ac_cv_prog_make_${ac_make}_set=yes
4460 else
4461   eval ac_cv_prog_make_${ac_make}_set=no
4462 fi
4463 rm -f conftest.make
4464 fi
4465 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4466   echo "$as_me:4466: result: yes" >&5
4467 echo "${ECHO_T}yes" >&6
4468   SET_MAKE=
4469 else
4470   echo "$as_me:4470: result: no" >&5
4471 echo "${ECHO_T}no" >&6
4472   SET_MAKE="MAKE=${MAKE-make}"
4473 fi
4474
4475 echo "$as_me:4475: checking for \".PHONY\" make-support" >&5
4476 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4477 if test "${cf_cv_make_PHONY+set}" = set; then
4478   echo $ECHO_N "(cached) $ECHO_C" >&6
4479 else
4480
4481         rm -rf conftest*
4482         (
4483                 mkdir conftest || exit 1
4484                 cd conftest
4485                 cat >makefile <<'CF_EOF'
4486 .PHONY: always
4487 DATA=0
4488 always: always.out
4489         @echo "** making $@ $(DATA)"
4490 once: once.out
4491         @echo "** making $@ $(DATA)"
4492 always.out:
4493         @echo "** making $@ $(DATA)"
4494         echo $(DATA) > $@
4495 once.out:
4496         @echo "** making $@ $(DATA)"
4497         echo $(DATA) > $@
4498 CF_EOF
4499                 for cf_data in 1 2 3
4500                 do
4501                         ${MAKE:-make} always DATA=$cf_data
4502                         ${MAKE:-make} once   DATA=$cf_data
4503                         ${MAKE:-make} -t always once
4504                         if test -f always ; then
4505                                 echo "no (case 1)" > ../conftest.tmp
4506                         elif test ! -f always.out ; then
4507                                 echo "no (case 2)" > ../conftest.tmp
4508                         elif test ! -f once.out ; then
4509                                 echo "no (case 3)" > ../conftest.tmp
4510                         elif ! cmp -s always.out once.out ; then
4511                                 echo "no (case 4)" > ../conftest.tmp
4512                                 diff always.out once.out
4513                         else
4514                                 cf_check="`cat always.out`"
4515                                 if test "x$cf_check" != "x$cf_data" ; then
4516                                         echo "no (case 5)" > ../conftest.tmp
4517                                 else
4518                                         echo yes > ../conftest.tmp
4519                                         rm -f ./*.out
4520                                         continue
4521                                 fi
4522                         fi
4523                         break
4524                 done
4525         ) >&5 2>&1
4526         cf_cv_make_PHONY="`cat conftest.tmp`"
4527         rm -rf conftest*
4528
4529 fi
4530 echo "$as_me:4530: result: $cf_cv_make_PHONY" >&5
4531 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4532 MAKE_NO_PHONY="#"
4533 MAKE_PHONY="#"
4534 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4535 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4536
4537 for ac_prog in exctags ctags
4538 do
4539   # Extract the first word of "$ac_prog", so it can be a program name with args.
4540 set dummy $ac_prog; ac_word=$2
4541 echo "$as_me:4541: checking for $ac_word" >&5
4542 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4543 if test "${ac_cv_prog_CTAGS+set}" = set; then
4544   echo $ECHO_N "(cached) $ECHO_C" >&6
4545 else
4546   if test -n "$CTAGS"; then
4547   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4548 else
4549   ac_save_IFS=$IFS; IFS=$ac_path_separator
4550 ac_dummy="$PATH"
4551 for ac_dir in $ac_dummy; do
4552   IFS=$ac_save_IFS
4553   test -z "$ac_dir" && ac_dir=.
4554   $as_executable_p "$ac_dir/$ac_word" || continue
4555 ac_cv_prog_CTAGS="$ac_prog"
4556 echo "$as_me:4556: found $ac_dir/$ac_word" >&5
4557 break
4558 done
4559
4560 fi
4561 fi
4562 CTAGS=$ac_cv_prog_CTAGS
4563 if test -n "$CTAGS"; then
4564   echo "$as_me:4564: result: $CTAGS" >&5
4565 echo "${ECHO_T}$CTAGS" >&6
4566 else
4567   echo "$as_me:4567: result: no" >&5
4568 echo "${ECHO_T}no" >&6
4569 fi
4570
4571   test -n "$CTAGS" && break
4572 done
4573
4574 for ac_prog in exetags etags
4575 do
4576   # Extract the first word of "$ac_prog", so it can be a program name with args.
4577 set dummy $ac_prog; ac_word=$2
4578 echo "$as_me:4578: checking for $ac_word" >&5
4579 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4580 if test "${ac_cv_prog_ETAGS+set}" = set; then
4581   echo $ECHO_N "(cached) $ECHO_C" >&6
4582 else
4583   if test -n "$ETAGS"; then
4584   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4585 else
4586   ac_save_IFS=$IFS; IFS=$ac_path_separator
4587 ac_dummy="$PATH"
4588 for ac_dir in $ac_dummy; do
4589   IFS=$ac_save_IFS
4590   test -z "$ac_dir" && ac_dir=.
4591   $as_executable_p "$ac_dir/$ac_word" || continue
4592 ac_cv_prog_ETAGS="$ac_prog"
4593 echo "$as_me:4593: found $ac_dir/$ac_word" >&5
4594 break
4595 done
4596
4597 fi
4598 fi
4599 ETAGS=$ac_cv_prog_ETAGS
4600 if test -n "$ETAGS"; then
4601   echo "$as_me:4601: result: $ETAGS" >&5
4602 echo "${ECHO_T}$ETAGS" >&6
4603 else
4604   echo "$as_me:4604: result: no" >&5
4605 echo "${ECHO_T}no" >&6
4606 fi
4607
4608   test -n "$ETAGS" && break
4609 done
4610
4611 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4612 set dummy ${CTAGS:-ctags}; ac_word=$2
4613 echo "$as_me:4613: checking for $ac_word" >&5
4614 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4615 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4616   echo $ECHO_N "(cached) $ECHO_C" >&6
4617 else
4618   if test -n "$MAKE_LOWER_TAGS"; then
4619   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4620 else
4621   ac_save_IFS=$IFS; IFS=$ac_path_separator
4622 ac_dummy="$PATH"
4623 for ac_dir in $ac_dummy; do
4624   IFS=$ac_save_IFS
4625   test -z "$ac_dir" && ac_dir=.
4626   $as_executable_p "$ac_dir/$ac_word" || continue
4627 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4628 echo "$as_me:4628: found $ac_dir/$ac_word" >&5
4629 break
4630 done
4631
4632   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4633 fi
4634 fi
4635 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4636 if test -n "$MAKE_LOWER_TAGS"; then
4637   echo "$as_me:4637: result: $MAKE_LOWER_TAGS" >&5
4638 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4639 else
4640   echo "$as_me:4640: result: no" >&5
4641 echo "${ECHO_T}no" >&6
4642 fi
4643
4644 if test "$cf_cv_mixedcase" = yes ; then
4645         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4646 set dummy ${ETAGS:-etags}; ac_word=$2
4647 echo "$as_me:4647: checking for $ac_word" >&5
4648 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4649 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4650   echo $ECHO_N "(cached) $ECHO_C" >&6
4651 else
4652   if test -n "$MAKE_UPPER_TAGS"; then
4653   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4654 else
4655   ac_save_IFS=$IFS; IFS=$ac_path_separator
4656 ac_dummy="$PATH"
4657 for ac_dir in $ac_dummy; do
4658   IFS=$ac_save_IFS
4659   test -z "$ac_dir" && ac_dir=.
4660   $as_executable_p "$ac_dir/$ac_word" || continue
4661 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4662 echo "$as_me:4662: found $ac_dir/$ac_word" >&5
4663 break
4664 done
4665
4666   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4667 fi
4668 fi
4669 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4670 if test -n "$MAKE_UPPER_TAGS"; then
4671   echo "$as_me:4671: result: $MAKE_UPPER_TAGS" >&5
4672 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4673 else
4674   echo "$as_me:4674: result: no" >&5
4675 echo "${ECHO_T}no" >&6
4676 fi
4677
4678 else
4679         MAKE_UPPER_TAGS=no
4680 fi
4681
4682 if test "$MAKE_UPPER_TAGS" = yes ; then
4683         MAKE_UPPER_TAGS=
4684 else
4685         MAKE_UPPER_TAGS="#"
4686 fi
4687
4688 if test "$MAKE_LOWER_TAGS" = yes ; then
4689         MAKE_LOWER_TAGS=
4690 else
4691         MAKE_LOWER_TAGS="#"
4692 fi
4693
4694 echo "$as_me:4694: checking for makeflags variable" >&5
4695 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4696 if test "${cf_cv_makeflags+set}" = set; then
4697   echo $ECHO_N "(cached) $ECHO_C" >&6
4698 else
4699
4700         cf_cv_makeflags=''
4701         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4702         do
4703                 cat >cf_makeflags.tmp <<CF_EOF
4704 SHELL = $SHELL
4705 all :
4706         @ echo '.$cf_option'
4707 CF_EOF
4708                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4709                 case "$cf_result" in
4710                 (.*k|.*kw)
4711                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4712                         case "$cf_result" in
4713                         (.*CC=*)        cf_cv_makeflags=
4714                                 ;;
4715                         (*)     cf_cv_makeflags=$cf_option
4716                                 ;;
4717                         esac
4718                         break
4719                         ;;
4720                 (.-)
4721                         ;;
4722                 (*)
4723
4724 echo "${as_me:-configure}:4724: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4725
4726                         ;;
4727                 esac
4728         done
4729         rm -f cf_makeflags.tmp
4730
4731 fi
4732 echo "$as_me:4732: result: $cf_cv_makeflags" >&5
4733 echo "${ECHO_T}$cf_cv_makeflags" >&6
4734
4735 if test -n "$ac_tool_prefix"; then
4736   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4737 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4738 echo "$as_me:4738: checking for $ac_word" >&5
4739 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4740 if test "${ac_cv_prog_RANLIB+set}" = set; then
4741   echo $ECHO_N "(cached) $ECHO_C" >&6
4742 else
4743   if test -n "$RANLIB"; then
4744   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4745 else
4746   ac_save_IFS=$IFS; IFS=$ac_path_separator
4747 ac_dummy="$PATH"
4748 for ac_dir in $ac_dummy; do
4749   IFS=$ac_save_IFS
4750   test -z "$ac_dir" && ac_dir=.
4751   $as_executable_p "$ac_dir/$ac_word" || continue
4752 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4753 echo "$as_me:4753: found $ac_dir/$ac_word" >&5
4754 break
4755 done
4756
4757 fi
4758 fi
4759 RANLIB=$ac_cv_prog_RANLIB
4760 if test -n "$RANLIB"; then
4761   echo "$as_me:4761: result: $RANLIB" >&5
4762 echo "${ECHO_T}$RANLIB" >&6
4763 else
4764   echo "$as_me:4764: result: no" >&5
4765 echo "${ECHO_T}no" >&6
4766 fi
4767
4768 fi
4769 if test -z "$ac_cv_prog_RANLIB"; then
4770   ac_ct_RANLIB=$RANLIB
4771   # Extract the first word of "ranlib", so it can be a program name with args.
4772 set dummy ranlib; ac_word=$2
4773 echo "$as_me:4773: checking for $ac_word" >&5
4774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4775 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4776   echo $ECHO_N "(cached) $ECHO_C" >&6
4777 else
4778   if test -n "$ac_ct_RANLIB"; then
4779   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4780 else
4781   ac_save_IFS=$IFS; IFS=$ac_path_separator
4782 ac_dummy="$PATH"
4783 for ac_dir in $ac_dummy; do
4784   IFS=$ac_save_IFS
4785   test -z "$ac_dir" && ac_dir=.
4786   $as_executable_p "$ac_dir/$ac_word" || continue
4787 ac_cv_prog_ac_ct_RANLIB="ranlib"
4788 echo "$as_me:4788: found $ac_dir/$ac_word" >&5
4789 break
4790 done
4791
4792   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4793 fi
4794 fi
4795 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4796 if test -n "$ac_ct_RANLIB"; then
4797   echo "$as_me:4797: result: $ac_ct_RANLIB" >&5
4798 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4799 else
4800   echo "$as_me:4800: result: no" >&5
4801 echo "${ECHO_T}no" >&6
4802 fi
4803
4804   RANLIB=$ac_ct_RANLIB
4805 else
4806   RANLIB="$ac_cv_prog_RANLIB"
4807 fi
4808
4809 if test -n "$ac_tool_prefix"; then
4810   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4811 set dummy ${ac_tool_prefix}ld; ac_word=$2
4812 echo "$as_me:4812: checking for $ac_word" >&5
4813 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4814 if test "${ac_cv_prog_LD+set}" = set; then
4815   echo $ECHO_N "(cached) $ECHO_C" >&6
4816 else
4817   if test -n "$LD"; then
4818   ac_cv_prog_LD="$LD" # Let the user override the test.
4819 else
4820   ac_save_IFS=$IFS; IFS=$ac_path_separator
4821 ac_dummy="$PATH"
4822 for ac_dir in $ac_dummy; do
4823   IFS=$ac_save_IFS
4824   test -z "$ac_dir" && ac_dir=.
4825   $as_executable_p "$ac_dir/$ac_word" || continue
4826 ac_cv_prog_LD="${ac_tool_prefix}ld"
4827 echo "$as_me:4827: found $ac_dir/$ac_word" >&5
4828 break
4829 done
4830
4831 fi
4832 fi
4833 LD=$ac_cv_prog_LD
4834 if test -n "$LD"; then
4835   echo "$as_me:4835: result: $LD" >&5
4836 echo "${ECHO_T}$LD" >&6
4837 else
4838   echo "$as_me:4838: result: no" >&5
4839 echo "${ECHO_T}no" >&6
4840 fi
4841
4842 fi
4843 if test -z "$ac_cv_prog_LD"; then
4844   ac_ct_LD=$LD
4845   # Extract the first word of "ld", so it can be a program name with args.
4846 set dummy ld; ac_word=$2
4847 echo "$as_me:4847: checking for $ac_word" >&5
4848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4849 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4850   echo $ECHO_N "(cached) $ECHO_C" >&6
4851 else
4852   if test -n "$ac_ct_LD"; then
4853   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4854 else
4855   ac_save_IFS=$IFS; IFS=$ac_path_separator
4856 ac_dummy="$PATH"
4857 for ac_dir in $ac_dummy; do
4858   IFS=$ac_save_IFS
4859   test -z "$ac_dir" && ac_dir=.
4860   $as_executable_p "$ac_dir/$ac_word" || continue
4861 ac_cv_prog_ac_ct_LD="ld"
4862 echo "$as_me:4862: found $ac_dir/$ac_word" >&5
4863 break
4864 done
4865
4866   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4867 fi
4868 fi
4869 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4870 if test -n "$ac_ct_LD"; then
4871   echo "$as_me:4871: result: $ac_ct_LD" >&5
4872 echo "${ECHO_T}$ac_ct_LD" >&6
4873 else
4874   echo "$as_me:4874: result: no" >&5
4875 echo "${ECHO_T}no" >&6
4876 fi
4877
4878   LD=$ac_ct_LD
4879 else
4880   LD="$ac_cv_prog_LD"
4881 fi
4882
4883 if test -n "$ac_tool_prefix"; then
4884   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4885 set dummy ${ac_tool_prefix}ar; ac_word=$2
4886 echo "$as_me:4886: checking for $ac_word" >&5
4887 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4888 if test "${ac_cv_prog_AR+set}" = set; then
4889   echo $ECHO_N "(cached) $ECHO_C" >&6
4890 else
4891   if test -n "$AR"; then
4892   ac_cv_prog_AR="$AR" # Let the user override the test.
4893 else
4894   ac_save_IFS=$IFS; IFS=$ac_path_separator
4895 ac_dummy="$PATH"
4896 for ac_dir in $ac_dummy; do
4897   IFS=$ac_save_IFS
4898   test -z "$ac_dir" && ac_dir=.
4899   $as_executable_p "$ac_dir/$ac_word" || continue
4900 ac_cv_prog_AR="${ac_tool_prefix}ar"
4901 echo "$as_me:4901: found $ac_dir/$ac_word" >&5
4902 break
4903 done
4904
4905 fi
4906 fi
4907 AR=$ac_cv_prog_AR
4908 if test -n "$AR"; then
4909   echo "$as_me:4909: result: $AR" >&5
4910 echo "${ECHO_T}$AR" >&6
4911 else
4912   echo "$as_me:4912: result: no" >&5
4913 echo "${ECHO_T}no" >&6
4914 fi
4915
4916 fi
4917 if test -z "$ac_cv_prog_AR"; then
4918   ac_ct_AR=$AR
4919   # Extract the first word of "ar", so it can be a program name with args.
4920 set dummy ar; ac_word=$2
4921 echo "$as_me:4921: checking for $ac_word" >&5
4922 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4923 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4924   echo $ECHO_N "(cached) $ECHO_C" >&6
4925 else
4926   if test -n "$ac_ct_AR"; then
4927   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4928 else
4929   ac_save_IFS=$IFS; IFS=$ac_path_separator
4930 ac_dummy="$PATH"
4931 for ac_dir in $ac_dummy; do
4932   IFS=$ac_save_IFS
4933   test -z "$ac_dir" && ac_dir=.
4934   $as_executable_p "$ac_dir/$ac_word" || continue
4935 ac_cv_prog_ac_ct_AR="ar"
4936 echo "$as_me:4936: found $ac_dir/$ac_word" >&5
4937 break
4938 done
4939
4940   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4941 fi
4942 fi
4943 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4944 if test -n "$ac_ct_AR"; then
4945   echo "$as_me:4945: result: $ac_ct_AR" >&5
4946 echo "${ECHO_T}$ac_ct_AR" >&6
4947 else
4948   echo "$as_me:4948: result: no" >&5
4949 echo "${ECHO_T}no" >&6
4950 fi
4951
4952   AR=$ac_ct_AR
4953 else
4954   AR="$ac_cv_prog_AR"
4955 fi
4956
4957 if test -n "$ac_tool_prefix"; then
4958   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4959 set dummy ${ac_tool_prefix}nm; ac_word=$2
4960 echo "$as_me:4960: checking for $ac_word" >&5
4961 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4962 if test "${ac_cv_prog_NM+set}" = set; then
4963   echo $ECHO_N "(cached) $ECHO_C" >&6
4964 else
4965   if test -n "$NM"; then
4966   ac_cv_prog_NM="$NM" # Let the user override the test.
4967 else
4968   ac_save_IFS=$IFS; IFS=$ac_path_separator
4969 ac_dummy="$PATH"
4970 for ac_dir in $ac_dummy; do
4971   IFS=$ac_save_IFS
4972   test -z "$ac_dir" && ac_dir=.
4973   $as_executable_p "$ac_dir/$ac_word" || continue
4974 ac_cv_prog_NM="${ac_tool_prefix}nm"
4975 echo "$as_me:4975: found $ac_dir/$ac_word" >&5
4976 break
4977 done
4978
4979 fi
4980 fi
4981 NM=$ac_cv_prog_NM
4982 if test -n "$NM"; then
4983   echo "$as_me:4983: result: $NM" >&5
4984 echo "${ECHO_T}$NM" >&6
4985 else
4986   echo "$as_me:4986: result: no" >&5
4987 echo "${ECHO_T}no" >&6
4988 fi
4989
4990 fi
4991 if test -z "$ac_cv_prog_NM"; then
4992   ac_ct_NM=$NM
4993   # Extract the first word of "nm", so it can be a program name with args.
4994 set dummy nm; ac_word=$2
4995 echo "$as_me:4995: checking for $ac_word" >&5
4996 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4997 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4998   echo $ECHO_N "(cached) $ECHO_C" >&6
4999 else
5000   if test -n "$ac_ct_NM"; then
5001   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5002 else
5003   ac_save_IFS=$IFS; IFS=$ac_path_separator
5004 ac_dummy="$PATH"
5005 for ac_dir in $ac_dummy; do
5006   IFS=$ac_save_IFS
5007   test -z "$ac_dir" && ac_dir=.
5008   $as_executable_p "$ac_dir/$ac_word" || continue
5009 ac_cv_prog_ac_ct_NM="nm"
5010 echo "$as_me:5010: found $ac_dir/$ac_word" >&5
5011 break
5012 done
5013
5014   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5015 fi
5016 fi
5017 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5018 if test -n "$ac_ct_NM"; then
5019   echo "$as_me:5019: result: $ac_ct_NM" >&5
5020 echo "${ECHO_T}$ac_ct_NM" >&6
5021 else
5022   echo "$as_me:5022: result: no" >&5
5023 echo "${ECHO_T}no" >&6
5024 fi
5025
5026   NM=$ac_ct_NM
5027 else
5028   NM="$ac_cv_prog_NM"
5029 fi
5030
5031 if test -n "$ac_tool_prefix"; then
5032   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5033 set dummy ${ac_tool_prefix}ar; ac_word=$2
5034 echo "$as_me:5034: checking for $ac_word" >&5
5035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5036 if test "${ac_cv_prog_AR+set}" = set; then
5037   echo $ECHO_N "(cached) $ECHO_C" >&6
5038 else
5039   if test -n "$AR"; then
5040   ac_cv_prog_AR="$AR" # Let the user override the test.
5041 else
5042   ac_save_IFS=$IFS; IFS=$ac_path_separator
5043 ac_dummy="$PATH"
5044 for ac_dir in $ac_dummy; do
5045   IFS=$ac_save_IFS
5046   test -z "$ac_dir" && ac_dir=.
5047   $as_executable_p "$ac_dir/$ac_word" || continue
5048 ac_cv_prog_AR="${ac_tool_prefix}ar"
5049 echo "$as_me:5049: found $ac_dir/$ac_word" >&5
5050 break
5051 done
5052
5053 fi
5054 fi
5055 AR=$ac_cv_prog_AR
5056 if test -n "$AR"; then
5057   echo "$as_me:5057: result: $AR" >&5
5058 echo "${ECHO_T}$AR" >&6
5059 else
5060   echo "$as_me:5060: result: no" >&5
5061 echo "${ECHO_T}no" >&6
5062 fi
5063
5064 fi
5065 if test -z "$ac_cv_prog_AR"; then
5066   ac_ct_AR=$AR
5067   # Extract the first word of "ar", so it can be a program name with args.
5068 set dummy ar; ac_word=$2
5069 echo "$as_me:5069: checking for $ac_word" >&5
5070 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5071 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5072   echo $ECHO_N "(cached) $ECHO_C" >&6
5073 else
5074   if test -n "$ac_ct_AR"; then
5075   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5076 else
5077   ac_save_IFS=$IFS; IFS=$ac_path_separator
5078 ac_dummy="$PATH"
5079 for ac_dir in $ac_dummy; do
5080   IFS=$ac_save_IFS
5081   test -z "$ac_dir" && ac_dir=.
5082   $as_executable_p "$ac_dir/$ac_word" || continue
5083 ac_cv_prog_ac_ct_AR="ar"
5084 echo "$as_me:5084: found $ac_dir/$ac_word" >&5
5085 break
5086 done
5087
5088   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5089 fi
5090 fi
5091 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5092 if test -n "$ac_ct_AR"; then
5093   echo "$as_me:5093: result: $ac_ct_AR" >&5
5094 echo "${ECHO_T}$ac_ct_AR" >&6
5095 else
5096   echo "$as_me:5096: result: no" >&5
5097 echo "${ECHO_T}no" >&6
5098 fi
5099
5100   AR=$ac_ct_AR
5101 else
5102   AR="$ac_cv_prog_AR"
5103 fi
5104
5105 echo "$as_me:5105: checking for options to update archives" >&5
5106 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5107 if test "${cf_cv_ar_flags+set}" = set; then
5108   echo $ECHO_N "(cached) $ECHO_C" >&6
5109 else
5110
5111         case "$cf_cv_system_name" in
5112         (*-msvc*)
5113                 cf_cv_ar_flags=''
5114                 cat >mk_static_lib.sh <<-EOF
5115                 #!$SHELL
5116                 MSVC_BIN="$AR"
5117                 out="\$1"
5118                 shift
5119                 exec \$MSVC_BIN -out:"\$out" \$@
5120                 EOF
5121                 chmod +x mk_static_lib.sh
5122                 AR=`pwd`/mk_static_lib.sh
5123                 ;;
5124         (*)
5125                 cf_cv_ar_flags=unknown
5126                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5127                 do
5128
5129                         # check if $ARFLAGS already contains this choice
5130                         if test "x$ARFLAGS" != "x" ; then
5131                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5132                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5133                                         cf_cv_ar_flags=
5134                                         break
5135                                 fi
5136                         fi
5137
5138                         rm -f "conftest.$ac_cv_objext"
5139                         rm -f conftest.a
5140
5141                         cat >"conftest.$ac_ext" <<EOF
5142 #line 5142 "configure"
5143 int     testdata[3] = { 123, 456, 789 };
5144 EOF
5145                         if { (eval echo "$as_me:5145: \"$ac_compile\"") >&5
5146   (eval $ac_compile) 2>&5
5147   ac_status=$?
5148   echo "$as_me:5148: \$? = $ac_status" >&5
5149   (exit "$ac_status"); } ; then
5150                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5151                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5152                                 if test -f conftest.a ; then
5153                                         cf_cv_ar_flags="$cf_ar_flags"
5154                                         break
5155                                 fi
5156                         else
5157                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5158
5159 echo "${as_me:-configure}:5159: testing cannot compile test-program ..." 1>&5
5160
5161                                 break
5162                         fi
5163                 done
5164                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5165                 ;;
5166         esac
5167
5168 fi
5169 echo "$as_me:5169: result: $cf_cv_ar_flags" >&5
5170 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5171
5172 if test -n "$ARFLAGS" ; then
5173         if test -n "$cf_cv_ar_flags" ; then
5174                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5175         fi
5176 else
5177         ARFLAGS=$cf_cv_ar_flags
5178 fi
5179
5180 echo "$as_me:5180: checking if you have specified an install-prefix" >&5
5181 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5182
5183 # Check whether --with-install-prefix or --without-install-prefix was given.
5184 if test "${with_install_prefix+set}" = set; then
5185   withval="$with_install_prefix"
5186   case "x$withval" in
5187         (xyes|xno)
5188                 ;;
5189         (*)     DESTDIR="$withval"
5190                 ;;
5191         esac
5192 fi;
5193 echo "$as_me:5193: result: $DESTDIR" >&5
5194 echo "${ECHO_T}$DESTDIR" >&6
5195
5196 ###############################################################################
5197
5198 # If we're cross-compiling, allow the user to override the tools and their
5199 # options.  The configure script is oriented toward identifying the host
5200 # compiler, etc., but we need a build compiler to generate parts of the source.
5201
5202 case "$cf_cv_system_name" in
5203 (*-msvc*)
5204         LDFLAGS="$LDFLAGS user32.lib"
5205         export LDFLAGS
5206         ;;
5207 esac
5208
5209 if test "$cross_compiling" = yes ; then
5210
5211         # defaults that we might want to override
5212         : ${BUILD_CFLAGS:=''}
5213         : ${BUILD_CPPFLAGS:=''}
5214         : ${BUILD_LDFLAGS:=''}
5215         : ${BUILD_LIBS:=''}
5216         : ${BUILD_EXEEXT:='$x'}
5217         : ${BUILD_OBJEXT:='o'}
5218
5219 # Check whether --with-build-cc or --without-build-cc was given.
5220 if test "${with_build_cc+set}" = set; then
5221   withval="$with_build_cc"
5222   BUILD_CC="$withval"
5223 else
5224   for ac_prog in gcc clang c99 c89 cc cl
5225 do
5226   # Extract the first word of "$ac_prog", so it can be a program name with args.
5227 set dummy $ac_prog; ac_word=$2
5228 echo "$as_me:5228: checking for $ac_word" >&5
5229 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5230 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5231   echo $ECHO_N "(cached) $ECHO_C" >&6
5232 else
5233   if test -n "$BUILD_CC"; then
5234   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5235 else
5236   ac_save_IFS=$IFS; IFS=$ac_path_separator
5237 ac_dummy="$PATH"
5238 for ac_dir in $ac_dummy; do
5239   IFS=$ac_save_IFS
5240   test -z "$ac_dir" && ac_dir=.
5241   $as_executable_p "$ac_dir/$ac_word" || continue
5242 ac_cv_prog_BUILD_CC="$ac_prog"
5243 echo "$as_me:5243: found $ac_dir/$ac_word" >&5
5244 break
5245 done
5246
5247 fi
5248 fi
5249 BUILD_CC=$ac_cv_prog_BUILD_CC
5250 if test -n "$BUILD_CC"; then
5251   echo "$as_me:5251: result: $BUILD_CC" >&5
5252 echo "${ECHO_T}$BUILD_CC" >&6
5253 else
5254   echo "$as_me:5254: result: no" >&5
5255 echo "${ECHO_T}no" >&6
5256 fi
5257
5258   test -n "$BUILD_CC" && break
5259 done
5260 test -n "$BUILD_CC" || BUILD_CC="none"
5261
5262 fi;
5263         echo "$as_me:5263: checking for native build C compiler" >&5
5264 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5265         echo "$as_me:5265: result: $BUILD_CC" >&5
5266 echo "${ECHO_T}$BUILD_CC" >&6
5267
5268         echo "$as_me:5268: checking for native build C preprocessor" >&5
5269 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5270
5271 # Check whether --with-build-cpp or --without-build-cpp was given.
5272 if test "${with_build_cpp+set}" = set; then
5273   withval="$with_build_cpp"
5274   BUILD_CPP="$withval"
5275 else
5276   BUILD_CPP='${BUILD_CC} -E'
5277 fi;
5278         echo "$as_me:5278: result: $BUILD_CPP" >&5
5279 echo "${ECHO_T}$BUILD_CPP" >&6
5280
5281         echo "$as_me:5281: checking for native build C flags" >&5
5282 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5283
5284 # Check whether --with-build-cflags or --without-build-cflags was given.
5285 if test "${with_build_cflags+set}" = set; then
5286   withval="$with_build_cflags"
5287   BUILD_CFLAGS="$withval"
5288 fi;
5289         echo "$as_me:5289: result: $BUILD_CFLAGS" >&5
5290 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5291
5292         echo "$as_me:5292: checking for native build C preprocessor-flags" >&5
5293 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5294
5295 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5296 if test "${with_build_cppflags+set}" = set; then
5297   withval="$with_build_cppflags"
5298   BUILD_CPPFLAGS="$withval"
5299 fi;
5300         echo "$as_me:5300: result: $BUILD_CPPFLAGS" >&5
5301 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5302
5303         echo "$as_me:5303: checking for native build linker-flags" >&5
5304 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5305
5306 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5307 if test "${with_build_ldflags+set}" = set; then
5308   withval="$with_build_ldflags"
5309   BUILD_LDFLAGS="$withval"
5310 fi;
5311         echo "$as_me:5311: result: $BUILD_LDFLAGS" >&5
5312 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5313
5314         echo "$as_me:5314: checking for native build linker-libraries" >&5
5315 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5316
5317 # Check whether --with-build-libs or --without-build-libs was given.
5318 if test "${with_build_libs+set}" = set; then
5319   withval="$with_build_libs"
5320   BUILD_LIBS="$withval"
5321 fi;
5322         echo "$as_me:5322: result: $BUILD_LIBS" >&5
5323 echo "${ECHO_T}$BUILD_LIBS" >&6
5324
5325         # this assumes we're on Unix.
5326         BUILD_EXEEXT=
5327         BUILD_OBJEXT=o
5328
5329         : ${BUILD_CC:='${CC}'}
5330
5331         echo "$as_me:5331: checking if the build-compiler \"$BUILD_CC\" works" >&5
5332 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5333
5334         cf_save_crossed=$cross_compiling
5335         cf_save_ac_link=$ac_link
5336         cross_compiling=no
5337         cf_build_cppflags=$BUILD_CPPFLAGS
5338         test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5339         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5340
5341         if test "$cross_compiling" = yes; then
5342   cf_ok_build_cc=unknown
5343 else
5344   cat >"conftest.$ac_ext" <<_ACEOF
5345 #line 5345 "configure"
5346 #include "confdefs.h"
5347 #include <stdio.h>
5348                 int main(int argc, char *argv[])
5349                 {
5350                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5351                 }
5352
5353 _ACEOF
5354 rm -f "conftest$ac_exeext"
5355 if { (eval echo "$as_me:5355: \"$ac_link\"") >&5
5356   (eval $ac_link) 2>&5
5357   ac_status=$?
5358   echo "$as_me:5358: \$? = $ac_status" >&5
5359   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5360   { (eval echo "$as_me:5360: \"$ac_try\"") >&5
5361   (eval $ac_try) 2>&5
5362   ac_status=$?
5363   echo "$as_me:5363: \$? = $ac_status" >&5
5364   (exit "$ac_status"); }; }; then
5365   cf_ok_build_cc=yes
5366 else
5367   echo "$as_me: program exited with status $ac_status" >&5
5368 echo "$as_me: failed program was:" >&5
5369 cat "conftest.$ac_ext" >&5
5370 cf_ok_build_cc=no
5371 fi
5372 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5373 fi
5374
5375         cross_compiling=$cf_save_crossed
5376         ac_link=$cf_save_ac_link
5377
5378         echo "$as_me:5378: result: $cf_ok_build_cc" >&5
5379 echo "${ECHO_T}$cf_ok_build_cc" >&6
5380
5381         if test "$cf_ok_build_cc" != yes
5382         then
5383                 { { echo "$as_me:5383: error: Cross-build requires two compilers.
5384 Use --with-build-cc to specify the native compiler." >&5
5385 echo "$as_me: error: Cross-build requires two compilers.
5386 Use --with-build-cc to specify the native compiler." >&2;}
5387    { (exit 1); exit 1; }; }
5388         fi
5389
5390 else
5391         : ${BUILD_CC:='${CC}'}
5392         : ${BUILD_CPP:='${CPP}'}
5393         : ${BUILD_CFLAGS:='${CFLAGS}'}
5394         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5395         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5396         : ${BUILD_LIBS:='${LIBS}'}
5397         : ${BUILD_EXEEXT:='$x'}
5398         : ${BUILD_OBJEXT:='o'}
5399 fi
5400
5401 ###############################################################################
5402
5403 ### Options to allow the user to specify the set of libraries which are used.
5404 ### Use "--without-normal --with-shared" to allow the default model to be
5405 ### shared, for example.
5406 cf_list_models=""
5407
5408 echo "$as_me:5408: checking if libtool -version-number should be used" >&5
5409 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5410
5411 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5412 if test "${enable_libtool_version+set}" = set; then
5413   enableval="$enable_libtool_version"
5414   test "$enableval" != no && enableval=yes
5415         if test "$enableval" != "yes" ; then
5416     cf_libtool_version=no
5417         else
5418                 cf_libtool_version=yes
5419         fi
5420 else
5421   enableval=yes
5422         cf_libtool_version=yes
5423
5424 fi;
5425 echo "$as_me:5425: result: $cf_libtool_version" >&5
5426 echo "${ECHO_T}$cf_libtool_version" >&6
5427
5428 if test "$cf_libtool_version" = yes ; then
5429         LIBTOOL_VERSION="-version-number"
5430 else
5431         LIBTOOL_VERSION="-version-info"
5432         case "x$VERSION" in
5433         (x)
5434                 { echo "$as_me:5434: WARNING: VERSION was not set" >&5
5435 echo "$as_me: WARNING: VERSION was not set" >&2;}
5436                 ;;
5437         (x*.*.*)
5438                 ABI_VERSION="$VERSION"
5439                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5440
5441 echo "${as_me:-configure}:5441: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5442
5443                 ;;
5444         (x*:*:*)
5445                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5446                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5447
5448 echo "${as_me:-configure}:5448: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5449
5450                 ;;
5451         (*)
5452                 { echo "$as_me:5452: WARNING: unexpected VERSION value: $VERSION" >&5
5453 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5454                 ;;
5455         esac
5456 fi
5457
5458 LIBTOOL=
5459
5460 # common library maintenance symbols that are convenient for libtool scripts:
5461 LIB_CREATE='${AR} -cr'
5462 LIB_OBJECT='${OBJECTS}'
5463 LIB_SUFFIX=.a
5464 LIB_PREP="$RANLIB"
5465
5466 # symbols used to prop libtool up to enable it to determine what it should be
5467 # doing:
5468 LIB_CLEAN=
5469 LIB_COMPILE=
5470 LIB_LINK='${CC}'
5471 LIB_INSTALL=
5472 LIB_UNINSTALL=
5473
5474 echo "$as_me:5474: checking if you want to build libraries with libtool" >&5
5475 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5476
5477 # Check whether --with-libtool or --without-libtool was given.
5478 if test "${with_libtool+set}" = set; then
5479   withval="$with_libtool"
5480   with_libtool=$withval
5481 else
5482   with_libtool=no
5483 fi;
5484 echo "$as_me:5484: result: $with_libtool" >&5
5485 echo "${ECHO_T}$with_libtool" >&6
5486 if test "$with_libtool" != "no"; then
5487
5488         if test "$with_libtool" != "yes" ; then
5489
5490 if test "x$prefix" != xNONE; then
5491         cf_path_syntax="$prefix"
5492 else
5493         cf_path_syntax="$ac_default_prefix"
5494 fi
5495
5496 case ".$with_libtool" in
5497 (.\$\(*\)*|.\'*\'*)
5498         ;;
5499 (..|./*|.\\*)
5500         ;;
5501 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5502         ;;
5503 (.\$\{*prefix\}*|.\$\{*dir\}*)
5504         eval with_libtool="$with_libtool"
5505         case ".$with_libtool" in
5506         (.NONE/*)
5507                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5508                 ;;
5509         esac
5510         ;;
5511 (.no|.NONE/*)
5512         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5513         ;;
5514 (*)
5515         { { echo "$as_me:5515: error: expected a pathname, not \"$with_libtool\"" >&5
5516 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5517    { (exit 1); exit 1; }; }
5518         ;;
5519 esac
5520
5521                 LIBTOOL=$with_libtool
5522         else
5523                 if test -n "$ac_tool_prefix"; then
5524   for ac_prog in libtool glibtool
5525   do
5526     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5527 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5528 echo "$as_me:5528: checking for $ac_word" >&5
5529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5530 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5531   echo $ECHO_N "(cached) $ECHO_C" >&6
5532 else
5533   if test -n "$LIBTOOL"; then
5534   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5535 else
5536   ac_save_IFS=$IFS; IFS=$ac_path_separator
5537 ac_dummy="$PATH"
5538 for ac_dir in $ac_dummy; do
5539   IFS=$ac_save_IFS
5540   test -z "$ac_dir" && ac_dir=.
5541   $as_executable_p "$ac_dir/$ac_word" || continue
5542 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5543 echo "$as_me:5543: found $ac_dir/$ac_word" >&5
5544 break
5545 done
5546
5547 fi
5548 fi
5549 LIBTOOL=$ac_cv_prog_LIBTOOL
5550 if test -n "$LIBTOOL"; then
5551   echo "$as_me:5551: result: $LIBTOOL" >&5
5552 echo "${ECHO_T}$LIBTOOL" >&6
5553 else
5554   echo "$as_me:5554: result: no" >&5
5555 echo "${ECHO_T}no" >&6
5556 fi
5557
5558     test -n "$LIBTOOL" && break
5559   done
5560 fi
5561 if test -z "$LIBTOOL"; then
5562   ac_ct_LIBTOOL=$LIBTOOL
5563   for ac_prog in libtool glibtool
5564 do
5565   # Extract the first word of "$ac_prog", so it can be a program name with args.
5566 set dummy $ac_prog; ac_word=$2
5567 echo "$as_me:5567: checking for $ac_word" >&5
5568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5569 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5570   echo $ECHO_N "(cached) $ECHO_C" >&6
5571 else
5572   if test -n "$ac_ct_LIBTOOL"; then
5573   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5574 else
5575   ac_save_IFS=$IFS; IFS=$ac_path_separator
5576 ac_dummy="$PATH"
5577 for ac_dir in $ac_dummy; do
5578   IFS=$ac_save_IFS
5579   test -z "$ac_dir" && ac_dir=.
5580   $as_executable_p "$ac_dir/$ac_word" || continue
5581 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5582 echo "$as_me:5582: found $ac_dir/$ac_word" >&5
5583 break
5584 done
5585
5586 fi
5587 fi
5588 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5589 if test -n "$ac_ct_LIBTOOL"; then
5590   echo "$as_me:5590: result: $ac_ct_LIBTOOL" >&5
5591 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5592 else
5593   echo "$as_me:5593: result: no" >&5
5594 echo "${ECHO_T}no" >&6
5595 fi
5596
5597   test -n "$ac_ct_LIBTOOL" && break
5598 done
5599 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5600
5601   LIBTOOL=$ac_ct_LIBTOOL
5602 fi
5603
5604 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5605 then
5606         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.].*//'`
5607 else
5608         cf_cv_libtool_version=
5609 fi
5610 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5611
5612                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5613                 then
5614
5615 unset ac_cv_prog_ac_ct_LIBTOOL
5616 unset ac_ct_LIBTOOL
5617 unset LIBTOOL
5618
5619                         if test -n "$ac_tool_prefix"; then
5620   for ac_prog in glibtool
5621   do
5622     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5623 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5624 echo "$as_me:5624: checking for $ac_word" >&5
5625 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5626 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5627   echo $ECHO_N "(cached) $ECHO_C" >&6
5628 else
5629   if test -n "$LIBTOOL"; then
5630   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5631 else
5632   ac_save_IFS=$IFS; IFS=$ac_path_separator
5633 ac_dummy="$PATH"
5634 for ac_dir in $ac_dummy; do
5635   IFS=$ac_save_IFS
5636   test -z "$ac_dir" && ac_dir=.
5637   $as_executable_p "$ac_dir/$ac_word" || continue
5638 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5639 echo "$as_me:5639: found $ac_dir/$ac_word" >&5
5640 break
5641 done
5642
5643 fi
5644 fi
5645 LIBTOOL=$ac_cv_prog_LIBTOOL
5646 if test -n "$LIBTOOL"; then
5647   echo "$as_me:5647: result: $LIBTOOL" >&5
5648 echo "${ECHO_T}$LIBTOOL" >&6
5649 else
5650   echo "$as_me:5650: result: no" >&5
5651 echo "${ECHO_T}no" >&6
5652 fi
5653
5654     test -n "$LIBTOOL" && break
5655   done
5656 fi
5657 if test -z "$LIBTOOL"; then
5658   ac_ct_LIBTOOL=$LIBTOOL
5659   for ac_prog in glibtool
5660 do
5661   # Extract the first word of "$ac_prog", so it can be a program name with args.
5662 set dummy $ac_prog; ac_word=$2
5663 echo "$as_me:5663: checking for $ac_word" >&5
5664 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5665 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5666   echo $ECHO_N "(cached) $ECHO_C" >&6
5667 else
5668   if test -n "$ac_ct_LIBTOOL"; then
5669   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5670 else
5671   ac_save_IFS=$IFS; IFS=$ac_path_separator
5672 ac_dummy="$PATH"
5673 for ac_dir in $ac_dummy; do
5674   IFS=$ac_save_IFS
5675   test -z "$ac_dir" && ac_dir=.
5676   $as_executable_p "$ac_dir/$ac_word" || continue
5677 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5678 echo "$as_me:5678: found $ac_dir/$ac_word" >&5
5679 break
5680 done
5681
5682 fi
5683 fi
5684 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5685 if test -n "$ac_ct_LIBTOOL"; then
5686   echo "$as_me:5686: result: $ac_ct_LIBTOOL" >&5
5687 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5688 else
5689   echo "$as_me:5689: result: no" >&5
5690 echo "${ECHO_T}no" >&6
5691 fi
5692
5693   test -n "$ac_ct_LIBTOOL" && break
5694 done
5695 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5696
5697   LIBTOOL=$ac_ct_LIBTOOL
5698 fi
5699
5700 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5701 then
5702         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.].*//'`
5703 else
5704         cf_cv_libtool_version=
5705 fi
5706 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5707
5708                 fi
5709         fi
5710         if test -z "$LIBTOOL" ; then
5711                 { { echo "$as_me:5711: error: Cannot find libtool" >&5
5712 echo "$as_me: error: Cannot find libtool" >&2;}
5713    { (exit 1); exit 1; }; }
5714         fi
5715         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5716         LIB_OBJECT='${OBJECTS:.o=.lo}'
5717         LIB_SUFFIX=.la
5718         LIB_CLEAN='${LIBTOOL} --mode=clean'
5719         LIB_COMPILE='${LIBTOOL} --mode=compile'
5720         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5721         LIB_INSTALL='${LIBTOOL} --mode=install'
5722         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5723         LIB_PREP=:
5724
5725 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5726 then
5727         echo "$as_me:5727: checking version of $LIBTOOL" >&5
5728 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5729
5730 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5731 then
5732         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.].*//'`
5733 else
5734         cf_cv_libtool_version=
5735 fi
5736 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5737
5738         echo "$as_me:5738: result: $cf_cv_libtool_version" >&5
5739 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5740         if test -n "$cf_cv_libtool_version"
5741         then
5742                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5743                 case "x$cf_check_libtool_version" in
5744                 (*...GNU-libtool...*)
5745                         ;;
5746                 (*)
5747                         { { echo "$as_me:5747: error: This is not GNU libtool" >&5
5748 echo "$as_me: error: This is not GNU libtool" >&2;}
5749    { (exit 1); exit 1; }; }
5750                         ;;
5751                 esac
5752         else
5753                 { { echo "$as_me:5753: error: No version found for $LIBTOOL" >&5
5754 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5755    { (exit 1); exit 1; }; }
5756         fi
5757 else
5758         { { echo "$as_me:5758: error: GNU libtool has not been found" >&5
5759 echo "$as_me: error: GNU libtool has not been found" >&2;}
5760    { (exit 1); exit 1; }; }
5761 fi
5762
5763         # special hack to add -no-undefined (which libtool should do for itself)
5764         LT_UNDEF=
5765         case "$cf_cv_system_name" in
5766         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5767                 LT_UNDEF=-no-undefined
5768                 ;;
5769         esac
5770
5771         # special hack to add --tag option for C++ compiler
5772         case "$cf_cv_libtool_version" in
5773         (1.[5-9]*|[2-9].[0-9.a-z]*)
5774                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5775                 LIBTOOL="$LIBTOOL --tag=CC"
5776                 ;;
5777         (*)
5778                 LIBTOOL_CXX="$LIBTOOL"
5779                 ;;
5780         esac
5781 else
5782         LIBTOOL=""
5783         LIBTOOL_CXX=""
5784 fi
5785
5786 test -z "$LIBTOOL" && ECHO_LT=
5787
5788 if test "$with_libtool" != "no" ; then
5789
5790 cf_list_models="$cf_list_models libtool"
5791
5792 else
5793
5794 echo "$as_me:5794: checking if you want to build shared libraries" >&5
5795 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5796
5797 # Check whether --with-shared or --without-shared was given.
5798 if test "${with_shared+set}" = set; then
5799   withval="$with_shared"
5800   with_shared=$withval
5801 else
5802   with_shared=no
5803 fi;
5804 echo "$as_me:5804: result: $with_shared" >&5
5805 echo "${ECHO_T}$with_shared" >&6
5806 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5807
5808 echo "$as_me:5808: checking if you want to build static libraries" >&5
5809 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5810
5811 # Check whether --with-normal or --without-normal was given.
5812 if test "${with_normal+set}" = set; then
5813   withval="$with_normal"
5814   with_normal=$withval
5815 else
5816   with_normal=yes
5817 fi;
5818 echo "$as_me:5818: result: $with_normal" >&5
5819 echo "${ECHO_T}$with_normal" >&6
5820 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5821
5822 echo "$as_me:5822: checking if you want to build debug libraries" >&5
5823 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5824
5825 # Check whether --with-debug or --without-debug was given.
5826 if test "${with_debug+set}" = set; then
5827   withval="$with_debug"
5828   with_debug=$withval
5829 else
5830   with_debug=yes
5831 fi;
5832 echo "$as_me:5832: result: $with_debug" >&5
5833 echo "${ECHO_T}$with_debug" >&6
5834 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5835
5836 echo "$as_me:5836: checking if you want to build profiling libraries" >&5
5837 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5838
5839 # Check whether --with-profile or --without-profile was given.
5840 if test "${with_profile+set}" = set; then
5841   withval="$with_profile"
5842   with_profile=$withval
5843 else
5844   with_profile=no
5845 fi;
5846 echo "$as_me:5846: result: $with_profile" >&5
5847 echo "${ECHO_T}$with_profile" >&6
5848 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5849
5850 fi
5851
5852 if test "X$cf_with_cxx_binding" != Xno; then
5853 if test "x$with_shared" = "xyes"; then
5854 echo "$as_me:5854: checking if you want to build C++ shared libraries" >&5
5855 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5856
5857 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5858 if test "${with_cxx_shared+set}" = set; then
5859   withval="$with_cxx_shared"
5860   with_shared_cxx=$withval
5861 else
5862   with_shared_cxx=no
5863 fi;
5864 echo "$as_me:5864: result: $with_shared_cxx" >&5
5865 echo "${ECHO_T}$with_shared_cxx" >&6
5866 fi
5867 fi
5868
5869 ###############################################################################
5870
5871 echo "$as_me:5871: checking for specified models" >&5
5872 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5873 test -z "$cf_list_models" && cf_list_models=normal
5874 test "$with_libtool" != "no" && cf_list_models=libtool
5875 echo "$as_me:5875: result: $cf_list_models" >&5
5876 echo "${ECHO_T}$cf_list_models" >&6
5877
5878 ### Use the first model as the default, and save its suffix for use in building
5879 ### up test-applications.
5880 echo "$as_me:5880: checking for default model" >&5
5881 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5882 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5883 echo "$as_me:5883: result: $DFT_LWR_MODEL" >&5
5884 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5885
5886 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5887
5888 TICS_NAME=tic
5889
5890 TINFO_NAME=tinfo
5891
5892 LIB_NAME=ncurses
5893
5894 LIB_DIR=../lib
5895 LIB_2ND=../../lib
5896
5897 echo "$as_me:5897: checking if you want to have a library-prefix" >&5
5898 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5899
5900 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5901 if test "${with_lib_prefix+set}" = set; then
5902   withval="$with_lib_prefix"
5903   with_lib_prefix=$withval
5904 else
5905   with_lib_prefix=auto
5906 fi;
5907 echo "$as_me:5907: result: $with_lib_prefix" >&5
5908 echo "${ECHO_T}$with_lib_prefix" >&6
5909
5910 if test "$with_lib_prefix" = auto
5911 then
5912
5913         case "$cf_cv_system_name" in
5914         (OS/2*|os2*)
5915                 if test "$DFT_LWR_MODEL" = libtool; then
5916                         LIB_PREFIX='lib'
5917                 else
5918                         LIB_PREFIX=''
5919                 fi
5920                 ;;
5921         (*-msvc*)
5922                 LIB_PREFIX=''
5923                 ;;
5924         (*)     LIB_PREFIX='lib'
5925                 ;;
5926         esac
5927 cf_prefix=$LIB_PREFIX
5928
5929 elif test "$with_lib_prefix" = no
5930 then
5931         LIB_PREFIX=
5932 else
5933         LIB_PREFIX=$with_lib_prefix
5934 fi
5935
5936 LIB_SUFFIX=
5937
5938         echo "$as_me:5938: checking for PATH separator" >&5
5939 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5940         case "$cf_cv_system_name" in
5941         (os2*)  PATH_SEPARATOR=';'  ;;
5942         (*)     ${PATH_SEPARATOR:=':'}  ;;
5943         esac
5944
5945         echo "$as_me:5945: result: $PATH_SEPARATOR" >&5
5946 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5947
5948 # headers needed for checks...
5949 echo "$as_me:5949: checking for ANSI C header files" >&5
5950 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5951 if test "${ac_cv_header_stdc+set}" = set; then
5952   echo $ECHO_N "(cached) $ECHO_C" >&6
5953 else
5954   cat >"conftest.$ac_ext" <<_ACEOF
5955 #line 5955 "configure"
5956 #include "confdefs.h"
5957 #include <stdlib.h>
5958 #include <stdarg.h>
5959 #include <string.h>
5960 #include <float.h>
5961
5962 _ACEOF
5963 if { (eval echo "$as_me:5963: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5964   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5965   ac_status=$?
5966   $EGREP -v '^ *\+' conftest.er1 >conftest.err
5967   rm -f conftest.er1
5968   cat conftest.err >&5
5969   echo "$as_me:5969: \$? = $ac_status" >&5
5970   (exit "$ac_status"); } >/dev/null; then
5971   if test -s conftest.err; then
5972     ac_cpp_err=$ac_c_preproc_warn_flag
5973   else
5974     ac_cpp_err=
5975   fi
5976 else
5977   ac_cpp_err=yes
5978 fi
5979 if test -z "$ac_cpp_err"; then
5980   ac_cv_header_stdc=yes
5981 else
5982   echo "$as_me: failed program was:" >&5
5983   cat "conftest.$ac_ext" >&5
5984   ac_cv_header_stdc=no
5985 fi
5986 rm -f conftest.err "conftest.$ac_ext"
5987
5988 if test $ac_cv_header_stdc = yes; then
5989   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5990   cat >"conftest.$ac_ext" <<_ACEOF
5991 #line 5991 "configure"
5992 #include "confdefs.h"
5993 #include <string.h>
5994
5995 _ACEOF
5996 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5997   $EGREP "memchr" >/dev/null 2>&1; then
5998   :
5999 else
6000   ac_cv_header_stdc=no
6001 fi
6002 rm -rf conftest*
6003
6004 fi
6005
6006 if test $ac_cv_header_stdc = yes; then
6007   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6008   cat >"conftest.$ac_ext" <<_ACEOF
6009 #line 6009 "configure"
6010 #include "confdefs.h"
6011 #include <stdlib.h>
6012
6013 _ACEOF
6014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6015   $EGREP "free" >/dev/null 2>&1; then
6016   :
6017 else
6018   ac_cv_header_stdc=no
6019 fi
6020 rm -rf conftest*
6021
6022 fi
6023
6024 if test $ac_cv_header_stdc = yes; then
6025   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6026   if test "$cross_compiling" = yes; then
6027   :
6028 else
6029   cat >"conftest.$ac_ext" <<_ACEOF
6030 #line 6030 "configure"
6031 #include "confdefs.h"
6032 #include <ctype.h>
6033 #if ((' ' & 0x0FF) == 0x020)
6034 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6035 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6036 #else
6037 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6038                      || ('j' <= (c) && (c) <= 'r') \
6039                      || ('s' <= (c) && (c) <= 'z'))
6040 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6041 #endif
6042
6043 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6044 int
6045 main (void)
6046 {
6047   int i;
6048   for (i = 0; i < 256; i++)
6049     if (XOR (islower (i), ISLOWER (i))
6050         || toupper (i) != TOUPPER (i))
6051       $ac_main_return(2);
6052   $ac_main_return (0);
6053 }
6054 _ACEOF
6055 rm -f "conftest$ac_exeext"
6056 if { (eval echo "$as_me:6056: \"$ac_link\"") >&5
6057   (eval $ac_link) 2>&5
6058   ac_status=$?
6059   echo "$as_me:6059: \$? = $ac_status" >&5
6060   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6061   { (eval echo "$as_me:6061: \"$ac_try\"") >&5
6062   (eval $ac_try) 2>&5
6063   ac_status=$?
6064   echo "$as_me:6064: \$? = $ac_status" >&5
6065   (exit "$ac_status"); }; }; then
6066   :
6067 else
6068   echo "$as_me: program exited with status $ac_status" >&5
6069 echo "$as_me: failed program was:" >&5
6070 cat "conftest.$ac_ext" >&5
6071 ac_cv_header_stdc=no
6072 fi
6073 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6074 fi
6075 fi
6076 fi
6077 echo "$as_me:6077: result: $ac_cv_header_stdc" >&5
6078 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6079 if test $ac_cv_header_stdc = yes; then
6080
6081 cat >>confdefs.h <<\EOF
6082 #define STDC_HEADERS 1
6083 EOF
6084
6085 fi
6086
6087 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6088
6089 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6090                   inttypes.h stdint.h unistd.h
6091 do
6092 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6093 echo "$as_me:6093: checking for $ac_header" >&5
6094 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6095 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6096   echo $ECHO_N "(cached) $ECHO_C" >&6
6097 else
6098   cat >"conftest.$ac_ext" <<_ACEOF
6099 #line 6099 "configure"
6100 #include "confdefs.h"
6101 $ac_includes_default
6102 #include <$ac_header>
6103 _ACEOF
6104 rm -f "conftest.$ac_objext"
6105 if { (eval echo "$as_me:6105: \"$ac_compile\"") >&5
6106   (eval $ac_compile) 2>&5
6107   ac_status=$?
6108   echo "$as_me:6108: \$? = $ac_status" >&5
6109   (exit "$ac_status"); } &&
6110          { ac_try='test -s "conftest.$ac_objext"'
6111   { (eval echo "$as_me:6111: \"$ac_try\"") >&5
6112   (eval $ac_try) 2>&5
6113   ac_status=$?
6114   echo "$as_me:6114: \$? = $ac_status" >&5
6115   (exit "$ac_status"); }; }; then
6116   eval "$as_ac_Header=yes"
6117 else
6118   echo "$as_me: failed program was:" >&5
6119 cat "conftest.$ac_ext" >&5
6120 eval "$as_ac_Header=no"
6121 fi
6122 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6123 fi
6124 echo "$as_me:6124: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6125 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6126 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6127   cat >>confdefs.h <<EOF
6128 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6129 EOF
6130
6131 fi
6132 done
6133
6134 echo "$as_me:6134: checking whether exit is declared" >&5
6135 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6136 if test "${ac_cv_have_decl_exit+set}" = set; then
6137   echo $ECHO_N "(cached) $ECHO_C" >&6
6138 else
6139   cat >"conftest.$ac_ext" <<_ACEOF
6140 #line 6140 "configure"
6141 #include "confdefs.h"
6142 $ac_includes_default
6143 int
6144 main (void)
6145 {
6146 #ifndef exit
6147   char *p = (char *) exit; (void) p;
6148 #endif
6149
6150   ;
6151   return 0;
6152 }
6153 _ACEOF
6154 rm -f "conftest.$ac_objext"
6155 if { (eval echo "$as_me:6155: \"$ac_compile\"") >&5
6156   (eval $ac_compile) 2>&5
6157   ac_status=$?
6158   echo "$as_me:6158: \$? = $ac_status" >&5
6159   (exit "$ac_status"); } &&
6160          { ac_try='test -s "conftest.$ac_objext"'
6161   { (eval echo "$as_me:6161: \"$ac_try\"") >&5
6162   (eval $ac_try) 2>&5
6163   ac_status=$?
6164   echo "$as_me:6164: \$? = $ac_status" >&5
6165   (exit "$ac_status"); }; }; then
6166   ac_cv_have_decl_exit=yes
6167 else
6168   echo "$as_me: failed program was:" >&5
6169 cat "conftest.$ac_ext" >&5
6170 ac_cv_have_decl_exit=no
6171 fi
6172 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6173 fi
6174 echo "$as_me:6174: result: $ac_cv_have_decl_exit" >&5
6175 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6176
6177 ac_header_dirent=no
6178 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6179   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6180 echo "$as_me:6180: checking for $ac_hdr that defines DIR" >&5
6181 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6182 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6183   echo $ECHO_N "(cached) $ECHO_C" >&6
6184 else
6185   cat >"conftest.$ac_ext" <<_ACEOF
6186 #line 6186 "configure"
6187 #include "confdefs.h"
6188 #include <sys/types.h>
6189 #include <$ac_hdr>
6190
6191 int
6192 main (void)
6193 {
6194 if ((DIR *) 0)
6195 return 0;
6196   ;
6197   return 0;
6198 }
6199 _ACEOF
6200 rm -f "conftest.$ac_objext"
6201 if { (eval echo "$as_me:6201: \"$ac_compile\"") >&5
6202   (eval $ac_compile) 2>&5
6203   ac_status=$?
6204   echo "$as_me:6204: \$? = $ac_status" >&5
6205   (exit "$ac_status"); } &&
6206          { ac_try='test -s "conftest.$ac_objext"'
6207   { (eval echo "$as_me:6207: \"$ac_try\"") >&5
6208   (eval $ac_try) 2>&5
6209   ac_status=$?
6210   echo "$as_me:6210: \$? = $ac_status" >&5
6211   (exit "$ac_status"); }; }; then
6212   eval "$as_ac_Header=yes"
6213 else
6214   echo "$as_me: failed program was:" >&5
6215 cat "conftest.$ac_ext" >&5
6216 eval "$as_ac_Header=no"
6217 fi
6218 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6219 fi
6220 echo "$as_me:6220: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6221 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6222 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6223   cat >>confdefs.h <<EOF
6224 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6225 EOF
6226
6227 ac_header_dirent=$ac_hdr; break
6228 fi
6229
6230 done
6231 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6232 if test $ac_header_dirent = dirent.h; then
6233   echo "$as_me:6233: checking for opendir in -ldir" >&5
6234 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6235 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6236   echo $ECHO_N "(cached) $ECHO_C" >&6
6237 else
6238   ac_check_lib_save_LIBS=$LIBS
6239 LIBS="-ldir  $LIBS"
6240 cat >"conftest.$ac_ext" <<_ACEOF
6241 #line 6241 "configure"
6242 #include "confdefs.h"
6243
6244 /* Override any gcc2 internal prototype to avoid an error.  */
6245 #ifdef __cplusplus
6246 extern "C"
6247 #endif
6248 /* We use char because int might match the return type of a gcc2
6249    builtin and then its argument prototype would still apply.  */
6250 char opendir ();
6251 int
6252 main (void)
6253 {
6254 opendir ();
6255   ;
6256   return 0;
6257 }
6258 _ACEOF
6259 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6260 if { (eval echo "$as_me:6260: \"$ac_link\"") >&5
6261   (eval $ac_link) 2>&5
6262   ac_status=$?
6263   echo "$as_me:6263: \$? = $ac_status" >&5
6264   (exit "$ac_status"); } &&
6265          { ac_try='test -s "conftest$ac_exeext"'
6266   { (eval echo "$as_me:6266: \"$ac_try\"") >&5
6267   (eval $ac_try) 2>&5
6268   ac_status=$?
6269   echo "$as_me:6269: \$? = $ac_status" >&5
6270   (exit "$ac_status"); }; }; then
6271   ac_cv_lib_dir_opendir=yes
6272 else
6273   echo "$as_me: failed program was:" >&5
6274 cat "conftest.$ac_ext" >&5
6275 ac_cv_lib_dir_opendir=no
6276 fi
6277 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6278 LIBS=$ac_check_lib_save_LIBS
6279 fi
6280 echo "$as_me:6280: result: $ac_cv_lib_dir_opendir" >&5
6281 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6282 if test "$ac_cv_lib_dir_opendir" = yes; then
6283   LIBS="$LIBS -ldir"
6284 fi
6285
6286 else
6287   echo "$as_me:6287: checking for opendir in -lx" >&5
6288 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6289 if test "${ac_cv_lib_x_opendir+set}" = set; then
6290   echo $ECHO_N "(cached) $ECHO_C" >&6
6291 else
6292   ac_check_lib_save_LIBS=$LIBS
6293 LIBS="-lx  $LIBS"
6294 cat >"conftest.$ac_ext" <<_ACEOF
6295 #line 6295 "configure"
6296 #include "confdefs.h"
6297
6298 /* Override any gcc2 internal prototype to avoid an error.  */
6299 #ifdef __cplusplus
6300 extern "C"
6301 #endif
6302 /* We use char because int might match the return type of a gcc2
6303    builtin and then its argument prototype would still apply.  */
6304 char opendir ();
6305 int
6306 main (void)
6307 {
6308 opendir ();
6309   ;
6310   return 0;
6311 }
6312 _ACEOF
6313 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6314 if { (eval echo "$as_me:6314: \"$ac_link\"") >&5
6315   (eval $ac_link) 2>&5
6316   ac_status=$?
6317   echo "$as_me:6317: \$? = $ac_status" >&5
6318   (exit "$ac_status"); } &&
6319          { ac_try='test -s "conftest$ac_exeext"'
6320   { (eval echo "$as_me:6320: \"$ac_try\"") >&5
6321   (eval $ac_try) 2>&5
6322   ac_status=$?
6323   echo "$as_me:6323: \$? = $ac_status" >&5
6324   (exit "$ac_status"); }; }; then
6325   ac_cv_lib_x_opendir=yes
6326 else
6327   echo "$as_me: failed program was:" >&5
6328 cat "conftest.$ac_ext" >&5
6329 ac_cv_lib_x_opendir=no
6330 fi
6331 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6332 LIBS=$ac_check_lib_save_LIBS
6333 fi
6334 echo "$as_me:6334: result: $ac_cv_lib_x_opendir" >&5
6335 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6336 if test "$ac_cv_lib_x_opendir" = yes; then
6337   LIBS="$LIBS -lx"
6338 fi
6339
6340 fi
6341
6342 ###############################################################################
6343
6344 echo "$as_me:6344: checking if you want to build a separate terminfo library" >&5
6345 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6346
6347 # Check whether --with-termlib or --without-termlib was given.
6348 if test "${with_termlib+set}" = set; then
6349   withval="$with_termlib"
6350   with_termlib=$withval
6351 else
6352   with_termlib=no
6353 fi;
6354 echo "$as_me:6354: result: $with_termlib" >&5
6355 echo "${ECHO_T}$with_termlib" >&6
6356
6357 echo "$as_me:6357: checking if you want to build a separate tic library" >&5
6358 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6359
6360 # Check whether --with-ticlib or --without-ticlib was given.
6361 if test "${with_ticlib+set}" = set; then
6362   withval="$with_ticlib"
6363   with_ticlib=$withval
6364 else
6365   with_ticlib=no
6366 fi;
6367 echo "$as_me:6367: result: $with_ticlib" >&5
6368 echo "${ECHO_T}$with_ticlib" >&6
6369
6370 if test X"$CC_G_OPT" = X"" ; then
6371         CC_G_OPT='-g'
6372         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6373 fi
6374
6375 if test X"$CXX_G_OPT" = X"" ; then
6376         CXX_G_OPT='-g'
6377         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6378 fi
6379
6380 echo "$as_me:6380: checking for default loader flags" >&5
6381 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6382 case "$DFT_LWR_MODEL" in
6383 (libtool) LD_MODEL=''   ;;
6384 (normal)  LD_MODEL=''   ;;
6385 (debug)   LD_MODEL=$CC_G_OPT ;;
6386 (profile) LD_MODEL='-pg';;
6387 (shared)  LD_MODEL=''   ;;
6388 esac
6389 echo "$as_me:6389: result: $LD_MODEL" >&5
6390 echo "${ECHO_T}$LD_MODEL" >&6
6391
6392 case "$DFT_LWR_MODEL" in
6393 (shared)
6394
6395 echo "$as_me:6395: checking if rpath option should be used" >&5
6396 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6397
6398 # Check whether --enable-rpath or --disable-rpath was given.
6399 if test "${enable_rpath+set}" = set; then
6400   enableval="$enable_rpath"
6401   cf_cv_enable_rpath=$enableval
6402 else
6403   cf_cv_enable_rpath=no
6404 fi;
6405 echo "$as_me:6405: result: $cf_cv_enable_rpath" >&5
6406 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6407
6408 echo "$as_me:6408: checking if shared libraries should be relinked during install" >&5
6409 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6410
6411 # Check whether --enable-relink or --disable-relink was given.
6412 if test "${enable_relink+set}" = set; then
6413   enableval="$enable_relink"
6414   cf_cv_do_relink=$enableval
6415 else
6416   cf_cv_do_relink=yes
6417 fi;
6418 echo "$as_me:6418: result: $cf_cv_do_relink" >&5
6419 echo "${ECHO_T}$cf_cv_do_relink" >&6
6420         ;;
6421 esac
6422
6423 # we will build libraries one-level down.
6424 rel_builddir=..
6425
6426 LD_RPATH_OPT=
6427 if test "x$cf_cv_enable_rpath" != xno
6428 then
6429         echo "$as_me:6429: checking for an rpath option" >&5
6430 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6431         case "$cf_cv_system_name" in
6432         (irix*)
6433                 if test "$GCC" = yes; then
6434                         LD_RPATH_OPT="-Wl,-rpath,"
6435                 else
6436                         LD_RPATH_OPT="-rpath "
6437                 fi
6438                 ;;
6439         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6440                 LD_RPATH_OPT="-Wl,-rpath,"
6441                 ;;
6442         (openbsd[2-9].*|mirbsd*)
6443                 LD_RPATH_OPT="-Wl,-rpath,"
6444                 ;;
6445         (dragonfly*)
6446                 LD_RPATH_OPT="-rpath "
6447                 ;;
6448         (netbsd*)
6449                 LD_RPATH_OPT="-Wl,-rpath,"
6450                 ;;
6451         (osf*|mls+*)
6452                 LD_RPATH_OPT="-rpath "
6453                 ;;
6454         (solaris2*)
6455                 LD_RPATH_OPT="-R"
6456                 ;;
6457         (*)
6458                 ;;
6459         esac
6460         echo "$as_me:6460: result: $LD_RPATH_OPT" >&5
6461 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6462
6463         case "x$LD_RPATH_OPT" in
6464         (x-R*)
6465                 echo "$as_me:6465: checking if we need a space after rpath option" >&5
6466 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6467                 cf_save_LIBS="$LIBS"
6468
6469 cf_add_libs="$LIBS"
6470 # reverse order
6471 cf_add_0lib=
6472 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6473 # filter duplicates
6474 for cf_add_1lib in $cf_add_0lib; do
6475         for cf_add_2lib in $cf_add_libs; do
6476                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6477                         cf_add_1lib=
6478                         break
6479                 fi
6480         done
6481         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6482 done
6483 LIBS="$cf_add_libs"
6484
6485                 cat >"conftest.$ac_ext" <<_ACEOF
6486 #line 6486 "configure"
6487 #include "confdefs.h"
6488
6489 int
6490 main (void)
6491 {
6492
6493   ;
6494   return 0;
6495 }
6496 _ACEOF
6497 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6498 if { (eval echo "$as_me:6498: \"$ac_link\"") >&5
6499   (eval $ac_link) 2>&5
6500   ac_status=$?
6501   echo "$as_me:6501: \$? = $ac_status" >&5
6502   (exit "$ac_status"); } &&
6503          { ac_try='test -s "conftest$ac_exeext"'
6504   { (eval echo "$as_me:6504: \"$ac_try\"") >&5
6505   (eval $ac_try) 2>&5
6506   ac_status=$?
6507   echo "$as_me:6507: \$? = $ac_status" >&5
6508   (exit "$ac_status"); }; }; then
6509   cf_rpath_space=no
6510 else
6511   echo "$as_me: failed program was:" >&5
6512 cat "conftest.$ac_ext" >&5
6513 cf_rpath_space=yes
6514 fi
6515 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6516                 LIBS="$cf_save_LIBS"
6517                 echo "$as_me:6517: result: $cf_rpath_space" >&5
6518 echo "${ECHO_T}$cf_rpath_space" >&6
6519                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6520                 ;;
6521         esac
6522 fi
6523
6524         RM_SHARED_OPTS=
6525         LOCAL_LDFLAGS=
6526         LOCAL_LDFLAGS2=
6527         LD_SHARED_OPTS=
6528         INSTALL_LIB="-m 644"
6529         : ${rel_builddir:=.}
6530
6531         shlibdir=$libdir
6532
6533         MAKE_DLLS="#"
6534
6535         cf_cv_do_symlinks=no
6536         cf_ld_rpath_opt=
6537         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6538
6539         echo "$as_me:6539: checking if release/abi version should be used for shared libs" >&5
6540 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6541
6542 # Check whether --with-shlib-version or --without-shlib-version was given.
6543 if test "${with_shlib_version+set}" = set; then
6544   withval="$with_shlib_version"
6545   test -z "$withval" && withval=auto
6546         case "$withval" in
6547         (yes)
6548                 cf_cv_shlib_version=auto
6549                 ;;
6550         (rel|abi|auto)
6551                 cf_cv_shlib_version=$withval
6552                 ;;
6553         (*)
6554                 echo "$as_me:6554: result: $withval" >&5
6555 echo "${ECHO_T}$withval" >&6
6556                 { { echo "$as_me:6556: error: option value must be one of: rel, abi, or auto" >&5
6557 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6558    { (exit 1); exit 1; }; }
6559                 ;;
6560         esac
6561
6562 else
6563   cf_cv_shlib_version=auto
6564 fi;
6565         echo "$as_me:6565: result: $cf_cv_shlib_version" >&5
6566 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6567
6568         cf_cv_rm_so_locs=no
6569         cf_try_cflags=
6570
6571         # Some less-capable ports of gcc support only -fpic
6572         CC_SHARED_OPTS=
6573
6574         cf_try_fPIC=no
6575         if test "$GCC" = yes
6576         then
6577                 cf_try_fPIC=yes
6578         else
6579                 case "$cf_cv_system_name" in
6580                 (*linux*)       # e.g., PGI compiler
6581                         cf_try_fPIC=yes
6582                         ;;
6583                 esac
6584         fi
6585
6586         if test "$cf_try_fPIC" = yes
6587         then
6588                 echo "$as_me:6588: checking which $CC option to use" >&5
6589 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6590                 cf_save_CFLAGS="$CFLAGS"
6591                 for CC_SHARED_OPTS in -fPIC -fpic ''
6592                 do
6593                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6594                         cat >"conftest.$ac_ext" <<_ACEOF
6595 #line 6595 "configure"
6596 #include "confdefs.h"
6597 #include <stdio.h>
6598 int
6599 main (void)
6600 {
6601 int x = 1
6602   ;
6603   return 0;
6604 }
6605 _ACEOF
6606 rm -f "conftest.$ac_objext"
6607 if { (eval echo "$as_me:6607: \"$ac_compile\"") >&5
6608   (eval $ac_compile) 2>&5
6609   ac_status=$?
6610   echo "$as_me:6610: \$? = $ac_status" >&5
6611   (exit "$ac_status"); } &&
6612          { ac_try='test -s "conftest.$ac_objext"'
6613   { (eval echo "$as_me:6613: \"$ac_try\"") >&5
6614   (eval $ac_try) 2>&5
6615   ac_status=$?
6616   echo "$as_me:6616: \$? = $ac_status" >&5
6617   (exit "$ac_status"); }; }; then
6618   break
6619 else
6620   echo "$as_me: failed program was:" >&5
6621 cat "conftest.$ac_ext" >&5
6622 fi
6623 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6624                 done
6625                 echo "$as_me:6625: result: $CC_SHARED_OPTS" >&5
6626 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6627                 CFLAGS="$cf_save_CFLAGS"
6628         fi
6629
6630         cf_cv_shlib_version_infix=no
6631
6632         case "$cf_cv_system_name" in
6633         (aix4.3-9*|aix[5-7]*)
6634                 if test "$GCC" = yes; then
6635                         CC_SHARED_OPTS='-Wl,-brtl'
6636                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6637                 else
6638                         CC_SHARED_OPTS='-brtl'
6639                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6640                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6641                 fi
6642                 ;;
6643         (beos*)
6644                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6645                 ;;
6646         (cygwin*)
6647                 CC_SHARED_OPTS=
6648                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6649                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6650                 cf_cv_shlib_version=cygdll
6651                 cf_cv_shlib_version_infix=cygdll
6652                 shlibdir=$bindir
6653                 MAKE_DLLS=
6654                 cat >mk_shared_lib.sh <<-CF_EOF
6655                 #!$SHELL
6656                 SHARED_LIB=\$1
6657                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6658                 shift
6659                 cat <<-EOF
6660                 Linking shared library
6661                 ** SHARED_LIB \$SHARED_LIB
6662                 ** IMPORT_LIB \$IMPORT_LIB
6663 EOF
6664                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6665 CF_EOF
6666                 chmod +x mk_shared_lib.sh
6667                 ;;
6668         (msys*)
6669                 CC_SHARED_OPTS=
6670                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6671                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6672                 cf_cv_shlib_version=msysdll
6673                 cf_cv_shlib_version_infix=msysdll
6674                 shlibdir=$bindir
6675                 MAKE_DLLS=
6676                 cat >mk_shared_lib.sh <<-CF_EOF
6677                 #!$SHELL
6678                 SHARED_LIB=\$1
6679                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6680                 shift
6681                 cat <<-EOF
6682                 Linking shared library
6683                 ** SHARED_LIB \$SHARED_LIB
6684                 ** IMPORT_LIB \$IMPORT_LIB
6685 EOF
6686                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6687 CF_EOF
6688                 chmod +x mk_shared_lib.sh
6689                 ;;
6690         (darwin*)
6691                 cf_try_cflags="no-cpp-precomp"
6692                 CC_SHARED_OPTS="-dynamic"
6693                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6694                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6695                 cf_cv_shlib_version_infix=yes
6696                 echo "$as_me:6696: checking if ld -search_paths_first works" >&5
6697 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6698 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6699   echo $ECHO_N "(cached) $ECHO_C" >&6
6700 else
6701
6702                         cf_save_LDFLAGS=$LDFLAGS
6703                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6704                         cat >"conftest.$ac_ext" <<_ACEOF
6705 #line 6705 "configure"
6706 #include "confdefs.h"
6707
6708 int
6709 main (void)
6710 {
6711 int i;
6712   ;
6713   return 0;
6714 }
6715 _ACEOF
6716 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6717 if { (eval echo "$as_me:6717: \"$ac_link\"") >&5
6718   (eval $ac_link) 2>&5
6719   ac_status=$?
6720   echo "$as_me:6720: \$? = $ac_status" >&5
6721   (exit "$ac_status"); } &&
6722          { ac_try='test -s "conftest$ac_exeext"'
6723   { (eval echo "$as_me:6723: \"$ac_try\"") >&5
6724   (eval $ac_try) 2>&5
6725   ac_status=$?
6726   echo "$as_me:6726: \$? = $ac_status" >&5
6727   (exit "$ac_status"); }; }; then
6728   cf_cv_ldflags_search_paths_first=yes
6729 else
6730   echo "$as_me: failed program was:" >&5
6731 cat "conftest.$ac_ext" >&5
6732 cf_cv_ldflags_search_paths_first=no
6733 fi
6734 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6735                                 LDFLAGS=$cf_save_LDFLAGS
6736 fi
6737 echo "$as_me:6737: result: $cf_cv_ldflags_search_paths_first" >&5
6738 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6739                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6740                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6741                 fi
6742                 ;;
6743         (haiku*)
6744
6745         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6746         if test "$cf_cv_shlib_version" = rel; then
6747                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6748         else
6749                 cf_cv_shared_soname='`basename $@`'
6750         fi
6751
6752                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6753                 ;;
6754         (hpux[7-8]*)
6755                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6756                 if test "$GCC" != yes; then
6757                         CC_SHARED_OPTS='+Z'
6758                 fi
6759                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6760                 INSTALL_LIB="-m 555"
6761                 ;;
6762         (hpux*)
6763                 # (tested with gcc 2.7.2 -- I don't have c89)
6764                 if test "$GCC" = yes; then
6765                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6766                 else
6767                         CC_SHARED_OPTS='+Z'
6768                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6769                 fi
6770                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6771                 # HP-UX shared libraries must be executable, and should be
6772                 # readonly to exploit a quirk in the memory manager.
6773                 INSTALL_LIB="-m 555"
6774                 ;;
6775         (interix*)
6776                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6777                 if test "$cf_cv_shlib_version" = rel; then
6778                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6779                 else
6780                         cf_shared_soname='`basename $@`'
6781                 fi
6782                 CC_SHARED_OPTS=
6783                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6784                 ;;
6785         (irix*)
6786                 if test "$cf_cv_enable_rpath" = yes ; then
6787                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6788                 fi
6789                 # tested with IRIX 5.2 and 'cc'.
6790                 if test "$GCC" != yes; then
6791                         CC_SHARED_OPTS='-KPIC'
6792                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6793                 else
6794                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6795                 fi
6796                 cf_cv_rm_so_locs=yes
6797                 ;;
6798         (linux*|gnu*|k*bsd*-gnu)
6799                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6800                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6801                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6802                 fi
6803                 if test "$cf_cv_enable_rpath" = yes ; then
6804                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6805                 fi
6806
6807         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6808         if test "$cf_cv_shlib_version" = rel; then
6809                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6810         else
6811                 cf_cv_shared_soname='`basename $@`'
6812         fi
6813
6814                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6815                 ;;
6816         (mingw*msvc*)
6817                 cf_cv_shlib_version=msvcdll
6818                 cf_cv_shlib_version_infix=msvcdll
6819                 shlibdir=$bindir
6820                 MAKE_DLLS=
6821                 if test "$DFT_LWR_MODEL" = "shared" ; then
6822                         LOCAL_LDFLAGS="-link -dll"
6823                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6824                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6825                 fi
6826                 CC_SHARED_OPTS=
6827                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6828                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6829                 cat >mk_shared_lib.sh <<-CF_EOF
6830                 #!$SHELL
6831                 SHARED_LIB=\$1
6832                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6833                 shift
6834                 my_ld=\$1
6835                 shift
6836                 cat <<-EOF
6837                 Linking shared library
6838                 ** SHARED LIB \$SHARED_LIB
6839                 ** IMPORT_LIB \$IMPORT_LIB
6840 EOF
6841                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6842                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6843                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6844 CF_EOF
6845                 chmod +x mk_shared_lib.sh
6846                 cat >mk_prog.sh <<-CF_EOF
6847                 #!$SHELL
6848                 shift
6849                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6850                 LD="$LD"
6851                 clopts=()
6852                 ldopts=("/subsystem:console")
6853                 libs=()
6854                 isdll=0
6855                 while test \$# -gt 0; do
6856                         case "\$1" in
6857                                 -link)
6858                                         # ignore -link argument
6859                                         ;;
6860                                 -M[TD] | -M[TD]d)
6861                                         # ignore runtime-library option
6862                                         ;;
6863                                 -dll)
6864                                         isdll=1
6865                                         ;;
6866                                 -W* | -w*)
6867                                         # ignore warnings
6868                                         ;;
6869                                 -D*)
6870                                         clopts+=("\$1")
6871                                         ;;
6872                                 -I*)
6873                                         clopts+=("\$1")
6874                                         ;;
6875                                 -l*)
6876                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6877                                         ;;
6878                                 -L*)
6879                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6880                                         ;;
6881                                 *.obj | *.o)
6882                                         ldopts+=("\$1")
6883                                         ;;
6884                                 -Wl,*)
6885                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6886                                                 ldopts+=("\${linkarg}")
6887                                         done
6888                                         ;;
6889                                 *.lib)
6890                                         ldopts+=("\$1")
6891                                         ;;
6892                                 -o)
6893                                         shift
6894                                         ldopts+=("-out:\$1")
6895                                         ;;
6896                                 *)
6897                                         clopts+=("\$1")
6898                                         ldopts+=("\$1")
6899                                         ;;
6900                         esac
6901                         shift
6902                 done
6903                 if [ "\$isdll" -ne 0 ]; then
6904                         for lib in \${libs[*]}; do
6905                                 ldopts+=("\$lib.dll.lib")
6906                         done
6907                 else
6908                         for lib in \${libs[*]}; do
6909                                 ldopts+=("\$lib.lib")
6910                         done
6911                 fi
6912                 cat <<-EOF
6913                 Creating program
6914                 ** ld options:   "\${ldopts[@]}"
6915 EOF
6916                 exec \$LD \${ldopts[@]}
6917 CF_EOF
6918                 chmod +x mk_prog.sh
6919                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6920                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6921                 ;;
6922         (mingw*)
6923                 cf_cv_shlib_version=mingw
6924                 cf_cv_shlib_version_infix=mingw
6925                 shlibdir=$bindir
6926                 MAKE_DLLS=
6927                 if test "$DFT_LWR_MODEL" = "shared" ; then
6928                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6929                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6930                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6931                 fi
6932                 CC_SHARED_OPTS=
6933                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6934                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6935                 cat >mk_shared_lib.sh <<-CF_EOF
6936                 #!$SHELL
6937                 SHARED_LIB=\$1
6938                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6939                 shift
6940                 cat <<-EOF
6941                 Linking shared library
6942                 ** SHARED_LIB \$SHARED_LIB
6943                 ** IMPORT_LIB \$IMPORT_LIB
6944 EOF
6945                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6946 CF_EOF
6947                 chmod +x mk_shared_lib.sh
6948                 ;;
6949         (openbsd[2-9].*|mirbsd*)
6950                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6951                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6952                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6953                 fi
6954                 if test "$cf_cv_enable_rpath" = yes ; then
6955                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6956                 fi
6957                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6958
6959         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6960         if test "$cf_cv_shlib_version" = rel; then
6961                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6962         else
6963                 cf_cv_shared_soname='`basename $@`'
6964         fi
6965
6966                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6967                 ;;
6968         (nskJ*)
6969                 CC_SHARED_OPTS=
6970                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6971                 ;;
6972         (nskL*)
6973                 CC_SHARED_OPTS=
6974                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6975                 ;;
6976         (nto-qnx*|openbsd*|freebsd[12].*)
6977                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6978                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6979                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6980                 ;;
6981         (dragonfly*|freebsd*)
6982                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6983                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6984                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6985                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6986                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6987                 fi
6988
6989         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6990         if test "$cf_cv_shlib_version" = rel; then
6991                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6992         else
6993                 cf_cv_shared_soname='`basename $@`'
6994         fi
6995
6996                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6997                 ;;
6998         (netbsd*)
6999                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7000                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7001                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7002                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7003                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7004                         if test "$cf_cv_shlib_version" = auto; then
7005                         if test -f /usr/libexec/ld.elf_so; then
7006                                 cf_cv_shlib_version=abi
7007                         else
7008                                 cf_cv_shlib_version=rel
7009                         fi
7010                         fi
7011
7012         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7013         if test "$cf_cv_shlib_version" = rel; then
7014                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7015         else
7016                 cf_cv_shared_soname='`basename $@`'
7017         fi
7018
7019                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7020                 else
7021                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7022                 fi
7023                 ;;
7024         (osf*|mls+*)
7025                 # tested with OSF/1 V3.2 and 'cc'
7026                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7027                 # link with shared libs).
7028                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7029                 case "$host_os" in
7030                 (osf4*)
7031                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7032                         ;;
7033                 esac
7034                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7035                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7036                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7037                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7038                 fi
7039                 cf_cv_rm_so_locs=yes
7040                 ;;
7041         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7042                 # tested with osr5.0.5
7043                 if test "$GCC" != yes; then
7044                         CC_SHARED_OPTS='-belf -KPIC'
7045                 fi
7046                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7047                 if test "$cf_cv_enable_rpath" = yes ; then
7048                         # only way is to set LD_RUN_PATH but no switch for it
7049                         RUN_PATH=$libdir
7050                 fi
7051                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7052                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7053                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7054                 ;;
7055         (sunos4*)
7056                 # tested with SunOS 4.1.1 and gcc 2.7.0
7057                 if test "$GCC" != yes; then
7058                         CC_SHARED_OPTS='-KPIC'
7059                 fi
7060                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7061                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7062                 ;;
7063         (solaris2*)
7064                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7065                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7066                 if test "$DFT_LWR_MODEL" = "shared" ; then
7067                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7068                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7069                 fi
7070                 if test "$cf_cv_enable_rpath" = yes ; then
7071                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7072                 fi
7073
7074         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7075         if test "$cf_cv_shlib_version" = rel; then
7076                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7077         else
7078                 cf_cv_shared_soname='`basename $@`'
7079         fi
7080
7081                 if test "$GCC" != yes; then
7082                         cf_save_CFLAGS="$CFLAGS"
7083                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7084                         do
7085                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7086                                 cat >"conftest.$ac_ext" <<_ACEOF
7087 #line 7087 "configure"
7088 #include "confdefs.h"
7089 #include <stdio.h>
7090 int
7091 main (void)
7092 {
7093 printf("Hello\\n");
7094   ;
7095   return 0;
7096 }
7097 _ACEOF
7098 rm -f "conftest.$ac_objext"
7099 if { (eval echo "$as_me:7099: \"$ac_compile\"") >&5
7100   (eval $ac_compile) 2>&5
7101   ac_status=$?
7102   echo "$as_me:7102: \$? = $ac_status" >&5
7103   (exit "$ac_status"); } &&
7104          { ac_try='test -s "conftest.$ac_objext"'
7105   { (eval echo "$as_me:7105: \"$ac_try\"") >&5
7106   (eval $ac_try) 2>&5
7107   ac_status=$?
7108   echo "$as_me:7108: \$? = $ac_status" >&5
7109   (exit "$ac_status"); }; }; then
7110   break
7111 else
7112   echo "$as_me: failed program was:" >&5
7113 cat "conftest.$ac_ext" >&5
7114 fi
7115 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7116                         done
7117                         CFLAGS="$cf_save_CFLAGS"
7118                         CC_SHARED_OPTS=$cf_shared_opts
7119                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
7120                 else
7121                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7122                 fi
7123                 ;;
7124         (sysv5uw7*|unix_sv*)
7125                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7126                 if test "$GCC" != yes; then
7127                         CC_SHARED_OPTS='-KPIC'
7128                 fi
7129                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7130                 ;;
7131         (*)
7132                 CC_SHARED_OPTS='unknown'
7133                 MK_SHARED_LIB='echo unknown'
7134                 ;;
7135         esac
7136
7137         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7138         case "$cf_cv_shlib_version" in
7139         (rel|abi)
7140                 case "$MK_SHARED_LIB" in
7141                 (*'-o $@')
7142                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7143                         ;;
7144                 (*)
7145                         { echo "$as_me:7145: WARNING: ignored --with-shlib-version" >&5
7146 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7147                         ;;
7148                 esac
7149                 ;;
7150         esac
7151
7152         if test -n "$cf_try_cflags"
7153         then
7154 cat > conftest.$ac_ext <<EOF
7155 #line 7155 "${as_me:-configure}"
7156 #include <stdio.h>
7157 int main(int argc, char *argv[])
7158 {
7159         printf("hello\\n");
7160         return (argv[argc-1] == 0) ;
7161 }
7162 EOF
7163                 cf_save_CFLAGS="$CFLAGS"
7164                 for cf_opt in $cf_try_cflags
7165                 do
7166                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7167                         echo "$as_me:7167: checking if CFLAGS option -$cf_opt works" >&5
7168 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7169                         if { (eval echo "$as_me:7169: \"$ac_compile\"") >&5
7170   (eval $ac_compile) 2>&5
7171   ac_status=$?
7172   echo "$as_me:7172: \$? = $ac_status" >&5
7173   (exit "$ac_status"); }; then
7174                                 echo "$as_me:7174: result: yes" >&5
7175 echo "${ECHO_T}yes" >&6
7176                                 cf_save_CFLAGS="$CFLAGS"
7177                         else
7178                                 echo "$as_me:7178: result: no" >&5
7179 echo "${ECHO_T}no" >&6
7180                         fi
7181                 done
7182                 CFLAGS="$cf_save_CFLAGS"
7183         fi
7184
7185         # RPATH_LIST is a colon-separated list of directories
7186         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7187         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7188
7189         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7190
7191         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7192
7193 echo "${as_me:-configure}:7193: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7194
7195         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7196
7197 echo "${as_me:-configure}:7197: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7198
7199 for model in $cf_list_models ; do
7200         case "$model" in
7201         (libtool)
7202
7203 echo "$as_me:7203: checking for additional libtool options" >&5
7204 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7205
7206 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7207 if test "${with_libtool_opts+set}" = set; then
7208   withval="$with_libtool_opts"
7209   with_libtool_opts=$withval
7210 else
7211   with_libtool_opts=no
7212 fi;
7213 echo "$as_me:7213: result: $with_libtool_opts" >&5
7214 echo "${ECHO_T}$with_libtool_opts" >&6
7215
7216 case .$with_libtool_opts in
7217 (.yes|.no|.)
7218         ;;
7219 (*)
7220         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7221         ;;
7222 esac
7223
7224 echo "$as_me:7224: checking if exported-symbols file should be used" >&5
7225 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7226
7227 # Check whether --with-export-syms or --without-export-syms was given.
7228 if test "${with_export_syms+set}" = set; then
7229   withval="$with_export_syms"
7230   with_export_syms=$withval
7231 else
7232   with_export_syms=no
7233 fi;
7234 if test "x$with_export_syms" = xyes
7235 then
7236         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7237
7238 fi
7239 echo "$as_me:7239: result: $with_export_syms" >&5
7240 echo "${ECHO_T}$with_export_syms" >&6
7241 if test "x$with_export_syms" != xno
7242 then
7243         EXPORT_SYMS="-export-symbols $with_export_syms"
7244
7245 fi
7246
7247                 ;;
7248         (shared)
7249                 if test "$CC_SHARED_OPTS" = "unknown"; then
7250                         { { echo "$as_me:7250: error: Shared libraries are not supported in this version" >&5
7251 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7252    { (exit 1); exit 1; }; }
7253                 fi
7254                 # workaround for inept transition to PIE vs PIC...
7255                 echo "$as_me:7255: checking if current CFLAGS link properly" >&5
7256 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7257                 cat >"conftest.$ac_ext" <<_ACEOF
7258 #line 7258 "configure"
7259 #include "confdefs.h"
7260 #include <stdio.h>
7261 int
7262 main (void)
7263 {
7264 printf("Hello work\\n");
7265   ;
7266   return 0;
7267 }
7268 _ACEOF
7269 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7270 if { (eval echo "$as_me:7270: \"$ac_link\"") >&5
7271   (eval $ac_link) 2>&5
7272   ac_status=$?
7273   echo "$as_me:7273: \$? = $ac_status" >&5
7274   (exit "$ac_status"); } &&
7275          { ac_try='test -s "conftest$ac_exeext"'
7276   { (eval echo "$as_me:7276: \"$ac_try\"") >&5
7277   (eval $ac_try) 2>&5
7278   ac_status=$?
7279   echo "$as_me:7279: \$? = $ac_status" >&5
7280   (exit "$ac_status"); }; }; then
7281   cf_cflags_work=yes
7282 else
7283   echo "$as_me: failed program was:" >&5
7284 cat "conftest.$ac_ext" >&5
7285 cf_cflags_work=no
7286 fi
7287 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7288                 echo "$as_me:7288: result: $cf_cflags_work" >&5
7289 echo "${ECHO_T}$cf_cflags_work" >&6
7290                 if test "$cf_cflags_work" = no
7291                 then
7292                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
7293
7294 echo "${as_me:-configure}:7294: testing try to work around by appending shared-options ..." 1>&5
7295
7296                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7297                 fi
7298
7299 echo "$as_me:7299: checking if versioned-symbols file should be used" >&5
7300 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7301
7302 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7303 if test "${with_versioned_syms+set}" = set; then
7304   withval="$with_versioned_syms"
7305   with_versioned_syms=$withval
7306 else
7307   with_versioned_syms=no
7308 fi;
7309 case "x$with_versioned_syms" in
7310 (xyes)
7311         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7312
7313         ;;
7314 (xno)
7315         ;;
7316 (x/*)
7317         test -f "$with_versioned_syms" || { { echo "$as_me:7317: error: expected a filename: $with_versioned_syms" >&5
7318 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7319    { (exit 1); exit 1; }; }
7320         ;;
7321 (*)
7322         test -f "$with_versioned_syms" || { { echo "$as_me:7322: error: expected a filename: $with_versioned_syms" >&5
7323 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7324    { (exit 1); exit 1; }; }
7325         with_versioned_syms=`pwd`/"$with_versioned_syms"
7326         ;;
7327 esac
7328 echo "$as_me:7328: result: $with_versioned_syms" >&5
7329 echo "${ECHO_T}$with_versioned_syms" >&6
7330
7331 RESULTING_SYMS=
7332 VERSIONED_SYMS=
7333 WILDCARD_SYMS=
7334
7335 if test "x$with_versioned_syms" != xno
7336 then
7337         RESULTING_SYMS=$with_versioned_syms
7338         case "x$MK_SHARED_LIB" in
7339         (*-Wl,*)
7340                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7341                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7342                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7343
7344 echo "${as_me:-configure}:7344: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7345
7346                 ;;
7347         (*-dy\ *)
7348                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7349                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7350                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7351
7352 echo "${as_me:-configure}:7352: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7353
7354                 ;;
7355         (*)
7356                 { echo "$as_me:7356: WARNING: this system does not support versioned-symbols" >&5
7357 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7358                 ;;
7359         esac
7360
7361         # Linux ld can selectively override scope, e.g., of symbols beginning with
7362         # "_" by first declaring some as global, and then using a wildcard to
7363         # declare the others as local.  Some other loaders cannot do this.  Check
7364         # by constructing a (very) simple shared library and inspecting its
7365         # symbols.
7366         if test "x$VERSIONED_SYMS" != "x"
7367         then
7368                 echo "$as_me:7368: checking if wildcards can be used to selectively omit symbols" >&5
7369 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7370                 WILDCARD_SYMS=no
7371
7372                 # make sources
7373                 rm -f conftest.*
7374
7375                 cat >conftest.ver <<EOF
7376 module_1.0 {
7377 global:
7378         globalf1;
7379 local:
7380         localf1;
7381 };
7382 module_2.0 {
7383 global:
7384         globalf2;
7385 local:
7386         localf2;
7387         _*;
7388 } module_1.0;
7389 submodule_1.0 {
7390 global:
7391         subglobalf1;
7392         _ismissing;
7393 local:
7394         sublocalf1;
7395 };
7396 submodule_2.0 {
7397 global:
7398         subglobalf2;
7399 local:
7400         sublocalf2;
7401         _*;
7402 } submodule_1.0;
7403 EOF
7404                 cat >conftest.$ac_ext <<EOF
7405 #line 7405 "configure"
7406 int     _ismissing(void) { return 1; }
7407 int     _localf1(void) { return 1; }
7408 int     _localf2(void) { return 2; }
7409 int     globalf1(void) { return 1; }
7410 int     globalf2(void) { return 2; }
7411 int     _sublocalf1(void) { return 1; }
7412 int     _sublocalf2(void) { return 2; }
7413 int     subglobalf1(void) { return 1; }
7414 int     subglobalf2(void) { return 2; }
7415 EOF
7416                 cat >conftest.mk <<EOF
7417 CC=${CC}
7418 CFLAGS=${CFLAGS}
7419 CPPFLAGS=${CPPFLAGS}
7420 LDFLAGS=${LDFLAGS}
7421 LIBS=${LIBS}
7422 VERSIONED_SYMS=${VERSIONED_SYMS}
7423 RESULTING_SYMS=conftest.ver
7424 MK_SHARED_LIB=${MK_SHARED_LIB}
7425 conftest.so: conftest.$ac_cv_objext
7426                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7427 EOF
7428
7429                 # compile source, make library
7430                 if make -f conftest.mk 2>&5 >/dev/null
7431                 then
7432                         # test for missing symbol in either Data or Text section
7433                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7434                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7435                 fi
7436                 echo "$as_me:7436: result: $WILDCARD_SYMS" >&5
7437 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7438                 rm -f conftest.*
7439         fi
7440 fi
7441
7442                 ;;
7443         esac
7444 done
7445
7446 ### Checks for special libraries, must be done up-front.
7447 SHLIB_LIST=""
7448
7449 echo "$as_me:7449: checking if you want to link with the GPM mouse library" >&5
7450 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7451
7452 # Check whether --with-gpm or --without-gpm was given.
7453 if test "${with_gpm+set}" = set; then
7454   withval="$with_gpm"
7455   with_gpm=$withval
7456 else
7457   with_gpm=maybe
7458 fi;
7459 echo "$as_me:7459: result: $with_gpm" >&5
7460 echo "${ECHO_T}$with_gpm" >&6
7461
7462 if test "$with_gpm" != no ; then
7463         echo "$as_me:7463: checking for gpm.h" >&5
7464 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7465 if test "${ac_cv_header_gpm_h+set}" = set; then
7466   echo $ECHO_N "(cached) $ECHO_C" >&6
7467 else
7468   cat >"conftest.$ac_ext" <<_ACEOF
7469 #line 7469 "configure"
7470 #include "confdefs.h"
7471 #include <gpm.h>
7472 _ACEOF
7473 if { (eval echo "$as_me:7473: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7474   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7475   ac_status=$?
7476   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7477   rm -f conftest.er1
7478   cat conftest.err >&5
7479   echo "$as_me:7479: \$? = $ac_status" >&5
7480   (exit "$ac_status"); } >/dev/null; then
7481   if test -s conftest.err; then
7482     ac_cpp_err=$ac_c_preproc_warn_flag
7483   else
7484     ac_cpp_err=
7485   fi
7486 else
7487   ac_cpp_err=yes
7488 fi
7489 if test -z "$ac_cpp_err"; then
7490   ac_cv_header_gpm_h=yes
7491 else
7492   echo "$as_me: failed program was:" >&5
7493   cat "conftest.$ac_ext" >&5
7494   ac_cv_header_gpm_h=no
7495 fi
7496 rm -f conftest.err "conftest.$ac_ext"
7497 fi
7498 echo "$as_me:7498: result: $ac_cv_header_gpm_h" >&5
7499 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7500 if test "$ac_cv_header_gpm_h" = yes; then
7501
7502 cat >>confdefs.h <<\EOF
7503 #define HAVE_GPM_H 1
7504 EOF
7505
7506                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7507                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7508
7509 echo "${as_me:-configure}:7509: testing assuming we really have GPM library ..." 1>&5
7510
7511 cat >>confdefs.h <<\EOF
7512 #define HAVE_LIBGPM 1
7513 EOF
7514
7515                         with_gpm=yes
7516                 else
7517                         echo "$as_me:7517: checking for Gpm_Open in -lgpm" >&5
7518 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7519 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7520   echo $ECHO_N "(cached) $ECHO_C" >&6
7521 else
7522   ac_check_lib_save_LIBS=$LIBS
7523 LIBS="-lgpm  $LIBS"
7524 cat >"conftest.$ac_ext" <<_ACEOF
7525 #line 7525 "configure"
7526 #include "confdefs.h"
7527
7528 /* Override any gcc2 internal prototype to avoid an error.  */
7529 #ifdef __cplusplus
7530 extern "C"
7531 #endif
7532 /* We use char because int might match the return type of a gcc2
7533    builtin and then its argument prototype would still apply.  */
7534 char Gpm_Open ();
7535 int
7536 main (void)
7537 {
7538 Gpm_Open ();
7539   ;
7540   return 0;
7541 }
7542 _ACEOF
7543 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7544 if { (eval echo "$as_me:7544: \"$ac_link\"") >&5
7545   (eval $ac_link) 2>&5
7546   ac_status=$?
7547   echo "$as_me:7547: \$? = $ac_status" >&5
7548   (exit "$ac_status"); } &&
7549          { ac_try='test -s "conftest$ac_exeext"'
7550   { (eval echo "$as_me:7550: \"$ac_try\"") >&5
7551   (eval $ac_try) 2>&5
7552   ac_status=$?
7553   echo "$as_me:7553: \$? = $ac_status" >&5
7554   (exit "$ac_status"); }; }; then
7555   ac_cv_lib_gpm_Gpm_Open=yes
7556 else
7557   echo "$as_me: failed program was:" >&5
7558 cat "conftest.$ac_ext" >&5
7559 ac_cv_lib_gpm_Gpm_Open=no
7560 fi
7561 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7562 LIBS=$ac_check_lib_save_LIBS
7563 fi
7564 echo "$as_me:7564: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7565 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7566 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7567   with_gpm=yes
7568 else
7569
7570                                 if test "$with_gpm" = maybe; then
7571                                         { echo "$as_me:7571: WARNING: Cannot link with GPM library" >&5
7572 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7573                                         with_gpm=no
7574                                 else
7575                                         { { echo "$as_me:7575: error: Cannot link with GPM library" >&5
7576 echo "$as_me: error: Cannot link with GPM library" >&2;}
7577    { (exit 1); exit 1; }; }
7578                                 fi
7579
7580 fi
7581
7582                 fi
7583
7584 else
7585
7586                 test "$with_gpm" != maybe && { echo "$as_me:7586: WARNING: Cannot find GPM header" >&5
7587 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7588                 with_gpm=no
7589
7590 fi
7591
7592 fi
7593
7594 if test "$with_gpm" != no ; then
7595         echo "$as_me:7595: checking if you want to load GPM dynamically" >&5
7596 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7597
7598 # Check whether --with-dlsym or --without-dlsym was given.
7599 if test "${with_dlsym+set}" = set; then
7600   withval="$with_dlsym"
7601   with_dlsym=$withval
7602 else
7603   with_dlsym=yes
7604 fi;
7605         echo "$as_me:7605: result: $with_dlsym" >&5
7606 echo "${ECHO_T}$with_dlsym" >&6
7607         if test "x$with_dlsym" = xyes ; then
7608
7609 cf_have_dlsym=no
7610 echo "$as_me:7610: checking for dlsym" >&5
7611 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7612 if test "${ac_cv_func_dlsym+set}" = set; then
7613   echo $ECHO_N "(cached) $ECHO_C" >&6
7614 else
7615   cat >"conftest.$ac_ext" <<_ACEOF
7616 #line 7616 "configure"
7617 #include "confdefs.h"
7618 #define dlsym autoconf_temporary
7619 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7620 #undef dlsym
7621
7622 #ifdef __cplusplus
7623 extern "C"
7624 #endif
7625
7626 /* We use char because int might match the return type of a gcc2
7627    builtin and then its argument prototype would still apply.  */
7628 char dlsym (void);
7629
7630 int
7631 main (void)
7632 {
7633
7634 /* The GNU C library defines stubs for functions which it implements
7635     to always fail with ENOSYS.  Some functions are actually named
7636     something starting with __ and the normal name is an alias.  */
7637 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7638 #error found stub for dlsym
7639 #endif
7640
7641         return dlsym ();
7642   ;
7643   return 0;
7644 }
7645 _ACEOF
7646 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7647 if { (eval echo "$as_me:7647: \"$ac_link\"") >&5
7648   (eval $ac_link) 2>&5
7649   ac_status=$?
7650   echo "$as_me:7650: \$? = $ac_status" >&5
7651   (exit "$ac_status"); } &&
7652          { ac_try='test -s "conftest$ac_exeext"'
7653   { (eval echo "$as_me:7653: \"$ac_try\"") >&5
7654   (eval $ac_try) 2>&5
7655   ac_status=$?
7656   echo "$as_me:7656: \$? = $ac_status" >&5
7657   (exit "$ac_status"); }; }; then
7658   ac_cv_func_dlsym=yes
7659 else
7660   echo "$as_me: failed program was:" >&5
7661 cat "conftest.$ac_ext" >&5
7662 ac_cv_func_dlsym=no
7663 fi
7664 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7665 fi
7666 echo "$as_me:7666: result: $ac_cv_func_dlsym" >&5
7667 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7668 if test "$ac_cv_func_dlsym" = yes; then
7669   cf_have_dlsym=yes
7670 else
7671
7672 cf_have_libdl=no
7673 echo "$as_me:7673: checking for dlsym in -ldl" >&5
7674 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7675 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7676   echo $ECHO_N "(cached) $ECHO_C" >&6
7677 else
7678   ac_check_lib_save_LIBS=$LIBS
7679 LIBS="-ldl  $LIBS"
7680 cat >"conftest.$ac_ext" <<_ACEOF
7681 #line 7681 "configure"
7682 #include "confdefs.h"
7683
7684 /* Override any gcc2 internal prototype to avoid an error.  */
7685 #ifdef __cplusplus
7686 extern "C"
7687 #endif
7688 /* We use char because int might match the return type of a gcc2
7689    builtin and then its argument prototype would still apply.  */
7690 char dlsym ();
7691 int
7692 main (void)
7693 {
7694 dlsym ();
7695   ;
7696   return 0;
7697 }
7698 _ACEOF
7699 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7700 if { (eval echo "$as_me:7700: \"$ac_link\"") >&5
7701   (eval $ac_link) 2>&5
7702   ac_status=$?
7703   echo "$as_me:7703: \$? = $ac_status" >&5
7704   (exit "$ac_status"); } &&
7705          { ac_try='test -s "conftest$ac_exeext"'
7706   { (eval echo "$as_me:7706: \"$ac_try\"") >&5
7707   (eval $ac_try) 2>&5
7708   ac_status=$?
7709   echo "$as_me:7709: \$? = $ac_status" >&5
7710   (exit "$ac_status"); }; }; then
7711   ac_cv_lib_dl_dlsym=yes
7712 else
7713   echo "$as_me: failed program was:" >&5
7714 cat "conftest.$ac_ext" >&5
7715 ac_cv_lib_dl_dlsym=no
7716 fi
7717 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7718 LIBS=$ac_check_lib_save_LIBS
7719 fi
7720 echo "$as_me:7720: result: $ac_cv_lib_dl_dlsym" >&5
7721 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7722 if test "$ac_cv_lib_dl_dlsym" = yes; then
7723
7724         cf_have_dlsym=yes
7725         cf_have_libdl=yes
7726 fi
7727
7728 fi
7729
7730 if test "$cf_have_dlsym" = yes ; then
7731         test "$cf_have_libdl" = yes && {
7732 cf_add_libs="$LIBS"
7733 # reverse order
7734 cf_add_0lib=
7735 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7736 # filter duplicates
7737 for cf_add_1lib in $cf_add_0lib; do
7738         for cf_add_2lib in $cf_add_libs; do
7739                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7740                         cf_add_1lib=
7741                         break
7742                 fi
7743         done
7744         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7745 done
7746 LIBS="$cf_add_libs"
7747  }
7748
7749         echo "$as_me:7749: checking whether able to link to dl*() functions" >&5
7750 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7751         cat >"conftest.$ac_ext" <<_ACEOF
7752 #line 7752 "configure"
7753 #include "confdefs.h"
7754 #include <dlfcn.h>
7755 int
7756 main (void)
7757 {
7758
7759                 void *obj;
7760                 if ((obj = dlopen("filename", 0)) != 0) {
7761                         if (dlsym(obj, "symbolname") == 0) {
7762                         dlclose(obj);
7763                         }
7764                 }
7765   ;
7766   return 0;
7767 }
7768 _ACEOF
7769 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7770 if { (eval echo "$as_me:7770: \"$ac_link\"") >&5
7771   (eval $ac_link) 2>&5
7772   ac_status=$?
7773   echo "$as_me:7773: \$? = $ac_status" >&5
7774   (exit "$ac_status"); } &&
7775          { ac_try='test -s "conftest$ac_exeext"'
7776   { (eval echo "$as_me:7776: \"$ac_try\"") >&5
7777   (eval $ac_try) 2>&5
7778   ac_status=$?
7779   echo "$as_me:7779: \$? = $ac_status" >&5
7780   (exit "$ac_status"); }; }; then
7781
7782 cat >>confdefs.h <<\EOF
7783 #define HAVE_LIBDL 1
7784 EOF
7785
7786 else
7787   echo "$as_me: failed program was:" >&5
7788 cat "conftest.$ac_ext" >&5
7789
7790                 { { echo "$as_me:7790: error: Cannot link test program for libdl" >&5
7791 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7792    { (exit 1); exit 1; }; }
7793 fi
7794 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7795         echo "$as_me:7795: result: ok" >&5
7796 echo "${ECHO_T}ok" >&6
7797 else
7798         { { echo "$as_me:7798: error: Cannot find dlsym function" >&5
7799 echo "$as_me: error: Cannot find dlsym function" >&2;}
7800    { (exit 1); exit 1; }; }
7801 fi
7802
7803                 if test "x$with_gpm" != xyes ; then
7804                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7805
7806 echo "${as_me:-configure}:7806: testing assuming soname for gpm is $with_gpm ..." 1>&5
7807
7808                         cf_cv_gpm_soname="$with_gpm"
7809                 else
7810
7811 echo "$as_me:7811: checking for soname of gpm library" >&5
7812 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7813 if test "${cf_cv_gpm_soname+set}" = set; then
7814   echo $ECHO_N "(cached) $ECHO_C" >&6
7815 else
7816
7817 cf_cv_gpm_soname=unknown
7818 if test "$cross_compiling" != yes ; then
7819 cat >conftest.$ac_ext <<CF_EOF
7820 #include <gpm.h>
7821 int main(void)
7822 {
7823 if (Gpm_Open(0,0)) Gpm_Close();
7824         ${cf_cv_main_return:-return}(0);
7825 }
7826 CF_EOF
7827 cf_save_LIBS="$LIBS"
7828
7829 cf_add_libs="$LIBS"
7830 # reverse order
7831 cf_add_0lib=
7832 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7833 # filter duplicates
7834 for cf_add_1lib in $cf_add_0lib; do
7835         for cf_add_2lib in $cf_add_libs; do
7836                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7837                         cf_add_1lib=
7838                         break
7839                 fi
7840         done
7841         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7842 done
7843 LIBS="$cf_add_libs"
7844
7845         if { (eval echo "$as_me:7845: \"$ac_compile\"") >&5
7846   (eval $ac_compile) 2>&5
7847   ac_status=$?
7848   echo "$as_me:7848: \$? = $ac_status" >&5
7849   (exit "$ac_status"); } ; then
7850                 if { (eval echo "$as_me:7850: \"$ac_link\"") >&5
7851   (eval $ac_link) 2>&5
7852   ac_status=$?
7853   echo "$as_me:7853: \$? = $ac_status" >&5
7854   (exit "$ac_status"); } ; then
7855                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7856                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7857                 fi
7858         fi
7859 rm -rf ./conftest*
7860 LIBS="$cf_save_LIBS"
7861 fi
7862
7863 fi
7864 echo "$as_me:7864: result: $cf_cv_gpm_soname" >&5
7865 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7866
7867                 fi
7868                 test "$cf_cv_gpm_soname" != "unknown" &&
7869 cat >>confdefs.h <<EOF
7870 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7871 EOF
7872
7873                 SHLIB_LIST="-ldl $SHLIB_LIST"
7874
7875 cf_add_libs="$PRIVATE_LIBS"
7876 # reverse order
7877 cf_add_0lib=
7878 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7879 # filter duplicates
7880 for cf_add_1lib in $cf_add_0lib; do
7881         for cf_add_2lib in $cf_add_libs; do
7882                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7883                         cf_add_1lib=
7884                         break
7885                 fi
7886         done
7887         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7888 done
7889 PRIVATE_LIBS="$cf_add_libs"
7890
7891         else
7892                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7893
7894 cf_add_libs="$TEST_LIBS"
7895 # reverse order
7896 cf_add_0lib=
7897 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7898 # filter duplicates
7899 for cf_add_1lib in $cf_add_0lib; do
7900         for cf_add_2lib in $cf_add_libs; do
7901                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7902                         cf_add_1lib=
7903                         break
7904                 fi
7905         done
7906         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7907 done
7908 TEST_LIBS="$cf_add_libs"
7909
7910 cf_add_libs="$PRIVATE_LIBS"
7911 # reverse order
7912 cf_add_0lib=
7913 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7914 # filter duplicates
7915 for cf_add_1lib in $cf_add_0lib; do
7916         for cf_add_2lib in $cf_add_libs; do
7917                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7918                         cf_add_1lib=
7919                         break
7920                 fi
7921         done
7922         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7923 done
7924 PRIVATE_LIBS="$cf_add_libs"
7925
7926         fi
7927
7928 cat >>confdefs.h <<\EOF
7929 #define HAVE_LIBGPM 1
7930 EOF
7931
7932 echo "$as_me:7932: checking for Gpm_Wgetch in -lgpm" >&5
7933 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7934 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7935   echo $ECHO_N "(cached) $ECHO_C" >&6
7936 else
7937   ac_check_lib_save_LIBS=$LIBS
7938 LIBS="-lgpm  $LIBS"
7939 cat >"conftest.$ac_ext" <<_ACEOF
7940 #line 7940 "configure"
7941 #include "confdefs.h"
7942
7943 /* Override any gcc2 internal prototype to avoid an error.  */
7944 #ifdef __cplusplus
7945 extern "C"
7946 #endif
7947 /* We use char because int might match the return type of a gcc2
7948    builtin and then its argument prototype would still apply.  */
7949 char Gpm_Wgetch ();
7950 int
7951 main (void)
7952 {
7953 Gpm_Wgetch ();
7954   ;
7955   return 0;
7956 }
7957 _ACEOF
7958 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7959 if { (eval echo "$as_me:7959: \"$ac_link\"") >&5
7960   (eval $ac_link) 2>&5
7961   ac_status=$?
7962   echo "$as_me:7962: \$? = $ac_status" >&5
7963   (exit "$ac_status"); } &&
7964          { ac_try='test -s "conftest$ac_exeext"'
7965   { (eval echo "$as_me:7965: \"$ac_try\"") >&5
7966   (eval $ac_try) 2>&5
7967   ac_status=$?
7968   echo "$as_me:7968: \$? = $ac_status" >&5
7969   (exit "$ac_status"); }; }; then
7970   ac_cv_lib_gpm_Gpm_Wgetch=yes
7971 else
7972   echo "$as_me: failed program was:" >&5
7973 cat "conftest.$ac_ext" >&5
7974 ac_cv_lib_gpm_Gpm_Wgetch=no
7975 fi
7976 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7977 LIBS=$ac_check_lib_save_LIBS
7978 fi
7979 echo "$as_me:7979: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7980 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7981 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7982
7983 echo "$as_me:7983: checking if GPM is weakly bound to curses library" >&5
7984 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7985 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7986   echo $ECHO_N "(cached) $ECHO_C" >&6
7987 else
7988
7989 cf_cv_check_gpm_wgetch=unknown
7990 if test "$cross_compiling" != yes ; then
7991
7992 cat >conftest.$ac_ext <<CF_EOF
7993 #include <gpm.h>
7994 int main(void)
7995 {
7996         Gpm_Wgetch();
7997         ${cf_cv_main_return:-return}(0);
7998 }
7999 CF_EOF
8000
8001         cf_save_LIBS="$LIBS"
8002         # This only works if we can look at the symbol table.  If a shared
8003         # library is stripped for install, we cannot use that.  So we're forced
8004         # to rely on the static library, noting that some packagers may not
8005         # include it.
8006         LIBS="-static -lgpm -dynamic $LIBS"
8007         if { (eval echo "$as_me:8007: \"$ac_compile\"") >&5
8008   (eval $ac_compile) 2>&5
8009   ac_status=$?
8010   echo "$as_me:8010: \$? = $ac_status" >&5
8011   (exit "$ac_status"); } ; then
8012                 if { (eval echo "$as_me:8012: \"$ac_link\"") >&5
8013   (eval $ac_link) 2>&5
8014   ac_status=$?
8015   echo "$as_me:8015: \$? = $ac_status" >&5
8016   (exit "$ac_status"); } ; then
8017                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8018                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8019                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8020                 fi
8021         fi
8022         rm -rf ./conftest*
8023         LIBS="$cf_save_LIBS"
8024 fi
8025
8026 fi
8027 echo "$as_me:8027: result: $cf_cv_check_gpm_wgetch" >&5
8028 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8029
8030 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8031         { echo "$as_me:8031: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8032 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8033 fi
8034
8035 fi
8036
8037 fi
8038
8039 echo "$as_me:8039: checking if you want to use PCRE2 for regular-expressions" >&5
8040 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8041
8042 # Check whether --with-pcre2 or --without-pcre2 was given.
8043 if test "${with_pcre2+set}" = set; then
8044   withval="$with_pcre2"
8045
8046 fi;
8047 test -z "$with_pcre2" && with_pcre2=no
8048 echo "$as_me:8048: result: $with_pcre2" >&5
8049 echo "${ECHO_T}$with_pcre2" >&6
8050
8051 if test "x$with_pcre2" != xno ; then
8052         cf_with_pcre2_ok=no
8053         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8054         do
8055
8056 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8057         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
8058
8059 echo "${as_me:-configure}:8059: testing found package $cf_with_pcre2 ..." 1>&5
8060
8061         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8062         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8063         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8064
8065 echo "${as_me:-configure}:8065: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8066
8067         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8068
8069 echo "${as_me:-configure}:8069: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8070
8071 cf_fix_cppflags=no
8072 cf_new_cflags=
8073 cf_new_cppflags=
8074 cf_new_extra_cppflags=
8075
8076 for cf_add_cflags in $cf_pkgconfig_incs
8077 do
8078 case "$cf_fix_cppflags" in
8079 (no)
8080         case "$cf_add_cflags" in
8081         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8082                 case "$cf_add_cflags" in
8083                 (-D*)
8084                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8085
8086                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8087                                 && test -z "${cf_tst_cflags}" \
8088                                 && cf_fix_cppflags=yes
8089
8090                         if test "$cf_fix_cppflags" = yes ; then
8091
8092         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8093         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8094
8095                                 continue
8096                         elif test "${cf_tst_cflags}" = "\"'" ; then
8097
8098         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8099         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8100
8101                                 continue
8102                         fi
8103                         ;;
8104                 esac
8105                 case "$CPPFLAGS" in
8106                 (*$cf_add_cflags)
8107                         ;;
8108                 (*)
8109                         case "$cf_add_cflags" in
8110                         (-D*)
8111                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8112
8113 CPPFLAGS=`echo "$CPPFLAGS" | \
8114         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8115                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8116
8117                                 ;;
8118                         esac
8119
8120         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8121         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8122
8123                         ;;
8124                 esac
8125                 ;;
8126         (*)
8127
8128         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8129         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8130
8131                 ;;
8132         esac
8133         ;;
8134 (yes)
8135
8136         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8137         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8138
8139         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8140
8141         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8142                 && test -z "${cf_tst_cflags}" \
8143                 && cf_fix_cppflags=no
8144         ;;
8145 esac
8146 done
8147
8148 if test -n "$cf_new_cflags" ; then
8149
8150         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8151         CFLAGS="${CFLAGS}$cf_new_cflags"
8152
8153 fi
8154
8155 if test -n "$cf_new_cppflags" ; then
8156
8157         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8158         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8159
8160 fi
8161
8162 if test -n "$cf_new_extra_cppflags" ; then
8163
8164         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8165         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8166
8167 fi
8168
8169 cf_add_libs="$LIBS"
8170 # reverse order
8171 cf_add_0lib=
8172 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8173 # filter duplicates
8174 for cf_add_1lib in $cf_add_0lib; do
8175         for cf_add_2lib in $cf_add_libs; do
8176                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8177                         cf_add_1lib=
8178                         break
8179                 fi
8180         done
8181         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8182 done
8183 LIBS="$cf_add_libs"
8184
8185         cf_with_pcre2_ok=yes; break
8186 else
8187         cf_pkgconfig_incs=
8188         cf_pkgconfig_libs=
8189         :
8190 fi
8191
8192         done
8193         cf_with_pcre2_ok=yes || { { echo "$as_me:8193: error: Cannot find PCRE2 library" >&5
8194 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8195    { (exit 1); exit 1; }; }
8196
8197 cat >>confdefs.h <<\EOF
8198 #define HAVE_LIB_PCRE2 1
8199 EOF
8200
8201         # if pkgconfig gave no results, look for the libraries directly
8202         case "$LIBS" in
8203         (*pcre2-posix*|*pcreposix*)
8204                 ;;
8205         (*)
8206                 echo "$as_me:8206: checking for regcomp in -lpcre2-posix" >&5
8207 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8208 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8209   echo $ECHO_N "(cached) $ECHO_C" >&6
8210 else
8211   ac_check_lib_save_LIBS=$LIBS
8212 LIBS="-lpcre2-posix  $LIBS"
8213 cat >"conftest.$ac_ext" <<_ACEOF
8214 #line 8214 "configure"
8215 #include "confdefs.h"
8216
8217 /* Override any gcc2 internal prototype to avoid an error.  */
8218 #ifdef __cplusplus
8219 extern "C"
8220 #endif
8221 /* We use char because int might match the return type of a gcc2
8222    builtin and then its argument prototype would still apply.  */
8223 char regcomp ();
8224 int
8225 main (void)
8226 {
8227 regcomp ();
8228   ;
8229   return 0;
8230 }
8231 _ACEOF
8232 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8233 if { (eval echo "$as_me:8233: \"$ac_link\"") >&5
8234   (eval $ac_link) 2>&5
8235   ac_status=$?
8236   echo "$as_me:8236: \$? = $ac_status" >&5
8237   (exit "$ac_status"); } &&
8238          { ac_try='test -s "conftest$ac_exeext"'
8239   { (eval echo "$as_me:8239: \"$ac_try\"") >&5
8240   (eval $ac_try) 2>&5
8241   ac_status=$?
8242   echo "$as_me:8242: \$? = $ac_status" >&5
8243   (exit "$ac_status"); }; }; then
8244   ac_cv_lib_pcre2_posix_regcomp=yes
8245 else
8246   echo "$as_me: failed program was:" >&5
8247 cat "conftest.$ac_ext" >&5
8248 ac_cv_lib_pcre2_posix_regcomp=no
8249 fi
8250 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8251 LIBS=$ac_check_lib_save_LIBS
8252 fi
8253 echo "$as_me:8253: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8254 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8255 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8256
8257 cf_add_libs="$LIBS"
8258 # reverse order
8259 cf_add_0lib=
8260 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8261 # filter duplicates
8262 for cf_add_1lib in $cf_add_0lib; do
8263         for cf_add_2lib in $cf_add_libs; do
8264                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8265                         cf_add_1lib=
8266                         break
8267                 fi
8268         done
8269         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8270 done
8271 LIBS="$cf_add_libs"
8272
8273 else
8274   echo "$as_me:8274: checking for regcomp in -lpcreposix" >&5
8275 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8276 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8277   echo $ECHO_N "(cached) $ECHO_C" >&6
8278 else
8279   ac_check_lib_save_LIBS=$LIBS
8280 LIBS="-lpcreposix  $LIBS"
8281 cat >"conftest.$ac_ext" <<_ACEOF
8282 #line 8282 "configure"
8283 #include "confdefs.h"
8284
8285 /* Override any gcc2 internal prototype to avoid an error.  */
8286 #ifdef __cplusplus
8287 extern "C"
8288 #endif
8289 /* We use char because int might match the return type of a gcc2
8290    builtin and then its argument prototype would still apply.  */
8291 char regcomp ();
8292 int
8293 main (void)
8294 {
8295 regcomp ();
8296   ;
8297   return 0;
8298 }
8299 _ACEOF
8300 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8301 if { (eval echo "$as_me:8301: \"$ac_link\"") >&5
8302   (eval $ac_link) 2>&5
8303   ac_status=$?
8304   echo "$as_me:8304: \$? = $ac_status" >&5
8305   (exit "$ac_status"); } &&
8306          { ac_try='test -s "conftest$ac_exeext"'
8307   { (eval echo "$as_me:8307: \"$ac_try\"") >&5
8308   (eval $ac_try) 2>&5
8309   ac_status=$?
8310   echo "$as_me:8310: \$? = $ac_status" >&5
8311   (exit "$ac_status"); }; }; then
8312   ac_cv_lib_pcreposix_regcomp=yes
8313 else
8314   echo "$as_me: failed program was:" >&5
8315 cat "conftest.$ac_ext" >&5
8316 ac_cv_lib_pcreposix_regcomp=no
8317 fi
8318 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8319 LIBS=$ac_check_lib_save_LIBS
8320 fi
8321 echo "$as_me:8321: result: $ac_cv_lib_pcreposix_regcomp" >&5
8322 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8323 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8324
8325 cf_add_libs="$LIBS"
8326 # reverse order
8327 cf_add_0lib=
8328 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8329 # filter duplicates
8330 for cf_add_1lib in $cf_add_0lib; do
8331         for cf_add_2lib in $cf_add_libs; do
8332                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8333                         cf_add_1lib=
8334                         break
8335                 fi
8336         done
8337         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8338 done
8339 LIBS="$cf_add_libs"
8340
8341 else
8342   { { echo "$as_me:8342: error: Cannot find PCRE2 POSIX library" >&5
8343 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8344    { (exit 1); exit 1; }; }
8345 fi
8346
8347 fi
8348
8349                 ;;
8350         esac
8351
8352         # either way, check for the library header files
8353
8354 for ac_header in pcre2posix.h pcreposix.h
8355 do
8356 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8357 echo "$as_me:8357: checking for $ac_header" >&5
8358 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8359 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8360   echo $ECHO_N "(cached) $ECHO_C" >&6
8361 else
8362   cat >"conftest.$ac_ext" <<_ACEOF
8363 #line 8363 "configure"
8364 #include "confdefs.h"
8365 #include <$ac_header>
8366 _ACEOF
8367 if { (eval echo "$as_me:8367: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8368   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8369   ac_status=$?
8370   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8371   rm -f conftest.er1
8372   cat conftest.err >&5
8373   echo "$as_me:8373: \$? = $ac_status" >&5
8374   (exit "$ac_status"); } >/dev/null; then
8375   if test -s conftest.err; then
8376     ac_cpp_err=$ac_c_preproc_warn_flag
8377   else
8378     ac_cpp_err=
8379   fi
8380 else
8381   ac_cpp_err=yes
8382 fi
8383 if test -z "$ac_cpp_err"; then
8384   eval "$as_ac_Header=yes"
8385 else
8386   echo "$as_me: failed program was:" >&5
8387   cat "conftest.$ac_ext" >&5
8388   eval "$as_ac_Header=no"
8389 fi
8390 rm -f conftest.err "conftest.$ac_ext"
8391 fi
8392 echo "$as_me:8392: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8393 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8394 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8395   cat >>confdefs.h <<EOF
8396 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8397 EOF
8398
8399 fi
8400 done
8401
8402 for ac_func in PCRE2regcomp
8403 do
8404 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8405 echo "$as_me:8405: checking for $ac_func" >&5
8406 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8407 if eval "test \"\${$as_ac_var+set}\" = set"; then
8408   echo $ECHO_N "(cached) $ECHO_C" >&6
8409 else
8410   cat >"conftest.$ac_ext" <<_ACEOF
8411 #line 8411 "configure"
8412 #include "confdefs.h"
8413 #define $ac_func autoconf_temporary
8414 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8415 #undef $ac_func
8416
8417 #ifdef __cplusplus
8418 extern "C"
8419 #endif
8420
8421 /* We use char because int might match the return type of a gcc2
8422    builtin and then its argument prototype would still apply.  */
8423 char $ac_func (void);
8424
8425 int
8426 main (void)
8427 {
8428
8429 /* The GNU C library defines stubs for functions which it implements
8430     to always fail with ENOSYS.  Some functions are actually named
8431     something starting with __ and the normal name is an alias.  */
8432 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8433 #error found stub for $ac_func
8434 #endif
8435
8436         return $ac_func ();
8437   ;
8438   return 0;
8439 }
8440 _ACEOF
8441 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8442 if { (eval echo "$as_me:8442: \"$ac_link\"") >&5
8443   (eval $ac_link) 2>&5
8444   ac_status=$?
8445   echo "$as_me:8445: \$? = $ac_status" >&5
8446   (exit "$ac_status"); } &&
8447          { ac_try='test -s "conftest$ac_exeext"'
8448   { (eval echo "$as_me:8448: \"$ac_try\"") >&5
8449   (eval $ac_try) 2>&5
8450   ac_status=$?
8451   echo "$as_me:8451: \$? = $ac_status" >&5
8452   (exit "$ac_status"); }; }; then
8453   eval "$as_ac_var=yes"
8454 else
8455   echo "$as_me: failed program was:" >&5
8456 cat "conftest.$ac_ext" >&5
8457 eval "$as_ac_var=no"
8458 fi
8459 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8460 fi
8461 echo "$as_me:8461: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8462 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8463 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8464   cat >>confdefs.h <<EOF
8465 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8466 EOF
8467
8468 fi
8469 done
8470
8471 fi
8472
8473 # not everyone has "test -c"
8474 if test -c /dev/sysmouse 2>/dev/null ; then
8475 echo "$as_me:8475: checking if you want to use sysmouse" >&5
8476 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8477
8478 # Check whether --with-sysmouse or --without-sysmouse was given.
8479 if test "${with_sysmouse+set}" = set; then
8480   withval="$with_sysmouse"
8481   cf_with_sysmouse=$withval
8482 else
8483   cf_with_sysmouse=maybe
8484 fi;
8485         if test "$cf_with_sysmouse" != no ; then
8486         cat >"conftest.$ac_ext" <<_ACEOF
8487 #line 8487 "configure"
8488 #include "confdefs.h"
8489
8490 #include <osreldate.h>
8491 #if (__FreeBSD_version >= 400017)
8492 #include <sys/consio.h>
8493 #include <sys/fbio.h>
8494 #else
8495 #include <machine/console.h>
8496 #endif
8497
8498 int
8499 main (void)
8500 {
8501
8502         struct mouse_info the_mouse;
8503         ioctl(0, CONS_MOUSECTL, &the_mouse);
8504
8505   ;
8506   return 0;
8507 }
8508 _ACEOF
8509 rm -f "conftest.$ac_objext"
8510 if { (eval echo "$as_me:8510: \"$ac_compile\"") >&5
8511   (eval $ac_compile) 2>&5
8512   ac_status=$?
8513   echo "$as_me:8513: \$? = $ac_status" >&5
8514   (exit "$ac_status"); } &&
8515          { ac_try='test -s "conftest.$ac_objext"'
8516   { (eval echo "$as_me:8516: \"$ac_try\"") >&5
8517   (eval $ac_try) 2>&5
8518   ac_status=$?
8519   echo "$as_me:8519: \$? = $ac_status" >&5
8520   (exit "$ac_status"); }; }; then
8521   cf_with_sysmouse=yes
8522 else
8523   echo "$as_me: failed program was:" >&5
8524 cat "conftest.$ac_ext" >&5
8525 cf_with_sysmouse=no
8526 fi
8527 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8528         fi
8529 echo "$as_me:8529: result: $cf_with_sysmouse" >&5
8530 echo "${ECHO_T}$cf_with_sysmouse" >&6
8531 test "$cf_with_sysmouse" = yes &&
8532 cat >>confdefs.h <<\EOF
8533 #define USE_SYSMOUSE 1
8534 EOF
8535
8536 fi
8537
8538 # pretend that ncurses==ncursesw==ncursest
8539 echo "$as_me:8539: checking if you want to disable library suffixes" >&5
8540 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8541
8542 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8543 if test "${enable_lib_suffixes+set}" = set; then
8544   enableval="$enable_lib_suffixes"
8545   test "$enableval" != no && enableval=yes
8546         if test "$enableval" != "yes" ; then
8547     disable_lib_suffixes=yes
8548         else
8549                 disable_lib_suffixes=no
8550         fi
8551 else
8552   enableval=yes
8553         disable_lib_suffixes=no
8554
8555 fi;
8556 echo "$as_me:8556: result: $disable_lib_suffixes" >&5
8557 echo "${ECHO_T}$disable_lib_suffixes" >&6
8558
8559 ### If we're building with rpath, try to link non-standard libs that way too.
8560 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8561
8562 echo "$as_me:8562: checking if rpath-hack should be disabled" >&5
8563 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8564
8565 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8566 if test "${enable_rpath_hack+set}" = set; then
8567   enableval="$enable_rpath_hack"
8568   test "$enableval" != no && enableval=yes
8569         if test "$enableval" != "yes" ; then
8570     enable_rpath_hack=no
8571         else
8572                 enable_rpath_hack=yes
8573         fi
8574 else
8575   enableval=yes
8576         enable_rpath_hack=yes
8577
8578 fi;
8579 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8580 echo "$as_me:8580: result: $cf_disable_rpath_hack" >&5
8581 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8582
8583 if test "$enable_rpath_hack" = yes ; then
8584
8585 echo "$as_me:8585: checking for updated LDFLAGS" >&5
8586 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8587 if test -n "$LD_RPATH_OPT" ; then
8588         echo "$as_me:8588: result: maybe" >&5
8589 echo "${ECHO_T}maybe" >&6
8590
8591         for ac_prog in ldd
8592 do
8593   # Extract the first word of "$ac_prog", so it can be a program name with args.
8594 set dummy $ac_prog; ac_word=$2
8595 echo "$as_me:8595: checking for $ac_word" >&5
8596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8597 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8598   echo $ECHO_N "(cached) $ECHO_C" >&6
8599 else
8600   if test -n "$cf_ldd_prog"; then
8601   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8602 else
8603   ac_save_IFS=$IFS; IFS=$ac_path_separator
8604 ac_dummy="$PATH"
8605 for ac_dir in $ac_dummy; do
8606   IFS=$ac_save_IFS
8607   test -z "$ac_dir" && ac_dir=.
8608   $as_executable_p "$ac_dir/$ac_word" || continue
8609 ac_cv_prog_cf_ldd_prog="$ac_prog"
8610 echo "$as_me:8610: found $ac_dir/$ac_word" >&5
8611 break
8612 done
8613
8614 fi
8615 fi
8616 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8617 if test -n "$cf_ldd_prog"; then
8618   echo "$as_me:8618: result: $cf_ldd_prog" >&5
8619 echo "${ECHO_T}$cf_ldd_prog" >&6
8620 else
8621   echo "$as_me:8621: result: no" >&5
8622 echo "${ECHO_T}no" >&6
8623 fi
8624
8625   test -n "$cf_ldd_prog" && break
8626 done
8627 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8628
8629         cf_rpath_list="/usr/lib /lib"
8630         if test "$cf_ldd_prog" != no
8631         then
8632                 cf_rpath_oops=
8633
8634 cat >"conftest.$ac_ext" <<_ACEOF
8635 #line 8635 "configure"
8636 #include "confdefs.h"
8637 #include <stdio.h>
8638 int
8639 main (void)
8640 {
8641 printf("Hello");
8642   ;
8643   return 0;
8644 }
8645 _ACEOF
8646 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8647 if { (eval echo "$as_me:8647: \"$ac_link\"") >&5
8648   (eval $ac_link) 2>&5
8649   ac_status=$?
8650   echo "$as_me:8650: \$? = $ac_status" >&5
8651   (exit "$ac_status"); } &&
8652          { ac_try='test -s "conftest$ac_exeext"'
8653   { (eval echo "$as_me:8653: \"$ac_try\"") >&5
8654   (eval $ac_try) 2>&5
8655   ac_status=$?
8656   echo "$as_me:8656: \$? = $ac_status" >&5
8657   (exit "$ac_status"); }; }; then
8658   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8659                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8660 else
8661   echo "$as_me: failed program was:" >&5
8662 cat "conftest.$ac_ext" >&5
8663 fi
8664 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8665
8666                 # If we passed the link-test, but get a "not found" on a given library,
8667                 # this could be due to inept reconfiguration of gcc to make it only
8668                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8669                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8670                 # /usr/local libraries.
8671                 if test -n "$cf_rpath_oops"
8672                 then
8673                         for cf_rpath_src in $cf_rpath_oops
8674                         do
8675                                 for cf_rpath_dir in \
8676                                         /usr/local \
8677                                         /usr/pkg \
8678                                         /opt/sfw
8679                                 do
8680                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8681                                         then
8682                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8683
8684 echo "${as_me:-configure}:8684: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8685
8686                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8687                                                 break
8688                                         fi
8689                                 done
8690                         done
8691                 fi
8692         fi
8693
8694         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8695
8696 echo "${as_me:-configure}:8696: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8697
8698 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8699
8700 echo "${as_me:-configure}:8700: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8701
8702 cf_rpath_dst=
8703 for cf_rpath_src in $LDFLAGS
8704 do
8705         case "$cf_rpath_src" in
8706         (-L*)
8707
8708                 # check if this refers to a directory which we will ignore
8709                 cf_rpath_skip=no
8710                 if test -n "$cf_rpath_list"
8711                 then
8712                         for cf_rpath_item in $cf_rpath_list
8713                         do
8714                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8715                                 then
8716                                         cf_rpath_skip=yes
8717                                         break
8718                                 fi
8719                         done
8720                 fi
8721
8722                 if test "$cf_rpath_skip" = no
8723                 then
8724                         # transform the option
8725                         if test "$LD_RPATH_OPT" = "-R " ; then
8726                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8727                         else
8728                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8729                         fi
8730
8731                         # if we have not already added this, add it now
8732                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8733                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8734                         then
8735                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8736
8737 echo "${as_me:-configure}:8737: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8738
8739                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8740                         fi
8741                 fi
8742                 ;;
8743         esac
8744         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8745 done
8746 LDFLAGS=$cf_rpath_dst
8747
8748 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8749
8750 echo "${as_me:-configure}:8750: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8751
8752 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8753
8754 echo "${as_me:-configure}:8754: testing ...checking LIBS $LIBS ..." 1>&5
8755
8756 cf_rpath_dst=
8757 for cf_rpath_src in $LIBS
8758 do
8759         case "$cf_rpath_src" in
8760         (-L*)
8761
8762                 # check if this refers to a directory which we will ignore
8763                 cf_rpath_skip=no
8764                 if test -n "$cf_rpath_list"
8765                 then
8766                         for cf_rpath_item in $cf_rpath_list
8767                         do
8768                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8769                                 then
8770                                         cf_rpath_skip=yes
8771                                         break
8772                                 fi
8773                         done
8774                 fi
8775
8776                 if test "$cf_rpath_skip" = no
8777                 then
8778                         # transform the option
8779                         if test "$LD_RPATH_OPT" = "-R " ; then
8780                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8781                         else
8782                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8783                         fi
8784
8785                         # if we have not already added this, add it now
8786                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8787                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8788                         then
8789                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8790
8791 echo "${as_me:-configure}:8791: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8792
8793                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8794                         fi
8795                 fi
8796                 ;;
8797         esac
8798         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8799 done
8800 LIBS=$cf_rpath_dst
8801
8802 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8803
8804 echo "${as_me:-configure}:8804: testing ...checked LIBS $LIBS ..." 1>&5
8805
8806         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8807
8808 echo "${as_me:-configure}:8808: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8809
8810 else
8811         echo "$as_me:8811: result: no" >&5
8812 echo "${ECHO_T}no" >&6
8813 fi
8814
8815 fi
8816
8817 fi
8818
8819 ### Depending on the system, someone may use rpath to build ncurses but not
8820 # want users of the package to rely upon that feature.  Give those people an
8821 # option to suppress that detail from EXTRA_LDFLAGS.
8822 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8823 if test -n "$EXTRA_PKG_LDFLAGS"
8824 then
8825         echo "$as_me:8825: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8826 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8827
8828 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8829 if test "${enable_pkg_ldflags+set}" = set; then
8830   enableval="$enable_pkg_ldflags"
8831   test "$enableval" != no && enableval=yes
8832         if test "$enableval" != "yes" ; then
8833     disable_pkg_ldflags=yes
8834         else
8835                 disable_pkg_ldflags=no
8836         fi
8837 else
8838   enableval=yes
8839         disable_pkg_ldflags=no
8840
8841 fi;
8842         echo "$as_me:8842: result: $disable_pkg_ldflags" >&5
8843 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8844         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8845 fi
8846
8847 ###############################################################################
8848
8849 ###     use option --with-extra-suffix to append suffix to headers and libraries
8850 echo "$as_me:8850: checking if you wish to append extra suffix to header/library paths" >&5
8851 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8852 EXTRA_SUFFIX=
8853
8854 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8855 if test "${with_extra_suffix+set}" = set; then
8856   withval="$with_extra_suffix"
8857   case x$withval in
8858         (xno)
8859                 ;;
8860         (xyes|x)
8861                 EXTRA_SUFFIX=$cf_cv_abi_version
8862                 ;;
8863         (*)
8864                 EXTRA_SUFFIX=$withval
8865                 ;;
8866         esac
8867
8868 fi;
8869 echo "$as_me:8869: result: $EXTRA_SUFFIX" >&5
8870 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8871
8872 ###     use option --disable-overwrite to leave out the link to -lcurses
8873 echo "$as_me:8873: checking if you wish to install ncurses overwriting curses" >&5
8874 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8875
8876 # Check whether --enable-overwrite or --disable-overwrite was given.
8877 if test "${enable_overwrite+set}" = set; then
8878   enableval="$enable_overwrite"
8879   with_overwrite=$enableval
8880 else
8881   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8882 fi;
8883 echo "$as_me:8883: result: $with_overwrite" >&5
8884 echo "${ECHO_T}$with_overwrite" >&6
8885
8886 echo "$as_me:8886: checking if external terminfo-database is used" >&5
8887 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8888
8889 # Check whether --enable-database or --disable-database was given.
8890 if test "${enable_database+set}" = set; then
8891   enableval="$enable_database"
8892   use_database=$enableval
8893 else
8894   use_database=yes
8895 fi;
8896 echo "$as_me:8896: result: $use_database" >&5
8897 echo "${ECHO_T}$use_database" >&6
8898
8899 case "$host_os" in
8900 (os2*)
8901         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8902         ;;
8903 (*)
8904         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8905         ;;
8906 esac
8907
8908 NCURSES_USE_DATABASE=0
8909 if test "$use_database" != no ; then
8910         NCURSES_USE_DATABASE=1
8911
8912         echo "$as_me:8912: checking which terminfo source-file will be installed" >&5
8913 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8914
8915 # Check whether --with-database or --without-database was given.
8916 if test "${with_database+set}" = set; then
8917   withval="$with_database"
8918   TERMINFO_SRC=$withval
8919 fi;
8920         echo "$as_me:8920: result: $TERMINFO_SRC" >&5
8921 echo "${ECHO_T}$TERMINFO_SRC" >&6
8922
8923         echo "$as_me:8923: checking whether to use hashed database instead of directory/tree" >&5
8924 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8925
8926 # Check whether --with-hashed-db or --without-hashed-db was given.
8927 if test "${with_hashed_db+set}" = set; then
8928   withval="$with_hashed_db"
8929
8930 else
8931   with_hashed_db=no
8932 fi;
8933         echo "$as_me:8933: result: $with_hashed_db" >&5
8934 echo "${ECHO_T}$with_hashed_db" >&6
8935 else
8936         with_hashed_db=no
8937 fi
8938
8939 echo "$as_me:8939: checking for list of fallback descriptions" >&5
8940 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8941
8942 # Check whether --with-fallbacks or --without-fallbacks was given.
8943 if test "${with_fallbacks+set}" = set; then
8944   withval="$with_fallbacks"
8945   with_fallback=$withval
8946 else
8947   with_fallback=
8948 fi;
8949 echo "$as_me:8949: result: $with_fallback" >&5
8950 echo "${ECHO_T}$with_fallback" >&6
8951
8952 case ".$with_fallback" in
8953 (.|.no)
8954         FALLBACK_LIST=
8955         ;;
8956 (.yes)
8957         { echo "$as_me:8957: WARNING: expected a list of terminal descriptions" >&5
8958 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8959         ;;
8960 (*)
8961         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8962         ;;
8963 esac
8964
8965 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8966 # tree for generating the terminal descriptions that will be compiled into the
8967 # library.  If your toolchain is old, it may not handle current terminal
8968 # databases.  Use configure-options to point to the tools which will be used,
8969 # rather than the first ones found on the $PATH.
8970 if test -n "$ac_tool_prefix"; then
8971   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8972 set dummy ${ac_tool_prefix}tic; ac_word=$2
8973 echo "$as_me:8973: checking for $ac_word" >&5
8974 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8975 if test "${ac_cv_prog_TIC+set}" = set; then
8976   echo $ECHO_N "(cached) $ECHO_C" >&6
8977 else
8978   if test -n "$TIC"; then
8979   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8980 else
8981   ac_save_IFS=$IFS; IFS=$ac_path_separator
8982 ac_dummy="$PATH"
8983 for ac_dir in $ac_dummy; do
8984   IFS=$ac_save_IFS
8985   test -z "$ac_dir" && ac_dir=.
8986   $as_executable_p "$ac_dir/$ac_word" || continue
8987 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8988 echo "$as_me:8988: found $ac_dir/$ac_word" >&5
8989 break
8990 done
8991
8992 fi
8993 fi
8994 TIC=$ac_cv_prog_TIC
8995 if test -n "$TIC"; then
8996   echo "$as_me:8996: result: $TIC" >&5
8997 echo "${ECHO_T}$TIC" >&6
8998 else
8999   echo "$as_me:8999: result: no" >&5
9000 echo "${ECHO_T}no" >&6
9001 fi
9002
9003 fi
9004 if test -z "$ac_cv_prog_TIC"; then
9005   ac_ct_TIC=$TIC
9006   # Extract the first word of "tic", so it can be a program name with args.
9007 set dummy tic; ac_word=$2
9008 echo "$as_me:9008: checking for $ac_word" >&5
9009 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9010 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9011   echo $ECHO_N "(cached) $ECHO_C" >&6
9012 else
9013   if test -n "$ac_ct_TIC"; then
9014   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9015 else
9016   ac_save_IFS=$IFS; IFS=$ac_path_separator
9017 ac_dummy="$PATH"
9018 for ac_dir in $ac_dummy; do
9019   IFS=$ac_save_IFS
9020   test -z "$ac_dir" && ac_dir=.
9021   $as_executable_p "$ac_dir/$ac_word" || continue
9022 ac_cv_prog_ac_ct_TIC="tic"
9023 echo "$as_me:9023: found $ac_dir/$ac_word" >&5
9024 break
9025 done
9026
9027 fi
9028 fi
9029 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9030 if test -n "$ac_ct_TIC"; then
9031   echo "$as_me:9031: result: $ac_ct_TIC" >&5
9032 echo "${ECHO_T}$ac_ct_TIC" >&6
9033 else
9034   echo "$as_me:9034: result: no" >&5
9035 echo "${ECHO_T}no" >&6
9036 fi
9037
9038   TIC=$ac_ct_TIC
9039 else
9040   TIC="$ac_cv_prog_TIC"
9041 fi
9042
9043 if test -n "$ac_tool_prefix"; then
9044   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9045 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9046 echo "$as_me:9046: checking for $ac_word" >&5
9047 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9048 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9049   echo $ECHO_N "(cached) $ECHO_C" >&6
9050 else
9051   if test -n "$INFOCMP"; then
9052   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9053 else
9054   ac_save_IFS=$IFS; IFS=$ac_path_separator
9055 ac_dummy="$PATH"
9056 for ac_dir in $ac_dummy; do
9057   IFS=$ac_save_IFS
9058   test -z "$ac_dir" && ac_dir=.
9059   $as_executable_p "$ac_dir/$ac_word" || continue
9060 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9061 echo "$as_me:9061: found $ac_dir/$ac_word" >&5
9062 break
9063 done
9064
9065 fi
9066 fi
9067 INFOCMP=$ac_cv_prog_INFOCMP
9068 if test -n "$INFOCMP"; then
9069   echo "$as_me:9069: result: $INFOCMP" >&5
9070 echo "${ECHO_T}$INFOCMP" >&6
9071 else
9072   echo "$as_me:9072: result: no" >&5
9073 echo "${ECHO_T}no" >&6
9074 fi
9075
9076 fi
9077 if test -z "$ac_cv_prog_INFOCMP"; then
9078   ac_ct_INFOCMP=$INFOCMP
9079   # Extract the first word of "infocmp", so it can be a program name with args.
9080 set dummy infocmp; ac_word=$2
9081 echo "$as_me:9081: checking for $ac_word" >&5
9082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9083 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9084   echo $ECHO_N "(cached) $ECHO_C" >&6
9085 else
9086   if test -n "$ac_ct_INFOCMP"; then
9087   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9088 else
9089   ac_save_IFS=$IFS; IFS=$ac_path_separator
9090 ac_dummy="$PATH"
9091 for ac_dir in $ac_dummy; do
9092   IFS=$ac_save_IFS
9093   test -z "$ac_dir" && ac_dir=.
9094   $as_executable_p "$ac_dir/$ac_word" || continue
9095 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9096 echo "$as_me:9096: found $ac_dir/$ac_word" >&5
9097 break
9098 done
9099
9100 fi
9101 fi
9102 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9103 if test -n "$ac_ct_INFOCMP"; then
9104   echo "$as_me:9104: result: $ac_ct_INFOCMP" >&5
9105 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9106 else
9107   echo "$as_me:9107: result: no" >&5
9108 echo "${ECHO_T}no" >&6
9109 fi
9110
9111   INFOCMP=$ac_ct_INFOCMP
9112 else
9113   INFOCMP="$ac_cv_prog_INFOCMP"
9114 fi
9115
9116 if test -n "$FALLBACK_LIST"
9117 then
9118
9119 # Check whether --with-tic-path or --without-tic-path was given.
9120 if test "${with_tic_path+set}" = set; then
9121   withval="$with_tic_path"
9122   echo "$as_me:9122: checking for tic program for fallbacks" >&5
9123 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9124                 TIC=$withval
9125                 echo "$as_me:9125: result: $TIC" >&5
9126 echo "${ECHO_T}$TIC" >&6
9127
9128 if test "x$prefix" != xNONE; then
9129         cf_path_syntax="$prefix"
9130 else
9131         cf_path_syntax="$ac_default_prefix"
9132 fi
9133
9134 case ".$TIC" in
9135 (.\$\(*\)*|.\'*\'*)
9136         ;;
9137 (..|./*|.\\*)
9138         ;;
9139 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9140         ;;
9141 (.\$\{*prefix\}*|.\$\{*dir\}*)
9142         eval TIC="$TIC"
9143         case ".$TIC" in
9144         (.NONE/*)
9145                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9146                 ;;
9147         esac
9148         ;;
9149 (.no|.NONE/*)
9150         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9151         ;;
9152 (*)
9153         { { echo "$as_me:9153: error: expected a pathname, not \"$TIC\"" >&5
9154 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9155    { (exit 1); exit 1; }; }
9156         ;;
9157 esac
9158
9159 else
9160
9161 test -z "$TIC" && TIC="tic"
9162 for ac_prog in $TIC tic
9163 do
9164   # Extract the first word of "$ac_prog", so it can be a program name with args.
9165 set dummy $ac_prog; ac_word=$2
9166 echo "$as_me:9166: checking for $ac_word" >&5
9167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9168 if test "${ac_cv_path_TIC+set}" = set; then
9169   echo $ECHO_N "(cached) $ECHO_C" >&6
9170 else
9171   case $TIC in
9172   [\\/]* | ?:[\\/]*)
9173   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9174   ;;
9175   *)
9176   ac_save_IFS=$IFS; IFS=$ac_path_separator
9177 ac_dummy="$PATH:/usr/local/ncurses/bin"
9178 for ac_dir in $ac_dummy; do
9179   IFS=$ac_save_IFS
9180   test -z "$ac_dir" && ac_dir=.
9181   if $as_executable_p "$ac_dir/$ac_word"; then
9182    ac_cv_path_TIC="$ac_dir/$ac_word"
9183    echo "$as_me:9183: found $ac_dir/$ac_word" >&5
9184    break
9185 fi
9186 done
9187
9188   ;;
9189 esac
9190 fi
9191 TIC=$ac_cv_path_TIC
9192
9193 if test -n "$TIC"; then
9194   echo "$as_me:9194: result: $TIC" >&5
9195 echo "${ECHO_T}$TIC" >&6
9196 else
9197   echo "$as_me:9197: result: no" >&5
9198 echo "${ECHO_T}no" >&6
9199 fi
9200
9201   test -n "$TIC" && break
9202 done
9203 test -n "$TIC" || TIC="$TIC"
9204
9205 cf_path_prog=""
9206 cf_path_args=""
9207 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9208 for cf_temp in $ac_cv_path_TIC
9209 do
9210         if test -z "$cf_path_prog" ; then
9211                 if test "$with_full_paths" = yes ; then
9212
9213 if test "x$prefix" != xNONE; then
9214         cf_path_syntax="$prefix"
9215 else
9216         cf_path_syntax="$ac_default_prefix"
9217 fi
9218
9219 case ".$cf_temp" in
9220 (.\$\(*\)*|.\'*\'*)
9221         ;;
9222 (..|./*|.\\*)
9223         ;;
9224 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9225         ;;
9226 (.\$\{*prefix\}*|.\$\{*dir\}*)
9227         eval cf_temp="$cf_temp"
9228         case ".$cf_temp" in
9229         (.NONE/*)
9230                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9231                 ;;
9232         esac
9233         ;;
9234 (.no|.NONE/*)
9235         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9236         ;;
9237 (*)
9238         break
9239         ;;
9240 esac
9241
9242                         cf_path_prog="$cf_temp"
9243                 else
9244                         cf_path_prog="`basename "$cf_temp"`"
9245                 fi
9246         elif test -z "$cf_path_args" ; then
9247                 cf_path_args="$cf_temp"
9248         else
9249                 cf_path_args="$cf_path_args $cf_temp"
9250         fi
9251 done
9252 IFS="$cf_save_ifs"
9253
9254 if test -n "$cf_path_prog" ; then
9255
9256 echo "${as_me:-configure}:9256: testing defining path for ${cf_path_prog} ..." 1>&5
9257
9258 cat >>confdefs.h <<EOF
9259 #define TIC_PATH "$cf_path_prog"
9260 EOF
9261
9262         test -n "$cf_path_args" &&
9263 cat >>confdefs.h <<EOF
9264 #define TIC_ARGS "$cf_path_args"
9265 EOF
9266
9267 fi
9268
9269                 if test -z "$TIC"
9270                 then
9271                         { echo "$as_me:9271: WARNING: no tic program found for fallbacks" >&5
9272 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9273                 fi
9274
9275 fi;
9276
9277 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9278 if test "${with_infocmp_path+set}" = set; then
9279   withval="$with_infocmp_path"
9280   echo "$as_me:9280: checking for infocmp program for fallbacks" >&5
9281 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9282                 INFOCMP=$withval
9283                 echo "$as_me:9283: result: $INFOCMP" >&5
9284 echo "${ECHO_T}$INFOCMP" >&6
9285
9286 if test "x$prefix" != xNONE; then
9287         cf_path_syntax="$prefix"
9288 else
9289         cf_path_syntax="$ac_default_prefix"
9290 fi
9291
9292 case ".$INFOCMP" in
9293 (.\$\(*\)*|.\'*\'*)
9294         ;;
9295 (..|./*|.\\*)
9296         ;;
9297 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9298         ;;
9299 (.\$\{*prefix\}*|.\$\{*dir\}*)
9300         eval INFOCMP="$INFOCMP"
9301         case ".$INFOCMP" in
9302         (.NONE/*)
9303                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9304                 ;;
9305         esac
9306         ;;
9307 (.no|.NONE/*)
9308         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9309         ;;
9310 (*)
9311         { { echo "$as_me:9311: error: expected a pathname, not \"$INFOCMP\"" >&5
9312 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9313    { (exit 1); exit 1; }; }
9314         ;;
9315 esac
9316
9317 else
9318
9319 test -z "$INFOCMP" && INFOCMP="infocmp"
9320 for ac_prog in $INFOCMP infocmp
9321 do
9322   # Extract the first word of "$ac_prog", so it can be a program name with args.
9323 set dummy $ac_prog; ac_word=$2
9324 echo "$as_me:9324: checking for $ac_word" >&5
9325 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9326 if test "${ac_cv_path_INFOCMP+set}" = set; then
9327   echo $ECHO_N "(cached) $ECHO_C" >&6
9328 else
9329   case $INFOCMP in
9330   [\\/]* | ?:[\\/]*)
9331   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9332   ;;
9333   *)
9334   ac_save_IFS=$IFS; IFS=$ac_path_separator
9335 ac_dummy="$PATH:/usr/local/ncurses/bin"
9336 for ac_dir in $ac_dummy; do
9337   IFS=$ac_save_IFS
9338   test -z "$ac_dir" && ac_dir=.
9339   if $as_executable_p "$ac_dir/$ac_word"; then
9340    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9341    echo "$as_me:9341: found $ac_dir/$ac_word" >&5
9342    break
9343 fi
9344 done
9345
9346   ;;
9347 esac
9348 fi
9349 INFOCMP=$ac_cv_path_INFOCMP
9350
9351 if test -n "$INFOCMP"; then
9352   echo "$as_me:9352: result: $INFOCMP" >&5
9353 echo "${ECHO_T}$INFOCMP" >&6
9354 else
9355   echo "$as_me:9355: result: no" >&5
9356 echo "${ECHO_T}no" >&6
9357 fi
9358
9359   test -n "$INFOCMP" && break
9360 done
9361 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9362
9363 cf_path_prog=""
9364 cf_path_args=""
9365 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9366 for cf_temp in $ac_cv_path_INFOCMP
9367 do
9368         if test -z "$cf_path_prog" ; then
9369                 if test "$with_full_paths" = yes ; then
9370
9371 if test "x$prefix" != xNONE; then
9372         cf_path_syntax="$prefix"
9373 else
9374         cf_path_syntax="$ac_default_prefix"
9375 fi
9376
9377 case ".$cf_temp" in
9378 (.\$\(*\)*|.\'*\'*)
9379         ;;
9380 (..|./*|.\\*)
9381         ;;
9382 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9383         ;;
9384 (.\$\{*prefix\}*|.\$\{*dir\}*)
9385         eval cf_temp="$cf_temp"
9386         case ".$cf_temp" in
9387         (.NONE/*)
9388                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9389                 ;;
9390         esac
9391         ;;
9392 (.no|.NONE/*)
9393         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9394         ;;
9395 (*)
9396         break
9397         ;;
9398 esac
9399
9400                         cf_path_prog="$cf_temp"
9401                 else
9402                         cf_path_prog="`basename "$cf_temp"`"
9403                 fi
9404         elif test -z "$cf_path_args" ; then
9405                 cf_path_args="$cf_temp"
9406         else
9407                 cf_path_args="$cf_path_args $cf_temp"
9408         fi
9409 done
9410 IFS="$cf_save_ifs"
9411
9412 if test -n "$cf_path_prog" ; then
9413
9414 echo "${as_me:-configure}:9414: testing defining path for ${cf_path_prog} ..." 1>&5
9415
9416 cat >>confdefs.h <<EOF
9417 #define INFOCMP_PATH "$cf_path_prog"
9418 EOF
9419
9420         test -n "$cf_path_args" &&
9421 cat >>confdefs.h <<EOF
9422 #define INFOCMP_ARGS "$cf_path_args"
9423 EOF
9424
9425 fi
9426
9427                 if test -z "$INFOCMP"
9428                 then
9429                         { echo "$as_me:9429: WARNING: no infocmp program found for fallbacks" >&5
9430 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9431                 fi
9432
9433 fi;
9434
9435         test -z "$TIC" && FALLBACK_LIST=
9436         test -z "$INFOCMP" && FALLBACK_LIST=
9437         if test -z "$FALLBACK_LIST"
9438         then
9439                 { echo "$as_me:9439: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9440 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9441         fi
9442 fi
9443
9444 USE_FALLBACKS=
9445 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9446
9447 echo "$as_me:9447: checking if you want modern xterm or antique" >&5
9448 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9449
9450 # Check whether --with-xterm-new or --without-xterm-new was given.
9451 if test "${with_xterm_new+set}" = set; then
9452   withval="$with_xterm_new"
9453   with_xterm_new=$withval
9454 else
9455   with_xterm_new=yes
9456 fi;
9457 case "$with_xterm_new" in
9458 (no) with_xterm_new=xterm-old;;
9459 (*)      with_xterm_new=xterm-new;;
9460 esac
9461 echo "$as_me:9461: result: $with_xterm_new" >&5
9462 echo "${ECHO_T}$with_xterm_new" >&6
9463 WHICH_XTERM=$with_xterm_new
9464
9465 case $host_os in
9466 (*linux-gnu|*cygwin|*mingw32|*msys)
9467         want_xterm_kbs=DEL
9468         ;;
9469 (*)
9470         want_xterm_kbs=BS
9471         ;;
9472 esac
9473
9474 echo "$as_me:9474: checking if xterm backspace sends BS or DEL" >&5
9475 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9476
9477 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9478 if test "${with_xterm_kbs+set}" = set; then
9479   withval="$with_xterm_kbs"
9480   with_xterm_kbs=$withval
9481 else
9482   with_xterm_kbs=BS
9483 fi;
9484 case x$with_xterm_kbs in
9485 (xyes|xno|xBS|xbs|x8)
9486         with_xterm_kbs=BS
9487         ;;
9488 (xDEL|xdel|x127)
9489         with_xterm_kbs=DEL
9490         ;;
9491 (*)
9492         with_xterm_kbs=$withval
9493         ;;
9494 esac
9495 echo "$as_me:9495: result: $with_xterm_kbs" >&5
9496 echo "${ECHO_T}$with_xterm_kbs" >&6
9497 XTERM_KBS=$with_xterm_kbs
9498
9499 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9500 then
9501         { echo "$as_me:9501: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&5
9502 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&2;}
9503 fi
9504
9505 MAKE_TERMINFO=
9506 if test "$use_database" = no ; then
9507         TERMINFO="${datadir}/terminfo"
9508         MAKE_TERMINFO="#"
9509 else
9510
9511 echo "$as_me:9511: checking for list of terminfo directories" >&5
9512 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9513
9514 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9515 if test "${with_terminfo_dirs+set}" = set; then
9516   withval="$with_terminfo_dirs"
9517
9518 else
9519   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9520 fi;
9521 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9522 cf_dst_path=
9523 for cf_src_path in $withval
9524 do
9525
9526 if test "x$prefix" != xNONE; then
9527         cf_path_syntax="$prefix"
9528 else
9529         cf_path_syntax="$ac_default_prefix"
9530 fi
9531
9532 case ".$cf_src_path" in
9533 (.\$\(*\)*|.\'*\'*)
9534         ;;
9535 (..|./*|.\\*)
9536         ;;
9537 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9538         ;;
9539 (.\$\{*prefix\}*|.\$\{*dir\}*)
9540         eval cf_src_path="$cf_src_path"
9541         case ".$cf_src_path" in
9542         (.NONE/*)
9543                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9544                 ;;
9545         esac
9546         ;;
9547 (.no|.NONE/*)
9548         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9549         ;;
9550 (*)
9551         { { echo "$as_me:9551: error: expected a pathname, not \"$cf_src_path\"" >&5
9552 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9553    { (exit 1); exit 1; }; }
9554         ;;
9555 esac
9556
9557   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9558   cf_dst_path="${cf_dst_path}${cf_src_path}"
9559 done
9560 IFS="$ac_save_ifs"
9561
9562 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9563 # so we have to check/work around.  We do prefer the result of "eval"...
9564 eval cf_dst_eval="$cf_dst_path"
9565 case "x$cf_dst_eval" in
9566 (xNONE*)
9567         TERMINFO_DIRS=$cf_dst_path
9568         ;;
9569 (*)
9570         TERMINFO_DIRS="$cf_dst_eval"
9571         ;;
9572 esac
9573
9574 echo "$as_me:9574: result: $TERMINFO_DIRS" >&5
9575 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9576 test -n "$TERMINFO_DIRS" &&
9577 cat >>confdefs.h <<EOF
9578 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9579 EOF
9580
9581 case "x$TERMINFO" in
9582 x???:*)
9583         { echo "$as_me:9583: WARNING: ignoring non-directory/file TERMINFO value" >&5
9584 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9585         unset TERMINFO
9586         ;;
9587 esac
9588
9589 echo "$as_me:9589: checking for default terminfo directory" >&5
9590 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9591
9592 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9593 if test "${with_default_terminfo_dir+set}" = set; then
9594   withval="$with_default_terminfo_dir"
9595
9596 else
9597   withval="${TERMINFO:-${datadir}/terminfo}"
9598 fi; if test -n "${datadir}/terminfo" ; then
9599
9600 if test "x$prefix" != xNONE; then
9601         cf_path_syntax="$prefix"
9602 else
9603         cf_path_syntax="$ac_default_prefix"
9604 fi
9605
9606 case ".$withval" in
9607 (.\$\(*\)*|.\'*\'*)
9608         ;;
9609 (..|./*|.\\*)
9610         ;;
9611 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9612         ;;
9613 (.\$\{*prefix\}*|.\$\{*dir\}*)
9614         eval withval="$withval"
9615         case ".$withval" in
9616         (.NONE/*)
9617                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9618                 ;;
9619         esac
9620         ;;
9621 (.no|.NONE/*)
9622         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9623         ;;
9624 (*)
9625         { { echo "$as_me:9625: error: expected a pathname, not \"$withval\"" >&5
9626 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9627    { (exit 1); exit 1; }; }
9628         ;;
9629 esac
9630
9631 fi
9632 eval TERMINFO="$withval"
9633
9634 echo "$as_me:9634: result: $TERMINFO" >&5
9635 echo "${ECHO_T}$TERMINFO" >&6
9636
9637 cat >>confdefs.h <<EOF
9638 #define TERMINFO "$TERMINFO"
9639 EOF
9640
9641 fi
9642
9643 ###     use option --disable-big-core to make tic run on small machines
9644 ###     We need 4Mb, check if we can allocate 50% more than that.
9645 echo "$as_me:9645: checking if big-core option selected" >&5
9646 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9647
9648 # Check whether --enable-big-core or --disable-big-core was given.
9649 if test "${enable_big_core+set}" = set; then
9650   enableval="$enable_big_core"
9651   with_big_core=$enableval
9652 else
9653   if test "$cross_compiling" = yes; then
9654   with_big_core=no
9655 else
9656   cat >"conftest.$ac_ext" <<_ACEOF
9657 #line 9657 "configure"
9658 #include "confdefs.h"
9659
9660 #include <stdlib.h>
9661 #include <string.h>
9662 int main() {
9663         unsigned long n = 6000000L;
9664         char *s = malloc(n);
9665         if (s != 0)
9666                 s[0] = s[n-1] = 0;
9667         ${cf_cv_main_return:-return}(s == 0);
9668 }
9669 _ACEOF
9670 rm -f "conftest$ac_exeext"
9671 if { (eval echo "$as_me:9671: \"$ac_link\"") >&5
9672   (eval $ac_link) 2>&5
9673   ac_status=$?
9674   echo "$as_me:9674: \$? = $ac_status" >&5
9675   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9676   { (eval echo "$as_me:9676: \"$ac_try\"") >&5
9677   (eval $ac_try) 2>&5
9678   ac_status=$?
9679   echo "$as_me:9679: \$? = $ac_status" >&5
9680   (exit "$ac_status"); }; }; then
9681   with_big_core=yes
9682 else
9683   echo "$as_me: program exited with status $ac_status" >&5
9684 echo "$as_me: failed program was:" >&5
9685 cat "conftest.$ac_ext" >&5
9686 with_big_core=no
9687 fi
9688 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9689 fi
9690 fi;
9691 echo "$as_me:9691: result: $with_big_core" >&5
9692 echo "${ECHO_T}$with_big_core" >&6
9693 test "x$with_big_core" = "xyes" &&
9694 cat >>confdefs.h <<\EOF
9695 #define HAVE_BIG_CORE 1
9696 EOF
9697
9698 ### ISO C only guarantees 512-char strings, we have tables which load faster
9699 ### when constructed using "big" strings.  More than the C compiler, the awk
9700 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9701 echo "$as_me:9701: checking if big-strings option selected" >&5
9702 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9703
9704 # Check whether --enable-big-strings or --disable-big-strings was given.
9705 if test "${enable_big_strings+set}" = set; then
9706   enableval="$enable_big_strings"
9707   with_big_strings=$enableval
9708 else
9709
9710         case x$AWK in
9711         (x)
9712                 eval with_big_strings=no
9713                 ;;
9714         (*)
9715                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9716                         | $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
9717                         eval with_big_strings=yes
9718                 else
9719                         eval with_big_strings=no
9720                 fi
9721                 ;;
9722         esac
9723
9724 fi;
9725 echo "$as_me:9725: result: $with_big_strings" >&5
9726 echo "${ECHO_T}$with_big_strings" >&6
9727
9728 USE_BIG_STRINGS=0
9729 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9730
9731 ###     use option --enable-termcap to compile in the termcap fallback support
9732 echo "$as_me:9732: checking if you want termcap-fallback support" >&5
9733 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9734
9735 # Check whether --enable-termcap or --disable-termcap was given.
9736 if test "${enable_termcap+set}" = set; then
9737   enableval="$enable_termcap"
9738   with_termcap=$enableval
9739 else
9740   with_termcap=no
9741 fi;
9742 echo "$as_me:9742: result: $with_termcap" >&5
9743 echo "${ECHO_T}$with_termcap" >&6
9744
9745 NCURSES_USE_TERMCAP=0
9746 if test "x$with_termcap" != "xyes" ; then
9747         if test "$use_database" = no ; then
9748                 if test -z "$with_fallback" ; then
9749                         { { echo "$as_me:9749: error: You have disabled the database w/o specifying fallbacks" >&5
9750 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9751    { (exit 1); exit 1; }; }
9752                 fi
9753         fi
9754
9755 cat >>confdefs.h <<\EOF
9756 #define PURE_TERMINFO 1
9757 EOF
9758
9759 else
9760
9761         if test "$with_ticlib" != no ; then
9762                 { { echo "$as_me:9762: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9763 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9764    { (exit 1); exit 1; }; }
9765         fi
9766
9767         NCURSES_USE_TERMCAP=1
9768         echo "$as_me:9768: checking for list of termcap files" >&5
9769 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9770
9771 # Check whether --with-termpath or --without-termpath was given.
9772 if test "${with_termpath+set}" = set; then
9773   withval="$with_termpath"
9774
9775 else
9776   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9777 fi;
9778 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9779 cf_dst_path=
9780 for cf_src_path in $withval
9781 do
9782
9783 if test "x$prefix" != xNONE; then
9784         cf_path_syntax="$prefix"
9785 else
9786         cf_path_syntax="$ac_default_prefix"
9787 fi
9788
9789 case ".$cf_src_path" in
9790 (.\$\(*\)*|.\'*\'*)
9791         ;;
9792 (..|./*|.\\*)
9793         ;;
9794 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9795         ;;
9796 (.\$\{*prefix\}*|.\$\{*dir\}*)
9797         eval cf_src_path="$cf_src_path"
9798         case ".$cf_src_path" in
9799         (.NONE/*)
9800                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9801                 ;;
9802         esac
9803         ;;
9804 (.no|.NONE/*)
9805         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9806         ;;
9807 (*)
9808         { { echo "$as_me:9808: error: expected a pathname, not \"$cf_src_path\"" >&5
9809 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9810    { (exit 1); exit 1; }; }
9811         ;;
9812 esac
9813
9814   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9815   cf_dst_path="${cf_dst_path}${cf_src_path}"
9816 done
9817 IFS="$ac_save_ifs"
9818
9819 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9820 # so we have to check/work around.  We do prefer the result of "eval"...
9821 eval cf_dst_eval="$cf_dst_path"
9822 case "x$cf_dst_eval" in
9823 (xNONE*)
9824         TERMPATH=$cf_dst_path
9825         ;;
9826 (*)
9827         TERMPATH="$cf_dst_eval"
9828         ;;
9829 esac
9830
9831         echo "$as_me:9831: result: $TERMPATH" >&5
9832 echo "${ECHO_T}$TERMPATH" >&6
9833         test -n "$TERMPATH" &&
9834 cat >>confdefs.h <<EOF
9835 #define TERMPATH "$TERMPATH"
9836 EOF
9837
9838         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9839         echo "$as_me:9839: checking if fast termcap-loader is needed" >&5
9840 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9841
9842 # Check whether --enable-getcap or --disable-getcap was given.
9843 if test "${enable_getcap+set}" = set; then
9844   enableval="$enable_getcap"
9845   with_getcap=$enableval
9846 else
9847   with_getcap=no
9848 fi;
9849         echo "$as_me:9849: result: $with_getcap" >&5
9850 echo "${ECHO_T}$with_getcap" >&6
9851         test "x$with_getcap" = "xyes" &&
9852 cat >>confdefs.h <<\EOF
9853 #define USE_GETCAP 1
9854 EOF
9855
9856         echo "$as_me:9856: checking if translated termcaps will be cached in ~/.terminfo" >&5
9857 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9858
9859 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9860 if test "${enable_getcap_cache+set}" = set; then
9861   enableval="$enable_getcap_cache"
9862   with_getcap_cache=$enableval
9863 else
9864   with_getcap_cache=no
9865 fi;
9866         echo "$as_me:9866: result: $with_getcap_cache" >&5
9867 echo "${ECHO_T}$with_getcap_cache" >&6
9868         test "x$with_getcap_cache" = "xyes" &&
9869 cat >>confdefs.h <<\EOF
9870 #define USE_GETCAP_CACHE 1
9871 EOF
9872
9873 fi
9874
9875 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9876 echo "$as_me:9876: checking if ~/.terminfo is wanted" >&5
9877 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9878
9879 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9880 if test "${enable_home_terminfo+set}" = set; then
9881   enableval="$enable_home_terminfo"
9882   with_home_terminfo=$enableval
9883 else
9884   with_home_terminfo=yes
9885 fi;
9886 echo "$as_me:9886: result: $with_home_terminfo" >&5
9887 echo "${ECHO_T}$with_home_terminfo" >&6
9888 test "x$with_home_terminfo" = "xyes" &&
9889 cat >>confdefs.h <<\EOF
9890 #define USE_HOME_TERMINFO 1
9891 EOF
9892
9893 echo "$as_me:9893: checking if you want to permit root to use ncurses environment variables" >&5
9894 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9895
9896 # Check whether --enable-root-environ or --disable-root-environ was given.
9897 if test "${enable_root_environ+set}" = set; then
9898   enableval="$enable_root_environ"
9899   with_root_environ=$enableval
9900 else
9901   with_root_environ=yes
9902 fi;
9903 echo "$as_me:9903: result: $with_root_environ" >&5
9904 echo "${ECHO_T}$with_root_environ" >&6
9905 test "x$with_root_environ" = xyes &&
9906 cat >>confdefs.h <<\EOF
9907 #define USE_ROOT_ENVIRON 1
9908 EOF
9909
9910 echo "$as_me:9910: checking if you want to permit setuid programs to access all files" >&5
9911 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9912
9913 # Check whether --enable-root-access or --disable-root-access was given.
9914 if test "${enable_root_access+set}" = set; then
9915   enableval="$enable_root_access"
9916   with_root_access=$enableval
9917 else
9918   with_root_access=yes
9919 fi;
9920 echo "$as_me:9920: result: $with_root_access" >&5
9921 echo "${ECHO_T}$with_root_access" >&6
9922 test "x$with_root_access" = xyes &&
9923 cat >>confdefs.h <<\EOF
9924 #define USE_ROOT_ACCESS 1
9925 EOF
9926
9927 echo "$as_me:9927: checking if you want to permit setuid use of ncurses environment variables" >&5
9928 echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
9929
9930 # Check whether --enable-setuid-environ or --disable-setuid-environ was given.
9931 if test "${enable_setuid_environ+set}" = set; then
9932   enableval="$enable_setuid_environ"
9933   with_setuid_environ=$enableval
9934 else
9935   with_setuid_environ=$with_root_environ
9936 fi;
9937 echo "$as_me:9937: result: $with_setuid_environ" >&5
9938 echo "${ECHO_T}$with_setuid_environ" >&6
9939 test "x$with_setuid_environ" = xyes &&
9940 cat >>confdefs.h <<\EOF
9941 #define USE_SETUID_ENVIRON 1
9942 EOF
9943
9944 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9945 ###   to reduce storage requirements for the terminfo database.
9946
9947 for ac_header in \
9948 unistd.h \
9949
9950 do
9951 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9952 echo "$as_me:9952: checking for $ac_header" >&5
9953 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9954 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9955   echo $ECHO_N "(cached) $ECHO_C" >&6
9956 else
9957   cat >"conftest.$ac_ext" <<_ACEOF
9958 #line 9958 "configure"
9959 #include "confdefs.h"
9960 #include <$ac_header>
9961 _ACEOF
9962 if { (eval echo "$as_me:9962: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9963   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9964   ac_status=$?
9965   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9966   rm -f conftest.er1
9967   cat conftest.err >&5
9968   echo "$as_me:9968: \$? = $ac_status" >&5
9969   (exit "$ac_status"); } >/dev/null; then
9970   if test -s conftest.err; then
9971     ac_cpp_err=$ac_c_preproc_warn_flag
9972   else
9973     ac_cpp_err=
9974   fi
9975 else
9976   ac_cpp_err=yes
9977 fi
9978 if test -z "$ac_cpp_err"; then
9979   eval "$as_ac_Header=yes"
9980 else
9981   echo "$as_me: failed program was:" >&5
9982   cat "conftest.$ac_ext" >&5
9983   eval "$as_ac_Header=no"
9984 fi
9985 rm -f conftest.err "conftest.$ac_ext"
9986 fi
9987 echo "$as_me:9987: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9988 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9989 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9990   cat >>confdefs.h <<EOF
9991 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9992 EOF
9993
9994 fi
9995 done
9996
9997 for ac_func in \
9998         remove \
9999         unlink
10000 do
10001 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10002 echo "$as_me:10002: checking for $ac_func" >&5
10003 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10004 if eval "test \"\${$as_ac_var+set}\" = set"; then
10005   echo $ECHO_N "(cached) $ECHO_C" >&6
10006 else
10007   cat >"conftest.$ac_ext" <<_ACEOF
10008 #line 10008 "configure"
10009 #include "confdefs.h"
10010 #define $ac_func autoconf_temporary
10011 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10012 #undef $ac_func
10013
10014 #ifdef __cplusplus
10015 extern "C"
10016 #endif
10017
10018 /* We use char because int might match the return type of a gcc2
10019    builtin and then its argument prototype would still apply.  */
10020 char $ac_func (void);
10021
10022 int
10023 main (void)
10024 {
10025
10026 /* The GNU C library defines stubs for functions which it implements
10027     to always fail with ENOSYS.  Some functions are actually named
10028     something starting with __ and the normal name is an alias.  */
10029 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10030 #error found stub for $ac_func
10031 #endif
10032
10033         return $ac_func ();
10034   ;
10035   return 0;
10036 }
10037 _ACEOF
10038 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10039 if { (eval echo "$as_me:10039: \"$ac_link\"") >&5
10040   (eval $ac_link) 2>&5
10041   ac_status=$?
10042   echo "$as_me:10042: \$? = $ac_status" >&5
10043   (exit "$ac_status"); } &&
10044          { ac_try='test -s "conftest$ac_exeext"'
10045   { (eval echo "$as_me:10045: \"$ac_try\"") >&5
10046   (eval $ac_try) 2>&5
10047   ac_status=$?
10048   echo "$as_me:10048: \$? = $ac_status" >&5
10049   (exit "$ac_status"); }; }; then
10050   eval "$as_ac_var=yes"
10051 else
10052   echo "$as_me: failed program was:" >&5
10053 cat "conftest.$ac_ext" >&5
10054 eval "$as_ac_var=no"
10055 fi
10056 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10057 fi
10058 echo "$as_me:10058: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10059 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10060 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10061   cat >>confdefs.h <<EOF
10062 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10063 EOF
10064
10065 fi
10066 done
10067
10068 if test "$cross_compiling" = yes ; then
10069
10070 for ac_func in \
10071                 link \
10072                 symlink
10073 do
10074 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10075 echo "$as_me:10075: checking for $ac_func" >&5
10076 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10077 if eval "test \"\${$as_ac_var+set}\" = set"; then
10078   echo $ECHO_N "(cached) $ECHO_C" >&6
10079 else
10080   cat >"conftest.$ac_ext" <<_ACEOF
10081 #line 10081 "configure"
10082 #include "confdefs.h"
10083 #define $ac_func autoconf_temporary
10084 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10085 #undef $ac_func
10086
10087 #ifdef __cplusplus
10088 extern "C"
10089 #endif
10090
10091 /* We use char because int might match the return type of a gcc2
10092    builtin and then its argument prototype would still apply.  */
10093 char $ac_func (void);
10094
10095 int
10096 main (void)
10097 {
10098
10099 /* The GNU C library defines stubs for functions which it implements
10100     to always fail with ENOSYS.  Some functions are actually named
10101     something starting with __ and the normal name is an alias.  */
10102 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10103 #error found stub for $ac_func
10104 #endif
10105
10106         return $ac_func ();
10107   ;
10108   return 0;
10109 }
10110 _ACEOF
10111 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10112 if { (eval echo "$as_me:10112: \"$ac_link\"") >&5
10113   (eval $ac_link) 2>&5
10114   ac_status=$?
10115   echo "$as_me:10115: \$? = $ac_status" >&5
10116   (exit "$ac_status"); } &&
10117          { ac_try='test -s "conftest$ac_exeext"'
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   eval "$as_ac_var=yes"
10124 else
10125   echo "$as_me: failed program was:" >&5
10126 cat "conftest.$ac_ext" >&5
10127 eval "$as_ac_var=no"
10128 fi
10129 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10130 fi
10131 echo "$as_me:10131: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10132 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10133 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10134   cat >>confdefs.h <<EOF
10135 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10136 EOF
10137
10138 fi
10139 done
10140
10141 else
10142         echo "$as_me:10142: checking if link/symlink functions work" >&5
10143 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10144 if test "${cf_cv_link_funcs+set}" = set; then
10145   echo $ECHO_N "(cached) $ECHO_C" >&6
10146 else
10147
10148                 cf_cv_link_funcs=
10149                 for cf_func in link symlink ; do
10150                         if test "$cross_compiling" = yes; then
10151
10152                         eval 'ac_cv_func_'$cf_func'=error'
10153 else
10154   cat >"conftest.$ac_ext" <<_ACEOF
10155 #line 10155 "configure"
10156 #include "confdefs.h"
10157
10158 $ac_includes_default
10159
10160 int main(void)
10161 {
10162         int fail = 0;
10163         char *src = "conftest.tmp";
10164         char *dst = "conftest.chk";
10165         struct stat src_sb, dst_sb;
10166         FILE *fp = fopen(src, "w");
10167         if (fp == 0) { fail = 3; } else {
10168                 fclose(fp); stat(src, &src_sb);
10169                 if ($cf_func(src, dst) < 0) {
10170                         fail = 1;
10171                 } else if (stat(dst, &dst_sb) < 0) {
10172                         fail = 2;
10173                 } else {
10174                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10175                         if (diff < 0) diff = -diff;
10176                         if (diff > 2) fail = 3;
10177                 }
10178         }
10179 #ifdef HAVE_UNLINK
10180         unlink(dst); unlink(src);
10181 #else
10182         remove(dst); remove(src);
10183 #endif
10184         ${cf_cv_main_return:-return} (fail);
10185 }
10186
10187 _ACEOF
10188 rm -f "conftest$ac_exeext"
10189 if { (eval echo "$as_me:10189: \"$ac_link\"") >&5
10190   (eval $ac_link) 2>&5
10191   ac_status=$?
10192   echo "$as_me:10192: \$? = $ac_status" >&5
10193   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10194   { (eval echo "$as_me:10194: \"$ac_try\"") >&5
10195   (eval $ac_try) 2>&5
10196   ac_status=$?
10197   echo "$as_me:10197: \$? = $ac_status" >&5
10198   (exit "$ac_status"); }; }; then
10199
10200                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10201                         eval 'ac_cv_func_'$cf_func'=yes'
10202 else
10203   echo "$as_me: program exited with status $ac_status" >&5
10204 echo "$as_me: failed program was:" >&5
10205 cat "conftest.$ac_ext" >&5
10206
10207                         eval 'ac_cv_func_'$cf_func'=no'
10208 fi
10209 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10210 fi
10211                 done
10212                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10213
10214 fi
10215 echo "$as_me:10215: result: $cf_cv_link_funcs" >&5
10216 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10217         test "$ac_cv_func_link"    = yes &&
10218 cat >>confdefs.h <<\EOF
10219 #define HAVE_LINK 1
10220 EOF
10221
10222         test "$ac_cv_func_symlink" = yes &&
10223 cat >>confdefs.h <<\EOF
10224 #define HAVE_SYMLINK 1
10225 EOF
10226
10227 fi
10228
10229 with_links=no
10230 with_symlinks=no
10231
10232 # soft links (symbolic links) are useful for some systems where hard links do
10233 # not work, or to make it simpler to copy terminfo trees around.
10234 if test "x$ac_cv_func_symlink" = xyes ; then
10235         echo "$as_me:10235: checking if tic should use symbolic links" >&5
10236 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10237
10238 # Check whether --enable-symlinks or --disable-symlinks was given.
10239 if test "${enable_symlinks+set}" = set; then
10240   enableval="$enable_symlinks"
10241   with_symlinks=$enableval
10242 else
10243   with_symlinks=no
10244 fi;
10245         echo "$as_me:10245: result: $with_symlinks" >&5
10246 echo "${ECHO_T}$with_symlinks" >&6
10247 fi
10248
10249 # If we have hard links and did not choose to use soft links instead, there is
10250 # no reason to make this choice optional - use the hard links.
10251 if test "$with_symlinks" = no ; then
10252         echo "$as_me:10252: checking if tic should use hard links" >&5
10253 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10254         if test "x$ac_cv_func_link" = xyes ; then
10255                 with_links=yes
10256         else
10257                 with_links=no
10258         fi
10259         echo "$as_me:10259: result: $with_links" >&5
10260 echo "${ECHO_T}$with_links" >&6
10261 fi
10262
10263 test "x$with_links" = xyes &&
10264 cat >>confdefs.h <<\EOF
10265 #define USE_LINKS 1
10266 EOF
10267
10268 test "x$with_symlinks" = xyes &&
10269 cat >>confdefs.h <<\EOF
10270 #define USE_SYMLINKS 1
10271 EOF
10272
10273 ###   use option --enable-broken-linker to force on use of broken-linker support
10274
10275 echo "$as_me:10275: checking if you want broken-linker support code" >&5
10276 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10277
10278 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10279 if test "${enable_broken_linker+set}" = set; then
10280   enableval="$enable_broken_linker"
10281   with_broken_linker=$enableval
10282 else
10283   with_broken_linker=no
10284 fi;
10285 echo "$as_me:10285: result: $with_broken_linker" >&5
10286 echo "${ECHO_T}$with_broken_linker" >&6
10287
10288 : "${BROKEN_LINKER:=0}"
10289 if test "x$with_broken_linker" = xyes ; then
10290
10291 cat >>confdefs.h <<\EOF
10292 #define BROKEN_LINKER 1
10293 EOF
10294
10295         BROKEN_LINKER=1
10296 fi
10297
10298 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10299 echo "$as_me:10299: checking if tputs should process BSD-style prefix padding" >&5
10300 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10301
10302 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10303 if test "${enable_bsdpad+set}" = set; then
10304   enableval="$enable_bsdpad"
10305   with_bsdpad=$enableval
10306 else
10307   with_bsdpad=no
10308 fi;
10309 echo "$as_me:10309: result: $with_bsdpad" >&5
10310 echo "${ECHO_T}$with_bsdpad" >&6
10311 test "x$with_bsdpad" = xyes &&
10312 cat >>confdefs.h <<\EOF
10313 #define BSD_TPUTS 1
10314 EOF
10315
10316 ###   use option --enable-widec to turn on use of wide-character support
10317 NCURSES_CH_T=chtype
10318 NCURSES_LIBUTF8=0
10319
10320 NEED_WCHAR_H=0
10321 NCURSES_MBSTATE_T=0
10322 NCURSES_WCHAR_T=0
10323 NCURSES_WINT_T=0
10324
10325 # Check to define _XOPEN_SOURCE "automatically"
10326 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10327
10328 echo "$as_me:10328: checking if the POSIX test-macros are already defined" >&5
10329 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10330 if test "${cf_cv_posix_visible+set}" = set; then
10331   echo $ECHO_N "(cached) $ECHO_C" >&6
10332 else
10333
10334 cat >"conftest.$ac_ext" <<_ACEOF
10335 #line 10335 "configure"
10336 #include "confdefs.h"
10337 #include <stdio.h>
10338 int
10339 main (void)
10340 {
10341
10342 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10343         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10344         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10345         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10346 #error conflicting symbols found
10347 #endif
10348
10349   ;
10350   return 0;
10351 }
10352 _ACEOF
10353 rm -f "conftest.$ac_objext"
10354 if { (eval echo "$as_me:10354: \"$ac_compile\"") >&5
10355   (eval $ac_compile) 2>&5
10356   ac_status=$?
10357   echo "$as_me:10357: \$? = $ac_status" >&5
10358   (exit "$ac_status"); } &&
10359          { ac_try='test -s "conftest.$ac_objext"'
10360   { (eval echo "$as_me:10360: \"$ac_try\"") >&5
10361   (eval $ac_try) 2>&5
10362   ac_status=$?
10363   echo "$as_me:10363: \$? = $ac_status" >&5
10364   (exit "$ac_status"); }; }; then
10365   cf_cv_posix_visible=no
10366 else
10367   echo "$as_me: failed program was:" >&5
10368 cat "conftest.$ac_ext" >&5
10369 cf_cv_posix_visible=yes
10370 fi
10371 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10372
10373 fi
10374 echo "$as_me:10374: result: $cf_cv_posix_visible" >&5
10375 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10376
10377 if test "$cf_cv_posix_visible" = no; then
10378
10379 cf_XOPEN_SOURCE=600
10380 cf_POSIX_C_SOURCE=199506L
10381 cf_xopen_source=
10382
10383 case "$host_os" in
10384 (aix[4-7]*)
10385         cf_xopen_source="-D_ALL_SOURCE"
10386         ;;
10387 (darwin[0-8].*)
10388         cf_xopen_source="-D_APPLE_C_SOURCE"
10389         ;;
10390 (darwin*)
10391         cf_xopen_source="-D_DARWIN_C_SOURCE"
10392         cf_XOPEN_SOURCE=
10393         ;;
10394 (freebsd*|dragonfly*|midnightbsd*)
10395         # 5.x headers associate
10396         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10397         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10398         cf_POSIX_C_SOURCE=200112L
10399         cf_XOPEN_SOURCE=600
10400         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10401         ;;
10402 (hpux11*)
10403         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10404         ;;
10405 (hpux*)
10406         cf_xopen_source="-D_HPUX_SOURCE"
10407         ;;
10408 (irix[56].*)
10409         cf_xopen_source="-D_SGI_SOURCE"
10410         cf_XOPEN_SOURCE=
10411         ;;
10412 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*)
10413
10414 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10415
10416 echo "$as_me:10416: checking if this is the GNU C library" >&5
10417 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10418 if test "${cf_cv_gnu_library+set}" = set; then
10419   echo $ECHO_N "(cached) $ECHO_C" >&6
10420 else
10421
10422 cat >"conftest.$ac_ext" <<_ACEOF
10423 #line 10423 "configure"
10424 #include "confdefs.h"
10425 #include <sys/types.h>
10426 int
10427 main (void)
10428 {
10429
10430         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10431                 return 0;
10432         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10433                 return 0;
10434         #else
10435         #       error not GNU C library
10436         #endif
10437   ;
10438   return 0;
10439 }
10440 _ACEOF
10441 rm -f "conftest.$ac_objext"
10442 if { (eval echo "$as_me:10442: \"$ac_compile\"") >&5
10443   (eval $ac_compile) 2>&5
10444   ac_status=$?
10445   echo "$as_me:10445: \$? = $ac_status" >&5
10446   (exit "$ac_status"); } &&
10447          { ac_try='test -s "conftest.$ac_objext"'
10448   { (eval echo "$as_me:10448: \"$ac_try\"") >&5
10449   (eval $ac_try) 2>&5
10450   ac_status=$?
10451   echo "$as_me:10451: \$? = $ac_status" >&5
10452   (exit "$ac_status"); }; }; then
10453   cf_cv_gnu_library=yes
10454 else
10455   echo "$as_me: failed program was:" >&5
10456 cat "conftest.$ac_ext" >&5
10457 cf_cv_gnu_library=no
10458 fi
10459 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10460
10461 fi
10462 echo "$as_me:10462: result: $cf_cv_gnu_library" >&5
10463 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10464
10465 if test x$cf_cv_gnu_library = xyes; then
10466
10467         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10468         # was changed to help a little.  newlib incorporated the change about 4
10469         # years later.
10470         echo "$as_me:10470: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10471 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10472 if test "${cf_cv_gnu_library_219+set}" = set; then
10473   echo $ECHO_N "(cached) $ECHO_C" >&6
10474 else
10475
10476                 cf_save="$CPPFLAGS"
10477
10478         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10479         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10480
10481                 cat >"conftest.$ac_ext" <<_ACEOF
10482 #line 10482 "configure"
10483 #include "confdefs.h"
10484 #include <sys/types.h>
10485 int
10486 main (void)
10487 {
10488
10489                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10490                                 return 0;
10491                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10492                                 return 0;
10493                         #else
10494                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10495                         #endif
10496   ;
10497   return 0;
10498 }
10499 _ACEOF
10500 rm -f "conftest.$ac_objext"
10501 if { (eval echo "$as_me:10501: \"$ac_compile\"") >&5
10502   (eval $ac_compile) 2>&5
10503   ac_status=$?
10504   echo "$as_me:10504: \$? = $ac_status" >&5
10505   (exit "$ac_status"); } &&
10506          { ac_try='test -s "conftest.$ac_objext"'
10507   { (eval echo "$as_me:10507: \"$ac_try\"") >&5
10508   (eval $ac_try) 2>&5
10509   ac_status=$?
10510   echo "$as_me:10510: \$? = $ac_status" >&5
10511   (exit "$ac_status"); }; }; then
10512   cf_cv_gnu_library_219=yes
10513 else
10514   echo "$as_me: failed program was:" >&5
10515 cat "conftest.$ac_ext" >&5
10516 cf_cv_gnu_library_219=no
10517 fi
10518 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10519                 CPPFLAGS="$cf_save"
10520
10521 fi
10522 echo "$as_me:10522: result: $cf_cv_gnu_library_219" >&5
10523 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10524
10525         if test "x$cf_cv_gnu_library_219" = xyes; then
10526                 cf_save="$CPPFLAGS"
10527                 echo "$as_me:10527: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10528 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10529 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10530   echo $ECHO_N "(cached) $ECHO_C" >&6
10531 else
10532
10533 cf_fix_cppflags=no
10534 cf_new_cflags=
10535 cf_new_cppflags=
10536 cf_new_extra_cppflags=
10537
10538 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10539 do
10540 case "$cf_fix_cppflags" in
10541 (no)
10542         case "$cf_add_cflags" in
10543         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10544                 case "$cf_add_cflags" in
10545                 (-D*)
10546                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10547
10548                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10549                                 && test -z "${cf_tst_cflags}" \
10550                                 && cf_fix_cppflags=yes
10551
10552                         if test "$cf_fix_cppflags" = yes ; then
10553
10554         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10555         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10556
10557                                 continue
10558                         elif test "${cf_tst_cflags}" = "\"'" ; then
10559
10560         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10561         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10562
10563                                 continue
10564                         fi
10565                         ;;
10566                 esac
10567                 case "$CPPFLAGS" in
10568                 (*$cf_add_cflags)
10569                         ;;
10570                 (*)
10571                         case "$cf_add_cflags" in
10572                         (-D*)
10573                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10574
10575 CPPFLAGS=`echo "$CPPFLAGS" | \
10576         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10577                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10578
10579                                 ;;
10580                         esac
10581
10582         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10583         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10584
10585                         ;;
10586                 esac
10587                 ;;
10588         (*)
10589
10590         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10591         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10592
10593                 ;;
10594         esac
10595         ;;
10596 (yes)
10597
10598         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10599         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10600
10601         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10602
10603         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10604                 && test -z "${cf_tst_cflags}" \
10605                 && cf_fix_cppflags=no
10606         ;;
10607 esac
10608 done
10609
10610 if test -n "$cf_new_cflags" ; then
10611
10612         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10613         CFLAGS="${CFLAGS}$cf_new_cflags"
10614
10615 fi
10616
10617 if test -n "$cf_new_cppflags" ; then
10618
10619         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10620         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10621
10622 fi
10623
10624 if test -n "$cf_new_extra_cppflags" ; then
10625
10626         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10627         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10628
10629 fi
10630
10631                         cat >"conftest.$ac_ext" <<_ACEOF
10632 #line 10632 "configure"
10633 #include "confdefs.h"
10634
10635                                 #include <limits.h>
10636                                 #include <sys/types.h>
10637
10638 int
10639 main (void)
10640 {
10641
10642                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10643                                         return 0;
10644                                 #else
10645                                 #       error GNU C library is too old
10646                                 #endif
10647   ;
10648   return 0;
10649 }
10650 _ACEOF
10651 rm -f "conftest.$ac_objext"
10652 if { (eval echo "$as_me:10652: \"$ac_compile\"") >&5
10653   (eval $ac_compile) 2>&5
10654   ac_status=$?
10655   echo "$as_me:10655: \$? = $ac_status" >&5
10656   (exit "$ac_status"); } &&
10657          { ac_try='test -s "conftest.$ac_objext"'
10658   { (eval echo "$as_me:10658: \"$ac_try\"") >&5
10659   (eval $ac_try) 2>&5
10660   ac_status=$?
10661   echo "$as_me:10661: \$? = $ac_status" >&5
10662   (exit "$ac_status"); }; }; then
10663   cf_cv_gnu_dftsrc_219=yes
10664 else
10665   echo "$as_me: failed program was:" >&5
10666 cat "conftest.$ac_ext" >&5
10667 cf_cv_gnu_dftsrc_219=no
10668 fi
10669 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10670
10671 fi
10672 echo "$as_me:10672: result: $cf_cv_gnu_dftsrc_219" >&5
10673 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10674                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10675         else
10676                 cf_cv_gnu_dftsrc_219=maybe
10677         fi
10678
10679         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10680
10681                 echo "$as_me:10681: checking if we must define _GNU_SOURCE" >&5
10682 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10683 if test "${cf_cv_gnu_source+set}" = set; then
10684   echo $ECHO_N "(cached) $ECHO_C" >&6
10685 else
10686
10687                 cat >"conftest.$ac_ext" <<_ACEOF
10688 #line 10688 "configure"
10689 #include "confdefs.h"
10690 #include <sys/types.h>
10691 int
10692 main (void)
10693 {
10694
10695                         #ifndef _XOPEN_SOURCE
10696                         #error  expected _XOPEN_SOURCE to be defined
10697                         #endif
10698   ;
10699   return 0;
10700 }
10701 _ACEOF
10702 rm -f "conftest.$ac_objext"
10703 if { (eval echo "$as_me:10703: \"$ac_compile\"") >&5
10704   (eval $ac_compile) 2>&5
10705   ac_status=$?
10706   echo "$as_me:10706: \$? = $ac_status" >&5
10707   (exit "$ac_status"); } &&
10708          { ac_try='test -s "conftest.$ac_objext"'
10709   { (eval echo "$as_me:10709: \"$ac_try\"") >&5
10710   (eval $ac_try) 2>&5
10711   ac_status=$?
10712   echo "$as_me:10712: \$? = $ac_status" >&5
10713   (exit "$ac_status"); }; }; then
10714   cf_cv_gnu_source=no
10715 else
10716   echo "$as_me: failed program was:" >&5
10717 cat "conftest.$ac_ext" >&5
10718 cf_save="$CPPFLAGS"
10719
10720 cf_fix_cppflags=no
10721 cf_new_cflags=
10722 cf_new_cppflags=
10723 cf_new_extra_cppflags=
10724
10725 for cf_add_cflags in -D_GNU_SOURCE
10726 do
10727 case "$cf_fix_cppflags" in
10728 (no)
10729         case "$cf_add_cflags" in
10730         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10731                 case "$cf_add_cflags" in
10732                 (-D*)
10733                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10734
10735                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10736                                 && test -z "${cf_tst_cflags}" \
10737                                 && cf_fix_cppflags=yes
10738
10739                         if test "$cf_fix_cppflags" = yes ; then
10740
10741         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10742         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10743
10744                                 continue
10745                         elif test "${cf_tst_cflags}" = "\"'" ; then
10746
10747         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10748         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10749
10750                                 continue
10751                         fi
10752                         ;;
10753                 esac
10754                 case "$CPPFLAGS" in
10755                 (*$cf_add_cflags)
10756                         ;;
10757                 (*)
10758                         case "$cf_add_cflags" in
10759                         (-D*)
10760                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10761
10762 CPPFLAGS=`echo "$CPPFLAGS" | \
10763         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10764                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10765
10766                                 ;;
10767                         esac
10768
10769         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10770         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10771
10772                         ;;
10773                 esac
10774                 ;;
10775         (*)
10776
10777         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10778         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10779
10780                 ;;
10781         esac
10782         ;;
10783 (yes)
10784
10785         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10786         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10787
10788         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10789
10790         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10791                 && test -z "${cf_tst_cflags}" \
10792                 && cf_fix_cppflags=no
10793         ;;
10794 esac
10795 done
10796
10797 if test -n "$cf_new_cflags" ; then
10798
10799         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10800         CFLAGS="${CFLAGS}$cf_new_cflags"
10801
10802 fi
10803
10804 if test -n "$cf_new_cppflags" ; then
10805
10806         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10807         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10808
10809 fi
10810
10811 if test -n "$cf_new_extra_cppflags" ; then
10812
10813         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10814         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10815
10816 fi
10817
10818                          cat >"conftest.$ac_ext" <<_ACEOF
10819 #line 10819 "configure"
10820 #include "confdefs.h"
10821 #include <sys/types.h>
10822 int
10823 main (void)
10824 {
10825
10826                                 #ifdef _XOPEN_SOURCE
10827                                 #error  expected _XOPEN_SOURCE to be undefined
10828                                 #endif
10829   ;
10830   return 0;
10831 }
10832 _ACEOF
10833 rm -f "conftest.$ac_objext"
10834 if { (eval echo "$as_me:10834: \"$ac_compile\"") >&5
10835   (eval $ac_compile) 2>&5
10836   ac_status=$?
10837   echo "$as_me:10837: \$? = $ac_status" >&5
10838   (exit "$ac_status"); } &&
10839          { ac_try='test -s "conftest.$ac_objext"'
10840   { (eval echo "$as_me:10840: \"$ac_try\"") >&5
10841   (eval $ac_try) 2>&5
10842   ac_status=$?
10843   echo "$as_me:10843: \$? = $ac_status" >&5
10844   (exit "$ac_status"); }; }; then
10845   cf_cv_gnu_source=no
10846 else
10847   echo "$as_me: failed program was:" >&5
10848 cat "conftest.$ac_ext" >&5
10849 cf_cv_gnu_source=yes
10850 fi
10851 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10852                         CPPFLAGS="$cf_save"
10853
10854 fi
10855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10856
10857 fi
10858 echo "$as_me:10858: result: $cf_cv_gnu_source" >&5
10859 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10860
10861                 if test "$cf_cv_gnu_source" = yes
10862                 then
10863                 echo "$as_me:10863: checking if we should also define _DEFAULT_SOURCE" >&5
10864 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10865 if test "${cf_cv_default_source+set}" = set; then
10866   echo $ECHO_N "(cached) $ECHO_C" >&6
10867 else
10868
10869         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10870         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10871
10872                         cat >"conftest.$ac_ext" <<_ACEOF
10873 #line 10873 "configure"
10874 #include "confdefs.h"
10875 #include <sys/types.h>
10876 int
10877 main (void)
10878 {
10879
10880                                 #ifdef _DEFAULT_SOURCE
10881                                 #error  expected _DEFAULT_SOURCE to be undefined
10882                                 #endif
10883   ;
10884   return 0;
10885 }
10886 _ACEOF
10887 rm -f "conftest.$ac_objext"
10888 if { (eval echo "$as_me:10888: \"$ac_compile\"") >&5
10889   (eval $ac_compile) 2>&5
10890   ac_status=$?
10891   echo "$as_me:10891: \$? = $ac_status" >&5
10892   (exit "$ac_status"); } &&
10893          { ac_try='test -s "conftest.$ac_objext"'
10894   { (eval echo "$as_me:10894: \"$ac_try\"") >&5
10895   (eval $ac_try) 2>&5
10896   ac_status=$?
10897   echo "$as_me:10897: \$? = $ac_status" >&5
10898   (exit "$ac_status"); }; }; then
10899   cf_cv_default_source=no
10900 else
10901   echo "$as_me: failed program was:" >&5
10902 cat "conftest.$ac_ext" >&5
10903 cf_cv_default_source=yes
10904 fi
10905 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10906
10907 fi
10908 echo "$as_me:10908: result: $cf_cv_default_source" >&5
10909 echo "${ECHO_T}$cf_cv_default_source" >&6
10910                         if test "$cf_cv_default_source" = yes
10911                         then
10912
10913         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10914         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10915
10916                         fi
10917                 fi
10918         fi
10919
10920 fi
10921
10922         ;;
10923 (minix*)
10924         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10925         ;;
10926 (mirbsd*)
10927         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10928         cf_XOPEN_SOURCE=
10929
10930 if test "$cf_cv_posix_visible" = no; then
10931
10932 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10933
10934 cf_save_CFLAGS="$CFLAGS"
10935 cf_save_CPPFLAGS="$CPPFLAGS"
10936
10937 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10938         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10939                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10940
10941 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10942         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10943                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10944
10945 echo "$as_me:10945: checking if we should define _POSIX_C_SOURCE" >&5
10946 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10947 if test "${cf_cv_posix_c_source+set}" = set; then
10948   echo $ECHO_N "(cached) $ECHO_C" >&6
10949 else
10950
10951 echo "${as_me:-configure}:10951: testing if the symbol is already defined go no further ..." 1>&5
10952
10953         cat >"conftest.$ac_ext" <<_ACEOF
10954 #line 10954 "configure"
10955 #include "confdefs.h"
10956 #include <sys/types.h>
10957 int
10958 main (void)
10959 {
10960
10961 #ifndef _POSIX_C_SOURCE
10962 #error _POSIX_C_SOURCE is not defined
10963 #endif
10964   ;
10965   return 0;
10966 }
10967 _ACEOF
10968 rm -f "conftest.$ac_objext"
10969 if { (eval echo "$as_me:10969: \"$ac_compile\"") >&5
10970   (eval $ac_compile) 2>&5
10971   ac_status=$?
10972   echo "$as_me:10972: \$? = $ac_status" >&5
10973   (exit "$ac_status"); } &&
10974          { ac_try='test -s "conftest.$ac_objext"'
10975   { (eval echo "$as_me:10975: \"$ac_try\"") >&5
10976   (eval $ac_try) 2>&5
10977   ac_status=$?
10978   echo "$as_me:10978: \$? = $ac_status" >&5
10979   (exit "$ac_status"); }; }; then
10980   cf_cv_posix_c_source=no
10981 else
10982   echo "$as_me: failed program was:" >&5
10983 cat "conftest.$ac_ext" >&5
10984 cf_want_posix_source=no
10985          case .$cf_POSIX_C_SOURCE in
10986          (.[12]??*)
10987                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10988                 ;;
10989          (.2)
10990                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10991                 cf_want_posix_source=yes
10992                 ;;
10993          (.*)
10994                 cf_want_posix_source=yes
10995                 ;;
10996          esac
10997          if test "$cf_want_posix_source" = yes ; then
10998                 cat >"conftest.$ac_ext" <<_ACEOF
10999 #line 10999 "configure"
11000 #include "confdefs.h"
11001 #include <sys/types.h>
11002 int
11003 main (void)
11004 {
11005
11006 #ifdef _POSIX_SOURCE
11007 #error _POSIX_SOURCE is defined
11008 #endif
11009   ;
11010   return 0;
11011 }
11012 _ACEOF
11013 rm -f "conftest.$ac_objext"
11014 if { (eval echo "$as_me:11014: \"$ac_compile\"") >&5
11015   (eval $ac_compile) 2>&5
11016   ac_status=$?
11017   echo "$as_me:11017: \$? = $ac_status" >&5
11018   (exit "$ac_status"); } &&
11019          { ac_try='test -s "conftest.$ac_objext"'
11020   { (eval echo "$as_me:11020: \"$ac_try\"") >&5
11021   (eval $ac_try) 2>&5
11022   ac_status=$?
11023   echo "$as_me:11023: \$? = $ac_status" >&5
11024   (exit "$ac_status"); }; }; then
11025   :
11026 else
11027   echo "$as_me: failed program was:" >&5
11028 cat "conftest.$ac_ext" >&5
11029 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11030 fi
11031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11032          fi
11033
11034 echo "${as_me:-configure}:11034: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11035
11036          CFLAGS="$cf_trim_CFLAGS"
11037          CPPFLAGS="$cf_trim_CPPFLAGS"
11038
11039         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11040         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11041
11042 echo "${as_me:-configure}:11042: testing if the second compile does not leave our definition intact error ..." 1>&5
11043
11044          cat >"conftest.$ac_ext" <<_ACEOF
11045 #line 11045 "configure"
11046 #include "confdefs.h"
11047 #include <sys/types.h>
11048 int
11049 main (void)
11050 {
11051
11052 #ifndef _POSIX_C_SOURCE
11053 #error _POSIX_C_SOURCE is not defined
11054 #endif
11055   ;
11056   return 0;
11057 }
11058 _ACEOF
11059 rm -f "conftest.$ac_objext"
11060 if { (eval echo "$as_me:11060: \"$ac_compile\"") >&5
11061   (eval $ac_compile) 2>&5
11062   ac_status=$?
11063   echo "$as_me:11063: \$? = $ac_status" >&5
11064   (exit "$ac_status"); } &&
11065          { ac_try='test -s "conftest.$ac_objext"'
11066   { (eval echo "$as_me:11066: \"$ac_try\"") >&5
11067   (eval $ac_try) 2>&5
11068   ac_status=$?
11069   echo "$as_me:11069: \$? = $ac_status" >&5
11070   (exit "$ac_status"); }; }; then
11071   :
11072 else
11073   echo "$as_me: failed program was:" >&5
11074 cat "conftest.$ac_ext" >&5
11075 cf_cv_posix_c_source=no
11076 fi
11077 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11078          CFLAGS="$cf_save_CFLAGS"
11079          CPPFLAGS="$cf_save_CPPFLAGS"
11080
11081 fi
11082 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11083
11084 fi
11085 echo "$as_me:11085: result: $cf_cv_posix_c_source" >&5
11086 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11087
11088 if test "$cf_cv_posix_c_source" != no ; then
11089         CFLAGS="$cf_trim_CFLAGS"
11090         CPPFLAGS="$cf_trim_CPPFLAGS"
11091
11092 cf_fix_cppflags=no
11093 cf_new_cflags=
11094 cf_new_cppflags=
11095 cf_new_extra_cppflags=
11096
11097 for cf_add_cflags in $cf_cv_posix_c_source
11098 do
11099 case "$cf_fix_cppflags" in
11100 (no)
11101         case "$cf_add_cflags" in
11102         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11103                 case "$cf_add_cflags" in
11104                 (-D*)
11105                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11106
11107                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11108                                 && test -z "${cf_tst_cflags}" \
11109                                 && cf_fix_cppflags=yes
11110
11111                         if test "$cf_fix_cppflags" = yes ; then
11112
11113         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11114         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11115
11116                                 continue
11117                         elif test "${cf_tst_cflags}" = "\"'" ; then
11118
11119         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11120         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11121
11122                                 continue
11123                         fi
11124                         ;;
11125                 esac
11126                 case "$CPPFLAGS" in
11127                 (*$cf_add_cflags)
11128                         ;;
11129                 (*)
11130                         case "$cf_add_cflags" in
11131                         (-D*)
11132                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11133
11134 CPPFLAGS=`echo "$CPPFLAGS" | \
11135         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11136                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11137
11138                                 ;;
11139                         esac
11140
11141         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11142         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11143
11144                         ;;
11145                 esac
11146                 ;;
11147         (*)
11148
11149         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11150         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11151
11152                 ;;
11153         esac
11154         ;;
11155 (yes)
11156
11157         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11158         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11159
11160         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11161
11162         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11163                 && test -z "${cf_tst_cflags}" \
11164                 && cf_fix_cppflags=no
11165         ;;
11166 esac
11167 done
11168
11169 if test -n "$cf_new_cflags" ; then
11170
11171         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11172         CFLAGS="${CFLAGS}$cf_new_cflags"
11173
11174 fi
11175
11176 if test -n "$cf_new_cppflags" ; then
11177
11178         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11179         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11180
11181 fi
11182
11183 if test -n "$cf_new_extra_cppflags" ; then
11184
11185         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11186         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11187
11188 fi
11189
11190 fi
11191
11192 fi # cf_cv_posix_visible
11193
11194         ;;
11195 (netbsd*)
11196         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11197         ;;
11198 (openbsd[6-9]*)
11199         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11200         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11201         # Abusing the conformance level is a workaround.
11202         { echo "$as_me:11202: WARNING: this system does not provide usable locale support" >&5
11203 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11204         cf_xopen_source="-D_BSD_SOURCE"
11205         cf_XOPEN_SOURCE=700
11206         ;;
11207 (openbsd[4-5]*)
11208         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11209         cf_xopen_source="-D_BSD_SOURCE"
11210         cf_XOPEN_SOURCE=600
11211         ;;
11212 (openbsd*)
11213         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11214         ;;
11215 (osf[45]*)
11216         cf_xopen_source="-D_OSF_SOURCE"
11217         ;;
11218 (nto-qnx*)
11219         cf_xopen_source="-D_QNX_SOURCE"
11220         ;;
11221 (sco*)
11222         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11223         ;;
11224 (solaris2.*)
11225         cf_xopen_source="-D__EXTENSIONS__"
11226         cf_cv_xopen_source=broken
11227         ;;
11228 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11229         cf_XOPEN_SOURCE=
11230         cf_POSIX_C_SOURCE=
11231         ;;
11232 (*)
11233
11234 echo "$as_me:11234: checking if we should define _XOPEN_SOURCE" >&5
11235 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11236 if test "${cf_cv_xopen_source+set}" = set; then
11237   echo $ECHO_N "(cached) $ECHO_C" >&6
11238 else
11239
11240         cat >"conftest.$ac_ext" <<_ACEOF
11241 #line 11241 "configure"
11242 #include "confdefs.h"
11243
11244 $ac_includes_default
11245
11246 int
11247 main (void)
11248 {
11249
11250 #ifndef _XOPEN_SOURCE
11251 #error _XOPEN_SOURCE is not defined
11252 #endif
11253
11254   ;
11255   return 0;
11256 }
11257 _ACEOF
11258 rm -f "conftest.$ac_objext"
11259 if { (eval echo "$as_me:11259: \"$ac_compile\"") >&5
11260   (eval $ac_compile) 2>&5
11261   ac_status=$?
11262   echo "$as_me:11262: \$? = $ac_status" >&5
11263   (exit "$ac_status"); } &&
11264          { ac_try='test -s "conftest.$ac_objext"'
11265   { (eval echo "$as_me:11265: \"$ac_try\"") >&5
11266   (eval $ac_try) 2>&5
11267   ac_status=$?
11268   echo "$as_me:11268: \$? = $ac_status" >&5
11269   (exit "$ac_status"); }; }; then
11270   cf_cv_xopen_source=no
11271 else
11272   echo "$as_me: failed program was:" >&5
11273 cat "conftest.$ac_ext" >&5
11274 cf_save="$CPPFLAGS"
11275
11276         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11277         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11278
11279          cat >"conftest.$ac_ext" <<_ACEOF
11280 #line 11280 "configure"
11281 #include "confdefs.h"
11282
11283 $ac_includes_default
11284
11285 int
11286 main (void)
11287 {
11288
11289 #ifndef _XOPEN_SOURCE
11290 #error _XOPEN_SOURCE is not defined
11291 #endif
11292
11293   ;
11294   return 0;
11295 }
11296 _ACEOF
11297 rm -f "conftest.$ac_objext"
11298 if { (eval echo "$as_me:11298: \"$ac_compile\"") >&5
11299   (eval $ac_compile) 2>&5
11300   ac_status=$?
11301   echo "$as_me:11301: \$? = $ac_status" >&5
11302   (exit "$ac_status"); } &&
11303          { ac_try='test -s "conftest.$ac_objext"'
11304   { (eval echo "$as_me:11304: \"$ac_try\"") >&5
11305   (eval $ac_try) 2>&5
11306   ac_status=$?
11307   echo "$as_me:11307: \$? = $ac_status" >&5
11308   (exit "$ac_status"); }; }; then
11309   cf_cv_xopen_source=no
11310 else
11311   echo "$as_me: failed program was:" >&5
11312 cat "conftest.$ac_ext" >&5
11313 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11314 fi
11315 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11316                 CPPFLAGS="$cf_save"
11317
11318 fi
11319 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11320
11321 fi
11322 echo "$as_me:11322: result: $cf_cv_xopen_source" >&5
11323 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11324
11325 if test "$cf_cv_xopen_source" != no ; then
11326
11327 CFLAGS=`echo "$CFLAGS" | \
11328         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11329                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11330
11331 CPPFLAGS=`echo "$CPPFLAGS" | \
11332         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11333                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11334
11335         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11336
11337 for cf_add_cflags in $cf_temp_xopen_source
11338 do
11339         case "x$cf_add_cflags" in
11340         (x-[DU]*)
11341
11342 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11343 while true
11344 do
11345         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11346         test "$CFLAGS" != "$cf_old_cflag" || break
11347
11348         CFLAGS="$cf_old_cflag"
11349 done
11350
11351 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11352 while true
11353 do
11354         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11355         test "$CPPFLAGS" != "$cf_old_cflag" || break
11356
11357         CPPFLAGS="$cf_old_cflag"
11358 done
11359
11360                 ;;
11361         esac
11362
11363 cf_fix_cppflags=no
11364 cf_new_cflags=
11365 cf_new_cppflags=
11366 cf_new_extra_cppflags=
11367
11368 for cf_add_cflags in $cf_add_cflags
11369 do
11370 case "$cf_fix_cppflags" in
11371 (no)
11372         case "$cf_add_cflags" in
11373         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11374                 case "$cf_add_cflags" in
11375                 (-D*)
11376                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11377
11378                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11379                                 && test -z "${cf_tst_cflags}" \
11380                                 && cf_fix_cppflags=yes
11381
11382                         if test "$cf_fix_cppflags" = yes ; then
11383
11384         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11385         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11386
11387                                 continue
11388                         elif test "${cf_tst_cflags}" = "\"'" ; then
11389
11390         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11391         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11392
11393                                 continue
11394                         fi
11395                         ;;
11396                 esac
11397                 case "$CPPFLAGS" in
11398                 (*$cf_add_cflags)
11399                         ;;
11400                 (*)
11401                         case "$cf_add_cflags" in
11402                         (-D*)
11403                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11404
11405 CPPFLAGS=`echo "$CPPFLAGS" | \
11406         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11407                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11408
11409                                 ;;
11410                         esac
11411
11412         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11413         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11414
11415                         ;;
11416                 esac
11417                 ;;
11418         (*)
11419
11420         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11421         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11422
11423                 ;;
11424         esac
11425         ;;
11426 (yes)
11427
11428         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11429         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11430
11431         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11432
11433         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11434                 && test -z "${cf_tst_cflags}" \
11435                 && cf_fix_cppflags=no
11436         ;;
11437 esac
11438 done
11439
11440 if test -n "$cf_new_cflags" ; then
11441
11442         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11443         CFLAGS="${CFLAGS}$cf_new_cflags"
11444
11445 fi
11446
11447 if test -n "$cf_new_cppflags" ; then
11448
11449         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11450         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11451
11452 fi
11453
11454 if test -n "$cf_new_extra_cppflags" ; then
11455
11456         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11457         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11458
11459 fi
11460
11461 done
11462
11463 fi
11464
11465         cf_save_xopen_cppflags="$CPPFLAGS"
11466
11467 if test "$cf_cv_posix_visible" = no; then
11468
11469 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11470
11471 cf_save_CFLAGS="$CFLAGS"
11472 cf_save_CPPFLAGS="$CPPFLAGS"
11473
11474 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11475         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11476                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11477
11478 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11479         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11480                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11481
11482 echo "$as_me:11482: checking if we should define _POSIX_C_SOURCE" >&5
11483 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11484 if test "${cf_cv_posix_c_source+set}" = set; then
11485   echo $ECHO_N "(cached) $ECHO_C" >&6
11486 else
11487
11488 echo "${as_me:-configure}:11488: testing if the symbol is already defined go no further ..." 1>&5
11489
11490         cat >"conftest.$ac_ext" <<_ACEOF
11491 #line 11491 "configure"
11492 #include "confdefs.h"
11493 #include <sys/types.h>
11494 int
11495 main (void)
11496 {
11497
11498 #ifndef _POSIX_C_SOURCE
11499 #error _POSIX_C_SOURCE is not defined
11500 #endif
11501   ;
11502   return 0;
11503 }
11504 _ACEOF
11505 rm -f "conftest.$ac_objext"
11506 if { (eval echo "$as_me:11506: \"$ac_compile\"") >&5
11507   (eval $ac_compile) 2>&5
11508   ac_status=$?
11509   echo "$as_me:11509: \$? = $ac_status" >&5
11510   (exit "$ac_status"); } &&
11511          { ac_try='test -s "conftest.$ac_objext"'
11512   { (eval echo "$as_me:11512: \"$ac_try\"") >&5
11513   (eval $ac_try) 2>&5
11514   ac_status=$?
11515   echo "$as_me:11515: \$? = $ac_status" >&5
11516   (exit "$ac_status"); }; }; then
11517   cf_cv_posix_c_source=no
11518 else
11519   echo "$as_me: failed program was:" >&5
11520 cat "conftest.$ac_ext" >&5
11521 cf_want_posix_source=no
11522          case .$cf_POSIX_C_SOURCE in
11523          (.[12]??*)
11524                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11525                 ;;
11526          (.2)
11527                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11528                 cf_want_posix_source=yes
11529                 ;;
11530          (.*)
11531                 cf_want_posix_source=yes
11532                 ;;
11533          esac
11534          if test "$cf_want_posix_source" = yes ; then
11535                 cat >"conftest.$ac_ext" <<_ACEOF
11536 #line 11536 "configure"
11537 #include "confdefs.h"
11538 #include <sys/types.h>
11539 int
11540 main (void)
11541 {
11542
11543 #ifdef _POSIX_SOURCE
11544 #error _POSIX_SOURCE is defined
11545 #endif
11546   ;
11547   return 0;
11548 }
11549 _ACEOF
11550 rm -f "conftest.$ac_objext"
11551 if { (eval echo "$as_me:11551: \"$ac_compile\"") >&5
11552   (eval $ac_compile) 2>&5
11553   ac_status=$?
11554   echo "$as_me:11554: \$? = $ac_status" >&5
11555   (exit "$ac_status"); } &&
11556          { ac_try='test -s "conftest.$ac_objext"'
11557   { (eval echo "$as_me:11557: \"$ac_try\"") >&5
11558   (eval $ac_try) 2>&5
11559   ac_status=$?
11560   echo "$as_me:11560: \$? = $ac_status" >&5
11561   (exit "$ac_status"); }; }; then
11562   :
11563 else
11564   echo "$as_me: failed program was:" >&5
11565 cat "conftest.$ac_ext" >&5
11566 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11567 fi
11568 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11569          fi
11570
11571 echo "${as_me:-configure}:11571: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11572
11573          CFLAGS="$cf_trim_CFLAGS"
11574          CPPFLAGS="$cf_trim_CPPFLAGS"
11575
11576         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11577         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11578
11579 echo "${as_me:-configure}:11579: testing if the second compile does not leave our definition intact error ..." 1>&5
11580
11581          cat >"conftest.$ac_ext" <<_ACEOF
11582 #line 11582 "configure"
11583 #include "confdefs.h"
11584 #include <sys/types.h>
11585 int
11586 main (void)
11587 {
11588
11589 #ifndef _POSIX_C_SOURCE
11590 #error _POSIX_C_SOURCE is not defined
11591 #endif
11592   ;
11593   return 0;
11594 }
11595 _ACEOF
11596 rm -f "conftest.$ac_objext"
11597 if { (eval echo "$as_me:11597: \"$ac_compile\"") >&5
11598   (eval $ac_compile) 2>&5
11599   ac_status=$?
11600   echo "$as_me:11600: \$? = $ac_status" >&5
11601   (exit "$ac_status"); } &&
11602          { ac_try='test -s "conftest.$ac_objext"'
11603   { (eval echo "$as_me:11603: \"$ac_try\"") >&5
11604   (eval $ac_try) 2>&5
11605   ac_status=$?
11606   echo "$as_me:11606: \$? = $ac_status" >&5
11607   (exit "$ac_status"); }; }; then
11608   :
11609 else
11610   echo "$as_me: failed program was:" >&5
11611 cat "conftest.$ac_ext" >&5
11612 cf_cv_posix_c_source=no
11613 fi
11614 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11615          CFLAGS="$cf_save_CFLAGS"
11616          CPPFLAGS="$cf_save_CPPFLAGS"
11617
11618 fi
11619 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11620
11621 fi
11622 echo "$as_me:11622: result: $cf_cv_posix_c_source" >&5
11623 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11624
11625 if test "$cf_cv_posix_c_source" != no ; then
11626         CFLAGS="$cf_trim_CFLAGS"
11627         CPPFLAGS="$cf_trim_CPPFLAGS"
11628
11629 cf_fix_cppflags=no
11630 cf_new_cflags=
11631 cf_new_cppflags=
11632 cf_new_extra_cppflags=
11633
11634 for cf_add_cflags in $cf_cv_posix_c_source
11635 do
11636 case "$cf_fix_cppflags" in
11637 (no)
11638         case "$cf_add_cflags" in
11639         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11640                 case "$cf_add_cflags" in
11641                 (-D*)
11642                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11643
11644                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11645                                 && test -z "${cf_tst_cflags}" \
11646                                 && cf_fix_cppflags=yes
11647
11648                         if test "$cf_fix_cppflags" = yes ; then
11649
11650         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11651         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11652
11653                                 continue
11654                         elif test "${cf_tst_cflags}" = "\"'" ; then
11655
11656         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11657         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11658
11659                                 continue
11660                         fi
11661                         ;;
11662                 esac
11663                 case "$CPPFLAGS" in
11664                 (*$cf_add_cflags)
11665                         ;;
11666                 (*)
11667                         case "$cf_add_cflags" in
11668                         (-D*)
11669                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11670
11671 CPPFLAGS=`echo "$CPPFLAGS" | \
11672         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11673                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11674
11675                                 ;;
11676                         esac
11677
11678         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11679         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11680
11681                         ;;
11682                 esac
11683                 ;;
11684         (*)
11685
11686         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11687         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11688
11689                 ;;
11690         esac
11691         ;;
11692 (yes)
11693
11694         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11695         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11696
11697         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11698
11699         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11700                 && test -z "${cf_tst_cflags}" \
11701                 && cf_fix_cppflags=no
11702         ;;
11703 esac
11704 done
11705
11706 if test -n "$cf_new_cflags" ; then
11707
11708         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11709         CFLAGS="${CFLAGS}$cf_new_cflags"
11710
11711 fi
11712
11713 if test -n "$cf_new_cppflags" ; then
11714
11715         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11716         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11717
11718 fi
11719
11720 if test -n "$cf_new_extra_cppflags" ; then
11721
11722         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11723         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11724
11725 fi
11726
11727 fi
11728
11729 fi # cf_cv_posix_visible
11730
11731         # Some of these niche implementations use copy/paste, double-check...
11732         if test "$cf_cv_xopen_source" = no ; then
11733                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
11734
11735 echo "${as_me:-configure}:11735: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
11736
11737                 cat >"conftest.$ac_ext" <<_ACEOF
11738 #line 11738 "configure"
11739 #include "confdefs.h"
11740
11741 $ac_includes_default
11742
11743 int
11744 main (void)
11745 {
11746
11747 #ifndef _XOPEN_SOURCE
11748 #error _XOPEN_SOURCE is not defined
11749 #endif
11750
11751   ;
11752   return 0;
11753 }
11754 _ACEOF
11755 rm -f "conftest.$ac_objext"
11756 if { (eval echo "$as_me:11756: \"$ac_compile\"") >&5
11757   (eval $ac_compile) 2>&5
11758   ac_status=$?
11759   echo "$as_me:11759: \$? = $ac_status" >&5
11760   (exit "$ac_status"); } &&
11761          { ac_try='test -s "conftest.$ac_objext"'
11762   { (eval echo "$as_me:11762: \"$ac_try\"") >&5
11763   (eval $ac_try) 2>&5
11764   ac_status=$?
11765   echo "$as_me:11765: \$? = $ac_status" >&5
11766   (exit "$ac_status"); }; }; then
11767   :
11768 else
11769   echo "$as_me: failed program was:" >&5
11770 cat "conftest.$ac_ext" >&5
11771
11772                         { echo "$as_me:11772: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11773 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11774                         CPPFLAGS="$cf_save_xopen_cppflags"
11775 fi
11776 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11777         fi
11778         ;;
11779 esac
11780
11781 if test -n "$cf_xopen_source" ; then
11782
11783 for cf_add_cflags in $cf_xopen_source
11784 do
11785         case "x$cf_add_cflags" in
11786         (x-[DU]*)
11787
11788 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11789 while true
11790 do
11791         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11792         test "$CFLAGS" != "$cf_old_cflag" || break
11793         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11794
11795 echo "${as_me:-configure}:11795: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11796
11797         CFLAGS="$cf_old_cflag"
11798 done
11799
11800 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11801 while true
11802 do
11803         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11804         test "$CPPFLAGS" != "$cf_old_cflag" || break
11805         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11806
11807 echo "${as_me:-configure}:11807: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11808
11809         CPPFLAGS="$cf_old_cflag"
11810 done
11811
11812                 ;;
11813         esac
11814
11815 cf_fix_cppflags=no
11816 cf_new_cflags=
11817 cf_new_cppflags=
11818 cf_new_extra_cppflags=
11819
11820 for cf_add_cflags in $cf_add_cflags
11821 do
11822 case "$cf_fix_cppflags" in
11823 (no)
11824         case "$cf_add_cflags" in
11825         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11826                 case "$cf_add_cflags" in
11827                 (-D*)
11828                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11829
11830                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11831                                 && test -z "${cf_tst_cflags}" \
11832                                 && cf_fix_cppflags=yes
11833
11834                         if test "$cf_fix_cppflags" = yes ; then
11835
11836         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11837         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11838
11839                                 continue
11840                         elif test "${cf_tst_cflags}" = "\"'" ; then
11841
11842         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11843         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11844
11845                                 continue
11846                         fi
11847                         ;;
11848                 esac
11849                 case "$CPPFLAGS" in
11850                 (*$cf_add_cflags)
11851                         ;;
11852                 (*)
11853                         case "$cf_add_cflags" in
11854                         (-D*)
11855                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11856
11857 CPPFLAGS=`echo "$CPPFLAGS" | \
11858         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11859                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11860
11861                                 ;;
11862                         esac
11863
11864         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11865         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11866
11867                         ;;
11868                 esac
11869                 ;;
11870         (*)
11871
11872         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11873         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11874
11875                 ;;
11876         esac
11877         ;;
11878 (yes)
11879
11880         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11881         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11882
11883         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11884
11885         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11886                 && test -z "${cf_tst_cflags}" \
11887                 && cf_fix_cppflags=no
11888         ;;
11889 esac
11890 done
11891
11892 if test -n "$cf_new_cflags" ; then
11893         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11894
11895 echo "${as_me:-configure}:11895: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11896
11897         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11898         CFLAGS="${CFLAGS}$cf_new_cflags"
11899
11900 fi
11901
11902 if test -n "$cf_new_cppflags" ; then
11903         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11904
11905 echo "${as_me:-configure}:11905: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11906
11907         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11908         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11909
11910 fi
11911
11912 if test -n "$cf_new_extra_cppflags" ; then
11913         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11914
11915 echo "${as_me:-configure}:11915: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11916
11917         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11918         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11919
11920 fi
11921
11922 done
11923
11924 fi
11925
11926 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11927         echo "$as_me:11927: checking if _XOPEN_SOURCE really is set" >&5
11928 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11929         cat >"conftest.$ac_ext" <<_ACEOF
11930 #line 11930 "configure"
11931 #include "confdefs.h"
11932 #include <stdlib.h>
11933 int
11934 main (void)
11935 {
11936
11937 #ifndef _XOPEN_SOURCE
11938 #error _XOPEN_SOURCE is not defined
11939 #endif
11940   ;
11941   return 0;
11942 }
11943 _ACEOF
11944 rm -f "conftest.$ac_objext"
11945 if { (eval echo "$as_me:11945: \"$ac_compile\"") >&5
11946   (eval $ac_compile) 2>&5
11947   ac_status=$?
11948   echo "$as_me:11948: \$? = $ac_status" >&5
11949   (exit "$ac_status"); } &&
11950          { ac_try='test -s "conftest.$ac_objext"'
11951   { (eval echo "$as_me:11951: \"$ac_try\"") >&5
11952   (eval $ac_try) 2>&5
11953   ac_status=$?
11954   echo "$as_me:11954: \$? = $ac_status" >&5
11955   (exit "$ac_status"); }; }; then
11956   cf_XOPEN_SOURCE_set=yes
11957 else
11958   echo "$as_me: failed program was:" >&5
11959 cat "conftest.$ac_ext" >&5
11960 cf_XOPEN_SOURCE_set=no
11961 fi
11962 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11963         echo "$as_me:11963: result: $cf_XOPEN_SOURCE_set" >&5
11964 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11965         if test "$cf_XOPEN_SOURCE_set" = yes
11966         then
11967                 cat >"conftest.$ac_ext" <<_ACEOF
11968 #line 11968 "configure"
11969 #include "confdefs.h"
11970 #include <stdlib.h>
11971 int
11972 main (void)
11973 {
11974
11975 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11976 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11977 #endif
11978   ;
11979   return 0;
11980 }
11981 _ACEOF
11982 rm -f "conftest.$ac_objext"
11983 if { (eval echo "$as_me:11983: \"$ac_compile\"") >&5
11984   (eval $ac_compile) 2>&5
11985   ac_status=$?
11986   echo "$as_me:11986: \$? = $ac_status" >&5
11987   (exit "$ac_status"); } &&
11988          { ac_try='test -s "conftest.$ac_objext"'
11989   { (eval echo "$as_me:11989: \"$ac_try\"") >&5
11990   (eval $ac_try) 2>&5
11991   ac_status=$?
11992   echo "$as_me:11992: \$? = $ac_status" >&5
11993   (exit "$ac_status"); }; }; then
11994   cf_XOPEN_SOURCE_set_ok=yes
11995 else
11996   echo "$as_me: failed program was:" >&5
11997 cat "conftest.$ac_ext" >&5
11998 cf_XOPEN_SOURCE_set_ok=no
11999 fi
12000 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12001                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12002                 then
12003                         { echo "$as_me:12003: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12004 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12005                 fi
12006         else
12007
12008 echo "$as_me:12008: checking if we should define _XOPEN_SOURCE" >&5
12009 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12010 if test "${cf_cv_xopen_source+set}" = set; then
12011   echo $ECHO_N "(cached) $ECHO_C" >&6
12012 else
12013
12014         cat >"conftest.$ac_ext" <<_ACEOF
12015 #line 12015 "configure"
12016 #include "confdefs.h"
12017
12018 $ac_includes_default
12019
12020 int
12021 main (void)
12022 {
12023
12024 #ifndef _XOPEN_SOURCE
12025 #error _XOPEN_SOURCE is not defined
12026 #endif
12027
12028   ;
12029   return 0;
12030 }
12031 _ACEOF
12032 rm -f "conftest.$ac_objext"
12033 if { (eval echo "$as_me:12033: \"$ac_compile\"") >&5
12034   (eval $ac_compile) 2>&5
12035   ac_status=$?
12036   echo "$as_me:12036: \$? = $ac_status" >&5
12037   (exit "$ac_status"); } &&
12038          { ac_try='test -s "conftest.$ac_objext"'
12039   { (eval echo "$as_me:12039: \"$ac_try\"") >&5
12040   (eval $ac_try) 2>&5
12041   ac_status=$?
12042   echo "$as_me:12042: \$? = $ac_status" >&5
12043   (exit "$ac_status"); }; }; then
12044   cf_cv_xopen_source=no
12045 else
12046   echo "$as_me: failed program was:" >&5
12047 cat "conftest.$ac_ext" >&5
12048 cf_save="$CPPFLAGS"
12049
12050         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12051         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12052
12053          cat >"conftest.$ac_ext" <<_ACEOF
12054 #line 12054 "configure"
12055 #include "confdefs.h"
12056
12057 $ac_includes_default
12058
12059 int
12060 main (void)
12061 {
12062
12063 #ifndef _XOPEN_SOURCE
12064 #error _XOPEN_SOURCE is not defined
12065 #endif
12066
12067   ;
12068   return 0;
12069 }
12070 _ACEOF
12071 rm -f "conftest.$ac_objext"
12072 if { (eval echo "$as_me:12072: \"$ac_compile\"") >&5
12073   (eval $ac_compile) 2>&5
12074   ac_status=$?
12075   echo "$as_me:12075: \$? = $ac_status" >&5
12076   (exit "$ac_status"); } &&
12077          { ac_try='test -s "conftest.$ac_objext"'
12078   { (eval echo "$as_me:12078: \"$ac_try\"") >&5
12079   (eval $ac_try) 2>&5
12080   ac_status=$?
12081   echo "$as_me:12081: \$? = $ac_status" >&5
12082   (exit "$ac_status"); }; }; then
12083   cf_cv_xopen_source=no
12084 else
12085   echo "$as_me: failed program was:" >&5
12086 cat "conftest.$ac_ext" >&5
12087 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12088 fi
12089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12090                 CPPFLAGS="$cf_save"
12091
12092 fi
12093 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12094
12095 fi
12096 echo "$as_me:12096: result: $cf_cv_xopen_source" >&5
12097 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12098
12099 if test "$cf_cv_xopen_source" != no ; then
12100
12101 CFLAGS=`echo "$CFLAGS" | \
12102         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12103                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12104
12105 CPPFLAGS=`echo "$CPPFLAGS" | \
12106         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12107                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12108
12109         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12110
12111 for cf_add_cflags in $cf_temp_xopen_source
12112 do
12113         case "x$cf_add_cflags" in
12114         (x-[DU]*)
12115
12116 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12117 while true
12118 do
12119         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12120         test "$CFLAGS" != "$cf_old_cflag" || break
12121
12122         CFLAGS="$cf_old_cflag"
12123 done
12124
12125 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12126 while true
12127 do
12128         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12129         test "$CPPFLAGS" != "$cf_old_cflag" || break
12130
12131         CPPFLAGS="$cf_old_cflag"
12132 done
12133
12134                 ;;
12135         esac
12136
12137 cf_fix_cppflags=no
12138 cf_new_cflags=
12139 cf_new_cppflags=
12140 cf_new_extra_cppflags=
12141
12142 for cf_add_cflags in $cf_add_cflags
12143 do
12144 case "$cf_fix_cppflags" in
12145 (no)
12146         case "$cf_add_cflags" in
12147         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12148                 case "$cf_add_cflags" in
12149                 (-D*)
12150                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12151
12152                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12153                                 && test -z "${cf_tst_cflags}" \
12154                                 && cf_fix_cppflags=yes
12155
12156                         if test "$cf_fix_cppflags" = yes ; then
12157
12158         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12159         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12160
12161                                 continue
12162                         elif test "${cf_tst_cflags}" = "\"'" ; then
12163
12164         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12165         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12166
12167                                 continue
12168                         fi
12169                         ;;
12170                 esac
12171                 case "$CPPFLAGS" in
12172                 (*$cf_add_cflags)
12173                         ;;
12174                 (*)
12175                         case "$cf_add_cflags" in
12176                         (-D*)
12177                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12178
12179 CPPFLAGS=`echo "$CPPFLAGS" | \
12180         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12181                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12182
12183                                 ;;
12184                         esac
12185
12186         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12187         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12188
12189                         ;;
12190                 esac
12191                 ;;
12192         (*)
12193
12194         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12195         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12196
12197                 ;;
12198         esac
12199         ;;
12200 (yes)
12201
12202         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12203         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12204
12205         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12206
12207         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12208                 && test -z "${cf_tst_cflags}" \
12209                 && cf_fix_cppflags=no
12210         ;;
12211 esac
12212 done
12213
12214 if test -n "$cf_new_cflags" ; then
12215
12216         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12217         CFLAGS="${CFLAGS}$cf_new_cflags"
12218
12219 fi
12220
12221 if test -n "$cf_new_cppflags" ; then
12222
12223         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12224         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12225
12226 fi
12227
12228 if test -n "$cf_new_extra_cppflags" ; then
12229
12230         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12231         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12232
12233 fi
12234
12235 done
12236
12237 fi
12238
12239         fi
12240 fi
12241 fi # cf_cv_posix_visible
12242
12243 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12244
12245 # Work around breakage on OS X
12246
12247 echo "$as_me:12247: checking if SIGWINCH is defined" >&5
12248 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12249 if test "${cf_cv_define_sigwinch+set}" = set; then
12250   echo $ECHO_N "(cached) $ECHO_C" >&6
12251 else
12252
12253         cat >"conftest.$ac_ext" <<_ACEOF
12254 #line 12254 "configure"
12255 #include "confdefs.h"
12256
12257 #include <sys/types.h>
12258 #include <sys/signal.h>
12259
12260 int
12261 main (void)
12262 {
12263 int x = SIGWINCH; (void)x
12264   ;
12265   return 0;
12266 }
12267 _ACEOF
12268 rm -f "conftest.$ac_objext"
12269 if { (eval echo "$as_me:12269: \"$ac_compile\"") >&5
12270   (eval $ac_compile) 2>&5
12271   ac_status=$?
12272   echo "$as_me:12272: \$? = $ac_status" >&5
12273   (exit "$ac_status"); } &&
12274          { ac_try='test -s "conftest.$ac_objext"'
12275   { (eval echo "$as_me:12275: \"$ac_try\"") >&5
12276   (eval $ac_try) 2>&5
12277   ac_status=$?
12278   echo "$as_me:12278: \$? = $ac_status" >&5
12279   (exit "$ac_status"); }; }; then
12280   cf_cv_define_sigwinch=yes
12281 else
12282   echo "$as_me: failed program was:" >&5
12283 cat "conftest.$ac_ext" >&5
12284 cat >"conftest.$ac_ext" <<_ACEOF
12285 #line 12285 "configure"
12286 #include "confdefs.h"
12287
12288 #undef _XOPEN_SOURCE
12289 #undef _POSIX_SOURCE
12290 #undef _POSIX_C_SOURCE
12291 #include <sys/types.h>
12292 #include <sys/signal.h>
12293
12294 int
12295 main (void)
12296 {
12297 int x = SIGWINCH; (void)x
12298   ;
12299   return 0;
12300 }
12301 _ACEOF
12302 rm -f "conftest.$ac_objext"
12303 if { (eval echo "$as_me:12303: \"$ac_compile\"") >&5
12304   (eval $ac_compile) 2>&5
12305   ac_status=$?
12306   echo "$as_me:12306: \$? = $ac_status" >&5
12307   (exit "$ac_status"); } &&
12308          { ac_try='test -s "conftest.$ac_objext"'
12309   { (eval echo "$as_me:12309: \"$ac_try\"") >&5
12310   (eval $ac_try) 2>&5
12311   ac_status=$?
12312   echo "$as_me:12312: \$? = $ac_status" >&5
12313   (exit "$ac_status"); }; }; then
12314   cf_cv_define_sigwinch=maybe
12315 else
12316   echo "$as_me: failed program was:" >&5
12317 cat "conftest.$ac_ext" >&5
12318 cf_cv_define_sigwinch=no
12319 fi
12320 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12321
12322 fi
12323 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12324
12325 fi
12326 echo "$as_me:12326: result: $cf_cv_define_sigwinch" >&5
12327 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12328
12329 if test "$cf_cv_define_sigwinch" = maybe ; then
12330 echo "$as_me:12330: checking for actual SIGWINCH definition" >&5
12331 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12332 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12333   echo $ECHO_N "(cached) $ECHO_C" >&6
12334 else
12335
12336 cf_cv_fixup_sigwinch=unknown
12337 cf_sigwinch=32
12338 while test "$cf_sigwinch" != 1
12339 do
12340         cat >"conftest.$ac_ext" <<_ACEOF
12341 #line 12341 "configure"
12342 #include "confdefs.h"
12343
12344 #undef _XOPEN_SOURCE
12345 #undef _POSIX_SOURCE
12346 #undef _POSIX_C_SOURCE
12347 #include <sys/types.h>
12348 #include <sys/signal.h>
12349
12350 int
12351 main (void)
12352 {
12353
12354 #if SIGWINCH != $cf_sigwinch
12355 #error SIGWINCH is not $cf_sigwinch
12356 #endif
12357 int x = SIGWINCH; (void)x
12358   ;
12359   return 0;
12360 }
12361 _ACEOF
12362 rm -f "conftest.$ac_objext"
12363 if { (eval echo "$as_me:12363: \"$ac_compile\"") >&5
12364   (eval $ac_compile) 2>&5
12365   ac_status=$?
12366   echo "$as_me:12366: \$? = $ac_status" >&5
12367   (exit "$ac_status"); } &&
12368          { ac_try='test -s "conftest.$ac_objext"'
12369   { (eval echo "$as_me:12369: \"$ac_try\"") >&5
12370   (eval $ac_try) 2>&5
12371   ac_status=$?
12372   echo "$as_me:12372: \$? = $ac_status" >&5
12373   (exit "$ac_status"); }; }; then
12374   cf_cv_fixup_sigwinch=$cf_sigwinch
12375          break
12376 else
12377   echo "$as_me: failed program was:" >&5
12378 cat "conftest.$ac_ext" >&5
12379 fi
12380 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12381
12382 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12383 done
12384
12385 fi
12386 echo "$as_me:12386: result: $cf_cv_fixup_sigwinch" >&5
12387 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12388
12389         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12390                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12391         fi
12392 fi
12393
12394 # Checks for CODESET support.
12395
12396 echo "$as_me:12396: checking for nl_langinfo and CODESET" >&5
12397 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12398 if test "${am_cv_langinfo_codeset+set}" = set; then
12399   echo $ECHO_N "(cached) $ECHO_C" >&6
12400 else
12401   cat >"conftest.$ac_ext" <<_ACEOF
12402 #line 12402 "configure"
12403 #include "confdefs.h"
12404
12405 $ac_includes_default
12406 #include <langinfo.h>
12407 int
12408 main (void)
12409 {
12410 char* cs = nl_langinfo(CODESET); (void)cs
12411   ;
12412   return 0;
12413 }
12414 _ACEOF
12415 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12416 if { (eval echo "$as_me:12416: \"$ac_link\"") >&5
12417   (eval $ac_link) 2>&5
12418   ac_status=$?
12419   echo "$as_me:12419: \$? = $ac_status" >&5
12420   (exit "$ac_status"); } &&
12421          { ac_try='test -s "conftest$ac_exeext"'
12422   { (eval echo "$as_me:12422: \"$ac_try\"") >&5
12423   (eval $ac_try) 2>&5
12424   ac_status=$?
12425   echo "$as_me:12425: \$? = $ac_status" >&5
12426   (exit "$ac_status"); }; }; then
12427   am_cv_langinfo_codeset=yes
12428 else
12429   echo "$as_me: failed program was:" >&5
12430 cat "conftest.$ac_ext" >&5
12431 am_cv_langinfo_codeset=no
12432 fi
12433 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12434
12435 fi
12436 echo "$as_me:12436: result: $am_cv_langinfo_codeset" >&5
12437 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12438         if test "$am_cv_langinfo_codeset" = yes; then
12439
12440 cat >>confdefs.h <<\EOF
12441 #define HAVE_LANGINFO_CODESET 1
12442 EOF
12443
12444         fi
12445
12446 # use these variables to work around a defect in gcc's fixincludes.
12447 NCURSES_OK_WCHAR_T=
12448 NCURSES_OK_WINT_T=
12449
12450 echo "$as_me:12450: checking if you want wide-character code" >&5
12451 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12452
12453 # Check whether --enable-widec or --disable-widec was given.
12454 if test "${enable_widec+set}" = set; then
12455   enableval="$enable_widec"
12456   with_widec=$enableval
12457 else
12458   with_widec=no
12459 fi;
12460 echo "$as_me:12460: result: $with_widec" >&5
12461 echo "${ECHO_T}$with_widec" >&6
12462
12463 NCURSES_WCWIDTH_GRAPHICS=1
12464
12465 if test "x$with_widec" = xyes ; then
12466         if test "x$disable_lib_suffixes" = xno ; then
12467                 LIB_SUFFIX="w${LIB_SUFFIX}"
12468         fi
12469
12470 cat >>confdefs.h <<\EOF
12471 #define USE_WIDEC_SUPPORT 1
12472 EOF
12473
12474 cat >>confdefs.h <<\EOF
12475 #define NCURSES_WIDECHAR 1
12476 EOF
12477
12478         case "$CPPFLAGS" in
12479         (*_XOPEN_SOURCE=*)
12480                 ;;
12481         (*)
12482                 { echo "$as_me:12482: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12483 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12484                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12485                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12486                 ;;
12487         esac
12488
12489 for ac_header in \
12490 wchar.h \
12491 wctype.h \
12492
12493 do
12494 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12495 echo "$as_me:12495: checking for $ac_header" >&5
12496 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12497 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12498   echo $ECHO_N "(cached) $ECHO_C" >&6
12499 else
12500   cat >"conftest.$ac_ext" <<_ACEOF
12501 #line 12501 "configure"
12502 #include "confdefs.h"
12503 #include <$ac_header>
12504 _ACEOF
12505 if { (eval echo "$as_me:12505: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12506   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12507   ac_status=$?
12508   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12509   rm -f conftest.er1
12510   cat conftest.err >&5
12511   echo "$as_me:12511: \$? = $ac_status" >&5
12512   (exit "$ac_status"); } >/dev/null; then
12513   if test -s conftest.err; then
12514     ac_cpp_err=$ac_c_preproc_warn_flag
12515   else
12516     ac_cpp_err=
12517   fi
12518 else
12519   ac_cpp_err=yes
12520 fi
12521 if test -z "$ac_cpp_err"; then
12522   eval "$as_ac_Header=yes"
12523 else
12524   echo "$as_me: failed program was:" >&5
12525   cat "conftest.$ac_ext" >&5
12526   eval "$as_ac_Header=no"
12527 fi
12528 rm -f conftest.err "conftest.$ac_ext"
12529 fi
12530 echo "$as_me:12530: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12531 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12532 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12533   cat >>confdefs.h <<EOF
12534 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12535 EOF
12536
12537 fi
12538 done
12539
12540 echo "$as_me:12540: checking if wchar.h can be used as is" >&5
12541 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12542 if test "${cf_cv_wchar_h_okay+set}" = set; then
12543   echo $ECHO_N "(cached) $ECHO_C" >&6
12544 else
12545
12546 cat >"conftest.$ac_ext" <<_ACEOF
12547 #line 12547 "configure"
12548 #include "confdefs.h"
12549
12550 $ac_includes_default
12551 #ifdef HAVE_WCHAR_H
12552 #include <wchar.h>
12553 #endif
12554 #ifdef HAVE_WCTYPE_H
12555 #include <wctype.h>
12556 #endif
12557
12558 int
12559 main (void)
12560 {
12561
12562         wint_t foo = 0;
12563         int bar = iswpunct(foo)
12564   ;
12565   return 0;
12566 }
12567 _ACEOF
12568 rm -f "conftest.$ac_objext"
12569 if { (eval echo "$as_me:12569: \"$ac_compile\"") >&5
12570   (eval $ac_compile) 2>&5
12571   ac_status=$?
12572   echo "$as_me:12572: \$? = $ac_status" >&5
12573   (exit "$ac_status"); } &&
12574          { ac_try='test -s "conftest.$ac_objext"'
12575   { (eval echo "$as_me:12575: \"$ac_try\"") >&5
12576   (eval $ac_try) 2>&5
12577   ac_status=$?
12578   echo "$as_me:12578: \$? = $ac_status" >&5
12579   (exit "$ac_status"); }; }; then
12580   cf_cv_wchar_h_okay=yes
12581 else
12582   echo "$as_me: failed program was:" >&5
12583 cat "conftest.$ac_ext" >&5
12584 cf_cv_wchar_h_okay=no
12585 fi
12586 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12587 fi
12588 echo "$as_me:12588: result: $cf_cv_wchar_h_okay" >&5
12589 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12590
12591 if test "$cf_cv_wchar_h_okay" = no
12592 then
12593
12594 echo "$as_me:12594: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12595 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12596 cat >"conftest.$ac_ext" <<_ACEOF
12597 #line 12597 "configure"
12598 #include "confdefs.h"
12599 #include <sys/types.h>
12600
12601 int
12602 main (void)
12603 {
12604
12605 #ifndef _XOPEN_SOURCE_EXTENDED
12606 #error _XOPEN_SOURCE_EXTENDED is not defined
12607 #endif
12608   ;
12609   return 0;
12610 }
12611 _ACEOF
12612 rm -f "conftest.$ac_objext"
12613 if { (eval echo "$as_me:12613: \"$ac_compile\"") >&5
12614   (eval $ac_compile) 2>&5
12615   ac_status=$?
12616   echo "$as_me:12616: \$? = $ac_status" >&5
12617   (exit "$ac_status"); } &&
12618          { ac_try='test -s "conftest.$ac_objext"'
12619   { (eval echo "$as_me:12619: \"$ac_try\"") >&5
12620   (eval $ac_try) 2>&5
12621   ac_status=$?
12622   echo "$as_me:12622: \$? = $ac_status" >&5
12623   (exit "$ac_status"); }; }; then
12624   cf_result=no
12625 else
12626   echo "$as_me: failed program was:" >&5
12627 cat "conftest.$ac_ext" >&5
12628 cf_result=yes
12629 fi
12630 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12631 echo "$as_me:12631: result: $cf_result" >&5
12632 echo "${ECHO_T}$cf_result" >&6
12633
12634 if test "$cf_result" = yes ; then
12635         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12636 elif test "x" != "x" ; then
12637         echo "$as_me:12637: checking checking for compatible value versus " >&5
12638 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12639         cat >"conftest.$ac_ext" <<_ACEOF
12640 #line 12640 "configure"
12641 #include "confdefs.h"
12642 #include <sys/types.h>
12643
12644 int
12645 main (void)
12646 {
12647
12648 #if _XOPEN_SOURCE_EXTENDED- < 0
12649 #error _XOPEN_SOURCE_EXTENDED- is negative
12650 #endif
12651   ;
12652   return 0;
12653 }
12654 _ACEOF
12655 rm -f "conftest.$ac_objext"
12656 if { (eval echo "$as_me:12656: \"$ac_compile\"") >&5
12657   (eval $ac_compile) 2>&5
12658   ac_status=$?
12659   echo "$as_me:12659: \$? = $ac_status" >&5
12660   (exit "$ac_status"); } &&
12661          { ac_try='test -s "conftest.$ac_objext"'
12662   { (eval echo "$as_me:12662: \"$ac_try\"") >&5
12663   (eval $ac_try) 2>&5
12664   ac_status=$?
12665   echo "$as_me:12665: \$? = $ac_status" >&5
12666   (exit "$ac_status"); }; }; then
12667   cf_result=yes
12668 else
12669   echo "$as_me: failed program was:" >&5
12670 cat "conftest.$ac_ext" >&5
12671 cf_result=no
12672 fi
12673 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12674         echo "$as_me:12674: result: $cf_result" >&5
12675 echo "${ECHO_T}$cf_result" >&6
12676         if test "$cf_result" = no ; then
12677                 # perhaps we can override it - try...
12678                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12679         fi
12680 fi
12681
12682 fi
12683
12684 echo "$as_me:12684: checking if wcwidth agrees graphics are single-width" >&5
12685 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12686 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12687   echo $ECHO_N "(cached) $ECHO_C" >&6
12688 else
12689
12690 cat >conftest.in <<CF_EOF
12691 -       VT100 symbols
12692 0x250c  upper left corner
12693 0x2514  lower left corner
12694 0x2510  upper right corner
12695 0x2518  lower right corner
12696 0x251c  tee pointing left
12697 0x2524  tee pointing right
12698 0x2534  tee pointing up
12699 0x252c  tee pointing down
12700 0x2500  horizontal line
12701 0x2502  vertical line
12702 0x253c  large plus or crossover
12703 0x23ba  scan line 1
12704 0x23bd  scan line 9
12705 0x25c6  diamond
12706 0x2592  checker board (stipple)
12707 0x00b0  degree symbol
12708 0x00b1  plus/minus
12709 0x00b7  bullet
12710 -       Teletype 5410v1 symbols
12711 0x2190  arrow pointing left
12712 0x2192  arrow pointing right
12713 0x2193  arrow pointing down
12714 0x2191  arrow pointing up
12715 0x2592  board of squares
12716 0x2603  lantern symbol
12717 0x25ae  solid square block
12718 -       these defaults were invented for ncurses
12719 0x23bb  scan line 3
12720 0x23bc  scan line 7
12721 0x2264  less-than-or-equal-to
12722 0x2265  greater-than-or-equal-to
12723 0x03c0  greek pi
12724 0x2260  not-equal
12725 0x00a3  pound-sterling symbol
12726 -       thick-line-drawing
12727 0x250f  upper left corner
12728 0x2517  lower left corner
12729 0x2513  upper right corner
12730 0x251b  lower right corner
12731 0x2523  tee pointing left
12732 0x252b  tee pointing right
12733 0x253b  tee pointing up
12734 0x2533  tee pointing down
12735 0x2501  horizontal line
12736 0x2503  vertical line
12737 0x254b  large plus or crossover
12738 -       double-line-drawing
12739 0x2554  upper left corner
12740 0x255a  lower left corner
12741 0x2557  upper right corner
12742 0x255d  lower right corner
12743 0x2563  tee pointing left
12744 0x2560  tee pointing right
12745 0x2569  tee pointing up
12746 0x2566  tee pointing down
12747 0x2550  horizontal line
12748 0x2551  vertical line
12749 0x256c  large plus or crossover
12750 CF_EOF
12751 if test "$cross_compiling" = yes; then
12752   cf_cv_wcwidth_graphics=unknown
12753 else
12754   cat >"conftest.$ac_ext" <<_ACEOF
12755 #line 12755 "configure"
12756 #include "confdefs.h"
12757
12758 $ac_includes_default
12759
12760 #include <locale.h>
12761 #include <wchar.h>
12762
12763 #define MY_LEN 80
12764
12765 int
12766 main(void)
12767 {
12768         FILE *fp;
12769         int value;
12770         char buffer[MY_LEN + 1];
12771         char notes[MY_LEN + 1];
12772         int totals = 0;
12773         int passed = 0;
12774
12775         if (setlocale(LC_ALL, "en_US.UTF8") ||
12776                 setlocale(LC_ALL, "en_US.UTF-8") ||
12777                 setlocale(LC_ALL, "en_US.utf8") ||
12778                 setlocale(LC_ALL, "en_US.utf-8")) {
12779                 if ((fp = fopen("conftest.in", "r")) != 0) {
12780                         while (fgets(buffer, MY_LEN, fp) != 0) {
12781                                 if (*buffer == '-') {
12782                                         fprintf(stderr, "\\t%s", buffer);
12783                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12784                                         ++totals;
12785                                         if (wcwidth(value) == 1)
12786                                                 ++passed;
12787                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12788                                 } else {
12789                                         fprintf(stderr, "?\\t%s", buffer);
12790                                 }
12791                         }
12792                 }
12793         }
12794         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12795         return (totals == passed) ? 0 : 1;
12796 }
12797
12798 _ACEOF
12799 rm -f "conftest$ac_exeext"
12800 if { (eval echo "$as_me:12800: \"$ac_link\"") >&5
12801   (eval $ac_link) 2>&5
12802   ac_status=$?
12803   echo "$as_me:12803: \$? = $ac_status" >&5
12804   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12805   { (eval echo "$as_me:12805: \"$ac_try\"") >&5
12806   (eval $ac_try) 2>&5
12807   ac_status=$?
12808   echo "$as_me:12808: \$? = $ac_status" >&5
12809   (exit "$ac_status"); }; }; then
12810   cf_cv_wcwidth_graphics=yes
12811 else
12812   echo "$as_me: program exited with status $ac_status" >&5
12813 echo "$as_me: failed program was:" >&5
12814 cat "conftest.$ac_ext" >&5
12815 cf_cv_wcwidth_graphics=no
12816 fi
12817 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12818 fi
12819
12820 fi
12821 echo "$as_me:12821: result: $cf_cv_wcwidth_graphics" >&5
12822 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12823
12824         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12825
12826         # with_overwrite=no
12827         NCURSES_CH_T=cchar_t
12828
12829 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12830 do
12831 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12832 echo "$as_me:12832: checking for $ac_func" >&5
12833 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12834 if eval "test \"\${$as_ac_var+set}\" = set"; then
12835   echo $ECHO_N "(cached) $ECHO_C" >&6
12836 else
12837   cat >"conftest.$ac_ext" <<_ACEOF
12838 #line 12838 "configure"
12839 #include "confdefs.h"
12840 #define $ac_func autoconf_temporary
12841 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12842 #undef $ac_func
12843
12844 #ifdef __cplusplus
12845 extern "C"
12846 #endif
12847
12848 /* We use char because int might match the return type of a gcc2
12849    builtin and then its argument prototype would still apply.  */
12850 char $ac_func (void);
12851
12852 int
12853 main (void)
12854 {
12855
12856 /* The GNU C library defines stubs for functions which it implements
12857     to always fail with ENOSYS.  Some functions are actually named
12858     something starting with __ and the normal name is an alias.  */
12859 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12860 #error found stub for $ac_func
12861 #endif
12862
12863         return $ac_func ();
12864   ;
12865   return 0;
12866 }
12867 _ACEOF
12868 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12869 if { (eval echo "$as_me:12869: \"$ac_link\"") >&5
12870   (eval $ac_link) 2>&5
12871   ac_status=$?
12872   echo "$as_me:12872: \$? = $ac_status" >&5
12873   (exit "$ac_status"); } &&
12874          { ac_try='test -s "conftest$ac_exeext"'
12875   { (eval echo "$as_me:12875: \"$ac_try\"") >&5
12876   (eval $ac_try) 2>&5
12877   ac_status=$?
12878   echo "$as_me:12878: \$? = $ac_status" >&5
12879   (exit "$ac_status"); }; }; then
12880   eval "$as_ac_var=yes"
12881 else
12882   echo "$as_me: failed program was:" >&5
12883 cat "conftest.$ac_ext" >&5
12884 eval "$as_ac_var=no"
12885 fi
12886 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12887 fi
12888 echo "$as_me:12888: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12889 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12890 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12891   cat >>confdefs.h <<EOF
12892 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12893 EOF
12894
12895 fi
12896 done
12897
12898         if test "x$ac_cv_func_putwc" != xyes ; then
12899
12900 for ac_header in wchar.h
12901 do
12902 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12903 echo "$as_me:12903: checking for $ac_header" >&5
12904 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12905 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12906   echo $ECHO_N "(cached) $ECHO_C" >&6
12907 else
12908   cat >"conftest.$ac_ext" <<_ACEOF
12909 #line 12909 "configure"
12910 #include "confdefs.h"
12911 #include <$ac_header>
12912 _ACEOF
12913 if { (eval echo "$as_me:12913: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12914   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12915   ac_status=$?
12916   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12917   rm -f conftest.er1
12918   cat conftest.err >&5
12919   echo "$as_me:12919: \$? = $ac_status" >&5
12920   (exit "$ac_status"); } >/dev/null; then
12921   if test -s conftest.err; then
12922     ac_cpp_err=$ac_c_preproc_warn_flag
12923   else
12924     ac_cpp_err=
12925   fi
12926 else
12927   ac_cpp_err=yes
12928 fi
12929 if test -z "$ac_cpp_err"; then
12930   eval "$as_ac_Header=yes"
12931 else
12932   echo "$as_me: failed program was:" >&5
12933   cat "conftest.$ac_ext" >&5
12934   eval "$as_ac_Header=no"
12935 fi
12936 rm -f conftest.err "conftest.$ac_ext"
12937 fi
12938 echo "$as_me:12938: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12939 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12940 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12941   cat >>confdefs.h <<EOF
12942 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12943 EOF
12944
12945 fi
12946 done
12947
12948 echo "$as_me:12948: checking for multibyte character support" >&5
12949 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12950 if test "${cf_cv_utf8_lib+set}" = set; then
12951   echo $ECHO_N "(cached) $ECHO_C" >&6
12952 else
12953
12954         cf_save_LIBS="$LIBS"
12955         cat >"conftest.$ac_ext" <<_ACEOF
12956 #line 12956 "configure"
12957 #include "confdefs.h"
12958
12959 $ac_includes_default
12960 #ifdef HAVE_WCHAR_H
12961 #include <wchar.h>
12962 #endif
12963
12964 int
12965 main (void)
12966 {
12967 putwc(0,0);
12968   ;
12969   return 0;
12970 }
12971 _ACEOF
12972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12973 if { (eval echo "$as_me:12973: \"$ac_link\"") >&5
12974   (eval $ac_link) 2>&5
12975   ac_status=$?
12976   echo "$as_me:12976: \$? = $ac_status" >&5
12977   (exit "$ac_status"); } &&
12978          { ac_try='test -s "conftest$ac_exeext"'
12979   { (eval echo "$as_me:12979: \"$ac_try\"") >&5
12980   (eval $ac_try) 2>&5
12981   ac_status=$?
12982   echo "$as_me:12982: \$? = $ac_status" >&5
12983   (exit "$ac_status"); }; }; then
12984   cf_cv_utf8_lib=yes
12985 else
12986   echo "$as_me: failed program was:" >&5
12987 cat "conftest.$ac_ext" >&5
12988
12989 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12990 # will be set on completion of the AC_TRY_LINK below.
12991 cf_cv_header_path_utf8=
12992 cf_cv_library_path_utf8=
12993
12994 echo "${as_me:-configure}:12994: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12995
12996 cf_save_LIBS="$LIBS"
12997
12998 cat >"conftest.$ac_ext" <<_ACEOF
12999 #line 12999 "configure"
13000 #include "confdefs.h"
13001
13002 #include <libutf8.h>
13003 int
13004 main (void)
13005 {
13006 putwc(0,0);
13007   ;
13008   return 0;
13009 }
13010 _ACEOF
13011 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13012 if { (eval echo "$as_me:13012: \"$ac_link\"") >&5
13013   (eval $ac_link) 2>&5
13014   ac_status=$?
13015   echo "$as_me:13015: \$? = $ac_status" >&5
13016   (exit "$ac_status"); } &&
13017          { ac_try='test -s "conftest$ac_exeext"'
13018   { (eval echo "$as_me:13018: \"$ac_try\"") >&5
13019   (eval $ac_try) 2>&5
13020   ac_status=$?
13021   echo "$as_me:13021: \$? = $ac_status" >&5
13022   (exit "$ac_status"); }; }; then
13023
13024         cf_cv_find_linkage_utf8=yes
13025         cf_cv_header_path_utf8=/usr/include
13026         cf_cv_library_path_utf8=/usr/lib
13027
13028 else
13029   echo "$as_me: failed program was:" >&5
13030 cat "conftest.$ac_ext" >&5
13031
13032 LIBS="-lutf8  $cf_save_LIBS"
13033
13034 cat >"conftest.$ac_ext" <<_ACEOF
13035 #line 13035 "configure"
13036 #include "confdefs.h"
13037
13038 #include <libutf8.h>
13039 int
13040 main (void)
13041 {
13042 putwc(0,0);
13043   ;
13044   return 0;
13045 }
13046 _ACEOF
13047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13048 if { (eval echo "$as_me:13048: \"$ac_link\"") >&5
13049   (eval $ac_link) 2>&5
13050   ac_status=$?
13051   echo "$as_me:13051: \$? = $ac_status" >&5
13052   (exit "$ac_status"); } &&
13053          { ac_try='test -s "conftest$ac_exeext"'
13054   { (eval echo "$as_me:13054: \"$ac_try\"") >&5
13055   (eval $ac_try) 2>&5
13056   ac_status=$?
13057   echo "$as_me:13057: \$? = $ac_status" >&5
13058   (exit "$ac_status"); }; }; then
13059
13060         cf_cv_find_linkage_utf8=yes
13061         cf_cv_header_path_utf8=/usr/include
13062         cf_cv_library_path_utf8=/usr/lib
13063         cf_cv_library_file_utf8="-lutf8"
13064
13065 else
13066   echo "$as_me: failed program was:" >&5
13067 cat "conftest.$ac_ext" >&5
13068
13069         cf_cv_find_linkage_utf8=no
13070         LIBS="$cf_save_LIBS"
13071
13072         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13073
13074 echo "${as_me:-configure}:13074: testing find linkage for utf8 library ..." 1>&5
13075
13076 echo "${as_me:-configure}:13076: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13077
13078         cf_save_CPPFLAGS="$CPPFLAGS"
13079         cf_test_CPPFLAGS="$CPPFLAGS"
13080
13081 cf_search=
13082
13083 # collect the current set of include-directories from compiler flags
13084 cf_header_path_list=""
13085 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13086         for cf_header_path in $CPPFLAGS $CFLAGS
13087         do
13088                 case "$cf_header_path" in
13089                 (-I*)
13090                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13091
13092 test "x$cf_header_path" != "xNONE" && \
13093 test -d "$cf_header_path" && \
13094  {
13095         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13096         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13097         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13098         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13099         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13100         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13101 }
13102
13103                         cf_header_path_list="$cf_header_path_list $cf_search"
13104                         ;;
13105                 esac
13106         done
13107 fi
13108
13109 # add the variations for the package we are looking for
13110
13111 cf_search=
13112
13113 test "x$prefix" != "xNONE" && \
13114 test -d "$prefix" && \
13115  {
13116         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13117         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13118         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13119         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13120         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13121         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13122 }
13123
13124 for cf_subdir_prefix in \
13125         /usr \
13126         /usr/local \
13127         /usr/pkg \
13128         /opt \
13129         /opt/local \
13130         $HOME
13131 do
13132
13133 test "x$cf_subdir_prefix" != "x$prefix" && \
13134 test -d "$cf_subdir_prefix" && \
13135 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13136         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13137         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13138         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13139         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13140         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13141         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13142 }
13143
13144 done
13145
13146 test "$includedir" != NONE && \
13147 test "$includedir" != "/usr/include" && \
13148 test -d "$includedir" && {
13149         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13150         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13151 }
13152
13153 test "$oldincludedir" != NONE && \
13154 test "$oldincludedir" != "/usr/include" && \
13155 test -d "$oldincludedir" && {
13156         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13157         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13158 }
13159
13160 cf_search="$cf_search $cf_header_path_list"
13161
13162         for cf_cv_header_path_utf8 in $cf_search
13163         do
13164                 if test -d "$cf_cv_header_path_utf8" ; then
13165                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13166
13167 echo "${as_me:-configure}:13167: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13168
13169                         CPPFLAGS="$cf_save_CPPFLAGS"
13170
13171         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13172         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13173
13174                         cat >"conftest.$ac_ext" <<_ACEOF
13175 #line 13175 "configure"
13176 #include "confdefs.h"
13177
13178 #include <libutf8.h>
13179 int
13180 main (void)
13181 {
13182 putwc(0,0);
13183   ;
13184   return 0;
13185 }
13186 _ACEOF
13187 rm -f "conftest.$ac_objext"
13188 if { (eval echo "$as_me:13188: \"$ac_compile\"") >&5
13189   (eval $ac_compile) 2>&5
13190   ac_status=$?
13191   echo "$as_me:13191: \$? = $ac_status" >&5
13192   (exit "$ac_status"); } &&
13193          { ac_try='test -s "conftest.$ac_objext"'
13194   { (eval echo "$as_me:13194: \"$ac_try\"") >&5
13195   (eval $ac_try) 2>&5
13196   ac_status=$?
13197   echo "$as_me:13197: \$? = $ac_status" >&5
13198   (exit "$ac_status"); }; }; then
13199
13200                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13201
13202 echo "${as_me:-configure}:13202: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13203
13204                                 cf_cv_find_linkage_utf8=maybe
13205                                 cf_test_CPPFLAGS="$CPPFLAGS"
13206                                 break
13207 else
13208   echo "$as_me: failed program was:" >&5
13209 cat "conftest.$ac_ext" >&5
13210
13211                                 CPPFLAGS="$cf_save_CPPFLAGS"
13212
13213 fi
13214 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13215                 fi
13216         done
13217
13218         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13219
13220 echo "${as_me:-configure}:13220: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13221
13222                 cf_save_LIBS="$LIBS"
13223                 cf_save_LDFLAGS="$LDFLAGS"
13224
13225                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13226
13227 cf_search=
13228 cf_library_path_list=""
13229 if test -n "${LDFLAGS}${LIBS}" ; then
13230         for cf_library_path in $LDFLAGS $LIBS
13231         do
13232                 case "$cf_library_path" in
13233                 (-L*)
13234                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13235
13236 test "x$cf_library_path" != "xNONE" && \
13237 test -d "$cf_library_path" && \
13238  {
13239         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13240         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13241         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13242         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13243         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13244         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13245 }
13246
13247                         cf_library_path_list="$cf_library_path_list $cf_search"
13248                         ;;
13249                 esac
13250         done
13251 fi
13252
13253 cf_search=
13254
13255 test "x$prefix" != "xNONE" && \
13256 test -d "$prefix" && \
13257  {
13258         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13259         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13260         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13261         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13262         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13263         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13264 }
13265
13266 for cf_subdir_prefix in \
13267         /usr \
13268         /usr/local \
13269         /usr/pkg \
13270         /opt \
13271         /opt/local \
13272         $HOME
13273 do
13274
13275 test "x$cf_subdir_prefix" != "x$prefix" && \
13276 test -d "$cf_subdir_prefix" && \
13277 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13278         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13279         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13280         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13281         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13282         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13283         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13284 }
13285
13286 done
13287
13288 cf_search="$cf_library_path_list $cf_search"
13289
13290                         for cf_cv_library_path_utf8 in $cf_search
13291                         do
13292                                 if test -d "$cf_cv_library_path_utf8" ; then
13293                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13294
13295 echo "${as_me:-configure}:13295: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13296
13297                                         CPPFLAGS="$cf_test_CPPFLAGS"
13298                                         LIBS="-lutf8  $cf_save_LIBS"
13299                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13300                                         cat >"conftest.$ac_ext" <<_ACEOF
13301 #line 13301 "configure"
13302 #include "confdefs.h"
13303
13304 #include <libutf8.h>
13305 int
13306 main (void)
13307 {
13308 putwc(0,0);
13309   ;
13310   return 0;
13311 }
13312 _ACEOF
13313 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13314 if { (eval echo "$as_me:13314: \"$ac_link\"") >&5
13315   (eval $ac_link) 2>&5
13316   ac_status=$?
13317   echo "$as_me:13317: \$? = $ac_status" >&5
13318   (exit "$ac_status"); } &&
13319          { ac_try='test -s "conftest$ac_exeext"'
13320   { (eval echo "$as_me:13320: \"$ac_try\"") >&5
13321   (eval $ac_try) 2>&5
13322   ac_status=$?
13323   echo "$as_me:13323: \$? = $ac_status" >&5
13324   (exit "$ac_status"); }; }; then
13325
13326                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13327
13328 echo "${as_me:-configure}:13328: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13329
13330                                         cf_cv_find_linkage_utf8=yes
13331                                         cf_cv_library_file_utf8="-lutf8"
13332                                         break
13333 else
13334   echo "$as_me: failed program was:" >&5
13335 cat "conftest.$ac_ext" >&5
13336
13337                                         CPPFLAGS="$cf_save_CPPFLAGS"
13338                                         LIBS="$cf_save_LIBS"
13339                                         LDFLAGS="$cf_save_LDFLAGS"
13340
13341 fi
13342 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13343                                 fi
13344                         done
13345                         CPPFLAGS="$cf_save_CPPFLAGS"
13346                         LDFLAGS="$cf_save_LDFLAGS"
13347                 fi
13348
13349         else
13350                 cf_cv_find_linkage_utf8=no
13351         fi
13352
13353 fi
13354 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13355
13356 fi
13357 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13358
13359 LIBS="$cf_save_LIBS"
13360
13361 if test "$cf_cv_find_linkage_utf8" = yes ; then
13362 cf_cv_utf8_lib=add-on
13363 else
13364 cf_cv_utf8_lib=no
13365 fi
13366
13367 fi
13368 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13369 fi
13370 echo "$as_me:13370: result: $cf_cv_utf8_lib" >&5
13371 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13372
13373 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13374 # ncurses/ncursesw:
13375 if test "$cf_cv_utf8_lib" = "add-on" ; then
13376
13377 cat >>confdefs.h <<\EOF
13378 #define HAVE_LIBUTF8_H 1
13379 EOF
13380
13381 if test -n "$cf_cv_header_path_utf8" ; then
13382   for cf_add_incdir in $cf_cv_header_path_utf8
13383   do
13384         while test "$cf_add_incdir" != /usr/include
13385         do
13386           if test -d "$cf_add_incdir"
13387           then
13388                 cf_have_incdir=no
13389                 if test -n "$CFLAGS$CPPFLAGS" ; then
13390                   # a loop is needed to ensure we can add subdirs of existing dirs
13391                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13392                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13393                           cf_have_incdir=yes; break
13394                         fi
13395                   done
13396                 fi
13397
13398                 if test "$cf_have_incdir" = no ; then
13399                   if test "$cf_add_incdir" = /usr/local/include ; then
13400                         if test "$GCC" = yes
13401                         then
13402                           cf_save_CPPFLAGS=$CPPFLAGS
13403
13404         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13405         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13406
13407                           cat >"conftest.$ac_ext" <<_ACEOF
13408 #line 13408 "configure"
13409 #include "confdefs.h"
13410 #include <stdio.h>
13411 int
13412 main (void)
13413 {
13414 printf("Hello")
13415   ;
13416   return 0;
13417 }
13418 _ACEOF
13419 rm -f "conftest.$ac_objext"
13420 if { (eval echo "$as_me:13420: \"$ac_compile\"") >&5
13421   (eval $ac_compile) 2>&5
13422   ac_status=$?
13423   echo "$as_me:13423: \$? = $ac_status" >&5
13424   (exit "$ac_status"); } &&
13425          { ac_try='test -s "conftest.$ac_objext"'
13426   { (eval echo "$as_me:13426: \"$ac_try\"") >&5
13427   (eval $ac_try) 2>&5
13428   ac_status=$?
13429   echo "$as_me:13429: \$? = $ac_status" >&5
13430   (exit "$ac_status"); }; }; then
13431   :
13432 else
13433   echo "$as_me: failed program was:" >&5
13434 cat "conftest.$ac_ext" >&5
13435 cf_have_incdir=yes
13436 fi
13437 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13438                           CPPFLAGS=$cf_save_CPPFLAGS
13439                         fi
13440                   fi
13441                 fi
13442
13443                 if test "$cf_have_incdir" = no ; then
13444                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13445
13446 echo "${as_me:-configure}:13446: testing adding $cf_add_incdir to include-path ..." 1>&5
13447
13448                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13449
13450                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13451                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13452                   cf_add_incdir="$cf_top_incdir"
13453                 else
13454                   break
13455                 fi
13456           else
13457                 break
13458           fi
13459         done
13460   done
13461 fi
13462
13463 if test -n "$cf_cv_library_path_utf8" ; then
13464         for cf_add_libdir in $cf_cv_library_path_utf8
13465         do
13466                 if test "$cf_add_libdir" = /usr/lib ; then
13467                         :
13468                 elif test -d "$cf_add_libdir"
13469                 then
13470                         cf_have_libdir=no
13471                         if test -n "$LDFLAGS$LIBS" ; then
13472                                 # a loop is needed to ensure we can add subdirs of existing dirs
13473                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13474                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13475                                                 cf_have_libdir=yes; break
13476                                         fi
13477                                 done
13478                         fi
13479                         if test "$cf_have_libdir" = no ; then
13480                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13481
13482 echo "${as_me:-configure}:13482: testing adding $cf_add_libdir to library-path ..." 1>&5
13483
13484                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13485                         fi
13486                 fi
13487         done
13488 fi
13489
13490 cf_add_libs="$LIBS"
13491 # reverse order
13492 cf_add_0lib=
13493 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13494 # filter duplicates
13495 for cf_add_1lib in $cf_add_0lib; do
13496         for cf_add_2lib in $cf_add_libs; do
13497                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13498                         cf_add_1lib=
13499                         break
13500                 fi
13501         done
13502         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13503 done
13504 LIBS="$cf_add_libs"
13505
13506 fi
13507
13508                 if test "$cf_cv_utf8_lib" != no ; then
13509                         NCURSES_LIBUTF8=1
13510                 fi
13511         fi
13512
13513 # This is needed on Tru64 5.0 to declare mbstate_t
13514 echo "$as_me:13514: checking if we must include wchar.h to declare mbstate_t" >&5
13515 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13516 if test "${cf_cv_mbstate_t+set}" = set; then
13517   echo $ECHO_N "(cached) $ECHO_C" >&6
13518 else
13519
13520 cat >"conftest.$ac_ext" <<_ACEOF
13521 #line 13521 "configure"
13522 #include "confdefs.h"
13523
13524 #include <stdlib.h>
13525 #include <stdarg.h>
13526 #include <stdio.h>
13527 #ifdef HAVE_LIBUTF8_H
13528 #include <libutf8.h>
13529 #endif
13530 int
13531 main (void)
13532 {
13533 mbstate_t state
13534   ;
13535   return 0;
13536 }
13537 _ACEOF
13538 rm -f "conftest.$ac_objext"
13539 if { (eval echo "$as_me:13539: \"$ac_compile\"") >&5
13540   (eval $ac_compile) 2>&5
13541   ac_status=$?
13542   echo "$as_me:13542: \$? = $ac_status" >&5
13543   (exit "$ac_status"); } &&
13544          { ac_try='test -s "conftest.$ac_objext"'
13545   { (eval echo "$as_me:13545: \"$ac_try\"") >&5
13546   (eval $ac_try) 2>&5
13547   ac_status=$?
13548   echo "$as_me:13548: \$? = $ac_status" >&5
13549   (exit "$ac_status"); }; }; then
13550   cf_cv_mbstate_t=no
13551 else
13552   echo "$as_me: failed program was:" >&5
13553 cat "conftest.$ac_ext" >&5
13554 cat >"conftest.$ac_ext" <<_ACEOF
13555 #line 13555 "configure"
13556 #include "confdefs.h"
13557
13558 #include <stdlib.h>
13559 #include <stdarg.h>
13560 #include <stdio.h>
13561 #include <wchar.h>
13562 #ifdef HAVE_LIBUTF8_H
13563 #include <libutf8.h>
13564 #endif
13565 int
13566 main (void)
13567 {
13568 mbstate_t value
13569   ;
13570   return 0;
13571 }
13572 _ACEOF
13573 rm -f "conftest.$ac_objext"
13574 if { (eval echo "$as_me:13574: \"$ac_compile\"") >&5
13575   (eval $ac_compile) 2>&5
13576   ac_status=$?
13577   echo "$as_me:13577: \$? = $ac_status" >&5
13578   (exit "$ac_status"); } &&
13579          { ac_try='test -s "conftest.$ac_objext"'
13580   { (eval echo "$as_me:13580: \"$ac_try\"") >&5
13581   (eval $ac_try) 2>&5
13582   ac_status=$?
13583   echo "$as_me:13583: \$? = $ac_status" >&5
13584   (exit "$ac_status"); }; }; then
13585   cf_cv_mbstate_t=yes
13586 else
13587   echo "$as_me: failed program was:" >&5
13588 cat "conftest.$ac_ext" >&5
13589 cf_cv_mbstate_t=unknown
13590 fi
13591 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13592 fi
13593 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13594 fi
13595 echo "$as_me:13595: result: $cf_cv_mbstate_t" >&5
13596 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13597
13598 if test "$cf_cv_mbstate_t" = yes ; then
13599
13600 cat >>confdefs.h <<\EOF
13601 #define NEED_WCHAR_H 1
13602 EOF
13603
13604         NEED_WCHAR_H=1
13605 fi
13606
13607 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13608 if test "$cf_cv_mbstate_t" = unknown ; then
13609         NCURSES_MBSTATE_T=1
13610 fi
13611
13612 # This is needed on Tru64 5.0 to declare wchar_t
13613 echo "$as_me:13613: checking if we must include wchar.h to declare wchar_t" >&5
13614 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13615 if test "${cf_cv_wchar_t+set}" = set; then
13616   echo $ECHO_N "(cached) $ECHO_C" >&6
13617 else
13618
13619 cat >"conftest.$ac_ext" <<_ACEOF
13620 #line 13620 "configure"
13621 #include "confdefs.h"
13622
13623 #include <stdlib.h>
13624 #include <stdarg.h>
13625 #include <stdio.h>
13626 #ifdef HAVE_LIBUTF8_H
13627 #include <libutf8.h>
13628 #endif
13629 int
13630 main (void)
13631 {
13632 wchar_t state
13633   ;
13634   return 0;
13635 }
13636 _ACEOF
13637 rm -f "conftest.$ac_objext"
13638 if { (eval echo "$as_me:13638: \"$ac_compile\"") >&5
13639   (eval $ac_compile) 2>&5
13640   ac_status=$?
13641   echo "$as_me:13641: \$? = $ac_status" >&5
13642   (exit "$ac_status"); } &&
13643          { ac_try='test -s "conftest.$ac_objext"'
13644   { (eval echo "$as_me:13644: \"$ac_try\"") >&5
13645   (eval $ac_try) 2>&5
13646   ac_status=$?
13647   echo "$as_me:13647: \$? = $ac_status" >&5
13648   (exit "$ac_status"); }; }; then
13649   cf_cv_wchar_t=no
13650 else
13651   echo "$as_me: failed program was:" >&5
13652 cat "conftest.$ac_ext" >&5
13653 cat >"conftest.$ac_ext" <<_ACEOF
13654 #line 13654 "configure"
13655 #include "confdefs.h"
13656
13657 #include <stdlib.h>
13658 #include <stdarg.h>
13659 #include <stdio.h>
13660 #include <wchar.h>
13661 #ifdef HAVE_LIBUTF8_H
13662 #include <libutf8.h>
13663 #endif
13664 int
13665 main (void)
13666 {
13667 wchar_t value
13668   ;
13669   return 0;
13670 }
13671 _ACEOF
13672 rm -f "conftest.$ac_objext"
13673 if { (eval echo "$as_me:13673: \"$ac_compile\"") >&5
13674   (eval $ac_compile) 2>&5
13675   ac_status=$?
13676   echo "$as_me:13676: \$? = $ac_status" >&5
13677   (exit "$ac_status"); } &&
13678          { ac_try='test -s "conftest.$ac_objext"'
13679   { (eval echo "$as_me:13679: \"$ac_try\"") >&5
13680   (eval $ac_try) 2>&5
13681   ac_status=$?
13682   echo "$as_me:13682: \$? = $ac_status" >&5
13683   (exit "$ac_status"); }; }; then
13684   cf_cv_wchar_t=yes
13685 else
13686   echo "$as_me: failed program was:" >&5
13687 cat "conftest.$ac_ext" >&5
13688 cf_cv_wchar_t=unknown
13689 fi
13690 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13691 fi
13692 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13693 fi
13694 echo "$as_me:13694: result: $cf_cv_wchar_t" >&5
13695 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13696
13697 if test "$cf_cv_wchar_t" = yes ; then
13698
13699 cat >>confdefs.h <<\EOF
13700 #define NEED_WCHAR_H 1
13701 EOF
13702
13703         NEED_WCHAR_H=1
13704 fi
13705
13706 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13707 if test "$cf_cv_wchar_t" = unknown ; then
13708         NCURSES_WCHAR_T=1
13709 fi
13710
13711 # if we find wchar_t in either place, use substitution to provide a fallback.
13712 if test "$cf_cv_wchar_t" != unknown ; then
13713         NCURSES_OK_WCHAR_T=1
13714 fi
13715
13716 # This is needed on Tru64 5.0 to declare wint_t
13717 echo "$as_me:13717: checking if we must include wchar.h to declare wint_t" >&5
13718 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13719 if test "${cf_cv_wint_t+set}" = set; then
13720   echo $ECHO_N "(cached) $ECHO_C" >&6
13721 else
13722
13723 cat >"conftest.$ac_ext" <<_ACEOF
13724 #line 13724 "configure"
13725 #include "confdefs.h"
13726
13727 #include <stdlib.h>
13728 #include <stdarg.h>
13729 #include <stdio.h>
13730 #ifdef HAVE_LIBUTF8_H
13731 #include <libutf8.h>
13732 #endif
13733 int
13734 main (void)
13735 {
13736 wint_t state
13737   ;
13738   return 0;
13739 }
13740 _ACEOF
13741 rm -f "conftest.$ac_objext"
13742 if { (eval echo "$as_me:13742: \"$ac_compile\"") >&5
13743   (eval $ac_compile) 2>&5
13744   ac_status=$?
13745   echo "$as_me:13745: \$? = $ac_status" >&5
13746   (exit "$ac_status"); } &&
13747          { ac_try='test -s "conftest.$ac_objext"'
13748   { (eval echo "$as_me:13748: \"$ac_try\"") >&5
13749   (eval $ac_try) 2>&5
13750   ac_status=$?
13751   echo "$as_me:13751: \$? = $ac_status" >&5
13752   (exit "$ac_status"); }; }; then
13753   cf_cv_wint_t=no
13754 else
13755   echo "$as_me: failed program was:" >&5
13756 cat "conftest.$ac_ext" >&5
13757 cat >"conftest.$ac_ext" <<_ACEOF
13758 #line 13758 "configure"
13759 #include "confdefs.h"
13760
13761 #include <stdlib.h>
13762 #include <stdarg.h>
13763 #include <stdio.h>
13764 #include <wchar.h>
13765 #ifdef HAVE_LIBUTF8_H
13766 #include <libutf8.h>
13767 #endif
13768 int
13769 main (void)
13770 {
13771 wint_t value
13772   ;
13773   return 0;
13774 }
13775 _ACEOF
13776 rm -f "conftest.$ac_objext"
13777 if { (eval echo "$as_me:13777: \"$ac_compile\"") >&5
13778   (eval $ac_compile) 2>&5
13779   ac_status=$?
13780   echo "$as_me:13780: \$? = $ac_status" >&5
13781   (exit "$ac_status"); } &&
13782          { ac_try='test -s "conftest.$ac_objext"'
13783   { (eval echo "$as_me:13783: \"$ac_try\"") >&5
13784   (eval $ac_try) 2>&5
13785   ac_status=$?
13786   echo "$as_me:13786: \$? = $ac_status" >&5
13787   (exit "$ac_status"); }; }; then
13788   cf_cv_wint_t=yes
13789 else
13790   echo "$as_me: failed program was:" >&5
13791 cat "conftest.$ac_ext" >&5
13792 cf_cv_wint_t=unknown
13793 fi
13794 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13795 fi
13796 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13797 fi
13798 echo "$as_me:13798: result: $cf_cv_wint_t" >&5
13799 echo "${ECHO_T}$cf_cv_wint_t" >&6
13800
13801 if test "$cf_cv_wint_t" = yes ; then
13802
13803 cat >>confdefs.h <<\EOF
13804 #define NEED_WCHAR_H 1
13805 EOF
13806
13807         NEED_WCHAR_H=1
13808 fi
13809
13810 # if we do not find wint_t in either place, use substitution to provide a fallback.
13811 if test "$cf_cv_wint_t" = unknown ; then
13812         NCURSES_WINT_T=1
13813 fi
13814
13815 # if we find wint_t in either place, use substitution to provide a fallback.
13816 if test "$cf_cv_wint_t" != unknown ; then
13817         NCURSES_OK_WINT_T=1
13818 fi
13819
13820         if test "$NCURSES_MBSTATE_T" != 0; then
13821
13822 cat >>confdefs.h <<\EOF
13823 #define NEED_MBSTATE_T_DEF 1
13824 EOF
13825
13826         fi
13827 fi
13828
13829 ###   use option --disable-lp64 to allow long chtype
13830 echo "$as_me:13830: checking whether to enable _LP64 definition in curses.h" >&5
13831 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13832
13833 # Check whether --enable-lp64 or --disable-lp64 was given.
13834 if test "${enable_lp64+set}" = set; then
13835   enableval="$enable_lp64"
13836   with_lp64=$enableval
13837 else
13838   with_lp64=$cf_dft_with_lp64
13839 fi;
13840 echo "$as_me:13840: result: $with_lp64" >&5
13841 echo "${ECHO_T}$with_lp64" >&6
13842
13843 if test "x$with_lp64" = xyes ; then
13844         cf_cv_enable_lp64=1
13845 else
13846         cf_cv_enable_lp64=0
13847 fi
13848
13849 # Check whether --enable-largefile or --disable-largefile was given.
13850 if test "${enable_largefile+set}" = set; then
13851   enableval="$enable_largefile"
13852
13853 fi;
13854 if test "$enable_largefile" != no; then
13855
13856   echo "$as_me:13856: checking for special C compiler options needed for large files" >&5
13857 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13858 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13859   echo $ECHO_N "(cached) $ECHO_C" >&6
13860 else
13861   ac_cv_sys_largefile_CC=no
13862      if test "$GCC" != yes; then
13863        ac_save_CC=$CC
13864        while :; do
13865          # IRIX 6.2 and later do not support large files by default,
13866          # so use the C compiler's -n32 option if that helps.
13867          cat >"conftest.$ac_ext" <<_ACEOF
13868 #line 13868 "configure"
13869 #include "confdefs.h"
13870 #include <sys/types.h>
13871  /* Check that off_t can represent 2**63 - 1 correctly.
13872     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13873     since some C++ compilers masquerading as C compilers
13874     incorrectly reject 9223372036854775807.  */
13875 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13876   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13877                        && LARGE_OFF_T % 2147483647 == 1)
13878                       ? 1 : -1];
13879 int
13880 main (void)
13881 {
13882
13883   ;
13884   return 0;
13885 }
13886 _ACEOF
13887          rm -f "conftest.$ac_objext"
13888 if { (eval echo "$as_me:13888: \"$ac_compile\"") >&5
13889   (eval $ac_compile) 2>&5
13890   ac_status=$?
13891   echo "$as_me:13891: \$? = $ac_status" >&5
13892   (exit "$ac_status"); } &&
13893          { ac_try='test -s "conftest.$ac_objext"'
13894   { (eval echo "$as_me:13894: \"$ac_try\"") >&5
13895   (eval $ac_try) 2>&5
13896   ac_status=$?
13897   echo "$as_me:13897: \$? = $ac_status" >&5
13898   (exit "$ac_status"); }; }; then
13899   break
13900 else
13901   echo "$as_me: failed program was:" >&5
13902 cat "conftest.$ac_ext" >&5
13903 fi
13904 rm -f "conftest.$ac_objext"
13905          CC="$CC -n32"
13906          rm -f "conftest.$ac_objext"
13907 if { (eval echo "$as_me:13907: \"$ac_compile\"") >&5
13908   (eval $ac_compile) 2>&5
13909   ac_status=$?
13910   echo "$as_me:13910: \$? = $ac_status" >&5
13911   (exit "$ac_status"); } &&
13912          { ac_try='test -s "conftest.$ac_objext"'
13913   { (eval echo "$as_me:13913: \"$ac_try\"") >&5
13914   (eval $ac_try) 2>&5
13915   ac_status=$?
13916   echo "$as_me:13916: \$? = $ac_status" >&5
13917   (exit "$ac_status"); }; }; then
13918   ac_cv_sys_largefile_CC=' -n32'; break
13919 else
13920   echo "$as_me: failed program was:" >&5
13921 cat "conftest.$ac_ext" >&5
13922 fi
13923 rm -f "conftest.$ac_objext"
13924          break
13925        done
13926        CC=$ac_save_CC
13927        rm -f "conftest.$ac_ext"
13928     fi
13929 fi
13930 echo "$as_me:13930: result: $ac_cv_sys_largefile_CC" >&5
13931 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13932   if test "$ac_cv_sys_largefile_CC" != no; then
13933     CC=$CC$ac_cv_sys_largefile_CC
13934   fi
13935
13936   echo "$as_me:13936: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13937 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13938 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13939   echo $ECHO_N "(cached) $ECHO_C" >&6
13940 else
13941   while :; do
13942   ac_cv_sys_file_offset_bits=no
13943   cat >"conftest.$ac_ext" <<_ACEOF
13944 #line 13944 "configure"
13945 #include "confdefs.h"
13946 #include <sys/types.h>
13947  /* Check that off_t can represent 2**63 - 1 correctly.
13948     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13949     since some C++ compilers masquerading as C compilers
13950     incorrectly reject 9223372036854775807.  */
13951 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13952   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13953                        && LARGE_OFF_T % 2147483647 == 1)
13954                       ? 1 : -1];
13955 int
13956 main (void)
13957 {
13958
13959   ;
13960   return 0;
13961 }
13962 _ACEOF
13963 rm -f "conftest.$ac_objext"
13964 if { (eval echo "$as_me:13964: \"$ac_compile\"") >&5
13965   (eval $ac_compile) 2>&5
13966   ac_status=$?
13967   echo "$as_me:13967: \$? = $ac_status" >&5
13968   (exit "$ac_status"); } &&
13969          { ac_try='test -s "conftest.$ac_objext"'
13970   { (eval echo "$as_me:13970: \"$ac_try\"") >&5
13971   (eval $ac_try) 2>&5
13972   ac_status=$?
13973   echo "$as_me:13973: \$? = $ac_status" >&5
13974   (exit "$ac_status"); }; }; then
13975   break
13976 else
13977   echo "$as_me: failed program was:" >&5
13978 cat "conftest.$ac_ext" >&5
13979 fi
13980 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13981   cat >"conftest.$ac_ext" <<_ACEOF
13982 #line 13982 "configure"
13983 #include "confdefs.h"
13984 #define _FILE_OFFSET_BITS 64
13985 #include <sys/types.h>
13986  /* Check that off_t can represent 2**63 - 1 correctly.
13987     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13988     since some C++ compilers masquerading as C compilers
13989     incorrectly reject 9223372036854775807.  */
13990 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13991   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13992                        && LARGE_OFF_T % 2147483647 == 1)
13993                       ? 1 : -1];
13994 int
13995 main (void)
13996 {
13997
13998   ;
13999   return 0;
14000 }
14001 _ACEOF
14002 rm -f "conftest.$ac_objext"
14003 if { (eval echo "$as_me:14003: \"$ac_compile\"") >&5
14004   (eval $ac_compile) 2>&5
14005   ac_status=$?
14006   echo "$as_me:14006: \$? = $ac_status" >&5
14007   (exit "$ac_status"); } &&
14008          { ac_try='test -s "conftest.$ac_objext"'
14009   { (eval echo "$as_me:14009: \"$ac_try\"") >&5
14010   (eval $ac_try) 2>&5
14011   ac_status=$?
14012   echo "$as_me:14012: \$? = $ac_status" >&5
14013   (exit "$ac_status"); }; }; then
14014   ac_cv_sys_file_offset_bits=64; break
14015 else
14016   echo "$as_me: failed program was:" >&5
14017 cat "conftest.$ac_ext" >&5
14018 fi
14019 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14020   break
14021 done
14022 fi
14023 echo "$as_me:14023: result: $ac_cv_sys_file_offset_bits" >&5
14024 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14025 if test "$ac_cv_sys_file_offset_bits" != no; then
14026
14027 cat >>confdefs.h <<EOF
14028 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14029 EOF
14030
14031 fi
14032 rm -rf conftest*
14033   echo "$as_me:14033: checking for _LARGE_FILES value needed for large files" >&5
14034 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14035 if test "${ac_cv_sys_large_files+set}" = set; then
14036   echo $ECHO_N "(cached) $ECHO_C" >&6
14037 else
14038   while :; do
14039   ac_cv_sys_large_files=no
14040   cat >"conftest.$ac_ext" <<_ACEOF
14041 #line 14041 "configure"
14042 #include "confdefs.h"
14043 #include <sys/types.h>
14044  /* Check that off_t can represent 2**63 - 1 correctly.
14045     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14046     since some C++ compilers masquerading as C compilers
14047     incorrectly reject 9223372036854775807.  */
14048 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14049   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14050                        && LARGE_OFF_T % 2147483647 == 1)
14051                       ? 1 : -1];
14052 int
14053 main (void)
14054 {
14055
14056   ;
14057   return 0;
14058 }
14059 _ACEOF
14060 rm -f "conftest.$ac_objext"
14061 if { (eval echo "$as_me:14061: \"$ac_compile\"") >&5
14062   (eval $ac_compile) 2>&5
14063   ac_status=$?
14064   echo "$as_me:14064: \$? = $ac_status" >&5
14065   (exit "$ac_status"); } &&
14066          { ac_try='test -s "conftest.$ac_objext"'
14067   { (eval echo "$as_me:14067: \"$ac_try\"") >&5
14068   (eval $ac_try) 2>&5
14069   ac_status=$?
14070   echo "$as_me:14070: \$? = $ac_status" >&5
14071   (exit "$ac_status"); }; }; then
14072   break
14073 else
14074   echo "$as_me: failed program was:" >&5
14075 cat "conftest.$ac_ext" >&5
14076 fi
14077 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14078   cat >"conftest.$ac_ext" <<_ACEOF
14079 #line 14079 "configure"
14080 #include "confdefs.h"
14081 #define _LARGE_FILES 1
14082 #include <sys/types.h>
14083  /* Check that off_t can represent 2**63 - 1 correctly.
14084     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14085     since some C++ compilers masquerading as C compilers
14086     incorrectly reject 9223372036854775807.  */
14087 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14088   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14089                        && LARGE_OFF_T % 2147483647 == 1)
14090                       ? 1 : -1];
14091 int
14092 main (void)
14093 {
14094
14095   ;
14096   return 0;
14097 }
14098 _ACEOF
14099 rm -f "conftest.$ac_objext"
14100 if { (eval echo "$as_me:14100: \"$ac_compile\"") >&5
14101   (eval $ac_compile) 2>&5
14102   ac_status=$?
14103   echo "$as_me:14103: \$? = $ac_status" >&5
14104   (exit "$ac_status"); } &&
14105          { ac_try='test -s "conftest.$ac_objext"'
14106   { (eval echo "$as_me:14106: \"$ac_try\"") >&5
14107   (eval $ac_try) 2>&5
14108   ac_status=$?
14109   echo "$as_me:14109: \$? = $ac_status" >&5
14110   (exit "$ac_status"); }; }; then
14111   ac_cv_sys_large_files=1; break
14112 else
14113   echo "$as_me: failed program was:" >&5
14114 cat "conftest.$ac_ext" >&5
14115 fi
14116 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14117   break
14118 done
14119 fi
14120 echo "$as_me:14120: result: $ac_cv_sys_large_files" >&5
14121 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14122 if test "$ac_cv_sys_large_files" != no; then
14123
14124 cat >>confdefs.h <<EOF
14125 #define _LARGE_FILES $ac_cv_sys_large_files
14126 EOF
14127
14128 fi
14129 rm -rf conftest*
14130 fi
14131
14132         if test "$enable_largefile" != no ; then
14133         echo "$as_me:14133: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14134 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14135 if test "${ac_cv_sys_largefile_source+set}" = set; then
14136   echo $ECHO_N "(cached) $ECHO_C" >&6
14137 else
14138   while :; do
14139   ac_cv_sys_largefile_source=no
14140   cat >"conftest.$ac_ext" <<_ACEOF
14141 #line 14141 "configure"
14142 #include "confdefs.h"
14143 #include <stdio.h>
14144 int
14145 main (void)
14146 {
14147 return !fseeko;
14148   ;
14149   return 0;
14150 }
14151 _ACEOF
14152 rm -f "conftest.$ac_objext"
14153 if { (eval echo "$as_me:14153: \"$ac_compile\"") >&5
14154   (eval $ac_compile) 2>&5
14155   ac_status=$?
14156   echo "$as_me:14156: \$? = $ac_status" >&5
14157   (exit "$ac_status"); } &&
14158          { ac_try='test -s "conftest.$ac_objext"'
14159   { (eval echo "$as_me:14159: \"$ac_try\"") >&5
14160   (eval $ac_try) 2>&5
14161   ac_status=$?
14162   echo "$as_me:14162: \$? = $ac_status" >&5
14163   (exit "$ac_status"); }; }; then
14164   break
14165 else
14166   echo "$as_me: failed program was:" >&5
14167 cat "conftest.$ac_ext" >&5
14168 fi
14169 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14170   cat >"conftest.$ac_ext" <<_ACEOF
14171 #line 14171 "configure"
14172 #include "confdefs.h"
14173 #define _LARGEFILE_SOURCE 1
14174 #include <stdio.h>
14175 int
14176 main (void)
14177 {
14178 return !fseeko;
14179   ;
14180   return 0;
14181 }
14182 _ACEOF
14183 rm -f "conftest.$ac_objext"
14184 if { (eval echo "$as_me:14184: \"$ac_compile\"") >&5
14185   (eval $ac_compile) 2>&5
14186   ac_status=$?
14187   echo "$as_me:14187: \$? = $ac_status" >&5
14188   (exit "$ac_status"); } &&
14189          { ac_try='test -s "conftest.$ac_objext"'
14190   { (eval echo "$as_me:14190: \"$ac_try\"") >&5
14191   (eval $ac_try) 2>&5
14192   ac_status=$?
14193   echo "$as_me:14193: \$? = $ac_status" >&5
14194   (exit "$ac_status"); }; }; then
14195   ac_cv_sys_largefile_source=1; break
14196 else
14197   echo "$as_me: failed program was:" >&5
14198 cat "conftest.$ac_ext" >&5
14199 fi
14200 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14201   break
14202 done
14203 fi
14204 echo "$as_me:14204: result: $ac_cv_sys_largefile_source" >&5
14205 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14206 if test "$ac_cv_sys_largefile_source" != no; then
14207
14208 cat >>confdefs.h <<EOF
14209 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14210 EOF
14211
14212 fi
14213 rm -rf conftest*
14214
14215 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14216 # in glibc 2.1.3, but that breaks too many other things.
14217 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14218 echo "$as_me:14218: checking for fseeko" >&5
14219 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14220 if test "${ac_cv_func_fseeko+set}" = set; then
14221   echo $ECHO_N "(cached) $ECHO_C" >&6
14222 else
14223   cat >"conftest.$ac_ext" <<_ACEOF
14224 #line 14224 "configure"
14225 #include "confdefs.h"
14226 #include <stdio.h>
14227 int
14228 main (void)
14229 {
14230 return fseeko && fseeko (stdin, 0, 0);
14231   ;
14232   return 0;
14233 }
14234 _ACEOF
14235 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14236 if { (eval echo "$as_me:14236: \"$ac_link\"") >&5
14237   (eval $ac_link) 2>&5
14238   ac_status=$?
14239   echo "$as_me:14239: \$? = $ac_status" >&5
14240   (exit "$ac_status"); } &&
14241          { ac_try='test -s "conftest$ac_exeext"'
14242   { (eval echo "$as_me:14242: \"$ac_try\"") >&5
14243   (eval $ac_try) 2>&5
14244   ac_status=$?
14245   echo "$as_me:14245: \$? = $ac_status" >&5
14246   (exit "$ac_status"); }; }; then
14247   ac_cv_func_fseeko=yes
14248 else
14249   echo "$as_me: failed program was:" >&5
14250 cat "conftest.$ac_ext" >&5
14251 ac_cv_func_fseeko=no
14252 fi
14253 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14254 fi
14255 echo "$as_me:14255: result: $ac_cv_func_fseeko" >&5
14256 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14257 if test $ac_cv_func_fseeko = yes; then
14258
14259 cat >>confdefs.h <<\EOF
14260 #define HAVE_FSEEKO 1
14261 EOF
14262
14263 fi
14264
14265         # Normally we would collect these definitions in the config.h,
14266         # but (like _XOPEN_SOURCE), some environments rely on having these
14267         # defined before any of the system headers are included.  Another
14268         # case comes up with C++, e.g., on AIX the compiler compiles the
14269         # header files by themselves before looking at the body files it is
14270         # told to compile.  For ncurses, those header files do not include
14271         # the config.h
14272         if test "$ac_cv_sys_large_files" != no
14273         then
14274
14275         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14276         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14277
14278         fi
14279         if test "$ac_cv_sys_largefile_source" != no
14280         then
14281
14282         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14283         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14284
14285         fi
14286         if test "$ac_cv_sys_file_offset_bits" != no
14287         then
14288
14289         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14290         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14291
14292         fi
14293
14294         echo "$as_me:14294: checking whether to use struct dirent64" >&5
14295 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14296 if test "${cf_cv_struct_dirent64+set}" = set; then
14297   echo $ECHO_N "(cached) $ECHO_C" >&6
14298 else
14299
14300                 cat >"conftest.$ac_ext" <<_ACEOF
14301 #line 14301 "configure"
14302 #include "confdefs.h"
14303
14304 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14305 #include <sys/types.h>
14306 #include <dirent.h>
14307
14308 int
14309 main (void)
14310 {
14311
14312                 /* if transitional largefile support is setup, this is true */
14313                 extern struct dirent64 * readdir(DIR *);
14314                 struct dirent64 *x = readdir((DIR *)0);
14315                 struct dirent *y = readdir((DIR *)0);
14316                 int z = x - y;
14317                 (void)z;
14318
14319   ;
14320   return 0;
14321 }
14322 _ACEOF
14323 rm -f "conftest.$ac_objext"
14324 if { (eval echo "$as_me:14324: \"$ac_compile\"") >&5
14325   (eval $ac_compile) 2>&5
14326   ac_status=$?
14327   echo "$as_me:14327: \$? = $ac_status" >&5
14328   (exit "$ac_status"); } &&
14329          { ac_try='test -s "conftest.$ac_objext"'
14330   { (eval echo "$as_me:14330: \"$ac_try\"") >&5
14331   (eval $ac_try) 2>&5
14332   ac_status=$?
14333   echo "$as_me:14333: \$? = $ac_status" >&5
14334   (exit "$ac_status"); }; }; then
14335   cf_cv_struct_dirent64=yes
14336 else
14337   echo "$as_me: failed program was:" >&5
14338 cat "conftest.$ac_ext" >&5
14339 cf_cv_struct_dirent64=no
14340 fi
14341 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14342
14343 fi
14344 echo "$as_me:14344: result: $cf_cv_struct_dirent64" >&5
14345 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14346         test "$cf_cv_struct_dirent64" = yes &&
14347 cat >>confdefs.h <<\EOF
14348 #define HAVE_STRUCT_DIRENT64 1
14349 EOF
14350
14351         fi
14352
14353 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14354 echo "$as_me:14354: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14355 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14356
14357 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14358 if test "${enable_tparm_varargs+set}" = set; then
14359   enableval="$enable_tparm_varargs"
14360   with_tparm_varargs=$enableval
14361 else
14362   with_tparm_varargs=yes
14363 fi;
14364 echo "$as_me:14364: result: $with_tparm_varargs" >&5
14365 echo "${ECHO_T}$with_tparm_varargs" >&6
14366 NCURSES_TPARM_VARARGS=0
14367 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14368
14369 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14370 if test "$with_ticlib" != no ; then
14371 echo "$as_me:14371: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14372 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14373
14374 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14375 if test "${enable_tic_depends+set}" = set; then
14376   enableval="$enable_tic_depends"
14377   with_tic_depends=$enableval
14378 else
14379   with_tic_depends=yes
14380 fi;
14381 echo "$as_me:14381: result: $with_tic_depends" >&5
14382 echo "${ECHO_T}$with_tic_depends" >&6
14383 else
14384         with_tic_depends=no
14385 fi
14386
14387 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14388 echo "$as_me:14388: checking if you want to enable wattr* macros" >&5
14389 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14390
14391 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14392 if test "${enable_wattr_macros+set}" = set; then
14393   enableval="$enable_wattr_macros"
14394   with_wattr_macros=$enableval
14395 else
14396   with_wattr_macros=no
14397 fi;
14398 if [ "x$with_wattr_macros" != xyes ]; then
14399         NCURSES_WATTR_MACROS=0
14400         echo "$as_me:14400: result: no" >&5
14401 echo "${ECHO_T}no" >&6
14402 else
14403         NCURSES_WATTR_MACROS=1
14404         echo "$as_me:14404: result: yes" >&5
14405 echo "${ECHO_T}yes" >&6
14406 fi
14407
14408 echo "$as_me:14408: checking for X11 rgb file" >&5
14409 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14410
14411 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14412 if test "${with_x11_rgb+set}" = set; then
14413   withval="$with_x11_rgb"
14414   RGB_PATH=$withval
14415 else
14416   RGB_PATH=auto
14417 fi;
14418
14419 if test "x$RGB_PATH" = xauto
14420 then
14421         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14422         for cf_path in \
14423                 /opt/local/share/X11/rgb.txt \
14424                 /opt/X11/share/X11/rgb.txt \
14425                 /usr/share/X11/rgb.txt \
14426                 /usr/X11/share/X11/rgb.txt \
14427                 /usr/X11/lib/X11/rgb.txt \
14428                 /usr/lib/X11/rgb.txt \
14429                 /etc/X11/rgb.txt \
14430                 /usr/pkg/lib/X11/rgb.txt \
14431                 /usr/X11R7/lib/X11/rgb.txt \
14432                 /usr/X11R6/lib/X11/rgb.txt \
14433                 /usr/X11R5/lib/X11/rgb.txt \
14434                 /usr/X11R4/lib/X11/rgb.txt \
14435                 /usr/local/lib/X11/rgb.txt \
14436                 /usr/local/share/X11/rgb.txt \
14437                 /usr/lib64/X11/rgb.txt
14438         do
14439                 if test -f "$cf_path" ; then
14440                         RGB_PATH="$cf_path"
14441                         break
14442                 fi
14443         done
14444 else
14445         cf_path=$RGB_PATH
14446
14447 if test "x$prefix" != xNONE; then
14448         cf_path_syntax="$prefix"
14449 else
14450         cf_path_syntax="$ac_default_prefix"
14451 fi
14452
14453 case ".$cf_path" in
14454 (.\$\(*\)*|.\'*\'*)
14455         ;;
14456 (..|./*|.\\*)
14457         ;;
14458 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14459         ;;
14460 (.\$\{*prefix\}*|.\$\{*dir\}*)
14461         eval cf_path="$cf_path"
14462         case ".$cf_path" in
14463         (.NONE/*)
14464                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14465                 ;;
14466         esac
14467         ;;
14468 (.no|.NONE/*)
14469         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14470         ;;
14471 (*)
14472         { { echo "$as_me:14472: error: expected a pathname, not \"$cf_path\"" >&5
14473 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14474    { (exit 1); exit 1; }; }
14475         ;;
14476 esac
14477
14478 fi
14479
14480 echo "$as_me:14480: result: $RGB_PATH" >&5
14481 echo "${ECHO_T}$RGB_PATH" >&6
14482
14483 cat >>confdefs.h <<EOF
14484 #define RGB_PATH "$cf_path"
14485 EOF
14486
14487 no_x11_rgb=
14488 if test "$RGB_PATH" = no
14489 then
14490         no_x11_rgb="#"
14491 fi
14492
14493 ###   use option --with-bool to override bool's type
14494 echo "$as_me:14494: checking for type of bool" >&5
14495 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14496
14497 # Check whether --with-bool or --without-bool was given.
14498 if test "${with_bool+set}" = set; then
14499   withval="$with_bool"
14500   NCURSES_BOOL="$withval"
14501 else
14502   NCURSES_BOOL=auto
14503 fi;
14504 echo "$as_me:14504: result: $NCURSES_BOOL" >&5
14505 echo "${ECHO_T}$NCURSES_BOOL" >&6
14506
14507 echo "$as_me:14507: checking for alternate terminal capabilities file" >&5
14508 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14509
14510 # Check whether --with-caps or --without-caps was given.
14511 if test "${with_caps+set}" = set; then
14512   withval="$with_caps"
14513   TERMINFO_CAPS=Caps.$withval
14514 else
14515   TERMINFO_CAPS=Caps
14516 fi;
14517 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14518 then
14519         { echo "$as_me:14519: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14520 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14521         TERMINFO_CAPS=Caps
14522 fi
14523 echo "$as_me:14523: result: $TERMINFO_CAPS" >&5
14524 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14525
14526 ###   use option --with-chtype to override chtype's type
14527 echo "$as_me:14527: checking for type of chtype" >&5
14528 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14529
14530 # Check whether --with-chtype or --without-chtype was given.
14531 if test "${with_chtype+set}" = set; then
14532   withval="$with_chtype"
14533   NCURSES_CHTYPE="$withval"
14534 else
14535   NCURSES_CHTYPE=$cf_dft_chtype
14536 fi;
14537 echo "$as_me:14537: result: $NCURSES_CHTYPE" >&5
14538 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14539
14540 ###   use option --with-ospeed to override ospeed's type
14541 echo "$as_me:14541: checking for type of ospeed" >&5
14542 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14543
14544 # Check whether --with-ospeed or --without-ospeed was given.
14545 if test "${with_ospeed+set}" = set; then
14546   withval="$with_ospeed"
14547   NCURSES_OSPEED="$withval"
14548 else
14549   NCURSES_OSPEED=short
14550 fi;
14551 echo "$as_me:14551: result: $NCURSES_OSPEED" >&5
14552 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14553
14554 ###   use option --with-mmask-t to override mmask_t's type
14555 echo "$as_me:14555: checking for type of mmask_t" >&5
14556 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14557
14558 # Check whether --with-mmask-t or --without-mmask-t was given.
14559 if test "${with_mmask_t+set}" = set; then
14560   withval="$with_mmask_t"
14561   NCURSES_MMASK_T="$withval"
14562 else
14563   NCURSES_MMASK_T=$cf_dft_mmask_t
14564 fi;
14565 echo "$as_me:14565: result: $NCURSES_MMASK_T" >&5
14566 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14567
14568 ###   use option --with-ccharw-max to override CCHARW_MAX size
14569 echo "$as_me:14569: checking for size CCHARW_MAX" >&5
14570 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14571
14572 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14573 if test "${with_ccharw_max+set}" = set; then
14574   withval="$with_ccharw_max"
14575   NCURSES_CCHARW_MAX="$withval"
14576 else
14577   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14578 fi;
14579 echo "$as_me:14579: result: $NCURSES_CCHARW_MAX" >&5
14580 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14581
14582 echo "$as_me:14582: checking for signed char" >&5
14583 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14584 if test "${ac_cv_type_signed_char+set}" = set; then
14585   echo $ECHO_N "(cached) $ECHO_C" >&6
14586 else
14587   cat >"conftest.$ac_ext" <<_ACEOF
14588 #line 14588 "configure"
14589 #include "confdefs.h"
14590 $ac_includes_default
14591 int
14592 main (void)
14593 {
14594 if ((signed char *) 0)
14595   return 0;
14596 if (sizeof (signed char))
14597   return 0;
14598   ;
14599   return 0;
14600 }
14601 _ACEOF
14602 rm -f "conftest.$ac_objext"
14603 if { (eval echo "$as_me:14603: \"$ac_compile\"") >&5
14604   (eval $ac_compile) 2>&5
14605   ac_status=$?
14606   echo "$as_me:14606: \$? = $ac_status" >&5
14607   (exit "$ac_status"); } &&
14608          { ac_try='test -s "conftest.$ac_objext"'
14609   { (eval echo "$as_me:14609: \"$ac_try\"") >&5
14610   (eval $ac_try) 2>&5
14611   ac_status=$?
14612   echo "$as_me:14612: \$? = $ac_status" >&5
14613   (exit "$ac_status"); }; }; then
14614   ac_cv_type_signed_char=yes
14615 else
14616   echo "$as_me: failed program was:" >&5
14617 cat "conftest.$ac_ext" >&5
14618 ac_cv_type_signed_char=no
14619 fi
14620 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14621 fi
14622 echo "$as_me:14622: result: $ac_cv_type_signed_char" >&5
14623 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14624
14625 echo "$as_me:14625: checking size of signed char" >&5
14626 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14627 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14628   echo $ECHO_N "(cached) $ECHO_C" >&6
14629 else
14630   if test "$ac_cv_type_signed_char" = yes; then
14631   if test "$cross_compiling" = yes; then
14632   # Depending upon the size, compute the lo and hi bounds.
14633 cat >"conftest.$ac_ext" <<_ACEOF
14634 #line 14634 "configure"
14635 #include "confdefs.h"
14636 $ac_includes_default
14637 int
14638 main (void)
14639 {
14640 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14641   ;
14642   return 0;
14643 }
14644 _ACEOF
14645 rm -f "conftest.$ac_objext"
14646 if { (eval echo "$as_me:14646: \"$ac_compile\"") >&5
14647   (eval $ac_compile) 2>&5
14648   ac_status=$?
14649   echo "$as_me:14649: \$? = $ac_status" >&5
14650   (exit "$ac_status"); } &&
14651          { ac_try='test -s "conftest.$ac_objext"'
14652   { (eval echo "$as_me:14652: \"$ac_try\"") >&5
14653   (eval $ac_try) 2>&5
14654   ac_status=$?
14655   echo "$as_me:14655: \$? = $ac_status" >&5
14656   (exit "$ac_status"); }; }; then
14657   ac_lo=0 ac_mid=0
14658   while :; do
14659     cat >"conftest.$ac_ext" <<_ACEOF
14660 #line 14660 "configure"
14661 #include "confdefs.h"
14662 $ac_includes_default
14663 int
14664 main (void)
14665 {
14666 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14667   ;
14668   return 0;
14669 }
14670 _ACEOF
14671 rm -f "conftest.$ac_objext"
14672 if { (eval echo "$as_me:14672: \"$ac_compile\"") >&5
14673   (eval $ac_compile) 2>&5
14674   ac_status=$?
14675   echo "$as_me:14675: \$? = $ac_status" >&5
14676   (exit "$ac_status"); } &&
14677          { ac_try='test -s "conftest.$ac_objext"'
14678   { (eval echo "$as_me:14678: \"$ac_try\"") >&5
14679   (eval $ac_try) 2>&5
14680   ac_status=$?
14681   echo "$as_me:14681: \$? = $ac_status" >&5
14682   (exit "$ac_status"); }; }; then
14683   ac_hi=$ac_mid; break
14684 else
14685   echo "$as_me: failed program was:" >&5
14686 cat "conftest.$ac_ext" >&5
14687 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14688 fi
14689 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14690   done
14691 else
14692   echo "$as_me: failed program was:" >&5
14693 cat "conftest.$ac_ext" >&5
14694 ac_hi=-1 ac_mid=-1
14695   while :; do
14696     cat >"conftest.$ac_ext" <<_ACEOF
14697 #line 14697 "configure"
14698 #include "confdefs.h"
14699 $ac_includes_default
14700 int
14701 main (void)
14702 {
14703 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14704   ;
14705   return 0;
14706 }
14707 _ACEOF
14708 rm -f "conftest.$ac_objext"
14709 if { (eval echo "$as_me:14709: \"$ac_compile\"") >&5
14710   (eval $ac_compile) 2>&5
14711   ac_status=$?
14712   echo "$as_me:14712: \$? = $ac_status" >&5
14713   (exit "$ac_status"); } &&
14714          { ac_try='test -s "conftest.$ac_objext"'
14715   { (eval echo "$as_me:14715: \"$ac_try\"") >&5
14716   (eval $ac_try) 2>&5
14717   ac_status=$?
14718   echo "$as_me:14718: \$? = $ac_status" >&5
14719   (exit "$ac_status"); }; }; then
14720   ac_lo=$ac_mid; break
14721 else
14722   echo "$as_me: failed program was:" >&5
14723 cat "conftest.$ac_ext" >&5
14724 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14725 fi
14726 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14727   done
14728 fi
14729 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14730 # Binary search between lo and hi bounds.
14731 while test "x$ac_lo" != "x$ac_hi"; do
14732   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14733   cat >"conftest.$ac_ext" <<_ACEOF
14734 #line 14734 "configure"
14735 #include "confdefs.h"
14736 $ac_includes_default
14737 int
14738 main (void)
14739 {
14740 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14741   ;
14742   return 0;
14743 }
14744 _ACEOF
14745 rm -f "conftest.$ac_objext"
14746 if { (eval echo "$as_me:14746: \"$ac_compile\"") >&5
14747   (eval $ac_compile) 2>&5
14748   ac_status=$?
14749   echo "$as_me:14749: \$? = $ac_status" >&5
14750   (exit "$ac_status"); } &&
14751          { ac_try='test -s "conftest.$ac_objext"'
14752   { (eval echo "$as_me:14752: \"$ac_try\"") >&5
14753   (eval $ac_try) 2>&5
14754   ac_status=$?
14755   echo "$as_me:14755: \$? = $ac_status" >&5
14756   (exit "$ac_status"); }; }; then
14757   ac_hi=$ac_mid
14758 else
14759   echo "$as_me: failed program was:" >&5
14760 cat "conftest.$ac_ext" >&5
14761 ac_lo=`expr "$ac_mid" + 1`
14762 fi
14763 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14764 done
14765 ac_cv_sizeof_signed_char=$ac_lo
14766 else
14767   if test "$cross_compiling" = yes; then
14768   { { echo "$as_me:14768: error: cannot run test program while cross compiling" >&5
14769 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14770    { (exit 1); exit 1; }; }
14771 else
14772   cat >"conftest.$ac_ext" <<_ACEOF
14773 #line 14773 "configure"
14774 #include "confdefs.h"
14775 $ac_includes_default
14776 int
14777 main (void)
14778 {
14779 FILE *f = fopen ("conftest.val", "w");
14780 if (!f)
14781   $ac_main_return (1);
14782 fprintf (f, "%ld", (long)(sizeof (signed char)));
14783 fclose (f);
14784   ;
14785   return 0;
14786 }
14787 _ACEOF
14788 rm -f "conftest$ac_exeext"
14789 if { (eval echo "$as_me:14789: \"$ac_link\"") >&5
14790   (eval $ac_link) 2>&5
14791   ac_status=$?
14792   echo "$as_me:14792: \$? = $ac_status" >&5
14793   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14794   { (eval echo "$as_me:14794: \"$ac_try\"") >&5
14795   (eval $ac_try) 2>&5
14796   ac_status=$?
14797   echo "$as_me:14797: \$? = $ac_status" >&5
14798   (exit "$ac_status"); }; }; then
14799   ac_cv_sizeof_signed_char=`cat conftest.val`
14800 else
14801   echo "$as_me: program exited with status $ac_status" >&5
14802 echo "$as_me: failed program was:" >&5
14803 cat "conftest.$ac_ext" >&5
14804 fi
14805 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14806 fi
14807 fi
14808 rm -f conftest.val
14809 else
14810   ac_cv_sizeof_signed_char=0
14811 fi
14812 fi
14813 echo "$as_me:14813: result: $ac_cv_sizeof_signed_char" >&5
14814 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14815 cat >>confdefs.h <<EOF
14816 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14817 EOF
14818
14819 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14820         NCURSES_SBOOL="signed char"
14821 else
14822         NCURSES_SBOOL="char"
14823 fi
14824 echo "$as_me:14824: checking if you want to use signed Boolean array in term.h" >&5
14825 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14826
14827 # Check whether --enable-signed-char or --disable-signed-char was given.
14828 if test "${enable_signed_char+set}" = set; then
14829   enableval="$enable_signed_char"
14830   with_signed_char=$enableval
14831 else
14832   with_signed_char=$cf_dft_signed_char
14833 fi;
14834 echo "$as_me:14834: result: $with_signed_char" >&5
14835 echo "${ECHO_T}$with_signed_char" >&6
14836 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14837
14838 ###   use option --with-tparm-arg to override tparm's argument type
14839 echo "$as_me:14839: checking for type of tparm args" >&5
14840 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14841
14842 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14843 if test "${with_tparm_arg+set}" = set; then
14844   withval="$with_tparm_arg"
14845   NCURSES_TPARM_ARG="$withval"
14846 else
14847   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14848 fi;
14849 echo "$as_me:14849: result: $NCURSES_TPARM_ARG" >&5
14850 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14851
14852 ### Enable compiling-in rcs id's
14853 echo "$as_me:14853: checking if RCS identifiers should be compiled-in" >&5
14854 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14855
14856 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14857 if test "${with_rcs_ids+set}" = set; then
14858   withval="$with_rcs_ids"
14859   with_rcs_ids=$withval
14860 else
14861   with_rcs_ids=no
14862 fi;
14863 echo "$as_me:14863: result: $with_rcs_ids" >&5
14864 echo "${ECHO_T}$with_rcs_ids" >&6
14865 test "x$with_rcs_ids" = xyes &&
14866 cat >>confdefs.h <<\EOF
14867 #define USE_RCS_IDS 1
14868 EOF
14869
14870 ###############################################################################
14871
14872 echo "$as_me:14872: checking format of man-pages" >&5
14873 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14874
14875 # Check whether --with-manpage-format or --without-manpage-format was given.
14876 if test "${with_manpage_format+set}" = set; then
14877   withval="$with_manpage_format"
14878   MANPAGE_FORMAT=$withval
14879 else
14880   MANPAGE_FORMAT=unknown
14881 fi;
14882
14883 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14884 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14885
14886 cf_unknown=
14887
14888 case "$MANPAGE_FORMAT" in
14889 (unknown)
14890         if test -z "$MANPATH" ; then
14891                 MANPATH="/usr/man:/usr/share/man"
14892         fi
14893
14894         # look for the 'date' man-page (it is most likely to be installed!)
14895         MANPAGE_FORMAT=
14896         cf_preform="no"
14897         cf_catonly="yes"
14898         cf_example="date"
14899
14900         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14901         for cf_dir in $MANPATH; do
14902                 test -z "$cf_dir" && cf_dir=/usr/man
14903                 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
14904                 do
14905                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14906                         if test "x$cf_test" = "x$cf_name" ; then
14907
14908                                 case "$cf_name" in
14909                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14910                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14911                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14912                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14913                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14914                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14915                                 esac
14916
14917                                 case "$cf_name" in
14918                                 ($cf_dir/man*)
14919                                         cf_catonly=no
14920                                         ;;
14921                                 ($cf_dir/cat*)
14922                                         cf_preform=yes
14923                                         ;;
14924                                 esac
14925                                 break
14926                         fi
14927
14928                         # if we found a match in either man* or cat*, stop looking
14929                         if test -n "$MANPAGE_FORMAT" ; then
14930                                 cf_found=no
14931                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14932                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14933                                 case "$cf_name" in
14934                                 ($cf_dir/cat*)
14935                                         cf_found=yes
14936                                         ;;
14937                                 esac
14938                                 test "$cf_found" = yes && break
14939                         fi
14940                 done
14941                 # only check the first directory in $MANPATH where we find manpages
14942                 if test -n "$MANPAGE_FORMAT" ; then
14943                         break
14944                 fi
14945         done
14946         # if we did not find the example, just assume it is normal
14947         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14948         IFS="$ac_save_ifs"
14949         ;;
14950 (*)
14951         for cf_option in $MANPAGE_FORMAT; do
14952         case "$cf_option" in
14953         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
14954                 ;;
14955         (*)
14956                 cf_unknown="$cf_unknown $cf_option"
14957                 ;;
14958         esac
14959         done
14960         ;;
14961 esac
14962
14963 echo "$as_me:14963: result: $MANPAGE_FORMAT" >&5
14964 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14965 if test -n "$cf_unknown" ; then
14966         { echo "$as_me:14966: WARNING: Unexpected manpage-format $cf_unknown" >&5
14967 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14968 fi
14969
14970 cf_manpage_format=no
14971 cf_manpage_inboth=no
14972 cf_manpage_so_strip=
14973 cf_manpage_compress=
14974
14975 for cf_item in $MANPAGE_FORMAT
14976 do
14977 case "$cf_item" in
14978 (catonly)
14979         cf_manpage_format=yes
14980         cf_manpage_inboth=no
14981         ;;
14982 (formatted)
14983         cf_manpage_format=yes
14984         cf_manpage_inboth=yes
14985         ;;
14986 (compress)
14987         cf_manpage_so_strip="Z"
14988         cf_manpage_compress=compress
14989         ;;
14990 (gzip)
14991         cf_manpage_so_strip="gz"
14992         cf_manpage_compress=gzip
14993         ;;
14994 (bzip2)
14995         cf_manpage_so_strip="bz2"
14996         cf_manpage_compress=bzip2
14997         ;;
14998 (xz)
14999         cf_manpage_so_strip="xz"
15000         cf_manpage_compress=xz
15001         ;;
15002 esac
15003 done
15004
15005 echo "$as_me:15005: checking for manpage renaming" >&5
15006 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15007
15008 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15009 if test "${with_manpage_renames+set}" = set; then
15010   withval="$with_manpage_renames"
15011   MANPAGE_RENAMES=$withval
15012 else
15013   MANPAGE_RENAMES=yes
15014 fi;
15015
15016 case ".$MANPAGE_RENAMES" in
15017 (.no)
15018         ;;
15019 (.|.yes)
15020         # Debian 'man' program?
15021         if test -f /etc/debian_version ; then
15022                 MANPAGE_RENAMES=man/man_db.renames
15023         else
15024                 MANPAGE_RENAMES=no
15025         fi
15026         ;;
15027 esac
15028
15029 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15030         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15031 elif test "$MANPAGE_RENAMES" = no ; then
15032         :
15033 elif test ! -f "$MANPAGE_RENAMES" ; then
15034         { { echo "$as_me:15034: error: not a filename: $MANPAGE_RENAMES" >&5
15035 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15036    { (exit 1); exit 1; }; }
15037 fi
15038
15039 echo "$as_me:15039: result: $MANPAGE_RENAMES" >&5
15040 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15041
15042 echo "$as_me:15042: checking if manpage aliases will be installed" >&5
15043 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15044
15045 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15046 if test "${with_manpage_aliases+set}" = set; then
15047   withval="$with_manpage_aliases"
15048   MANPAGE_ALIASES=$withval
15049 else
15050   MANPAGE_ALIASES=yes
15051 fi;
15052
15053 echo "$as_me:15053: result: $MANPAGE_ALIASES" >&5
15054 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15055
15056 case "x$LN_S" in
15057 (xln*)
15058         cf_use_symlinks=yes
15059         ;;
15060 (*)
15061         cf_use_symlinks=no
15062         ;;
15063 esac
15064
15065 MANPAGE_SYMLINKS=no
15066 if test "$MANPAGE_ALIASES" = yes ; then
15067 echo "$as_me:15067: checking if manpage symlinks should be used" >&5
15068 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15069
15070 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15071 if test "${with_manpage_symlinks+set}" = set; then
15072   withval="$with_manpage_symlinks"
15073   MANPAGE_SYMLINKS=$withval
15074 else
15075   MANPAGE_SYMLINKS=$cf_use_symlinks
15076 fi;
15077
15078 if test "$cf_use_symlinks" = no; then
15079 if test "$MANPAGE_SYMLINKS" = yes ; then
15080         { echo "$as_me:15080: WARNING: cannot make symlinks" >&5
15081 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15082         MANPAGE_SYMLINKS=no
15083 fi
15084 fi
15085
15086 echo "$as_me:15086: result: $MANPAGE_SYMLINKS" >&5
15087 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15088 fi
15089
15090 echo "$as_me:15090: checking for manpage tbl" >&5
15091 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15092
15093 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15094 if test "${with_manpage_tbl+set}" = set; then
15095   withval="$with_manpage_tbl"
15096   MANPAGE_TBL=$withval
15097 else
15098   MANPAGE_TBL=no
15099 fi;
15100
15101 echo "$as_me:15101: result: $MANPAGE_TBL" >&5
15102 echo "${ECHO_T}$MANPAGE_TBL" >&6
15103
15104 if test "$prefix" = "NONE" ; then
15105         cf_prefix="$ac_default_prefix"
15106 else
15107         cf_prefix="$prefix"
15108 fi
15109
15110 test ! -d man && mkdir man
15111
15112 cf_edit_man=./edit_man.sh
15113 cf_man_alias=`pwd`/man_alias.sed
15114
15115 cat >$cf_edit_man <<CF_EOF
15116 #! $SHELL
15117 # this script is generated by the configure-script CF_MAN_PAGES macro.
15118
15119 prefix="$cf_prefix"
15120 datarootdir="$datarootdir"
15121 datadir="$datadir"
15122
15123 NCURSES_MAJOR="$NCURSES_MAJOR"
15124 NCURSES_MINOR="$NCURSES_MINOR"
15125 NCURSES_PATCH="$NCURSES_PATCH"
15126
15127 NCURSES_OSPEED="$NCURSES_OSPEED"
15128 TERMINFO="$TERMINFO"
15129
15130 INSTALL="$INSTALL"
15131 INSTALL_DATA="$INSTALL_DATA"
15132
15133 transform="$program_transform_name"
15134
15135 TMP=\${TMPDIR:=/tmp}/man\$\$
15136 trap "rm -f \$TMP; exit 1" 1 2 3 15
15137 trap "rm -f \$TMP" 0
15138
15139 form=\$1
15140 shift || exit 1
15141
15142 verb=\$1
15143 shift || exit 1
15144
15145 mandir=\$1
15146 shift || exit 1
15147
15148 srcdir=\$1
15149 top_srcdir=\$srcdir/..
15150 shift || exit 1
15151
15152 if test "\$form" = normal ; then
15153         if test "$cf_manpage_format" = yes ; then
15154         if test "$cf_manpage_inboth" = no ; then
15155                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15156                 exit $?
15157         fi
15158         fi
15159         cf_subdir=\$mandir/man
15160         cf_tables=$MANPAGE_TBL
15161 else
15162         cf_subdir=\$mandir/cat
15163         cf_tables=yes
15164 fi
15165
15166 # process the list of source-files
15167 for i in "\$@" ; do
15168 case \$i in
15169 (*.orig|*.rej) ;;
15170 (*.[0-9]*)
15171         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15172         if test "\$verb" = installing ; then
15173         if test ! -d "\$cf_subdir\${section}" ; then
15174                 mkdir -p "\$cf_subdir\$section"
15175         fi
15176         fi
15177
15178         # replace variables in man page
15179         if test ! -f "$cf_man_alias" ; then
15180 cat >>$cf_man_alias <<-CF_EOF2
15181                 s,@DATADIR@,\$datadir,g
15182                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15183                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15184                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15185                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15186                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15187                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15188 CF_EOF
15189
15190         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15191         do
15192                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15193                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15194 cat >>$cf_edit_man <<-CF_EOF
15195                 s,@$cf_NAME@,$cf_name,g
15196 CF_EOF
15197         done
15198
15199 cat >>$cf_edit_man <<CF_EOF
15200 CF_EOF2
15201                 echo "...made $cf_man_alias"
15202         fi
15203
15204         aliases=
15205         cf_source=\`basename "\$i"\`
15206         cf_full_alias=\$cf_source
15207         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15208         if test ! -f "\$cf_full_alias" ; then
15209                 echo ".. skipped \$cf_source"
15210                 continue
15211         fi
15212 CF_EOF
15213
15214 if test "$MANPAGE_ALIASES" != no ; then
15215 cat >>$cf_edit_man <<CF_EOF
15216         nCurses=ignore.3x
15217         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15218         test "$with_curses_h" = yes && nCurses=ncurses.3x
15219         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$cf_full_alias" |sed -f "$cf_man_alias" | sort -u; test "\$cf_part_alias" = "\$nCurses" && echo curses\`
15220 CF_EOF
15221 fi
15222
15223 if test "$MANPAGE_RENAMES" = no ; then
15224 cat >>$cf_edit_man <<CF_EOF
15225         # perform program transformations for section 1 man pages
15226         if test \$section = 1 ; then
15227                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15228         else
15229                 cf_target=\$cf_subdir\${section}/\$cf_source
15230         fi
15231 CF_EOF
15232 else
15233 cat >>$cf_edit_man <<CF_EOF
15234         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15235         if test -z "\$cf_target" ; then
15236                 echo "? missing rename for \$cf_source"
15237                 cf_target="\$cf_source"
15238         fi
15239         cf_target="\$cf_subdir\${section}/\${cf_target}"
15240
15241 CF_EOF
15242 fi
15243
15244 cat >>$cf_edit_man <<CF_EOF
15245         sed     -f "$cf_man_alias" \\
15246 CF_EOF
15247
15248 if test "$MANPAGE_RENAMES" != no ; then
15249 cat >>$cf_edit_man <<CF_EOF
15250                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15251 CF_EOF
15252 else
15253 cat >>$cf_edit_man <<CF_EOF
15254                 < "\$i" >\$TMP
15255 CF_EOF
15256 fi
15257
15258 cat >>$cf_edit_man <<CF_EOF
15259 if test \$cf_tables = yes ; then
15260         tbl \$TMP >\$TMP.out
15261         mv \$TMP.out \$TMP
15262 fi
15263 CF_EOF
15264
15265 if test "$with_overwrite" != yes ; then
15266 cat >>$cf_edit_man <<CF_EOF
15267         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15268         mv \$TMP.out \$TMP
15269 CF_EOF
15270 fi
15271
15272 if test "$with_curses_h" != yes ; then
15273 cat >>$cf_edit_man <<CF_EOF
15274         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15275         mv \$TMP.out \$TMP
15276 CF_EOF
15277 fi
15278
15279 cat >>$cf_edit_man <<CF_EOF
15280         if test "\$form" = format ; then
15281                 nroff -man \$TMP >\$TMP.out
15282                 mv \$TMP.out \$TMP
15283         fi
15284 CF_EOF
15285
15286 if test -n "$cf_manpage_compress" ; then
15287 cat >>$cf_edit_man <<CF_EOF
15288         if test "\$verb" = installing ; then
15289         if ( "$cf_manpage_compress" -f \$TMP )
15290         then
15291                 mv \$TMP.$cf_manpage_so_strip \$TMP
15292         fi
15293         fi
15294         cf_target="\$cf_target.$cf_manpage_so_strip"
15295 CF_EOF
15296 fi
15297
15298 case "$MANPAGE_FORMAT" in
15299 (*BSDI*)
15300 cat >>$cf_edit_man <<CF_EOF
15301         if test "\$form" = format ; then
15302                 # BSDI installs only .0 suffixes in the cat directories
15303                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15304         fi
15305 CF_EOF
15306   ;;
15307 esac
15308
15309 cat >>$cf_edit_man <<CF_EOF
15310         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15311         if test "\$verb" = installing ; then
15312                 echo "\$verb \$cf_target"
15313                 \$INSTALL_DATA \$TMP "\$cf_target"
15314                 test -d "\$cf_subdir\${section}" &&
15315                 test -n "\$aliases" && (
15316                         cd "\$cf_subdir\${section}" && (
15317                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15318                                 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15319                                 cf_target=\`basename "\$cf_target"\`
15320                                 for cf_alias in \$aliases
15321                                 do
15322                                         if test "\$section" = 1 ; then
15323                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15324                                         fi
15325
15326                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15327                                                 if test -f "\$cf_alias\${suffix}" ; then
15328                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15329                                                         then
15330                                                                 continue
15331                                                         fi
15332                                                 fi
15333                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15334 CF_EOF
15335 case "x$LN_S" in
15336 (*-f)
15337 cat >>$cf_edit_man <<CF_EOF
15338                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15339 CF_EOF
15340         ;;
15341 (*)
15342 cat >>$cf_edit_man <<CF_EOF
15343                                                 rm -f "\$cf_alias\${suffix}"
15344                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15345 CF_EOF
15346         ;;
15347 esac
15348 cat >>$cf_edit_man <<CF_EOF
15349                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15350                                                 echo ".so \$cf_source" >\$TMP
15351 CF_EOF
15352 if test -n "$cf_manpage_compress" ; then
15353 cat >>$cf_edit_man <<CF_EOF
15354                                                 if test -n "$cf_manpage_so_strip" ; then
15355                                                         "$cf_manpage_compress" -f \$TMP
15356                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15357                                                 fi
15358 CF_EOF
15359 fi
15360 cat >>$cf_edit_man <<CF_EOF
15361                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15362                                                 rm -f "\$cf_alias\${suffix}"
15363                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15364                                         fi
15365                                 done
15366                         )
15367                 )
15368         elif test "\$verb" = removing ; then
15369                 test -f "\$cf_target" && (
15370                         echo "\$verb \$cf_target"
15371                         rm -f "\$cf_target"
15372                 )
15373                 test -d "\$cf_subdir\${section}" &&
15374                 test -n "\$aliases" && (
15375                         cd "\$cf_subdir\${section}" && (
15376                                 for cf_alias in \$aliases
15377                                 do
15378                                         if test "\$section" = 1 ; then
15379                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15380                                         fi
15381
15382                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15383                                         rm -f "\$cf_alias\${suffix}"
15384                                 done
15385                         )
15386                 )
15387         else
15388 #               echo ".hy 0"
15389                 cat \$TMP
15390         fi
15391         ;;
15392 esac
15393 done
15394
15395 if test "$cf_manpage_inboth" = yes ; then
15396 if test "\$form" != format ; then
15397         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15398 fi
15399 fi
15400
15401 exit 0
15402 CF_EOF
15403 chmod 755 "$cf_edit_man"
15404
15405 ###############################################################################
15406
15407 ### Note that some functions (such as const) are normally disabled anyway.
15408 echo "$as_me:15408: checking if you want to build with function extensions" >&5
15409 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15410
15411 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15412 if test "${enable_ext_funcs+set}" = set; then
15413   enableval="$enable_ext_funcs"
15414   with_ext_funcs=$enableval
15415 else
15416   with_ext_funcs=yes
15417 fi;
15418 echo "$as_me:15418: result: $with_ext_funcs" >&5
15419 echo "${ECHO_T}$with_ext_funcs" >&6
15420 if test "x$with_ext_funcs" = xyes ; then
15421         NCURSES_EXT_FUNCS=1
15422
15423 cat >>confdefs.h <<\EOF
15424 #define NCURSES_EXT_FUNCS 1
15425 EOF
15426
15427 cat >>confdefs.h <<\EOF
15428 #define HAVE_ASSUME_DEFAULT_COLORS 1
15429 EOF
15430
15431 cat >>confdefs.h <<\EOF
15432 #define HAVE_CURSES_VERSION 1
15433 EOF
15434
15435 cat >>confdefs.h <<\EOF
15436 #define HAVE_HAS_KEY 1
15437 EOF
15438
15439 cat >>confdefs.h <<\EOF
15440 #define HAVE_RESIZETERM 1
15441 EOF
15442
15443 cat >>confdefs.h <<\EOF
15444 #define HAVE_RESIZE_TERM 1
15445 EOF
15446
15447 cat >>confdefs.h <<\EOF
15448 #define HAVE_TERM_ENTRY_H 1
15449 EOF
15450
15451 cat >>confdefs.h <<\EOF
15452 #define HAVE_USE_DEFAULT_COLORS 1
15453 EOF
15454
15455 cat >>confdefs.h <<\EOF
15456 #define HAVE_USE_EXTENDED_NAMES 1
15457 EOF
15458
15459 cat >>confdefs.h <<\EOF
15460 #define HAVE_USE_SCREEN 1
15461 EOF
15462
15463 cat >>confdefs.h <<\EOF
15464 #define HAVE_USE_WINDOW 1
15465 EOF
15466
15467 cat >>confdefs.h <<\EOF
15468 #define HAVE_WRESIZE 1
15469 EOF
15470
15471         GENERATED_EXT_FUNCS=generated
15472         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15473 else
15474         NCURSES_EXT_FUNCS=0
15475         GENERATED_EXT_FUNCS=
15476 fi
15477
15478 echo "$as_me:15478: checking if you want to build with SCREEN extensions" >&5
15479 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15480
15481 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15482 if test "${enable_sp_funcs+set}" = set; then
15483   enableval="$enable_sp_funcs"
15484   with_sp_funcs=$enableval
15485 else
15486   with_sp_funcs=$cf_dft_ext_spfuncs
15487 fi;
15488 echo "$as_me:15488: result: $with_sp_funcs" >&5
15489 echo "${ECHO_T}$with_sp_funcs" >&6
15490 if test "x$with_sp_funcs" = xyes ; then
15491         NCURSES_SP_FUNCS=1
15492
15493 cat >>confdefs.h <<\EOF
15494 #define NCURSES_SP_FUNCS 1
15495 EOF
15496
15497 cat >>confdefs.h <<\EOF
15498 #define HAVE_TPUTS_SP 1
15499 EOF
15500
15501         GENERATED_SP_FUNCS=generated
15502 else
15503         NCURSES_SP_FUNCS=0
15504         GENERATED_SP_FUNCS=
15505 fi
15506
15507 echo "$as_me:15507: checking if you want to build with terminal-driver" >&5
15508 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15509
15510 # Check whether --enable-term-driver or --disable-term-driver was given.
15511 if test "${enable_term_driver+set}" = set; then
15512   enableval="$enable_term_driver"
15513   with_term_driver=$enableval
15514 else
15515   with_term_driver=no
15516 fi;
15517 echo "$as_me:15517: result: $with_term_driver" >&5
15518 echo "${ECHO_T}$with_term_driver" >&6
15519 if test "x$with_term_driver" = xyes ; then
15520
15521 cat >>confdefs.h <<\EOF
15522 #define USE_TERM_DRIVER 1
15523 EOF
15524
15525         if test "x$with_termlib" != xno ; then
15526                 { { echo "$as_me:15526: error: The term-driver option conflicts with the termlib option" >&5
15527 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15528    { (exit 1); exit 1; }; }
15529         fi
15530         if test "x$with_sp_funcs" != xyes ; then
15531                 { { echo "$as_me:15531: error: The term-driver option relies upon sp-funcs" >&5
15532 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15533    { (exit 1); exit 1; }; }
15534         fi
15535 fi
15536
15537 ###   use option --enable-const to turn on use of const beyond that in XSI.
15538 echo "$as_me:15538: checking for extended use of const keyword" >&5
15539 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15540
15541 # Check whether --enable-const or --disable-const was given.
15542 if test "${enable_const+set}" = set; then
15543   enableval="$enable_const"
15544   with_ext_const=$enableval
15545 else
15546   with_ext_const=$cf_dft_ext_const
15547 fi;
15548 echo "$as_me:15548: result: $with_ext_const" >&5
15549 echo "${ECHO_T}$with_ext_const" >&6
15550 NCURSES_CONST='/*nothing*/'
15551 if test "x$with_ext_const" = xyes ; then
15552         NCURSES_CONST=const
15553 fi
15554
15555 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15556 echo "$as_me:15556: checking if you want to use extended colors" >&5
15557 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15558
15559 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15560 if test "${enable_ext_colors+set}" = set; then
15561   enableval="$enable_ext_colors"
15562   with_ext_colors=$enableval
15563 else
15564   with_ext_colors=$cf_dft_ext_colors
15565 fi;
15566 echo "$as_me:15566: result: $with_ext_colors" >&5
15567 echo "${ECHO_T}$with_ext_colors" >&6
15568 NCURSES_EXT_COLORS=0
15569 if test "x$with_ext_colors" = xyes ; then
15570         if test "x$with_widec" != xyes ; then
15571                 { echo "$as_me:15571: WARNING: This option applies only to wide-character library" >&5
15572 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15573         else
15574                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15575
15576 if test "${with_abi_version+set}" != set; then
15577         case "$cf_cv_rel_version" in
15578         (5.*)
15579                 cf_cv_rel_version=6.0
15580                 cf_cv_abi_version=6
15581                 cf_cv_abi_default=6
15582                 { echo "$as_me:15582: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15583 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15584                 ;;
15585         esac
15586 fi
15587
15588                 NCURSES_EXT_COLORS=1
15589
15590 cat >>confdefs.h <<\EOF
15591 #define NCURSES_EXT_COLORS 1
15592 EOF
15593
15594 cat >>confdefs.h <<\EOF
15595 #define HAVE_ALLOC_PAIR 1
15596 EOF
15597
15598 cat >>confdefs.h <<\EOF
15599 #define HAVE_INIT_EXTENDED_COLOR 1
15600 EOF
15601
15602 cat >>confdefs.h <<\EOF
15603 #define HAVE_RESET_COLOR_PAIRS 1
15604 EOF
15605
15606         fi
15607 fi
15608
15609 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15610 echo "$as_me:15610: checking if you want to use extended mouse encoding" >&5
15611 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15612
15613 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15614 if test "${enable_ext_mouse+set}" = set; then
15615   enableval="$enable_ext_mouse"
15616   with_ext_mouse=$enableval
15617 else
15618   with_ext_mouse=$cf_dft_ext_mouse
15619 fi;
15620 echo "$as_me:15620: result: $with_ext_mouse" >&5
15621 echo "${ECHO_T}$with_ext_mouse" >&6
15622 if test "x$with_ext_mouse" = xyes ; then
15623
15624 if test "${with_abi_version+set}" != set; then
15625         case "$cf_cv_rel_version" in
15626         (5.*)
15627                 cf_cv_rel_version=6.0
15628                 cf_cv_abi_version=6
15629                 cf_cv_abi_default=6
15630                 { echo "$as_me:15630: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15631 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15632                 ;;
15633         esac
15634 fi
15635
15636 fi
15637
15638 case $cf_cv_abi_default in
15639 (5)
15640         NCURSES_MOUSE_VERSION=1
15641         ;;
15642 (6)
15643         NCURSES_MOUSE_VERSION=2
15644         ;;
15645 ([789])
15646         NCURSES_MOUSE_VERSION=3
15647         ;;
15648 esac
15649
15650 ###   use option --enable-ext-putwin to turn on extended screendumps
15651 echo "$as_me:15651: checking if you want to use extended putwin/screendump" >&5
15652 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15653
15654 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15655 if test "${enable_ext_putwin+set}" = set; then
15656   enableval="$enable_ext_putwin"
15657   with_ext_putwin=$enableval
15658 else
15659   with_ext_putwin=$cf_dft_ext_putwin
15660 fi;
15661 echo "$as_me:15661: result: $with_ext_putwin" >&5
15662 echo "${ECHO_T}$with_ext_putwin" >&6
15663 if test "x$with_ext_putwin" = xyes ; then
15664
15665 cat >>confdefs.h <<\EOF
15666 #define NCURSES_EXT_PUTWIN 1
15667 EOF
15668
15669 fi
15670
15671 echo "$as_me:15671: checking if you want \$NCURSES_NO_PADDING code" >&5
15672 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15673
15674 # Check whether --enable-no-padding or --disable-no-padding was given.
15675 if test "${enable_no_padding+set}" = set; then
15676   enableval="$enable_no_padding"
15677   with_no_padding=$enableval
15678 else
15679   with_no_padding=$with_ext_funcs
15680 fi;
15681 echo "$as_me:15681: result: $with_no_padding" >&5
15682 echo "${ECHO_T}$with_no_padding" >&6
15683 test "x$with_no_padding" = xyes &&
15684 cat >>confdefs.h <<\EOF
15685 #define NCURSES_NO_PADDING 1
15686 EOF
15687
15688 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15689 echo "$as_me:15689: checking if you want SIGWINCH handler" >&5
15690 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15691
15692 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15693 if test "${enable_sigwinch+set}" = set; then
15694   enableval="$enable_sigwinch"
15695   with_sigwinch=$enableval
15696 else
15697   with_sigwinch=$with_ext_funcs
15698 fi;
15699 echo "$as_me:15699: result: $with_sigwinch" >&5
15700 echo "${ECHO_T}$with_sigwinch" >&6
15701 test "x$with_sigwinch" = xyes &&
15702 cat >>confdefs.h <<\EOF
15703 #define USE_SIGWINCH 1
15704 EOF
15705
15706 ###   use option --enable-tcap-names to allow user to define new capabilities
15707 echo "$as_me:15707: checking if you want user-definable terminal capabilities like termcap" >&5
15708 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15709
15710 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15711 if test "${enable_tcap_names+set}" = set; then
15712   enableval="$enable_tcap_names"
15713   with_tcap_names=$enableval
15714 else
15715   with_tcap_names=$with_ext_funcs
15716 fi;
15717 echo "$as_me:15717: result: $with_tcap_names" >&5
15718 echo "${ECHO_T}$with_tcap_names" >&6
15719 NCURSES_XNAMES=0
15720 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15721
15722 ##############################################################################
15723
15724 echo "$as_me:15724: checking if you want to link with the pthread library" >&5
15725 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15726
15727 # Check whether --with-pthread or --without-pthread was given.
15728 if test "${with_pthread+set}" = set; then
15729   withval="$with_pthread"
15730   with_pthread=$withval
15731 else
15732   with_pthread=no
15733 fi;
15734 echo "$as_me:15734: result: $with_pthread" >&5
15735 echo "${ECHO_T}$with_pthread" >&6
15736
15737 if test "$with_pthread" != no ; then
15738         echo "$as_me:15738: checking for pthread.h" >&5
15739 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15740 if test "${ac_cv_header_pthread_h+set}" = set; then
15741   echo $ECHO_N "(cached) $ECHO_C" >&6
15742 else
15743   cat >"conftest.$ac_ext" <<_ACEOF
15744 #line 15744 "configure"
15745 #include "confdefs.h"
15746 #include <pthread.h>
15747 _ACEOF
15748 if { (eval echo "$as_me:15748: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15749   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15750   ac_status=$?
15751   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15752   rm -f conftest.er1
15753   cat conftest.err >&5
15754   echo "$as_me:15754: \$? = $ac_status" >&5
15755   (exit "$ac_status"); } >/dev/null; then
15756   if test -s conftest.err; then
15757     ac_cpp_err=$ac_c_preproc_warn_flag
15758   else
15759     ac_cpp_err=
15760   fi
15761 else
15762   ac_cpp_err=yes
15763 fi
15764 if test -z "$ac_cpp_err"; then
15765   ac_cv_header_pthread_h=yes
15766 else
15767   echo "$as_me: failed program was:" >&5
15768   cat "conftest.$ac_ext" >&5
15769   ac_cv_header_pthread_h=no
15770 fi
15771 rm -f conftest.err "conftest.$ac_ext"
15772 fi
15773 echo "$as_me:15773: result: $ac_cv_header_pthread_h" >&5
15774 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15775 if test "$ac_cv_header_pthread_h" = yes; then
15776
15777 cat >>confdefs.h <<\EOF
15778 #define HAVE_PTHREADS_H 1
15779 EOF
15780
15781         for cf_lib_pthread in pthread c_r
15782         do
15783             echo "$as_me:15783: checking if we can link with the $cf_lib_pthread library" >&5
15784 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15785             cf_save_LIBS="$LIBS"
15786
15787 cf_add_libs="$LIBS"
15788 # reverse order
15789 cf_add_0lib=
15790 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15791 # filter duplicates
15792 for cf_add_1lib in $cf_add_0lib; do
15793         for cf_add_2lib in $cf_add_libs; do
15794                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15795                         cf_add_1lib=
15796                         break
15797                 fi
15798         done
15799         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15800 done
15801 LIBS="$cf_add_libs"
15802
15803             cat >"conftest.$ac_ext" <<_ACEOF
15804 #line 15804 "configure"
15805 #include "confdefs.h"
15806
15807 #include <pthread.h>
15808
15809 int
15810 main (void)
15811 {
15812
15813                 int rc = pthread_create(0,0,0,0);
15814                 int r2 = pthread_mutexattr_settype(0, 0);
15815
15816   ;
15817   return 0;
15818 }
15819 _ACEOF
15820 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15821 if { (eval echo "$as_me:15821: \"$ac_link\"") >&5
15822   (eval $ac_link) 2>&5
15823   ac_status=$?
15824   echo "$as_me:15824: \$? = $ac_status" >&5
15825   (exit "$ac_status"); } &&
15826          { ac_try='test -s "conftest$ac_exeext"'
15827   { (eval echo "$as_me:15827: \"$ac_try\"") >&5
15828   (eval $ac_try) 2>&5
15829   ac_status=$?
15830   echo "$as_me:15830: \$? = $ac_status" >&5
15831   (exit "$ac_status"); }; }; then
15832   with_pthread=yes
15833 else
15834   echo "$as_me: failed program was:" >&5
15835 cat "conftest.$ac_ext" >&5
15836 with_pthread=no
15837 fi
15838 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15839             LIBS="$cf_save_LIBS"
15840             echo "$as_me:15840: result: $with_pthread" >&5
15841 echo "${ECHO_T}$with_pthread" >&6
15842             test "$with_pthread" = yes && break
15843         done
15844
15845         if test "$with_pthread" = yes ; then
15846
15847 cf_add_libs="$LIBS"
15848 # reverse order
15849 cf_add_0lib=
15850 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15851 # filter duplicates
15852 for cf_add_1lib in $cf_add_0lib; do
15853         for cf_add_2lib in $cf_add_libs; do
15854                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15855                         cf_add_1lib=
15856                         break
15857                 fi
15858         done
15859         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15860 done
15861 LIBS="$cf_add_libs"
15862
15863 cat >>confdefs.h <<\EOF
15864 #define HAVE_LIBPTHREADS 1
15865 EOF
15866
15867         else
15868             { { echo "$as_me:15868: error: Cannot link with pthread library" >&5
15869 echo "$as_me: error: Cannot link with pthread library" >&2;}
15870    { (exit 1); exit 1; }; }
15871         fi
15872
15873 fi
15874
15875 fi
15876
15877 if test "x$with_pthread" != xno; then
15878         echo "$as_me:15878: checking for pthread_kill" >&5
15879 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15880 if test "${ac_cv_func_pthread_kill+set}" = set; then
15881   echo $ECHO_N "(cached) $ECHO_C" >&6
15882 else
15883   cat >"conftest.$ac_ext" <<_ACEOF
15884 #line 15884 "configure"
15885 #include "confdefs.h"
15886 #define pthread_kill autoconf_temporary
15887 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15888 #undef pthread_kill
15889
15890 #ifdef __cplusplus
15891 extern "C"
15892 #endif
15893
15894 /* We use char because int might match the return type of a gcc2
15895    builtin and then its argument prototype would still apply.  */
15896 char pthread_kill (void);
15897
15898 int
15899 main (void)
15900 {
15901
15902 /* The GNU C library defines stubs for functions which it implements
15903     to always fail with ENOSYS.  Some functions are actually named
15904     something starting with __ and the normal name is an alias.  */
15905 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15906 #error found stub for pthread_kill
15907 #endif
15908
15909         return pthread_kill ();
15910   ;
15911   return 0;
15912 }
15913 _ACEOF
15914 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15915 if { (eval echo "$as_me:15915: \"$ac_link\"") >&5
15916   (eval $ac_link) 2>&5
15917   ac_status=$?
15918   echo "$as_me:15918: \$? = $ac_status" >&5
15919   (exit "$ac_status"); } &&
15920          { ac_try='test -s "conftest$ac_exeext"'
15921   { (eval echo "$as_me:15921: \"$ac_try\"") >&5
15922   (eval $ac_try) 2>&5
15923   ac_status=$?
15924   echo "$as_me:15924: \$? = $ac_status" >&5
15925   (exit "$ac_status"); }; }; then
15926   ac_cv_func_pthread_kill=yes
15927 else
15928   echo "$as_me: failed program was:" >&5
15929 cat "conftest.$ac_ext" >&5
15930 ac_cv_func_pthread_kill=no
15931 fi
15932 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15933 fi
15934 echo "$as_me:15934: result: $ac_cv_func_pthread_kill" >&5
15935 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15936 if test "$ac_cv_func_pthread_kill" = yes; then
15937
15938                 echo "$as_me:15938: checking if you want to allow EINTR in wgetch with pthreads" >&5
15939 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15940
15941 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15942 if test "${enable_pthreads_eintr+set}" = set; then
15943   enableval="$enable_pthreads_eintr"
15944   use_pthreads_eintr=$enableval
15945 else
15946   use_pthreads_eintr=no
15947 fi;
15948                 echo "$as_me:15948: result: $use_pthreads_eintr" >&5
15949 echo "${ECHO_T}$use_pthreads_eintr" >&6
15950                 if test "x$use_pthreads_eintr" = xyes ; then
15951
15952 cat >>confdefs.h <<\EOF
15953 #define USE_PTHREADS_EINTR 1
15954 EOF
15955
15956                 fi
15957 fi
15958
15959         echo "$as_me:15959: checking if you want to use weak-symbols for pthreads" >&5
15960 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15961
15962 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15963 if test "${enable_weak_symbols+set}" = set; then
15964   enableval="$enable_weak_symbols"
15965   use_weak_symbols=$enableval
15966 else
15967   use_weak_symbols=no
15968 fi;
15969         echo "$as_me:15969: result: $use_weak_symbols" >&5
15970 echo "${ECHO_T}$use_weak_symbols" >&6
15971         if test "x$use_weak_symbols" = xyes ; then
15972
15973 echo "$as_me:15973: checking if $CC supports weak symbols" >&5
15974 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15975 if test "${cf_cv_weak_symbols+set}" = set; then
15976   echo $ECHO_N "(cached) $ECHO_C" >&6
15977 else
15978
15979 cat >"conftest.$ac_ext" <<_ACEOF
15980 #line 15980 "configure"
15981 #include "confdefs.h"
15982
15983 #include <stdio.h>
15984 int
15985 main (void)
15986 {
15987
15988 #if defined(__GNUC__)
15989 #  if defined __USE_ISOC99
15990 #    define _cat_pragma(exp)    _Pragma(#exp)
15991 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15992 #  else
15993 #    define _weak_pragma(exp)
15994 #  endif
15995 #  define _declare(name)        __extension__ extern __typeof__(name) name
15996 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15997 #endif
15998
15999 weak_symbol(fopen);
16000
16001   ;
16002   return 0;
16003 }
16004 _ACEOF
16005 rm -f "conftest.$ac_objext"
16006 if { (eval echo "$as_me:16006: \"$ac_compile\"") >&5
16007   (eval $ac_compile) 2>&5
16008   ac_status=$?
16009   echo "$as_me:16009: \$? = $ac_status" >&5
16010   (exit "$ac_status"); } &&
16011          { ac_try='test -s "conftest.$ac_objext"'
16012   { (eval echo "$as_me:16012: \"$ac_try\"") >&5
16013   (eval $ac_try) 2>&5
16014   ac_status=$?
16015   echo "$as_me:16015: \$? = $ac_status" >&5
16016   (exit "$ac_status"); }; }; then
16017   cf_cv_weak_symbols=yes
16018 else
16019   echo "$as_me: failed program was:" >&5
16020 cat "conftest.$ac_ext" >&5
16021 cf_cv_weak_symbols=no
16022 fi
16023 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16024
16025 fi
16026 echo "$as_me:16026: result: $cf_cv_weak_symbols" >&5
16027 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16028
16029         else
16030                 cf_cv_weak_symbols=no
16031         fi
16032
16033         if test "x$cf_cv_weak_symbols" = xyes ; then
16034
16035 cat >>confdefs.h <<\EOF
16036 #define USE_WEAK_SYMBOLS 1
16037 EOF
16038
16039         fi
16040 fi
16041
16042 PTHREAD=
16043 if test "x$with_pthread" = "xyes" ; then
16044
16045 cat >>confdefs.h <<\EOF
16046 #define USE_PTHREADS 1
16047 EOF
16048
16049         enable_reentrant=yes
16050         if test "x$cf_cv_weak_symbols" = xyes ; then
16051                 PTHREAD=-lpthread
16052
16053 cf_add_libs="$PRIVATE_LIBS"
16054 # reverse order
16055 cf_add_0lib=
16056 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16057 # filter duplicates
16058 for cf_add_1lib in $cf_add_0lib; do
16059         for cf_add_2lib in $cf_add_libs; do
16060                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16061                         cf_add_1lib=
16062                         break
16063                 fi
16064         done
16065         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16066 done
16067 PRIVATE_LIBS="$cf_add_libs"
16068
16069         fi
16070 fi
16071
16072 # Reentrant code has to be opaque; there's little advantage to making ncurses
16073 # opaque outside of that, so there is no --enable-opaque option.  We can use
16074 # this option without --with-pthreads, but this will be always set for
16075 # pthreads.
16076 echo "$as_me:16076: checking if you want reentrant code" >&5
16077 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16078
16079 # Check whether --enable-reentrant or --disable-reentrant was given.
16080 if test "${enable_reentrant+set}" = set; then
16081   enableval="$enable_reentrant"
16082   with_reentrant=$enableval
16083 else
16084   with_reentrant=no
16085 fi;
16086 echo "$as_me:16086: result: $with_reentrant" >&5
16087 echo "${ECHO_T}$with_reentrant" >&6
16088 if test "x$with_reentrant" = xyes ; then
16089         cf_cv_enable_reentrant=1
16090         cf_cv_enable_opaque="NCURSES_INTERNALS"
16091         NCURSES_SIZE_T=int
16092         if test "x$cf_cv_weak_symbols" = xyes ; then
16093
16094 # remove pthread library from $LIBS
16095 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16096
16097 cf_add_libs="$TEST_LIBS"
16098 # reverse order
16099 cf_add_0lib=
16100 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16101 # filter duplicates
16102 for cf_add_1lib in $cf_add_0lib; do
16103         for cf_add_2lib in $cf_add_libs; do
16104                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16105                         cf_add_1lib=
16106                         break
16107                 fi
16108         done
16109         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16110 done
16111 TEST_LIBS="$cf_add_libs"
16112
16113 cf_add_libs="$TEST_LIBS2"
16114 # reverse order
16115 cf_add_0lib=
16116 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16117 # filter duplicates
16118 for cf_add_1lib in $cf_add_0lib; do
16119         for cf_add_2lib in $cf_add_libs; do
16120                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16121                         cf_add_1lib=
16122                         break
16123                 fi
16124         done
16125         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16126 done
16127 TEST_LIBS2="$cf_add_libs"
16128
16129 cf_add_libs="$PRIVATE_LIBS"
16130 # reverse order
16131 cf_add_0lib=
16132 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16133 # filter duplicates
16134 for cf_add_1lib in $cf_add_0lib; do
16135         for cf_add_2lib in $cf_add_libs; do
16136                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16137                         cf_add_1lib=
16138                         break
16139                 fi
16140         done
16141         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16142 done
16143 PRIVATE_LIBS="$cf_add_libs"
16144
16145         else
16146                 # when not using weak symbols but with_reentrant,
16147                 # add 't' to the library suffix on all platforms
16148                 # except cygwin, where we only do that if ALSO
16149                 # compiling with full thread support.
16150                 case "$host" in
16151                 (*cygwin* | *msys*)
16152                         if test "$with_pthread" = "yes" ; then
16153                                 if test "x$disable_lib_suffixes" = "xno" ; then
16154                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16155                                 fi
16156                         fi ;;
16157                 (*)
16158                         if test "x$disable_lib_suffixes" = "xno" ; then
16159                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16160                         fi
16161                         ;;
16162                 esac
16163         fi
16164
16165 cat >>confdefs.h <<\EOF
16166 #define USE_REENTRANT 1
16167 EOF
16168
16169 if test "${with_abi_version+set}" != set; then
16170         case "$cf_cv_rel_version" in
16171         (5.*)
16172                 cf_cv_rel_version=6.0
16173                 cf_cv_abi_version=6
16174                 cf_cv_abi_default=6
16175                 { echo "$as_me:16175: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16176 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16177                 ;;
16178         esac
16179 fi
16180
16181 else
16182         cf_cv_enable_reentrant=0
16183         cf_cv_enable_opaque="NCURSES_OPAQUE"
16184         NCURSES_SIZE_T=$cf_dft_ordinate_type
16185 fi
16186
16187 echo "$as_me:16187: checking if you want opaque curses-library structures" >&5
16188 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
16189
16190 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16191 if test "${enable_opaque_curses+set}" = set; then
16192   enableval="$enable_opaque_curses"
16193   test "$enableval" != yes && enableval=no
16194         if test "$enableval" != "no" ; then
16195     enable_opaque_curses=yes
16196         else
16197
16198          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16199          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16200
16201         fi
16202 else
16203   enableval=no
16204
16205          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16206          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16207
16208 fi;
16209 echo "$as_me:16209: result: $enable_opaque_curses" >&5
16210 echo "${ECHO_T}$enable_opaque_curses" >&6
16211
16212 test "$cf_cv_enable_reentrant" = 1 && \
16213 test "$enable_opaque_curses" = no && \
16214 { { echo "$as_me:16214: error: reentrant configuration requires opaque library" >&5
16215 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16216    { (exit 1); exit 1; }; }
16217
16218 echo "$as_me:16218: checking if you want opaque form-library structures" >&5
16219 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
16220
16221 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16222 if test "${enable_opaque_form+set}" = set; then
16223   enableval="$enable_opaque_form"
16224   enable_opaque_form=yes
16225 else
16226   enable_opaque_form=no
16227 fi;
16228 echo "$as_me:16228: result: $enable_opaque_form" >&5
16229 echo "${ECHO_T}$enable_opaque_form" >&6
16230
16231 echo "$as_me:16231: checking if you want opaque menu-library structures" >&5
16232 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
16233
16234 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16235 if test "${enable_opaque_menu+set}" = set; then
16236   enableval="$enable_opaque_menu"
16237   enable_opaque_menu=yes
16238 else
16239   enable_opaque_menu=no
16240 fi;
16241 echo "$as_me:16241: result: $enable_opaque_menu" >&5
16242 echo "${ECHO_T}$enable_opaque_menu" >&6
16243
16244 echo "$as_me:16244: checking if you want opaque panel-library structures" >&5
16245 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16246
16247 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16248 if test "${enable_opaque_panel+set}" = set; then
16249   enableval="$enable_opaque_panel"
16250   enable_opaque_panel=yes
16251 else
16252   enable_opaque_panel=no
16253 fi;
16254 echo "$as_me:16254: result: $enable_opaque_panel" >&5
16255 echo "${ECHO_T}$enable_opaque_panel" >&6
16256
16257 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16258 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16259 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16260 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16261
16262 ### Allow using a different wrap-prefix
16263 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16264         echo "$as_me:16264: checking for prefix used to wrap public variables" >&5
16265 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16266
16267 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16268 if test "${with_wrap_prefix+set}" = set; then
16269   withval="$with_wrap_prefix"
16270   NCURSES_WRAP_PREFIX=$withval
16271 else
16272   NCURSES_WRAP_PREFIX=_nc_
16273 fi;
16274         echo "$as_me:16274: result: $NCURSES_WRAP_PREFIX" >&5
16275 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16276 else
16277         NCURSES_WRAP_PREFIX=_nc_
16278 fi
16279
16280 cat >>confdefs.h <<EOF
16281 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16282 EOF
16283
16284 ###############################################################################
16285 # These options are relatively safe to experiment with.
16286
16287 echo "$as_me:16287: checking if you want all development code" >&5
16288 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16289
16290 # Check whether --with-develop or --without-develop was given.
16291 if test "${with_develop+set}" = set; then
16292   withval="$with_develop"
16293   with_develop=$withval
16294 else
16295   with_develop=no
16296 fi;
16297 echo "$as_me:16297: result: $with_develop" >&5
16298 echo "${ECHO_T}$with_develop" >&6
16299
16300 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16301 echo "$as_me:16301: checking if you want hard-tabs code" >&5
16302 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16303
16304 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16305 if test "${enable_hard_tabs+set}" = set; then
16306   enableval="$enable_hard_tabs"
16307
16308 else
16309   enable_hard_tabs=$with_develop
16310 fi;
16311 echo "$as_me:16311: result: $enable_hard_tabs" >&5
16312 echo "${ECHO_T}$enable_hard_tabs" >&6
16313 test "x$enable_hard_tabs" = xyes &&
16314 cat >>confdefs.h <<\EOF
16315 #define USE_HARD_TABS 1
16316 EOF
16317
16318 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16319 echo "$as_me:16319: checking if you want limited support for xmc" >&5
16320 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16321
16322 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16323 if test "${enable_xmc_glitch+set}" = set; then
16324   enableval="$enable_xmc_glitch"
16325
16326 else
16327   enable_xmc_glitch=$with_develop
16328 fi;
16329 echo "$as_me:16329: result: $enable_xmc_glitch" >&5
16330 echo "${ECHO_T}$enable_xmc_glitch" >&6
16331 test "x$enable_xmc_glitch" = xyes &&
16332 cat >>confdefs.h <<\EOF
16333 #define USE_XMC_SUPPORT 1
16334 EOF
16335
16336 ###############################################################################
16337 # These are just experimental, probably should not be in a package:
16338
16339 echo "$as_me:16339: checking if you do not want to assume colors are white-on-black" >&5
16340 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16341
16342 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16343 if test "${enable_assumed_color+set}" = set; then
16344   enableval="$enable_assumed_color"
16345   with_assumed_color=$enableval
16346 else
16347   with_assumed_color=yes
16348 fi;
16349 echo "$as_me:16349: result: $with_assumed_color" >&5
16350 echo "${ECHO_T}$with_assumed_color" >&6
16351 test "x$with_assumed_color" = xyes &&
16352 cat >>confdefs.h <<\EOF
16353 #define USE_ASSUMED_COLOR 1
16354 EOF
16355
16356 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16357 echo "$as_me:16357: checking if you want hashmap scrolling-optimization code" >&5
16358 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16359
16360 # Check whether --enable-hashmap or --disable-hashmap was given.
16361 if test "${enable_hashmap+set}" = set; then
16362   enableval="$enable_hashmap"
16363   with_hashmap=$enableval
16364 else
16365   with_hashmap=yes
16366 fi;
16367 echo "$as_me:16367: result: $with_hashmap" >&5
16368 echo "${ECHO_T}$with_hashmap" >&6
16369 test "x$with_hashmap" = xyes &&
16370 cat >>confdefs.h <<\EOF
16371 #define USE_HASHMAP 1
16372 EOF
16373
16374 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16375 echo "$as_me:16375: checking if you want colorfgbg code" >&5
16376 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16377
16378 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16379 if test "${enable_colorfgbg+set}" = set; then
16380   enableval="$enable_colorfgbg"
16381   with_colorfgbg=$enableval
16382 else
16383   with_colorfgbg=no
16384 fi;
16385 echo "$as_me:16385: result: $with_colorfgbg" >&5
16386 echo "${ECHO_T}$with_colorfgbg" >&6
16387 test "x$with_colorfgbg" = xyes &&
16388 cat >>confdefs.h <<\EOF
16389 #define USE_COLORFGBG 1
16390 EOF
16391
16392 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16393 echo "$as_me:16393: checking if you want to use gcc -fvisibility option" >&5
16394 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16395
16396 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16397 if test "${enable_fvisibility+set}" = set; then
16398   enableval="$enable_fvisibility"
16399   cf_with_fvisibility=$enableval
16400 else
16401   cf_with_fvisibility=no
16402 fi;
16403 echo "$as_me:16403: result: $cf_with_fvisibility" >&5
16404 echo "${ECHO_T}$cf_with_fvisibility" >&6
16405
16406 NCURSES_IMPEXP=
16407 NCURSES_CXX_IMPEXP=
16408 if test "x$cf_with_fvisibility" = xyes; then
16409
16410 echo "$as_me:16410: checking if $CC -fvisibility=hidden option works" >&5
16411 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16412 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16413   echo $ECHO_N "(cached) $ECHO_C" >&6
16414 else
16415
16416     cf_save_cflags="$CFLAGS"
16417     CFLAGS="$CFLAGS -fvisibility=hidden"
16418     cat >"conftest.$ac_ext" <<_ACEOF
16419 #line 16419 "configure"
16420 #include "confdefs.h"
16421
16422 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16423
16424 int
16425 main (void)
16426 {
16427
16428         if (somefunc()) return 1;
16429
16430   ;
16431   return 0;
16432 }
16433 _ACEOF
16434 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16435 if { (eval echo "$as_me:16435: \"$ac_link\"") >&5
16436   (eval $ac_link) 2>&5
16437   ac_status=$?
16438   echo "$as_me:16438: \$? = $ac_status" >&5
16439   (exit "$ac_status"); } &&
16440          { ac_try='test -s "conftest$ac_exeext"'
16441   { (eval echo "$as_me:16441: \"$ac_try\"") >&5
16442   (eval $ac_try) 2>&5
16443   ac_status=$?
16444   echo "$as_me:16444: \$? = $ac_status" >&5
16445   (exit "$ac_status"); }; }; then
16446   cf_cv_fvisibility_hidden=yes
16447 else
16448   echo "$as_me: failed program was:" >&5
16449 cat "conftest.$ac_ext" >&5
16450 cf_cv_fvisibility_hidden=no
16451 fi
16452 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16453     CFLAGS=$cf_save_cflags
16454
16455 fi
16456 echo "$as_me:16456: result: $cf_cv_fvisibility_hidden" >&5
16457 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16458
16459         if test "x$cf_cv_fvisibility_hidden" = xyes
16460         then
16461
16462 cf_fix_cppflags=no
16463 cf_new_cflags=
16464 cf_new_cppflags=
16465 cf_new_extra_cppflags=
16466
16467 for cf_add_cflags in -fvisibility=hidden
16468 do
16469 case "$cf_fix_cppflags" in
16470 (no)
16471         case "$cf_add_cflags" in
16472         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16473                 case "$cf_add_cflags" in
16474                 (-D*)
16475                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16476
16477                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16478                                 && test -z "${cf_tst_cflags}" \
16479                                 && cf_fix_cppflags=yes
16480
16481                         if test "$cf_fix_cppflags" = yes ; then
16482
16483         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16484         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16485
16486                                 continue
16487                         elif test "${cf_tst_cflags}" = "\"'" ; then
16488
16489         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16490         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16491
16492                                 continue
16493                         fi
16494                         ;;
16495                 esac
16496                 case "$CPPFLAGS" in
16497                 (*$cf_add_cflags)
16498                         ;;
16499                 (*)
16500                         case "$cf_add_cflags" in
16501                         (-D*)
16502                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16503
16504 CPPFLAGS=`echo "$CPPFLAGS" | \
16505         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16506                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16507
16508                                 ;;
16509                         esac
16510
16511         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16512         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16513
16514                         ;;
16515                 esac
16516                 ;;
16517         (*)
16518
16519         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16520         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16521
16522                 ;;
16523         esac
16524         ;;
16525 (yes)
16526
16527         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16528         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16529
16530         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16531
16532         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16533                 && test -z "${cf_tst_cflags}" \
16534                 && cf_fix_cppflags=no
16535         ;;
16536 esac
16537 done
16538
16539 if test -n "$cf_new_cflags" ; then
16540
16541         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16542         CFLAGS="${CFLAGS}$cf_new_cflags"
16543
16544 fi
16545
16546 if test -n "$cf_new_cppflags" ; then
16547
16548         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16549         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16550
16551 fi
16552
16553 if test -n "$cf_new_extra_cppflags" ; then
16554
16555         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16556         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16557
16558 fi
16559
16560                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16561         fi
16562         if test -n "$CXX"
16563         then
16564                 ac_ext=cc
16565 ac_cpp='$CXXCPP $CPPFLAGS'
16566 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16567 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16568 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16569 ac_main_return="return"
16570
16571 echo "$as_me:16571: checking if $CXX -fvisibility=hidden option works" >&5
16572 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16573 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16574   echo $ECHO_N "(cached) $ECHO_C" >&6
16575 else
16576
16577     cf_save_cflags="$CXXFLAGS"
16578     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16579     cat >"conftest.$ac_ext" <<_ACEOF
16580 #line 16580 "configure"
16581 #include "confdefs.h"
16582
16583 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16584
16585 int
16586 main (void)
16587 {
16588
16589         if (somefunc()) return 1;
16590
16591   ;
16592   return 0;
16593 }
16594 _ACEOF
16595 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16596 if { (eval echo "$as_me:16596: \"$ac_link\"") >&5
16597   (eval $ac_link) 2>&5
16598   ac_status=$?
16599   echo "$as_me:16599: \$? = $ac_status" >&5
16600   (exit "$ac_status"); } &&
16601          { ac_try='test -s "conftest$ac_exeext"'
16602   { (eval echo "$as_me:16602: \"$ac_try\"") >&5
16603   (eval $ac_try) 2>&5
16604   ac_status=$?
16605   echo "$as_me:16605: \$? = $ac_status" >&5
16606   (exit "$ac_status"); }; }; then
16607   cf_cv_fvisibility_hidden2=yes
16608 else
16609   echo "$as_me: failed program was:" >&5
16610 cat "conftest.$ac_ext" >&5
16611 cf_cv_fvisibility_hidden2=no
16612 fi
16613 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16614     CXXFLAGS=$cf_save_cflags
16615
16616 fi
16617 echo "$as_me:16617: result: $cf_cv_fvisibility_hidden2" >&5
16618 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16619
16620                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16621                 then
16622
16623 cf_save_CXXFLAGS="$CFLAGS"
16624 CFLAGS="$CXXFLAGS"
16625
16626 cf_fix_cppflags=no
16627 cf_new_cflags=
16628 cf_new_cppflags=
16629 cf_new_extra_cppflags=
16630
16631 for cf_add_cflags in -fvisibility=hidden
16632 do
16633 case "$cf_fix_cppflags" in
16634 (no)
16635         case "$cf_add_cflags" in
16636         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16637                 case "$cf_add_cflags" in
16638                 (-D*)
16639                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16640
16641                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16642                                 && test -z "${cf_tst_cflags}" \
16643                                 && cf_fix_cppflags=yes
16644
16645                         if test "$cf_fix_cppflags" = yes ; then
16646
16647         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16648         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16649
16650                                 continue
16651                         elif test "${cf_tst_cflags}" = "\"'" ; then
16652
16653         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16654         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16655
16656                                 continue
16657                         fi
16658                         ;;
16659                 esac
16660                 case "$CPPFLAGS" in
16661                 (*$cf_add_cflags)
16662                         ;;
16663                 (*)
16664                         case "$cf_add_cflags" in
16665                         (-D*)
16666                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16667
16668 CPPFLAGS=`echo "$CPPFLAGS" | \
16669         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16670                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16671
16672                                 ;;
16673                         esac
16674
16675         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16676         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16677
16678                         ;;
16679                 esac
16680                 ;;
16681         (*)
16682
16683         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16684         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16685
16686                 ;;
16687         esac
16688         ;;
16689 (yes)
16690
16691         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16692         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16693
16694         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16695
16696         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16697                 && test -z "${cf_tst_cflags}" \
16698                 && cf_fix_cppflags=no
16699         ;;
16700 esac
16701 done
16702
16703 if test -n "$cf_new_cflags" ; then
16704
16705         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16706         CFLAGS="${CFLAGS}$cf_new_cflags"
16707
16708 fi
16709
16710 if test -n "$cf_new_cppflags" ; then
16711
16712         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16713         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16714
16715 fi
16716
16717 if test -n "$cf_new_extra_cppflags" ; then
16718
16719         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16720         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16721
16722 fi
16723
16724 CXXFLAGS="$CFLAGS"
16725 CFLAGS="$cf_save_CXXFLAGS"
16726
16727                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16728                 fi
16729                 ac_ext=c
16730 ac_cpp='$CPP $CPPFLAGS'
16731 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16732 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16733 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16734 ac_main_return="return"
16735
16736         fi
16737 fi
16738
16739 ###   use option --enable-interop to turn on use of bindings used for interop
16740 echo "$as_me:16740: checking if you want interop bindings" >&5
16741 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16742
16743 # Check whether --enable-interop or --disable-interop was given.
16744 if test "${enable_interop+set}" = set; then
16745   enableval="$enable_interop"
16746   with_exp_interop=$enableval
16747 else
16748   with_exp_interop=$cf_dft_interop
16749 fi;
16750 echo "$as_me:16750: result: $with_exp_interop" >&5
16751 echo "${ECHO_T}$with_exp_interop" >&6
16752
16753 NCURSES_INTEROP_FUNCS=0
16754 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16755
16756 echo "$as_me:16756: checking if you want experimental safe-sprintf code" >&5
16757 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16758
16759 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16760 if test "${enable_safe_sprintf+set}" = set; then
16761   enableval="$enable_safe_sprintf"
16762   with_safe_sprintf=$enableval
16763 else
16764   with_safe_sprintf=no
16765 fi;
16766 echo "$as_me:16766: result: $with_safe_sprintf" >&5
16767 echo "${ECHO_T}$with_safe_sprintf" >&6
16768
16769 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16770 # when hashmap is used scroll hints are useless
16771 if test "$with_hashmap" = no ; then
16772 echo "$as_me:16772: checking if you want to experiment without scrolling-hints code" >&5
16773 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16774
16775 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16776 if test "${enable_scroll_hints+set}" = set; then
16777   enableval="$enable_scroll_hints"
16778   with_scroll_hints=$enableval
16779 else
16780   with_scroll_hints=yes
16781 fi;
16782 echo "$as_me:16782: result: $with_scroll_hints" >&5
16783 echo "${ECHO_T}$with_scroll_hints" >&6
16784 test "x$with_scroll_hints" = xyes &&
16785 cat >>confdefs.h <<\EOF
16786 #define USE_SCROLL_HINTS 1
16787 EOF
16788
16789 fi
16790
16791 echo "$as_me:16791: checking if you want wgetch-events code" >&5
16792 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16793
16794 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16795 if test "${enable_wgetch_events+set}" = set; then
16796   enableval="$enable_wgetch_events"
16797   with_wgetch_events=$enableval
16798 else
16799   with_wgetch_events=no
16800 fi;
16801 echo "$as_me:16801: result: $with_wgetch_events" >&5
16802 echo "${ECHO_T}$with_wgetch_events" >&6
16803 if test "x$with_wgetch_events" = xyes ; then
16804
16805 cat >>confdefs.h <<\EOF
16806 #define NCURSES_WGETCH_EVENTS 1
16807 EOF
16808
16809         NCURSES_WGETCH_EVENTS=1
16810 else
16811         NCURSES_WGETCH_EVENTS=0
16812 fi
16813
16814 case "$cf_cv_system_name" in
16815 (*mingw32*|*mingw64*|*-msvc*)
16816         echo "$as_me:16816: checking if you want experimental-Windows driver" >&5
16817 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16818
16819 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16820 if test "${enable_exp_win32+set}" = set; then
16821   enableval="$enable_exp_win32"
16822   with_exp_win32=$enableval
16823 else
16824   with_exp_win32=no
16825 fi;
16826         echo "$as_me:16826: result: $with_exp_win32" >&5
16827 echo "${ECHO_T}$with_exp_win32" >&6
16828         if test "x$with_exp_win32" = xyes
16829         then
16830
16831 cat >>confdefs.h <<\EOF
16832 #define EXP_WIN32_DRIVER 1
16833 EOF
16834
16835                 EXP_WIN32_DRIVER=1
16836                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16837         else
16838                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16839                 EXP_WIN32_DRIVER=0
16840         fi
16841         ;;
16842 (*)
16843         EXP_WIN32_DRIVER=0
16844         INTERNALS_HDR=
16845         ;;
16846 esac
16847
16848 ###############################################################################
16849
16850 ###     use option --disable-echo to suppress full display compiling commands
16851
16852 echo "$as_me:16852: checking if you want to see long compiling messages" >&5
16853 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16854
16855 # Check whether --enable-echo or --disable-echo was given.
16856 if test "${enable_echo+set}" = set; then
16857   enableval="$enable_echo"
16858   test "$enableval" != no && enableval=yes
16859         if test "$enableval" != "yes" ; then
16860
16861         ECHO_LT='--silent'
16862         ECHO_LD='@echo linking $@;'
16863         RULE_CC='@echo compiling $<'
16864         SHOW_CC='@echo compiling $@'
16865         ECHO_CC='@'
16866
16867         else
16868
16869         ECHO_LT=''
16870         ECHO_LD=''
16871         RULE_CC=''
16872         SHOW_CC=''
16873         ECHO_CC=''
16874
16875         fi
16876 else
16877   enableval=yes
16878
16879         ECHO_LT=''
16880         ECHO_LD=''
16881         RULE_CC=''
16882         SHOW_CC=''
16883         ECHO_CC=''
16884
16885 fi;
16886 echo "$as_me:16886: result: $enableval" >&5
16887 echo "${ECHO_T}$enableval" >&6
16888
16889 if test "x$enable_echo" = xyes; then
16890         ECHO_LINK=
16891 else
16892         ECHO_LINK='@ echo linking $@ ... ;'
16893         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16894         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16895 fi
16896
16897 # --disable-stripping is used for debugging
16898
16899 echo "$as_me:16899: checking if you want to install stripped executables" >&5
16900 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16901
16902 # Check whether --enable-stripping or --disable-stripping was given.
16903 if test "${enable_stripping+set}" = set; then
16904   enableval="$enable_stripping"
16905   test "$enableval" != no && enableval=yes
16906         if test "$enableval" != "yes" ; then
16907     enable_stripping=no
16908         else
16909                 enable_stripping=yes
16910         fi
16911 else
16912   enableval=yes
16913         enable_stripping=yes
16914
16915 fi;
16916 echo "$as_me:16916: result: $enable_stripping" >&5
16917 echo "${ECHO_T}$enable_stripping" >&6
16918
16919 if test "$enable_stripping" = yes
16920 then
16921         INSTALL_OPT_S="-s"
16922 else
16923         INSTALL_OPT_S=
16924 fi
16925
16926 : "${INSTALL:=install}"
16927 echo "$as_me:16927: checking if install accepts -p option" >&5
16928 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16929 if test "${cf_cv_install_p+set}" = set; then
16930   echo $ECHO_N "(cached) $ECHO_C" >&6
16931 else
16932
16933         rm -rf ./conftest*
16934         date >conftest.in
16935         mkdir conftest.out
16936         sleep 3
16937         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16938         then
16939                 if test -f conftest.out/conftest.in
16940                 then
16941                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16942                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16943                         if test -s conftest.err
16944                         then
16945                                 cf_cv_install_p=no
16946                         else
16947                                 cf_cv_install_p=yes
16948                         fi
16949                 else
16950                         cf_cv_install_p=no
16951                 fi
16952         else
16953                 cf_cv_install_p=no
16954         fi
16955         rm -rf ./conftest*
16956
16957 fi
16958 echo "$as_me:16958: result: $cf_cv_install_p" >&5
16959 echo "${ECHO_T}$cf_cv_install_p" >&6
16960
16961 echo "$as_me:16961: checking if install needs to be told about ownership" >&5
16962 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16963 case `$ac_config_guess` in
16964 (*minix)
16965         with_install_o=yes
16966         ;;
16967 (*)
16968         with_install_o=no
16969         ;;
16970 esac
16971
16972 echo "$as_me:16972: result: $with_install_o" >&5
16973 echo "${ECHO_T}$with_install_o" >&6
16974 if test "x$with_install_o" = xyes
16975 then
16976         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'`"
16977 else
16978         INSTALL_OPT_O=
16979 fi
16980
16981 # If we're avoiding relinking of shared libraries during install, that is to
16982 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16983 # the install program has "-p" (for preserving timestamps).
16984 cf_cv_do_reranlib=yes
16985 if test "x$cf_cv_install_p" = xyes
16986 then
16987         if test "x$cf_cv_do_relink" != xyes
16988         then
16989                 cf_cv_do_reranlib=no
16990                 INSTALL_OPT_P="-p"
16991                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16992         fi
16993 fi
16994
16995 ###     use option --enable-warnings to turn on all gcc warnings
16996
16997 echo "$as_me:16997: checking if you want to use C11 _Noreturn feature" >&5
16998 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16999
17000 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17001 if test "${enable_stdnoreturn+set}" = set; then
17002   enableval="$enable_stdnoreturn"
17003   test "$enableval" != yes && enableval=no
17004         if test "$enableval" != "no" ; then
17005     enable_stdnoreturn=yes
17006         else
17007                 enable_stdnoreturn=no
17008         fi
17009 else
17010   enableval=no
17011         enable_stdnoreturn=no
17012
17013 fi;
17014 echo "$as_me:17014: result: $enable_stdnoreturn" >&5
17015 echo "${ECHO_T}$enable_stdnoreturn" >&6
17016
17017 if test $enable_stdnoreturn = yes; then
17018 echo "$as_me:17018: checking for C11 _Noreturn feature" >&5
17019 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17020 if test "${cf_cv_c11_noreturn+set}" = set; then
17021   echo $ECHO_N "(cached) $ECHO_C" >&6
17022 else
17023   cat >"conftest.$ac_ext" <<_ACEOF
17024 #line 17024 "configure"
17025 #include "confdefs.h"
17026
17027 $ac_includes_default
17028 #include <stdnoreturn.h>
17029 static _Noreturn void giveup(void) { exit(0); }
17030
17031 int
17032 main (void)
17033 {
17034 if (feof(stdin)) giveup()
17035   ;
17036   return 0;
17037 }
17038 _ACEOF
17039 rm -f "conftest.$ac_objext"
17040 if { (eval echo "$as_me:17040: \"$ac_compile\"") >&5
17041   (eval $ac_compile) 2>&5
17042   ac_status=$?
17043   echo "$as_me:17043: \$? = $ac_status" >&5
17044   (exit "$ac_status"); } &&
17045          { ac_try='test -s "conftest.$ac_objext"'
17046   { (eval echo "$as_me:17046: \"$ac_try\"") >&5
17047   (eval $ac_try) 2>&5
17048   ac_status=$?
17049   echo "$as_me:17049: \$? = $ac_status" >&5
17050   (exit "$ac_status"); }; }; then
17051   cf_cv_c11_noreturn=yes
17052 else
17053   echo "$as_me: failed program was:" >&5
17054 cat "conftest.$ac_ext" >&5
17055 cf_cv_c11_noreturn=no
17056 fi
17057 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17058
17059 fi
17060 echo "$as_me:17060: result: $cf_cv_c11_noreturn" >&5
17061 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17062 else
17063         cf_cv_c11_noreturn=no,
17064 fi
17065
17066 if test "$cf_cv_c11_noreturn" = yes; then
17067
17068 cat >>confdefs.h <<\EOF
17069 #define HAVE_STDNORETURN_H 1
17070 EOF
17071
17072 cat >>confdefs.h <<EOF
17073 #define STDC_NORETURN _Noreturn
17074 EOF
17075
17076         HAVE_STDNORETURN_H=1
17077 else
17078         HAVE_STDNORETURN_H=0
17079 fi
17080
17081 if test "$GCC" = yes || test "$GXX" = yes
17082 then
17083
17084 if test "$GCC" = yes || test "$GXX" = yes
17085 then
17086         case $CFLAGS in
17087         (*-Werror=*)
17088                 cf_temp_flags=
17089                 for cf_temp_scan in $CFLAGS
17090                 do
17091                         case "x$cf_temp_scan" in
17092                         (x-Werror=format*)
17093
17094         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17095         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17096
17097                                 ;;
17098                         (x-Werror=*)
17099
17100         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17101         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17102
17103                                 ;;
17104                         (*)
17105
17106         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17107         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17108
17109                                 ;;
17110                         esac
17111                 done
17112                 if test "x$CFLAGS" != "x$cf_temp_flags"
17113                 then
17114                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17115
17116 echo "${as_me:-configure}:17116: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17117
17118                         CFLAGS="$cf_temp_flags"
17119                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17120
17121 echo "${as_me:-configure}:17121: testing ... fixed $CFLAGS ..." 1>&5
17122
17123                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17124
17125 echo "${as_me:-configure}:17125: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17126
17127                 fi
17128                 ;;
17129         esac
17130 fi
17131
17132 if test "$GCC" = yes || test "$GXX" = yes
17133 then
17134         case $CPPFLAGS in
17135         (*-Werror=*)
17136                 cf_temp_flags=
17137                 for cf_temp_scan in $CPPFLAGS
17138                 do
17139                         case "x$cf_temp_scan" in
17140                         (x-Werror=format*)
17141
17142         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17143         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17144
17145                                 ;;
17146                         (x-Werror=*)
17147
17148         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17149         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17150
17151                                 ;;
17152                         (*)
17153
17154         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17155         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17156
17157                                 ;;
17158                         esac
17159                 done
17160                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17161                 then
17162                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17163
17164 echo "${as_me:-configure}:17164: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17165
17166                         CPPFLAGS="$cf_temp_flags"
17167                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17168
17169 echo "${as_me:-configure}:17169: testing ... fixed $CPPFLAGS ..." 1>&5
17170
17171                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17172
17173 echo "${as_me:-configure}:17173: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17174
17175                 fi
17176                 ;;
17177         esac
17178 fi
17179
17180 if test "$GCC" = yes || test "$GXX" = yes
17181 then
17182         case $LDFLAGS in
17183         (*-Werror=*)
17184                 cf_temp_flags=
17185                 for cf_temp_scan in $LDFLAGS
17186                 do
17187                         case "x$cf_temp_scan" in
17188                         (x-Werror=format*)
17189
17190         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17191         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17192
17193                                 ;;
17194                         (x-Werror=*)
17195
17196         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17197         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17198
17199                                 ;;
17200                         (*)
17201
17202         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17203         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17204
17205                                 ;;
17206                         esac
17207                 done
17208                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17209                 then
17210                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17211
17212 echo "${as_me:-configure}:17212: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17213
17214                         LDFLAGS="$cf_temp_flags"
17215                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17216
17217 echo "${as_me:-configure}:17217: testing ... fixed $LDFLAGS ..." 1>&5
17218
17219                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17220
17221 echo "${as_me:-configure}:17221: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17222
17223                 fi
17224                 ;;
17225         esac
17226 fi
17227
17228 echo "$as_me:17228: checking if you want to turn on gcc warnings" >&5
17229 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17230
17231 # Check whether --enable-warnings or --disable-warnings was given.
17232 if test "${enable_warnings+set}" = set; then
17233   enableval="$enable_warnings"
17234   test "$enableval" != yes && enableval=no
17235         if test "$enableval" != "no" ; then
17236     enable_warnings=yes
17237         else
17238                 enable_warnings=no
17239         fi
17240 else
17241   enableval=no
17242         enable_warnings=no
17243
17244 fi;
17245 echo "$as_me:17245: result: $enable_warnings" >&5
17246 echo "${ECHO_T}$enable_warnings" >&6
17247 if test "$enable_warnings" = "yes"
17248 then
17249
17250 if test "x$have_x" = xyes; then
17251
17252 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17253 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17254 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17255 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17256 for cf_X_CFLAGS in $X_CFLAGS
17257 do
17258         case "x$cf_X_CFLAGS" in
17259         x-[IUD]*)
17260                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17261                 ;;
17262         *)
17263                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17264                 ;;
17265         esac
17266 done
17267
17268 cat >"conftest.$ac_ext" <<_ACEOF
17269 #line 17269 "configure"
17270 #include "confdefs.h"
17271
17272 #include <stdlib.h>
17273 #include <X11/Intrinsic.h>
17274
17275 int
17276 main (void)
17277 {
17278 String foo = malloc(1); free((void*)foo)
17279   ;
17280   return 0;
17281 }
17282 _ACEOF
17283 rm -f "conftest.$ac_objext"
17284 if { (eval echo "$as_me:17284: \"$ac_compile\"") >&5
17285   (eval $ac_compile) 2>&5
17286   ac_status=$?
17287   echo "$as_me:17287: \$? = $ac_status" >&5
17288   (exit "$ac_status"); } &&
17289          { ac_try='test -s "conftest.$ac_objext"'
17290   { (eval echo "$as_me:17290: \"$ac_try\"") >&5
17291   (eval $ac_try) 2>&5
17292   ac_status=$?
17293   echo "$as_me:17293: \$? = $ac_status" >&5
17294   (exit "$ac_status"); }; }; then
17295
17296 echo "$as_me:17296: checking for X11/Xt const-feature" >&5
17297 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17298 if test "${cf_cv_const_x_string+set}" = set; then
17299   echo $ECHO_N "(cached) $ECHO_C" >&6
17300 else
17301
17302         cat >"conftest.$ac_ext" <<_ACEOF
17303 #line 17303 "configure"
17304 #include "confdefs.h"
17305
17306 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17307 #undef  XTSTRINGDEFINES /* X11R5 and later */
17308 #include <stdlib.h>
17309 #include <X11/Intrinsic.h>
17310
17311 int
17312 main (void)
17313 {
17314 String foo = malloc(1); *foo = 0
17315   ;
17316   return 0;
17317 }
17318 _ACEOF
17319 rm -f "conftest.$ac_objext"
17320 if { (eval echo "$as_me:17320: \"$ac_compile\"") >&5
17321   (eval $ac_compile) 2>&5
17322   ac_status=$?
17323   echo "$as_me:17323: \$? = $ac_status" >&5
17324   (exit "$ac_status"); } &&
17325          { ac_try='test -s "conftest.$ac_objext"'
17326   { (eval echo "$as_me:17326: \"$ac_try\"") >&5
17327   (eval $ac_try) 2>&5
17328   ac_status=$?
17329   echo "$as_me:17329: \$? = $ac_status" >&5
17330   (exit "$ac_status"); }; }; then
17331
17332                         cf_cv_const_x_string=no
17333
17334 else
17335   echo "$as_me: failed program was:" >&5
17336 cat "conftest.$ac_ext" >&5
17337
17338                         cf_cv_const_x_string=yes
17339
17340 fi
17341 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17342
17343 fi
17344 echo "$as_me:17344: result: $cf_cv_const_x_string" >&5
17345 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17346
17347 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17348 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17349 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17350
17351 case "$cf_cv_const_x_string" in
17352 (no)
17353
17354         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17355         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17356
17357         ;;
17358 (*)
17359
17360         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17361         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17362
17363         ;;
17364 esac
17365
17366 else
17367   echo "$as_me: failed program was:" >&5
17368 cat "conftest.$ac_ext" >&5
17369 fi
17370 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17371  fi
17372 cat > "conftest.$ac_ext" <<EOF
17373 #line 17373 "${as_me:-configure}"
17374 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17375 EOF
17376 if test "$INTEL_COMPILER" = yes
17377 then
17378 # The "-wdXXX" options suppress warnings:
17379 # remark #1419: external declaration in primary source file
17380 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17381 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17382 # remark #193: zero used for undefined preprocessing identifier
17383 # remark #593: variable "curs_sb_left_arrow" was set but never used
17384 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17385 # remark #869: parameter "tw" was never referenced
17386 # remark #981: operands are evaluated in unspecified order
17387 # warning #279: controlling expression is constant
17388
17389         { echo "$as_me:17389: checking for $CC warning options..." >&5
17390 echo "$as_me: checking for $CC warning options..." >&6;}
17391         cf_save_CFLAGS="$CFLAGS"
17392         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17393         for cf_opt in \
17394                 wd1419 \
17395                 wd1683 \
17396                 wd1684 \
17397                 wd193 \
17398                 wd593 \
17399                 wd279 \
17400                 wd810 \
17401                 wd869 \
17402                 wd981
17403         do
17404                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17405                 if { (eval echo "$as_me:17405: \"$ac_compile\"") >&5
17406   (eval $ac_compile) 2>&5
17407   ac_status=$?
17408   echo "$as_me:17408: \$? = $ac_status" >&5
17409   (exit "$ac_status"); }; then
17410                         test -n "$verbose" && echo "$as_me:17410: result: ... -$cf_opt" >&5
17411 echo "${ECHO_T}... -$cf_opt" >&6
17412                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17413                 fi
17414         done
17415         CFLAGS="$cf_save_CFLAGS"
17416 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17417 then
17418         { echo "$as_me:17418: checking for $CC warning options..." >&5
17419 echo "$as_me: checking for $CC warning options..." >&6;}
17420         cf_save_CFLAGS="$CFLAGS"
17421         cf_warn_CONST=""
17422         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17423         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17424         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17425         for cf_opt in W Wall \
17426                 Wbad-function-cast \
17427                 Wcast-align \
17428                 Wcast-qual \
17429                 Wdeclaration-after-statement \
17430                 Wextra \
17431                 Winline \
17432                 Wmissing-declarations \
17433                 Wmissing-prototypes \
17434                 Wnested-externs \
17435                 Wpointer-arith \
17436                 Wshadow \
17437                 Wstrict-prototypes \
17438                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17439         do
17440                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17441                 if { (eval echo "$as_me:17441: \"$ac_compile\"") >&5
17442   (eval $ac_compile) 2>&5
17443   ac_status=$?
17444   echo "$as_me:17444: \$? = $ac_status" >&5
17445   (exit "$ac_status"); }; then
17446                         test -n "$verbose" && echo "$as_me:17446: result: ... -$cf_opt" >&5
17447 echo "${ECHO_T}... -$cf_opt" >&6
17448                         case "$cf_opt" in
17449                         (Winline)
17450                                 case "$GCC_VERSION" in
17451                                 ([34].*)
17452                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17453
17454 echo "${as_me:-configure}:17454: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17455
17456                                         continue;;
17457                                 esac
17458                                 ;;
17459                         (Wpointer-arith)
17460                                 case "$GCC_VERSION" in
17461                                 ([12].*)
17462                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17463
17464 echo "${as_me:-configure}:17464: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17465
17466                                         continue;;
17467                                 esac
17468                                 ;;
17469                         esac
17470                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17471                 fi
17472         done
17473         CFLAGS="$cf_save_CFLAGS"
17474 fi
17475 rm -rf ./conftest*
17476
17477 fi
17478
17479 if test "$GCC" = yes || test "$GXX" = yes
17480 then
17481 cat > conftest.i <<EOF
17482 #ifndef GCC_PRINTF
17483 #define GCC_PRINTF 0
17484 #endif
17485 #ifndef GCC_SCANF
17486 #define GCC_SCANF 0
17487 #endif
17488 #ifndef GCC_NORETURN
17489 #define GCC_NORETURN /* nothing */
17490 #endif
17491 #ifndef GCC_UNUSED
17492 #define GCC_UNUSED /* nothing */
17493 #endif
17494 EOF
17495 if test "$GCC" = yes
17496 then
17497         { echo "$as_me:17497: checking for $CC __attribute__ directives..." >&5
17498 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17499 cat > "conftest.$ac_ext" <<EOF
17500 #line 17500 "${as_me:-configure}"
17501 #include <stdio.h>
17502 #include "confdefs.h"
17503 #include "conftest.h"
17504 #include "conftest.i"
17505 #if     GCC_PRINTF
17506 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17507 #else
17508 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17509 #endif
17510 #if     GCC_SCANF
17511 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17512 #else
17513 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17514 #endif
17515 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17516 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17517 extern GCC_NORETURN void foo(void);
17518 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17519 EOF
17520         cf_printf_attribute=no
17521         cf_scanf_attribute=no
17522         for cf_attribute in scanf printf unused noreturn
17523         do
17524
17525 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17526
17527                 cf_directive="__attribute__(($cf_attribute))"
17528                 echo "checking for $CC $cf_directive" 1>&5
17529
17530                 case "$cf_attribute" in
17531                 (printf)
17532                         cf_printf_attribute=yes
17533                         cat >conftest.h <<EOF
17534 #define GCC_$cf_ATTRIBUTE 1
17535 EOF
17536                         ;;
17537                 (scanf)
17538                         cf_scanf_attribute=yes
17539                         cat >conftest.h <<EOF
17540 #define GCC_$cf_ATTRIBUTE 1
17541 EOF
17542                         ;;
17543                 (*)
17544                         cat >conftest.h <<EOF
17545 #define GCC_$cf_ATTRIBUTE $cf_directive
17546 EOF
17547                         ;;
17548                 esac
17549
17550                 if { (eval echo "$as_me:17550: \"$ac_compile\"") >&5
17551   (eval $ac_compile) 2>&5
17552   ac_status=$?
17553   echo "$as_me:17553: \$? = $ac_status" >&5
17554   (exit "$ac_status"); }; then
17555                         test -n "$verbose" && echo "$as_me:17555: result: ... $cf_attribute" >&5
17556 echo "${ECHO_T}... $cf_attribute" >&6
17557                         cat conftest.h >>confdefs.h
17558                         case "$cf_attribute" in
17559                         (noreturn)
17560
17561 cat >>confdefs.h <<EOF
17562 #define GCC_NORETURN $cf_directive
17563 EOF
17564
17565                                 ;;
17566                         (printf)
17567                                 cf_value='/* nothing */'
17568                                 if test "$cf_printf_attribute" != no ; then
17569                                         cf_value='__attribute__((format(printf,fmt,var)))'
17570
17571 cat >>confdefs.h <<\EOF
17572 #define GCC_PRINTF 1
17573 EOF
17574
17575                                 fi
17576
17577 cat >>confdefs.h <<EOF
17578 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17579 EOF
17580
17581                                 ;;
17582                         (scanf)
17583                                 cf_value='/* nothing */'
17584                                 if test "$cf_scanf_attribute" != no ; then
17585                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17586
17587 cat >>confdefs.h <<\EOF
17588 #define GCC_SCANF 1
17589 EOF
17590
17591                                 fi
17592
17593 cat >>confdefs.h <<EOF
17594 #define GCC_SCANFLIKE(fmt,var) $cf_value
17595 EOF
17596
17597                                 ;;
17598                         (unused)
17599
17600 cat >>confdefs.h <<EOF
17601 #define GCC_UNUSED $cf_directive
17602 EOF
17603
17604                                 ;;
17605                         esac
17606                 fi
17607         done
17608 else
17609         ${FGREP-fgrep} define conftest.i >>confdefs.h
17610 fi
17611 rm -rf ./conftest*
17612 fi
17613
17614 fi
17615
17616 if test "x$enable_warnings" = "xyes"; then
17617
17618         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17619
17620         if test "x$cf_with_cxx" = xyes ; then
17621
17622 INTEL_CPLUSPLUS=no
17623
17624 if test "$GCC" = yes ; then
17625         case "$host_os" in
17626         (linux*|gnu*)
17627                 echo "$as_me:17627: checking if this is really Intel C++ compiler" >&5
17628 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17629                 cf_save_CFLAGS="$CXXFLAGS"
17630                 CXXFLAGS="$CXXFLAGS -no-gcc"
17631                 cat >"conftest.$ac_ext" <<_ACEOF
17632 #line 17632 "configure"
17633 #include "confdefs.h"
17634
17635 int
17636 main (void)
17637 {
17638
17639 #ifdef __INTEL_COMPILER
17640 #else
17641 #error __INTEL_COMPILER is not defined
17642 #endif
17643
17644   ;
17645   return 0;
17646 }
17647 _ACEOF
17648 rm -f "conftest.$ac_objext"
17649 if { (eval echo "$as_me:17649: \"$ac_compile\"") >&5
17650   (eval $ac_compile) 2>&5
17651   ac_status=$?
17652   echo "$as_me:17652: \$? = $ac_status" >&5
17653   (exit "$ac_status"); } &&
17654          { ac_try='test -s "conftest.$ac_objext"'
17655   { (eval echo "$as_me:17655: \"$ac_try\"") >&5
17656   (eval $ac_try) 2>&5
17657   ac_status=$?
17658   echo "$as_me:17658: \$? = $ac_status" >&5
17659   (exit "$ac_status"); }; }; then
17660   INTEL_CPLUSPLUS=yes
17661 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17662
17663 else
17664   echo "$as_me: failed program was:" >&5
17665 cat "conftest.$ac_ext" >&5
17666 fi
17667 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17668                 CXXFLAGS="$cf_save_CFLAGS"
17669                 echo "$as_me:17669: result: $INTEL_CPLUSPLUS" >&5
17670 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17671                 ;;
17672         esac
17673 fi
17674
17675 CLANG_CPLUSPLUS=no
17676
17677 if test "$GCC" = yes ; then
17678         echo "$as_me:17678: checking if this is really Clang C++ compiler" >&5
17679 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17680         cf_save_CFLAGS="$CXXFLAGS"
17681         cat >"conftest.$ac_ext" <<_ACEOF
17682 #line 17682 "configure"
17683 #include "confdefs.h"
17684
17685 int
17686 main (void)
17687 {
17688
17689 #ifdef __clang__
17690 #else
17691 #error __clang__ is not defined
17692 #endif
17693
17694   ;
17695   return 0;
17696 }
17697 _ACEOF
17698 rm -f "conftest.$ac_objext"
17699 if { (eval echo "$as_me:17699: \"$ac_compile\"") >&5
17700   (eval $ac_compile) 2>&5
17701   ac_status=$?
17702   echo "$as_me:17702: \$? = $ac_status" >&5
17703   (exit "$ac_status"); } &&
17704          { ac_try='test -s "conftest.$ac_objext"'
17705   { (eval echo "$as_me:17705: \"$ac_try\"") >&5
17706   (eval $ac_try) 2>&5
17707   ac_status=$?
17708   echo "$as_me:17708: \$? = $ac_status" >&5
17709   (exit "$ac_status"); }; }; then
17710   CLANG_CPLUSPLUS=yes
17711
17712 else
17713   echo "$as_me: failed program was:" >&5
17714 cat "conftest.$ac_ext" >&5
17715 fi
17716 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17717         CXXFLAGS="$cf_save_CFLAGS"
17718         echo "$as_me:17718: result: $CLANG_CPLUSPLUS" >&5
17719 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17720 fi
17721
17722 CLANG_VERSION=none
17723
17724 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17725         case "$CC" in
17726         (c[1-9][0-9]|*/c[1-9][0-9])
17727                 { echo "$as_me:17727: WARNING: replacing broken compiler alias $CC" >&5
17728 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17729                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17730                 CC=clang
17731                 ;;
17732         esac
17733
17734         echo "$as_me:17734: checking version of $CC" >&5
17735 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17736         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.].*//'`"
17737         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17738         echo "$as_me:17738: result: $CLANG_VERSION" >&5
17739 echo "${ECHO_T}$CLANG_VERSION" >&6
17740
17741         for cf_clang_opt in \
17742                 -Qunused-arguments \
17743                 -Wno-error=implicit-function-declaration
17744         do
17745                 echo "$as_me:17745: checking if option $cf_clang_opt works" >&5
17746 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17747                 cf_save_CFLAGS="$CFLAGS"
17748                 CFLAGS="$CFLAGS $cf_clang_opt"
17749                 cat >"conftest.$ac_ext" <<_ACEOF
17750 #line 17750 "configure"
17751 #include "confdefs.h"
17752
17753                         #include <stdio.h>
17754 int
17755 main (void)
17756 {
17757
17758                         printf("hello!\\n");
17759   ;
17760   return 0;
17761 }
17762 _ACEOF
17763 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17764 if { (eval echo "$as_me:17764: \"$ac_link\"") >&5
17765   (eval $ac_link) 2>&5
17766   ac_status=$?
17767   echo "$as_me:17767: \$? = $ac_status" >&5
17768   (exit "$ac_status"); } &&
17769          { ac_try='test -s "conftest$ac_exeext"'
17770   { (eval echo "$as_me:17770: \"$ac_try\"") >&5
17771   (eval $ac_try) 2>&5
17772   ac_status=$?
17773   echo "$as_me:17773: \$? = $ac_status" >&5
17774   (exit "$ac_status"); }; }; then
17775
17776                         cf_clang_optok=yes
17777 else
17778   echo "$as_me: failed program was:" >&5
17779 cat "conftest.$ac_ext" >&5
17780
17781                         cf_clang_optok=no
17782 fi
17783 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17784                 echo "$as_me:17784: result: $cf_clang_optok" >&5
17785 echo "${ECHO_T}$cf_clang_optok" >&6
17786                 CFLAGS="$cf_save_CFLAGS"
17787                 if test "$cf_clang_optok" = yes; then
17788                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17789
17790 echo "${as_me:-configure}:17790: testing adding option $cf_clang_opt ..." 1>&5
17791
17792         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17793         CFLAGS="${CFLAGS}$cf_clang_opt"
17794
17795                 fi
17796         done
17797 fi
17798
17799 ac_ext=cc
17800 ac_cpp='$CXXCPP $CPPFLAGS'
17801 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17802 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17803 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17804 ac_main_return="return"
17805
17806 cat > conftest.$ac_ext <<EOF
17807 #line 17807 "configure"
17808 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17809 EOF
17810
17811 if test "$INTEL_CPLUSPLUS" = yes
17812 then
17813 # The "-wdXXX" options suppress warnings:
17814 # remark #1419: external declaration in primary source file
17815 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17816 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17817 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17818 # remark #193: zero used for undefined preprocessing identifier
17819 # remark #593: variable "curs_sb_left_arrow" was set but never used
17820 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17821 # remark #869: parameter "tw" was never referenced
17822 # remark #981: operands are evaluated in unspecified order
17823 # warning #269: invalid format string conversion
17824
17825         { echo "$as_me:17825: checking for $CC warning options..." >&5
17826 echo "$as_me: checking for $CC warning options..." >&6;}
17827         cf_save_CXXFLAGS="$CXXFLAGS"
17828         EXTRA_CXXFLAGS="-Wall"
17829         for cf_opt in \
17830                 wd1419 \
17831                 wd1682 \
17832                 wd1683 \
17833                 wd1684 \
17834                 wd193 \
17835                 wd279 \
17836                 wd593 \
17837                 wd810 \
17838                 wd869 \
17839                 wd981
17840         do
17841                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17842                 if { (eval echo "$as_me:17842: \"$ac_compile\"") >&5
17843   (eval $ac_compile) 2>&5
17844   ac_status=$?
17845   echo "$as_me:17845: \$? = $ac_status" >&5
17846   (exit "$ac_status"); }; then
17847                         test -n "$verbose" && echo "$as_me:17847: result: ... -$cf_opt" >&5
17848 echo "${ECHO_T}... -$cf_opt" >&6
17849                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17850                 fi
17851         done
17852         CXXFLAGS="$cf_save_CXXFLAGS"
17853
17854 elif test "$GXX" = yes
17855 then
17856         { echo "$as_me:17856: checking for $CXX warning options..." >&5
17857 echo "$as_me: checking for $CXX warning options..." >&6;}
17858         cf_save_CXXFLAGS="$CXXFLAGS"
17859         EXTRA_CXXFLAGS="-W -Wall"
17860         cf_gxx_extra_warnings=""
17861         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17862         case "$GXX_VERSION" in
17863         ([1-2].*)
17864                 ;;
17865         (*)
17866                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17867                 ;;
17868         esac
17869         for cf_opt in \
17870                 Wabi \
17871                 fabi-version=0 \
17872                 Wextra \
17873                 Wignored-qualifiers \
17874                 Wlogical-op \
17875                 Woverloaded-virtual \
17876                 Wsign-promo \
17877                 Wsynth \
17878                 Wold-style-cast \
17879                 Wcast-align \
17880                 Wcast-qual \
17881                 Wpointer-arith \
17882                 Wshadow \
17883                 Wundef $cf_gxx_extra_warnings Wno-unused
17884         do
17885                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17886                 if { (eval echo "$as_me:17886: \"$ac_compile\"") >&5
17887   (eval $ac_compile) 2>&5
17888   ac_status=$?
17889   echo "$as_me:17889: \$? = $ac_status" >&5
17890   (exit "$ac_status"); }; then
17891                         test -n "$verbose" && echo "$as_me:17891: result: ... -$cf_opt" >&5
17892 echo "${ECHO_T}... -$cf_opt" >&6
17893                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17894                 else
17895                         test -n "$verbose" && echo "$as_me:17895: result: ... no -$cf_opt" >&5
17896 echo "${ECHO_T}... no -$cf_opt" >&6
17897                 fi
17898         done
17899         CXXFLAGS="$cf_save_CXXFLAGS"
17900 fi
17901
17902 rm -rf ./conftest*
17903 ac_ext=c
17904 ac_cpp='$CPP $CPPFLAGS'
17905 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17906 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17907 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17908 ac_main_return="return"
17909
17910         fi
17911 fi
17912
17913 echo "$as_me:17913: checking if you want to work around bogus compiler/loader warnings" >&5
17914 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17915
17916 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17917 if test "${enable_string_hacks+set}" = set; then
17918   enableval="$enable_string_hacks"
17919   enable_string_hacks=$enableval
17920 else
17921   enable_string_hacks=no
17922 fi;
17923 echo "$as_me:17923: result: $enable_string_hacks" >&5
17924 echo "${ECHO_T}$enable_string_hacks" >&6
17925
17926 if test "x$enable_string_hacks" = "xyes"; then
17927
17928 cat >>confdefs.h <<\EOF
17929 #define USE_STRING_HACKS 1
17930 EOF
17931
17932         { echo "$as_me:17932: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17933 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17934         echo "$as_me:17934: checking for strlcat" >&5
17935 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17936 if test "${ac_cv_func_strlcat+set}" = set; then
17937   echo $ECHO_N "(cached) $ECHO_C" >&6
17938 else
17939   cat >"conftest.$ac_ext" <<_ACEOF
17940 #line 17940 "configure"
17941 #include "confdefs.h"
17942 #define strlcat autoconf_temporary
17943 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17944 #undef strlcat
17945
17946 #ifdef __cplusplus
17947 extern "C"
17948 #endif
17949
17950 /* We use char because int might match the return type of a gcc2
17951    builtin and then its argument prototype would still apply.  */
17952 char strlcat (void);
17953
17954 int
17955 main (void)
17956 {
17957
17958 /* The GNU C library defines stubs for functions which it implements
17959     to always fail with ENOSYS.  Some functions are actually named
17960     something starting with __ and the normal name is an alias.  */
17961 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17962 #error found stub for strlcat
17963 #endif
17964
17965         return strlcat ();
17966   ;
17967   return 0;
17968 }
17969 _ACEOF
17970 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17971 if { (eval echo "$as_me:17971: \"$ac_link\"") >&5
17972   (eval $ac_link) 2>&5
17973   ac_status=$?
17974   echo "$as_me:17974: \$? = $ac_status" >&5
17975   (exit "$ac_status"); } &&
17976          { ac_try='test -s "conftest$ac_exeext"'
17977   { (eval echo "$as_me:17977: \"$ac_try\"") >&5
17978   (eval $ac_try) 2>&5
17979   ac_status=$?
17980   echo "$as_me:17980: \$? = $ac_status" >&5
17981   (exit "$ac_status"); }; }; then
17982   ac_cv_func_strlcat=yes
17983 else
17984   echo "$as_me: failed program was:" >&5
17985 cat "conftest.$ac_ext" >&5
17986 ac_cv_func_strlcat=no
17987 fi
17988 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17989 fi
17990 echo "$as_me:17990: result: $ac_cv_func_strlcat" >&5
17991 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17992 if test "$ac_cv_func_strlcat" = yes; then
17993
17994 cat >>confdefs.h <<\EOF
17995 #define HAVE_STRLCAT 1
17996 EOF
17997
17998 else
17999
18000                 echo "$as_me:18000: checking for strlcat in -lbsd" >&5
18001 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18002 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18003   echo $ECHO_N "(cached) $ECHO_C" >&6
18004 else
18005   ac_check_lib_save_LIBS=$LIBS
18006 LIBS="-lbsd  $LIBS"
18007 cat >"conftest.$ac_ext" <<_ACEOF
18008 #line 18008 "configure"
18009 #include "confdefs.h"
18010
18011 /* Override any gcc2 internal prototype to avoid an error.  */
18012 #ifdef __cplusplus
18013 extern "C"
18014 #endif
18015 /* We use char because int might match the return type of a gcc2
18016    builtin and then its argument prototype would still apply.  */
18017 char strlcat ();
18018 int
18019 main (void)
18020 {
18021 strlcat ();
18022   ;
18023   return 0;
18024 }
18025 _ACEOF
18026 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18027 if { (eval echo "$as_me:18027: \"$ac_link\"") >&5
18028   (eval $ac_link) 2>&5
18029   ac_status=$?
18030   echo "$as_me:18030: \$? = $ac_status" >&5
18031   (exit "$ac_status"); } &&
18032          { ac_try='test -s "conftest$ac_exeext"'
18033   { (eval echo "$as_me:18033: \"$ac_try\"") >&5
18034   (eval $ac_try) 2>&5
18035   ac_status=$?
18036   echo "$as_me:18036: \$? = $ac_status" >&5
18037   (exit "$ac_status"); }; }; then
18038   ac_cv_lib_bsd_strlcat=yes
18039 else
18040   echo "$as_me: failed program was:" >&5
18041 cat "conftest.$ac_ext" >&5
18042 ac_cv_lib_bsd_strlcat=no
18043 fi
18044 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18045 LIBS=$ac_check_lib_save_LIBS
18046 fi
18047 echo "$as_me:18047: result: $ac_cv_lib_bsd_strlcat" >&5
18048 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18049 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18050
18051 cf_add_libs="$LIBS"
18052 # reverse order
18053 cf_add_0lib=
18054 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18055 # filter duplicates
18056 for cf_add_1lib in $cf_add_0lib; do
18057         for cf_add_2lib in $cf_add_libs; do
18058                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18059                         cf_add_1lib=
18060                         break
18061                 fi
18062         done
18063         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18064 done
18065 LIBS="$cf_add_libs"
18066
18067 for ac_header in bsd/string.h
18068 do
18069 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18070 echo "$as_me:18070: checking for $ac_header" >&5
18071 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18072 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18073   echo $ECHO_N "(cached) $ECHO_C" >&6
18074 else
18075   cat >"conftest.$ac_ext" <<_ACEOF
18076 #line 18076 "configure"
18077 #include "confdefs.h"
18078 #include <$ac_header>
18079 _ACEOF
18080 if { (eval echo "$as_me:18080: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18081   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18082   ac_status=$?
18083   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18084   rm -f conftest.er1
18085   cat conftest.err >&5
18086   echo "$as_me:18086: \$? = $ac_status" >&5
18087   (exit "$ac_status"); } >/dev/null; then
18088   if test -s conftest.err; then
18089     ac_cpp_err=$ac_c_preproc_warn_flag
18090   else
18091     ac_cpp_err=
18092   fi
18093 else
18094   ac_cpp_err=yes
18095 fi
18096 if test -z "$ac_cpp_err"; then
18097   eval "$as_ac_Header=yes"
18098 else
18099   echo "$as_me: failed program was:" >&5
18100   cat "conftest.$ac_ext" >&5
18101   eval "$as_ac_Header=no"
18102 fi
18103 rm -f conftest.err "conftest.$ac_ext"
18104 fi
18105 echo "$as_me:18105: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18106 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18107 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18108   cat >>confdefs.h <<EOF
18109 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18110 EOF
18111
18112 fi
18113 done
18114
18115 cat >>confdefs.h <<\EOF
18116 #define HAVE_STRLCAT 1
18117 EOF
18118
18119 fi
18120
18121 fi
18122
18123 for ac_func in strlcpy snprintf
18124 do
18125 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18126 echo "$as_me:18126: checking for $ac_func" >&5
18127 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18128 if eval "test \"\${$as_ac_var+set}\" = set"; then
18129   echo $ECHO_N "(cached) $ECHO_C" >&6
18130 else
18131   cat >"conftest.$ac_ext" <<_ACEOF
18132 #line 18132 "configure"
18133 #include "confdefs.h"
18134 #define $ac_func autoconf_temporary
18135 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18136 #undef $ac_func
18137
18138 #ifdef __cplusplus
18139 extern "C"
18140 #endif
18141
18142 /* We use char because int might match the return type of a gcc2
18143    builtin and then its argument prototype would still apply.  */
18144 char $ac_func (void);
18145
18146 int
18147 main (void)
18148 {
18149
18150 /* The GNU C library defines stubs for functions which it implements
18151     to always fail with ENOSYS.  Some functions are actually named
18152     something starting with __ and the normal name is an alias.  */
18153 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18154 #error found stub for $ac_func
18155 #endif
18156
18157         return $ac_func ();
18158   ;
18159   return 0;
18160 }
18161 _ACEOF
18162 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18163 if { (eval echo "$as_me:18163: \"$ac_link\"") >&5
18164   (eval $ac_link) 2>&5
18165   ac_status=$?
18166   echo "$as_me:18166: \$? = $ac_status" >&5
18167   (exit "$ac_status"); } &&
18168          { ac_try='test -s "conftest$ac_exeext"'
18169   { (eval echo "$as_me:18169: \"$ac_try\"") >&5
18170   (eval $ac_try) 2>&5
18171   ac_status=$?
18172   echo "$as_me:18172: \$? = $ac_status" >&5
18173   (exit "$ac_status"); }; }; then
18174   eval "$as_ac_var=yes"
18175 else
18176   echo "$as_me: failed program was:" >&5
18177 cat "conftest.$ac_ext" >&5
18178 eval "$as_ac_var=no"
18179 fi
18180 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18181 fi
18182 echo "$as_me:18182: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18183 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18184 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18185   cat >>confdefs.h <<EOF
18186 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18187 EOF
18188
18189 fi
18190 done
18191
18192 fi
18193
18194 ###     use option --enable-assertions to turn on generation of assertion code
18195 echo "$as_me:18195: checking if you want to enable runtime assertions" >&5
18196 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18197
18198 # Check whether --enable-assertions or --disable-assertions was given.
18199 if test "${enable_assertions+set}" = set; then
18200   enableval="$enable_assertions"
18201   with_assertions=$enableval
18202 else
18203   with_assertions=no
18204 fi;
18205 echo "$as_me:18205: result: $with_assertions" >&5
18206 echo "${ECHO_T}$with_assertions" >&6
18207 if test -n "$GCC"
18208 then
18209         if test "$with_assertions" = no
18210         then
18211                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18212         else
18213
18214         ADAFLAGS="$ADAFLAGS -gnata"
18215
18216         fi
18217 fi
18218
18219 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18220
18221 echo "$as_me:18221: checking if you want to use dmalloc for testing" >&5
18222 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18223
18224 # Check whether --with-dmalloc or --without-dmalloc was given.
18225 if test "${with_dmalloc+set}" = set; then
18226   withval="$with_dmalloc"
18227   case "x$withval" in
18228         (x|xno) ;;
18229         (*)
18230                 : "${with_cflags:=-g}"
18231                 : "${enable_leaks:=no}"
18232                 with_dmalloc=yes
18233
18234 cat >>confdefs.h <<EOF
18235 #define USE_DMALLOC 1
18236 EOF
18237
18238                 ;;
18239         esac
18240 else
18241   with_dmalloc=
18242 fi;
18243 echo "$as_me:18243: result: ${with_dmalloc:-no}" >&5
18244 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18245
18246 case ".$with_cflags" in
18247 (.*-g*)
18248         case .$CFLAGS in
18249         (.*-g*)
18250                 ;;
18251         (*)
18252
18253 cf_fix_cppflags=no
18254 cf_new_cflags=
18255 cf_new_cppflags=
18256 cf_new_extra_cppflags=
18257
18258 for cf_add_cflags in -g
18259 do
18260 case "$cf_fix_cppflags" in
18261 (no)
18262         case "$cf_add_cflags" in
18263         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18264                 case "$cf_add_cflags" in
18265                 (-D*)
18266                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18267
18268                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18269                                 && test -z "${cf_tst_cflags}" \
18270                                 && cf_fix_cppflags=yes
18271
18272                         if test "$cf_fix_cppflags" = yes ; then
18273
18274         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18275         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18276
18277                                 continue
18278                         elif test "${cf_tst_cflags}" = "\"'" ; then
18279
18280         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18281         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18282
18283                                 continue
18284                         fi
18285                         ;;
18286                 esac
18287                 case "$CPPFLAGS" in
18288                 (*$cf_add_cflags)
18289                         ;;
18290                 (*)
18291                         case "$cf_add_cflags" in
18292                         (-D*)
18293                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18294
18295 CPPFLAGS=`echo "$CPPFLAGS" | \
18296         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18297                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18298
18299                                 ;;
18300                         esac
18301
18302         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18303         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18304
18305                         ;;
18306                 esac
18307                 ;;
18308         (*)
18309
18310         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18311         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18312
18313                 ;;
18314         esac
18315         ;;
18316 (yes)
18317
18318         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18319         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18320
18321         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18322
18323         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18324                 && test -z "${cf_tst_cflags}" \
18325                 && cf_fix_cppflags=no
18326         ;;
18327 esac
18328 done
18329
18330 if test -n "$cf_new_cflags" ; then
18331
18332         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18333         CFLAGS="${CFLAGS}$cf_new_cflags"
18334
18335 fi
18336
18337 if test -n "$cf_new_cppflags" ; then
18338
18339         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18340         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18341
18342 fi
18343
18344 if test -n "$cf_new_extra_cppflags" ; then
18345
18346         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18347         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18348
18349 fi
18350
18351                 ;;
18352         esac
18353         ;;
18354 esac
18355
18356 if test "$with_dmalloc" = yes ; then
18357         echo "$as_me:18357: checking for dmalloc.h" >&5
18358 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18359 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18360   echo $ECHO_N "(cached) $ECHO_C" >&6
18361 else
18362   cat >"conftest.$ac_ext" <<_ACEOF
18363 #line 18363 "configure"
18364 #include "confdefs.h"
18365 #include <dmalloc.h>
18366 _ACEOF
18367 if { (eval echo "$as_me:18367: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18368   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18369   ac_status=$?
18370   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18371   rm -f conftest.er1
18372   cat conftest.err >&5
18373   echo "$as_me:18373: \$? = $ac_status" >&5
18374   (exit "$ac_status"); } >/dev/null; then
18375   if test -s conftest.err; then
18376     ac_cpp_err=$ac_c_preproc_warn_flag
18377   else
18378     ac_cpp_err=
18379   fi
18380 else
18381   ac_cpp_err=yes
18382 fi
18383 if test -z "$ac_cpp_err"; then
18384   ac_cv_header_dmalloc_h=yes
18385 else
18386   echo "$as_me: failed program was:" >&5
18387   cat "conftest.$ac_ext" >&5
18388   ac_cv_header_dmalloc_h=no
18389 fi
18390 rm -f conftest.err "conftest.$ac_ext"
18391 fi
18392 echo "$as_me:18392: result: $ac_cv_header_dmalloc_h" >&5
18393 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18394 if test "$ac_cv_header_dmalloc_h" = yes; then
18395
18396 echo "$as_me:18396: checking for dmalloc_debug in -ldmalloc" >&5
18397 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18398 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18399   echo $ECHO_N "(cached) $ECHO_C" >&6
18400 else
18401   ac_check_lib_save_LIBS=$LIBS
18402 LIBS="-ldmalloc  $LIBS"
18403 cat >"conftest.$ac_ext" <<_ACEOF
18404 #line 18404 "configure"
18405 #include "confdefs.h"
18406
18407 /* Override any gcc2 internal prototype to avoid an error.  */
18408 #ifdef __cplusplus
18409 extern "C"
18410 #endif
18411 /* We use char because int might match the return type of a gcc2
18412    builtin and then its argument prototype would still apply.  */
18413 char dmalloc_debug ();
18414 int
18415 main (void)
18416 {
18417 dmalloc_debug ();
18418   ;
18419   return 0;
18420 }
18421 _ACEOF
18422 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18423 if { (eval echo "$as_me:18423: \"$ac_link\"") >&5
18424   (eval $ac_link) 2>&5
18425   ac_status=$?
18426   echo "$as_me:18426: \$? = $ac_status" >&5
18427   (exit "$ac_status"); } &&
18428          { ac_try='test -s "conftest$ac_exeext"'
18429   { (eval echo "$as_me:18429: \"$ac_try\"") >&5
18430   (eval $ac_try) 2>&5
18431   ac_status=$?
18432   echo "$as_me:18432: \$? = $ac_status" >&5
18433   (exit "$ac_status"); }; }; then
18434   ac_cv_lib_dmalloc_dmalloc_debug=yes
18435 else
18436   echo "$as_me: failed program was:" >&5
18437 cat "conftest.$ac_ext" >&5
18438 ac_cv_lib_dmalloc_dmalloc_debug=no
18439 fi
18440 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18441 LIBS=$ac_check_lib_save_LIBS
18442 fi
18443 echo "$as_me:18443: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18444 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18445 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18446   cat >>confdefs.h <<EOF
18447 #define HAVE_LIBDMALLOC 1
18448 EOF
18449
18450   LIBS="-ldmalloc $LIBS"
18451
18452 fi
18453
18454 fi
18455
18456 fi
18457
18458 echo "$as_me:18458: checking if you want to use dbmalloc for testing" >&5
18459 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18460
18461 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18462 if test "${with_dbmalloc+set}" = set; then
18463   withval="$with_dbmalloc"
18464   case "x$withval" in
18465         (x|xno) ;;
18466         (*)
18467                 : "${with_cflags:=-g}"
18468                 : "${enable_leaks:=no}"
18469                 with_dbmalloc=yes
18470
18471 cat >>confdefs.h <<EOF
18472 #define USE_DBMALLOC 1
18473 EOF
18474
18475                 ;;
18476         esac
18477 else
18478   with_dbmalloc=
18479 fi;
18480 echo "$as_me:18480: result: ${with_dbmalloc:-no}" >&5
18481 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18482
18483 case ".$with_cflags" in
18484 (.*-g*)
18485         case .$CFLAGS in
18486         (.*-g*)
18487                 ;;
18488         (*)
18489
18490 cf_fix_cppflags=no
18491 cf_new_cflags=
18492 cf_new_cppflags=
18493 cf_new_extra_cppflags=
18494
18495 for cf_add_cflags in -g
18496 do
18497 case "$cf_fix_cppflags" in
18498 (no)
18499         case "$cf_add_cflags" in
18500         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18501                 case "$cf_add_cflags" in
18502                 (-D*)
18503                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18504
18505                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18506                                 && test -z "${cf_tst_cflags}" \
18507                                 && cf_fix_cppflags=yes
18508
18509                         if test "$cf_fix_cppflags" = yes ; then
18510
18511         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18512         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18513
18514                                 continue
18515                         elif test "${cf_tst_cflags}" = "\"'" ; then
18516
18517         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18518         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18519
18520                                 continue
18521                         fi
18522                         ;;
18523                 esac
18524                 case "$CPPFLAGS" in
18525                 (*$cf_add_cflags)
18526                         ;;
18527                 (*)
18528                         case "$cf_add_cflags" in
18529                         (-D*)
18530                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18531
18532 CPPFLAGS=`echo "$CPPFLAGS" | \
18533         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18534                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18535
18536                                 ;;
18537                         esac
18538
18539         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18540         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18541
18542                         ;;
18543                 esac
18544                 ;;
18545         (*)
18546
18547         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18548         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18549
18550                 ;;
18551         esac
18552         ;;
18553 (yes)
18554
18555         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18556         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18557
18558         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18559
18560         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18561                 && test -z "${cf_tst_cflags}" \
18562                 && cf_fix_cppflags=no
18563         ;;
18564 esac
18565 done
18566
18567 if test -n "$cf_new_cflags" ; then
18568
18569         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18570         CFLAGS="${CFLAGS}$cf_new_cflags"
18571
18572 fi
18573
18574 if test -n "$cf_new_cppflags" ; then
18575
18576         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18577         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18578
18579 fi
18580
18581 if test -n "$cf_new_extra_cppflags" ; then
18582
18583         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18584         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18585
18586 fi
18587
18588                 ;;
18589         esac
18590         ;;
18591 esac
18592
18593 if test "$with_dbmalloc" = yes ; then
18594         echo "$as_me:18594: checking for dbmalloc.h" >&5
18595 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18596 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18597   echo $ECHO_N "(cached) $ECHO_C" >&6
18598 else
18599   cat >"conftest.$ac_ext" <<_ACEOF
18600 #line 18600 "configure"
18601 #include "confdefs.h"
18602 #include <dbmalloc.h>
18603 _ACEOF
18604 if { (eval echo "$as_me:18604: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18605   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18606   ac_status=$?
18607   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18608   rm -f conftest.er1
18609   cat conftest.err >&5
18610   echo "$as_me:18610: \$? = $ac_status" >&5
18611   (exit "$ac_status"); } >/dev/null; then
18612   if test -s conftest.err; then
18613     ac_cpp_err=$ac_c_preproc_warn_flag
18614   else
18615     ac_cpp_err=
18616   fi
18617 else
18618   ac_cpp_err=yes
18619 fi
18620 if test -z "$ac_cpp_err"; then
18621   ac_cv_header_dbmalloc_h=yes
18622 else
18623   echo "$as_me: failed program was:" >&5
18624   cat "conftest.$ac_ext" >&5
18625   ac_cv_header_dbmalloc_h=no
18626 fi
18627 rm -f conftest.err "conftest.$ac_ext"
18628 fi
18629 echo "$as_me:18629: result: $ac_cv_header_dbmalloc_h" >&5
18630 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18631 if test "$ac_cv_header_dbmalloc_h" = yes; then
18632
18633 echo "$as_me:18633: checking for debug_malloc in -ldbmalloc" >&5
18634 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18635 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18636   echo $ECHO_N "(cached) $ECHO_C" >&6
18637 else
18638   ac_check_lib_save_LIBS=$LIBS
18639 LIBS="-ldbmalloc  $LIBS"
18640 cat >"conftest.$ac_ext" <<_ACEOF
18641 #line 18641 "configure"
18642 #include "confdefs.h"
18643
18644 /* Override any gcc2 internal prototype to avoid an error.  */
18645 #ifdef __cplusplus
18646 extern "C"
18647 #endif
18648 /* We use char because int might match the return type of a gcc2
18649    builtin and then its argument prototype would still apply.  */
18650 char debug_malloc ();
18651 int
18652 main (void)
18653 {
18654 debug_malloc ();
18655   ;
18656   return 0;
18657 }
18658 _ACEOF
18659 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18660 if { (eval echo "$as_me:18660: \"$ac_link\"") >&5
18661   (eval $ac_link) 2>&5
18662   ac_status=$?
18663   echo "$as_me:18663: \$? = $ac_status" >&5
18664   (exit "$ac_status"); } &&
18665          { ac_try='test -s "conftest$ac_exeext"'
18666   { (eval echo "$as_me:18666: \"$ac_try\"") >&5
18667   (eval $ac_try) 2>&5
18668   ac_status=$?
18669   echo "$as_me:18669: \$? = $ac_status" >&5
18670   (exit "$ac_status"); }; }; then
18671   ac_cv_lib_dbmalloc_debug_malloc=yes
18672 else
18673   echo "$as_me: failed program was:" >&5
18674 cat "conftest.$ac_ext" >&5
18675 ac_cv_lib_dbmalloc_debug_malloc=no
18676 fi
18677 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18678 LIBS=$ac_check_lib_save_LIBS
18679 fi
18680 echo "$as_me:18680: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18681 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18682 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18683   cat >>confdefs.h <<EOF
18684 #define HAVE_LIBDBMALLOC 1
18685 EOF
18686
18687   LIBS="-ldbmalloc $LIBS"
18688
18689 fi
18690
18691 fi
18692
18693 fi
18694
18695 echo "$as_me:18695: checking if you want to use valgrind for testing" >&5
18696 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18697
18698 # Check whether --with-valgrind or --without-valgrind was given.
18699 if test "${with_valgrind+set}" = set; then
18700   withval="$with_valgrind"
18701   case "x$withval" in
18702         (x|xno) ;;
18703         (*)
18704                 : "${with_cflags:=-g}"
18705                 : "${enable_leaks:=no}"
18706                 with_valgrind=yes
18707
18708 cat >>confdefs.h <<EOF
18709 #define USE_VALGRIND 1
18710 EOF
18711
18712                 ;;
18713         esac
18714 else
18715   with_valgrind=
18716 fi;
18717 echo "$as_me:18717: result: ${with_valgrind:-no}" >&5
18718 echo "${ECHO_T}${with_valgrind:-no}" >&6
18719
18720 case ".$with_cflags" in
18721 (.*-g*)
18722         case .$CFLAGS in
18723         (.*-g*)
18724                 ;;
18725         (*)
18726
18727 cf_fix_cppflags=no
18728 cf_new_cflags=
18729 cf_new_cppflags=
18730 cf_new_extra_cppflags=
18731
18732 for cf_add_cflags in -g
18733 do
18734 case "$cf_fix_cppflags" in
18735 (no)
18736         case "$cf_add_cflags" in
18737         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18738                 case "$cf_add_cflags" in
18739                 (-D*)
18740                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18741
18742                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18743                                 && test -z "${cf_tst_cflags}" \
18744                                 && cf_fix_cppflags=yes
18745
18746                         if test "$cf_fix_cppflags" = yes ; then
18747
18748         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18749         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18750
18751                                 continue
18752                         elif test "${cf_tst_cflags}" = "\"'" ; then
18753
18754         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18755         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18756
18757                                 continue
18758                         fi
18759                         ;;
18760                 esac
18761                 case "$CPPFLAGS" in
18762                 (*$cf_add_cflags)
18763                         ;;
18764                 (*)
18765                         case "$cf_add_cflags" in
18766                         (-D*)
18767                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18768
18769 CPPFLAGS=`echo "$CPPFLAGS" | \
18770         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18771                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18772
18773                                 ;;
18774                         esac
18775
18776         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18777         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18778
18779                         ;;
18780                 esac
18781                 ;;
18782         (*)
18783
18784         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18785         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18786
18787                 ;;
18788         esac
18789         ;;
18790 (yes)
18791
18792         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18793         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18794
18795         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18796
18797         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18798                 && test -z "${cf_tst_cflags}" \
18799                 && cf_fix_cppflags=no
18800         ;;
18801 esac
18802 done
18803
18804 if test -n "$cf_new_cflags" ; then
18805
18806         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18807         CFLAGS="${CFLAGS}$cf_new_cflags"
18808
18809 fi
18810
18811 if test -n "$cf_new_cppflags" ; then
18812
18813         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18814         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18815
18816 fi
18817
18818 if test -n "$cf_new_extra_cppflags" ; then
18819
18820         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18821         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18822
18823 fi
18824
18825                 ;;
18826         esac
18827         ;;
18828 esac
18829
18830 echo "$as_me:18830: checking if you want to perform memory-leak testing" >&5
18831 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18832
18833 # Check whether --enable-leaks or --disable-leaks was given.
18834 if test "${enable_leaks+set}" = set; then
18835   enableval="$enable_leaks"
18836   enable_leaks=$enableval
18837 else
18838   enable_leaks=yes
18839 fi;
18840 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18841 echo "$as_me:18841: result: $with_no_leaks" >&5
18842 echo "${ECHO_T}$with_no_leaks" >&6
18843
18844 if test "$enable_leaks" = no ; then
18845
18846 cat >>confdefs.h <<\EOF
18847 #define NO_LEAKS 1
18848 EOF
18849
18850 cat >>confdefs.h <<\EOF
18851 #define YY_NO_LEAKS 1
18852 EOF
18853
18854 fi
18855
18856 cat >>confdefs.h <<\EOF
18857 #define HAVE_NC_ALLOC_H 1
18858 EOF
18859
18860 ###     use option --enable-expanded to generate certain macros as functions
18861
18862 # Check whether --enable-expanded or --disable-expanded was given.
18863 if test "${enable_expanded+set}" = set; then
18864   enableval="$enable_expanded"
18865   test "x$enableval" = xyes &&
18866 cat >>confdefs.h <<\EOF
18867 #define NCURSES_EXPANDED 1
18868 EOF
18869
18870 fi;
18871
18872 ###     use option --disable-macros to suppress macros in favor of functions
18873
18874 # Check whether --enable-macros or --disable-macros was given.
18875 if test "${enable_macros+set}" = set; then
18876   enableval="$enable_macros"
18877   test "$enableval" = no &&
18878 cat >>confdefs.h <<\EOF
18879 #define NCURSES_NOMACROS 1
18880 EOF
18881
18882 fi;
18883
18884 # Normally we only add trace() to the debug-library.  Allow this to be
18885 # extended to all models of the ncurses library:
18886 cf_all_traces=no
18887 case "$CFLAGS $CPPFLAGS" in
18888 (*-DTRACE*)
18889         cf_all_traces=yes
18890         ;;
18891 esac
18892
18893 echo "$as_me:18893: checking whether to add trace feature to all models" >&5
18894 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18895
18896 # Check whether --with-trace or --without-trace was given.
18897 if test "${with_trace+set}" = set; then
18898   withval="$with_trace"
18899   cf_with_trace=$withval
18900 else
18901   cf_with_trace=$cf_all_traces
18902 fi;
18903 echo "$as_me:18903: result: $cf_with_trace" >&5
18904 echo "${ECHO_T}$cf_with_trace" >&6
18905
18906 if test "x$cf_with_trace" = xyes ; then
18907         LIB_TRACING=all
18908         ADA_TRACE=TRUE
18909
18910 cf_fix_cppflags=no
18911 cf_new_cflags=
18912 cf_new_cppflags=
18913 cf_new_extra_cppflags=
18914
18915 for cf_add_cflags in -DTRACE
18916 do
18917 case "$cf_fix_cppflags" in
18918 (no)
18919         case "$cf_add_cflags" in
18920         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18921                 case "$cf_add_cflags" in
18922                 (-D*)
18923                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18924
18925                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18926                                 && test -z "${cf_tst_cflags}" \
18927                                 && cf_fix_cppflags=yes
18928
18929                         if test "$cf_fix_cppflags" = yes ; then
18930
18931         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18932         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18933
18934                                 continue
18935                         elif test "${cf_tst_cflags}" = "\"'" ; then
18936
18937         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18938         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18939
18940                                 continue
18941                         fi
18942                         ;;
18943                 esac
18944                 case "$CPPFLAGS" in
18945                 (*$cf_add_cflags)
18946                         ;;
18947                 (*)
18948                         case "$cf_add_cflags" in
18949                         (-D*)
18950                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18951
18952 CPPFLAGS=`echo "$CPPFLAGS" | \
18953         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18954                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18955
18956                                 ;;
18957                         esac
18958
18959         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18960         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18961
18962                         ;;
18963                 esac
18964                 ;;
18965         (*)
18966
18967         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18968         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18969
18970                 ;;
18971         esac
18972         ;;
18973 (yes)
18974
18975         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18976         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18977
18978         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18979
18980         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18981                 && test -z "${cf_tst_cflags}" \
18982                 && cf_fix_cppflags=no
18983         ;;
18984 esac
18985 done
18986
18987 if test -n "$cf_new_cflags" ; then
18988
18989         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18990         CFLAGS="${CFLAGS}$cf_new_cflags"
18991
18992 fi
18993
18994 if test -n "$cf_new_cppflags" ; then
18995
18996         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18997         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18998
18999 fi
19000
19001 if test -n "$cf_new_extra_cppflags" ; then
19002
19003         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19004         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19005
19006 fi
19007
19008 cat >>confdefs.h <<\EOF
19009 #define HAVE__TRACEF 1
19010 EOF
19011
19012 else
19013         LIB_TRACING=DEBUG
19014         ADA_TRACE=FALSE
19015 fi
19016
19017 echo "$as_me:19017: checking if we want to use GNAT projects" >&5
19018 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19019
19020 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19021 if test "${enable_gnat_projects+set}" = set; then
19022   enableval="$enable_gnat_projects"
19023   test "$enableval" != no && enableval=yes
19024         if test "$enableval" != "yes" ; then
19025     enable_gnat_projects=no
19026         else
19027                 enable_gnat_projects=yes
19028         fi
19029 else
19030   enableval=yes
19031         enable_gnat_projects=yes
19032
19033 fi;
19034 echo "$as_me:19034: result: $enable_gnat_projects" >&5
19035 echo "${ECHO_T}$enable_gnat_projects" >&6
19036
19037 ###     Checks for libraries.
19038 case "$cf_cv_system_name" in
19039 (*mingw32*|*mingw64*)
19040         # Note: WINVER may be a problem with Windows 10
19041         if test "x$with_exp_win32" = xyes ; then
19042                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19043         else
19044                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19045         fi
19046
19047 echo "$as_me:19047: checking if ssp library is needed" >&5
19048 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19049 if test "${cf_cv_need_libssp+set}" = set; then
19050   echo $ECHO_N "(cached) $ECHO_C" >&6
19051 else
19052
19053 cat >"conftest.$ac_ext" <<_ACEOF
19054 #line 19054 "configure"
19055 #include "confdefs.h"
19056
19057 #include <sys/types.h>
19058 #include <dirent.h>
19059
19060 int
19061 main (void)
19062 {
19063
19064        DIR *dp = opendir(".");
19065
19066   ;
19067   return 0;
19068 }
19069 _ACEOF
19070 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19071 if { (eval echo "$as_me:19071: \"$ac_link\"") >&5
19072   (eval $ac_link) 2>&5
19073   ac_status=$?
19074   echo "$as_me:19074: \$? = $ac_status" >&5
19075   (exit "$ac_status"); } &&
19076          { ac_try='test -s "conftest$ac_exeext"'
19077   { (eval echo "$as_me:19077: \"$ac_try\"") >&5
19078   (eval $ac_try) 2>&5
19079   ac_status=$?
19080   echo "$as_me:19080: \$? = $ac_status" >&5
19081   (exit "$ac_status"); }; }; then
19082   cf_cv_need_libssp=no
19083 else
19084   echo "$as_me: failed program was:" >&5
19085 cat "conftest.$ac_ext" >&5
19086
19087         cf_save_LIBS="$LIBS"
19088         LIBS="$LIBS -lssp"
19089         cat >"conftest.$ac_ext" <<_ACEOF
19090 #line 19090 "configure"
19091 #include "confdefs.h"
19092
19093 #include <sys/types.h>
19094 #include <dirent.h>
19095
19096 int
19097 main (void)
19098 {
19099
19100                    DIR *dp = opendir(".");
19101
19102   ;
19103   return 0;
19104 }
19105 _ACEOF
19106 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19107 if { (eval echo "$as_me:19107: \"$ac_link\"") >&5
19108   (eval $ac_link) 2>&5
19109   ac_status=$?
19110   echo "$as_me:19110: \$? = $ac_status" >&5
19111   (exit "$ac_status"); } &&
19112          { ac_try='test -s "conftest$ac_exeext"'
19113   { (eval echo "$as_me:19113: \"$ac_try\"") >&5
19114   (eval $ac_try) 2>&5
19115   ac_status=$?
19116   echo "$as_me:19116: \$? = $ac_status" >&5
19117   (exit "$ac_status"); }; }; then
19118   cf_cv_need_libssp=yes
19119 else
19120   echo "$as_me: failed program was:" >&5
19121 cat "conftest.$ac_ext" >&5
19122 cf_cv_need_libssp=maybe
19123 fi
19124 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19125         LIBS="$cf_save_LIBS"
19126
19127 fi
19128 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19129 fi
19130 echo "$as_me:19130: result: $cf_cv_need_libssp" >&5
19131 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19132
19133 if test "x$cf_cv_need_libssp" = xyes
19134 then
19135
19136 cf_add_libs="$LIBS"
19137 # reverse order
19138 cf_add_0lib=
19139 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19140 # filter duplicates
19141 for cf_add_1lib in $cf_add_0lib; do
19142         for cf_add_2lib in $cf_add_libs; do
19143                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19144                         cf_add_1lib=
19145                         break
19146                 fi
19147         done
19148         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19149 done
19150 LIBS="$cf_add_libs"
19151
19152 fi
19153
19154         ;;
19155 (*)
19156         ;;
19157 esac
19158
19159 echo "$as_me:19159: checking if -lm needed for math functions" >&5
19160 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19161 if test "${cf_cv_need_libm+set}" = set; then
19162   echo $ECHO_N "(cached) $ECHO_C" >&6
19163 else
19164
19165         cat >"conftest.$ac_ext" <<_ACEOF
19166 #line 19166 "configure"
19167 #include "confdefs.h"
19168
19169                 #include <stdio.h>
19170                 #include <stdlib.h>
19171                 #include <math.h>
19172
19173 int
19174 main (void)
19175 {
19176 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19177   ;
19178   return 0;
19179 }
19180 _ACEOF
19181 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19182 if { (eval echo "$as_me:19182: \"$ac_link\"") >&5
19183   (eval $ac_link) 2>&5
19184   ac_status=$?
19185   echo "$as_me:19185: \$? = $ac_status" >&5
19186   (exit "$ac_status"); } &&
19187          { ac_try='test -s "conftest$ac_exeext"'
19188   { (eval echo "$as_me:19188: \"$ac_try\"") >&5
19189   (eval $ac_try) 2>&5
19190   ac_status=$?
19191   echo "$as_me:19191: \$? = $ac_status" >&5
19192   (exit "$ac_status"); }; }; then
19193   cf_cv_need_libm=no
19194 else
19195   echo "$as_me: failed program was:" >&5
19196 cat "conftest.$ac_ext" >&5
19197 cf_cv_need_libm=yes
19198 fi
19199 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19200 fi
19201 echo "$as_me:19201: result: $cf_cv_need_libm" >&5
19202 echo "${ECHO_T}$cf_cv_need_libm" >&6
19203
19204 if test "$cf_cv_need_libm" = yes
19205 then
19206
19207         cf_save_LIBS="$LIBS"
19208         LIBS="$LIBS -lm"
19209         echo "$as_me:19209: checking if -lm is available for math functions" >&5
19210 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19211 if test "${cf_cv_have_libm+set}" = set; then
19212   echo $ECHO_N "(cached) $ECHO_C" >&6
19213 else
19214
19215         cat >"conftest.$ac_ext" <<_ACEOF
19216 #line 19216 "configure"
19217 #include "confdefs.h"
19218
19219                 #include <stdio.h>
19220                 #include <stdlib.h>
19221                 #include <math.h>
19222
19223 int
19224 main (void)
19225 {
19226 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19227   ;
19228   return 0;
19229 }
19230 _ACEOF
19231 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19232 if { (eval echo "$as_me:19232: \"$ac_link\"") >&5
19233   (eval $ac_link) 2>&5
19234   ac_status=$?
19235   echo "$as_me:19235: \$? = $ac_status" >&5
19236   (exit "$ac_status"); } &&
19237          { ac_try='test -s "conftest$ac_exeext"'
19238   { (eval echo "$as_me:19238: \"$ac_try\"") >&5
19239   (eval $ac_try) 2>&5
19240   ac_status=$?
19241   echo "$as_me:19241: \$? = $ac_status" >&5
19242   (exit "$ac_status"); }; }; then
19243   cf_cv_have_libm=yes
19244 else
19245   echo "$as_me: failed program was:" >&5
19246 cat "conftest.$ac_ext" >&5
19247 cf_cv_have_libm=no
19248 fi
19249 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19250 fi
19251 echo "$as_me:19251: result: $cf_cv_have_libm" >&5
19252 echo "${ECHO_T}$cf_cv_have_libm" >&6
19253         LIBS="$cf_save_LIBS"
19254
19255         if test "$cf_cv_have_libm" = yes
19256         then
19257                 MATH_LIB=-lm
19258         fi
19259 else
19260         cf_cv_have_libm=yes
19261 fi
19262
19263 if test "$cf_cv_have_libm" = yes
19264 then
19265
19266 cat >>confdefs.h <<\EOF
19267 #define HAVE_MATH_FUNCS 1
19268 EOF
19269
19270 fi
19271
19272 ###     Checks for header files.
19273 echo "$as_me:19273: checking whether time.h and sys/time.h may both be included" >&5
19274 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19275 if test "${ac_cv_header_time+set}" = set; then
19276   echo $ECHO_N "(cached) $ECHO_C" >&6
19277 else
19278   cat >"conftest.$ac_ext" <<_ACEOF
19279 #line 19279 "configure"
19280 #include "confdefs.h"
19281 #include <sys/types.h>
19282 #include <sys/time.h>
19283 #include <time.h>
19284
19285 int
19286 main (void)
19287 {
19288 if ((struct tm *) 0)
19289 return 0;
19290   ;
19291   return 0;
19292 }
19293 _ACEOF
19294 rm -f "conftest.$ac_objext"
19295 if { (eval echo "$as_me:19295: \"$ac_compile\"") >&5
19296   (eval $ac_compile) 2>&5
19297   ac_status=$?
19298   echo "$as_me:19298: \$? = $ac_status" >&5
19299   (exit "$ac_status"); } &&
19300          { ac_try='test -s "conftest.$ac_objext"'
19301   { (eval echo "$as_me:19301: \"$ac_try\"") >&5
19302   (eval $ac_try) 2>&5
19303   ac_status=$?
19304   echo "$as_me:19304: \$? = $ac_status" >&5
19305   (exit "$ac_status"); }; }; then
19306   ac_cv_header_time=yes
19307 else
19308   echo "$as_me: failed program was:" >&5
19309 cat "conftest.$ac_ext" >&5
19310 ac_cv_header_time=no
19311 fi
19312 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19313 fi
19314 echo "$as_me:19314: result: $ac_cv_header_time" >&5
19315 echo "${ECHO_T}$ac_cv_header_time" >&6
19316 if test $ac_cv_header_time = yes; then
19317
19318 cat >>confdefs.h <<\EOF
19319 #define TIME_WITH_SYS_TIME 1
19320 EOF
19321
19322 fi
19323
19324 cf_regex_func=no
19325 cf_regex_libs=
19326 case "$host_os" in
19327 (mingw*)
19328         # -lsystre -ltre -lintl -liconv
19329         echo "$as_me:19329: checking for regcomp in -lsystre" >&5
19330 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19331 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19332   echo $ECHO_N "(cached) $ECHO_C" >&6
19333 else
19334   ac_check_lib_save_LIBS=$LIBS
19335 LIBS="-lsystre  $LIBS"
19336 cat >"conftest.$ac_ext" <<_ACEOF
19337 #line 19337 "configure"
19338 #include "confdefs.h"
19339
19340 /* Override any gcc2 internal prototype to avoid an error.  */
19341 #ifdef __cplusplus
19342 extern "C"
19343 #endif
19344 /* We use char because int might match the return type of a gcc2
19345    builtin and then its argument prototype would still apply.  */
19346 char regcomp ();
19347 int
19348 main (void)
19349 {
19350 regcomp ();
19351   ;
19352   return 0;
19353 }
19354 _ACEOF
19355 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19356 if { (eval echo "$as_me:19356: \"$ac_link\"") >&5
19357   (eval $ac_link) 2>&5
19358   ac_status=$?
19359   echo "$as_me:19359: \$? = $ac_status" >&5
19360   (exit "$ac_status"); } &&
19361          { ac_try='test -s "conftest$ac_exeext"'
19362   { (eval echo "$as_me:19362: \"$ac_try\"") >&5
19363   (eval $ac_try) 2>&5
19364   ac_status=$?
19365   echo "$as_me:19365: \$? = $ac_status" >&5
19366   (exit "$ac_status"); }; }; then
19367   ac_cv_lib_systre_regcomp=yes
19368 else
19369   echo "$as_me: failed program was:" >&5
19370 cat "conftest.$ac_ext" >&5
19371 ac_cv_lib_systre_regcomp=no
19372 fi
19373 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19374 LIBS=$ac_check_lib_save_LIBS
19375 fi
19376 echo "$as_me:19376: result: $ac_cv_lib_systre_regcomp" >&5
19377 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19378 if test "$ac_cv_lib_systre_regcomp" = yes; then
19379
19380                 echo "$as_me:19380: checking for libiconv_open in -liconv" >&5
19381 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19382 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19383   echo $ECHO_N "(cached) $ECHO_C" >&6
19384 else
19385   ac_check_lib_save_LIBS=$LIBS
19386 LIBS="-liconv  $LIBS"
19387 cat >"conftest.$ac_ext" <<_ACEOF
19388 #line 19388 "configure"
19389 #include "confdefs.h"
19390
19391 /* Override any gcc2 internal prototype to avoid an error.  */
19392 #ifdef __cplusplus
19393 extern "C"
19394 #endif
19395 /* We use char because int might match the return type of a gcc2
19396    builtin and then its argument prototype would still apply.  */
19397 char libiconv_open ();
19398 int
19399 main (void)
19400 {
19401 libiconv_open ();
19402   ;
19403   return 0;
19404 }
19405 _ACEOF
19406 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19407 if { (eval echo "$as_me:19407: \"$ac_link\"") >&5
19408   (eval $ac_link) 2>&5
19409   ac_status=$?
19410   echo "$as_me:19410: \$? = $ac_status" >&5
19411   (exit "$ac_status"); } &&
19412          { ac_try='test -s "conftest$ac_exeext"'
19413   { (eval echo "$as_me:19413: \"$ac_try\"") >&5
19414   (eval $ac_try) 2>&5
19415   ac_status=$?
19416   echo "$as_me:19416: \$? = $ac_status" >&5
19417   (exit "$ac_status"); }; }; then
19418   ac_cv_lib_iconv_libiconv_open=yes
19419 else
19420   echo "$as_me: failed program was:" >&5
19421 cat "conftest.$ac_ext" >&5
19422 ac_cv_lib_iconv_libiconv_open=no
19423 fi
19424 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19425 LIBS=$ac_check_lib_save_LIBS
19426 fi
19427 echo "$as_me:19427: result: $ac_cv_lib_iconv_libiconv_open" >&5
19428 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19429 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19430
19431 cf_add_libs="$LIBS"
19432 # reverse order
19433 cf_add_0lib=
19434 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19435 # filter duplicates
19436 for cf_add_1lib in $cf_add_0lib; do
19437         for cf_add_2lib in $cf_add_libs; do
19438                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19439                         cf_add_1lib=
19440                         break
19441                 fi
19442         done
19443         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19444 done
19445 LIBS="$cf_add_libs"
19446
19447 fi
19448
19449                 echo "$as_me:19449: checking for libintl_gettext in -lintl" >&5
19450 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19451 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19452   echo $ECHO_N "(cached) $ECHO_C" >&6
19453 else
19454   ac_check_lib_save_LIBS=$LIBS
19455 LIBS="-lintl  $LIBS"
19456 cat >"conftest.$ac_ext" <<_ACEOF
19457 #line 19457 "configure"
19458 #include "confdefs.h"
19459
19460 /* Override any gcc2 internal prototype to avoid an error.  */
19461 #ifdef __cplusplus
19462 extern "C"
19463 #endif
19464 /* We use char because int might match the return type of a gcc2
19465    builtin and then its argument prototype would still apply.  */
19466 char libintl_gettext ();
19467 int
19468 main (void)
19469 {
19470 libintl_gettext ();
19471   ;
19472   return 0;
19473 }
19474 _ACEOF
19475 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19476 if { (eval echo "$as_me:19476: \"$ac_link\"") >&5
19477   (eval $ac_link) 2>&5
19478   ac_status=$?
19479   echo "$as_me:19479: \$? = $ac_status" >&5
19480   (exit "$ac_status"); } &&
19481          { ac_try='test -s "conftest$ac_exeext"'
19482   { (eval echo "$as_me:19482: \"$ac_try\"") >&5
19483   (eval $ac_try) 2>&5
19484   ac_status=$?
19485   echo "$as_me:19485: \$? = $ac_status" >&5
19486   (exit "$ac_status"); }; }; then
19487   ac_cv_lib_intl_libintl_gettext=yes
19488 else
19489   echo "$as_me: failed program was:" >&5
19490 cat "conftest.$ac_ext" >&5
19491 ac_cv_lib_intl_libintl_gettext=no
19492 fi
19493 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19494 LIBS=$ac_check_lib_save_LIBS
19495 fi
19496 echo "$as_me:19496: result: $ac_cv_lib_intl_libintl_gettext" >&5
19497 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19498 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19499
19500 cf_add_libs="$LIBS"
19501 # reverse order
19502 cf_add_0lib=
19503 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19504 # filter duplicates
19505 for cf_add_1lib in $cf_add_0lib; do
19506         for cf_add_2lib in $cf_add_libs; do
19507                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19508                         cf_add_1lib=
19509                         break
19510                 fi
19511         done
19512         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19513 done
19514 LIBS="$cf_add_libs"
19515
19516 fi
19517
19518                 echo "$as_me:19518: checking for tre_regcomp in -ltre" >&5
19519 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19520 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19521   echo $ECHO_N "(cached) $ECHO_C" >&6
19522 else
19523   ac_check_lib_save_LIBS=$LIBS
19524 LIBS="-ltre  $LIBS"
19525 cat >"conftest.$ac_ext" <<_ACEOF
19526 #line 19526 "configure"
19527 #include "confdefs.h"
19528
19529 /* Override any gcc2 internal prototype to avoid an error.  */
19530 #ifdef __cplusplus
19531 extern "C"
19532 #endif
19533 /* We use char because int might match the return type of a gcc2
19534    builtin and then its argument prototype would still apply.  */
19535 char tre_regcomp ();
19536 int
19537 main (void)
19538 {
19539 tre_regcomp ();
19540   ;
19541   return 0;
19542 }
19543 _ACEOF
19544 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19545 if { (eval echo "$as_me:19545: \"$ac_link\"") >&5
19546   (eval $ac_link) 2>&5
19547   ac_status=$?
19548   echo "$as_me:19548: \$? = $ac_status" >&5
19549   (exit "$ac_status"); } &&
19550          { ac_try='test -s "conftest$ac_exeext"'
19551   { (eval echo "$as_me:19551: \"$ac_try\"") >&5
19552   (eval $ac_try) 2>&5
19553   ac_status=$?
19554   echo "$as_me:19554: \$? = $ac_status" >&5
19555   (exit "$ac_status"); }; }; then
19556   ac_cv_lib_tre_tre_regcomp=yes
19557 else
19558   echo "$as_me: failed program was:" >&5
19559 cat "conftest.$ac_ext" >&5
19560 ac_cv_lib_tre_tre_regcomp=no
19561 fi
19562 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19563 LIBS=$ac_check_lib_save_LIBS
19564 fi
19565 echo "$as_me:19565: result: $ac_cv_lib_tre_tre_regcomp" >&5
19566 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19567 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19568
19569 cf_add_libs="$LIBS"
19570 # reverse order
19571 cf_add_0lib=
19572 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19573 # filter duplicates
19574 for cf_add_1lib in $cf_add_0lib; do
19575         for cf_add_2lib in $cf_add_libs; do
19576                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19577                         cf_add_1lib=
19578                         break
19579                 fi
19580         done
19581         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19582 done
19583 LIBS="$cf_add_libs"
19584
19585 fi
19586
19587 cf_add_libs="$LIBS"
19588 # reverse order
19589 cf_add_0lib=
19590 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19591 # filter duplicates
19592 for cf_add_1lib in $cf_add_0lib; do
19593         for cf_add_2lib in $cf_add_libs; do
19594                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19595                         cf_add_1lib=
19596                         break
19597                 fi
19598         done
19599         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19600 done
19601 LIBS="$cf_add_libs"
19602
19603                 cf_regex_func=regcomp
19604
19605 else
19606
19607                 echo "$as_me:19607: checking for regcomp in -lgnurx" >&5
19608 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19609 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19610   echo $ECHO_N "(cached) $ECHO_C" >&6
19611 else
19612   ac_check_lib_save_LIBS=$LIBS
19613 LIBS="-lgnurx  $LIBS"
19614 cat >"conftest.$ac_ext" <<_ACEOF
19615 #line 19615 "configure"
19616 #include "confdefs.h"
19617
19618 /* Override any gcc2 internal prototype to avoid an error.  */
19619 #ifdef __cplusplus
19620 extern "C"
19621 #endif
19622 /* We use char because int might match the return type of a gcc2
19623    builtin and then its argument prototype would still apply.  */
19624 char regcomp ();
19625 int
19626 main (void)
19627 {
19628 regcomp ();
19629   ;
19630   return 0;
19631 }
19632 _ACEOF
19633 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19634 if { (eval echo "$as_me:19634: \"$ac_link\"") >&5
19635   (eval $ac_link) 2>&5
19636   ac_status=$?
19637   echo "$as_me:19637: \$? = $ac_status" >&5
19638   (exit "$ac_status"); } &&
19639          { ac_try='test -s "conftest$ac_exeext"'
19640   { (eval echo "$as_me:19640: \"$ac_try\"") >&5
19641   (eval $ac_try) 2>&5
19642   ac_status=$?
19643   echo "$as_me:19643: \$? = $ac_status" >&5
19644   (exit "$ac_status"); }; }; then
19645   ac_cv_lib_gnurx_regcomp=yes
19646 else
19647   echo "$as_me: failed program was:" >&5
19648 cat "conftest.$ac_ext" >&5
19649 ac_cv_lib_gnurx_regcomp=no
19650 fi
19651 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19652 LIBS=$ac_check_lib_save_LIBS
19653 fi
19654 echo "$as_me:19654: result: $ac_cv_lib_gnurx_regcomp" >&5
19655 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19656 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19657
19658 cf_add_libs="$LIBS"
19659 # reverse order
19660 cf_add_0lib=
19661 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19662 # filter duplicates
19663 for cf_add_1lib in $cf_add_0lib; do
19664         for cf_add_2lib in $cf_add_libs; do
19665                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19666                         cf_add_1lib=
19667                         break
19668                 fi
19669         done
19670         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19671 done
19672 LIBS="$cf_add_libs"
19673
19674                         cf_regex_func=regcomp
19675 fi
19676
19677 fi
19678
19679         ;;
19680 (*)
19681         cf_regex_libs="regex re"
19682         echo "$as_me:19682: checking for regcomp" >&5
19683 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19684 if test "${ac_cv_func_regcomp+set}" = set; then
19685   echo $ECHO_N "(cached) $ECHO_C" >&6
19686 else
19687   cat >"conftest.$ac_ext" <<_ACEOF
19688 #line 19688 "configure"
19689 #include "confdefs.h"
19690 #define regcomp autoconf_temporary
19691 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19692 #undef regcomp
19693
19694 #ifdef __cplusplus
19695 extern "C"
19696 #endif
19697
19698 /* We use char because int might match the return type of a gcc2
19699    builtin and then its argument prototype would still apply.  */
19700 char regcomp (void);
19701
19702 int
19703 main (void)
19704 {
19705
19706 /* The GNU C library defines stubs for functions which it implements
19707     to always fail with ENOSYS.  Some functions are actually named
19708     something starting with __ and the normal name is an alias.  */
19709 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19710 #error found stub for regcomp
19711 #endif
19712
19713         return regcomp ();
19714   ;
19715   return 0;
19716 }
19717 _ACEOF
19718 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19719 if { (eval echo "$as_me:19719: \"$ac_link\"") >&5
19720   (eval $ac_link) 2>&5
19721   ac_status=$?
19722   echo "$as_me:19722: \$? = $ac_status" >&5
19723   (exit "$ac_status"); } &&
19724          { ac_try='test -s "conftest$ac_exeext"'
19725   { (eval echo "$as_me:19725: \"$ac_try\"") >&5
19726   (eval $ac_try) 2>&5
19727   ac_status=$?
19728   echo "$as_me:19728: \$? = $ac_status" >&5
19729   (exit "$ac_status"); }; }; then
19730   ac_cv_func_regcomp=yes
19731 else
19732   echo "$as_me: failed program was:" >&5
19733 cat "conftest.$ac_ext" >&5
19734 ac_cv_func_regcomp=no
19735 fi
19736 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19737 fi
19738 echo "$as_me:19738: result: $ac_cv_func_regcomp" >&5
19739 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19740 if test "$ac_cv_func_regcomp" = yes; then
19741   cf_regex_func=regcomp
19742 else
19743
19744                 for cf_regex_lib in $cf_regex_libs
19745                 do
19746                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19747 echo "$as_me:19747: checking for regcomp in -l$cf_regex_lib" >&5
19748 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19749 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19750   echo $ECHO_N "(cached) $ECHO_C" >&6
19751 else
19752   ac_check_lib_save_LIBS=$LIBS
19753 LIBS="-l$cf_regex_lib  $LIBS"
19754 cat >"conftest.$ac_ext" <<_ACEOF
19755 #line 19755 "configure"
19756 #include "confdefs.h"
19757
19758 /* Override any gcc2 internal prototype to avoid an error.  */
19759 #ifdef __cplusplus
19760 extern "C"
19761 #endif
19762 /* We use char because int might match the return type of a gcc2
19763    builtin and then its argument prototype would still apply.  */
19764 char regcomp ();
19765 int
19766 main (void)
19767 {
19768 regcomp ();
19769   ;
19770   return 0;
19771 }
19772 _ACEOF
19773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19774 if { (eval echo "$as_me:19774: \"$ac_link\"") >&5
19775   (eval $ac_link) 2>&5
19776   ac_status=$?
19777   echo "$as_me:19777: \$? = $ac_status" >&5
19778   (exit "$ac_status"); } &&
19779          { ac_try='test -s "conftest$ac_exeext"'
19780   { (eval echo "$as_me:19780: \"$ac_try\"") >&5
19781   (eval $ac_try) 2>&5
19782   ac_status=$?
19783   echo "$as_me:19783: \$? = $ac_status" >&5
19784   (exit "$ac_status"); }; }; then
19785   eval "$as_ac_Lib=yes"
19786 else
19787   echo "$as_me: failed program was:" >&5
19788 cat "conftest.$ac_ext" >&5
19789 eval "$as_ac_Lib=no"
19790 fi
19791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19792 LIBS=$ac_check_lib_save_LIBS
19793 fi
19794 echo "$as_me:19794: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19795 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19796 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19797
19798 cf_add_libs="$LIBS"
19799 # reverse order
19800 cf_add_0lib=
19801 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19802 # filter duplicates
19803 for cf_add_1lib in $cf_add_0lib; do
19804         for cf_add_2lib in $cf_add_libs; do
19805                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19806                         cf_add_1lib=
19807                         break
19808                 fi
19809         done
19810         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19811 done
19812 LIBS="$cf_add_libs"
19813
19814                                         cf_regex_func=regcomp
19815                                         break
19816 fi
19817
19818                 done
19819
19820 fi
19821
19822         ;;
19823 esac
19824
19825 if test "$cf_regex_func" = no ; then
19826         echo "$as_me:19826: checking for compile" >&5
19827 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19828 if test "${ac_cv_func_compile+set}" = set; then
19829   echo $ECHO_N "(cached) $ECHO_C" >&6
19830 else
19831   cat >"conftest.$ac_ext" <<_ACEOF
19832 #line 19832 "configure"
19833 #include "confdefs.h"
19834 #define compile autoconf_temporary
19835 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19836 #undef compile
19837
19838 #ifdef __cplusplus
19839 extern "C"
19840 #endif
19841
19842 /* We use char because int might match the return type of a gcc2
19843    builtin and then its argument prototype would still apply.  */
19844 char compile (void);
19845
19846 int
19847 main (void)
19848 {
19849
19850 /* The GNU C library defines stubs for functions which it implements
19851     to always fail with ENOSYS.  Some functions are actually named
19852     something starting with __ and the normal name is an alias.  */
19853 #if defined (__stub_compile) || defined (__stub___compile)
19854 #error found stub for compile
19855 #endif
19856
19857         return compile ();
19858   ;
19859   return 0;
19860 }
19861 _ACEOF
19862 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19863 if { (eval echo "$as_me:19863: \"$ac_link\"") >&5
19864   (eval $ac_link) 2>&5
19865   ac_status=$?
19866   echo "$as_me:19866: \$? = $ac_status" >&5
19867   (exit "$ac_status"); } &&
19868          { ac_try='test -s "conftest$ac_exeext"'
19869   { (eval echo "$as_me:19869: \"$ac_try\"") >&5
19870   (eval $ac_try) 2>&5
19871   ac_status=$?
19872   echo "$as_me:19872: \$? = $ac_status" >&5
19873   (exit "$ac_status"); }; }; then
19874   ac_cv_func_compile=yes
19875 else
19876   echo "$as_me: failed program was:" >&5
19877 cat "conftest.$ac_ext" >&5
19878 ac_cv_func_compile=no
19879 fi
19880 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19881 fi
19882 echo "$as_me:19882: result: $ac_cv_func_compile" >&5
19883 echo "${ECHO_T}$ac_cv_func_compile" >&6
19884 if test "$ac_cv_func_compile" = yes; then
19885   cf_regex_func=compile
19886 else
19887
19888                 echo "$as_me:19888: checking for compile in -lgen" >&5
19889 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19890 if test "${ac_cv_lib_gen_compile+set}" = set; then
19891   echo $ECHO_N "(cached) $ECHO_C" >&6
19892 else
19893   ac_check_lib_save_LIBS=$LIBS
19894 LIBS="-lgen  $LIBS"
19895 cat >"conftest.$ac_ext" <<_ACEOF
19896 #line 19896 "configure"
19897 #include "confdefs.h"
19898
19899 /* Override any gcc2 internal prototype to avoid an error.  */
19900 #ifdef __cplusplus
19901 extern "C"
19902 #endif
19903 /* We use char because int might match the return type of a gcc2
19904    builtin and then its argument prototype would still apply.  */
19905 char compile ();
19906 int
19907 main (void)
19908 {
19909 compile ();
19910   ;
19911   return 0;
19912 }
19913 _ACEOF
19914 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19915 if { (eval echo "$as_me:19915: \"$ac_link\"") >&5
19916   (eval $ac_link) 2>&5
19917   ac_status=$?
19918   echo "$as_me:19918: \$? = $ac_status" >&5
19919   (exit "$ac_status"); } &&
19920          { ac_try='test -s "conftest$ac_exeext"'
19921   { (eval echo "$as_me:19921: \"$ac_try\"") >&5
19922   (eval $ac_try) 2>&5
19923   ac_status=$?
19924   echo "$as_me:19924: \$? = $ac_status" >&5
19925   (exit "$ac_status"); }; }; then
19926   ac_cv_lib_gen_compile=yes
19927 else
19928   echo "$as_me: failed program was:" >&5
19929 cat "conftest.$ac_ext" >&5
19930 ac_cv_lib_gen_compile=no
19931 fi
19932 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19933 LIBS=$ac_check_lib_save_LIBS
19934 fi
19935 echo "$as_me:19935: result: $ac_cv_lib_gen_compile" >&5
19936 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19937 if test "$ac_cv_lib_gen_compile" = yes; then
19938
19939 cf_add_libs="$LIBS"
19940 # reverse order
19941 cf_add_0lib=
19942 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19943 # filter duplicates
19944 for cf_add_1lib in $cf_add_0lib; do
19945         for cf_add_2lib in $cf_add_libs; do
19946                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19947                         cf_add_1lib=
19948                         break
19949                 fi
19950         done
19951         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19952 done
19953 LIBS="$cf_add_libs"
19954
19955                                 cf_regex_func=compile
19956 fi
19957
19958 fi
19959
19960 fi
19961
19962 if test "$cf_regex_func" = no ; then
19963         { echo "$as_me:19963: WARNING: cannot find regular expression library" >&5
19964 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19965 fi
19966
19967 echo "$as_me:19967: checking for regular-expression headers" >&5
19968 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19969 if test "${cf_cv_regex_hdrs+set}" = set; then
19970   echo $ECHO_N "(cached) $ECHO_C" >&6
19971 else
19972
19973 cf_cv_regex_hdrs=no
19974 case "$cf_regex_func" in
19975 (compile)
19976         for cf_regex_hdr in regexp.h regexpr.h
19977         do
19978                 cat >"conftest.$ac_ext" <<_ACEOF
19979 #line 19979 "configure"
19980 #include "confdefs.h"
19981 #include <$cf_regex_hdr>
19982 int
19983 main (void)
19984 {
19985
19986                         char *p = compile("", "", "", 0);
19987                         int x = step("", "");
19988                         (void)p;
19989                         (void)x;
19990
19991   ;
19992   return 0;
19993 }
19994 _ACEOF
19995 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19996 if { (eval echo "$as_me:19996: \"$ac_link\"") >&5
19997   (eval $ac_link) 2>&5
19998   ac_status=$?
19999   echo "$as_me:19999: \$? = $ac_status" >&5
20000   (exit "$ac_status"); } &&
20001          { ac_try='test -s "conftest$ac_exeext"'
20002   { (eval echo "$as_me:20002: \"$ac_try\"") >&5
20003   (eval $ac_try) 2>&5
20004   ac_status=$?
20005   echo "$as_me:20005: \$? = $ac_status" >&5
20006   (exit "$ac_status"); }; }; then
20007
20008                         cf_cv_regex_hdrs=$cf_regex_hdr
20009                         break
20010
20011 else
20012   echo "$as_me: failed program was:" >&5
20013 cat "conftest.$ac_ext" >&5
20014 fi
20015 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20016         done
20017         ;;
20018 (*)
20019         for cf_regex_hdr in regex.h
20020         do
20021                 cat >"conftest.$ac_ext" <<_ACEOF
20022 #line 20022 "configure"
20023 #include "confdefs.h"
20024 #include <sys/types.h>
20025 #include <$cf_regex_hdr>
20026 int
20027 main (void)
20028 {
20029
20030                         regex_t *p = 0;
20031                         int x = regcomp(p, "", 0);
20032                         int y = regexec(p, "", 0, 0, 0);
20033                         (void)x;
20034                         (void)y;
20035                         regfree(p);
20036
20037   ;
20038   return 0;
20039 }
20040 _ACEOF
20041 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20042 if { (eval echo "$as_me:20042: \"$ac_link\"") >&5
20043   (eval $ac_link) 2>&5
20044   ac_status=$?
20045   echo "$as_me:20045: \$? = $ac_status" >&5
20046   (exit "$ac_status"); } &&
20047          { ac_try='test -s "conftest$ac_exeext"'
20048   { (eval echo "$as_me:20048: \"$ac_try\"") >&5
20049   (eval $ac_try) 2>&5
20050   ac_status=$?
20051   echo "$as_me:20051: \$? = $ac_status" >&5
20052   (exit "$ac_status"); }; }; then
20053
20054                         cf_cv_regex_hdrs=$cf_regex_hdr
20055                         break
20056
20057 else
20058   echo "$as_me: failed program was:" >&5
20059 cat "conftest.$ac_ext" >&5
20060 fi
20061 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20062         done
20063         ;;
20064 esac
20065
20066 fi
20067 echo "$as_me:20067: result: $cf_cv_regex_hdrs" >&5
20068 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20069
20070 case "$cf_cv_regex_hdrs" in
20071         (no)            { echo "$as_me:20071: WARNING: no regular expression header found" >&5
20072 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20073         (regex.h)
20074 cat >>confdefs.h <<\EOF
20075 #define HAVE_REGEX_H_FUNCS 1
20076 EOF
20077  ;;
20078         (regexp.h)
20079 cat >>confdefs.h <<\EOF
20080 #define HAVE_REGEXP_H_FUNCS 1
20081 EOF
20082  ;;
20083         (regexpr.h)
20084 cat >>confdefs.h <<\EOF
20085 #define HAVE_REGEXPR_H_FUNCS 1
20086 EOF
20087  ;;
20088 esac
20089
20090 for ac_header in \
20091 fcntl.h \
20092 getopt.h \
20093 limits.h \
20094 locale.h \
20095 math.h \
20096 poll.h \
20097 sys/auxv.h \
20098 sys/ioctl.h \
20099 sys/param.h \
20100 sys/poll.h \
20101 sys/select.h \
20102 sys/time.h \
20103 sys/times.h \
20104 unistd.h \
20105 wctype.h \
20106
20107 do
20108 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20109 echo "$as_me:20109: checking for $ac_header" >&5
20110 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20111 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20112   echo $ECHO_N "(cached) $ECHO_C" >&6
20113 else
20114   cat >"conftest.$ac_ext" <<_ACEOF
20115 #line 20115 "configure"
20116 #include "confdefs.h"
20117 #include <$ac_header>
20118 _ACEOF
20119 if { (eval echo "$as_me:20119: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20120   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20121   ac_status=$?
20122   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20123   rm -f conftest.er1
20124   cat conftest.err >&5
20125   echo "$as_me:20125: \$? = $ac_status" >&5
20126   (exit "$ac_status"); } >/dev/null; then
20127   if test -s conftest.err; then
20128     ac_cpp_err=$ac_c_preproc_warn_flag
20129   else
20130     ac_cpp_err=
20131   fi
20132 else
20133   ac_cpp_err=yes
20134 fi
20135 if test -z "$ac_cpp_err"; then
20136   eval "$as_ac_Header=yes"
20137 else
20138   echo "$as_me: failed program was:" >&5
20139   cat "conftest.$ac_ext" >&5
20140   eval "$as_ac_Header=no"
20141 fi
20142 rm -f conftest.err "conftest.$ac_ext"
20143 fi
20144 echo "$as_me:20144: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20145 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20146 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20147   cat >>confdefs.h <<EOF
20148 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20149 EOF
20150
20151 fi
20152 done
20153
20154 for ac_header in unistd.h getopt.h
20155 do
20156 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20157 echo "$as_me:20157: checking for $ac_header" >&5
20158 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20159 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20160   echo $ECHO_N "(cached) $ECHO_C" >&6
20161 else
20162   cat >"conftest.$ac_ext" <<_ACEOF
20163 #line 20163 "configure"
20164 #include "confdefs.h"
20165 #include <$ac_header>
20166 _ACEOF
20167 if { (eval echo "$as_me:20167: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20168   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20169   ac_status=$?
20170   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20171   rm -f conftest.er1
20172   cat conftest.err >&5
20173   echo "$as_me:20173: \$? = $ac_status" >&5
20174   (exit "$ac_status"); } >/dev/null; then
20175   if test -s conftest.err; then
20176     ac_cpp_err=$ac_c_preproc_warn_flag
20177   else
20178     ac_cpp_err=
20179   fi
20180 else
20181   ac_cpp_err=yes
20182 fi
20183 if test -z "$ac_cpp_err"; then
20184   eval "$as_ac_Header=yes"
20185 else
20186   echo "$as_me: failed program was:" >&5
20187   cat "conftest.$ac_ext" >&5
20188   eval "$as_ac_Header=no"
20189 fi
20190 rm -f conftest.err "conftest.$ac_ext"
20191 fi
20192 echo "$as_me:20192: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20193 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20194 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20195   cat >>confdefs.h <<EOF
20196 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20197 EOF
20198
20199 fi
20200 done
20201
20202 echo "$as_me:20202: checking for header declaring getopt variables" >&5
20203 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20204 if test "${cf_cv_getopt_header+set}" = set; then
20205   echo $ECHO_N "(cached) $ECHO_C" >&6
20206 else
20207
20208 cf_cv_getopt_header=none
20209 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20210 do
20211 cat >"conftest.$ac_ext" <<_ACEOF
20212 #line 20212 "configure"
20213 #include "confdefs.h"
20214
20215 #include <$cf_header>
20216 int
20217 main (void)
20218 {
20219 int x = optind; char *y = optarg; (void)x; (void)y
20220   ;
20221   return 0;
20222 }
20223 _ACEOF
20224 rm -f "conftest.$ac_objext"
20225 if { (eval echo "$as_me:20225: \"$ac_compile\"") >&5
20226   (eval $ac_compile) 2>&5
20227   ac_status=$?
20228   echo "$as_me:20228: \$? = $ac_status" >&5
20229   (exit "$ac_status"); } &&
20230          { ac_try='test -s "conftest.$ac_objext"'
20231   { (eval echo "$as_me:20231: \"$ac_try\"") >&5
20232   (eval $ac_try) 2>&5
20233   ac_status=$?
20234   echo "$as_me:20234: \$? = $ac_status" >&5
20235   (exit "$ac_status"); }; }; then
20236   cf_cv_getopt_header=$cf_header
20237  break
20238 else
20239   echo "$as_me: failed program was:" >&5
20240 cat "conftest.$ac_ext" >&5
20241 fi
20242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20243 done
20244
20245 fi
20246 echo "$as_me:20246: result: $cf_cv_getopt_header" >&5
20247 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20248 if test "$cf_cv_getopt_header" != none ; then
20249
20250 cat >>confdefs.h <<\EOF
20251 #define HAVE_GETOPT_HEADER 1
20252 EOF
20253
20254 fi
20255 if test "$cf_cv_getopt_header" = getopt.h ; then
20256
20257 cat >>confdefs.h <<\EOF
20258 #define NEED_GETOPT_H 1
20259 EOF
20260
20261 fi
20262
20263 echo "$as_me:20263: checking if external environ is declared" >&5
20264 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20265 if test "${cf_cv_dcl_environ+set}" = set; then
20266   echo $ECHO_N "(cached) $ECHO_C" >&6
20267 else
20268
20269     cat >"conftest.$ac_ext" <<_ACEOF
20270 #line 20270 "configure"
20271 #include "confdefs.h"
20272
20273 $ac_includes_default
20274 int
20275 main (void)
20276 {
20277 void* x = (void*) environ; (void)x
20278   ;
20279   return 0;
20280 }
20281 _ACEOF
20282 rm -f "conftest.$ac_objext"
20283 if { (eval echo "$as_me:20283: \"$ac_compile\"") >&5
20284   (eval $ac_compile) 2>&5
20285   ac_status=$?
20286   echo "$as_me:20286: \$? = $ac_status" >&5
20287   (exit "$ac_status"); } &&
20288          { ac_try='test -s "conftest.$ac_objext"'
20289   { (eval echo "$as_me:20289: \"$ac_try\"") >&5
20290   (eval $ac_try) 2>&5
20291   ac_status=$?
20292   echo "$as_me:20292: \$? = $ac_status" >&5
20293   (exit "$ac_status"); }; }; then
20294   cf_cv_dcl_environ=yes
20295 else
20296   echo "$as_me: failed program was:" >&5
20297 cat "conftest.$ac_ext" >&5
20298 cf_cv_dcl_environ=no
20299 fi
20300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20301
20302 fi
20303 echo "$as_me:20303: result: $cf_cv_dcl_environ" >&5
20304 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20305
20306 if test "$cf_cv_dcl_environ" = no ; then
20307
20308 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20309
20310     cat >>confdefs.h <<EOF
20311 #define $cf_result 1
20312 EOF
20313
20314 fi
20315
20316 # It's possible (for near-UNIX clones) that the data doesn't exist
20317
20318 echo "$as_me:20318: checking if external environ exists" >&5
20319 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20320 if test "${cf_cv_have_environ+set}" = set; then
20321   echo $ECHO_N "(cached) $ECHO_C" >&6
20322 else
20323
20324         cat >"conftest.$ac_ext" <<_ACEOF
20325 #line 20325 "configure"
20326 #include "confdefs.h"
20327
20328 #undef environ
20329 extern int environ;
20330
20331 int
20332 main (void)
20333 {
20334 environ = 2
20335   ;
20336   return 0;
20337 }
20338 _ACEOF
20339 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20340 if { (eval echo "$as_me:20340: \"$ac_link\"") >&5
20341   (eval $ac_link) 2>&5
20342   ac_status=$?
20343   echo "$as_me:20343: \$? = $ac_status" >&5
20344   (exit "$ac_status"); } &&
20345          { ac_try='test -s "conftest$ac_exeext"'
20346   { (eval echo "$as_me:20346: \"$ac_try\"") >&5
20347   (eval $ac_try) 2>&5
20348   ac_status=$?
20349   echo "$as_me:20349: \$? = $ac_status" >&5
20350   (exit "$ac_status"); }; }; then
20351   cf_cv_have_environ=yes
20352 else
20353   echo "$as_me: failed program was:" >&5
20354 cat "conftest.$ac_ext" >&5
20355 cf_cv_have_environ=no
20356 fi
20357 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20358
20359 fi
20360 echo "$as_me:20360: result: $cf_cv_have_environ" >&5
20361 echo "${ECHO_T}$cf_cv_have_environ" >&6
20362
20363 if test "$cf_cv_have_environ" = yes ; then
20364
20365 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20366
20367         cat >>confdefs.h <<EOF
20368 #define $cf_result 1
20369 EOF
20370
20371 fi
20372
20373 echo "$as_me:20373: checking for getenv" >&5
20374 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20375 if test "${ac_cv_func_getenv+set}" = set; then
20376   echo $ECHO_N "(cached) $ECHO_C" >&6
20377 else
20378   cat >"conftest.$ac_ext" <<_ACEOF
20379 #line 20379 "configure"
20380 #include "confdefs.h"
20381 #define getenv autoconf_temporary
20382 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20383 #undef getenv
20384
20385 #ifdef __cplusplus
20386 extern "C"
20387 #endif
20388
20389 /* We use char because int might match the return type of a gcc2
20390    builtin and then its argument prototype would still apply.  */
20391 char getenv (void);
20392
20393 int
20394 main (void)
20395 {
20396
20397 /* The GNU C library defines stubs for functions which it implements
20398     to always fail with ENOSYS.  Some functions are actually named
20399     something starting with __ and the normal name is an alias.  */
20400 #if defined (__stub_getenv) || defined (__stub___getenv)
20401 #error found stub for getenv
20402 #endif
20403
20404         return getenv ();
20405   ;
20406   return 0;
20407 }
20408 _ACEOF
20409 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20410 if { (eval echo "$as_me:20410: \"$ac_link\"") >&5
20411   (eval $ac_link) 2>&5
20412   ac_status=$?
20413   echo "$as_me:20413: \$? = $ac_status" >&5
20414   (exit "$ac_status"); } &&
20415          { ac_try='test -s "conftest$ac_exeext"'
20416   { (eval echo "$as_me:20416: \"$ac_try\"") >&5
20417   (eval $ac_try) 2>&5
20418   ac_status=$?
20419   echo "$as_me:20419: \$? = $ac_status" >&5
20420   (exit "$ac_status"); }; }; then
20421   ac_cv_func_getenv=yes
20422 else
20423   echo "$as_me: failed program was:" >&5
20424 cat "conftest.$ac_ext" >&5
20425 ac_cv_func_getenv=no
20426 fi
20427 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20428 fi
20429 echo "$as_me:20429: result: $ac_cv_func_getenv" >&5
20430 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20431
20432 for ac_func in putenv setenv strdup
20433 do
20434 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20435 echo "$as_me:20435: checking for $ac_func" >&5
20436 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20437 if eval "test \"\${$as_ac_var+set}\" = set"; then
20438   echo $ECHO_N "(cached) $ECHO_C" >&6
20439 else
20440   cat >"conftest.$ac_ext" <<_ACEOF
20441 #line 20441 "configure"
20442 #include "confdefs.h"
20443 #define $ac_func autoconf_temporary
20444 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20445 #undef $ac_func
20446
20447 #ifdef __cplusplus
20448 extern "C"
20449 #endif
20450
20451 /* We use char because int might match the return type of a gcc2
20452    builtin and then its argument prototype would still apply.  */
20453 char $ac_func (void);
20454
20455 int
20456 main (void)
20457 {
20458
20459 /* The GNU C library defines stubs for functions which it implements
20460     to always fail with ENOSYS.  Some functions are actually named
20461     something starting with __ and the normal name is an alias.  */
20462 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20463 #error found stub for $ac_func
20464 #endif
20465
20466         return $ac_func ();
20467   ;
20468   return 0;
20469 }
20470 _ACEOF
20471 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20472 if { (eval echo "$as_me:20472: \"$ac_link\"") >&5
20473   (eval $ac_link) 2>&5
20474   ac_status=$?
20475   echo "$as_me:20475: \$? = $ac_status" >&5
20476   (exit "$ac_status"); } &&
20477          { ac_try='test -s "conftest$ac_exeext"'
20478   { (eval echo "$as_me:20478: \"$ac_try\"") >&5
20479   (eval $ac_try) 2>&5
20480   ac_status=$?
20481   echo "$as_me:20481: \$? = $ac_status" >&5
20482   (exit "$ac_status"); }; }; then
20483   eval "$as_ac_var=yes"
20484 else
20485   echo "$as_me: failed program was:" >&5
20486 cat "conftest.$ac_ext" >&5
20487 eval "$as_ac_var=no"
20488 fi
20489 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20490 fi
20491 echo "$as_me:20491: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20492 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20493 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20494   cat >>confdefs.h <<EOF
20495 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20496 EOF
20497
20498 fi
20499 done
20500
20501 echo "$as_me:20501: checking if getenv returns consistent values" >&5
20502 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20503 if test "${cf_cv_consistent_getenv+set}" = set; then
20504   echo $ECHO_N "(cached) $ECHO_C" >&6
20505 else
20506
20507 if test "$cross_compiling" = yes; then
20508   cf_cv_consistent_getenv=unknown
20509 else
20510   cat >"conftest.$ac_ext" <<_ACEOF
20511 #line 20511 "configure"
20512 #include "confdefs.h"
20513
20514 $ac_includes_default
20515
20516 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20517 extern char **environ;  /* POSIX, but some systems are not... */
20518 #endif
20519
20520 #if defined(HAVE_STRDUP)
20521 #define str_alloc(s) strdup(s)
20522 #else
20523 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20524 #endif
20525
20526 static void set_value(const char *name, const char *value)
20527 {
20528 #if defined(HAVE_SETENV)
20529         setenv(name, value, 1);
20530 #elif defined(HAVE_PUTENV)
20531         char buffer[1024];
20532         sprintf(buffer, "%s=%s", name, value);
20533         putenv(str_alloc(buffer));
20534 #else
20535 #error neither putenv/setenv found
20536 #endif
20537 }
20538 int main(void)
20539 {
20540         int pass;
20541         size_t numenv, limit, j;
20542         char **mynames;
20543         char **myvalues;
20544         char **mypointer;
20545         char *equals;
20546         for (numenv = 0; environ[numenv]; ++numenv) ;
20547         limit = numenv + 10;
20548         mynames = (char **) calloc(limit + 1, sizeof(char *));
20549         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20550         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20551 #if defined(HAVE_ENVIRON)
20552         for (j = 0; environ[j]; ++j) {
20553                 mynames[j] = str_alloc(environ[j]);
20554                 equals = strchr(mynames[j], '=');
20555                 if (equals != 0) {
20556                         *equals++ = '\\0';
20557                         myvalues[j] = str_alloc(equals);
20558                 } else {
20559                         myvalues[j] = str_alloc("");
20560                 }
20561         }
20562 #endif
20563         for (j = numenv; j < limit; ++j) {
20564                 char name[80];
20565                 char value[80];
20566                 size_t found;
20567                 size_t k = 0;
20568                 do {
20569                         size_t jk;
20570                         found = 0;
20571                         sprintf(name, "TERM%lu", (unsigned long) k);
20572                         for (jk = 0; jk < j; ++jk) {
20573                                 if (!strcmp(name, mynames[jk])) {
20574                                         found = 1;
20575                                         ++k;
20576                                         break;
20577                                 }
20578                         }
20579                 } while (found);
20580                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20581                 set_value(name, value);
20582                 mynames[j] = str_alloc(name);
20583                 myvalues[j] = str_alloc(value);
20584         }
20585         for (pass = 0; pass < 3; ++pass) {
20586                 for (j = 0; j < limit; ++j) {
20587                         char *value = getenv(mynames[j]);
20588                         if (pass) {
20589                                 if (value == 0) {
20590                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20591                                         ${cf_cv_main_return:-return}(1);
20592                                 } else if (value != mypointer[j]) {
20593                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20594                                         ${cf_cv_main_return:-return}(1);
20595                                 } else if (strcmp(value, myvalues[j])) {
20596                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20597                                         ${cf_cv_main_return:-return}(1);
20598                                 }
20599                         } else {
20600                                 size_t k;
20601                                 mypointer[j] = value;
20602                                 for (k = 0; k < j; ++k) {
20603                                         if (mypointer[j] == mypointer[k]) {
20604                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20605                                                 ${cf_cv_main_return:-return}(1);
20606                                         }
20607                                 }
20608                         }
20609                 }
20610         }
20611         ${cf_cv_main_return:-return}(0);
20612 }
20613
20614 _ACEOF
20615 rm -f "conftest$ac_exeext"
20616 if { (eval echo "$as_me:20616: \"$ac_link\"") >&5
20617   (eval $ac_link) 2>&5
20618   ac_status=$?
20619   echo "$as_me:20619: \$? = $ac_status" >&5
20620   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20621   { (eval echo "$as_me:20621: \"$ac_try\"") >&5
20622   (eval $ac_try) 2>&5
20623   ac_status=$?
20624   echo "$as_me:20624: \$? = $ac_status" >&5
20625   (exit "$ac_status"); }; }; then
20626   cf_cv_consistent_getenv=yes
20627 else
20628   echo "$as_me: program exited with status $ac_status" >&5
20629 echo "$as_me: failed program was:" >&5
20630 cat "conftest.$ac_ext" >&5
20631 cf_cv_consistent_getenv=no
20632 fi
20633 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20634 fi
20635
20636 fi
20637 echo "$as_me:20637: result: $cf_cv_consistent_getenv" >&5
20638 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20639
20640 if test "x$cf_cv_consistent_getenv" = xno
20641 then
20642
20643 cat >>confdefs.h <<\EOF
20644 #define HAVE_CONSISTENT_GETENV 1
20645 EOF
20646
20647 fi
20648
20649 if test "x$cf_cv_consistent_getenv" = xno && \
20650         test "x$cf_with_trace" = xyes
20651 then
20652         { echo "$as_me:20652: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20653 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20654 fi
20655
20656 echo "$as_me:20656: checking if sys/time.h works with sys/select.h" >&5
20657 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20658 if test "${cf_cv_sys_time_select+set}" = set; then
20659   echo $ECHO_N "(cached) $ECHO_C" >&6
20660 else
20661
20662 cat >"conftest.$ac_ext" <<_ACEOF
20663 #line 20663 "configure"
20664 #include "confdefs.h"
20665
20666 #include <sys/types.h>
20667 #ifdef HAVE_SYS_TIME_H
20668 #include <sys/time.h>
20669 #endif
20670 #ifdef HAVE_SYS_SELECT_H
20671 #include <sys/select.h>
20672 #endif
20673
20674 int
20675 main (void)
20676 {
20677
20678   ;
20679   return 0;
20680 }
20681 _ACEOF
20682 rm -f "conftest.$ac_objext"
20683 if { (eval echo "$as_me:20683: \"$ac_compile\"") >&5
20684   (eval $ac_compile) 2>&5
20685   ac_status=$?
20686   echo "$as_me:20686: \$? = $ac_status" >&5
20687   (exit "$ac_status"); } &&
20688          { ac_try='test -s "conftest.$ac_objext"'
20689   { (eval echo "$as_me:20689: \"$ac_try\"") >&5
20690   (eval $ac_try) 2>&5
20691   ac_status=$?
20692   echo "$as_me:20692: \$? = $ac_status" >&5
20693   (exit "$ac_status"); }; }; then
20694   cf_cv_sys_time_select=yes
20695 else
20696   echo "$as_me: failed program was:" >&5
20697 cat "conftest.$ac_ext" >&5
20698 cf_cv_sys_time_select=no
20699 fi
20700 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20701
20702 fi
20703
20704 echo "$as_me:20704: result: $cf_cv_sys_time_select" >&5
20705 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20706 test "$cf_cv_sys_time_select" = yes &&
20707 cat >>confdefs.h <<\EOF
20708 #define HAVE_SYS_TIME_SELECT 1
20709 EOF
20710
20711 ###     checks for compiler characteristics
20712 ac_ext=c
20713 ac_cpp='$CPP $CPPFLAGS'
20714 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20715 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20716 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20717 ac_main_return="return"
20718
20719 echo "$as_me:20719: checking for an ANSI C-conforming const" >&5
20720 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20721 if test "${ac_cv_c_const+set}" = set; then
20722   echo $ECHO_N "(cached) $ECHO_C" >&6
20723 else
20724   cat >"conftest.$ac_ext" <<_ACEOF
20725 #line 20725 "configure"
20726 #include "confdefs.h"
20727
20728 int
20729 main (void)
20730 {
20731 /* FIXME: Include the comments suggested by Paul. */
20732 #ifndef __cplusplus
20733   /* Ultrix mips cc rejects this.  */
20734   typedef int charset[2];
20735   const charset x;
20736   /* SunOS 4.1.1 cc rejects this.  */
20737   char const *const *ccp;
20738   char **p;
20739   /* NEC SVR4.0.2 mips cc rejects this.  */
20740   struct point {int x, y;};
20741   static struct point const zero = {0,0};
20742   /* AIX XL C 1.02.0.0 rejects this.
20743      It does not let you subtract one const X* pointer from another in
20744      an arm of an if-expression whose if-part is not a constant
20745      expression */
20746   const char *g = "string";
20747   ccp = &g + (g ? g-g : 0);
20748   /* HPUX 7.0 cc rejects these. */
20749   ++ccp;
20750   p = (char**) ccp;
20751   ccp = (char const *const *) p;
20752   { /* SCO 3.2v4 cc rejects this.  */
20753     char *t;
20754     char const *s = 0 ? (char *) 0 : (char const *) 0;
20755
20756     *t++ = 0;
20757   }
20758   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20759     int x[] = {25, 17};
20760     const int *foo = &x[0];
20761     ++foo;
20762   }
20763   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20764     typedef const int *iptr;
20765     iptr p = 0;
20766     ++p;
20767   }
20768   { /* AIX XL C 1.02.0.0 rejects this saying
20769        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20770     struct s { int j; const int *ap[3]; };
20771     struct s *b; b->j = 5;
20772   }
20773   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20774     const int foo = 10;
20775   }
20776 #endif
20777
20778   ;
20779   return 0;
20780 }
20781 _ACEOF
20782 rm -f "conftest.$ac_objext"
20783 if { (eval echo "$as_me:20783: \"$ac_compile\"") >&5
20784   (eval $ac_compile) 2>&5
20785   ac_status=$?
20786   echo "$as_me:20786: \$? = $ac_status" >&5
20787   (exit "$ac_status"); } &&
20788          { ac_try='test -s "conftest.$ac_objext"'
20789   { (eval echo "$as_me:20789: \"$ac_try\"") >&5
20790   (eval $ac_try) 2>&5
20791   ac_status=$?
20792   echo "$as_me:20792: \$? = $ac_status" >&5
20793   (exit "$ac_status"); }; }; then
20794   ac_cv_c_const=yes
20795 else
20796   echo "$as_me: failed program was:" >&5
20797 cat "conftest.$ac_ext" >&5
20798 ac_cv_c_const=no
20799 fi
20800 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20801 fi
20802 echo "$as_me:20802: result: $ac_cv_c_const" >&5
20803 echo "${ECHO_T}$ac_cv_c_const" >&6
20804 if test $ac_cv_c_const = no; then
20805
20806 cat >>confdefs.h <<\EOF
20807 #define const
20808 EOF
20809
20810 fi
20811
20812 echo "$as_me:20812: checking for inline" >&5
20813 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20814 if test "${ac_cv_c_inline+set}" = set; then
20815   echo $ECHO_N "(cached) $ECHO_C" >&6
20816 else
20817   ac_cv_c_inline=no
20818 for ac_kw in inline __inline__ __inline; do
20819   cat >"conftest.$ac_ext" <<_ACEOF
20820 #line 20820 "configure"
20821 #include "confdefs.h"
20822 #ifndef __cplusplus
20823 static $ac_kw int static_foo () {return 0; }
20824 $ac_kw int foo () {return 0; }
20825 #endif
20826
20827 _ACEOF
20828 rm -f "conftest.$ac_objext"
20829 if { (eval echo "$as_me:20829: \"$ac_compile\"") >&5
20830   (eval $ac_compile) 2>&5
20831   ac_status=$?
20832   echo "$as_me:20832: \$? = $ac_status" >&5
20833   (exit "$ac_status"); } &&
20834          { ac_try='test -s "conftest.$ac_objext"'
20835   { (eval echo "$as_me:20835: \"$ac_try\"") >&5
20836   (eval $ac_try) 2>&5
20837   ac_status=$?
20838   echo "$as_me:20838: \$? = $ac_status" >&5
20839   (exit "$ac_status"); }; }; then
20840   ac_cv_c_inline=$ac_kw; break
20841 else
20842   echo "$as_me: failed program was:" >&5
20843 cat "conftest.$ac_ext" >&5
20844 fi
20845 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20846 done
20847
20848 fi
20849 echo "$as_me:20849: result: $ac_cv_c_inline" >&5
20850 echo "${ECHO_T}$ac_cv_c_inline" >&6
20851 case $ac_cv_c_inline in
20852   inline | yes) ;;
20853   no)
20854 cat >>confdefs.h <<\EOF
20855 #define inline
20856 EOF
20857  ;;
20858   *)  cat >>confdefs.h <<EOF
20859 #define inline $ac_cv_c_inline
20860 EOF
20861  ;;
20862 esac
20863
20864 NCURSES_INLINE=
20865 if test "$ac_cv_c_inline" != no ; then
20866         NCURSES_INLINE=inline
20867         if test "$INTEL_COMPILER" = yes
20868         then
20869                 :
20870         elif test "$CLANG_COMPILER" = yes
20871         then
20872                 :
20873         elif test "$GCC" = yes
20874         then
20875                 echo "$as_me:20875: checking if $CC supports options to tune inlining" >&5
20876 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20877 if test "${cf_cv_gcc_inline+set}" = set; then
20878   echo $ECHO_N "(cached) $ECHO_C" >&6
20879 else
20880
20881                 cf_save_CFLAGS=$CFLAGS
20882                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20883                 cat >"conftest.$ac_ext" <<_ACEOF
20884 #line 20884 "configure"
20885 #include "confdefs.h"
20886 inline int foo(void) { return 1; }
20887 int
20888 main (void)
20889 {
20890 ${cf_cv_main_return:-return} foo()
20891   ;
20892   return 0;
20893 }
20894 _ACEOF
20895 rm -f "conftest.$ac_objext"
20896 if { (eval echo "$as_me:20896: \"$ac_compile\"") >&5
20897   (eval $ac_compile) 2>&5
20898   ac_status=$?
20899   echo "$as_me:20899: \$? = $ac_status" >&5
20900   (exit "$ac_status"); } &&
20901          { ac_try='test -s "conftest.$ac_objext"'
20902   { (eval echo "$as_me:20902: \"$ac_try\"") >&5
20903   (eval $ac_try) 2>&5
20904   ac_status=$?
20905   echo "$as_me:20905: \$? = $ac_status" >&5
20906   (exit "$ac_status"); }; }; then
20907   cf_cv_gcc_inline=yes
20908 else
20909   echo "$as_me: failed program was:" >&5
20910 cat "conftest.$ac_ext" >&5
20911 cf_cv_gcc_inline=no
20912 fi
20913 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20914                 CFLAGS=$cf_save_CFLAGS
20915
20916 fi
20917 echo "$as_me:20917: result: $cf_cv_gcc_inline" >&5
20918 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20919                 if test "$cf_cv_gcc_inline" = yes ; then
20920
20921 cf_fix_cppflags=no
20922 cf_new_cflags=
20923 cf_new_cppflags=
20924 cf_new_extra_cppflags=
20925
20926 for cf_add_cflags in --param max-inline-insns-single=1200
20927 do
20928 case "$cf_fix_cppflags" in
20929 (no)
20930         case "$cf_add_cflags" in
20931         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20932                 case "$cf_add_cflags" in
20933                 (-D*)
20934                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20935
20936                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20937                                 && test -z "${cf_tst_cflags}" \
20938                                 && cf_fix_cppflags=yes
20939
20940                         if test "$cf_fix_cppflags" = yes ; then
20941
20942         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20943         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20944
20945                                 continue
20946                         elif test "${cf_tst_cflags}" = "\"'" ; then
20947
20948         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20949         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20950
20951                                 continue
20952                         fi
20953                         ;;
20954                 esac
20955                 case "$CPPFLAGS" in
20956                 (*$cf_add_cflags)
20957                         ;;
20958                 (*)
20959                         case "$cf_add_cflags" in
20960                         (-D*)
20961                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20962
20963 CPPFLAGS=`echo "$CPPFLAGS" | \
20964         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20965                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20966
20967                                 ;;
20968                         esac
20969
20970         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20971         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20972
20973                         ;;
20974                 esac
20975                 ;;
20976         (*)
20977
20978         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20979         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20980
20981                 ;;
20982         esac
20983         ;;
20984 (yes)
20985
20986         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20987         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20988
20989         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20990
20991         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20992                 && test -z "${cf_tst_cflags}" \
20993                 && cf_fix_cppflags=no
20994         ;;
20995 esac
20996 done
20997
20998 if test -n "$cf_new_cflags" ; then
20999
21000         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21001         CFLAGS="${CFLAGS}$cf_new_cflags"
21002
21003 fi
21004
21005 if test -n "$cf_new_cppflags" ; then
21006
21007         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21008         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21009
21010 fi
21011
21012 if test -n "$cf_new_extra_cppflags" ; then
21013
21014         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21015         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21016
21017 fi
21018
21019                 fi
21020         fi
21021 fi
21022
21023 echo "$as_me:21023: checking for signal global datatype" >&5
21024 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21025 if test "${cf_cv_sig_atomic_t+set}" = set; then
21026   echo $ECHO_N "(cached) $ECHO_C" >&6
21027 else
21028
21029         for cf_type in \
21030                 "volatile sig_atomic_t" \
21031                 "sig_atomic_t" \
21032                 "int"
21033         do
21034         cat >"conftest.$ac_ext" <<_ACEOF
21035 #line 21035 "configure"
21036 #include "confdefs.h"
21037
21038 #include <sys/types.h>
21039 #include <signal.h>
21040 #include <stdio.h>
21041
21042 extern $cf_type x;
21043 $cf_type x;
21044 static void handler(int sig)
21045 {
21046         (void)sig;
21047         x = 5;
21048 }
21049 int
21050 main (void)
21051 {
21052 signal(SIGINT, handler);
21053                  x = 1
21054   ;
21055   return 0;
21056 }
21057 _ACEOF
21058 rm -f "conftest.$ac_objext"
21059 if { (eval echo "$as_me:21059: \"$ac_compile\"") >&5
21060   (eval $ac_compile) 2>&5
21061   ac_status=$?
21062   echo "$as_me:21062: \$? = $ac_status" >&5
21063   (exit "$ac_status"); } &&
21064          { ac_try='test -s "conftest.$ac_objext"'
21065   { (eval echo "$as_me:21065: \"$ac_try\"") >&5
21066   (eval $ac_try) 2>&5
21067   ac_status=$?
21068   echo "$as_me:21068: \$? = $ac_status" >&5
21069   (exit "$ac_status"); }; }; then
21070   cf_cv_sig_atomic_t=$cf_type
21071 else
21072   echo "$as_me: failed program was:" >&5
21073 cat "conftest.$ac_ext" >&5
21074 cf_cv_sig_atomic_t=no
21075 fi
21076 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21077                 test "$cf_cv_sig_atomic_t" != no && break
21078         done
21079
21080 fi
21081
21082 echo "$as_me:21082: result: $cf_cv_sig_atomic_t" >&5
21083 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21084 test "$cf_cv_sig_atomic_t" != no &&
21085 cat >>confdefs.h <<EOF
21086 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21087 EOF
21088
21089 if test "$NCURSES_CHTYPE" = auto ; then
21090
21091 echo "$as_me:21091: checking for type of chtype" >&5
21092 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21093 if test "${cf_cv_typeof_chtype+set}" = set; then
21094   echo $ECHO_N "(cached) $ECHO_C" >&6
21095 else
21096
21097                 if test "$cross_compiling" = yes; then
21098   cf_cv_typeof_chtype=long
21099 else
21100   cat >"conftest.$ac_ext" <<_ACEOF
21101 #line 21101 "configure"
21102 #include "confdefs.h"
21103
21104 $ac_includes_default
21105 #define WANT_BITS 31
21106 int main(void)
21107 {
21108         FILE *fp = fopen("cf_test.out", "w");
21109         if (fp != 0) {
21110                 char *result = "long";
21111                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21112                         int n;
21113                         unsigned int x, y;
21114                         for (n = 0; n < WANT_BITS; n++) {
21115                                 x = (1 << n);
21116                                 y = (x >> n);
21117                                 if (y != 1 || x == 0) {
21118                                         x = 0;
21119                                         break;
21120                                 }
21121                         }
21122                         /*
21123                          * If x is nonzero, an int is big enough for the bits
21124                          * that we want.
21125                          */
21126                         result = (x != 0) ? "int" : "long";
21127                 }
21128                 fputs(result, fp);
21129                 fclose(fp);
21130         }
21131         ${cf_cv_main_return:-return}(0);
21132 }
21133
21134 _ACEOF
21135 rm -f "conftest$ac_exeext"
21136 if { (eval echo "$as_me:21136: \"$ac_link\"") >&5
21137   (eval $ac_link) 2>&5
21138   ac_status=$?
21139   echo "$as_me:21139: \$? = $ac_status" >&5
21140   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21141   { (eval echo "$as_me:21141: \"$ac_try\"") >&5
21142   (eval $ac_try) 2>&5
21143   ac_status=$?
21144   echo "$as_me:21144: \$? = $ac_status" >&5
21145   (exit "$ac_status"); }; }; then
21146   cf_cv_typeof_chtype=`cat cf_test.out`
21147 else
21148   echo "$as_me: program exited with status $ac_status" >&5
21149 echo "$as_me: failed program was:" >&5
21150 cat "conftest.$ac_ext" >&5
21151 cf_cv_typeof_chtype=long
21152 fi
21153 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21154 fi
21155                 rm -f cf_test.out
21156
21157 fi
21158
21159 echo "$as_me:21159: result: $cf_cv_typeof_chtype" >&5
21160 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21161
21162 cat >>confdefs.h <<EOF
21163 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21164 EOF
21165
21166 else
21167         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21168 fi
21169 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21170
21171 echo "$as_me:21171: checking if unsigned literals are legal" >&5
21172 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21173 if test "${cf_cv_unsigned_literals+set}" = set; then
21174   echo $ECHO_N "(cached) $ECHO_C" >&6
21175 else
21176
21177         cat >"conftest.$ac_ext" <<_ACEOF
21178 #line 21178 "configure"
21179 #include "confdefs.h"
21180
21181 int
21182 main (void)
21183 {
21184 long x = 1L + 1UL + 1U + 1
21185   ;
21186   return 0;
21187 }
21188 _ACEOF
21189 rm -f "conftest.$ac_objext"
21190 if { (eval echo "$as_me:21190: \"$ac_compile\"") >&5
21191   (eval $ac_compile) 2>&5
21192   ac_status=$?
21193   echo "$as_me:21193: \$? = $ac_status" >&5
21194   (exit "$ac_status"); } &&
21195          { ac_try='test -s "conftest.$ac_objext"'
21196   { (eval echo "$as_me:21196: \"$ac_try\"") >&5
21197   (eval $ac_try) 2>&5
21198   ac_status=$?
21199   echo "$as_me:21199: \$? = $ac_status" >&5
21200   (exit "$ac_status"); }; }; then
21201   cf_cv_unsigned_literals=yes
21202 else
21203   echo "$as_me: failed program was:" >&5
21204 cat "conftest.$ac_ext" >&5
21205 cf_cv_unsigned_literals=no
21206 fi
21207 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21208
21209 fi
21210
21211 echo "$as_me:21211: result: $cf_cv_unsigned_literals" >&5
21212 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21213
21214 cf_cv_1UL="1"
21215 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21216 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21217
21218 if test "$NCURSES_MMASK_T" = auto ; then
21219         cf_cv_typeof_mmask_t=long
21220 else
21221         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21222 fi
21223 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21224
21225 ###     Checks for external-data
21226
21227 echo "$as_me:21227: checking if external errno is declared" >&5
21228 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21229 if test "${cf_cv_dcl_errno+set}" = set; then
21230   echo $ECHO_N "(cached) $ECHO_C" >&6
21231 else
21232
21233         cat >"conftest.$ac_ext" <<_ACEOF
21234 #line 21234 "configure"
21235 #include "confdefs.h"
21236
21237 $ac_includes_default
21238 #include <errno.h>
21239 int
21240 main (void)
21241 {
21242 int x = (int) errno; (void)x
21243   ;
21244   return 0;
21245 }
21246 _ACEOF
21247 rm -f "conftest.$ac_objext"
21248 if { (eval echo "$as_me:21248: \"$ac_compile\"") >&5
21249   (eval $ac_compile) 2>&5
21250   ac_status=$?
21251   echo "$as_me:21251: \$? = $ac_status" >&5
21252   (exit "$ac_status"); } &&
21253          { ac_try='test -s "conftest.$ac_objext"'
21254   { (eval echo "$as_me:21254: \"$ac_try\"") >&5
21255   (eval $ac_try) 2>&5
21256   ac_status=$?
21257   echo "$as_me:21257: \$? = $ac_status" >&5
21258   (exit "$ac_status"); }; }; then
21259   cf_cv_dcl_errno=yes
21260 else
21261   echo "$as_me: failed program was:" >&5
21262 cat "conftest.$ac_ext" >&5
21263 cf_cv_dcl_errno=no
21264 fi
21265 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21266
21267 fi
21268 echo "$as_me:21268: result: $cf_cv_dcl_errno" >&5
21269 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21270
21271 if test "$cf_cv_dcl_errno" = no ; then
21272
21273 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21274
21275         cat >>confdefs.h <<EOF
21276 #define $cf_result 1
21277 EOF
21278
21279 fi
21280
21281 # It's possible (for near-UNIX clones) that the data doesn't exist
21282
21283 echo "$as_me:21283: checking if external errno exists" >&5
21284 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21285 if test "${cf_cv_have_errno+set}" = set; then
21286   echo $ECHO_N "(cached) $ECHO_C" >&6
21287 else
21288
21289         cat >"conftest.$ac_ext" <<_ACEOF
21290 #line 21290 "configure"
21291 #include "confdefs.h"
21292
21293 #undef errno
21294 extern int errno;
21295
21296 int
21297 main (void)
21298 {
21299 errno = 2
21300   ;
21301   return 0;
21302 }
21303 _ACEOF
21304 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21305 if { (eval echo "$as_me:21305: \"$ac_link\"") >&5
21306   (eval $ac_link) 2>&5
21307   ac_status=$?
21308   echo "$as_me:21308: \$? = $ac_status" >&5
21309   (exit "$ac_status"); } &&
21310          { ac_try='test -s "conftest$ac_exeext"'
21311   { (eval echo "$as_me:21311: \"$ac_try\"") >&5
21312   (eval $ac_try) 2>&5
21313   ac_status=$?
21314   echo "$as_me:21314: \$? = $ac_status" >&5
21315   (exit "$ac_status"); }; }; then
21316   cf_cv_have_errno=yes
21317 else
21318   echo "$as_me: failed program was:" >&5
21319 cat "conftest.$ac_ext" >&5
21320 cf_cv_have_errno=no
21321 fi
21322 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21323
21324 fi
21325 echo "$as_me:21325: result: $cf_cv_have_errno" >&5
21326 echo "${ECHO_T}$cf_cv_have_errno" >&6
21327
21328 if test "$cf_cv_have_errno" = yes ; then
21329
21330 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21331
21332         cat >>confdefs.h <<EOF
21333 #define $cf_result 1
21334 EOF
21335
21336 fi
21337
21338 echo "$as_me:21338: checking if data-only library module links" >&5
21339 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21340 if test "${cf_cv_link_dataonly+set}" = set; then
21341   echo $ECHO_N "(cached) $ECHO_C" >&6
21342 else
21343
21344         rm -f conftest.a
21345         cat >conftest.$ac_ext <<EOF
21346 #line 21346 "configure"
21347 int     testdata[3] = { 123, 456, 789 };
21348 EOF
21349         if { (eval echo "$as_me:21349: \"$ac_compile\"") >&5
21350   (eval $ac_compile) 2>&5
21351   ac_status=$?
21352   echo "$as_me:21352: \$? = $ac_status" >&5
21353   (exit "$ac_status"); } ; then
21354                 mv conftest.o data.o && \
21355                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21356         fi
21357         rm -f conftest.$ac_ext data.o
21358         cat >conftest.$ac_ext <<EOF
21359 #line 21359 "configure"
21360 int     testfunc(void)
21361 {
21362 #if defined(NeXT)
21363         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21364 #else
21365         extern int testdata[3];
21366         return testdata[0] == 123
21367            &&  testdata[1] == 456
21368            &&  testdata[2] == 789;
21369 #endif
21370 }
21371 EOF
21372         if { (eval echo "$as_me:21372: \"$ac_compile\"") >&5
21373   (eval $ac_compile) 2>&5
21374   ac_status=$?
21375   echo "$as_me:21375: \$? = $ac_status" >&5
21376   (exit "$ac_status"); }; then
21377                 mv conftest.o func.o && \
21378                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21379         fi
21380         rm -f conftest.$ac_ext func.o
21381         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21382         cf_saveLIBS="$LIBS"
21383         LIBS="conftest.a $LIBS"
21384         if test "$cross_compiling" = yes; then
21385   cf_cv_link_dataonly=unknown
21386 else
21387   cat >"conftest.$ac_ext" <<_ACEOF
21388 #line 21388 "configure"
21389 #include "confdefs.h"
21390
21391         int main(void)
21392         {
21393                 extern int testfunc();
21394                 ${cf_cv_main_return:-return} (!testfunc());
21395         }
21396
21397 _ACEOF
21398 rm -f "conftest$ac_exeext"
21399 if { (eval echo "$as_me:21399: \"$ac_link\"") >&5
21400   (eval $ac_link) 2>&5
21401   ac_status=$?
21402   echo "$as_me:21402: \$? = $ac_status" >&5
21403   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21404   { (eval echo "$as_me:21404: \"$ac_try\"") >&5
21405   (eval $ac_try) 2>&5
21406   ac_status=$?
21407   echo "$as_me:21407: \$? = $ac_status" >&5
21408   (exit "$ac_status"); }; }; then
21409   cf_cv_link_dataonly=yes
21410 else
21411   echo "$as_me: program exited with status $ac_status" >&5
21412 echo "$as_me: failed program was:" >&5
21413 cat "conftest.$ac_ext" >&5
21414 cf_cv_link_dataonly=no
21415 fi
21416 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21417 fi
21418         LIBS="$cf_saveLIBS"
21419
21420 fi
21421
21422 echo "$as_me:21422: result: $cf_cv_link_dataonly" >&5
21423 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21424
21425 if test "$cf_cv_link_dataonly" = no ; then
21426
21427 cat >>confdefs.h <<\EOF
21428 #define BROKEN_LINKER 1
21429 EOF
21430
21431         BROKEN_LINKER=1
21432 fi
21433
21434 ###     Checks for library functions.
21435
21436 echo "$as_me:21436: checking for clock_gettime" >&5
21437 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21438 if test "${cf_cv_func_clock_gettime+set}" = set; then
21439   echo $ECHO_N "(cached) $ECHO_C" >&6
21440 else
21441
21442                 cat >"conftest.$ac_ext" <<_ACEOF
21443 #line 21443 "configure"
21444 #include "confdefs.h"
21445 #include <time.h>
21446 int
21447 main (void)
21448 {
21449 struct timespec ts;
21450                 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
21451   ;
21452   return 0;
21453 }
21454 _ACEOF
21455 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21456 if { (eval echo "$as_me:21456: \"$ac_link\"") >&5
21457   (eval $ac_link) 2>&5
21458   ac_status=$?
21459   echo "$as_me:21459: \$? = $ac_status" >&5
21460   (exit "$ac_status"); } &&
21461          { ac_try='test -s "conftest$ac_exeext"'
21462   { (eval echo "$as_me:21462: \"$ac_try\"") >&5
21463   (eval $ac_try) 2>&5
21464   ac_status=$?
21465   echo "$as_me:21465: \$? = $ac_status" >&5
21466   (exit "$ac_status"); }; }; then
21467   cf_cv_func_clock_gettime=yes
21468 else
21469   echo "$as_me: failed program was:" >&5
21470 cat "conftest.$ac_ext" >&5
21471 cf_cv_func_clock_gettime=no
21472 fi
21473 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21474
21475 fi
21476 echo "$as_me:21476: result: $cf_cv_func_clock_gettime" >&5
21477 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21478
21479 if test "$cf_cv_func_clock_gettime" = yes
21480 then
21481
21482 cat >>confdefs.h <<\EOF
21483 #define HAVE_CLOCK_GETTIME 1
21484 EOF
21485
21486 else
21487 echo "$as_me:21487: checking for gettimeofday" >&5
21488 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21489 if test "${ac_cv_func_gettimeofday+set}" = set; then
21490   echo $ECHO_N "(cached) $ECHO_C" >&6
21491 else
21492   cat >"conftest.$ac_ext" <<_ACEOF
21493 #line 21493 "configure"
21494 #include "confdefs.h"
21495 #define gettimeofday autoconf_temporary
21496 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21497 #undef gettimeofday
21498
21499 #ifdef __cplusplus
21500 extern "C"
21501 #endif
21502
21503 /* We use char because int might match the return type of a gcc2
21504    builtin and then its argument prototype would still apply.  */
21505 char gettimeofday (void);
21506
21507 int
21508 main (void)
21509 {
21510
21511 /* The GNU C library defines stubs for functions which it implements
21512     to always fail with ENOSYS.  Some functions are actually named
21513     something starting with __ and the normal name is an alias.  */
21514 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21515 #error found stub for gettimeofday
21516 #endif
21517
21518         return gettimeofday ();
21519   ;
21520   return 0;
21521 }
21522 _ACEOF
21523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21524 if { (eval echo "$as_me:21524: \"$ac_link\"") >&5
21525   (eval $ac_link) 2>&5
21526   ac_status=$?
21527   echo "$as_me:21527: \$? = $ac_status" >&5
21528   (exit "$ac_status"); } &&
21529          { ac_try='test -s "conftest$ac_exeext"'
21530   { (eval echo "$as_me:21530: \"$ac_try\"") >&5
21531   (eval $ac_try) 2>&5
21532   ac_status=$?
21533   echo "$as_me:21533: \$? = $ac_status" >&5
21534   (exit "$ac_status"); }; }; then
21535   ac_cv_func_gettimeofday=yes
21536 else
21537   echo "$as_me: failed program was:" >&5
21538 cat "conftest.$ac_ext" >&5
21539 ac_cv_func_gettimeofday=no
21540 fi
21541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21542 fi
21543 echo "$as_me:21543: result: $ac_cv_func_gettimeofday" >&5
21544 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21545 if test "$ac_cv_func_gettimeofday" = yes; then
21546
21547 cat >>confdefs.h <<\EOF
21548 #define HAVE_GETTIMEOFDAY 1
21549 EOF
21550
21551 else
21552
21553 echo "$as_me:21553: checking for gettimeofday in -lbsd" >&5
21554 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21555 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21556   echo $ECHO_N "(cached) $ECHO_C" >&6
21557 else
21558   ac_check_lib_save_LIBS=$LIBS
21559 LIBS="-lbsd  $LIBS"
21560 cat >"conftest.$ac_ext" <<_ACEOF
21561 #line 21561 "configure"
21562 #include "confdefs.h"
21563
21564 /* Override any gcc2 internal prototype to avoid an error.  */
21565 #ifdef __cplusplus
21566 extern "C"
21567 #endif
21568 /* We use char because int might match the return type of a gcc2
21569    builtin and then its argument prototype would still apply.  */
21570 char gettimeofday ();
21571 int
21572 main (void)
21573 {
21574 gettimeofday ();
21575   ;
21576   return 0;
21577 }
21578 _ACEOF
21579 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21580 if { (eval echo "$as_me:21580: \"$ac_link\"") >&5
21581   (eval $ac_link) 2>&5
21582   ac_status=$?
21583   echo "$as_me:21583: \$? = $ac_status" >&5
21584   (exit "$ac_status"); } &&
21585          { ac_try='test -s "conftest$ac_exeext"'
21586   { (eval echo "$as_me:21586: \"$ac_try\"") >&5
21587   (eval $ac_try) 2>&5
21588   ac_status=$?
21589   echo "$as_me:21589: \$? = $ac_status" >&5
21590   (exit "$ac_status"); }; }; then
21591   ac_cv_lib_bsd_gettimeofday=yes
21592 else
21593   echo "$as_me: failed program was:" >&5
21594 cat "conftest.$ac_ext" >&5
21595 ac_cv_lib_bsd_gettimeofday=no
21596 fi
21597 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21598 LIBS=$ac_check_lib_save_LIBS
21599 fi
21600 echo "$as_me:21600: result: $ac_cv_lib_bsd_gettimeofday" >&5
21601 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21602 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21603
21604 cat >>confdefs.h <<\EOF
21605 #define HAVE_GETTIMEOFDAY 1
21606 EOF
21607
21608 cf_add_libs="$LIBS"
21609 # reverse order
21610 cf_add_0lib=
21611 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21612 # filter duplicates
21613 for cf_add_1lib in $cf_add_0lib; do
21614         for cf_add_2lib in $cf_add_libs; do
21615                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21616                         cf_add_1lib=
21617                         break
21618                 fi
21619         done
21620         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21621 done
21622 LIBS="$cf_add_libs"
21623
21624 fi
21625
21626 fi
21627 fi
21628
21629 for ac_func in \
21630 fpathconf \
21631 getcwd \
21632 getauxval \
21633 getegid \
21634 geteuid \
21635 getopt \
21636 getuid \
21637 issetugid \
21638 localeconv \
21639 poll \
21640 putenv \
21641 remove \
21642 select \
21643 setbuf \
21644 setbuffer \
21645 setenv \
21646 setfsuid \
21647 setvbuf \
21648 sigaction \
21649 sigvec \
21650 snprintf \
21651 strdup \
21652 strstr \
21653 sysconf \
21654 tcgetpgrp \
21655 times \
21656 tsearch \
21657 vsnprintf \
21658
21659 do
21660 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21661 echo "$as_me:21661: checking for $ac_func" >&5
21662 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21663 if eval "test \"\${$as_ac_var+set}\" = set"; then
21664   echo $ECHO_N "(cached) $ECHO_C" >&6
21665 else
21666   cat >"conftest.$ac_ext" <<_ACEOF
21667 #line 21667 "configure"
21668 #include "confdefs.h"
21669 #define $ac_func autoconf_temporary
21670 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21671 #undef $ac_func
21672
21673 #ifdef __cplusplus
21674 extern "C"
21675 #endif
21676
21677 /* We use char because int might match the return type of a gcc2
21678    builtin and then its argument prototype would still apply.  */
21679 char $ac_func (void);
21680
21681 int
21682 main (void)
21683 {
21684
21685 /* The GNU C library defines stubs for functions which it implements
21686     to always fail with ENOSYS.  Some functions are actually named
21687     something starting with __ and the normal name is an alias.  */
21688 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21689 #error found stub for $ac_func
21690 #endif
21691
21692         return $ac_func ();
21693   ;
21694   return 0;
21695 }
21696 _ACEOF
21697 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21698 if { (eval echo "$as_me:21698: \"$ac_link\"") >&5
21699   (eval $ac_link) 2>&5
21700   ac_status=$?
21701   echo "$as_me:21701: \$? = $ac_status" >&5
21702   (exit "$ac_status"); } &&
21703          { ac_try='test -s "conftest$ac_exeext"'
21704   { (eval echo "$as_me:21704: \"$ac_try\"") >&5
21705   (eval $ac_try) 2>&5
21706   ac_status=$?
21707   echo "$as_me:21707: \$? = $ac_status" >&5
21708   (exit "$ac_status"); }; }; then
21709   eval "$as_ac_var=yes"
21710 else
21711   echo "$as_me: failed program was:" >&5
21712 cat "conftest.$ac_ext" >&5
21713 eval "$as_ac_var=no"
21714 fi
21715 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21716 fi
21717 echo "$as_me:21717: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21718 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21719 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21720   cat >>confdefs.h <<EOF
21721 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21722 EOF
21723
21724 fi
21725 done
21726
21727 echo "$as_me:21727: checking if _PATH_TTYS is defined in ttyent.h" >&5
21728 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21729 if test "${cf_cv_PATH_TTYS+set}" = set; then
21730   echo $ECHO_N "(cached) $ECHO_C" >&6
21731 else
21732
21733 cat >"conftest.$ac_ext" <<_ACEOF
21734 #line 21734 "configure"
21735 #include "confdefs.h"
21736
21737 #include <stdio.h>
21738 #include <ttyent.h>
21739 int
21740 main (void)
21741 {
21742
21743 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21744   ;
21745   return 0;
21746 }
21747 _ACEOF
21748 rm -f "conftest.$ac_objext"
21749 if { (eval echo "$as_me:21749: \"$ac_compile\"") >&5
21750   (eval $ac_compile) 2>&5
21751   ac_status=$?
21752   echo "$as_me:21752: \$? = $ac_status" >&5
21753   (exit "$ac_status"); } &&
21754          { ac_try='test -s "conftest.$ac_objext"'
21755   { (eval echo "$as_me:21755: \"$ac_try\"") >&5
21756   (eval $ac_try) 2>&5
21757   ac_status=$?
21758   echo "$as_me:21758: \$? = $ac_status" >&5
21759   (exit "$ac_status"); }; }; then
21760   cf_cv_PATH_TTYS=yes
21761 else
21762   echo "$as_me: failed program was:" >&5
21763 cat "conftest.$ac_ext" >&5
21764 cf_cv_PATH_TTYS=no
21765 fi
21766 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21767 fi
21768 echo "$as_me:21768: result: $cf_cv_PATH_TTYS" >&5
21769 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21770
21771 if test $cf_cv_PATH_TTYS = no
21772 then
21773         for cf_ttys in /etc/ttytype /etc/ttys
21774         do
21775                 if test -f $cf_ttys
21776                 then
21777                         cf_cv_PATH_TTYS=maybe
21778
21779 cat >>confdefs.h <<\EOF
21780 #define _PATH_TTYS $cf_ttys
21781 EOF
21782
21783                         break
21784                 fi
21785         done
21786 fi
21787
21788 if test $cf_cv_PATH_TTYS != no
21789 then
21790         echo "$as_me:21790: checking if _PATH_TTYS file exists" >&5
21791 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21792 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21793   echo $ECHO_N "(cached) $ECHO_C" >&6
21794 else
21795
21796                 if test "$cross_compiling" = yes; then
21797   cf_cv_have_PATH_TTYS=unknown
21798 else
21799   cat >"conftest.$ac_ext" <<_ACEOF
21800 #line 21800 "configure"
21801 #include "confdefs.h"
21802
21803 $ac_includes_default
21804
21805 #include <ttyent.h>
21806
21807 int main(void) {
21808         FILE *fp = fopen(_PATH_TTYS, "r");
21809         ${cf_cv_main_return:-return} (fp == 0);
21810 }
21811 _ACEOF
21812 rm -f "conftest$ac_exeext"
21813 if { (eval echo "$as_me:21813: \"$ac_link\"") >&5
21814   (eval $ac_link) 2>&5
21815   ac_status=$?
21816   echo "$as_me:21816: \$? = $ac_status" >&5
21817   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21818   { (eval echo "$as_me:21818: \"$ac_try\"") >&5
21819   (eval $ac_try) 2>&5
21820   ac_status=$?
21821   echo "$as_me:21821: \$? = $ac_status" >&5
21822   (exit "$ac_status"); }; }; then
21823   cf_cv_have_PATH_TTYS=yes
21824 else
21825   echo "$as_me: program exited with status $ac_status" >&5
21826 echo "$as_me: failed program was:" >&5
21827 cat "conftest.$ac_ext" >&5
21828 cf_cv_have_PATH_TTYS=no
21829 fi
21830 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21831 fi
21832 fi
21833 echo "$as_me:21833: result: $cf_cv_have_PATH_TTYS" >&5
21834 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21835         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21836 fi
21837
21838 if test $cf_cv_PATH_TTYS != no
21839 then
21840
21841 cat >>confdefs.h <<\EOF
21842 #define HAVE_PATH_TTYS 1
21843 EOF
21844
21845         echo "$as_me:21845: checking for getttynam" >&5
21846 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21847 if test "${cf_cv_func_getttynam+set}" = set; then
21848   echo $ECHO_N "(cached) $ECHO_C" >&6
21849 else
21850
21851                 cat >"conftest.$ac_ext" <<_ACEOF
21852 #line 21852 "configure"
21853 #include "confdefs.h"
21854 #include <ttyent.h>
21855 int
21856 main (void)
21857 {
21858 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21859   ;
21860   return 0;
21861 }
21862 _ACEOF
21863 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21864 if { (eval echo "$as_me:21864: \"$ac_link\"") >&5
21865   (eval $ac_link) 2>&5
21866   ac_status=$?
21867   echo "$as_me:21867: \$? = $ac_status" >&5
21868   (exit "$ac_status"); } &&
21869          { ac_try='test -s "conftest$ac_exeext"'
21870   { (eval echo "$as_me:21870: \"$ac_try\"") >&5
21871   (eval $ac_try) 2>&5
21872   ac_status=$?
21873   echo "$as_me:21873: \$? = $ac_status" >&5
21874   (exit "$ac_status"); }; }; then
21875   cf_cv_func_getttynam=yes
21876 else
21877   echo "$as_me: failed program was:" >&5
21878 cat "conftest.$ac_ext" >&5
21879 cf_cv_func_getttynam=no
21880 fi
21881 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21882 fi
21883 echo "$as_me:21883: result: $cf_cv_func_getttynam" >&5
21884 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21885         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21886 #define HAVE_GETTTYNAM 1
21887 EOF
21888
21889 fi
21890
21891 if test "x$ac_cv_func_getopt" = xno && \
21892    test "x$cf_with_progs$cf_with_tests" != xnono; then
21893         { { echo "$as_me:21893: error: getopt is required for building programs" >&5
21894 echo "$as_me: error: getopt is required for building programs" >&2;}
21895    { (exit 1); exit 1; }; }
21896 fi
21897
21898 if test "x$with_safe_sprintf" = xyes
21899 then
21900         if test "x$ac_cv_func_vsnprintf" = xyes
21901         then
21902                 { echo "$as_me:21902: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21903 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21904         else
21905
21906 cat >>confdefs.h <<\EOF
21907 #define USE_SAFE_SPRINTF 1
21908 EOF
21909
21910         fi
21911 fi
21912
21913 if test "x$with_getcap" = "xyes" ; then
21914
21915 echo "$as_me:21915: checking for terminal-capability database functions" >&5
21916 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21917 if test "${cf_cv_cgetent+set}" = set; then
21918   echo $ECHO_N "(cached) $ECHO_C" >&6
21919 else
21920
21921 cat >"conftest.$ac_ext" <<_ACEOF
21922 #line 21922 "configure"
21923 #include "confdefs.h"
21924
21925 $ac_includes_default
21926 int
21927 main (void)
21928 {
21929
21930         char temp[128];
21931         char *buf = temp;
21932         char *db_array = temp;
21933         cgetent(&buf, &db_array, "vt100");
21934         cgetcap(buf, "tc", '=');
21935         cgetmatch(buf, "tc");
21936
21937   ;
21938   return 0;
21939 }
21940 _ACEOF
21941 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21942 if { (eval echo "$as_me:21942: \"$ac_link\"") >&5
21943   (eval $ac_link) 2>&5
21944   ac_status=$?
21945   echo "$as_me:21945: \$? = $ac_status" >&5
21946   (exit "$ac_status"); } &&
21947          { ac_try='test -s "conftest$ac_exeext"'
21948   { (eval echo "$as_me:21948: \"$ac_try\"") >&5
21949   (eval $ac_try) 2>&5
21950   ac_status=$?
21951   echo "$as_me:21951: \$? = $ac_status" >&5
21952   (exit "$ac_status"); }; }; then
21953   cf_cv_cgetent=yes
21954 else
21955   echo "$as_me: failed program was:" >&5
21956 cat "conftest.$ac_ext" >&5
21957 cf_cv_cgetent=no
21958 fi
21959 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21960
21961 fi
21962 echo "$as_me:21962: result: $cf_cv_cgetent" >&5
21963 echo "${ECHO_T}$cf_cv_cgetent" >&6
21964
21965 if test "$cf_cv_cgetent" = yes
21966 then
21967
21968 cat >>confdefs.h <<\EOF
21969 #define HAVE_BSD_CGETENT 1
21970 EOF
21971
21972 echo "$as_me:21972: checking if cgetent uses const parameter" >&5
21973 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21974 if test "${cf_cv_cgetent_const+set}" = set; then
21975   echo $ECHO_N "(cached) $ECHO_C" >&6
21976 else
21977
21978 cat >"conftest.$ac_ext" <<_ACEOF
21979 #line 21979 "configure"
21980 #include "confdefs.h"
21981
21982 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21983 $ac_includes_default
21984 int
21985 main (void)
21986 {
21987
21988         char temp[128];
21989         char *buf = temp;
21990 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21991         const char *db_array = temp;
21992         cgetent(&buf, &db_array, "vt100");
21993 #endif
21994         cgetcap(buf, "tc", '=');
21995         cgetmatch(buf, "tc");
21996
21997   ;
21998   return 0;
21999 }
22000 _ACEOF
22001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22002 if { (eval echo "$as_me:22002: \"$ac_link\"") >&5
22003   (eval $ac_link) 2>&5
22004   ac_status=$?
22005   echo "$as_me:22005: \$? = $ac_status" >&5
22006   (exit "$ac_status"); } &&
22007          { ac_try='test -s "conftest$ac_exeext"'
22008   { (eval echo "$as_me:22008: \"$ac_try\"") >&5
22009   (eval $ac_try) 2>&5
22010   ac_status=$?
22011   echo "$as_me:22011: \$? = $ac_status" >&5
22012   (exit "$ac_status"); }; }; then
22013   cf_cv_cgetent_const=yes
22014 else
22015   echo "$as_me: failed program was:" >&5
22016 cat "conftest.$ac_ext" >&5
22017 cf_cv_cgetent_const=no
22018 fi
22019 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22020
22021 fi
22022 echo "$as_me:22022: result: $cf_cv_cgetent_const" >&5
22023 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22024         if test "$cf_cv_cgetent_const" = yes
22025         then
22026
22027 cat >>confdefs.h <<EOF
22028 #define CGETENT_CONST const
22029 EOF
22030
22031         fi
22032 fi
22033
22034 fi
22035
22036 echo "$as_me:22036: checking for isascii" >&5
22037 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22038 if test "${cf_cv_have_isascii+set}" = set; then
22039   echo $ECHO_N "(cached) $ECHO_C" >&6
22040 else
22041
22042         cat >"conftest.$ac_ext" <<_ACEOF
22043 #line 22043 "configure"
22044 #include "confdefs.h"
22045 #include <ctype.h>
22046 int
22047 main (void)
22048 {
22049 int x = isascii(' ')
22050   ;
22051   return 0;
22052 }
22053 _ACEOF
22054 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22055 if { (eval echo "$as_me:22055: \"$ac_link\"") >&5
22056   (eval $ac_link) 2>&5
22057   ac_status=$?
22058   echo "$as_me:22058: \$? = $ac_status" >&5
22059   (exit "$ac_status"); } &&
22060          { ac_try='test -s "conftest$ac_exeext"'
22061   { (eval echo "$as_me:22061: \"$ac_try\"") >&5
22062   (eval $ac_try) 2>&5
22063   ac_status=$?
22064   echo "$as_me:22064: \$? = $ac_status" >&5
22065   (exit "$ac_status"); }; }; then
22066   cf_cv_have_isascii=yes
22067 else
22068   echo "$as_me: failed program was:" >&5
22069 cat "conftest.$ac_ext" >&5
22070 cf_cv_have_isascii=no
22071 fi
22072 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22073
22074 fi
22075 echo "$as_me:22075: result: $cf_cv_have_isascii" >&5
22076 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22077 test "$cf_cv_have_isascii" = yes &&
22078 cat >>confdefs.h <<\EOF
22079 #define HAVE_ISASCII 1
22080 EOF
22081
22082 if test "$ac_cv_func_sigaction" = yes; then
22083 echo "$as_me:22083: checking whether sigaction needs _POSIX_SOURCE" >&5
22084 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22085 cat >"conftest.$ac_ext" <<_ACEOF
22086 #line 22086 "configure"
22087 #include "confdefs.h"
22088
22089 #include <sys/types.h>
22090 #include <signal.h>
22091 int
22092 main (void)
22093 {
22094 struct sigaction act
22095   ;
22096   return 0;
22097 }
22098 _ACEOF
22099 rm -f "conftest.$ac_objext"
22100 if { (eval echo "$as_me:22100: \"$ac_compile\"") >&5
22101   (eval $ac_compile) 2>&5
22102   ac_status=$?
22103   echo "$as_me:22103: \$? = $ac_status" >&5
22104   (exit "$ac_status"); } &&
22105          { ac_try='test -s "conftest.$ac_objext"'
22106   { (eval echo "$as_me:22106: \"$ac_try\"") >&5
22107   (eval $ac_try) 2>&5
22108   ac_status=$?
22109   echo "$as_me:22109: \$? = $ac_status" >&5
22110   (exit "$ac_status"); }; }; then
22111   sigact_bad=no
22112 else
22113   echo "$as_me: failed program was:" >&5
22114 cat "conftest.$ac_ext" >&5
22115
22116 cat >"conftest.$ac_ext" <<_ACEOF
22117 #line 22117 "configure"
22118 #include "confdefs.h"
22119
22120 #define _POSIX_SOURCE
22121 #include <sys/types.h>
22122 #include <signal.h>
22123 int
22124 main (void)
22125 {
22126 struct sigaction act
22127   ;
22128   return 0;
22129 }
22130 _ACEOF
22131 rm -f "conftest.$ac_objext"
22132 if { (eval echo "$as_me:22132: \"$ac_compile\"") >&5
22133   (eval $ac_compile) 2>&5
22134   ac_status=$?
22135   echo "$as_me:22135: \$? = $ac_status" >&5
22136   (exit "$ac_status"); } &&
22137          { ac_try='test -s "conftest.$ac_objext"'
22138   { (eval echo "$as_me:22138: \"$ac_try\"") >&5
22139   (eval $ac_try) 2>&5
22140   ac_status=$?
22141   echo "$as_me:22141: \$? = $ac_status" >&5
22142   (exit "$ac_status"); }; }; then
22143   sigact_bad=yes
22144
22145 cat >>confdefs.h <<\EOF
22146 #define _POSIX_SOURCE 1
22147 EOF
22148
22149 else
22150   echo "$as_me: failed program was:" >&5
22151 cat "conftest.$ac_ext" >&5
22152 sigact_bad=unknown
22153 fi
22154 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22155 fi
22156 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22157 echo "$as_me:22157: result: $sigact_bad" >&5
22158 echo "${ECHO_T}$sigact_bad" >&6
22159 fi
22160
22161 echo "$as_me:22161: checking if nanosleep really works" >&5
22162 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22163 if test "${cf_cv_func_nanosleep+set}" = set; then
22164   echo $ECHO_N "(cached) $ECHO_C" >&6
22165 else
22166
22167 if test "$cross_compiling" = yes; then
22168   cf_cv_func_nanosleep=unknown
22169 else
22170   cat >"conftest.$ac_ext" <<_ACEOF
22171 #line 22171 "configure"
22172 #include "confdefs.h"
22173
22174 $ac_includes_default
22175
22176 #include <errno.h>
22177 #include <time.h>
22178
22179 #ifdef HAVE_SYS_TIME_H
22180 #include <sys/time.h>
22181 #endif
22182
22183 int main(void) {
22184         struct timespec ts1, ts2;
22185         int code;
22186         ts1.tv_sec  = 0;
22187         ts1.tv_nsec = 750000000;
22188         ts2.tv_sec  = 0;
22189         ts2.tv_nsec = 0;
22190         errno = 0;
22191         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22192         ${cf_cv_main_return:-return}(code != 0);
22193 }
22194
22195 _ACEOF
22196 rm -f "conftest$ac_exeext"
22197 if { (eval echo "$as_me:22197: \"$ac_link\"") >&5
22198   (eval $ac_link) 2>&5
22199   ac_status=$?
22200   echo "$as_me:22200: \$? = $ac_status" >&5
22201   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22202   { (eval echo "$as_me:22202: \"$ac_try\"") >&5
22203   (eval $ac_try) 2>&5
22204   ac_status=$?
22205   echo "$as_me:22205: \$? = $ac_status" >&5
22206   (exit "$ac_status"); }; }; then
22207   cf_cv_func_nanosleep=yes
22208 else
22209   echo "$as_me: program exited with status $ac_status" >&5
22210 echo "$as_me: failed program was:" >&5
22211 cat "conftest.$ac_ext" >&5
22212 cf_cv_func_nanosleep=no
22213 fi
22214 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22215 fi
22216 fi
22217 echo "$as_me:22217: result: $cf_cv_func_nanosleep" >&5
22218 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22219
22220 test "$cf_cv_func_nanosleep" = "yes" &&
22221 cat >>confdefs.h <<\EOF
22222 #define HAVE_NANOSLEEP 1
22223 EOF
22224
22225 for ac_header in \
22226 termio.h \
22227 termios.h \
22228 unistd.h \
22229 sys/ioctl.h \
22230 sys/termio.h \
22231
22232 do
22233 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22234 echo "$as_me:22234: checking for $ac_header" >&5
22235 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22236 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22237   echo $ECHO_N "(cached) $ECHO_C" >&6
22238 else
22239   cat >"conftest.$ac_ext" <<_ACEOF
22240 #line 22240 "configure"
22241 #include "confdefs.h"
22242 #include <$ac_header>
22243 _ACEOF
22244 if { (eval echo "$as_me:22244: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22245   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22246   ac_status=$?
22247   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22248   rm -f conftest.er1
22249   cat conftest.err >&5
22250   echo "$as_me:22250: \$? = $ac_status" >&5
22251   (exit "$ac_status"); } >/dev/null; then
22252   if test -s conftest.err; then
22253     ac_cpp_err=$ac_c_preproc_warn_flag
22254   else
22255     ac_cpp_err=
22256   fi
22257 else
22258   ac_cpp_err=yes
22259 fi
22260 if test -z "$ac_cpp_err"; then
22261   eval "$as_ac_Header=yes"
22262 else
22263   echo "$as_me: failed program was:" >&5
22264   cat "conftest.$ac_ext" >&5
22265   eval "$as_ac_Header=no"
22266 fi
22267 rm -f conftest.err "conftest.$ac_ext"
22268 fi
22269 echo "$as_me:22269: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22270 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22271 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22272   cat >>confdefs.h <<EOF
22273 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22274 EOF
22275
22276 fi
22277 done
22278
22279 if test "$ac_cv_header_termios_h" = yes ; then
22280         case "$CFLAGS $CPPFLAGS" in
22281         (*-D_POSIX_SOURCE*)
22282                 termios_bad=dunno ;;
22283         (*)     termios_bad=maybe ;;
22284         esac
22285         if test "$termios_bad" = maybe ; then
22286         echo "$as_me:22286: checking whether termios.h needs _POSIX_SOURCE" >&5
22287 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22288         cat >"conftest.$ac_ext" <<_ACEOF
22289 #line 22289 "configure"
22290 #include "confdefs.h"
22291 #include <termios.h>
22292 int
22293 main (void)
22294 {
22295 struct termios foo; int x = foo.c_iflag = 1; (void)x
22296   ;
22297   return 0;
22298 }
22299 _ACEOF
22300 rm -f "conftest.$ac_objext"
22301 if { (eval echo "$as_me:22301: \"$ac_compile\"") >&5
22302   (eval $ac_compile) 2>&5
22303   ac_status=$?
22304   echo "$as_me:22304: \$? = $ac_status" >&5
22305   (exit "$ac_status"); } &&
22306          { ac_try='test -s "conftest.$ac_objext"'
22307   { (eval echo "$as_me:22307: \"$ac_try\"") >&5
22308   (eval $ac_try) 2>&5
22309   ac_status=$?
22310   echo "$as_me:22310: \$? = $ac_status" >&5
22311   (exit "$ac_status"); }; }; then
22312   termios_bad=no
22313 else
22314   echo "$as_me: failed program was:" >&5
22315 cat "conftest.$ac_ext" >&5
22316
22317                 cat >"conftest.$ac_ext" <<_ACEOF
22318 #line 22318 "configure"
22319 #include "confdefs.h"
22320
22321 #define _POSIX_SOURCE
22322 #include <termios.h>
22323 int
22324 main (void)
22325 {
22326 struct termios foo; int x = foo.c_iflag = 2; (void)x
22327   ;
22328   return 0;
22329 }
22330 _ACEOF
22331 rm -f "conftest.$ac_objext"
22332 if { (eval echo "$as_me:22332: \"$ac_compile\"") >&5
22333   (eval $ac_compile) 2>&5
22334   ac_status=$?
22335   echo "$as_me:22335: \$? = $ac_status" >&5
22336   (exit "$ac_status"); } &&
22337          { ac_try='test -s "conftest.$ac_objext"'
22338   { (eval echo "$as_me:22338: \"$ac_try\"") >&5
22339   (eval $ac_try) 2>&5
22340   ac_status=$?
22341   echo "$as_me:22341: \$? = $ac_status" >&5
22342   (exit "$ac_status"); }; }; then
22343   termios_bad=unknown
22344 else
22345   echo "$as_me: failed program was:" >&5
22346 cat "conftest.$ac_ext" >&5
22347 termios_bad=yes
22348 cat >>confdefs.h <<\EOF
22349 #define _POSIX_SOURCE 1
22350 EOF
22351
22352 fi
22353 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22354
22355 fi
22356 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22357         echo "$as_me:22357: result: $termios_bad" >&5
22358 echo "${ECHO_T}$termios_bad" >&6
22359         fi
22360 fi
22361
22362 echo "$as_me:22362: checking for tcgetattr" >&5
22363 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22364 if test "${cf_cv_have_tcgetattr+set}" = set; then
22365   echo $ECHO_N "(cached) $ECHO_C" >&6
22366 else
22367
22368 cat >"conftest.$ac_ext" <<_ACEOF
22369 #line 22369 "configure"
22370 #include "confdefs.h"
22371
22372 #include <sys/types.h>
22373 #ifdef HAVE_UNISTD_H
22374 #include <unistd.h>
22375 #endif
22376 #ifdef HAVE_TERMIOS_H
22377 #include <termios.h>
22378 #define TTY struct termios
22379 #else
22380 #ifdef HAVE_TERMIO_H
22381 #include <termio.h>
22382 #define TTY struct termio
22383 #endif
22384 #endif
22385
22386 int
22387 main (void)
22388 {
22389
22390 TTY foo;
22391 tcgetattr(1, &foo);
22392   ;
22393   return 0;
22394 }
22395 _ACEOF
22396 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22397 if { (eval echo "$as_me:22397: \"$ac_link\"") >&5
22398   (eval $ac_link) 2>&5
22399   ac_status=$?
22400   echo "$as_me:22400: \$? = $ac_status" >&5
22401   (exit "$ac_status"); } &&
22402          { ac_try='test -s "conftest$ac_exeext"'
22403   { (eval echo "$as_me:22403: \"$ac_try\"") >&5
22404   (eval $ac_try) 2>&5
22405   ac_status=$?
22406   echo "$as_me:22406: \$? = $ac_status" >&5
22407   (exit "$ac_status"); }; }; then
22408   cf_cv_have_tcgetattr=yes
22409 else
22410   echo "$as_me: failed program was:" >&5
22411 cat "conftest.$ac_ext" >&5
22412 cf_cv_have_tcgetattr=no
22413 fi
22414 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22415 fi
22416 echo "$as_me:22416: result: $cf_cv_have_tcgetattr" >&5
22417 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22418 test "$cf_cv_have_tcgetattr" = yes &&
22419 cat >>confdefs.h <<\EOF
22420 #define HAVE_TCGETATTR 1
22421 EOF
22422
22423 echo "$as_me:22423: checking for vsscanf function or workaround" >&5
22424 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22425 if test "${cf_cv_func_vsscanf+set}" = set; then
22426   echo $ECHO_N "(cached) $ECHO_C" >&6
22427 else
22428
22429 cat >"conftest.$ac_ext" <<_ACEOF
22430 #line 22430 "configure"
22431 #include "confdefs.h"
22432
22433 #include <stdarg.h>
22434 #include <stdio.h>
22435 int
22436 main (void)
22437 {
22438
22439         va_list ap;
22440         vsscanf("from", "%d", ap)
22441   ;
22442   return 0;
22443 }
22444 _ACEOF
22445 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22446 if { (eval echo "$as_me:22446: \"$ac_link\"") >&5
22447   (eval $ac_link) 2>&5
22448   ac_status=$?
22449   echo "$as_me:22449: \$? = $ac_status" >&5
22450   (exit "$ac_status"); } &&
22451          { ac_try='test -s "conftest$ac_exeext"'
22452   { (eval echo "$as_me:22452: \"$ac_try\"") >&5
22453   (eval $ac_try) 2>&5
22454   ac_status=$?
22455   echo "$as_me:22455: \$? = $ac_status" >&5
22456   (exit "$ac_status"); }; }; then
22457   cf_cv_func_vsscanf=vsscanf
22458 else
22459   echo "$as_me: failed program was:" >&5
22460 cat "conftest.$ac_ext" >&5
22461
22462 cat >"conftest.$ac_ext" <<_ACEOF
22463 #line 22463 "configure"
22464 #include "confdefs.h"
22465
22466 #include <stdarg.h>
22467 #include <stdio.h>
22468 int
22469 main (void)
22470 {
22471
22472         FILE strbuf;
22473         char *str = "from";
22474
22475         strbuf._flag = _IOREAD;
22476         strbuf._ptr = strbuf._base = (unsigned char *) str;
22477         strbuf._cnt = strlen(str);
22478         strbuf._file = _NFILE;
22479         return (vfscanf(&strbuf, "%d", ap))
22480   ;
22481   return 0;
22482 }
22483 _ACEOF
22484 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22485 if { (eval echo "$as_me:22485: \"$ac_link\"") >&5
22486   (eval $ac_link) 2>&5
22487   ac_status=$?
22488   echo "$as_me:22488: \$? = $ac_status" >&5
22489   (exit "$ac_status"); } &&
22490          { ac_try='test -s "conftest$ac_exeext"'
22491   { (eval echo "$as_me:22491: \"$ac_try\"") >&5
22492   (eval $ac_try) 2>&5
22493   ac_status=$?
22494   echo "$as_me:22494: \$? = $ac_status" >&5
22495   (exit "$ac_status"); }; }; then
22496   cf_cv_func_vsscanf=vfscanf
22497 else
22498   echo "$as_me: failed program was:" >&5
22499 cat "conftest.$ac_ext" >&5
22500
22501 cat >"conftest.$ac_ext" <<_ACEOF
22502 #line 22502 "configure"
22503 #include "confdefs.h"
22504
22505 #include <stdarg.h>
22506 #include <stdio.h>
22507 int
22508 main (void)
22509 {
22510
22511         FILE strbuf;
22512         char *str = "from";
22513
22514         strbuf._flag = _IOREAD;
22515         strbuf._ptr = strbuf._base = (unsigned char *) str;
22516         strbuf._cnt = strlen(str);
22517         strbuf._file = _NFILE;
22518         return (_doscan(&strbuf, "%d", ap))
22519   ;
22520   return 0;
22521 }
22522 _ACEOF
22523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22524 if { (eval echo "$as_me:22524: \"$ac_link\"") >&5
22525   (eval $ac_link) 2>&5
22526   ac_status=$?
22527   echo "$as_me:22527: \$? = $ac_status" >&5
22528   (exit "$ac_status"); } &&
22529          { ac_try='test -s "conftest$ac_exeext"'
22530   { (eval echo "$as_me:22530: \"$ac_try\"") >&5
22531   (eval $ac_try) 2>&5
22532   ac_status=$?
22533   echo "$as_me:22533: \$? = $ac_status" >&5
22534   (exit "$ac_status"); }; }; then
22535   cf_cv_func_vsscanf=_doscan
22536 else
22537   echo "$as_me: failed program was:" >&5
22538 cat "conftest.$ac_ext" >&5
22539
22540 cf_cv_func_vsscanf=no
22541 fi
22542 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22543 fi
22544 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22545 fi
22546 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22547 fi
22548 echo "$as_me:22548: result: $cf_cv_func_vsscanf" >&5
22549 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22550
22551 case "$cf_cv_func_vsscanf" in
22552 (vsscanf)
22553 cat >>confdefs.h <<\EOF
22554 #define HAVE_VSSCANF 1
22555 EOF
22556 ;;
22557 (vfscanf)
22558 cat >>confdefs.h <<\EOF
22559 #define HAVE_VFSCANF 1
22560 EOF
22561 ;;
22562 (_doscan)
22563 cat >>confdefs.h <<\EOF
22564 #define HAVE__DOSCAN 1
22565 EOF
22566 ;;
22567 esac
22568
22569 for ac_header in \
22570 unistd.h \
22571
22572 do
22573 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22574 echo "$as_me:22574: checking for $ac_header" >&5
22575 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22576 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22577   echo $ECHO_N "(cached) $ECHO_C" >&6
22578 else
22579   cat >"conftest.$ac_ext" <<_ACEOF
22580 #line 22580 "configure"
22581 #include "confdefs.h"
22582 #include <$ac_header>
22583 _ACEOF
22584 if { (eval echo "$as_me:22584: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22585   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22586   ac_status=$?
22587   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22588   rm -f conftest.er1
22589   cat conftest.err >&5
22590   echo "$as_me:22590: \$? = $ac_status" >&5
22591   (exit "$ac_status"); } >/dev/null; then
22592   if test -s conftest.err; then
22593     ac_cpp_err=$ac_c_preproc_warn_flag
22594   else
22595     ac_cpp_err=
22596   fi
22597 else
22598   ac_cpp_err=yes
22599 fi
22600 if test -z "$ac_cpp_err"; then
22601   eval "$as_ac_Header=yes"
22602 else
22603   echo "$as_me: failed program was:" >&5
22604   cat "conftest.$ac_ext" >&5
22605   eval "$as_ac_Header=no"
22606 fi
22607 rm -f conftest.err "conftest.$ac_ext"
22608 fi
22609 echo "$as_me:22609: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22610 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22611 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22612   cat >>confdefs.h <<EOF
22613 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22614 EOF
22615
22616 fi
22617 done
22618
22619 echo "$as_me:22619: checking for working mkstemp" >&5
22620 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22621 if test "${cf_cv_func_mkstemp+set}" = set; then
22622   echo $ECHO_N "(cached) $ECHO_C" >&6
22623 else
22624
22625 rm -rf ./conftest*
22626 if test "$cross_compiling" = yes; then
22627   cf_cv_func_mkstemp=maybe
22628 else
22629   cat >"conftest.$ac_ext" <<_ACEOF
22630 #line 22630 "configure"
22631 #include "confdefs.h"
22632
22633 $ac_includes_default
22634
22635 int main(void)
22636 {
22637         char *tmpl = "conftestXXXXXX";
22638         char name[2][80];
22639         int n;
22640         int result = 0;
22641         int fd;
22642         struct stat sb;
22643
22644         umask(077);
22645         for (n = 0; n < 2; ++n) {
22646                 strcpy(name[n], tmpl);
22647                 if ((fd = mkstemp(name[n])) >= 0) {
22648                         if (!strcmp(name[n], tmpl)
22649                          || stat(name[n], &sb) != 0
22650                          || (sb.st_mode & S_IFMT) != S_IFREG
22651                          || (sb.st_mode & 077) != 0) {
22652                                 result = 1;
22653                         }
22654                         close(fd);
22655                 }
22656         }
22657         if (result == 0
22658          && !strcmp(name[0], name[1]))
22659                 result = 1;
22660         ${cf_cv_main_return:-return}(result);
22661 }
22662
22663 _ACEOF
22664 rm -f "conftest$ac_exeext"
22665 if { (eval echo "$as_me:22665: \"$ac_link\"") >&5
22666   (eval $ac_link) 2>&5
22667   ac_status=$?
22668   echo "$as_me:22668: \$? = $ac_status" >&5
22669   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22670   { (eval echo "$as_me:22670: \"$ac_try\"") >&5
22671   (eval $ac_try) 2>&5
22672   ac_status=$?
22673   echo "$as_me:22673: \$? = $ac_status" >&5
22674   (exit "$ac_status"); }; }; then
22675   cf_cv_func_mkstemp=yes
22676
22677 else
22678   echo "$as_me: program exited with status $ac_status" >&5
22679 echo "$as_me: failed program was:" >&5
22680 cat "conftest.$ac_ext" >&5
22681 cf_cv_func_mkstemp=no
22682
22683 fi
22684 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22685 fi
22686
22687 fi
22688 echo "$as_me:22688: result: $cf_cv_func_mkstemp" >&5
22689 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22690 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22691         echo "$as_me:22691: checking for mkstemp" >&5
22692 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22693 if test "${ac_cv_func_mkstemp+set}" = set; then
22694   echo $ECHO_N "(cached) $ECHO_C" >&6
22695 else
22696   cat >"conftest.$ac_ext" <<_ACEOF
22697 #line 22697 "configure"
22698 #include "confdefs.h"
22699 #define mkstemp autoconf_temporary
22700 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22701 #undef mkstemp
22702
22703 #ifdef __cplusplus
22704 extern "C"
22705 #endif
22706
22707 /* We use char because int might match the return type of a gcc2
22708    builtin and then its argument prototype would still apply.  */
22709 char mkstemp (void);
22710
22711 int
22712 main (void)
22713 {
22714
22715 /* The GNU C library defines stubs for functions which it implements
22716     to always fail with ENOSYS.  Some functions are actually named
22717     something starting with __ and the normal name is an alias.  */
22718 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22719 #error found stub for mkstemp
22720 #endif
22721
22722         return mkstemp ();
22723   ;
22724   return 0;
22725 }
22726 _ACEOF
22727 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22728 if { (eval echo "$as_me:22728: \"$ac_link\"") >&5
22729   (eval $ac_link) 2>&5
22730   ac_status=$?
22731   echo "$as_me:22731: \$? = $ac_status" >&5
22732   (exit "$ac_status"); } &&
22733          { ac_try='test -s "conftest$ac_exeext"'
22734   { (eval echo "$as_me:22734: \"$ac_try\"") >&5
22735   (eval $ac_try) 2>&5
22736   ac_status=$?
22737   echo "$as_me:22737: \$? = $ac_status" >&5
22738   (exit "$ac_status"); }; }; then
22739   ac_cv_func_mkstemp=yes
22740 else
22741   echo "$as_me: failed program was:" >&5
22742 cat "conftest.$ac_ext" >&5
22743 ac_cv_func_mkstemp=no
22744 fi
22745 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22746 fi
22747 echo "$as_me:22747: result: $ac_cv_func_mkstemp" >&5
22748 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22749
22750 fi
22751 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22752
22753 cat >>confdefs.h <<\EOF
22754 #define HAVE_MKSTEMP 1
22755 EOF
22756
22757 fi
22758
22759 # setup for prototype of fallback for vsscanf()
22760
22761 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22762         HAVE_VSSCANF=1
22763 else
22764         HAVE_VSSCANF=0
22765 fi
22766
22767 if test "x$cross_compiling" = xyes ; then
22768         { echo "$as_me:22768: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22769 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22770 else
22771         echo "$as_me:22771: checking whether setvbuf arguments are reversed" >&5
22772 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22773 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22774   echo $ECHO_N "(cached) $ECHO_C" >&6
22775 else
22776   if test "$cross_compiling" = yes; then
22777   { { echo "$as_me:22777: error: cannot run test program while cross compiling" >&5
22778 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22779    { (exit 1); exit 1; }; }
22780 else
22781   cat >"conftest.$ac_ext" <<_ACEOF
22782 #line 22782 "configure"
22783 #include "confdefs.h"
22784 #include <stdio.h>
22785 /* If setvbuf has the reversed format, exit 0. */
22786 int
22787 main (void)
22788 {
22789   /* This call has the arguments reversed.
22790      A reversed system may check and see that the address of main
22791      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22792   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22793     $ac_main_return(1);
22794   putc('\r', stdout);
22795   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22796 }
22797 _ACEOF
22798 rm -f "conftest$ac_exeext"
22799 if { (eval echo "$as_me:22799: \"$ac_link\"") >&5
22800   (eval $ac_link) 2>&5
22801   ac_status=$?
22802   echo "$as_me:22802: \$? = $ac_status" >&5
22803   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22804   { (eval echo "$as_me:22804: \"$ac_try\"") >&5
22805   (eval $ac_try) 2>&5
22806   ac_status=$?
22807   echo "$as_me:22807: \$? = $ac_status" >&5
22808   (exit "$ac_status"); }; }; then
22809   ac_cv_func_setvbuf_reversed=yes
22810 else
22811   echo "$as_me: program exited with status $ac_status" >&5
22812 echo "$as_me: failed program was:" >&5
22813 cat "conftest.$ac_ext" >&5
22814 ac_cv_func_setvbuf_reversed=no
22815 fi
22816 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22817 fi
22818 rm -f core ./core.* ./*.core
22819 fi
22820 echo "$as_me:22820: result: $ac_cv_func_setvbuf_reversed" >&5
22821 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22822 if test $ac_cv_func_setvbuf_reversed = yes; then
22823
22824 cat >>confdefs.h <<\EOF
22825 #define SETVBUF_REVERSED 1
22826 EOF
22827
22828 fi
22829
22830 fi
22831 echo "$as_me:22831: checking for intptr_t" >&5
22832 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22833 if test "${ac_cv_type_intptr_t+set}" = set; then
22834   echo $ECHO_N "(cached) $ECHO_C" >&6
22835 else
22836   cat >"conftest.$ac_ext" <<_ACEOF
22837 #line 22837 "configure"
22838 #include "confdefs.h"
22839 $ac_includes_default
22840 int
22841 main (void)
22842 {
22843 if ((intptr_t *) 0)
22844   return 0;
22845 if (sizeof (intptr_t))
22846   return 0;
22847   ;
22848   return 0;
22849 }
22850 _ACEOF
22851 rm -f "conftest.$ac_objext"
22852 if { (eval echo "$as_me:22852: \"$ac_compile\"") >&5
22853   (eval $ac_compile) 2>&5
22854   ac_status=$?
22855   echo "$as_me:22855: \$? = $ac_status" >&5
22856   (exit "$ac_status"); } &&
22857          { ac_try='test -s "conftest.$ac_objext"'
22858   { (eval echo "$as_me:22858: \"$ac_try\"") >&5
22859   (eval $ac_try) 2>&5
22860   ac_status=$?
22861   echo "$as_me:22861: \$? = $ac_status" >&5
22862   (exit "$ac_status"); }; }; then
22863   ac_cv_type_intptr_t=yes
22864 else
22865   echo "$as_me: failed program was:" >&5
22866 cat "conftest.$ac_ext" >&5
22867 ac_cv_type_intptr_t=no
22868 fi
22869 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22870 fi
22871 echo "$as_me:22871: result: $ac_cv_type_intptr_t" >&5
22872 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22873 if test "$ac_cv_type_intptr_t" = yes; then
22874   :
22875 else
22876
22877 cat >>confdefs.h <<EOF
22878 #define intptr_t long
22879 EOF
22880
22881 fi
22882
22883 echo "$as_me:22883: checking for ssize_t" >&5
22884 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22885 if test "${ac_cv_type_ssize_t+set}" = set; then
22886   echo $ECHO_N "(cached) $ECHO_C" >&6
22887 else
22888   cat >"conftest.$ac_ext" <<_ACEOF
22889 #line 22889 "configure"
22890 #include "confdefs.h"
22891 $ac_includes_default
22892 int
22893 main (void)
22894 {
22895 if ((ssize_t *) 0)
22896   return 0;
22897 if (sizeof (ssize_t))
22898   return 0;
22899   ;
22900   return 0;
22901 }
22902 _ACEOF
22903 rm -f "conftest.$ac_objext"
22904 if { (eval echo "$as_me:22904: \"$ac_compile\"") >&5
22905   (eval $ac_compile) 2>&5
22906   ac_status=$?
22907   echo "$as_me:22907: \$? = $ac_status" >&5
22908   (exit "$ac_status"); } &&
22909          { ac_try='test -s "conftest.$ac_objext"'
22910   { (eval echo "$as_me:22910: \"$ac_try\"") >&5
22911   (eval $ac_try) 2>&5
22912   ac_status=$?
22913   echo "$as_me:22913: \$? = $ac_status" >&5
22914   (exit "$ac_status"); }; }; then
22915   ac_cv_type_ssize_t=yes
22916 else
22917   echo "$as_me: failed program was:" >&5
22918 cat "conftest.$ac_ext" >&5
22919 ac_cv_type_ssize_t=no
22920 fi
22921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22922 fi
22923 echo "$as_me:22923: result: $ac_cv_type_ssize_t" >&5
22924 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22925 if test "$ac_cv_type_ssize_t" = yes; then
22926   :
22927 else
22928
22929 cat >>confdefs.h <<EOF
22930 #define ssize_t int
22931 EOF
22932
22933 fi
22934
22935 echo "$as_me:22935: checking for type sigaction_t" >&5
22936 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22937 if test "${cf_cv_type_sigaction+set}" = set; then
22938   echo $ECHO_N "(cached) $ECHO_C" >&6
22939 else
22940
22941         cat >"conftest.$ac_ext" <<_ACEOF
22942 #line 22942 "configure"
22943 #include "confdefs.h"
22944
22945 #include <signal.h>
22946 int
22947 main (void)
22948 {
22949 sigaction_t x
22950   ;
22951   return 0;
22952 }
22953 _ACEOF
22954 rm -f "conftest.$ac_objext"
22955 if { (eval echo "$as_me:22955: \"$ac_compile\"") >&5
22956   (eval $ac_compile) 2>&5
22957   ac_status=$?
22958   echo "$as_me:22958: \$? = $ac_status" >&5
22959   (exit "$ac_status"); } &&
22960          { ac_try='test -s "conftest.$ac_objext"'
22961   { (eval echo "$as_me:22961: \"$ac_try\"") >&5
22962   (eval $ac_try) 2>&5
22963   ac_status=$?
22964   echo "$as_me:22964: \$? = $ac_status" >&5
22965   (exit "$ac_status"); }; }; then
22966   cf_cv_type_sigaction=yes
22967 else
22968   echo "$as_me: failed program was:" >&5
22969 cat "conftest.$ac_ext" >&5
22970 cf_cv_type_sigaction=no
22971 fi
22972 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22973 fi
22974
22975 echo "$as_me:22975: result: $cf_cv_type_sigaction" >&5
22976 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22977 test "$cf_cv_type_sigaction" = yes &&
22978 cat >>confdefs.h <<\EOF
22979 #define HAVE_TYPE_SIGACTION 1
22980 EOF
22981
22982 echo "$as_me:22982: checking declaration of size-change" >&5
22983 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22984 if test "${cf_cv_sizechange+set}" = set; then
22985   echo $ECHO_N "(cached) $ECHO_C" >&6
22986 else
22987
22988         cf_cv_sizechange=unknown
22989         cf_save_CPPFLAGS="$CPPFLAGS"
22990
22991 for cf_opts in "" "NEED_PTEM_H"
22992 do
22993
22994         CPPFLAGS="$cf_save_CPPFLAGS"
22995         if test -n "$cf_opts"
22996         then
22997
22998         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22999         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23000
23001         fi
23002         cat >"conftest.$ac_ext" <<_ACEOF
23003 #line 23003 "configure"
23004 #include "confdefs.h"
23005 #include <sys/types.h>
23006 #ifdef HAVE_TERMIOS_H
23007 #include <termios.h>
23008 #else
23009 #ifdef HAVE_TERMIO_H
23010 #include <termio.h>
23011 #endif
23012 #endif
23013
23014 #ifdef NEED_PTEM_H
23015 /* This is a workaround for SCO:  they neglected to define struct winsize in
23016  * termios.h -- it is only in termio.h and ptem.h
23017  */
23018 #include <sys/stream.h>
23019 #include <sys/ptem.h>
23020 #endif
23021
23022 #ifdef HAVE_SYS_IOCTL_H
23023 #include <sys/ioctl.h>
23024 #endif
23025
23026 int
23027 main (void)
23028 {
23029
23030 #ifdef TIOCGSIZE
23031         struct ttysize win;     /* SunOS 3.0... */
23032         int y = win.ts_lines = 2;
23033         int x = win.ts_cols = 1;
23034         (void)y;
23035         (void)x;
23036 #else
23037 #ifdef TIOCGWINSZ
23038         struct winsize win;     /* everything else */
23039         int y = win.ws_row = 2;
23040         int x = win.ws_col = 1;
23041         (void)y;
23042         (void)x;
23043 #else
23044         no TIOCGSIZE or TIOCGWINSZ
23045 #endif /* TIOCGWINSZ */
23046 #endif /* TIOCGSIZE */
23047
23048   ;
23049   return 0;
23050 }
23051 _ACEOF
23052 rm -f "conftest.$ac_objext"
23053 if { (eval echo "$as_me:23053: \"$ac_compile\"") >&5
23054   (eval $ac_compile) 2>&5
23055   ac_status=$?
23056   echo "$as_me:23056: \$? = $ac_status" >&5
23057   (exit "$ac_status"); } &&
23058          { ac_try='test -s "conftest.$ac_objext"'
23059   { (eval echo "$as_me:23059: \"$ac_try\"") >&5
23060   (eval $ac_try) 2>&5
23061   ac_status=$?
23062   echo "$as_me:23062: \$? = $ac_status" >&5
23063   (exit "$ac_status"); }; }; then
23064   cf_cv_sizechange=yes
23065 else
23066   echo "$as_me: failed program was:" >&5
23067 cat "conftest.$ac_ext" >&5
23068 cf_cv_sizechange=no
23069 fi
23070 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23071
23072         CPPFLAGS="$cf_save_CPPFLAGS"
23073         if test "$cf_cv_sizechange" = yes ; then
23074                 echo "size-change succeeded ($cf_opts)" >&5
23075                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23076                 break
23077         fi
23078 done
23079
23080 fi
23081 echo "$as_me:23081: result: $cf_cv_sizechange" >&5
23082 echo "${ECHO_T}$cf_cv_sizechange" >&6
23083 if test "$cf_cv_sizechange" != no ; then
23084
23085 cat >>confdefs.h <<\EOF
23086 #define HAVE_SIZECHANGE 1
23087 EOF
23088
23089         case "$cf_cv_sizechange" in
23090         (NEED*)
23091                 cat >>confdefs.h <<EOF
23092 #define $cf_cv_sizechange  1
23093 EOF
23094
23095                 ;;
23096         esac
23097 fi
23098
23099 echo "$as_me:23099: checking for memmove" >&5
23100 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23101 if test "${ac_cv_func_memmove+set}" = set; then
23102   echo $ECHO_N "(cached) $ECHO_C" >&6
23103 else
23104   cat >"conftest.$ac_ext" <<_ACEOF
23105 #line 23105 "configure"
23106 #include "confdefs.h"
23107 #define memmove autoconf_temporary
23108 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23109 #undef memmove
23110
23111 #ifdef __cplusplus
23112 extern "C"
23113 #endif
23114
23115 /* We use char because int might match the return type of a gcc2
23116    builtin and then its argument prototype would still apply.  */
23117 char memmove (void);
23118
23119 int
23120 main (void)
23121 {
23122
23123 /* The GNU C library defines stubs for functions which it implements
23124     to always fail with ENOSYS.  Some functions are actually named
23125     something starting with __ and the normal name is an alias.  */
23126 #if defined (__stub_memmove) || defined (__stub___memmove)
23127 #error found stub for memmove
23128 #endif
23129
23130         return memmove ();
23131   ;
23132   return 0;
23133 }
23134 _ACEOF
23135 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23136 if { (eval echo "$as_me:23136: \"$ac_link\"") >&5
23137   (eval $ac_link) 2>&5
23138   ac_status=$?
23139   echo "$as_me:23139: \$? = $ac_status" >&5
23140   (exit "$ac_status"); } &&
23141          { ac_try='test -s "conftest$ac_exeext"'
23142   { (eval echo "$as_me:23142: \"$ac_try\"") >&5
23143   (eval $ac_try) 2>&5
23144   ac_status=$?
23145   echo "$as_me:23145: \$? = $ac_status" >&5
23146   (exit "$ac_status"); }; }; then
23147   ac_cv_func_memmove=yes
23148 else
23149   echo "$as_me: failed program was:" >&5
23150 cat "conftest.$ac_ext" >&5
23151 ac_cv_func_memmove=no
23152 fi
23153 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23154 fi
23155 echo "$as_me:23155: result: $ac_cv_func_memmove" >&5
23156 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23157 if test "$ac_cv_func_memmove" = yes; then
23158   :
23159 else
23160
23161 echo "$as_me:23161: checking for bcopy" >&5
23162 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23163 if test "${ac_cv_func_bcopy+set}" = set; then
23164   echo $ECHO_N "(cached) $ECHO_C" >&6
23165 else
23166   cat >"conftest.$ac_ext" <<_ACEOF
23167 #line 23167 "configure"
23168 #include "confdefs.h"
23169 #define bcopy autoconf_temporary
23170 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23171 #undef bcopy
23172
23173 #ifdef __cplusplus
23174 extern "C"
23175 #endif
23176
23177 /* We use char because int might match the return type of a gcc2
23178    builtin and then its argument prototype would still apply.  */
23179 char bcopy (void);
23180
23181 int
23182 main (void)
23183 {
23184
23185 /* The GNU C library defines stubs for functions which it implements
23186     to always fail with ENOSYS.  Some functions are actually named
23187     something starting with __ and the normal name is an alias.  */
23188 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23189 #error found stub for bcopy
23190 #endif
23191
23192         return bcopy ();
23193   ;
23194   return 0;
23195 }
23196 _ACEOF
23197 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23198 if { (eval echo "$as_me:23198: \"$ac_link\"") >&5
23199   (eval $ac_link) 2>&5
23200   ac_status=$?
23201   echo "$as_me:23201: \$? = $ac_status" >&5
23202   (exit "$ac_status"); } &&
23203          { ac_try='test -s "conftest$ac_exeext"'
23204   { (eval echo "$as_me:23204: \"$ac_try\"") >&5
23205   (eval $ac_try) 2>&5
23206   ac_status=$?
23207   echo "$as_me:23207: \$? = $ac_status" >&5
23208   (exit "$ac_status"); }; }; then
23209   ac_cv_func_bcopy=yes
23210 else
23211   echo "$as_me: failed program was:" >&5
23212 cat "conftest.$ac_ext" >&5
23213 ac_cv_func_bcopy=no
23214 fi
23215 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23216 fi
23217 echo "$as_me:23217: result: $ac_cv_func_bcopy" >&5
23218 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23219 if test "$ac_cv_func_bcopy" = yes; then
23220
23221         echo "$as_me:23221: checking if bcopy does overlapping moves" >&5
23222 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23223 if test "${cf_cv_good_bcopy+set}" = set; then
23224   echo $ECHO_N "(cached) $ECHO_C" >&6
23225 else
23226
23227                 if test "$cross_compiling" = yes; then
23228   cf_cv_good_bcopy=unknown
23229 else
23230   cat >"conftest.$ac_ext" <<_ACEOF
23231 #line 23231 "configure"
23232 #include "confdefs.h"
23233
23234 $ac_includes_default
23235
23236 int main(void) {
23237         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23238         char temp[40];
23239         bcopy(data, temp, sizeof(data));
23240         bcopy(temp+10, temp, 15);
23241         bcopy(temp+5, temp+15, 10);
23242         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23243 }
23244
23245 _ACEOF
23246 rm -f "conftest$ac_exeext"
23247 if { (eval echo "$as_me:23247: \"$ac_link\"") >&5
23248   (eval $ac_link) 2>&5
23249   ac_status=$?
23250   echo "$as_me:23250: \$? = $ac_status" >&5
23251   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23252   { (eval echo "$as_me:23252: \"$ac_try\"") >&5
23253   (eval $ac_try) 2>&5
23254   ac_status=$?
23255   echo "$as_me:23255: \$? = $ac_status" >&5
23256   (exit "$ac_status"); }; }; then
23257   cf_cv_good_bcopy=yes
23258 else
23259   echo "$as_me: program exited with status $ac_status" >&5
23260 echo "$as_me: failed program was:" >&5
23261 cat "conftest.$ac_ext" >&5
23262 cf_cv_good_bcopy=no
23263 fi
23264 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23265 fi
23266
23267 fi
23268 echo "$as_me:23268: result: $cf_cv_good_bcopy" >&5
23269 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23270
23271 else
23272   cf_cv_good_bcopy=no
23273 fi
23274
23275         if test "$cf_cv_good_bcopy" = yes ; then
23276
23277 cat >>confdefs.h <<\EOF
23278 #define USE_OK_BCOPY 1
23279 EOF
23280
23281         else
23282
23283 cat >>confdefs.h <<\EOF
23284 #define USE_MY_MEMMOVE 1
23285 EOF
23286
23287         fi
23288
23289 fi
23290
23291 tty >/dev/null 2>&1 || {
23292 for ac_func in posix_openpt
23293 do
23294 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23295 echo "$as_me:23295: checking for $ac_func" >&5
23296 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23297 if eval "test \"\${$as_ac_var+set}\" = set"; then
23298   echo $ECHO_N "(cached) $ECHO_C" >&6
23299 else
23300   cat >"conftest.$ac_ext" <<_ACEOF
23301 #line 23301 "configure"
23302 #include "confdefs.h"
23303 #define $ac_func autoconf_temporary
23304 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23305 #undef $ac_func
23306
23307 #ifdef __cplusplus
23308 extern "C"
23309 #endif
23310
23311 /* We use char because int might match the return type of a gcc2
23312    builtin and then its argument prototype would still apply.  */
23313 char $ac_func (void);
23314
23315 int
23316 main (void)
23317 {
23318
23319 /* The GNU C library defines stubs for functions which it implements
23320     to always fail with ENOSYS.  Some functions are actually named
23321     something starting with __ and the normal name is an alias.  */
23322 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23323 #error found stub for $ac_func
23324 #endif
23325
23326         return $ac_func ();
23327   ;
23328   return 0;
23329 }
23330 _ACEOF
23331 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23332 if { (eval echo "$as_me:23332: \"$ac_link\"") >&5
23333   (eval $ac_link) 2>&5
23334   ac_status=$?
23335   echo "$as_me:23335: \$? = $ac_status" >&5
23336   (exit "$ac_status"); } &&
23337          { ac_try='test -s "conftest$ac_exeext"'
23338   { (eval echo "$as_me:23338: \"$ac_try\"") >&5
23339   (eval $ac_try) 2>&5
23340   ac_status=$?
23341   echo "$as_me:23341: \$? = $ac_status" >&5
23342   (exit "$ac_status"); }; }; then
23343   eval "$as_ac_var=yes"
23344 else
23345   echo "$as_me: failed program was:" >&5
23346 cat "conftest.$ac_ext" >&5
23347 eval "$as_ac_var=no"
23348 fi
23349 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23350 fi
23351 echo "$as_me:23351: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23352 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23353 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23354   cat >>confdefs.h <<EOF
23355 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23356 EOF
23357
23358 fi
23359 done
23360  }
23361 echo "$as_me:23361: checking if poll really works" >&5
23362 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23363 if test "${cf_cv_working_poll+set}" = set; then
23364   echo $ECHO_N "(cached) $ECHO_C" >&6
23365 else
23366
23367 if test "$cross_compiling" = yes; then
23368   cf_cv_working_poll=unknown
23369 else
23370   cat >"conftest.$ac_ext" <<_ACEOF
23371 #line 23371 "configure"
23372 #include "confdefs.h"
23373
23374 $ac_includes_default
23375
23376 #include <fcntl.h>
23377
23378 #ifdef HAVE_POLL_H
23379 #include <poll.h>
23380 #else
23381 #include <sys/poll.h>
23382 #endif
23383
23384 int main(void) {
23385         struct pollfd myfds;
23386         int ret;
23387
23388         /* check for Darwin bug with respect to "devices" */
23389         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23390         if (myfds.fd < 0)
23391                 myfds.fd = 0;
23392         myfds.events = POLLIN;
23393         myfds.revents = 0;
23394
23395         ret = poll(&myfds, 1, 100);
23396
23397         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23398                 ret = -1;
23399         } else {
23400                 int fd = 0;
23401                 if (!isatty(fd)) {
23402                         fd = open("/dev/tty", 2);       /* O_RDWR */
23403                 }
23404 #ifdef HAVE_POSIX_OPENPT
23405                 if (fd < 0) {
23406                         fd = posix_openpt(O_RDWR);
23407                 }
23408 #endif
23409
23410                 if (fd >= 0) {
23411                         /* also check with standard input */
23412                         myfds.fd = fd;
23413                         myfds.events = POLLIN;
23414                         myfds.revents = 0;
23415                         ret = poll(&myfds, 1, 100);
23416                 } else {
23417                         ret = -1;
23418                 }
23419         }
23420         ${cf_cv_main_return:-return}(ret < 0);
23421 }
23422 _ACEOF
23423 rm -f "conftest$ac_exeext"
23424 if { (eval echo "$as_me:23424: \"$ac_link\"") >&5
23425   (eval $ac_link) 2>&5
23426   ac_status=$?
23427   echo "$as_me:23427: \$? = $ac_status" >&5
23428   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23429   { (eval echo "$as_me:23429: \"$ac_try\"") >&5
23430   (eval $ac_try) 2>&5
23431   ac_status=$?
23432   echo "$as_me:23432: \$? = $ac_status" >&5
23433   (exit "$ac_status"); }; }; then
23434   cf_cv_working_poll=yes
23435 else
23436   echo "$as_me: program exited with status $ac_status" >&5
23437 echo "$as_me: failed program was:" >&5
23438 cat "conftest.$ac_ext" >&5
23439 cf_cv_working_poll=no
23440 fi
23441 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23442 fi
23443 fi
23444 echo "$as_me:23444: result: $cf_cv_working_poll" >&5
23445 echo "${ECHO_T}$cf_cv_working_poll" >&6
23446 test "$cf_cv_working_poll" = "yes" &&
23447 cat >>confdefs.h <<\EOF
23448 #define HAVE_WORKING_POLL 1
23449 EOF
23450
23451 echo "$as_me:23451: checking for va_copy" >&5
23452 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23453 if test "${cf_cv_have_va_copy+set}" = set; then
23454   echo $ECHO_N "(cached) $ECHO_C" >&6
23455 else
23456
23457 cat >"conftest.$ac_ext" <<_ACEOF
23458 #line 23458 "configure"
23459 #include "confdefs.h"
23460
23461 #include <stdarg.h>
23462
23463 int
23464 main (void)
23465 {
23466
23467         static va_list dst;
23468         static va_list src;
23469         va_copy(dst, src)
23470   ;
23471   return 0;
23472 }
23473 _ACEOF
23474 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23475 if { (eval echo "$as_me:23475: \"$ac_link\"") >&5
23476   (eval $ac_link) 2>&5
23477   ac_status=$?
23478   echo "$as_me:23478: \$? = $ac_status" >&5
23479   (exit "$ac_status"); } &&
23480          { ac_try='test -s "conftest$ac_exeext"'
23481   { (eval echo "$as_me:23481: \"$ac_try\"") >&5
23482   (eval $ac_try) 2>&5
23483   ac_status=$?
23484   echo "$as_me:23484: \$? = $ac_status" >&5
23485   (exit "$ac_status"); }; }; then
23486   cf_cv_have_va_copy=yes
23487 else
23488   echo "$as_me: failed program was:" >&5
23489 cat "conftest.$ac_ext" >&5
23490 cf_cv_have_va_copy=no
23491 fi
23492 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23493 fi
23494 echo "$as_me:23494: result: $cf_cv_have_va_copy" >&5
23495 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23496
23497 if test "$cf_cv_have_va_copy" = yes;
23498 then
23499
23500 cat >>confdefs.h <<\EOF
23501 #define HAVE_VA_COPY 1
23502 EOF
23503
23504 else # !cf_cv_have_va_copy
23505
23506 echo "$as_me:23506: checking for __va_copy" >&5
23507 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23508 if test "${cf_cv_have___va_copy+set}" = set; then
23509   echo $ECHO_N "(cached) $ECHO_C" >&6
23510 else
23511
23512 cat >"conftest.$ac_ext" <<_ACEOF
23513 #line 23513 "configure"
23514 #include "confdefs.h"
23515
23516 #include <stdarg.h>
23517
23518 int
23519 main (void)
23520 {
23521
23522         static va_list dst;
23523         static va_list src;
23524         __va_copy(dst, src)
23525   ;
23526   return 0;
23527 }
23528 _ACEOF
23529 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23530 if { (eval echo "$as_me:23530: \"$ac_link\"") >&5
23531   (eval $ac_link) 2>&5
23532   ac_status=$?
23533   echo "$as_me:23533: \$? = $ac_status" >&5
23534   (exit "$ac_status"); } &&
23535          { ac_try='test -s "conftest$ac_exeext"'
23536   { (eval echo "$as_me:23536: \"$ac_try\"") >&5
23537   (eval $ac_try) 2>&5
23538   ac_status=$?
23539   echo "$as_me:23539: \$? = $ac_status" >&5
23540   (exit "$ac_status"); }; }; then
23541   cf_cv_have___va_copy=yes
23542 else
23543   echo "$as_me: failed program was:" >&5
23544 cat "conftest.$ac_ext" >&5
23545 cf_cv_have___va_copy=no
23546 fi
23547 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23548 fi
23549 echo "$as_me:23549: result: $cf_cv_have___va_copy" >&5
23550 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23551
23552 if test "$cf_cv_have___va_copy" = yes
23553 then
23554
23555 cat >>confdefs.h <<\EOF
23556 #define HAVE___VA_COPY 1
23557 EOF
23558
23559 else # !cf_cv_have___va_copy
23560
23561 echo "$as_me:23561: checking for __builtin_va_copy" >&5
23562 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23563 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23564   echo $ECHO_N "(cached) $ECHO_C" >&6
23565 else
23566
23567 cat >"conftest.$ac_ext" <<_ACEOF
23568 #line 23568 "configure"
23569 #include "confdefs.h"
23570
23571 #include <stdarg.h>
23572
23573 int
23574 main (void)
23575 {
23576
23577         static va_list dst;
23578         static va_list src;
23579         __builtin_va_copy(dst, src)
23580   ;
23581   return 0;
23582 }
23583 _ACEOF
23584 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23585 if { (eval echo "$as_me:23585: \"$ac_link\"") >&5
23586   (eval $ac_link) 2>&5
23587   ac_status=$?
23588   echo "$as_me:23588: \$? = $ac_status" >&5
23589   (exit "$ac_status"); } &&
23590          { ac_try='test -s "conftest$ac_exeext"'
23591   { (eval echo "$as_me:23591: \"$ac_try\"") >&5
23592   (eval $ac_try) 2>&5
23593   ac_status=$?
23594   echo "$as_me:23594: \$? = $ac_status" >&5
23595   (exit "$ac_status"); }; }; then
23596   cf_cv_have___builtin_va_copy=yes
23597 else
23598   echo "$as_me: failed program was:" >&5
23599 cat "conftest.$ac_ext" >&5
23600 cf_cv_have___builtin_va_copy=no
23601 fi
23602 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23603 fi
23604 echo "$as_me:23604: result: $cf_cv_have___builtin_va_copy" >&5
23605 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23606
23607 test "$cf_cv_have___builtin_va_copy" = yes &&
23608
23609 cat >>confdefs.h <<\EOF
23610 #define HAVE___BUILTIN_VA_COPY 1
23611 EOF
23612
23613 fi # cf_cv_have___va_copy
23614
23615 fi # cf_cv_have_va_copy
23616
23617 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23618 (*yes*)
23619         ;;
23620
23621 (*)
23622         echo "$as_me:23622: checking if we can simply copy va_list" >&5
23623 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23624 if test "${cf_cv_pointer_va_list+set}" = set; then
23625   echo $ECHO_N "(cached) $ECHO_C" >&6
23626 else
23627
23628 cat >"conftest.$ac_ext" <<_ACEOF
23629 #line 23629 "configure"
23630 #include "confdefs.h"
23631
23632 #include <stdarg.h>
23633
23634 int
23635 main (void)
23636 {
23637
23638         va_list dst;
23639         va_list src;
23640         dst = src
23641   ;
23642   return 0;
23643 }
23644 _ACEOF
23645 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23646 if { (eval echo "$as_me:23646: \"$ac_link\"") >&5
23647   (eval $ac_link) 2>&5
23648   ac_status=$?
23649   echo "$as_me:23649: \$? = $ac_status" >&5
23650   (exit "$ac_status"); } &&
23651          { ac_try='test -s "conftest$ac_exeext"'
23652   { (eval echo "$as_me:23652: \"$ac_try\"") >&5
23653   (eval $ac_try) 2>&5
23654   ac_status=$?
23655   echo "$as_me:23655: \$? = $ac_status" >&5
23656   (exit "$ac_status"); }; }; then
23657   cf_cv_pointer_va_list=yes
23658 else
23659   echo "$as_me: failed program was:" >&5
23660 cat "conftest.$ac_ext" >&5
23661 cf_cv_pointer_va_list=no
23662 fi
23663 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23664 fi
23665 echo "$as_me:23665: result: $cf_cv_pointer_va_list" >&5
23666 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23667
23668         if test "$cf_cv_pointer_va_list" = no
23669         then
23670                 echo "$as_me:23670: checking if we can copy va_list indirectly" >&5
23671 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23672 if test "${cf_cv_array_va_list+set}" = set; then
23673   echo $ECHO_N "(cached) $ECHO_C" >&6
23674 else
23675
23676 cat >"conftest.$ac_ext" <<_ACEOF
23677 #line 23677 "configure"
23678 #include "confdefs.h"
23679
23680 #include <stdarg.h>
23681
23682 int
23683 main (void)
23684 {
23685
23686         va_list dst;
23687         va_list src;
23688         *dst = *src
23689   ;
23690   return 0;
23691 }
23692 _ACEOF
23693 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23694 if { (eval echo "$as_me:23694: \"$ac_link\"") >&5
23695   (eval $ac_link) 2>&5
23696   ac_status=$?
23697   echo "$as_me:23697: \$? = $ac_status" >&5
23698   (exit "$ac_status"); } &&
23699          { ac_try='test -s "conftest$ac_exeext"'
23700   { (eval echo "$as_me:23700: \"$ac_try\"") >&5
23701   (eval $ac_try) 2>&5
23702   ac_status=$?
23703   echo "$as_me:23703: \$? = $ac_status" >&5
23704   (exit "$ac_status"); }; }; then
23705   cf_cv_array_va_list=yes
23706 else
23707   echo "$as_me: failed program was:" >&5
23708 cat "conftest.$ac_ext" >&5
23709 cf_cv_array_va_list=no
23710 fi
23711 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23712 fi
23713 echo "$as_me:23713: result: $cf_cv_array_va_list" >&5
23714 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23715                 test "$cf_cv_array_va_list" = yes &&
23716 cat >>confdefs.h <<\EOF
23717 #define ARRAY_VA_LIST 1
23718 EOF
23719
23720         fi
23721         ;;
23722 esac
23723
23724 echo "$as_me:23724: checking for pid_t" >&5
23725 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23726 if test "${ac_cv_type_pid_t+set}" = set; then
23727   echo $ECHO_N "(cached) $ECHO_C" >&6
23728 else
23729   cat >"conftest.$ac_ext" <<_ACEOF
23730 #line 23730 "configure"
23731 #include "confdefs.h"
23732 $ac_includes_default
23733 int
23734 main (void)
23735 {
23736 if ((pid_t *) 0)
23737   return 0;
23738 if (sizeof (pid_t))
23739   return 0;
23740   ;
23741   return 0;
23742 }
23743 _ACEOF
23744 rm -f "conftest.$ac_objext"
23745 if { (eval echo "$as_me:23745: \"$ac_compile\"") >&5
23746   (eval $ac_compile) 2>&5
23747   ac_status=$?
23748   echo "$as_me:23748: \$? = $ac_status" >&5
23749   (exit "$ac_status"); } &&
23750          { ac_try='test -s "conftest.$ac_objext"'
23751   { (eval echo "$as_me:23751: \"$ac_try\"") >&5
23752   (eval $ac_try) 2>&5
23753   ac_status=$?
23754   echo "$as_me:23754: \$? = $ac_status" >&5
23755   (exit "$ac_status"); }; }; then
23756   ac_cv_type_pid_t=yes
23757 else
23758   echo "$as_me: failed program was:" >&5
23759 cat "conftest.$ac_ext" >&5
23760 ac_cv_type_pid_t=no
23761 fi
23762 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23763 fi
23764 echo "$as_me:23764: result: $ac_cv_type_pid_t" >&5
23765 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23766 if test "$ac_cv_type_pid_t" = yes; then
23767   :
23768 else
23769
23770 cat >>confdefs.h <<EOF
23771 #define pid_t int
23772 EOF
23773
23774 fi
23775
23776 for ac_header in unistd.h vfork.h
23777 do
23778 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23779 echo "$as_me:23779: checking for $ac_header" >&5
23780 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23781 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23782   echo $ECHO_N "(cached) $ECHO_C" >&6
23783 else
23784   cat >"conftest.$ac_ext" <<_ACEOF
23785 #line 23785 "configure"
23786 #include "confdefs.h"
23787 #include <$ac_header>
23788 _ACEOF
23789 if { (eval echo "$as_me:23789: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23790   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23791   ac_status=$?
23792   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23793   rm -f conftest.er1
23794   cat conftest.err >&5
23795   echo "$as_me:23795: \$? = $ac_status" >&5
23796   (exit "$ac_status"); } >/dev/null; then
23797   if test -s conftest.err; then
23798     ac_cpp_err=$ac_c_preproc_warn_flag
23799   else
23800     ac_cpp_err=
23801   fi
23802 else
23803   ac_cpp_err=yes
23804 fi
23805 if test -z "$ac_cpp_err"; then
23806   eval "$as_ac_Header=yes"
23807 else
23808   echo "$as_me: failed program was:" >&5
23809   cat "conftest.$ac_ext" >&5
23810   eval "$as_ac_Header=no"
23811 fi
23812 rm -f conftest.err "conftest.$ac_ext"
23813 fi
23814 echo "$as_me:23814: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23815 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23816 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23817   cat >>confdefs.h <<EOF
23818 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23819 EOF
23820
23821 fi
23822 done
23823
23824 for ac_func in fork vfork
23825 do
23826 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23827 echo "$as_me:23827: checking for $ac_func" >&5
23828 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23829 if eval "test \"\${$as_ac_var+set}\" = set"; then
23830   echo $ECHO_N "(cached) $ECHO_C" >&6
23831 else
23832   cat >"conftest.$ac_ext" <<_ACEOF
23833 #line 23833 "configure"
23834 #include "confdefs.h"
23835 #define $ac_func autoconf_temporary
23836 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23837 #undef $ac_func
23838
23839 #ifdef __cplusplus
23840 extern "C"
23841 #endif
23842
23843 /* We use char because int might match the return type of a gcc2
23844    builtin and then its argument prototype would still apply.  */
23845 char $ac_func (void);
23846
23847 int
23848 main (void)
23849 {
23850
23851 /* The GNU C library defines stubs for functions which it implements
23852     to always fail with ENOSYS.  Some functions are actually named
23853     something starting with __ and the normal name is an alias.  */
23854 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23855 #error found stub for $ac_func
23856 #endif
23857
23858         return $ac_func ();
23859   ;
23860   return 0;
23861 }
23862 _ACEOF
23863 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23864 if { (eval echo "$as_me:23864: \"$ac_link\"") >&5
23865   (eval $ac_link) 2>&5
23866   ac_status=$?
23867   echo "$as_me:23867: \$? = $ac_status" >&5
23868   (exit "$ac_status"); } &&
23869          { ac_try='test -s "conftest$ac_exeext"'
23870   { (eval echo "$as_me:23870: \"$ac_try\"") >&5
23871   (eval $ac_try) 2>&5
23872   ac_status=$?
23873   echo "$as_me:23873: \$? = $ac_status" >&5
23874   (exit "$ac_status"); }; }; then
23875   eval "$as_ac_var=yes"
23876 else
23877   echo "$as_me: failed program was:" >&5
23878 cat "conftest.$ac_ext" >&5
23879 eval "$as_ac_var=no"
23880 fi
23881 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23882 fi
23883 echo "$as_me:23883: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23884 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23885 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23886   cat >>confdefs.h <<EOF
23887 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23888 EOF
23889
23890 fi
23891 done
23892
23893 ac_cv_func_fork_works=$ac_cv_func_fork
23894 if test "x$ac_cv_func_fork" = xyes; then
23895   echo "$as_me:23895: checking for working fork" >&5
23896 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23897 if test "${ac_cv_func_fork_works+set}" = set; then
23898   echo $ECHO_N "(cached) $ECHO_C" >&6
23899 else
23900   if test "$cross_compiling" = yes; then
23901   ac_cv_func_fork_works=cross
23902 else
23903   cat >"conftest.$ac_ext" <<_ACEOF
23904 /* By Rüdiger Kuhlmann. */
23905       #include <sys/types.h>
23906       #if HAVE_UNISTD_H
23907       # include <unistd.h>
23908       #endif
23909       /* Some systems only have a dummy stub for fork() */
23910       int main (void)
23911       {
23912         if (fork() < 0)
23913           $ac_main_return (1);
23914         $ac_main_return (0);
23915       }
23916 _ACEOF
23917 rm -f "conftest$ac_exeext"
23918 if { (eval echo "$as_me:23918: \"$ac_link\"") >&5
23919   (eval $ac_link) 2>&5
23920   ac_status=$?
23921   echo "$as_me:23921: \$? = $ac_status" >&5
23922   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23923   { (eval echo "$as_me:23923: \"$ac_try\"") >&5
23924   (eval $ac_try) 2>&5
23925   ac_status=$?
23926   echo "$as_me:23926: \$? = $ac_status" >&5
23927   (exit "$ac_status"); }; }; then
23928   ac_cv_func_fork_works=yes
23929 else
23930   echo "$as_me: program exited with status $ac_status" >&5
23931 echo "$as_me: failed program was:" >&5
23932 cat "conftest.$ac_ext" >&5
23933 ac_cv_func_fork_works=no
23934 fi
23935 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23936 fi
23937 fi
23938 echo "$as_me:23938: result: $ac_cv_func_fork_works" >&5
23939 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23940
23941 fi
23942 if test "x$ac_cv_func_fork_works" = xcross; then
23943   case $host in
23944     *-*-amigaos* | *-*-msdosdjgpp*)
23945       # Override, as these systems have only a dummy fork() stub
23946       ac_cv_func_fork_works=no
23947       ;;
23948     *)
23949       ac_cv_func_fork_works=yes
23950       ;;
23951   esac
23952   { echo "$as_me:23952: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23953 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23954 fi
23955 ac_cv_func_vfork_works=$ac_cv_func_vfork
23956 if test "x$ac_cv_func_vfork" = xyes; then
23957   echo "$as_me:23957: checking for working vfork" >&5
23958 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23959 if test "${ac_cv_func_vfork_works+set}" = set; then
23960   echo $ECHO_N "(cached) $ECHO_C" >&6
23961 else
23962   if test "$cross_compiling" = yes; then
23963   ac_cv_func_vfork_works=cross
23964 else
23965   cat >"conftest.$ac_ext" <<_ACEOF
23966 #line 23966 "configure"
23967 #include "confdefs.h"
23968 /* Thanks to Paul Eggert for this test.  */
23969 #include <stdio.h>
23970 #include <sys/types.h>
23971 #include <sys/stat.h>
23972 #if HAVE_UNISTD_H
23973 # include <unistd.h>
23974 #endif
23975 #if HAVE_VFORK_H
23976 # include <vfork.h>
23977 #endif
23978 /* On some sparc systems, changes by the child to local and incoming
23979    argument registers are propagated back to the parent.  The compiler
23980    is told about this with #include <vfork.h>, but some compilers
23981    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23982    static variable whose address is put into a register that is
23983    clobbered by the vfork.  */
23984 static
23985 #ifdef __cplusplus
23986 sparc_address_test (int arg)
23987 # else
23988 sparc_address_test (arg) int arg;
23989 #endif
23990 {
23991   static pid_t child;
23992   if (!child) {
23993     child = vfork ();
23994     if (child < 0) {
23995       perror ("vfork");
23996       _exit(2);
23997     }
23998     if (!child) {
23999       arg = getpid();
24000       write(-1, "", 0);
24001       _exit (arg);
24002     }
24003   }
24004 }
24005
24006 int
24007 main (void)
24008 {
24009   pid_t parent = getpid ();
24010   pid_t child;
24011
24012   sparc_address_test ();
24013
24014   child = vfork ();
24015
24016   if (child == 0) {
24017     /* Here is another test for sparc vfork register problems.  This
24018        test uses lots of local variables, at least as many local
24019        variables as main has allocated so far including compiler
24020        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24021        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24022        reuse the register of parent for one of the local variables,
24023        since it will think that parent can't possibly be used any more
24024        in this routine.  Assigning to the local variable will thus
24025        munge parent in the parent process.  */
24026     pid_t
24027       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24028       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24029     /* Convince the compiler that p..p7 are live; otherwise, it might
24030        use the same hardware register for all 8 local variables.  */
24031     if (p != p1 || p != p2 || p != p3 || p != p4
24032         || p != p5 || p != p6 || p != p7)
24033       _exit(1);
24034
24035     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24036        from child file descriptors.  If the child closes a descriptor
24037        before it execs or exits, this munges the parent's descriptor
24038        as well.  Test for this by closing stdout in the child.  */
24039     _exit(close(fileno(stdout)) != 0);
24040   } else {
24041     int status;
24042     struct stat st;
24043
24044     while (wait(&status) != child)
24045       ;
24046     $ac_main_return(
24047          /* Was there some problem with vforking?  */
24048          child < 0
24049
24050          /* Did the child fail?  (This shouldn't happen.)  */
24051          || status
24052
24053          /* Did the vfork/compiler bug occur?  */
24054          || parent != getpid()
24055
24056          /* Did the file descriptor bug occur?  */
24057          || fstat(fileno(stdout), &st) != 0
24058          );
24059   }
24060 }
24061 _ACEOF
24062 rm -f "conftest$ac_exeext"
24063 if { (eval echo "$as_me:24063: \"$ac_link\"") >&5
24064   (eval $ac_link) 2>&5
24065   ac_status=$?
24066   echo "$as_me:24066: \$? = $ac_status" >&5
24067   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24068   { (eval echo "$as_me:24068: \"$ac_try\"") >&5
24069   (eval $ac_try) 2>&5
24070   ac_status=$?
24071   echo "$as_me:24071: \$? = $ac_status" >&5
24072   (exit "$ac_status"); }; }; then
24073   ac_cv_func_vfork_works=yes
24074 else
24075   echo "$as_me: program exited with status $ac_status" >&5
24076 echo "$as_me: failed program was:" >&5
24077 cat "conftest.$ac_ext" >&5
24078 ac_cv_func_vfork_works=no
24079 fi
24080 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24081 fi
24082 fi
24083 echo "$as_me:24083: result: $ac_cv_func_vfork_works" >&5
24084 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24085
24086 fi;
24087 if test "x$ac_cv_func_fork_works" = xcross; then
24088   ac_cv_func_vfork_works=ac_cv_func_vfork
24089   { echo "$as_me:24089: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24090 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24091 fi
24092
24093 if test "x$ac_cv_func_vfork_works" = xyes; then
24094
24095 cat >>confdefs.h <<\EOF
24096 #define HAVE_WORKING_VFORK 1
24097 EOF
24098
24099 else
24100
24101 cat >>confdefs.h <<\EOF
24102 #define vfork fork
24103 EOF
24104
24105 fi
24106 if test "x$ac_cv_func_fork_works" = xyes; then
24107
24108 cat >>confdefs.h <<\EOF
24109 #define HAVE_WORKING_FORK 1
24110 EOF
24111
24112 fi
24113
24114 echo "$as_me:24114: checking if fopen accepts explicit binary mode" >&5
24115 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24116 if test "${cf_cv_fopen_bin_r+set}" = set; then
24117   echo $ECHO_N "(cached) $ECHO_C" >&6
24118 else
24119
24120         if test "$cross_compiling" = yes; then
24121   cf_cv_fopen_bin_r=unknown
24122 else
24123   cat >"conftest.$ac_ext" <<_ACEOF
24124 #line 24124 "configure"
24125 #include "confdefs.h"
24126
24127 $ac_includes_default
24128
24129 int main(void)
24130 {
24131         FILE *fp = fopen("conftest.tmp", "wb");
24132         int rc = 0;
24133         if (fp != 0) {
24134                 int p, q;
24135                 for (p = 0; p < 256; ++p) {
24136                         fputc(p, fp);
24137                 }
24138                 fclose(fp);
24139                 fp = fopen("conftest.tmp", "rb");
24140                 if (fp != 0) {
24141                         for (p = 0; p < 256; ++p) {
24142                                 q = fgetc(fp);
24143                                 if (q != p) {
24144                                         rc = 1;
24145                                         break;
24146                                 }
24147                         }
24148                 } else {
24149                         rc = 1;
24150                 }
24151         } else {
24152                 rc = 1;
24153         }
24154         ${cf_cv_main_return:-return} (rc);
24155 }
24156
24157 _ACEOF
24158 rm -f "conftest$ac_exeext"
24159 if { (eval echo "$as_me:24159: \"$ac_link\"") >&5
24160   (eval $ac_link) 2>&5
24161   ac_status=$?
24162   echo "$as_me:24162: \$? = $ac_status" >&5
24163   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24164   { (eval echo "$as_me:24164: \"$ac_try\"") >&5
24165   (eval $ac_try) 2>&5
24166   ac_status=$?
24167   echo "$as_me:24167: \$? = $ac_status" >&5
24168   (exit "$ac_status"); }; }; then
24169   cf_cv_fopen_bin_r=yes
24170 else
24171   echo "$as_me: program exited with status $ac_status" >&5
24172 echo "$as_me: failed program was:" >&5
24173 cat "conftest.$ac_ext" >&5
24174 cf_cv_fopen_bin_r=no
24175 fi
24176 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24177 fi
24178
24179 fi
24180 echo "$as_me:24180: result: $cf_cv_fopen_bin_r" >&5
24181 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24182 test "x$cf_cv_fopen_bin_r" != xno &&
24183 cat >>confdefs.h <<\EOF
24184 #define USE_FOPEN_BIN_R 1
24185 EOF
24186
24187 # special check for test/ditto.c
24188
24189 echo "$as_me:24189: checking for openpty in -lutil" >&5
24190 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24191 if test "${ac_cv_lib_util_openpty+set}" = set; then
24192   echo $ECHO_N "(cached) $ECHO_C" >&6
24193 else
24194   ac_check_lib_save_LIBS=$LIBS
24195 LIBS="-lutil  $LIBS"
24196 cat >"conftest.$ac_ext" <<_ACEOF
24197 #line 24197 "configure"
24198 #include "confdefs.h"
24199
24200 /* Override any gcc2 internal prototype to avoid an error.  */
24201 #ifdef __cplusplus
24202 extern "C"
24203 #endif
24204 /* We use char because int might match the return type of a gcc2
24205    builtin and then its argument prototype would still apply.  */
24206 char openpty ();
24207 int
24208 main (void)
24209 {
24210 openpty ();
24211   ;
24212   return 0;
24213 }
24214 _ACEOF
24215 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24216 if { (eval echo "$as_me:24216: \"$ac_link\"") >&5
24217   (eval $ac_link) 2>&5
24218   ac_status=$?
24219   echo "$as_me:24219: \$? = $ac_status" >&5
24220   (exit "$ac_status"); } &&
24221          { ac_try='test -s "conftest$ac_exeext"'
24222   { (eval echo "$as_me:24222: \"$ac_try\"") >&5
24223   (eval $ac_try) 2>&5
24224   ac_status=$?
24225   echo "$as_me:24225: \$? = $ac_status" >&5
24226   (exit "$ac_status"); }; }; then
24227   ac_cv_lib_util_openpty=yes
24228 else
24229   echo "$as_me: failed program was:" >&5
24230 cat "conftest.$ac_ext" >&5
24231 ac_cv_lib_util_openpty=no
24232 fi
24233 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24234 LIBS=$ac_check_lib_save_LIBS
24235 fi
24236 echo "$as_me:24236: result: $ac_cv_lib_util_openpty" >&5
24237 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24238 if test "$ac_cv_lib_util_openpty" = yes; then
24239   cf_cv_lib_util=yes
24240 else
24241   cf_cv_lib_util=no
24242 fi
24243
24244 echo "$as_me:24244: checking for openpty header" >&5
24245 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24246 if test "${cf_cv_func_openpty+set}" = set; then
24247   echo $ECHO_N "(cached) $ECHO_C" >&6
24248 else
24249
24250         cf_save_LIBS="$LIBS"
24251         test "$cf_cv_lib_util" = yes && {
24252 cf_add_libs="$LIBS"
24253 # reverse order
24254 cf_add_0lib=
24255 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24256 # filter duplicates
24257 for cf_add_1lib in $cf_add_0lib; do
24258         for cf_add_2lib in $cf_add_libs; do
24259                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24260                         cf_add_1lib=
24261                         break
24262                 fi
24263         done
24264         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24265 done
24266 LIBS="$cf_add_libs"
24267  }
24268         for cf_header in pty.h libutil.h util.h
24269         do
24270         cat >"conftest.$ac_ext" <<_ACEOF
24271 #line 24271 "configure"
24272 #include "confdefs.h"
24273
24274 #include <$cf_header>
24275
24276 int
24277 main (void)
24278 {
24279
24280         int x = openpty((int *)0, (int *)0, (char *)0,
24281                                    (struct termios *)0, (struct winsize *)0);
24282
24283   ;
24284   return 0;
24285 }
24286 _ACEOF
24287 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24288 if { (eval echo "$as_me:24288: \"$ac_link\"") >&5
24289   (eval $ac_link) 2>&5
24290   ac_status=$?
24291   echo "$as_me:24291: \$? = $ac_status" >&5
24292   (exit "$ac_status"); } &&
24293          { ac_try='test -s "conftest$ac_exeext"'
24294   { (eval echo "$as_me:24294: \"$ac_try\"") >&5
24295   (eval $ac_try) 2>&5
24296   ac_status=$?
24297   echo "$as_me:24297: \$? = $ac_status" >&5
24298   (exit "$ac_status"); }; }; then
24299
24300                 cf_cv_func_openpty=$cf_header
24301                 break
24302
24303 else
24304   echo "$as_me: failed program was:" >&5
24305 cat "conftest.$ac_ext" >&5
24306
24307                 cf_cv_func_openpty=no
24308
24309 fi
24310 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24311         done
24312         LIBS="$cf_save_LIBS"
24313
24314 fi
24315 echo "$as_me:24315: result: $cf_cv_func_openpty" >&5
24316 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24317
24318 if test "$cf_cv_func_openpty" != no ; then
24319
24320 cat >>confdefs.h <<EOF
24321 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24322 EOF
24323
24324 cat >>confdefs.h <<\EOF
24325 #define USE_XTERM_PTY 1
24326 EOF
24327
24328         if test "x$cf_cv_lib_util" = xyes ; then
24329
24330 cf_add_libs="$TEST_LIBS"
24331 # reverse order
24332 cf_add_0lib=
24333 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24334 # filter duplicates
24335 for cf_add_1lib in $cf_add_0lib; do
24336         for cf_add_2lib in $cf_add_libs; do
24337                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24338                         cf_add_1lib=
24339                         break
24340                 fi
24341         done
24342         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24343 done
24344 TEST_LIBS="$cf_add_libs"
24345
24346         fi
24347 fi
24348
24349 if test "$with_hashed_db" != no ; then
24350
24351 cat >>confdefs.h <<\EOF
24352 #define USE_HASHED_DB 1
24353 EOF
24354
24355 case $with_hashed_db in
24356 (yes|*able*)
24357         ;;
24358 (*)
24359         if test -d "$with_hashed_db" ; then
24360
24361 if test -n "$with_hashed_db/include" ; then
24362   for cf_add_incdir in $with_hashed_db/include
24363   do
24364         while test "$cf_add_incdir" != /usr/include
24365         do
24366           if test -d "$cf_add_incdir"
24367           then
24368                 cf_have_incdir=no
24369                 if test -n "$CFLAGS$CPPFLAGS" ; then
24370                   # a loop is needed to ensure we can add subdirs of existing dirs
24371                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24372                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24373                           cf_have_incdir=yes; break
24374                         fi
24375                   done
24376                 fi
24377
24378                 if test "$cf_have_incdir" = no ; then
24379                   if test "$cf_add_incdir" = /usr/local/include ; then
24380                         if test "$GCC" = yes
24381                         then
24382                           cf_save_CPPFLAGS=$CPPFLAGS
24383
24384         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24385         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24386
24387                           cat >"conftest.$ac_ext" <<_ACEOF
24388 #line 24388 "configure"
24389 #include "confdefs.h"
24390 #include <stdio.h>
24391 int
24392 main (void)
24393 {
24394 printf("Hello")
24395   ;
24396   return 0;
24397 }
24398 _ACEOF
24399 rm -f "conftest.$ac_objext"
24400 if { (eval echo "$as_me:24400: \"$ac_compile\"") >&5
24401   (eval $ac_compile) 2>&5
24402   ac_status=$?
24403   echo "$as_me:24403: \$? = $ac_status" >&5
24404   (exit "$ac_status"); } &&
24405          { ac_try='test -s "conftest.$ac_objext"'
24406   { (eval echo "$as_me:24406: \"$ac_try\"") >&5
24407   (eval $ac_try) 2>&5
24408   ac_status=$?
24409   echo "$as_me:24409: \$? = $ac_status" >&5
24410   (exit "$ac_status"); }; }; then
24411   :
24412 else
24413   echo "$as_me: failed program was:" >&5
24414 cat "conftest.$ac_ext" >&5
24415 cf_have_incdir=yes
24416 fi
24417 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24418                           CPPFLAGS=$cf_save_CPPFLAGS
24419                         fi
24420                   fi
24421                 fi
24422
24423                 if test "$cf_have_incdir" = no ; then
24424                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24425
24426 echo "${as_me:-configure}:24426: testing adding $cf_add_incdir to include-path ..." 1>&5
24427
24428                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24429
24430                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24431                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24432                   cf_add_incdir="$cf_top_incdir"
24433                 else
24434                   break
24435                 fi
24436           else
24437                 break
24438           fi
24439         done
24440   done
24441 fi
24442
24443 if test -n "$with_hashed_db/lib" ; then
24444         for cf_add_libdir in $with_hashed_db/lib
24445         do
24446                 if test "$cf_add_libdir" = /usr/lib ; then
24447                         :
24448                 elif test -d "$cf_add_libdir"
24449                 then
24450                         cf_have_libdir=no
24451                         if test -n "$LDFLAGS$LIBS" ; then
24452                                 # a loop is needed to ensure we can add subdirs of existing dirs
24453                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24454                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24455                                                 cf_have_libdir=yes; break
24456                                         fi
24457                                 done
24458                         fi
24459                         if test "$cf_have_libdir" = no ; then
24460                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24461
24462 echo "${as_me:-configure}:24462: testing adding $cf_add_libdir to library-path ..." 1>&5
24463
24464                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24465                         fi
24466                 fi
24467         done
24468 fi
24469
24470         else
24471                 case "$with_hashed_db" in
24472                 (./*|../*|/*)
24473                         { echo "$as_me:24473: WARNING: no such directory $with_hashed_db" >&5
24474 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24475                         ;;
24476                 (*)
24477
24478 cf_search=
24479
24480 test "x$prefix" != "xNONE" && \
24481 test -d "$prefix" && \
24482  {
24483         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24484         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24485         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24486         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24487         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24488         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24489 }
24490
24491 for cf_subdir_prefix in \
24492         /usr \
24493         /usr/local \
24494         /usr/pkg \
24495         /opt \
24496         /opt/local \
24497         $HOME
24498 do
24499
24500 test "x$cf_subdir_prefix" != "x$prefix" && \
24501 test -d "$cf_subdir_prefix" && \
24502 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24503         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24504         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24505         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24506         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24507         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24508         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"
24509 }
24510
24511 done
24512
24513         for cf_item in $cf_search
24514         do
24515                 case "$cf_item" in
24516                 (*/$with_hashed_db)
24517
24518 if test -n "$cf_item" ; then
24519   for cf_add_incdir in $cf_item
24520   do
24521         while test "$cf_add_incdir" != /usr/include
24522         do
24523           if test -d "$cf_add_incdir"
24524           then
24525                 cf_have_incdir=no
24526                 if test -n "$CFLAGS$CPPFLAGS" ; then
24527                   # a loop is needed to ensure we can add subdirs of existing dirs
24528                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24529                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24530                           cf_have_incdir=yes; break
24531                         fi
24532                   done
24533                 fi
24534
24535                 if test "$cf_have_incdir" = no ; then
24536                   if test "$cf_add_incdir" = /usr/local/include ; then
24537                         if test "$GCC" = yes
24538                         then
24539                           cf_save_CPPFLAGS=$CPPFLAGS
24540
24541         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24542         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24543
24544                           cat >"conftest.$ac_ext" <<_ACEOF
24545 #line 24545 "configure"
24546 #include "confdefs.h"
24547 #include <stdio.h>
24548 int
24549 main (void)
24550 {
24551 printf("Hello")
24552   ;
24553   return 0;
24554 }
24555 _ACEOF
24556 rm -f "conftest.$ac_objext"
24557 if { (eval echo "$as_me:24557: \"$ac_compile\"") >&5
24558   (eval $ac_compile) 2>&5
24559   ac_status=$?
24560   echo "$as_me:24560: \$? = $ac_status" >&5
24561   (exit "$ac_status"); } &&
24562          { ac_try='test -s "conftest.$ac_objext"'
24563   { (eval echo "$as_me:24563: \"$ac_try\"") >&5
24564   (eval $ac_try) 2>&5
24565   ac_status=$?
24566   echo "$as_me:24566: \$? = $ac_status" >&5
24567   (exit "$ac_status"); }; }; then
24568   :
24569 else
24570   echo "$as_me: failed program was:" >&5
24571 cat "conftest.$ac_ext" >&5
24572 cf_have_incdir=yes
24573 fi
24574 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24575                           CPPFLAGS=$cf_save_CPPFLAGS
24576                         fi
24577                   fi
24578                 fi
24579
24580                 if test "$cf_have_incdir" = no ; then
24581                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24582
24583 echo "${as_me:-configure}:24583: testing adding $cf_add_incdir to include-path ..." 1>&5
24584
24585                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24586
24587                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24588                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24589                   cf_add_incdir="$cf_top_incdir"
24590                 else
24591                   break
24592                 fi
24593           else
24594                 break
24595           fi
24596         done
24597   done
24598 fi
24599
24600                         ;;
24601                 esac
24602         done
24603
24604 cf_search=
24605
24606 test "x$prefix" != "xNONE" && \
24607 test -d "$prefix" && \
24608  {
24609         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24610         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24611         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24612         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24613         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24614         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24615 }
24616
24617 for cf_subdir_prefix in \
24618         /usr \
24619         /usr/local \
24620         /usr/pkg \
24621         /opt \
24622         /opt/local \
24623         $HOME
24624 do
24625
24626 test "x$cf_subdir_prefix" != "x$prefix" && \
24627 test -d "$cf_subdir_prefix" && \
24628 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24629         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24630         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24631         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24632         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24633         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24634         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"
24635 }
24636
24637 done
24638
24639         for cf_item in $cf_search
24640         do
24641                 case "$cf_item" in
24642                 (*/$with_hashed_db)
24643
24644 if test -n "$cf_item" ; then
24645         for cf_add_libdir in $cf_item
24646         do
24647                 if test "$cf_add_libdir" = /usr/lib ; then
24648                         :
24649                 elif test -d "$cf_add_libdir"
24650                 then
24651                         cf_have_libdir=no
24652                         if test -n "$LDFLAGS$LIBS" ; then
24653                                 # a loop is needed to ensure we can add subdirs of existing dirs
24654                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24655                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24656                                                 cf_have_libdir=yes; break
24657                                         fi
24658                                 done
24659                         fi
24660                         if test "$cf_have_libdir" = no ; then
24661                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24662
24663 echo "${as_me:-configure}:24663: testing adding $cf_add_libdir to library-path ..." 1>&5
24664
24665                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24666                         fi
24667                 fi
24668         done
24669 fi
24670
24671                         ;;
24672                 esac
24673         done
24674
24675                         ;;
24676                 esac
24677         fi
24678 esac
24679
24680 echo "$as_me:24680: checking for db.h" >&5
24681 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24682 if test "${ac_cv_header_db_h+set}" = set; then
24683   echo $ECHO_N "(cached) $ECHO_C" >&6
24684 else
24685   cat >"conftest.$ac_ext" <<_ACEOF
24686 #line 24686 "configure"
24687 #include "confdefs.h"
24688 #include <db.h>
24689 _ACEOF
24690 if { (eval echo "$as_me:24690: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24691   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24692   ac_status=$?
24693   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24694   rm -f conftest.er1
24695   cat conftest.err >&5
24696   echo "$as_me:24696: \$? = $ac_status" >&5
24697   (exit "$ac_status"); } >/dev/null; then
24698   if test -s conftest.err; then
24699     ac_cpp_err=$ac_c_preproc_warn_flag
24700   else
24701     ac_cpp_err=
24702   fi
24703 else
24704   ac_cpp_err=yes
24705 fi
24706 if test -z "$ac_cpp_err"; then
24707   ac_cv_header_db_h=yes
24708 else
24709   echo "$as_me: failed program was:" >&5
24710   cat "conftest.$ac_ext" >&5
24711   ac_cv_header_db_h=no
24712 fi
24713 rm -f conftest.err "conftest.$ac_ext"
24714 fi
24715 echo "$as_me:24715: result: $ac_cv_header_db_h" >&5
24716 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24717 if test "$ac_cv_header_db_h" = yes; then
24718
24719 echo "$as_me:24719: checking for version of db" >&5
24720 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24721 if test "${cf_cv_hashed_db_version+set}" = set; then
24722   echo $ECHO_N "(cached) $ECHO_C" >&6
24723 else
24724
24725 cf_cv_hashed_db_version=unknown
24726
24727 for cf_db_version in 1 2 3 4 5 6
24728 do
24729
24730 echo "${as_me:-configure}:24730: testing checking for db version $cf_db_version ..." 1>&5
24731
24732         cat >"conftest.$ac_ext" <<_ACEOF
24733 #line 24733 "configure"
24734 #include "confdefs.h"
24735
24736 $ac_includes_default
24737 #include <db.h>
24738
24739 #ifdef DB_VERSION_MAJOR
24740         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24741 #if $cf_db_version == DB_VERSION_MAJOR
24742         /* ok */
24743 #else
24744         #error $cf_db_version is not DB_VERSION_MAJOR
24745 #endif
24746 #else
24747 #if $cf_db_version == 1
24748         /* ok: assuming this is DB 1.8.5 */
24749 #else
24750         #error $cf_db_version is not 1
24751 #endif
24752 #endif
24753
24754 int
24755 main (void)
24756 {
24757 DBT *foo = 0
24758   ;
24759   return 0;
24760 }
24761 _ACEOF
24762 rm -f "conftest.$ac_objext"
24763 if { (eval echo "$as_me:24763: \"$ac_compile\"") >&5
24764   (eval $ac_compile) 2>&5
24765   ac_status=$?
24766   echo "$as_me:24766: \$? = $ac_status" >&5
24767   (exit "$ac_status"); } &&
24768          { ac_try='test -s "conftest.$ac_objext"'
24769   { (eval echo "$as_me:24769: \"$ac_try\"") >&5
24770   (eval $ac_try) 2>&5
24771   ac_status=$?
24772   echo "$as_me:24772: \$? = $ac_status" >&5
24773   (exit "$ac_status"); }; }; then
24774
24775         cf_cv_hashed_db_version=$cf_db_version
24776         break
24777
24778 else
24779   echo "$as_me: failed program was:" >&5
24780 cat "conftest.$ac_ext" >&5
24781 fi
24782 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24783 done
24784
24785 fi
24786 echo "$as_me:24786: result: $cf_cv_hashed_db_version" >&5
24787 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24788
24789 if test "$cf_cv_hashed_db_version" = unknown ; then
24790         { { echo "$as_me:24790: error: Cannot determine version of db" >&5
24791 echo "$as_me: error: Cannot determine version of db" >&2;}
24792    { (exit 1); exit 1; }; }
24793 else
24794
24795 echo "$as_me:24795: checking for db libraries" >&5
24796 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24797 if test "${cf_cv_hashed_db_libs+set}" = set; then
24798   echo $ECHO_N "(cached) $ECHO_C" >&6
24799 else
24800
24801 cf_cv_hashed_db_libs=unknown
24802 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24803 do
24804         cf_save_libs="$LIBS"
24805         if test -n "$cf_db_libs"; then
24806
24807 cf_add_libs="$LIBS"
24808 # reverse order
24809 cf_add_0lib=
24810 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24811 # filter duplicates
24812 for cf_add_1lib in $cf_add_0lib; do
24813         for cf_add_2lib in $cf_add_libs; do
24814                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24815                         cf_add_1lib=
24816                         break
24817                 fi
24818         done
24819         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24820 done
24821 LIBS="$cf_add_libs"
24822
24823         fi
24824
24825 echo "${as_me:-configure}:24825: testing checking for library $cf_db_libs ..." 1>&5
24826
24827         cat >"conftest.$ac_ext" <<_ACEOF
24828 #line 24828 "configure"
24829 #include "confdefs.h"
24830
24831 $ac_includes_default
24832 #include <db.h>
24833
24834 int
24835 main (void)
24836 {
24837
24838         char *path = "/tmp/foo";
24839 #ifdef DB_VERSION_MAJOR
24840 #if DB_VERSION_MAJOR >= 4
24841         DB *result = 0;
24842         db_create(&result, NULL, 0);
24843         result->open(result,
24844                 NULL,
24845                 path,
24846                 path,
24847                 DB_HASH,
24848                 DB_CREATE,
24849                 0644);
24850 #elif DB_VERSION_MAJOR >= 3
24851         DB *result = 0;
24852         db_create(&result, NULL, 0);
24853         result->open(result,
24854                 path,
24855                 path,
24856                 DB_HASH,
24857                 DB_CREATE,
24858                 0644);
24859 #elif DB_VERSION_MAJOR >= 2
24860         DB *result = 0;
24861         db_open(path,
24862                 DB_HASH,
24863                 DB_CREATE,
24864                 0644,
24865                 (DB_ENV *) 0,
24866                 (DB_INFO *) 0,
24867                 &result);
24868 #endif /* DB_VERSION_MAJOR */
24869 #else
24870         DB *result = dbopen(path,
24871                      2,
24872                      0644,
24873                      DB_HASH,
24874                      0);
24875 #endif
24876         ${cf_cv_main_return:-return}(result != 0)
24877
24878   ;
24879   return 0;
24880 }
24881 _ACEOF
24882 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24883 if { (eval echo "$as_me:24883: \"$ac_link\"") >&5
24884   (eval $ac_link) 2>&5
24885   ac_status=$?
24886   echo "$as_me:24886: \$? = $ac_status" >&5
24887   (exit "$ac_status"); } &&
24888          { ac_try='test -s "conftest$ac_exeext"'
24889   { (eval echo "$as_me:24889: \"$ac_try\"") >&5
24890   (eval $ac_try) 2>&5
24891   ac_status=$?
24892   echo "$as_me:24892: \$? = $ac_status" >&5
24893   (exit "$ac_status"); }; }; then
24894
24895         if test -n "$cf_db_libs" ; then
24896                 cf_cv_hashed_db_libs=$cf_db_libs
24897         else
24898                 cf_cv_hashed_db_libs=default
24899         fi
24900         LIBS="$cf_save_libs"
24901         break
24902
24903 else
24904   echo "$as_me: failed program was:" >&5
24905 cat "conftest.$ac_ext" >&5
24906 fi
24907 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24908         LIBS="$cf_save_libs"
24909 done
24910
24911 fi
24912 echo "$as_me:24912: result: $cf_cv_hashed_db_libs" >&5
24913 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24914
24915         if test "$cf_cv_hashed_db_libs" = unknown ; then
24916                 { { echo "$as_me:24916: error: Cannot determine library for db" >&5
24917 echo "$as_me: error: Cannot determine library for db" >&2;}
24918    { (exit 1); exit 1; }; }
24919         elif test "$cf_cv_hashed_db_libs" != default ; then
24920
24921 cf_add_libs="$LIBS"
24922 # reverse order
24923 cf_add_0lib=
24924 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24925 # filter duplicates
24926 for cf_add_1lib in $cf_add_0lib; do
24927         for cf_add_2lib in $cf_add_libs; do
24928                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24929                         cf_add_1lib=
24930                         break
24931                 fi
24932         done
24933         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24934 done
24935 LIBS="$cf_add_libs"
24936
24937         fi
24938 fi
24939
24940 else
24941
24942         { { echo "$as_me:24942: error: Cannot find db.h" >&5
24943 echo "$as_me: error: Cannot find db.h" >&2;}
24944    { (exit 1); exit 1; }; }
24945
24946 fi
24947
24948 fi
24949
24950 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24951         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24952         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24953 fi
24954
24955 # Just in case, check if the C compiler has a bool type.
24956
24957 echo "$as_me:24957: checking if we should include stdbool.h" >&5
24958 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24959
24960 if test "${cf_cv_header_stdbool_h+set}" = set; then
24961   echo $ECHO_N "(cached) $ECHO_C" >&6
24962 else
24963
24964         cat >"conftest.$ac_ext" <<_ACEOF
24965 #line 24965 "configure"
24966 #include "confdefs.h"
24967
24968 int
24969 main (void)
24970 {
24971 bool foo = false
24972   ;
24973   return 0;
24974 }
24975 _ACEOF
24976 rm -f "conftest.$ac_objext"
24977 if { (eval echo "$as_me:24977: \"$ac_compile\"") >&5
24978   (eval $ac_compile) 2>&5
24979   ac_status=$?
24980   echo "$as_me:24980: \$? = $ac_status" >&5
24981   (exit "$ac_status"); } &&
24982          { ac_try='test -s "conftest.$ac_objext"'
24983   { (eval echo "$as_me:24983: \"$ac_try\"") >&5
24984   (eval $ac_try) 2>&5
24985   ac_status=$?
24986   echo "$as_me:24986: \$? = $ac_status" >&5
24987   (exit "$ac_status"); }; }; then
24988   cf_cv_header_stdbool_h=0
24989 else
24990   echo "$as_me: failed program was:" >&5
24991 cat "conftest.$ac_ext" >&5
24992 cat >"conftest.$ac_ext" <<_ACEOF
24993 #line 24993 "configure"
24994 #include "confdefs.h"
24995
24996 #ifndef __BEOS__
24997 #include <stdbool.h>
24998 #endif
24999
25000 int
25001 main (void)
25002 {
25003 bool foo = false
25004   ;
25005   return 0;
25006 }
25007 _ACEOF
25008 rm -f "conftest.$ac_objext"
25009 if { (eval echo "$as_me:25009: \"$ac_compile\"") >&5
25010   (eval $ac_compile) 2>&5
25011   ac_status=$?
25012   echo "$as_me:25012: \$? = $ac_status" >&5
25013   (exit "$ac_status"); } &&
25014          { ac_try='test -s "conftest.$ac_objext"'
25015   { (eval echo "$as_me:25015: \"$ac_try\"") >&5
25016   (eval $ac_try) 2>&5
25017   ac_status=$?
25018   echo "$as_me:25018: \$? = $ac_status" >&5
25019   (exit "$ac_status"); }; }; then
25020   cf_cv_header_stdbool_h=1
25021 else
25022   echo "$as_me: failed program was:" >&5
25023 cat "conftest.$ac_ext" >&5
25024 cf_cv_header_stdbool_h=0
25025 fi
25026 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25027 fi
25028 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25029 fi
25030
25031 if test "$cf_cv_header_stdbool_h" = 1
25032 then    echo "$as_me:25032: result: yes" >&5
25033 echo "${ECHO_T}yes" >&6
25034 else    echo "$as_me:25034: result: no" >&5
25035 echo "${ECHO_T}no" >&6
25036 fi
25037
25038 echo "$as_me:25038: checking for builtin bool type" >&5
25039 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25040
25041 if test "${cf_cv_cc_bool_type+set}" = set; then
25042   echo $ECHO_N "(cached) $ECHO_C" >&6
25043 else
25044
25045         cat >"conftest.$ac_ext" <<_ACEOF
25046 #line 25046 "configure"
25047 #include "confdefs.h"
25048
25049 #include <stdio.h>
25050 #include <sys/types.h>
25051
25052 int
25053 main (void)
25054 {
25055 bool x = false
25056   ;
25057   return 0;
25058 }
25059 _ACEOF
25060 rm -f "conftest.$ac_objext"
25061 if { (eval echo "$as_me:25061: \"$ac_compile\"") >&5
25062   (eval $ac_compile) 2>&5
25063   ac_status=$?
25064   echo "$as_me:25064: \$? = $ac_status" >&5
25065   (exit "$ac_status"); } &&
25066          { ac_try='test -s "conftest.$ac_objext"'
25067   { (eval echo "$as_me:25067: \"$ac_try\"") >&5
25068   (eval $ac_try) 2>&5
25069   ac_status=$?
25070   echo "$as_me:25070: \$? = $ac_status" >&5
25071   (exit "$ac_status"); }; }; then
25072   cf_cv_cc_bool_type=1
25073 else
25074   echo "$as_me: failed program was:" >&5
25075 cat "conftest.$ac_ext" >&5
25076 cf_cv_cc_bool_type=0
25077 fi
25078 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25079
25080 fi
25081
25082 if test "$cf_cv_cc_bool_type" = 1
25083 then    echo "$as_me:25083: result: yes" >&5
25084 echo "${ECHO_T}yes" >&6
25085 else    echo "$as_me:25085: result: no" >&5
25086 echo "${ECHO_T}no" >&6
25087 fi
25088
25089 # Check for C++ compiler characteristics (and ensure that it's there!)
25090 if test -n "$CXX" ; then
25091         ac_ext=cc
25092 ac_cpp='$CXXCPP $CPPFLAGS'
25093 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25094 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25095 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25096 ac_main_return="return"
25097
25098 if test -n "$GXX" ; then
25099
25100         cf_save="$LIBS"
25101         LIBS="$LIBS $CXXLIBS"
25102         echo "$as_me:25102: checking if we already have C++ library" >&5
25103 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25104         cat >"conftest.$ac_ext" <<_ACEOF
25105 #line 25105 "configure"
25106 #include "confdefs.h"
25107
25108                         #include <iostream>
25109 int
25110 main (void)
25111 {
25112
25113                         std::cout << "Hello World!" << std::endl;
25114   ;
25115   return 0;
25116 }
25117 _ACEOF
25118 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25119 if { (eval echo "$as_me:25119: \"$ac_link\"") >&5
25120   (eval $ac_link) 2>&5
25121   ac_status=$?
25122   echo "$as_me:25122: \$? = $ac_status" >&5
25123   (exit "$ac_status"); } &&
25124          { ac_try='test -s "conftest$ac_exeext"'
25125   { (eval echo "$as_me:25125: \"$ac_try\"") >&5
25126   (eval $ac_try) 2>&5
25127   ac_status=$?
25128   echo "$as_me:25128: \$? = $ac_status" >&5
25129   (exit "$ac_status"); }; }; then
25130   cf_have_libstdcpp=yes
25131 else
25132   echo "$as_me: failed program was:" >&5
25133 cat "conftest.$ac_ext" >&5
25134 cf_have_libstdcpp=no
25135 fi
25136 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25137         echo "$as_me:25137: result: $cf_have_libstdcpp" >&5
25138 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25139         LIBS="$cf_save"
25140
25141         if test "$cf_have_libstdcpp" != yes
25142         then
25143                 case "$cf_cv_system_name" in
25144                 (os2*)
25145                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25146                                 cf_stdcpp_libname=stdcpp
25147                         else
25148                                 cf_stdcpp_libname=stdc++
25149                         fi
25150                         ;;
25151                 (*)
25152                         cf_stdcpp_libname=stdc++
25153                         ;;
25154                 esac
25155
25156                 echo "$as_me:25156: checking for library $cf_stdcpp_libname" >&5
25157 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25158 if test "${cf_cv_libstdcpp+set}" = set; then
25159   echo $ECHO_N "(cached) $ECHO_C" >&6
25160 else
25161
25162                         cf_save="$LIBS"
25163                         LIBS="$LIBS $CXXLIBS"
25164
25165 cf_add_libs="$LIBS"
25166 # reverse order
25167 cf_add_0lib=
25168 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25169 # filter duplicates
25170 for cf_add_1lib in $cf_add_0lib; do
25171         for cf_add_2lib in $cf_add_libs; do
25172                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25173                         cf_add_1lib=
25174                         break
25175                 fi
25176         done
25177         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25178 done
25179 LIBS="$cf_add_libs"
25180
25181                 cat >"conftest.$ac_ext" <<_ACEOF
25182 #line 25182 "configure"
25183 #include "confdefs.h"
25184
25185                                 #include <iostream>
25186 int
25187 main (void)
25188 {
25189
25190                                 std::cout << "Hello World!" << std::endl;
25191   ;
25192   return 0;
25193 }
25194 _ACEOF
25195 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25196 if { (eval echo "$as_me:25196: \"$ac_link\"") >&5
25197   (eval $ac_link) 2>&5
25198   ac_status=$?
25199   echo "$as_me:25199: \$? = $ac_status" >&5
25200   (exit "$ac_status"); } &&
25201          { ac_try='test -s "conftest$ac_exeext"'
25202   { (eval echo "$as_me:25202: \"$ac_try\"") >&5
25203   (eval $ac_try) 2>&5
25204   ac_status=$?
25205   echo "$as_me:25205: \$? = $ac_status" >&5
25206   (exit "$ac_status"); }; }; then
25207   cf_cv_libstdcpp=yes
25208 else
25209   echo "$as_me: failed program was:" >&5
25210 cat "conftest.$ac_ext" >&5
25211 cf_cv_libstdcpp=no
25212 fi
25213 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25214                         LIBS="$cf_save"
25215
25216 fi
25217 echo "$as_me:25217: result: $cf_cv_libstdcpp" >&5
25218 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25219                 test "$cf_cv_libstdcpp" = yes && {
25220 cf_add_libs="$CXXLIBS"
25221 # reverse order
25222 cf_add_0lib=
25223 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25224 # filter duplicates
25225 for cf_add_1lib in $cf_add_0lib; do
25226         for cf_add_2lib in $cf_add_libs; do
25227                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25228                         cf_add_1lib=
25229                         break
25230                 fi
25231         done
25232         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25233 done
25234 CXXLIBS="$cf_add_libs"
25235  }
25236         fi
25237 fi
25238
25239         echo "$as_me:25239: checking whether $CXX understands -c and -o together" >&5
25240 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25241 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25242   echo $ECHO_N "(cached) $ECHO_C" >&6
25243 else
25244
25245 cat > conftest.$ac_ext <<CF_EOF
25246 int main(void)
25247 {
25248         ${cf_cv_main_return:-return}(0);
25249 }
25250 CF_EOF
25251 # We do the test twice because some compilers refuse to overwrite an
25252 # existing .o file with -o, though they will create one.
25253 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25254 if { (eval echo "$as_me:25254: \"$ac_try\"") >&5
25255   (eval $ac_try) 2>&5
25256   ac_status=$?
25257   echo "$as_me:25257: \$? = $ac_status" >&5
25258   (exit "$ac_status"); } &&
25259   test -f conftest2.$ac_objext && { (eval echo "$as_me:25259: \"$ac_try\"") >&5
25260   (eval $ac_try) 2>&5
25261   ac_status=$?
25262   echo "$as_me:25262: \$? = $ac_status" >&5
25263   (exit "$ac_status"); };
25264 then
25265   eval cf_cv_prog_CXX_c_o=yes
25266 else
25267   eval cf_cv_prog_CXX_c_o=no
25268 fi
25269 rm -rf ./conftest*
25270
25271 fi
25272 if test "$cf_cv_prog_CXX_c_o" = yes; then
25273   echo "$as_me:25273: result: yes" >&5
25274 echo "${ECHO_T}yes" >&6
25275 else
25276   echo "$as_me:25276: result: no" >&5
25277 echo "${ECHO_T}no" >&6
25278 fi
25279
25280         case "$GXX_VERSION" in
25281         (1.*|2.[0-6]*|[1-9][0-9].*)
25282                 cf_cxx_library=yes
25283                 ;;
25284         (*-2.7*|2.7*)
25285
25286 cf_cxx_library=unknown
25287 case "$cf_cv_system_name" in
25288 (os2*)
25289         cf_gpp_libname=gpp
25290         ;;
25291 (*)
25292         cf_gpp_libname=g++
25293         ;;
25294 esac
25295 if test "$GXX" = yes; then
25296         echo "$as_me:25296: checking for lib$cf_gpp_libname" >&5
25297 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25298         cf_save="$LIBS"
25299
25300 cf_add_libs="$LIBS"
25301 # reverse order
25302 cf_add_0lib=
25303 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25304 # filter duplicates
25305 for cf_add_1lib in $cf_add_0lib; do
25306         for cf_add_2lib in $cf_add_libs; do
25307                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25308                         cf_add_1lib=
25309                         break
25310                 fi
25311         done
25312         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25313 done
25314 LIBS="$cf_add_libs"
25315
25316         cat >"conftest.$ac_ext" <<_ACEOF
25317 #line 25317 "configure"
25318 #include "confdefs.h"
25319
25320 #include <$cf_gpp_libname/builtin.h>
25321
25322 int
25323 main (void)
25324 {
25325 two_arg_error_handler_t foo2 = lib_error_handler
25326   ;
25327   return 0;
25328 }
25329 _ACEOF
25330 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25331 if { (eval echo "$as_me:25331: \"$ac_link\"") >&5
25332   (eval $ac_link) 2>&5
25333   ac_status=$?
25334   echo "$as_me:25334: \$? = $ac_status" >&5
25335   (exit "$ac_status"); } &&
25336          { ac_try='test -s "conftest$ac_exeext"'
25337   { (eval echo "$as_me:25337: \"$ac_try\"") >&5
25338   (eval $ac_try) 2>&5
25339   ac_status=$?
25340   echo "$as_me:25340: \$? = $ac_status" >&5
25341   (exit "$ac_status"); }; }; then
25342   cf_cxx_library=yes
25343
25344 cf_add_libs="$CXXLIBS"
25345 # reverse order
25346 cf_add_0lib=
25347 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25348 # filter duplicates
25349 for cf_add_1lib in $cf_add_0lib; do
25350         for cf_add_2lib in $cf_add_libs; do
25351                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25352                         cf_add_1lib=
25353                         break
25354                 fi
25355         done
25356         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25357 done
25358 CXXLIBS="$cf_add_libs"
25359
25360          if test "$cf_gpp_libname" = cpp ; then
25361
25362 cat >>confdefs.h <<\EOF
25363 #define HAVE_GPP_BUILTIN_H 1
25364 EOF
25365
25366          else
25367
25368 cat >>confdefs.h <<\EOF
25369 #define HAVE_GXX_BUILTIN_H 1
25370 EOF
25371
25372          fi
25373 else
25374   echo "$as_me: failed program was:" >&5
25375 cat "conftest.$ac_ext" >&5
25376 cat >"conftest.$ac_ext" <<_ACEOF
25377 #line 25377 "configure"
25378 #include "confdefs.h"
25379
25380 #include <builtin.h>
25381
25382 int
25383 main (void)
25384 {
25385 two_arg_error_handler_t foo2 = lib_error_handler
25386   ;
25387   return 0;
25388 }
25389 _ACEOF
25390 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25391 if { (eval echo "$as_me:25391: \"$ac_link\"") >&5
25392   (eval $ac_link) 2>&5
25393   ac_status=$?
25394   echo "$as_me:25394: \$? = $ac_status" >&5
25395   (exit "$ac_status"); } &&
25396          { ac_try='test -s "conftest$ac_exeext"'
25397   { (eval echo "$as_me:25397: \"$ac_try\"") >&5
25398   (eval $ac_try) 2>&5
25399   ac_status=$?
25400   echo "$as_me:25400: \$? = $ac_status" >&5
25401   (exit "$ac_status"); }; }; then
25402   cf_cxx_library=yes
25403
25404 cf_add_libs="$CXXLIBS"
25405 # reverse order
25406 cf_add_0lib=
25407 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25408 # filter duplicates
25409 for cf_add_1lib in $cf_add_0lib; do
25410         for cf_add_2lib in $cf_add_libs; do
25411                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25412                         cf_add_1lib=
25413                         break
25414                 fi
25415         done
25416         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25417 done
25418 CXXLIBS="$cf_add_libs"
25419
25420 cat >>confdefs.h <<\EOF
25421 #define HAVE_BUILTIN_H 1
25422 EOF
25423
25424 else
25425   echo "$as_me: failed program was:" >&5
25426 cat "conftest.$ac_ext" >&5
25427 cf_cxx_library=no
25428 fi
25429 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25430 fi
25431 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25432         LIBS="$cf_save"
25433         echo "$as_me:25433: result: $cf_cxx_library" >&5
25434 echo "${ECHO_T}$cf_cxx_library" >&6
25435 fi
25436
25437                 ;;
25438         (*)
25439                 cf_cxx_library=no
25440                 ;;
25441         esac
25442
25443         ac_ext=cc
25444 ac_cpp='$CXXCPP $CPPFLAGS'
25445 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25446 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25447 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25448 ac_main_return="return"
25449 echo "$as_me:25449: checking how to run the C++ preprocessor" >&5
25450 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25451 if test -z "$CXXCPP"; then
25452   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25453   echo $ECHO_N "(cached) $ECHO_C" >&6
25454 else
25455       # Double quotes because CXXCPP needs to be expanded
25456     for CXXCPP in "$CXX -E" "/lib/cpp"
25457     do
25458       ac_preproc_ok=false
25459 for ac_cxx_preproc_warn_flag in '' yes
25460 do
25461   # Use a header file that comes with gcc, so configuring glibc
25462   # with a fresh cross-compiler works.
25463   # On the NeXT, cc -E runs the code through the compiler's parser,
25464   # not just through cpp. "Syntax error" is here to catch this case.
25465   cat >"conftest.$ac_ext" <<_ACEOF
25466 #line 25466 "configure"
25467 #include "confdefs.h"
25468 #include <assert.h>
25469                      Syntax error
25470 _ACEOF
25471 if { (eval echo "$as_me:25471: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25472   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25473   ac_status=$?
25474   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25475   rm -f conftest.er1
25476   cat conftest.err >&5
25477   echo "$as_me:25477: \$? = $ac_status" >&5
25478   (exit "$ac_status"); } >/dev/null; then
25479   if test -s conftest.err; then
25480     ac_cpp_err=$ac_cxx_preproc_warn_flag
25481   else
25482     ac_cpp_err=
25483   fi
25484 else
25485   ac_cpp_err=yes
25486 fi
25487 if test -z "$ac_cpp_err"; then
25488   :
25489 else
25490   echo "$as_me: failed program was:" >&5
25491   cat "conftest.$ac_ext" >&5
25492   # Broken: fails on valid input.
25493 continue
25494 fi
25495 rm -f conftest.err "conftest.$ac_ext"
25496
25497   # OK, works on sane cases.  Now check whether non-existent headers
25498   # can be detected and how.
25499   cat >"conftest.$ac_ext" <<_ACEOF
25500 #line 25500 "configure"
25501 #include "confdefs.h"
25502 #include <ac_nonexistent.h>
25503 _ACEOF
25504 if { (eval echo "$as_me:25504: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25505   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25506   ac_status=$?
25507   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25508   rm -f conftest.er1
25509   cat conftest.err >&5
25510   echo "$as_me:25510: \$? = $ac_status" >&5
25511   (exit "$ac_status"); } >/dev/null; then
25512   if test -s conftest.err; then
25513     ac_cpp_err=$ac_cxx_preproc_warn_flag
25514   else
25515     ac_cpp_err=
25516   fi
25517 else
25518   ac_cpp_err=yes
25519 fi
25520 if test -z "$ac_cpp_err"; then
25521   # Broken: success on invalid input.
25522 continue
25523 else
25524   echo "$as_me: failed program was:" >&5
25525   cat "conftest.$ac_ext" >&5
25526   # Passes both tests.
25527 ac_preproc_ok=:
25528 break
25529 fi
25530 rm -f conftest.err "conftest.$ac_ext"
25531
25532 done
25533 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25534 rm -f conftest.err "conftest.$ac_ext"
25535 if $ac_preproc_ok; then
25536   break
25537 fi
25538
25539     done
25540     ac_cv_prog_CXXCPP=$CXXCPP
25541
25542 fi
25543   CXXCPP=$ac_cv_prog_CXXCPP
25544 else
25545   ac_cv_prog_CXXCPP=$CXXCPP
25546 fi
25547 echo "$as_me:25547: result: $CXXCPP" >&5
25548 echo "${ECHO_T}$CXXCPP" >&6
25549 ac_preproc_ok=false
25550 for ac_cxx_preproc_warn_flag in '' yes
25551 do
25552   # Use a header file that comes with gcc, so configuring glibc
25553   # with a fresh cross-compiler works.
25554   # On the NeXT, cc -E runs the code through the compiler's parser,
25555   # not just through cpp. "Syntax error" is here to catch this case.
25556   cat >"conftest.$ac_ext" <<_ACEOF
25557 #line 25557 "configure"
25558 #include "confdefs.h"
25559 #include <assert.h>
25560                      Syntax error
25561 _ACEOF
25562 if { (eval echo "$as_me:25562: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25563   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25564   ac_status=$?
25565   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25566   rm -f conftest.er1
25567   cat conftest.err >&5
25568   echo "$as_me:25568: \$? = $ac_status" >&5
25569   (exit "$ac_status"); } >/dev/null; then
25570   if test -s conftest.err; then
25571     ac_cpp_err=$ac_cxx_preproc_warn_flag
25572   else
25573     ac_cpp_err=
25574   fi
25575 else
25576   ac_cpp_err=yes
25577 fi
25578 if test -z "$ac_cpp_err"; then
25579   :
25580 else
25581   echo "$as_me: failed program was:" >&5
25582   cat "conftest.$ac_ext" >&5
25583   # Broken: fails on valid input.
25584 continue
25585 fi
25586 rm -f conftest.err "conftest.$ac_ext"
25587
25588   # OK, works on sane cases.  Now check whether non-existent headers
25589   # can be detected and how.
25590   cat >"conftest.$ac_ext" <<_ACEOF
25591 #line 25591 "configure"
25592 #include "confdefs.h"
25593 #include <ac_nonexistent.h>
25594 _ACEOF
25595 if { (eval echo "$as_me:25595: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25596   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25597   ac_status=$?
25598   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25599   rm -f conftest.er1
25600   cat conftest.err >&5
25601   echo "$as_me:25601: \$? = $ac_status" >&5
25602   (exit "$ac_status"); } >/dev/null; then
25603   if test -s conftest.err; then
25604     ac_cpp_err=$ac_cxx_preproc_warn_flag
25605   else
25606     ac_cpp_err=
25607   fi
25608 else
25609   ac_cpp_err=yes
25610 fi
25611 if test -z "$ac_cpp_err"; then
25612   # Broken: success on invalid input.
25613 continue
25614 else
25615   echo "$as_me: failed program was:" >&5
25616   cat "conftest.$ac_ext" >&5
25617   # Passes both tests.
25618 ac_preproc_ok=:
25619 break
25620 fi
25621 rm -f conftest.err "conftest.$ac_ext"
25622
25623 done
25624 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25625 rm -f conftest.err "conftest.$ac_ext"
25626 if $ac_preproc_ok; then
25627   :
25628 else
25629   { { echo "$as_me:25629: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25630 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25631    { (exit 1); exit 1; }; }
25632 fi
25633
25634 ac_ext=cc
25635 ac_cpp='$CXXCPP $CPPFLAGS'
25636 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25637 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25638 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25639 ac_main_return="return"
25640
25641 for ac_header in typeinfo
25642 do
25643 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25644 echo "$as_me:25644: checking for $ac_header" >&5
25645 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25646 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25647   echo $ECHO_N "(cached) $ECHO_C" >&6
25648 else
25649   cat >"conftest.$ac_ext" <<_ACEOF
25650 #line 25650 "configure"
25651 #include "confdefs.h"
25652 #include <$ac_header>
25653 _ACEOF
25654 if { (eval echo "$as_me:25654: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25655   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25656   ac_status=$?
25657   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25658   rm -f conftest.er1
25659   cat conftest.err >&5
25660   echo "$as_me:25660: \$? = $ac_status" >&5
25661   (exit "$ac_status"); } >/dev/null; then
25662   if test -s conftest.err; then
25663     ac_cpp_err=$ac_cxx_preproc_warn_flag
25664   else
25665     ac_cpp_err=
25666   fi
25667 else
25668   ac_cpp_err=yes
25669 fi
25670 if test -z "$ac_cpp_err"; then
25671   eval "$as_ac_Header=yes"
25672 else
25673   echo "$as_me: failed program was:" >&5
25674   cat "conftest.$ac_ext" >&5
25675   eval "$as_ac_Header=no"
25676 fi
25677 rm -f conftest.err "conftest.$ac_ext"
25678 fi
25679 echo "$as_me:25679: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25680 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25681 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25682   cat >>confdefs.h <<EOF
25683 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25684 EOF
25685
25686 fi
25687 done
25688
25689 for ac_header in iostream
25690 do
25691 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25692 echo "$as_me:25692: checking for $ac_header" >&5
25693 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25694 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25695   echo $ECHO_N "(cached) $ECHO_C" >&6
25696 else
25697   cat >"conftest.$ac_ext" <<_ACEOF
25698 #line 25698 "configure"
25699 #include "confdefs.h"
25700 #include <$ac_header>
25701 _ACEOF
25702 if { (eval echo "$as_me:25702: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25703   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25704   ac_status=$?
25705   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25706   rm -f conftest.er1
25707   cat conftest.err >&5
25708   echo "$as_me:25708: \$? = $ac_status" >&5
25709   (exit "$ac_status"); } >/dev/null; then
25710   if test -s conftest.err; then
25711     ac_cpp_err=$ac_cxx_preproc_warn_flag
25712   else
25713     ac_cpp_err=
25714   fi
25715 else
25716   ac_cpp_err=yes
25717 fi
25718 if test -z "$ac_cpp_err"; then
25719   eval "$as_ac_Header=yes"
25720 else
25721   echo "$as_me: failed program was:" >&5
25722   cat "conftest.$ac_ext" >&5
25723   eval "$as_ac_Header=no"
25724 fi
25725 rm -f conftest.err "conftest.$ac_ext"
25726 fi
25727 echo "$as_me:25727: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25728 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25729 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25730   cat >>confdefs.h <<EOF
25731 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25732 EOF
25733
25734 fi
25735 done
25736
25737 if test x"$ac_cv_header_iostream" = xyes ; then
25738         echo "$as_me:25738: checking if iostream uses std-namespace" >&5
25739 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25740         cat >"conftest.$ac_ext" <<_ACEOF
25741 #line 25741 "configure"
25742 #include "confdefs.h"
25743
25744 #include <iostream>
25745 using std::endl;
25746 using std::cerr;
25747 int
25748 main (void)
25749 {
25750
25751 cerr << "testing" << endl;
25752
25753   ;
25754   return 0;
25755 }
25756 _ACEOF
25757 rm -f "conftest.$ac_objext"
25758 if { (eval echo "$as_me:25758: \"$ac_compile\"") >&5
25759   (eval $ac_compile) 2>&5
25760   ac_status=$?
25761   echo "$as_me:25761: \$? = $ac_status" >&5
25762   (exit "$ac_status"); } &&
25763          { ac_try='test -s "conftest.$ac_objext"'
25764   { (eval echo "$as_me:25764: \"$ac_try\"") >&5
25765   (eval $ac_try) 2>&5
25766   ac_status=$?
25767   echo "$as_me:25767: \$? = $ac_status" >&5
25768   (exit "$ac_status"); }; }; then
25769   cf_iostream_namespace=yes
25770 else
25771   echo "$as_me: failed program was:" >&5
25772 cat "conftest.$ac_ext" >&5
25773 cf_iostream_namespace=no
25774 fi
25775 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25776         echo "$as_me:25776: result: $cf_iostream_namespace" >&5
25777 echo "${ECHO_T}$cf_iostream_namespace" >&6
25778         if test "$cf_iostream_namespace" = yes ; then
25779
25780 cat >>confdefs.h <<\EOF
25781 #define IOSTREAM_NAMESPACE 1
25782 EOF
25783
25784         fi
25785 fi
25786
25787 echo "$as_me:25787: checking if we should include stdbool.h" >&5
25788 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25789
25790 if test "${cf_cv_header_stdbool_h+set}" = set; then
25791   echo $ECHO_N "(cached) $ECHO_C" >&6
25792 else
25793
25794         cat >"conftest.$ac_ext" <<_ACEOF
25795 #line 25795 "configure"
25796 #include "confdefs.h"
25797
25798 int
25799 main (void)
25800 {
25801 bool foo = false
25802   ;
25803   return 0;
25804 }
25805 _ACEOF
25806 rm -f "conftest.$ac_objext"
25807 if { (eval echo "$as_me:25807: \"$ac_compile\"") >&5
25808   (eval $ac_compile) 2>&5
25809   ac_status=$?
25810   echo "$as_me:25810: \$? = $ac_status" >&5
25811   (exit "$ac_status"); } &&
25812          { ac_try='test -s "conftest.$ac_objext"'
25813   { (eval echo "$as_me:25813: \"$ac_try\"") >&5
25814   (eval $ac_try) 2>&5
25815   ac_status=$?
25816   echo "$as_me:25816: \$? = $ac_status" >&5
25817   (exit "$ac_status"); }; }; then
25818   cf_cv_header_stdbool_h=0
25819 else
25820   echo "$as_me: failed program was:" >&5
25821 cat "conftest.$ac_ext" >&5
25822 cat >"conftest.$ac_ext" <<_ACEOF
25823 #line 25823 "configure"
25824 #include "confdefs.h"
25825
25826 #ifndef __BEOS__
25827 #include <stdbool.h>
25828 #endif
25829
25830 int
25831 main (void)
25832 {
25833 bool foo = false
25834   ;
25835   return 0;
25836 }
25837 _ACEOF
25838 rm -f "conftest.$ac_objext"
25839 if { (eval echo "$as_me:25839: \"$ac_compile\"") >&5
25840   (eval $ac_compile) 2>&5
25841   ac_status=$?
25842   echo "$as_me:25842: \$? = $ac_status" >&5
25843   (exit "$ac_status"); } &&
25844          { ac_try='test -s "conftest.$ac_objext"'
25845   { (eval echo "$as_me:25845: \"$ac_try\"") >&5
25846   (eval $ac_try) 2>&5
25847   ac_status=$?
25848   echo "$as_me:25848: \$? = $ac_status" >&5
25849   (exit "$ac_status"); }; }; then
25850   cf_cv_header_stdbool_h=1
25851 else
25852   echo "$as_me: failed program was:" >&5
25853 cat "conftest.$ac_ext" >&5
25854 cf_cv_header_stdbool_h=0
25855 fi
25856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25857 fi
25858 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25859 fi
25860
25861 if test "$cf_cv_header_stdbool_h" = 1
25862 then    echo "$as_me:25862: result: yes" >&5
25863 echo "${ECHO_T}yes" >&6
25864 else    echo "$as_me:25864: result: no" >&5
25865 echo "${ECHO_T}no" >&6
25866 fi
25867
25868 echo "$as_me:25868: checking for builtin bool type" >&5
25869 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25870
25871 if test "${cf_cv_builtin_bool+set}" = set; then
25872   echo $ECHO_N "(cached) $ECHO_C" >&6
25873 else
25874
25875         cat >"conftest.$ac_ext" <<_ACEOF
25876 #line 25876 "configure"
25877 #include "confdefs.h"
25878
25879 #include <stdio.h>
25880 #include <sys/types.h>
25881
25882 int
25883 main (void)
25884 {
25885 bool x = false
25886   ;
25887   return 0;
25888 }
25889 _ACEOF
25890 rm -f "conftest.$ac_objext"
25891 if { (eval echo "$as_me:25891: \"$ac_compile\"") >&5
25892   (eval $ac_compile) 2>&5
25893   ac_status=$?
25894   echo "$as_me:25894: \$? = $ac_status" >&5
25895   (exit "$ac_status"); } &&
25896          { ac_try='test -s "conftest.$ac_objext"'
25897   { (eval echo "$as_me:25897: \"$ac_try\"") >&5
25898   (eval $ac_try) 2>&5
25899   ac_status=$?
25900   echo "$as_me:25900: \$? = $ac_status" >&5
25901   (exit "$ac_status"); }; }; then
25902   cf_cv_builtin_bool=1
25903 else
25904   echo "$as_me: failed program was:" >&5
25905 cat "conftest.$ac_ext" >&5
25906 cf_cv_builtin_bool=0
25907 fi
25908 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25909
25910 fi
25911
25912 if test "$cf_cv_builtin_bool" = 1
25913 then    echo "$as_me:25913: result: yes" >&5
25914 echo "${ECHO_T}yes" >&6
25915 else    echo "$as_me:25915: result: no" >&5
25916 echo "${ECHO_T}no" >&6
25917 fi
25918
25919 echo "$as_me:25919: checking for bool" >&5
25920 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25921 if test "${ac_cv_type_bool+set}" = set; then
25922   echo $ECHO_N "(cached) $ECHO_C" >&6
25923 else
25924   cat >"conftest.$ac_ext" <<_ACEOF
25925 #line 25925 "configure"
25926 #include "confdefs.h"
25927
25928 $ac_includes_default
25929
25930 #if defined(__cplusplus)
25931
25932 #ifdef HAVE_GXX_BUILTIN_H
25933 #include <g++/builtin.h>
25934 #elif HAVE_GPP_BUILTIN_H
25935 #include <gpp/builtin.h>
25936 #elif HAVE_BUILTIN_H
25937 #include <builtin.h>
25938 #endif
25939
25940 #else
25941
25942 #if $cf_cv_header_stdbool_h
25943 #include <stdbool.h>
25944 #endif
25945
25946 #endif
25947
25948 int
25949 main (void)
25950 {
25951 if ((bool *) 0)
25952   return 0;
25953 if (sizeof (bool))
25954   return 0;
25955   ;
25956   return 0;
25957 }
25958 _ACEOF
25959 rm -f "conftest.$ac_objext"
25960 if { (eval echo "$as_me:25960: \"$ac_compile\"") >&5
25961   (eval $ac_compile) 2>&5
25962   ac_status=$?
25963   echo "$as_me:25963: \$? = $ac_status" >&5
25964   (exit "$ac_status"); } &&
25965          { ac_try='test -s "conftest.$ac_objext"'
25966   { (eval echo "$as_me:25966: \"$ac_try\"") >&5
25967   (eval $ac_try) 2>&5
25968   ac_status=$?
25969   echo "$as_me:25969: \$? = $ac_status" >&5
25970   (exit "$ac_status"); }; }; then
25971   ac_cv_type_bool=yes
25972 else
25973   echo "$as_me: failed program was:" >&5
25974 cat "conftest.$ac_ext" >&5
25975 ac_cv_type_bool=no
25976 fi
25977 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25978 fi
25979 echo "$as_me:25979: result: $ac_cv_type_bool" >&5
25980 echo "${ECHO_T}$ac_cv_type_bool" >&6
25981
25982 echo "$as_me:25982: checking size of bool" >&5
25983 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25984 if test "${ac_cv_sizeof_bool+set}" = set; then
25985   echo $ECHO_N "(cached) $ECHO_C" >&6
25986 else
25987   if test "$ac_cv_type_bool" = yes; then
25988   if test "$cross_compiling" = yes; then
25989   # Depending upon the size, compute the lo and hi bounds.
25990 cat >"conftest.$ac_ext" <<_ACEOF
25991 #line 25991 "configure"
25992 #include "confdefs.h"
25993
25994 $ac_includes_default
25995
25996 #if defined(__cplusplus)
25997
25998 #ifdef HAVE_GXX_BUILTIN_H
25999 #include <g++/builtin.h>
26000 #elif HAVE_GPP_BUILTIN_H
26001 #include <gpp/builtin.h>
26002 #elif HAVE_BUILTIN_H
26003 #include <builtin.h>
26004 #endif
26005
26006 #else
26007
26008 #if $cf_cv_header_stdbool_h
26009 #include <stdbool.h>
26010 #endif
26011
26012 #endif
26013
26014 int
26015 main (void)
26016 {
26017 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26018   ;
26019   return 0;
26020 }
26021 _ACEOF
26022 rm -f "conftest.$ac_objext"
26023 if { (eval echo "$as_me:26023: \"$ac_compile\"") >&5
26024   (eval $ac_compile) 2>&5
26025   ac_status=$?
26026   echo "$as_me:26026: \$? = $ac_status" >&5
26027   (exit "$ac_status"); } &&
26028          { ac_try='test -s "conftest.$ac_objext"'
26029   { (eval echo "$as_me:26029: \"$ac_try\"") >&5
26030   (eval $ac_try) 2>&5
26031   ac_status=$?
26032   echo "$as_me:26032: \$? = $ac_status" >&5
26033   (exit "$ac_status"); }; }; then
26034   ac_lo=0 ac_mid=0
26035   while :; do
26036     cat >"conftest.$ac_ext" <<_ACEOF
26037 #line 26037 "configure"
26038 #include "confdefs.h"
26039
26040 $ac_includes_default
26041
26042 #if defined(__cplusplus)
26043
26044 #ifdef HAVE_GXX_BUILTIN_H
26045 #include <g++/builtin.h>
26046 #elif HAVE_GPP_BUILTIN_H
26047 #include <gpp/builtin.h>
26048 #elif HAVE_BUILTIN_H
26049 #include <builtin.h>
26050 #endif
26051
26052 #else
26053
26054 #if $cf_cv_header_stdbool_h
26055 #include <stdbool.h>
26056 #endif
26057
26058 #endif
26059
26060 int
26061 main (void)
26062 {
26063 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26064   ;
26065   return 0;
26066 }
26067 _ACEOF
26068 rm -f "conftest.$ac_objext"
26069 if { (eval echo "$as_me:26069: \"$ac_compile\"") >&5
26070   (eval $ac_compile) 2>&5
26071   ac_status=$?
26072   echo "$as_me:26072: \$? = $ac_status" >&5
26073   (exit "$ac_status"); } &&
26074          { ac_try='test -s "conftest.$ac_objext"'
26075   { (eval echo "$as_me:26075: \"$ac_try\"") >&5
26076   (eval $ac_try) 2>&5
26077   ac_status=$?
26078   echo "$as_me:26078: \$? = $ac_status" >&5
26079   (exit "$ac_status"); }; }; then
26080   ac_hi=$ac_mid; break
26081 else
26082   echo "$as_me: failed program was:" >&5
26083 cat "conftest.$ac_ext" >&5
26084 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26085 fi
26086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26087   done
26088 else
26089   echo "$as_me: failed program was:" >&5
26090 cat "conftest.$ac_ext" >&5
26091 ac_hi=-1 ac_mid=-1
26092   while :; do
26093     cat >"conftest.$ac_ext" <<_ACEOF
26094 #line 26094 "configure"
26095 #include "confdefs.h"
26096
26097 $ac_includes_default
26098
26099 #if defined(__cplusplus)
26100
26101 #ifdef HAVE_GXX_BUILTIN_H
26102 #include <g++/builtin.h>
26103 #elif HAVE_GPP_BUILTIN_H
26104 #include <gpp/builtin.h>
26105 #elif HAVE_BUILTIN_H
26106 #include <builtin.h>
26107 #endif
26108
26109 #else
26110
26111 #if $cf_cv_header_stdbool_h
26112 #include <stdbool.h>
26113 #endif
26114
26115 #endif
26116
26117 int
26118 main (void)
26119 {
26120 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26121   ;
26122   return 0;
26123 }
26124 _ACEOF
26125 rm -f "conftest.$ac_objext"
26126 if { (eval echo "$as_me:26126: \"$ac_compile\"") >&5
26127   (eval $ac_compile) 2>&5
26128   ac_status=$?
26129   echo "$as_me:26129: \$? = $ac_status" >&5
26130   (exit "$ac_status"); } &&
26131          { ac_try='test -s "conftest.$ac_objext"'
26132   { (eval echo "$as_me:26132: \"$ac_try\"") >&5
26133   (eval $ac_try) 2>&5
26134   ac_status=$?
26135   echo "$as_me:26135: \$? = $ac_status" >&5
26136   (exit "$ac_status"); }; }; then
26137   ac_lo=$ac_mid; break
26138 else
26139   echo "$as_me: failed program was:" >&5
26140 cat "conftest.$ac_ext" >&5
26141 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26142 fi
26143 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26144   done
26145 fi
26146 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26147 # Binary search between lo and hi bounds.
26148 while test "x$ac_lo" != "x$ac_hi"; do
26149   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26150   cat >"conftest.$ac_ext" <<_ACEOF
26151 #line 26151 "configure"
26152 #include "confdefs.h"
26153
26154 $ac_includes_default
26155
26156 #if defined(__cplusplus)
26157
26158 #ifdef HAVE_GXX_BUILTIN_H
26159 #include <g++/builtin.h>
26160 #elif HAVE_GPP_BUILTIN_H
26161 #include <gpp/builtin.h>
26162 #elif HAVE_BUILTIN_H
26163 #include <builtin.h>
26164 #endif
26165
26166 #else
26167
26168 #if $cf_cv_header_stdbool_h
26169 #include <stdbool.h>
26170 #endif
26171
26172 #endif
26173
26174 int
26175 main (void)
26176 {
26177 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26178   ;
26179   return 0;
26180 }
26181 _ACEOF
26182 rm -f "conftest.$ac_objext"
26183 if { (eval echo "$as_me:26183: \"$ac_compile\"") >&5
26184   (eval $ac_compile) 2>&5
26185   ac_status=$?
26186   echo "$as_me:26186: \$? = $ac_status" >&5
26187   (exit "$ac_status"); } &&
26188          { ac_try='test -s "conftest.$ac_objext"'
26189   { (eval echo "$as_me:26189: \"$ac_try\"") >&5
26190   (eval $ac_try) 2>&5
26191   ac_status=$?
26192   echo "$as_me:26192: \$? = $ac_status" >&5
26193   (exit "$ac_status"); }; }; then
26194   ac_hi=$ac_mid
26195 else
26196   echo "$as_me: failed program was:" >&5
26197 cat "conftest.$ac_ext" >&5
26198 ac_lo=`expr "$ac_mid" + 1`
26199 fi
26200 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26201 done
26202 ac_cv_sizeof_bool=$ac_lo
26203 else
26204   if test "$cross_compiling" = yes; then
26205   { { echo "$as_me:26205: error: cannot run test program while cross compiling" >&5
26206 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26207    { (exit 1); exit 1; }; }
26208 else
26209   cat >"conftest.$ac_ext" <<_ACEOF
26210 #line 26210 "configure"
26211 #include "confdefs.h"
26212
26213 $ac_includes_default
26214
26215 #if defined(__cplusplus)
26216
26217 #ifdef HAVE_GXX_BUILTIN_H
26218 #include <g++/builtin.h>
26219 #elif HAVE_GPP_BUILTIN_H
26220 #include <gpp/builtin.h>
26221 #elif HAVE_BUILTIN_H
26222 #include <builtin.h>
26223 #endif
26224
26225 #else
26226
26227 #if $cf_cv_header_stdbool_h
26228 #include <stdbool.h>
26229 #endif
26230
26231 #endif
26232
26233 int
26234 main (void)
26235 {
26236 FILE *f = fopen ("conftest.val", "w");
26237 if (!f)
26238   $ac_main_return (1);
26239 fprintf (f, "%ld", (long)(sizeof (bool)));
26240 fclose (f);
26241   ;
26242   return 0;
26243 }
26244 _ACEOF
26245 rm -f "conftest$ac_exeext"
26246 if { (eval echo "$as_me:26246: \"$ac_link\"") >&5
26247   (eval $ac_link) 2>&5
26248   ac_status=$?
26249   echo "$as_me:26249: \$? = $ac_status" >&5
26250   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26251   { (eval echo "$as_me:26251: \"$ac_try\"") >&5
26252   (eval $ac_try) 2>&5
26253   ac_status=$?
26254   echo "$as_me:26254: \$? = $ac_status" >&5
26255   (exit "$ac_status"); }; }; then
26256   ac_cv_sizeof_bool=`cat conftest.val`
26257 else
26258   echo "$as_me: program exited with status $ac_status" >&5
26259 echo "$as_me: failed program was:" >&5
26260 cat "conftest.$ac_ext" >&5
26261 fi
26262 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26263 fi
26264 fi
26265 rm -f conftest.val
26266 else
26267   ac_cv_sizeof_bool=0
26268 fi
26269 fi
26270 echo "$as_me:26270: result: $ac_cv_sizeof_bool" >&5
26271 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26272 cat >>confdefs.h <<EOF
26273 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26274 EOF
26275
26276 echo "$as_me:26276: checking for type of bool" >&5
26277 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26278 if test "${cf_cv_type_of_bool+set}" = set; then
26279   echo $ECHO_N "(cached) $ECHO_C" >&6
26280 else
26281
26282         rm -f cf_test.out
26283         if test "$cross_compiling" = yes; then
26284
26285                 case x$ac_cv_sizeof_bool in
26286                 (x1) cf_cv_type_of_bool="unsigned char";;
26287                 (x2) cf_cv_type_of_bool="unsigned short";;
26288                 (x4) cf_cv_type_of_bool="unsigned int";;
26289                 (x8) cf_cv_type_of_bool="unsigned long";;
26290                 (*)  cf_cv_type_of_bool=unknown;;
26291                 esac
26292
26293 else
26294   cat >"conftest.$ac_ext" <<_ACEOF
26295 #line 26295 "configure"
26296 #include "confdefs.h"
26297
26298 $ac_includes_default
26299
26300 #if defined(__cplusplus)
26301
26302 #ifdef HAVE_GXX_BUILTIN_H
26303 #include <g++/builtin.h>
26304 #elif HAVE_GPP_BUILTIN_H
26305 #include <gpp/builtin.h>
26306 #elif HAVE_BUILTIN_H
26307 #include <builtin.h>
26308 #endif
26309
26310 #else
26311
26312 #if $cf_cv_header_stdbool_h
26313 #include <stdbool.h>
26314 #endif
26315
26316 #endif
26317
26318 int main(void)
26319 {
26320         FILE *fp = fopen("cf_test.out", "w");
26321         if (fp != 0) {
26322                 bool x = true;
26323                 if ((bool)(-x) >= 0)
26324                         fputs("unsigned ", fp);
26325                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26326                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26327                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26328                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26329                 fclose(fp);
26330         }
26331         ${cf_cv_main_return:-return}(0);
26332 }
26333
26334 _ACEOF
26335 rm -f "conftest$ac_exeext"
26336 if { (eval echo "$as_me:26336: \"$ac_link\"") >&5
26337   (eval $ac_link) 2>&5
26338   ac_status=$?
26339   echo "$as_me:26339: \$? = $ac_status" >&5
26340   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26341   { (eval echo "$as_me:26341: \"$ac_try\"") >&5
26342   (eval $ac_try) 2>&5
26343   ac_status=$?
26344   echo "$as_me:26344: \$? = $ac_status" >&5
26345   (exit "$ac_status"); }; }; then
26346   cf_cv_type_of_bool=`cat cf_test.out`
26347                  if test -z "$cf_cv_type_of_bool"; then
26348                    cf_cv_type_of_bool=unknown
26349                  fi
26350 else
26351   echo "$as_me: program exited with status $ac_status" >&5
26352 echo "$as_me: failed program was:" >&5
26353 cat "conftest.$ac_ext" >&5
26354 cf_cv_type_of_bool=unknown
26355 fi
26356 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26357 fi
26358         rm -f cf_test.out
26359
26360 fi
26361 echo "$as_me:26361: result: $cf_cv_type_of_bool" >&5
26362 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26363
26364 if test "$cf_cv_type_of_bool" = unknown ; then
26365         case .$NCURSES_BOOL in
26366         (.auto|.) NCURSES_BOOL=unsigned;;
26367         esac
26368         { echo "$as_me:26368: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26369 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26370         cf_cv_type_of_bool=$NCURSES_BOOL
26371 fi
26372
26373 echo "$as_me:26373: checking for special defines needed for etip.h" >&5
26374 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26375 cf_save_CXXFLAGS="$CXXFLAGS"
26376 cf_result="none"
26377
26378 # etip.h includes ncurses.h which includes ncurses_dll.h
26379 # But ncurses_dll.h is generated - fix here.
26380 test -d include || mkdir include
26381 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
26382
26383 for cf_math in "" MATH_H
26384 do
26385 for cf_excp in "" MATH_EXCEPTION
26386 do
26387         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26388         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26389         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26390 cat >"conftest.$ac_ext" <<_ACEOF
26391 #line 26391 "configure"
26392 #include "confdefs.h"
26393
26394 #include <etip.h.in>
26395
26396 int
26397 main (void)
26398 {
26399
26400   ;
26401   return 0;
26402 }
26403 _ACEOF
26404 rm -f "conftest.$ac_objext"
26405 if { (eval echo "$as_me:26405: \"$ac_compile\"") >&5
26406   (eval $ac_compile) 2>&5
26407   ac_status=$?
26408   echo "$as_me:26408: \$? = $ac_status" >&5
26409   (exit "$ac_status"); } &&
26410          { ac_try='test -s "conftest.$ac_objext"'
26411   { (eval echo "$as_me:26411: \"$ac_try\"") >&5
26412   (eval $ac_try) 2>&5
26413   ac_status=$?
26414   echo "$as_me:26414: \$? = $ac_status" >&5
26415   (exit "$ac_status"); }; }; then
26416
26417         test -n "$cf_math" && cat >>confdefs.h <<EOF
26418 #define ETIP_NEEDS_${cf_math} 1
26419 EOF
26420
26421         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26422 #define ETIP_NEEDS_${cf_excp} 1
26423 EOF
26424
26425         cf_result="$cf_math $cf_excp"
26426         break 2
26427
26428 else
26429   echo "$as_me: failed program was:" >&5
26430 cat "conftest.$ac_ext" >&5
26431 fi
26432 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26433 done
26434 done
26435 echo "$as_me:26435: result: $cf_result" >&5
26436 echo "${ECHO_T}$cf_result" >&6
26437 CXXFLAGS="$cf_save_CXXFLAGS"
26438
26439 if test -n "$CXX"; then
26440 echo "$as_me:26440: checking if $CXX accepts override keyword" >&5
26441 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26442 if test "${cf_cv_cpp_override+set}" = set; then
26443   echo $ECHO_N "(cached) $ECHO_C" >&6
26444 else
26445
26446         ac_ext=cc
26447 ac_cpp='$CXXCPP $CPPFLAGS'
26448 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26449 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26450 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26451 ac_main_return="return"
26452
26453         if test "$cross_compiling" = yes; then
26454   cf_cv_cpp_override=unknown
26455 else
26456   cat >"conftest.$ac_ext" <<_ACEOF
26457 #line 26457 "configure"
26458 #include "confdefs.h"
26459
26460 class base
26461 {
26462 public:
26463         virtual int foo(float x) = 0;
26464 };
26465
26466 class derived: public base
26467 {
26468 public:
26469         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26470 };
26471
26472 int main(void) { }
26473
26474 _ACEOF
26475 rm -f "conftest$ac_exeext"
26476 if { (eval echo "$as_me:26476: \"$ac_link\"") >&5
26477   (eval $ac_link) 2>&5
26478   ac_status=$?
26479   echo "$as_me:26479: \$? = $ac_status" >&5
26480   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26481   { (eval echo "$as_me:26481: \"$ac_try\"") >&5
26482   (eval $ac_try) 2>&5
26483   ac_status=$?
26484   echo "$as_me:26484: \$? = $ac_status" >&5
26485   (exit "$ac_status"); }; }; then
26486   cf_cv_cpp_override=yes
26487 else
26488   echo "$as_me: program exited with status $ac_status" >&5
26489 echo "$as_me: failed program was:" >&5
26490 cat "conftest.$ac_ext" >&5
26491 cf_cv_cpp_override=no
26492 fi
26493 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26494 fi
26495         ac_ext=cc
26496 ac_cpp='$CXXCPP $CPPFLAGS'
26497 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26498 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26499 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26500 ac_main_return="return"
26501
26502 fi
26503 echo "$as_me:26503: result: $cf_cv_cpp_override" >&5
26504 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26505 fi
26506 test "$cf_cv_cpp_override" = yes &&
26507 cat >>confdefs.h <<\EOF
26508 #define CPP_HAS_OVERRIDE 1
26509 EOF
26510
26511 if test -n "$CXX"; then
26512 echo "$as_me:26512: checking if $CXX accepts parameter initialization" >&5
26513 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26514 if test "${cf_cv_cpp_param_init+set}" = set; then
26515   echo $ECHO_N "(cached) $ECHO_C" >&6
26516 else
26517
26518         ac_ext=cc
26519 ac_cpp='$CXXCPP $CPPFLAGS'
26520 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26521 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26522 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26523 ac_main_return="return"
26524
26525         if test "$cross_compiling" = yes; then
26526   cf_cv_cpp_param_init=unknown
26527 else
26528   cat >"conftest.$ac_ext" <<_ACEOF
26529 #line 26529 "configure"
26530 #include "confdefs.h"
26531
26532 class TEST {
26533 private:
26534         int value;
26535 public:
26536         TEST(int x = 1);
26537         ~TEST();
26538 };
26539
26540 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26541 {
26542         value = x;
26543 }
26544 int main(void) { }
26545
26546 _ACEOF
26547 rm -f "conftest$ac_exeext"
26548 if { (eval echo "$as_me:26548: \"$ac_link\"") >&5
26549   (eval $ac_link) 2>&5
26550   ac_status=$?
26551   echo "$as_me:26551: \$? = $ac_status" >&5
26552   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26553   { (eval echo "$as_me:26553: \"$ac_try\"") >&5
26554   (eval $ac_try) 2>&5
26555   ac_status=$?
26556   echo "$as_me:26556: \$? = $ac_status" >&5
26557   (exit "$ac_status"); }; }; then
26558   cf_cv_cpp_param_init=yes
26559 else
26560   echo "$as_me: program exited with status $ac_status" >&5
26561 echo "$as_me: failed program was:" >&5
26562 cat "conftest.$ac_ext" >&5
26563 cf_cv_cpp_param_init=no
26564 fi
26565 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26566 fi
26567         ac_ext=cc
26568 ac_cpp='$CXXCPP $CPPFLAGS'
26569 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26570 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26571 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26572 ac_main_return="return"
26573
26574 fi
26575 echo "$as_me:26575: result: $cf_cv_cpp_param_init" >&5
26576 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26577 fi
26578 test "$cf_cv_cpp_param_init" = yes &&
26579 cat >>confdefs.h <<\EOF
26580 #define CPP_HAS_PARAM_INIT 1
26581 EOF
26582
26583 if test -n "$CXX"; then
26584
26585 echo "$as_me:26585: checking if $CXX accepts static_cast" >&5
26586 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26587 if test "${cf_cv_cpp_static_cast+set}" = set; then
26588   echo $ECHO_N "(cached) $ECHO_C" >&6
26589 else
26590
26591         ac_ext=cc
26592 ac_cpp='$CXXCPP $CPPFLAGS'
26593 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26594 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26595 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26596 ac_main_return="return"
26597
26598         cat >"conftest.$ac_ext" <<_ACEOF
26599 #line 26599 "configure"
26600 #include "confdefs.h"
26601
26602 class NCursesPanel
26603 {
26604 public:
26605   NCursesPanel(int nlines,
26606                int ncols,
26607                int begin_y = 0,
26608                int begin_x = 0)
26609   {
26610   }
26611   NCursesPanel();
26612   ~NCursesPanel();
26613 };
26614
26615 template<class T> class NCursesUserPanel : public NCursesPanel
26616 {
26617 public:
26618   NCursesUserPanel (int nlines,
26619                     int ncols,
26620                     int begin_y = 0,
26621                     int begin_x = 0,
26622                     const T* p_UserData = static_cast<T*>(0))
26623     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26624   {
26625   };
26626   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26627   {
26628   };
26629
26630   virtual ~NCursesUserPanel() {};
26631 };
26632
26633 int
26634 main (void)
26635 {
26636
26637         const char* p_UserData = static_cast<char*>(0)
26638   ;
26639   return 0;
26640 }
26641 _ACEOF
26642 rm -f "conftest.$ac_objext"
26643 if { (eval echo "$as_me:26643: \"$ac_compile\"") >&5
26644   (eval $ac_compile) 2>&5
26645   ac_status=$?
26646   echo "$as_me:26646: \$? = $ac_status" >&5
26647   (exit "$ac_status"); } &&
26648          { ac_try='test -s "conftest.$ac_objext"'
26649   { (eval echo "$as_me:26649: \"$ac_try\"") >&5
26650   (eval $ac_try) 2>&5
26651   ac_status=$?
26652   echo "$as_me:26652: \$? = $ac_status" >&5
26653   (exit "$ac_status"); }; }; then
26654   cf_cv_cpp_static_cast=yes
26655 else
26656   echo "$as_me: failed program was:" >&5
26657 cat "conftest.$ac_ext" >&5
26658 cf_cv_cpp_static_cast=no
26659 fi
26660 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26661
26662         ac_ext=cc
26663 ac_cpp='$CXXCPP $CPPFLAGS'
26664 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26665 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26666 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26667 ac_main_return="return"
26668
26669 fi
26670 echo "$as_me:26670: result: $cf_cv_cpp_static_cast" >&5
26671 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26672
26673 fi
26674
26675 test "$cf_cv_cpp_static_cast" = yes &&
26676 cat >>confdefs.h <<\EOF
26677 #define CPP_HAS_STATIC_CAST 1
26678 EOF
26679
26680         CXX_AR='$(AR)'
26681         CXX_ARFLAGS='$(ARFLAGS)'
26682         case "$cf_cv_system_name" in
26683         (irix*)
26684             if test "$GXX" != yes ; then
26685                 CXX_AR='$(CXX)'
26686                 CXX_ARFLAGS='-ar -o'
26687             fi
26688             ;;
26689         (sco3.2v5*)
26690             CXXLDFLAGS="-u main"
26691             ;;
26692         (solaris2*)
26693             if test "$GXX" != yes ; then
26694                 CXX_AR='$(CXX)'
26695                 CXX_ARFLAGS='-xar -o'
26696             fi
26697             ;;
26698         esac
26699
26700 else
26701         cf_cxx_library=no
26702         cf_cv_builtin_bool=1
26703
26704         # Just because we are not configuring against C++ right now does not
26705         # mean that a user will not want to use C++.  Some distributors disable
26706         # the C++ portion of this configuration as a shortcut (or just to avoid
26707         # compiling the demo in the c++ directory).  So we need a reasonable
26708         # default for the 'bool' type.
26709         #
26710         # Caveat: since the storage of the bool type is not standardized, it
26711         # may change.
26712
26713         if test "$NCURSES_BOOL" != auto ; then
26714                 cf_cv_type_of_bool=$NCURSES_BOOL
26715                 cf_cv_header_stdbool_h=0
26716         else
26717                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26718
26719 echo "$as_me:26719: checking for bool" >&5
26720 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26721 if test "${ac_cv_type_bool+set}" = set; then
26722   echo $ECHO_N "(cached) $ECHO_C" >&6
26723 else
26724   cat >"conftest.$ac_ext" <<_ACEOF
26725 #line 26725 "configure"
26726 #include "confdefs.h"
26727
26728 $ac_includes_default
26729
26730 #if defined(__cplusplus)
26731
26732 #ifdef HAVE_GXX_BUILTIN_H
26733 #include <g++/builtin.h>
26734 #elif HAVE_GPP_BUILTIN_H
26735 #include <gpp/builtin.h>
26736 #elif HAVE_BUILTIN_H
26737 #include <builtin.h>
26738 #endif
26739
26740 #else
26741
26742 #if $cf_cv_header_stdbool_h
26743 #include <stdbool.h>
26744 #endif
26745
26746 #endif
26747
26748 int
26749 main (void)
26750 {
26751 if ((bool *) 0)
26752   return 0;
26753 if (sizeof (bool))
26754   return 0;
26755   ;
26756   return 0;
26757 }
26758 _ACEOF
26759 rm -f "conftest.$ac_objext"
26760 if { (eval echo "$as_me:26760: \"$ac_compile\"") >&5
26761   (eval $ac_compile) 2>&5
26762   ac_status=$?
26763   echo "$as_me:26763: \$? = $ac_status" >&5
26764   (exit "$ac_status"); } &&
26765          { ac_try='test -s "conftest.$ac_objext"'
26766   { (eval echo "$as_me:26766: \"$ac_try\"") >&5
26767   (eval $ac_try) 2>&5
26768   ac_status=$?
26769   echo "$as_me:26769: \$? = $ac_status" >&5
26770   (exit "$ac_status"); }; }; then
26771   ac_cv_type_bool=yes
26772 else
26773   echo "$as_me: failed program was:" >&5
26774 cat "conftest.$ac_ext" >&5
26775 ac_cv_type_bool=no
26776 fi
26777 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26778 fi
26779 echo "$as_me:26779: result: $ac_cv_type_bool" >&5
26780 echo "${ECHO_T}$ac_cv_type_bool" >&6
26781
26782 echo "$as_me:26782: checking size of bool" >&5
26783 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26784 if test "${ac_cv_sizeof_bool+set}" = set; then
26785   echo $ECHO_N "(cached) $ECHO_C" >&6
26786 else
26787   if test "$ac_cv_type_bool" = yes; then
26788   if test "$cross_compiling" = yes; then
26789   # Depending upon the size, compute the lo and hi bounds.
26790 cat >"conftest.$ac_ext" <<_ACEOF
26791 #line 26791 "configure"
26792 #include "confdefs.h"
26793
26794 $ac_includes_default
26795
26796 #if defined(__cplusplus)
26797
26798 #ifdef HAVE_GXX_BUILTIN_H
26799 #include <g++/builtin.h>
26800 #elif HAVE_GPP_BUILTIN_H
26801 #include <gpp/builtin.h>
26802 #elif HAVE_BUILTIN_H
26803 #include <builtin.h>
26804 #endif
26805
26806 #else
26807
26808 #if $cf_cv_header_stdbool_h
26809 #include <stdbool.h>
26810 #endif
26811
26812 #endif
26813
26814 int
26815 main (void)
26816 {
26817 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26818   ;
26819   return 0;
26820 }
26821 _ACEOF
26822 rm -f "conftest.$ac_objext"
26823 if { (eval echo "$as_me:26823: \"$ac_compile\"") >&5
26824   (eval $ac_compile) 2>&5
26825   ac_status=$?
26826   echo "$as_me:26826: \$? = $ac_status" >&5
26827   (exit "$ac_status"); } &&
26828          { ac_try='test -s "conftest.$ac_objext"'
26829   { (eval echo "$as_me:26829: \"$ac_try\"") >&5
26830   (eval $ac_try) 2>&5
26831   ac_status=$?
26832   echo "$as_me:26832: \$? = $ac_status" >&5
26833   (exit "$ac_status"); }; }; then
26834   ac_lo=0 ac_mid=0
26835   while :; do
26836     cat >"conftest.$ac_ext" <<_ACEOF
26837 #line 26837 "configure"
26838 #include "confdefs.h"
26839
26840 $ac_includes_default
26841
26842 #if defined(__cplusplus)
26843
26844 #ifdef HAVE_GXX_BUILTIN_H
26845 #include <g++/builtin.h>
26846 #elif HAVE_GPP_BUILTIN_H
26847 #include <gpp/builtin.h>
26848 #elif HAVE_BUILTIN_H
26849 #include <builtin.h>
26850 #endif
26851
26852 #else
26853
26854 #if $cf_cv_header_stdbool_h
26855 #include <stdbool.h>
26856 #endif
26857
26858 #endif
26859
26860 int
26861 main (void)
26862 {
26863 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26864   ;
26865   return 0;
26866 }
26867 _ACEOF
26868 rm -f "conftest.$ac_objext"
26869 if { (eval echo "$as_me:26869: \"$ac_compile\"") >&5
26870   (eval $ac_compile) 2>&5
26871   ac_status=$?
26872   echo "$as_me:26872: \$? = $ac_status" >&5
26873   (exit "$ac_status"); } &&
26874          { ac_try='test -s "conftest.$ac_objext"'
26875   { (eval echo "$as_me:26875: \"$ac_try\"") >&5
26876   (eval $ac_try) 2>&5
26877   ac_status=$?
26878   echo "$as_me:26878: \$? = $ac_status" >&5
26879   (exit "$ac_status"); }; }; then
26880   ac_hi=$ac_mid; break
26881 else
26882   echo "$as_me: failed program was:" >&5
26883 cat "conftest.$ac_ext" >&5
26884 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26885 fi
26886 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26887   done
26888 else
26889   echo "$as_me: failed program was:" >&5
26890 cat "conftest.$ac_ext" >&5
26891 ac_hi=-1 ac_mid=-1
26892   while :; do
26893     cat >"conftest.$ac_ext" <<_ACEOF
26894 #line 26894 "configure"
26895 #include "confdefs.h"
26896
26897 $ac_includes_default
26898
26899 #if defined(__cplusplus)
26900
26901 #ifdef HAVE_GXX_BUILTIN_H
26902 #include <g++/builtin.h>
26903 #elif HAVE_GPP_BUILTIN_H
26904 #include <gpp/builtin.h>
26905 #elif HAVE_BUILTIN_H
26906 #include <builtin.h>
26907 #endif
26908
26909 #else
26910
26911 #if $cf_cv_header_stdbool_h
26912 #include <stdbool.h>
26913 #endif
26914
26915 #endif
26916
26917 int
26918 main (void)
26919 {
26920 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26921   ;
26922   return 0;
26923 }
26924 _ACEOF
26925 rm -f "conftest.$ac_objext"
26926 if { (eval echo "$as_me:26926: \"$ac_compile\"") >&5
26927   (eval $ac_compile) 2>&5
26928   ac_status=$?
26929   echo "$as_me:26929: \$? = $ac_status" >&5
26930   (exit "$ac_status"); } &&
26931          { ac_try='test -s "conftest.$ac_objext"'
26932   { (eval echo "$as_me:26932: \"$ac_try\"") >&5
26933   (eval $ac_try) 2>&5
26934   ac_status=$?
26935   echo "$as_me:26935: \$? = $ac_status" >&5
26936   (exit "$ac_status"); }; }; then
26937   ac_lo=$ac_mid; break
26938 else
26939   echo "$as_me: failed program was:" >&5
26940 cat "conftest.$ac_ext" >&5
26941 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26942 fi
26943 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26944   done
26945 fi
26946 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26947 # Binary search between lo and hi bounds.
26948 while test "x$ac_lo" != "x$ac_hi"; do
26949   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26950   cat >"conftest.$ac_ext" <<_ACEOF
26951 #line 26951 "configure"
26952 #include "confdefs.h"
26953
26954 $ac_includes_default
26955
26956 #if defined(__cplusplus)
26957
26958 #ifdef HAVE_GXX_BUILTIN_H
26959 #include <g++/builtin.h>
26960 #elif HAVE_GPP_BUILTIN_H
26961 #include <gpp/builtin.h>
26962 #elif HAVE_BUILTIN_H
26963 #include <builtin.h>
26964 #endif
26965
26966 #else
26967
26968 #if $cf_cv_header_stdbool_h
26969 #include <stdbool.h>
26970 #endif
26971
26972 #endif
26973
26974 int
26975 main (void)
26976 {
26977 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26978   ;
26979   return 0;
26980 }
26981 _ACEOF
26982 rm -f "conftest.$ac_objext"
26983 if { (eval echo "$as_me:26983: \"$ac_compile\"") >&5
26984   (eval $ac_compile) 2>&5
26985   ac_status=$?
26986   echo "$as_me:26986: \$? = $ac_status" >&5
26987   (exit "$ac_status"); } &&
26988          { ac_try='test -s "conftest.$ac_objext"'
26989   { (eval echo "$as_me:26989: \"$ac_try\"") >&5
26990   (eval $ac_try) 2>&5
26991   ac_status=$?
26992   echo "$as_me:26992: \$? = $ac_status" >&5
26993   (exit "$ac_status"); }; }; then
26994   ac_hi=$ac_mid
26995 else
26996   echo "$as_me: failed program was:" >&5
26997 cat "conftest.$ac_ext" >&5
26998 ac_lo=`expr "$ac_mid" + 1`
26999 fi
27000 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27001 done
27002 ac_cv_sizeof_bool=$ac_lo
27003 else
27004   if test "$cross_compiling" = yes; then
27005   { { echo "$as_me:27005: error: cannot run test program while cross compiling" >&5
27006 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27007    { (exit 1); exit 1; }; }
27008 else
27009   cat >"conftest.$ac_ext" <<_ACEOF
27010 #line 27010 "configure"
27011 #include "confdefs.h"
27012
27013 $ac_includes_default
27014
27015 #if defined(__cplusplus)
27016
27017 #ifdef HAVE_GXX_BUILTIN_H
27018 #include <g++/builtin.h>
27019 #elif HAVE_GPP_BUILTIN_H
27020 #include <gpp/builtin.h>
27021 #elif HAVE_BUILTIN_H
27022 #include <builtin.h>
27023 #endif
27024
27025 #else
27026
27027 #if $cf_cv_header_stdbool_h
27028 #include <stdbool.h>
27029 #endif
27030
27031 #endif
27032
27033 int
27034 main (void)
27035 {
27036 FILE *f = fopen ("conftest.val", "w");
27037 if (!f)
27038   $ac_main_return (1);
27039 fprintf (f, "%ld", (long)(sizeof (bool)));
27040 fclose (f);
27041   ;
27042   return 0;
27043 }
27044 _ACEOF
27045 rm -f "conftest$ac_exeext"
27046 if { (eval echo "$as_me:27046: \"$ac_link\"") >&5
27047   (eval $ac_link) 2>&5
27048   ac_status=$?
27049   echo "$as_me:27049: \$? = $ac_status" >&5
27050   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27051   { (eval echo "$as_me:27051: \"$ac_try\"") >&5
27052   (eval $ac_try) 2>&5
27053   ac_status=$?
27054   echo "$as_me:27054: \$? = $ac_status" >&5
27055   (exit "$ac_status"); }; }; then
27056   ac_cv_sizeof_bool=`cat conftest.val`
27057 else
27058   echo "$as_me: program exited with status $ac_status" >&5
27059 echo "$as_me: failed program was:" >&5
27060 cat "conftest.$ac_ext" >&5
27061 fi
27062 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27063 fi
27064 fi
27065 rm -f conftest.val
27066 else
27067   ac_cv_sizeof_bool=0
27068 fi
27069 fi
27070 echo "$as_me:27070: result: $ac_cv_sizeof_bool" >&5
27071 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27072 cat >>confdefs.h <<EOF
27073 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27074 EOF
27075
27076 echo "$as_me:27076: checking for type of bool" >&5
27077 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27078 if test "${cf_cv_type_of_bool+set}" = set; then
27079   echo $ECHO_N "(cached) $ECHO_C" >&6
27080 else
27081
27082         rm -f cf_test.out
27083         if test "$cross_compiling" = yes; then
27084
27085                 case x$ac_cv_sizeof_bool in
27086                 (x1) cf_cv_type_of_bool="unsigned char";;
27087                 (x2) cf_cv_type_of_bool="unsigned short";;
27088                 (x4) cf_cv_type_of_bool="unsigned int";;
27089                 (x8) cf_cv_type_of_bool="unsigned long";;
27090                 (*)  cf_cv_type_of_bool=unknown;;
27091                 esac
27092
27093 else
27094   cat >"conftest.$ac_ext" <<_ACEOF
27095 #line 27095 "configure"
27096 #include "confdefs.h"
27097
27098 $ac_includes_default
27099
27100 #if defined(__cplusplus)
27101
27102 #ifdef HAVE_GXX_BUILTIN_H
27103 #include <g++/builtin.h>
27104 #elif HAVE_GPP_BUILTIN_H
27105 #include <gpp/builtin.h>
27106 #elif HAVE_BUILTIN_H
27107 #include <builtin.h>
27108 #endif
27109
27110 #else
27111
27112 #if $cf_cv_header_stdbool_h
27113 #include <stdbool.h>
27114 #endif
27115
27116 #endif
27117
27118 int main(void)
27119 {
27120         FILE *fp = fopen("cf_test.out", "w");
27121         if (fp != 0) {
27122                 bool x = true;
27123                 if ((bool)(-x) >= 0)
27124                         fputs("unsigned ", fp);
27125                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27126                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27127                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27128                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27129                 fclose(fp);
27130         }
27131         ${cf_cv_main_return:-return}(0);
27132 }
27133
27134 _ACEOF
27135 rm -f "conftest$ac_exeext"
27136 if { (eval echo "$as_me:27136: \"$ac_link\"") >&5
27137   (eval $ac_link) 2>&5
27138   ac_status=$?
27139   echo "$as_me:27139: \$? = $ac_status" >&5
27140   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27141   { (eval echo "$as_me:27141: \"$ac_try\"") >&5
27142   (eval $ac_try) 2>&5
27143   ac_status=$?
27144   echo "$as_me:27144: \$? = $ac_status" >&5
27145   (exit "$ac_status"); }; }; then
27146   cf_cv_type_of_bool=`cat cf_test.out`
27147                  if test -z "$cf_cv_type_of_bool"; then
27148                    cf_cv_type_of_bool=unknown
27149                  fi
27150 else
27151   echo "$as_me: program exited with status $ac_status" >&5
27152 echo "$as_me: failed program was:" >&5
27153 cat "conftest.$ac_ext" >&5
27154 cf_cv_type_of_bool=unknown
27155 fi
27156 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27157 fi
27158         rm -f cf_test.out
27159
27160 fi
27161 echo "$as_me:27161: result: $cf_cv_type_of_bool" >&5
27162 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27163
27164 if test "$cf_cv_type_of_bool" = unknown ; then
27165         case .$NCURSES_BOOL in
27166         (.auto|.) NCURSES_BOOL=unsigned;;
27167         esac
27168         { echo "$as_me:27168: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27169 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27170         cf_cv_type_of_bool=$NCURSES_BOOL
27171 fi
27172
27173                 else
27174                         echo "$as_me:27174: checking for fallback type of bool" >&5
27175 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27176                         case "$host_cpu" in
27177                         (i?86)  cf_cv_type_of_bool=char ;;
27178                         (*)     cf_cv_type_of_bool=int  ;;
27179                         esac
27180                         echo "$as_me:27180: result: $cf_cv_type_of_bool" >&5
27181 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27182                 fi
27183         fi
27184 fi
27185
27186 # If the C compiler did not declare bool, and we did not determine that the C++
27187 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27188 # ncurses library use the same type as C++ bool.  Note that this allows one to
27189 # specify the type of bool in a configure-script option and postpone
27190 # integration with the C++ compiler provided that the types are compatible.
27191 USE_CXX_BOOL=1
27192 if test "$cf_cv_cc_bool_type" = 1
27193 then
27194         # oops: C has a bool.  Unlikely, but C++ could differ.
27195         USE_CXX_BOOL=0
27196 elif test "$cf_cv_builtin_bool" = 0
27197 then
27198         # C++ has no bool
27199         USE_CXX_BOOL=0
27200 else
27201         # this is the normal case
27202         USE_CXX_BOOL='defined(__cplusplus)'
27203 fi
27204
27205 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27206
27207         if test "$cf_with_ada" != "no" ; then
27208                 if test "$with_libtool" != "no"; then
27209                         { echo "$as_me:27209: WARNING: libtool does not support Ada - disabling feature" >&5
27210 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27211                         cf_with_ada=no
27212                 fi
27213         fi
27214
27215         if test "$cf_with_ada" != "no" ; then
27216
27217 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27218 do
27219
27220 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27221
27222         unset ac_cv_path_cf_TEMP_gnat
27223         unset cf_TEMP_gnat
27224         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27225 set dummy $cf_prog_gnat; ac_word=$2
27226 echo "$as_me:27226: checking for $ac_word" >&5
27227 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27228 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27229   echo $ECHO_N "(cached) $ECHO_C" >&6
27230 else
27231   case $cf_TEMP_gnat in
27232   [\\/]* | ?:[\\/]*)
27233   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27234   ;;
27235   *)
27236   ac_save_IFS=$IFS; IFS=$ac_path_separator
27237 ac_dummy="$PATH"
27238 for ac_dir in $ac_dummy; do
27239   IFS=$ac_save_IFS
27240   test -z "$ac_dir" && ac_dir=.
27241   if $as_executable_p "$ac_dir/$ac_word"; then
27242    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27243    echo "$as_me:27243: found $ac_dir/$ac_word" >&5
27244    break
27245 fi
27246 done
27247
27248   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27249   ;;
27250 esac
27251 fi
27252 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27253
27254 if test -n "$cf_TEMP_gnat"; then
27255   echo "$as_me:27255: result: $cf_TEMP_gnat" >&5
27256 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27257 else
27258   echo "$as_me:27258: result: no" >&5
27259 echo "${ECHO_T}no" >&6
27260 fi
27261
27262         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27263
27264         if test "x$cf_TEMP_gnat" != xno; then
27265                 unset cf_cv_gnat_version
27266                 unset cf_TEMP_gnat
27267
27268 echo "$as_me:27268: checking for $cf_prog_gnat version" >&5
27269 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27270 if test "${cf_cv_gnat_version+set}" = set; then
27271   echo $ECHO_N "(cached) $ECHO_C" >&6
27272 else
27273
27274 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27275         grep '[0-9].[0-9][0-9]*' |\
27276         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27277
27278 fi
27279 echo "$as_me:27279: result: $cf_cv_gnat_version" >&5
27280 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27281 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27282 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27283
27284         fi
27285         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27286
27287         unset cf_TEMP_gnat
27288         unset cf_cv_gnat_version
27289         unset ac_cv_path_cf_TEMP_gnat
27290 done
27291
27292 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27293         cf_ada_make=
27294         cf_cv_prog_gnat_correct=no
27295 else
27296         cf_ada_make=gnatmake
27297         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27298                 # gprconfig is newer than gnatmake; we can continue...
27299                 cf_ada_config="##"
27300         else
27301                 rm -rf ./conftest* ./*~conftest*
27302                 if mkdir conftest.src
27303                 then
27304                         cf_ada_config=""
27305                         cd conftest.src
27306                         for cf_gprconfig in Ada C
27307                         do
27308                                 echo "$as_me:27308: checking for gprconfig name for $cf_gprconfig" >&5
27309 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27310                                 if test "$cf_gprconfig" = C
27311                                 then
27312                                         for cf_gprconfig_param in \
27313                                                 "$cf_gprconfig,,,,GNATGCC" \
27314                                                 "$cf_gprconfig,,,,GCC" \
27315                                                 "$cf_gprconfig"
27316                                         do
27317                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27318                                                 test -n "$cf_gprconfig_value" && break
27319                                         done
27320                                 else
27321                                         cf_gprconfig_param=$cf_gprconfig
27322                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27323                                 fi
27324                                 if test -n "$cf_gprconfig_value"
27325                                 then
27326                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27327                                         echo "$as_me:27327: result: $cf_gprconfig_value" >&5
27328 echo "${ECHO_T}$cf_gprconfig_value" >&6
27329                                 else
27330                                         echo "$as_me:27330: result: missing" >&5
27331 echo "${ECHO_T}missing" >&6
27332                                         cf_ada_config="#"
27333                                         break
27334                                 fi
27335                         done
27336                         cd ..
27337                         rm -rf ./conftest* ./*~conftest*
27338                 fi
27339         fi
27340         if test "x$cf_ada_config" != "x#"
27341         then
27342
27343 echo "$as_me:27343: checking for gnat version" >&5
27344 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27345 if test "${cf_cv_gnat_version+set}" = set; then
27346   echo $ECHO_N "(cached) $ECHO_C" >&6
27347 else
27348
27349 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27350         grep '[0-9].[0-9][0-9]*' |\
27351         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27352
27353 fi
27354 echo "$as_me:27354: result: $cf_cv_gnat_version" >&5
27355 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27356 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27357
27358 case "$cf_cv_gnat_version" in
27359 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27360         cf_cv_prog_gnat_correct=yes
27361         ;;
27362 (*)
27363         { echo "$as_me:27363: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27364 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27365         cf_cv_prog_gnat_correct=no
27366         ;;
27367 esac
27368
27369                 # Extract the first word of "m4", so it can be a program name with args.
27370 set dummy m4; ac_word=$2
27371 echo "$as_me:27371: checking for $ac_word" >&5
27372 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27373 if test "${ac_cv_prog_M4_exists+set}" = set; then
27374   echo $ECHO_N "(cached) $ECHO_C" >&6
27375 else
27376   if test -n "$M4_exists"; then
27377   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27378 else
27379   ac_save_IFS=$IFS; IFS=$ac_path_separator
27380 ac_dummy="$PATH"
27381 for ac_dir in $ac_dummy; do
27382   IFS=$ac_save_IFS
27383   test -z "$ac_dir" && ac_dir=.
27384   $as_executable_p "$ac_dir/$ac_word" || continue
27385 ac_cv_prog_M4_exists="yes"
27386 echo "$as_me:27386: found $ac_dir/$ac_word" >&5
27387 break
27388 done
27389
27390   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27391 fi
27392 fi
27393 M4_exists=$ac_cv_prog_M4_exists
27394 if test -n "$M4_exists"; then
27395   echo "$as_me:27395: result: $M4_exists" >&5
27396 echo "${ECHO_T}$M4_exists" >&6
27397 else
27398   echo "$as_me:27398: result: no" >&5
27399 echo "${ECHO_T}no" >&6
27400 fi
27401
27402                 if test "$ac_cv_prog_M4_exists" = no; then
27403                         cf_cv_prog_gnat_correct=no
27404                         { echo "$as_me:27404: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27405 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27406                 fi
27407                 if test "$cf_cv_prog_gnat_correct" = yes; then
27408                         echo "$as_me:27408: checking if GNAT works" >&5
27409 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27410
27411 rm -rf ./conftest* ./*~conftest*
27412 cat >>conftest.ads <<CF_EOF
27413 procedure conftest;
27414 CF_EOF
27415 cat >>conftest.adb <<CF_EOF
27416 with Text_IO;
27417 with GNAT.OS_Lib;
27418 procedure conftest is
27419 begin
27420    Text_IO.Put ("Hello World");
27421    Text_IO.New_Line;
27422    GNAT.OS_Lib.OS_Exit (0);
27423 end conftest;
27424 CF_EOF
27425 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27426    if ( ./conftest 1>&5 2>&1 ) ; then
27427       cf_cv_prog_gnat_correct=yes
27428    else
27429       cf_cv_prog_gnat_correct=no
27430    fi
27431 else
27432    cf_cv_prog_gnat_correct=no
27433 fi
27434 rm -rf ./conftest* ./*~conftest*
27435
27436                         echo "$as_me:27436: result: $cf_cv_prog_gnat_correct" >&5
27437 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27438                 fi
27439         else
27440                 cf_cv_prog_gnat_correct=no
27441         fi
27442 fi
27443
27444                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27445
27446         ADAFLAGS="$ADAFLAGS -gnatpn"
27447
27448         echo "$as_me:27448: checking optimization options for ADAFLAGS" >&5
27449 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27450         case "$CFLAGS" in
27451         (*-g*)
27452
27453         ADAFLAGS="$ADAFLAGS -g"
27454
27455                 ;;
27456         esac
27457         case "$CFLAGS" in
27458         (*-O*)
27459                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27460
27461         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27462
27463                 ;;
27464         esac
27465         echo "$as_me:27465: result: $ADAFLAGS" >&5
27466 echo "${ECHO_T}$ADAFLAGS" >&6
27467
27468 echo "$as_me:27468: checking if GNATPREP supports -T option" >&5
27469 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27470 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27471   echo $ECHO_N "(cached) $ECHO_C" >&6
27472 else
27473
27474 cf_cv_gnatprep_opt_t=no
27475 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27476
27477 fi
27478 echo "$as_me:27478: result: $cf_cv_gnatprep_opt_t" >&5
27479 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27480 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27481
27482 echo "$as_me:27482: checking if GNAT supports generics" >&5
27483 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27484 case "$cf_cv_gnat_version" in
27485 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27486         cf_gnat_generics=yes
27487         ;;
27488 (*)
27489         cf_gnat_generics=no
27490         ;;
27491 esac
27492 echo "$as_me:27492: result: $cf_gnat_generics" >&5
27493 echo "${ECHO_T}$cf_gnat_generics" >&6
27494
27495 if test "$cf_gnat_generics" = yes
27496 then
27497         cf_compile_generics=generics
27498         cf_generic_objects="\${GENOBJS}"
27499 else
27500         cf_compile_generics=
27501         cf_generic_objects=
27502 fi
27503
27504 echo "$as_me:27504: checking if GNAT supports SIGINT" >&5
27505 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27506 if test "${cf_cv_gnat_sigint+set}" = set; then
27507   echo $ECHO_N "(cached) $ECHO_C" >&6
27508 else
27509
27510 rm -rf ./conftest* ./*~conftest*
27511 cat >>conftest.ads <<CF_EOF
27512 with Ada.Interrupts.Names;
27513
27514 package ConfTest is
27515
27516    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27517    pragma Unreserve_All_Interrupts;
27518    pragma Warnings (On);
27519
27520    protected Process is
27521       procedure Stop;
27522       function Continue return Boolean;
27523       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27524    private
27525       Done : Boolean := False;
27526    end Process;
27527
27528 end ConfTest;
27529 CF_EOF
27530 cat >>conftest.adb <<CF_EOF
27531 package body ConfTest is
27532    protected body Process is
27533       procedure Stop is
27534       begin
27535          Done := True;
27536       end Stop;
27537       function Continue return Boolean is
27538       begin
27539          return not Done;
27540       end Continue;
27541    end Process;
27542 end ConfTest;
27543 CF_EOF
27544 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27545       cf_cv_gnat_sigint=yes
27546 else
27547    cf_cv_gnat_sigint=no
27548 fi
27549 rm -rf ./conftest* ./*~conftest*
27550
27551 fi
27552 echo "$as_me:27552: result: $cf_cv_gnat_sigint" >&5
27553 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27554
27555 if test "$cf_cv_gnat_sigint" = yes ; then
27556         USE_GNAT_SIGINT=""
27557 else
27558         USE_GNAT_SIGINT="#"
27559 fi
27560
27561 cf_gnat_libraries=no
27562 cf_gnat_projects=no
27563
27564 if test "$enable_gnat_projects" != no ; then
27565 echo "$as_me:27565: checking if GNAT supports project files" >&5
27566 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27567 case "$cf_cv_gnat_version" in
27568 (3.[0-9]*)
27569         ;;
27570 (*)
27571         case "$cf_cv_system_name" in
27572         (cygwin*|msys*)
27573                 ;;
27574         (*)
27575                 rm -rf ./conftest* ./*~conftest*
27576                 if mkdir conftest.src conftest.bin conftest.lib
27577                 then
27578                         cd conftest.src
27579                         rm -rf ./conftest* ./*~conftest*
27580                         cat >>library.gpr <<CF_EOF
27581 project Library is
27582   Kind := External ("LIB_KIND");
27583   for Library_Name use "ConfTest";
27584   for Object_Dir use ".";
27585   for Library_ALI_Dir use External("LIBRARY_DIR");
27586   for Library_Version use External ("SONAME");
27587   for Library_Kind use Kind;
27588   for Library_Dir use External("BUILD_DIR");
27589   Source_Dir := External ("SOURCE_DIR");
27590   for Source_Dirs use (Source_Dir);
27591 end Library;
27592 CF_EOF
27593                         cat >>confpackage.ads <<CF_EOF
27594 package ConfPackage is
27595    procedure conftest;
27596 end ConfPackage;
27597 CF_EOF
27598                         cat >>confpackage.adb <<CF_EOF
27599 with Text_IO;
27600 package body ConfPackage is
27601    procedure conftest is
27602    begin
27603       Text_IO.Put ("Hello World");
27604       Text_IO.New_Line;
27605    end conftest;
27606 end ConfPackage;
27607 CF_EOF
27608                         if ( "$cf_ada_make" $ADAFLAGS \
27609                                         -Plibrary.gpr \
27610                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27611                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27612                                         -XSOURCE_DIR="`pwd`" \
27613                                         -XSONAME=libConfTest.so.1 \
27614                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27615                                 cf_gnat_projects=yes
27616                         fi
27617                         cd ..
27618                 fi
27619                 if test -f conftest.lib/confpackage.ali
27620                 then
27621                         cf_gnat_libraries=yes
27622                 fi
27623                 rm -rf ./conftest* ./*~conftest*
27624                 ;;
27625         esac
27626         ;;
27627 esac
27628 echo "$as_me:27628: result: $cf_gnat_projects" >&5
27629 echo "${ECHO_T}$cf_gnat_projects" >&6
27630 fi # enable_gnat_projects
27631
27632 if test "$cf_gnat_projects" = yes
27633 then
27634         echo "$as_me:27634: checking if GNAT supports libraries" >&5
27635 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27636         echo "$as_me:27636: result: $cf_gnat_libraries" >&5
27637 echo "${ECHO_T}$cf_gnat_libraries" >&6
27638 fi
27639
27640 USE_OLD_MAKERULES=""
27641 USE_GNAT_PROJECTS="#"
27642 USE_GNAT_MAKE_GPR="#"
27643 USE_GNAT_GPRBUILD="#"
27644
27645 if test "$cf_gnat_projects" = yes
27646 then
27647         USE_OLD_MAKERULES="#"
27648         USE_GNAT_PROJECTS=""
27649         if test "$cf_cv_VERSION_GPRBUILD" != no
27650         then
27651                 USE_GNAT_GPRBUILD=""
27652         elif test "$cf_cv_VERSION_GNATMAKE" != no
27653         then
27654                 USE_GNAT_MAKE_GPR=""
27655         else
27656                 { echo "$as_me:27656: WARNING: use old makefile rules since tools are missing" >&5
27657 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27658         fi
27659 fi
27660
27661 if test "$cf_gnat_libraries" = yes
27662 then
27663         USE_GNAT_LIBRARIES=""
27664 else
27665         USE_GNAT_LIBRARIES="#"
27666 fi
27667
27668 echo "$as_me:27668: checking for ada-compiler" >&5
27669 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27670
27671 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27672 if test "${with_ada_compiler+set}" = set; then
27673   withval="$with_ada_compiler"
27674   cf_ada_compiler=$withval
27675 else
27676   cf_ada_compiler=gnatmake
27677 fi;
27678
27679 echo "$as_me:27679: result: $cf_ada_compiler" >&5
27680 echo "${ECHO_T}$cf_ada_compiler" >&6
27681
27682                         cf_ada_package=terminal_interface
27683
27684 echo "$as_me:27684: checking for ada-include" >&5
27685 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27686
27687 # Check whether --with-ada-include or --without-ada-include was given.
27688 if test "${with_ada_include+set}" = set; then
27689   withval="$with_ada_include"
27690
27691 else
27692   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27693 fi; if test -n "$prefix/share/ada/adainclude" ; then
27694
27695 if test "x$prefix" != xNONE; then
27696         cf_path_syntax="$prefix"
27697 else
27698         cf_path_syntax="$ac_default_prefix"
27699 fi
27700
27701 case ".$withval" in
27702 (.\$\(*\)*|.\'*\'*)
27703         ;;
27704 (..|./*|.\\*)
27705         ;;
27706 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27707         ;;
27708 (.\$\{*prefix\}*|.\$\{*dir\}*)
27709         eval withval="$withval"
27710         case ".$withval" in
27711         (.NONE/*)
27712                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27713                 ;;
27714         esac
27715         ;;
27716 (.no|.NONE/*)
27717         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27718         ;;
27719 (*)
27720         { { echo "$as_me:27720: error: expected a pathname, not \"$withval\"" >&5
27721 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27722    { (exit 1); exit 1; }; }
27723         ;;
27724 esac
27725
27726 fi
27727 eval ADA_INCLUDE="$withval"
27728
27729 echo "$as_me:27729: result: $ADA_INCLUDE" >&5
27730 echo "${ECHO_T}$ADA_INCLUDE" >&6
27731
27732 echo "$as_me:27732: checking for ada-objects" >&5
27733 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27734
27735 # Check whether --with-ada-objects or --without-ada-objects was given.
27736 if test "${with_ada_objects+set}" = set; then
27737   withval="$with_ada_objects"
27738
27739 else
27740   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27741 fi; if test -n "$prefix/lib/ada/adalib" ; then
27742
27743 if test "x$prefix" != xNONE; then
27744         cf_path_syntax="$prefix"
27745 else
27746         cf_path_syntax="$ac_default_prefix"
27747 fi
27748
27749 case ".$withval" in
27750 (.\$\(*\)*|.\'*\'*)
27751         ;;
27752 (..|./*|.\\*)
27753         ;;
27754 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27755         ;;
27756 (.\$\{*prefix\}*|.\$\{*dir\}*)
27757         eval withval="$withval"
27758         case ".$withval" in
27759         (.NONE/*)
27760                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27761                 ;;
27762         esac
27763         ;;
27764 (.no|.NONE/*)
27765         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27766         ;;
27767 (*)
27768         { { echo "$as_me:27768: error: expected a pathname, not \"$withval\"" >&5
27769 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27770    { (exit 1); exit 1; }; }
27771         ;;
27772 esac
27773
27774 fi
27775 eval ADA_OBJECTS="$withval"
27776
27777 echo "$as_me:27777: result: $ADA_OBJECTS" >&5
27778 echo "${ECHO_T}$ADA_OBJECTS" >&6
27779
27780 echo "$as_me:27780: checking if an Ada95 shared-library should be built" >&5
27781 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27782
27783 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27784 if test "${with_ada_sharedlib+set}" = set; then
27785   withval="$with_ada_sharedlib"
27786   with_ada_sharedlib=$withval
27787 else
27788   with_ada_sharedlib=no
27789 fi;
27790 echo "$as_me:27790: result: $with_ada_sharedlib" >&5
27791 echo "${ECHO_T}$with_ada_sharedlib" >&6
27792
27793 if test "x$with_ada_sharedlib" != xno
27794 then
27795         if test "x$cf_gnat_projects" != xyes
27796         then
27797                 { echo "$as_me:27797: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27798 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27799                 with_ada_sharedlib=no
27800         fi
27801 fi
27802
27803 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27804 MAKE_ADA_SHAREDLIB="#"
27805
27806 if test "x$with_ada_sharedlib" != xno
27807 then
27808         MAKE_ADA_SHAREDLIB=
27809         if test "x$with_ada_sharedlib" != xyes
27810         then
27811                 ADA_SHAREDLIB="$with_ada_sharedlib"
27812         fi
27813 fi
27814
27815                         # allow the Ada binding to be renamed
27816
27817 echo "$as_me:27817: checking for ada-libname" >&5
27818 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27819
27820 # Check whether --with-ada-libname or --without-ada-libname was given.
27821 if test "${with_ada_libname+set}" = set; then
27822   withval="$with_ada_libname"
27823   ADA_LIBNAME=$withval
27824 else
27825   ADA_LIBNAME=AdaCurses
27826 fi;
27827 case "x$ADA_LIBNAME" in
27828 (x|xyes|xno)
27829         ADA_LIBNAME=AdaCurses
27830         ;;
27831 esac
27832
27833 echo "$as_me:27833: result: $ADA_LIBNAME" >&5
27834 echo "${ECHO_T}$ADA_LIBNAME" >&6
27835
27836                 fi
27837         fi
27838 else
27839         cf_with_ada=no
27840 fi
27841
27842 # do this "late" to avoid conflict with header-checks
27843 if test "x$with_widec" = xyes ; then
27844         echo "$as_me:27844: checking for wchar_t" >&5
27845 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27846 if test "${ac_cv_type_wchar_t+set}" = set; then
27847   echo $ECHO_N "(cached) $ECHO_C" >&6
27848 else
27849   cat >"conftest.$ac_ext" <<_ACEOF
27850 #line 27850 "configure"
27851 #include "confdefs.h"
27852 $ac_includes_default
27853 int
27854 main (void)
27855 {
27856 if ((wchar_t *) 0)
27857   return 0;
27858 if (sizeof (wchar_t))
27859   return 0;
27860   ;
27861   return 0;
27862 }
27863 _ACEOF
27864 rm -f "conftest.$ac_objext"
27865 if { (eval echo "$as_me:27865: \"$ac_compile\"") >&5
27866   (eval $ac_compile) 2>&5
27867   ac_status=$?
27868   echo "$as_me:27868: \$? = $ac_status" >&5
27869   (exit "$ac_status"); } &&
27870          { ac_try='test -s "conftest.$ac_objext"'
27871   { (eval echo "$as_me:27871: \"$ac_try\"") >&5
27872   (eval $ac_try) 2>&5
27873   ac_status=$?
27874   echo "$as_me:27874: \$? = $ac_status" >&5
27875   (exit "$ac_status"); }; }; then
27876   ac_cv_type_wchar_t=yes
27877 else
27878   echo "$as_me: failed program was:" >&5
27879 cat "conftest.$ac_ext" >&5
27880 ac_cv_type_wchar_t=no
27881 fi
27882 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27883 fi
27884 echo "$as_me:27884: result: $ac_cv_type_wchar_t" >&5
27885 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27886
27887 echo "$as_me:27887: checking size of wchar_t" >&5
27888 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27889 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27890   echo $ECHO_N "(cached) $ECHO_C" >&6
27891 else
27892   if test "$ac_cv_type_wchar_t" = yes; then
27893   if test "$cross_compiling" = yes; then
27894   # Depending upon the size, compute the lo and hi bounds.
27895 cat >"conftest.$ac_ext" <<_ACEOF
27896 #line 27896 "configure"
27897 #include "confdefs.h"
27898 $ac_includes_default
27899 int
27900 main (void)
27901 {
27902 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27903   ;
27904   return 0;
27905 }
27906 _ACEOF
27907 rm -f "conftest.$ac_objext"
27908 if { (eval echo "$as_me:27908: \"$ac_compile\"") >&5
27909   (eval $ac_compile) 2>&5
27910   ac_status=$?
27911   echo "$as_me:27911: \$? = $ac_status" >&5
27912   (exit "$ac_status"); } &&
27913          { ac_try='test -s "conftest.$ac_objext"'
27914   { (eval echo "$as_me:27914: \"$ac_try\"") >&5
27915   (eval $ac_try) 2>&5
27916   ac_status=$?
27917   echo "$as_me:27917: \$? = $ac_status" >&5
27918   (exit "$ac_status"); }; }; then
27919   ac_lo=0 ac_mid=0
27920   while :; do
27921     cat >"conftest.$ac_ext" <<_ACEOF
27922 #line 27922 "configure"
27923 #include "confdefs.h"
27924 $ac_includes_default
27925 int
27926 main (void)
27927 {
27928 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27929   ;
27930   return 0;
27931 }
27932 _ACEOF
27933 rm -f "conftest.$ac_objext"
27934 if { (eval echo "$as_me:27934: \"$ac_compile\"") >&5
27935   (eval $ac_compile) 2>&5
27936   ac_status=$?
27937   echo "$as_me:27937: \$? = $ac_status" >&5
27938   (exit "$ac_status"); } &&
27939          { ac_try='test -s "conftest.$ac_objext"'
27940   { (eval echo "$as_me:27940: \"$ac_try\"") >&5
27941   (eval $ac_try) 2>&5
27942   ac_status=$?
27943   echo "$as_me:27943: \$? = $ac_status" >&5
27944   (exit "$ac_status"); }; }; then
27945   ac_hi=$ac_mid; break
27946 else
27947   echo "$as_me: failed program was:" >&5
27948 cat "conftest.$ac_ext" >&5
27949 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27950 fi
27951 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27952   done
27953 else
27954   echo "$as_me: failed program was:" >&5
27955 cat "conftest.$ac_ext" >&5
27956 ac_hi=-1 ac_mid=-1
27957   while :; do
27958     cat >"conftest.$ac_ext" <<_ACEOF
27959 #line 27959 "configure"
27960 #include "confdefs.h"
27961 $ac_includes_default
27962 int
27963 main (void)
27964 {
27965 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27966   ;
27967   return 0;
27968 }
27969 _ACEOF
27970 rm -f "conftest.$ac_objext"
27971 if { (eval echo "$as_me:27971: \"$ac_compile\"") >&5
27972   (eval $ac_compile) 2>&5
27973   ac_status=$?
27974   echo "$as_me:27974: \$? = $ac_status" >&5
27975   (exit "$ac_status"); } &&
27976          { ac_try='test -s "conftest.$ac_objext"'
27977   { (eval echo "$as_me:27977: \"$ac_try\"") >&5
27978   (eval $ac_try) 2>&5
27979   ac_status=$?
27980   echo "$as_me:27980: \$? = $ac_status" >&5
27981   (exit "$ac_status"); }; }; then
27982   ac_lo=$ac_mid; break
27983 else
27984   echo "$as_me: failed program was:" >&5
27985 cat "conftest.$ac_ext" >&5
27986 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27987 fi
27988 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27989   done
27990 fi
27991 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27992 # Binary search between lo and hi bounds.
27993 while test "x$ac_lo" != "x$ac_hi"; do
27994   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27995   cat >"conftest.$ac_ext" <<_ACEOF
27996 #line 27996 "configure"
27997 #include "confdefs.h"
27998 $ac_includes_default
27999 int
28000 main (void)
28001 {
28002 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28003   ;
28004   return 0;
28005 }
28006 _ACEOF
28007 rm -f "conftest.$ac_objext"
28008 if { (eval echo "$as_me:28008: \"$ac_compile\"") >&5
28009   (eval $ac_compile) 2>&5
28010   ac_status=$?
28011   echo "$as_me:28011: \$? = $ac_status" >&5
28012   (exit "$ac_status"); } &&
28013          { ac_try='test -s "conftest.$ac_objext"'
28014   { (eval echo "$as_me:28014: \"$ac_try\"") >&5
28015   (eval $ac_try) 2>&5
28016   ac_status=$?
28017   echo "$as_me:28017: \$? = $ac_status" >&5
28018   (exit "$ac_status"); }; }; then
28019   ac_hi=$ac_mid
28020 else
28021   echo "$as_me: failed program was:" >&5
28022 cat "conftest.$ac_ext" >&5
28023 ac_lo=`expr "$ac_mid" + 1`
28024 fi
28025 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28026 done
28027 ac_cv_sizeof_wchar_t=$ac_lo
28028 else
28029   if test "$cross_compiling" = yes; then
28030   { { echo "$as_me:28030: error: cannot run test program while cross compiling" >&5
28031 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28032    { (exit 1); exit 1; }; }
28033 else
28034   cat >"conftest.$ac_ext" <<_ACEOF
28035 #line 28035 "configure"
28036 #include "confdefs.h"
28037 $ac_includes_default
28038 int
28039 main (void)
28040 {
28041 FILE *f = fopen ("conftest.val", "w");
28042 if (!f)
28043   $ac_main_return (1);
28044 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28045 fclose (f);
28046   ;
28047   return 0;
28048 }
28049 _ACEOF
28050 rm -f "conftest$ac_exeext"
28051 if { (eval echo "$as_me:28051: \"$ac_link\"") >&5
28052   (eval $ac_link) 2>&5
28053   ac_status=$?
28054   echo "$as_me:28054: \$? = $ac_status" >&5
28055   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28056   { (eval echo "$as_me:28056: \"$ac_try\"") >&5
28057   (eval $ac_try) 2>&5
28058   ac_status=$?
28059   echo "$as_me:28059: \$? = $ac_status" >&5
28060   (exit "$ac_status"); }; }; then
28061   ac_cv_sizeof_wchar_t=`cat conftest.val`
28062 else
28063   echo "$as_me: program exited with status $ac_status" >&5
28064 echo "$as_me: failed program was:" >&5
28065 cat "conftest.$ac_ext" >&5
28066 fi
28067 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28068 fi
28069 fi
28070 rm -f conftest.val
28071 else
28072   ac_cv_sizeof_wchar_t=0
28073 fi
28074 fi
28075 echo "$as_me:28075: result: $ac_cv_sizeof_wchar_t" >&5
28076 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28077 cat >>confdefs.h <<EOF
28078 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28079 EOF
28080
28081         # cross-compiling to mingw can run into the problem that attempting to
28082         # link with the regex library fails, causing the test to not set this to
28083         # a number.  "recent" autoconf does not address this problem either -TD
28084         if test -z "$ac_cv_sizeof_wchar_t"
28085         then
28086                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28087
28088 echo "${as_me:-configure}:28088: testing test failed (assume 2) ..." 1>&5
28089
28090                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28091                 mv confdefs.tmp confdefs.h
28092                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28093         fi
28094 fi
28095
28096 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28097 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28098 ###
28099 ### ticlib modules may be a separate library, otherwise contained in termlib.
28100 ### termlib modules may be a separate library, otherwise contained in ncurses.
28101 ###
28102 ### The of "+" or " " between the tokens controls the way the script
28103 ### chooses to split module lists into libraries.
28104 ###
28105 ### (see CF_LIB_RULES).
28106 echo "$as_me:28106: checking for library subsets" >&5
28107 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28108 LIB_SUBSETS=
28109
28110 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28111         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28112         if test "$with_ticlib" != no ; then
28113                 LIB_SUBSETS="${LIB_SUBSETS} "
28114         else
28115                 LIB_SUBSETS="${LIB_SUBSETS}+"
28116         fi
28117 fi
28118
28119 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28120 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28121
28122 if test "$with_termlib" != no ; then
28123         LIB_SUBSETS="${LIB_SUBSETS} "
28124 else
28125         LIB_SUBSETS="${LIB_SUBSETS}+"
28126 fi
28127
28128 LIB_SUBSETS="${LIB_SUBSETS}base"
28129
28130 # Most term-driver calls are to tinfo, but some like init_pair are to the
28131 # base library (so it resides in base).
28132 if test "$with_term_driver" != no ; then
28133         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28134         case "$cf_cv_system_name" in
28135         (*mingw32*|*mingw64*)
28136                 if test "x$with_exp_win32" = xyes ; then
28137                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28138                 else
28139                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28140                 fi
28141                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28142                 ;;
28143         (*)
28144                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28145                 ;;
28146         esac
28147 elif test "x$with_exp_win32" = xyes ; then
28148         case "$cf_cv_system_name" in
28149         (*mingw32*|*mingw64*)
28150                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28151                 ;;
28152         (*)
28153                 ;;
28154         esac
28155 fi
28156
28157 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28158 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28159
28160 echo "$as_me:28160: result: $LIB_SUBSETS" >&5
28161 echo "${ECHO_T}$LIB_SUBSETS" >&6
28162
28163 ### Construct the list of include-directories to be generated
28164
28165 if test "$srcdir" != "."; then
28166         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28167 fi
28168 CPPFLAGS="-I../include $CPPFLAGS"
28169 if test "$srcdir" != "."; then
28170         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28171 fi
28172 CPPFLAGS="-I. $CPPFLAGS"
28173
28174 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28175 if test "$srcdir" != "."; then
28176         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28177 fi
28178 if test "$GCC" != yes; then
28179         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28180 elif test "$includedir" != "/usr/include"; then
28181         if test "$includedir" = '${prefix}/include' ; then
28182                 if test x$prefix != x/usr ; then
28183                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28184                 fi
28185         else
28186                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28187         fi
28188 fi
28189
28190 ### Build up pieces for makefile rules
28191 echo "$as_me:28191: checking default library suffix" >&5
28192 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28193
28194         case $DFT_LWR_MODEL in
28195         (libtool) DFT_ARG_SUFFIX=''   ;;
28196         (normal)  DFT_ARG_SUFFIX=''   ;;
28197         (debug)   DFT_ARG_SUFFIX='_g' ;;
28198         (profile) DFT_ARG_SUFFIX='_p' ;;
28199         (shared)  DFT_ARG_SUFFIX=''   ;;
28200         esac
28201         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28202 echo "$as_me:28202: result: $DFT_ARG_SUFFIX" >&5
28203 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28204
28205 echo "$as_me:28205: checking default library-dependency suffix" >&5
28206 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28207
28208         case X$DFT_LWR_MODEL in
28209         (Xlibtool)
28210                 DFT_LIB_SUFFIX='.la'
28211                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28212                 ;;
28213         (Xdebug)
28214                 case "$cf_cv_system_name" in
28215                 (*-msvc*)
28216                         DFT_LIB_SUFFIX='_g.lib'
28217                         ;;
28218                 (*)
28219                         DFT_LIB_SUFFIX='_g.a'
28220                         ;;
28221                 esac
28222                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28223                 ;;
28224         (Xprofile)
28225                 case "$cf_cv_system_name" in
28226                 (*-msvc*)
28227                         DFT_LIB_SUFFIX='_p.lib'
28228                         ;;
28229                 (*)
28230                         DFT_LIB_SUFFIX='_p.a'
28231                         ;;
28232                 esac
28233                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28234                 ;;
28235         (Xshared)
28236                 case "$cf_cv_system_name" in
28237                 (aix[5-7]*)
28238                         DFT_LIB_SUFFIX='.so'
28239                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28240                         ;;
28241                 (*-msvc*)
28242                         DFT_LIB_SUFFIX='.dll'
28243                         DFT_DEP_SUFFIX='.dll.lib'
28244                         ;;
28245                 (cygwin*|msys*|mingw*)
28246                         DFT_LIB_SUFFIX='.dll'
28247                         DFT_DEP_SUFFIX='.dll.a'
28248                         ;;
28249                 (darwin*)
28250                         DFT_LIB_SUFFIX='.dylib'
28251                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28252                         ;;
28253                 (hpux*)
28254                         case "$target" in
28255                         (ia64*)
28256                                 DFT_LIB_SUFFIX='.so'
28257                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28258                                 ;;
28259                         (*)
28260                                 DFT_LIB_SUFFIX='.sl'
28261                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28262                                 ;;
28263                         esac
28264                         ;;
28265                 (*)
28266                         DFT_LIB_SUFFIX='.so'
28267                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28268                         ;;
28269                 esac
28270                 ;;
28271         (*)
28272                 case "$target" in
28273                 (*-msvc*)
28274                         DFT_LIB_SUFFIX='.lib'
28275                         ;;
28276                 (*)
28277                         DFT_LIB_SUFFIX='.a'
28278                         ;;
28279                 esac
28280                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28281                 ;;
28282         esac
28283         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28284         then
28285                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28286                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28287         fi
28288 echo "$as_me:28288: result: $DFT_DEP_SUFFIX" >&5
28289 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28290
28291 echo "$as_me:28291: checking default object directory" >&5
28292 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28293
28294         case $DFT_LWR_MODEL in
28295         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28296         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28297         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28298         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28299         (shared)
28300                 case "$cf_cv_system_name" in
28301                 (cygwin|msys)
28302                         DFT_OBJ_SUBDIR='objects' ;;
28303                 (*)
28304                         DFT_OBJ_SUBDIR='obj_s' ;;
28305                 esac
28306         esac
28307 echo "$as_me:28307: result: $DFT_OBJ_SUBDIR" >&5
28308 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28309
28310 if test "x$cf_with_cxx" = xyes ; then
28311 echo "$as_me:28311: checking c++ library-dependency suffix" >&5
28312 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28313 if test "$with_libtool" != "no"; then
28314         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28315         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28316 elif test "$with_shared_cxx" != "no"; then
28317         # also for g++ users...
28318         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28319 else
28320         # we normally make a static library because C/C++ library rules differ
28321
28322         case Xnormal in
28323         (Xlibtool)
28324                 CXX_LIB_SUFFIX='.la'
28325                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28326                 ;;
28327         (Xdebug)
28328                 case "$cf_cv_system_name" in
28329                 (*-msvc*)
28330                         CXX_LIB_SUFFIX='_g.lib'
28331                         ;;
28332                 (*)
28333                         CXX_LIB_SUFFIX='_g.a'
28334                         ;;
28335                 esac
28336                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28337                 ;;
28338         (Xprofile)
28339                 case "$cf_cv_system_name" in
28340                 (*-msvc*)
28341                         CXX_LIB_SUFFIX='_p.lib'
28342                         ;;
28343                 (*)
28344                         CXX_LIB_SUFFIX='_p.a'
28345                         ;;
28346                 esac
28347                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28348                 ;;
28349         (Xshared)
28350                 case "$cf_cv_system_name" in
28351                 (aix[5-7]*)
28352                         CXX_LIB_SUFFIX='.so'
28353                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28354                         ;;
28355                 (*-msvc*)
28356                         CXX_LIB_SUFFIX='.dll'
28357                         CXX_DEP_SUFFIX='.dll.lib'
28358                         ;;
28359                 (cygwin*|msys*|mingw*)
28360                         CXX_LIB_SUFFIX='.dll'
28361                         CXX_DEP_SUFFIX='.dll.a'
28362                         ;;
28363                 (darwin*)
28364                         CXX_LIB_SUFFIX='.dylib'
28365                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28366                         ;;
28367                 (hpux*)
28368                         case "$target" in
28369                         (ia64*)
28370                                 CXX_LIB_SUFFIX='.so'
28371                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28372                                 ;;
28373                         (*)
28374                                 CXX_LIB_SUFFIX='.sl'
28375                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28376                                 ;;
28377                         esac
28378                         ;;
28379                 (*)
28380                         CXX_LIB_SUFFIX='.so'
28381                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28382                         ;;
28383                 esac
28384                 ;;
28385         (*)
28386                 case "$target" in
28387                 (*-msvc*)
28388                         CXX_LIB_SUFFIX='.lib'
28389                         ;;
28390                 (*)
28391                         CXX_LIB_SUFFIX='.a'
28392                         ;;
28393                 esac
28394                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28395                 ;;
28396         esac
28397         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28398         then
28399                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28400                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28401         fi
28402
28403 fi
28404 echo "$as_me:28404: result: $CXX_LIB_SUFFIX" >&5
28405 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28406
28407 fi
28408
28409 # do not want -ldl in build except as needed for -lncurses dependency
28410 if test "x$with_dlsym" = xyes ; then
28411 if test "$DFT_LWR_MODEL" = shared || \
28412    test "$DFT_LWR_MODEL" = libtool ; then
28413
28414 # remove dl library from $LIBS
28415 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28416
28417 fi
28418 fi
28419 ### Set up low-level terminfo dependencies for makefiles.
28420
28421 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28422 # do not need libdl
28423 TICS_LIST=
28424 if test "x$with_dlsym" = xyes ; then
28425
28426 # remove dl library from $SHLIB_LIST
28427 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28428
28429 fi
28430
28431 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28432 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28433 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28434 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28435 then
28436         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28437 fi
28438
28439 if test "$with_ticlib" != no ; then
28440
28441         if test "x$with_ticlib" != xyes ; then
28442                 TICS_NAME=$with_ticlib
28443                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28444                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28445                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28446                 TICS_LIB_SUFFIX="${with_ticlib}"
28447         else
28448                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28449                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28450                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28451                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28452         fi
28453         TICS_LDFLAGS="-L${LIB_DIR}"
28454         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28455 else
28456         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28457         TICS_LDFLAGS="-L${LIB_DIR}"
28458         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28459 fi
28460
28461 if test "$with_termlib" != no ; then
28462
28463         if test "x$with_termlib" != xyes ; then
28464                 TINFO_NAME=$with_termlib
28465                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28466                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28467                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28468                 TINFO_LIB_SUFFIX="${with_termlib}"
28469         else
28470                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28471                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28472                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28473                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28474         fi
28475
28476         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28477         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28478         if test "$DFT_LWR_MODEL" = "libtool"; then
28479                 TEST_ARGS="${TEST_DEPS}"
28480                 TEST_ARG2="${TEST_DEP2}"
28481                 TINFO_LDFLAGS="-L${LIB_DIR}"
28482                 TINFO_LIBS="$TEST_ARGS"
28483                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28484                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28485         else
28486                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28487                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28488                 if test "x$with_term_driver" != xno ; then
28489                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28490                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28491                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28492                 else
28493                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28494                         TINFO_LIBS="$TEST_ARGS"
28495                 fi
28496                 TINFO_LDFLAGS="-L${LIB_DIR}"
28497                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28498         fi
28499 else
28500         # the next lines are needed for linking libtic over libncurses
28501         TINFO_NAME=${LIB_NAME}
28502         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28503         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28504         if test "x$with_tic_depends" = xyes ; then
28505                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28506         else
28507                 TICS_LIST="$SHLIB_LIST"
28508         fi
28509
28510         TINFO_LDFLAGS="-L${LIB_DIR}"
28511         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28512 fi
28513
28514 if test "$DFT_LWR_MODEL" = shared ; then
28515         case "$cf_cv_system_name" in
28516         (cygwin*|msys*)
28517                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28518                 TINFO_SUFFIX=.dll
28519                 ;;
28520         esac
28521 fi
28522
28523 if test "x$with_dlsym" = xyes ; then
28524
28525 # remove dl library from $TICS_LIST
28526 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28527
28528 fi
28529
28530 if test "$DFT_LWR_MODEL" = "libtool"; then
28531         OBJEXT=lo
28532 fi
28533
28534 # needed for Ada95
28535 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28536
28537 case "$DFT_LWR_MODEL" in
28538 (normal|debug|profile)
28539
28540 if test "$GCC" = yes ; then
28541         case "$cf_cv_system_name" in
28542         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28543                 LDFLAGS_STATIC=
28544                 LDFLAGS_SHARED=
28545                 ;;
28546         (*)     # normally, except when broken
28547                 LDFLAGS_STATIC=-static
28548                 LDFLAGS_SHARED=-dynamic
28549                 ;;
28550         esac
28551 else
28552         case "$cf_cv_system_name" in
28553         (aix[4-7]*)     # from ld manpage
28554                 LDFLAGS_STATIC=-bstatic
28555                 LDFLAGS_SHARED=-bdynamic
28556                 ;;
28557         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28558                 # We could also use just "archive" and "shared".
28559                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28560                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28561                 ;;
28562         (irix*)         # from ld manpage IRIX64
28563                 LDFLAGS_STATIC=-Bstatic
28564                 LDFLAGS_SHARED=-Bdynamic
28565                 ;;
28566         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28567                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28568                 LDFLAGS_STATIC=-noso
28569                 LDFLAGS_SHARED=-so_archive
28570                 ;;
28571         (solaris2*)
28572                 LDFLAGS_STATIC=-Bstatic
28573                 LDFLAGS_SHARED=-Bdynamic
28574                 ;;
28575         esac
28576 fi
28577
28578 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28579 then
28580         echo "$as_me:28580: checking if linker supports switching between static/dynamic" >&5
28581 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28582
28583         rm -f libconftest.a
28584         cat >conftest.$ac_ext <<EOF
28585 #line 28585 "configure"
28586 #include <stdio.h>
28587 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28588 EOF
28589         if { (eval echo "$as_me:28589: \"$ac_compile\"") >&5
28590   (eval $ac_compile) 2>&5
28591   ac_status=$?
28592   echo "$as_me:28592: \$? = $ac_status" >&5
28593   (exit "$ac_status"); } ; then
28594                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28595                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28596         fi
28597         rm -f conftest.*
28598
28599         cf_save_LIBS="$LIBS"
28600
28601         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28602         cat >"conftest.$ac_ext" <<_ACEOF
28603 #line 28603 "configure"
28604 #include "confdefs.h"
28605
28606 #line 28606 "configure"
28607 #include <stdio.h>
28608 int cf_ldflags_static(FILE *fp);
28609
28610 int
28611 main (void)
28612 {
28613
28614         return cf_ldflags_static(stdin);
28615
28616   ;
28617   return 0;
28618 }
28619 _ACEOF
28620 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28621 if { (eval echo "$as_me:28621: \"$ac_link\"") >&5
28622   (eval $ac_link) 2>&5
28623   ac_status=$?
28624   echo "$as_me:28624: \$? = $ac_status" >&5
28625   (exit "$ac_status"); } &&
28626          { ac_try='test -s "conftest$ac_exeext"'
28627   { (eval echo "$as_me:28627: \"$ac_try\"") >&5
28628   (eval $ac_try) 2>&5
28629   ac_status=$?
28630   echo "$as_me:28630: \$? = $ac_status" >&5
28631   (exit "$ac_status"); }; }; then
28632
28633         # some linkers simply ignore the -dynamic
28634         case x`file "conftest$ac_exeext" 2>/dev/null` in
28635         (*static*)
28636                 cf_ldflags_static=no
28637                 ;;
28638         (*)
28639                 cf_ldflags_static=yes
28640                 ;;
28641         esac
28642
28643 else
28644   echo "$as_me: failed program was:" >&5
28645 cat "conftest.$ac_ext" >&5
28646 cf_ldflags_static=no
28647 fi
28648 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28649
28650         rm -f libconftest.*
28651         LIBS="$cf_save_LIBS"
28652
28653         echo "$as_me:28653: result: $cf_ldflags_static" >&5
28654 echo "${ECHO_T}$cf_ldflags_static" >&6
28655
28656         if test "$cf_ldflags_static" != yes
28657         then
28658                 LDFLAGS_STATIC=
28659                 LDFLAGS_SHARED=
28660         fi
28661 else
28662         LDFLAGS_STATIC=
28663         LDFLAGS_SHARED=
28664 fi
28665
28666         ;;
28667 esac
28668
28669 echo "$as_me:28669: checking where we will install curses.h" >&5
28670 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28671
28672 includesubdir=
28673 if test "$with_overwrite" = no && \
28674  { test "x$includedir" = 'x${prefix}/include' || \
28675    test "x$includedir" = "x${prefix}/include"; }
28676 then
28677         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28678 fi
28679 echo "$as_me:28679: result: ${includedir}${includesubdir}" >&5
28680 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28681
28682 ### Resolve a conflict between normal and wide-curses by forcing applications
28683 ### that will need libutf8 to add it to their configure script.
28684 if test "$with_overwrite" != no ; then
28685 if test "$NCURSES_LIBUTF8" = 1 ; then
28686         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28687         { echo "$as_me:28687: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28688 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28689 fi
28690 fi
28691 WITH_OVERWRITE=$with_overwrite
28692
28693 ### At least on MinGW a shared library build without libtool
28694 ### requires adding the additional libs to the link list.
28695 case "$cf_cv_system_name" in
28696 (*mingw32*|*mingw64*)
28697         if test "$DFT_LWR_MODEL" != "libtool"; then
28698            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28699         fi
28700         ;;
28701 *)      ;;
28702 esac
28703
28704 ### predefined stuff for the test programs
28705
28706 cat >>confdefs.h <<\EOF
28707 #define HAVE_SLK_COLOR 1
28708 EOF
28709
28710 # pkgsrc uses these
28711
28712 echo "$as_me:28712: checking for desired basename for form library" >&5
28713 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28714
28715 # Check whether --with-form-libname or --without-form-libname was given.
28716 if test "${with_form_libname+set}" = set; then
28717   withval="$with_form_libname"
28718   with_lib_basename=$withval
28719 else
28720   with_lib_basename=form
28721 fi;
28722 FORM_NAME="$with_lib_basename"
28723
28724 case "x$FORM_NAME" in
28725 (x|xno|xnone|xyes)
28726         FORM_NAME=form
28727         ;;
28728 (*)
28729         ;;
28730 esac
28731
28732 echo "$as_me:28732: result: $FORM_NAME" >&5
28733 echo "${ECHO_T}$FORM_NAME" >&6
28734
28735 echo "$as_me:28735: checking for desired basename for menu library" >&5
28736 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28737
28738 # Check whether --with-menu-libname or --without-menu-libname was given.
28739 if test "${with_menu_libname+set}" = set; then
28740   withval="$with_menu_libname"
28741   with_lib_basename=$withval
28742 else
28743   with_lib_basename=menu
28744 fi;
28745 MENU_NAME="$with_lib_basename"
28746
28747 case "x$MENU_NAME" in
28748 (x|xno|xnone|xyes)
28749         MENU_NAME=menu
28750         ;;
28751 (*)
28752         ;;
28753 esac
28754
28755 echo "$as_me:28755: result: $MENU_NAME" >&5
28756 echo "${ECHO_T}$MENU_NAME" >&6
28757
28758 echo "$as_me:28758: checking for desired basename for panel library" >&5
28759 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28760
28761 # Check whether --with-panel-libname or --without-panel-libname was given.
28762 if test "${with_panel_libname+set}" = set; then
28763   withval="$with_panel_libname"
28764   with_lib_basename=$withval
28765 else
28766   with_lib_basename=panel
28767 fi;
28768 PANEL_NAME="$with_lib_basename"
28769
28770 case "x$PANEL_NAME" in
28771 (x|xno|xnone|xyes)
28772         PANEL_NAME=panel
28773         ;;
28774 (*)
28775         ;;
28776 esac
28777
28778 echo "$as_me:28778: result: $PANEL_NAME" >&5
28779 echo "${ECHO_T}$PANEL_NAME" >&6
28780
28781 echo "$as_me:28781: checking for desired basename for cxx library" >&5
28782 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28783
28784 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28785 if test "${with_cxx_libname+set}" = set; then
28786   withval="$with_cxx_libname"
28787   with_lib_basename=$withval
28788 else
28789   with_lib_basename=ncurses++
28790 fi;
28791 CXX_NAME="$with_lib_basename"
28792
28793 case "x$CXX_NAME" in
28794 (x|xno|xnone|xyes)
28795         CXX_NAME=ncurses++
28796         ;;
28797 (*)
28798         ;;
28799 esac
28800
28801 echo "$as_me:28801: result: $CXX_NAME" >&5
28802 echo "${ECHO_T}$CXX_NAME" >&6
28803
28804 ### Construct the list of subdirectories for which we'll customize makefiles
28805 ### with the appropriate compile-rules.
28806
28807 echo "$as_me:28807: checking for src modules" >&5
28808 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28809
28810 # dependencies and linker-arguments for test-programs
28811 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28812 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28813 if test "$DFT_LWR_MODEL" = "libtool"; then
28814         TEST_ARGS="${TEST_DEPS}"
28815         TEST_ARG2="${TEST_DEP2}"
28816 else
28817         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28818         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28819 fi
28820
28821 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28822 cf_cv_src_modules=
28823 for cf_dir in $modules_to_build
28824 do
28825         if test -f "$srcdir/$cf_dir/modules" ; then
28826
28827                 if test -z "$cf_cv_src_modules"; then
28828                         cf_cv_src_modules=$cf_dir
28829                 else
28830                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28831                 fi
28832
28833                 # Make the ncurses_cfg.h file record the library interface files as
28834                 # well.  These are header files that are the same name as their
28835                 # directory.  Ncurses is the only library that does not follow
28836                 # that pattern.
28837                 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28838
28839 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28840
28841                         cat >>confdefs.h <<EOF
28842 #define HAVE_${cf_have_include}_H 1
28843 EOF
28844
28845                         cat >>confdefs.h <<EOF
28846 #define HAVE_LIB${cf_have_include} 1
28847 EOF
28848
28849 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28850
28851 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28852
28853                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28854                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28855                         if test "$DFT_LWR_MODEL" = "libtool"; then
28856                                 TEST_ARGS="${TEST_DEPS}"
28857                                 TEST_ARG2="${TEST_DEP2}"
28858                         else
28859                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28860                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28861                         fi
28862                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28863                 fi
28864         fi
28865 done
28866 echo "$as_me:28866: result: $cf_cv_src_modules" >&5
28867 echo "${ECHO_T}$cf_cv_src_modules" >&6
28868
28869 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28870 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28871
28872 SRC_SUBDIRS=
28873 if test "x$cf_with_manpages" != xno ; then
28874         SRC_SUBDIRS="$SRC_SUBDIRS man"
28875 fi
28876 SRC_SUBDIRS="$SRC_SUBDIRS include"
28877 for cf_dir in $cf_cv_src_modules
28878 do
28879         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28880 done
28881 if test "x$cf_with_tests" != "xno" ; then
28882         SRC_SUBDIRS="$SRC_SUBDIRS test"
28883 fi
28884 # always make this, to install the ncurses-config script
28885 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28886 if test "$cf_with_cxx_binding" != no; then
28887         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28888         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28889 fi
28890
28891 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28892 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28893
28894 ADA_SUBDIRS=
28895 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28896         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28897         ADA_SUBDIRS="gen src"
28898         if test "x$cf_with_tests" != "xno" ; then
28899                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28900         fi
28901 fi
28902
28903 SUB_MAKEFILES=
28904 for cf_dir in $SRC_SUBDIRS
28905 do
28906         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28907 done
28908
28909 if test -n "$ADA_SUBDIRS"; then
28910         for cf_dir in $ADA_SUBDIRS
28911         do
28912                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28913         done
28914
28915 fi
28916
28917 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28918    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28919    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28920    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28921 fi
28922
28923 DIRS_TO_MAKE="lib"
28924 for cf_item in $cf_list_models
28925 do
28926
28927         case $cf_item in
28928         (libtool) cf_subdir='obj_lo'  ;;
28929         (normal)  cf_subdir='objects' ;;
28930         (debug)   cf_subdir='obj_g' ;;
28931         (profile) cf_subdir='obj_p' ;;
28932         (shared)
28933                 case "$cf_cv_system_name" in
28934                 (cygwin|msys)
28935                         cf_subdir='objects' ;;
28936                 (*)
28937                         cf_subdir='obj_s' ;;
28938                 esac
28939         esac
28940
28941         for cf_item2 in $DIRS_TO_MAKE
28942         do
28943                 test "$cf_item2" = "$cf_subdir" && break
28944         done
28945         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28946 done
28947 for cf_dir in $DIRS_TO_MAKE
28948 do
28949         test ! -d "$cf_dir" && mkdir "$cf_dir"
28950 done
28951
28952 # symbols that differ when compiling Ada95 by itself.
28953 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28954
28955 # values to use as strings
28956
28957 cat >>confdefs.h <<EOF
28958 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28959 EOF
28960
28961 cat >>confdefs.h <<EOF
28962 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28963 EOF
28964
28965 ### Define substitutions for header files to avoid name-pollution
28966
28967 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28968         HAVE_TCGETATTR=1
28969 else
28970         HAVE_TCGETATTR=0
28971 fi
28972
28973 if test "x$ac_cv_header_stdint_h" = xyes ; then
28974         HAVE_STDINT_H=1
28975 else
28976         HAVE_STDINT_H=0
28977 fi
28978
28979 if test "x$ac_cv_header_termio_h" = xyes ; then
28980         HAVE_TERMIO_H=1
28981 else
28982         HAVE_TERMIO_H=0
28983 fi
28984
28985 if test "x$ac_cv_header_termios_h" = xyes ; then
28986         HAVE_TERMIOS_H=1
28987 else
28988         HAVE_TERMIOS_H=0
28989 fi
28990
28991 ################################################################################
28992 test "x$use_database" = xyes && \
28993 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28994
28995 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28996 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28997
28998 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28999 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29000 fi
29001
29002 if test "x$cf_with_tests" != xno ; then
29003         MAKE_TESTS=
29004 else
29005         MAKE_TESTS="#"
29006 fi
29007
29008 ADAHTML_DIR=../../doc/html/ada
29009
29010 # workaround for OS/2 (20151017)
29011 case "$cf_cv_system_name" in
29012 (os2*)
29013         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29014         ;;
29015 (*)
29016         LIBTOOL_OPTS_CXX=
29017         ;;
29018 esac
29019
29020 # workaround for g++ versus Solaris (20131116)
29021 case "$cf_cv_system_name" in
29022 (solaris2*)
29023         case "x$CPPFLAGS" in
29024         (*-D_XOPEN_SOURCE_EXTENDED*)
29025                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29026
29027 echo "${as_me:-configure}:29027: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29028
29029                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29030                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29031                 ;;
29032         esac
29033         ;;
29034 esac
29035
29036 # Help to automatically enable the extended curses features when using either
29037 # the *-config or the ".pc" files by adding defines.
29038 echo "$as_me:29038: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29039 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29040 PKG_CFLAGS=
29041 for cf_loop1 in $CPPFLAGS_after_XOPEN
29042 do
29043         cf_found=no
29044         for cf_loop2 in $CPPFLAGS_before_XOPEN
29045         do
29046                 if test "x$cf_loop1" = "x$cf_loop2"
29047                 then
29048                         cf_found=yes
29049                         break
29050                 fi
29051         done
29052         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29053 done
29054 echo "$as_me:29054: result: $PKG_CFLAGS" >&5
29055 echo "${ECHO_T}$PKG_CFLAGS" >&6
29056
29057 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29058 case "x$NCURSES_OSPEED" in
29059 (*short*)
29060         cf_compatible=1
29061         ;;
29062 (*)
29063         cf_compatible=0
29064         ;;
29065 esac
29066
29067 cat >>confdefs.h <<EOF
29068 #define NCURSES_OSPEED_COMPAT $cf_compatible
29069 EOF
29070
29071 case "x$cf_cv_typeof_chtype" in
29072 (xshort|xint|xlong)
29073         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29074         ;;
29075 esac
29076
29077 case "x$cf_cv_typeof_mmask_t" in
29078 (xshort|xint|xlong)
29079         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29080         ;;
29081 esac
29082
29083 # substitute into misc/Makefile to suppress
29084 # (un)install.data from the
29085 # (un)install rules.
29086 if test "x$cf_with_db_install" = "xno"; then
29087         MISC_INSTALL_DATA=
29088         MISC_UNINSTALL_DATA=
29089 else
29090         MISC_INSTALL_DATA=install.data
29091         MISC_UNINSTALL_DATA=uninstall.data
29092 fi
29093
29094 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29095         MAKE_DATABASE="#"
29096 else
29097         MAKE_DATABASE="$MAKE_TERMINFO"
29098 fi
29099
29100 if test -n "$PACKAGE"
29101 then
29102         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29103         export PACKAGE
29104         echo "package: $PACKAGE"
29105 fi
29106
29107 UNALTERED_SYMS=
29108 cf_filter_syms=no
29109
29110 if test -n "$RESULTING_SYMS"
29111 then
29112         cf_filter_syms=$cf_dft_filter_syms
29113         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29114
29115 echo "${as_me:-configure}:29115: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29116
29117 fi
29118
29119 if test "x$WILDCARD_SYMS" = xno
29120 then
29121         cf_filter_syms=yes
29122 fi
29123
29124 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29125
29126 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29127 if test "$cf_filter_syms" = yes
29128 then
29129         RESULTING_SYMS=resulting.map
29130 fi
29131
29132 if test "x$cross_compiling" = xyes ; then
29133         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29134         CHECK_BUILD="#"
29135 else
29136         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29137         CHECK_BUILD=
29138 fi
29139
29140 # This is used for the *-config script and *.pc data files.
29141
29142 echo "$as_me:29142: checking for linker search path" >&5
29143 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29144 if test "${cf_cv_ld_searchpath+set}" = set; then
29145   echo $ECHO_N "(cached) $ECHO_C" >&6
29146 else
29147
29148 if test "$cross_compiling" != yes ; then
29149
29150 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29151 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29152
29153 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29154 # update the cache, which makes it run faster.
29155 test -z "$cf_pathlist" && \
29156         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29157
29158 test -z "$cf_pathlist" &&
29159         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29160
29161 # This works with OpenBSD 6.5, which lists only filenames
29162 test -z "$cf_pathlist" &&
29163         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29164
29165 if test -z "$cf_pathlist"
29166 then
29167         # dyld default path with MacOS
29168         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29169         then
29170                 # do this to bypass check
29171                 cf_cv_ld_searchpath='$HOME/lib'
29172                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29173         fi
29174 fi
29175
29176 if test -z "$cf_pathlist"
29177 then
29178         # Solaris is "SunOS"
29179         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29180         then
29181                 case x`(isainfo -b)` in
29182                 (x64)
29183                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29184                         ;;
29185                 (x32)
29186                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29187                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29188                         ;;
29189                 (*)
29190                         { echo "$as_me:29190: WARNING: problem with Solaris architecture" >&5
29191 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29192                         ;;
29193                 esac
29194         fi
29195 fi
29196
29197 if test -z "$cf_pathlist"
29198 then
29199         # HP-UX
29200         if test x"`uname -s`" = xHP-UX
29201         then
29202                 case x`getconf LONG_BIT` in
29203                 (x64)
29204                         cf_pathlist="/usr/lib/hpux64"
29205                         ;;
29206                 (x*)
29207                         cf_pathlist="/usr/lib/hpux32"
29208                         ;;
29209                 esac
29210         fi
29211 fi
29212
29213 fi
29214
29215 # If nothing else, assume it is conventional
29216 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29217
29218 # Finally, check that this is only directories
29219 for cf_path in $0 $cf_pathlist
29220 do
29221         if test -d "$cf_path"; then
29222                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29223                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29224         fi
29225 done
29226
29227 # Ensure that it is nonempty
29228 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29229
29230 fi
29231 echo "$as_me:29231: result: $cf_cv_ld_searchpath" >&5
29232 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29233
29234 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29235
29236 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 man/man_db.renames $SUB_MAKEFILES Makefile"
29237 ac_config_commands="$ac_config_commands default"
29238 cat >confcache <<\_ACEOF
29239 # This file is a shell script that caches the results of configure
29240 # tests run on this system so they can be shared between configure
29241 # scripts and configure runs, see configure's option --config-cache.
29242 # It is not useful on other systems.  If it contains results you don't
29243 # want to keep, you may remove or edit it.
29244 #
29245 # config.status only pays attention to the cache file if you give it
29246 # the --recheck option to rerun configure.
29247 #
29248 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29249 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29250 # following values.
29251
29252 _ACEOF
29253
29254 # The following way of writing the cache mishandles newlines in values,
29255 # but we know of no workaround that is simple, portable, and efficient.
29256 # So, don't put newlines in cache variables' values.
29257 # Ultrix sh set writes to stderr and can't be redirected directly,
29258 # and sets the high bit in the cache file unless we assign to the vars.
29259 {
29260   (set) 2>&1 |
29261     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29262     *ac_space=\ *)
29263       # `set' does not quote correctly, so add quotes (double-quote
29264       # substitution turns \\\\ into \\, and sed turns \\ into \).
29265       sed -n \
29266         "s/'/'\\\\''/g;
29267           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29268       ;;
29269     *)
29270       # `set' quotes correctly as required by POSIX, so do not add quotes.
29271       sed -n \
29272         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29273       ;;
29274     esac;
29275 } |
29276   sed '
29277      t clear
29278      : clear
29279      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29280      t end
29281      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29282      : end' >>confcache
29283 if cmp -s $cache_file confcache; then :; else
29284   if test -w $cache_file; then
29285     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29286     cat confcache >$cache_file
29287   else
29288     echo "not updating unwritable cache $cache_file"
29289   fi
29290 fi
29291 rm -f confcache
29292
29293 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29294 # Let make expand exec_prefix.
29295 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29296
29297 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29298 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29299 # trailing colons and then remove the whole line if VPATH becomes empty
29300 # (actually we leave an empty line to preserve line numbers).
29301 if test "x$srcdir" = x.; then
29302   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29303 s/:*\$(srcdir):*/:/;
29304 s/:*\${srcdir}:*/:/;
29305 s/:*@srcdir@:*/:/;
29306 s/^\([^=]*=[    ]*\):*/\1/;
29307 s/:*$//;
29308 s/^[^=]*=[      ]*$//;
29309 }'
29310 fi
29311
29312 DEFS=-DHAVE_CONFIG_H
29313
29314 : "${CONFIG_STATUS=./config.status}"
29315 ac_clean_files_save=$ac_clean_files
29316 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29317 { echo "$as_me:29317: creating $CONFIG_STATUS" >&5
29318 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29319 cat >"$CONFIG_STATUS" <<_ACEOF
29320 #! $SHELL
29321 # Generated automatically by configure.
29322 # Run this file to recreate the current configuration.
29323 # Compiler output produced by configure, useful for debugging
29324 # configure, is in config.log if it exists.
29325
29326 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29327
29328 debug=false
29329 SHELL=\${CONFIG_SHELL-$SHELL}
29330 ac_cs_invocation="\$0 \$@"
29331
29332 CLICOLOR_FORCE= GREP_OPTIONS=
29333 unset CLICOLOR_FORCE GREP_OPTIONS
29334 _ACEOF
29335
29336 cat >>"$CONFIG_STATUS" <<\_ACEOF
29337 # Be Bourne compatible
29338 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29339   emulate sh
29340   NULLCMD=:
29341 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29342   set -o posix
29343 fi
29344
29345 # Name of the executable.
29346 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29347
29348 if expr a : '\(a\)' >/dev/null 2>&1; then
29349   as_expr="expr"
29350 else
29351   as_expr="false"
29352 fi
29353
29354 rm -f conf$$ conf$$.exe conf$$.file
29355 echo >conf$$.file
29356 if ln -s conf$$.file conf$$ 2>/dev/null; then
29357   # We could just check for DJGPP; but this test a) works b) is more generic
29358   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29359   if test -f conf$$.exe; then
29360     # Don't use ln at all; we don't have any links
29361     as_ln_s='cp -p'
29362   else
29363     as_ln_s='ln -s'
29364   fi
29365 elif ln conf$$.file conf$$ 2>/dev/null; then
29366   as_ln_s='ln'
29367 else
29368   as_ln_s='cp -p'
29369 fi
29370 rm -f conf$$ conf$$.exe conf$$.file
29371
29372 as_executable_p="test -f"
29373
29374 # Support unset when possible.
29375 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29376   as_unset="unset"
29377 else
29378   as_unset="false"
29379 fi
29380
29381 # NLS nuisances.
29382 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29383 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29384 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29385 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29386 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29387 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29388 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29389 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29390
29391 # IFS
29392 # We need space, tab and new line, in precisely that order.
29393 as_nl='
29394 '
29395 IFS="   $as_nl"
29396
29397 # CDPATH.
29398 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29399
29400 exec 6>&1
29401
29402 _ACEOF
29403
29404 # Files that config.status was made for.
29405 if test -n "$ac_config_files"; then
29406   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29407 fi
29408
29409 if test -n "$ac_config_headers"; then
29410   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29411 fi
29412
29413 if test -n "$ac_config_links"; then
29414   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29415 fi
29416
29417 if test -n "$ac_config_commands"; then
29418   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29419 fi
29420
29421 cat >>"$CONFIG_STATUS" <<\EOF
29422
29423 ac_cs_usage="\
29424 \`$as_me' instantiates files from templates according to the
29425 current configuration.
29426
29427 Usage: $0 [OPTIONS] [FILE]...
29428
29429   -h, --help       print this help, then exit
29430   -V, --version    print version number, then exit
29431   -d, --debug      don't remove temporary files
29432       --recheck    update $as_me by reconfiguring in the same conditions
29433   --file=FILE[:TEMPLATE]
29434                    instantiate the configuration file FILE
29435   --header=FILE[:TEMPLATE]
29436                    instantiate the configuration header FILE
29437
29438 Configuration files:
29439 $config_files
29440
29441 Configuration headers:
29442 $config_headers
29443
29444 Configuration commands:
29445 $config_commands
29446
29447 Report bugs to <dickey@invisible-island.net>."
29448 EOF
29449
29450 cat >>"$CONFIG_STATUS" <<EOF
29451 ac_cs_version="\\
29452 config.status
29453 configured by $0, generated by GNU Autoconf 2.52.20230114,
29454   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29455
29456 Copyright 2003-2022,2023        Thomas E. Dickey
29457 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29458 Free Software Foundation, Inc.
29459 This config.status script is free software; the Free Software Foundation
29460 gives unlimited permission to copy, distribute and modify it."
29461 srcdir="$srcdir"
29462 INSTALL="$INSTALL"
29463 EOF
29464
29465 cat >>"$CONFIG_STATUS" <<\EOF
29466 # If no file are specified by the user, then we need to provide default
29467 # value.  By we need to know if files were specified by the user.
29468 ac_need_defaults=:
29469 while test $# != 0
29470 do
29471   case $1 in
29472   --*=*)
29473     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29474     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29475     shift
29476     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29477     shift
29478     ;;
29479   -*);;
29480   *) # This is not an option, so the user has probably given explicit
29481      # arguments.
29482      ac_need_defaults=false;;
29483   esac
29484
29485   case $1 in
29486   # Handling of the options.
29487 EOF
29488 cat >>"$CONFIG_STATUS" <<EOF
29489   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29490     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29491     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29492 EOF
29493 cat >>"$CONFIG_STATUS" <<\EOF
29494   --version | --vers* | -V )
29495     echo "$ac_cs_version"; exit 0 ;;
29496   --he | --h)
29497     # Conflict between --help and --header
29498     { { echo "$as_me:29498: error: ambiguous option: $1
29499 Try \`$0 --help' for more information." >&5
29500 echo "$as_me: error: ambiguous option: $1
29501 Try \`$0 --help' for more information." >&2;}
29502    { (exit 1); exit 1; }; };;
29503   --help | --hel | -h )
29504     echo "$ac_cs_usage"; exit 0 ;;
29505   --debug | --d* | -d )
29506     debug=: ;;
29507   --file | --fil | --fi | --f )
29508     shift
29509     CONFIG_FILES="$CONFIG_FILES $1"
29510     ac_need_defaults=false;;
29511   --header | --heade | --head | --hea )
29512     shift
29513     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29514     ac_need_defaults=false;;
29515
29516   # This is an error.
29517   -*) { { echo "$as_me:29517: error: unrecognized option: $1
29518 Try \`$0 --help' for more information." >&5
29519 echo "$as_me: error: unrecognized option: $1
29520 Try \`$0 --help' for more information." >&2;}
29521    { (exit 1); exit 1; }; } ;;
29522
29523   *) ac_config_targets="$ac_config_targets $1" ;;
29524
29525   esac
29526   shift
29527 done
29528
29529 exec 5>>config.log
29530 cat >&5 << _ACEOF
29531
29532 ## ----------------------- ##
29533 ## Running config.status.  ##
29534 ## ----------------------- ##
29535
29536 This file was extended by $as_me 2.52.20230114, executed with
29537   CONFIG_FILES    = $CONFIG_FILES
29538   CONFIG_HEADERS  = $CONFIG_HEADERS
29539   CONFIG_LINKS    = $CONFIG_LINKS
29540   CONFIG_COMMANDS = $CONFIG_COMMANDS
29541   > "$ac_cs_invocation"
29542 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29543
29544 _ACEOF
29545 EOF
29546
29547 cat >>"$CONFIG_STATUS" <<EOF
29548 #
29549 # INIT-COMMANDS section.
29550 #
29551
29552 ### Special initialization commands, used to pass information from the
29553 ### configuration-run into config.status
29554
29555 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29556 AWK="$AWK"
29557 CXX_NAME="$CXX_NAME"
29558 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29559 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29560 ECHO_LD="$ECHO_LD"
29561 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29562 FORM_NAME="$FORM_NAME"
29563 LDCONFIG="$LDCONFIG"
29564 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29565 LIB_NAME="$LIB_NAME"
29566 LIB_PREFIX="$LIB_PREFIX"
29567 LIB_SUBSETS="$LIB_SUBSETS"
29568 LIB_SUFFIX="$LIB_SUFFIX"
29569 LIB_TRACING="$LIB_TRACING"
29570 LN_S="$LN_S"
29571 MAKE_TERMINFO="$MAKE_TERMINFO"
29572 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29573 MENU_NAME="$MENU_NAME"
29574 NCURSES_MAJOR="$NCURSES_MAJOR"
29575 NCURSES_MINOR="$NCURSES_MINOR"
29576 NCURSES_OSPEED="$NCURSES_OSPEED"
29577 NCURSES_PATCH="$NCURSES_PATCH"
29578 PANEL_NAME="$PANEL_NAME"
29579 SRC_SUBDIRS="$SRC_SUBDIRS"
29580 TERMINFO="$TERMINFO"
29581 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29582 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29583 TICS_NAME="$TICS_NAME"
29584 TICS_SUFFIX="$TICS_SUFFIX"
29585 TIC_PATH="$TIC_PATH"
29586 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29587 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29588 TINFO_NAME="$TINFO_NAME"
29589 TINFO_SUFFIX="$TINFO_SUFFIX"
29590 UNALTERED_SYMS="$UNALTERED_SYMS"
29591 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29592 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29593 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29594 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29595 WILDCARD_SYMS="$WILDCARD_SYMS"
29596 WITH_CURSES_H="$with_curses_h"
29597 WITH_ECHO="${enable_echo:=yes}"
29598 WITH_OVERWRITE="$with_overwrite"
29599 cf_LIST_MODELS="$cf_list_models"
29600 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29601 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29602 cf_cv_abi_default="$cf_cv_abi_default"
29603 cf_cv_abi_version="$cf_cv_abi_version"
29604 cf_cv_do_relink="$cf_cv_do_relink"
29605 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29606 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29607 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29608 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29609 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29610 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29611 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29612 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29613 cf_cv_rel_version="$cf_cv_rel_version"
29614 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29615 cf_cv_shared_soname='$cf_cv_shared_soname'
29616 cf_cv_shlib_version="$cf_cv_shlib_version"
29617 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29618 cf_cv_system_name="$cf_cv_system_name"
29619 cf_cv_term_driver="$with_term_driver"
29620 cf_with_ada="$cf_with_ada"
29621 cf_with_cxx_binding="$cf_with_cxx_binding"
29622 cf_with_db_install="$cf_with_db_install"
29623 cf_with_manpages="$cf_with_manpages"
29624 cf_with_tests="$cf_with_tests"
29625 host="$host"
29626 target="$target"
29627 verbose="$verbose"
29628 with_shared_cxx="$with_shared_cxx"
29629
29630 EOF
29631
29632 cat >>"$CONFIG_STATUS" <<\EOF
29633 for ac_config_target in $ac_config_targets
29634 do
29635   case "$ac_config_target" in
29636   # Handling of arguments.
29637   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29638   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29639   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29640   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29641   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29642   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29643   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29644   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29645   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29646   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29647   *) { { echo "$as_me:29647: error: invalid argument: $ac_config_target" >&5
29648 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29649    { (exit 1); exit 1; }; };;
29650   esac
29651 done
29652
29653 # If the user did not use the arguments to specify the items to instantiate,
29654 # then the envvar interface is used.  Set only those that are not.
29655 # We use the long form for the default assignment because of an extremely
29656 # bizarre bug on SunOS 4.1.3.
29657 if "$ac_need_defaults"; then
29658   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29659   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29660   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29661 fi
29662
29663 # Create a temporary directory, and hook for its removal unless debugging.
29664 $debug ||
29665 {
29666   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29667   trap '{ (exit 1); exit 1; }' 1 2 13 15
29668 }
29669
29670 # Create a (secure) tmp directory for tmp files.
29671 : "${TMPDIR=/tmp}"
29672 {
29673   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29674   test -n "$tmp" && test -d "$tmp"
29675 }  ||
29676 {
29677   tmp=$TMPDIR/cs$$-$RANDOM
29678   (umask 077 && mkdir "$tmp")
29679 } ||
29680 {
29681    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29682    { (exit 1); exit 1; }
29683 }
29684
29685 EOF
29686
29687 cat >>"$CONFIG_STATUS" <<EOF
29688
29689 #
29690 # CONFIG_FILES section.
29691 #
29692
29693 # No need to generate the scripts if there are no CONFIG_FILES.
29694 # This happens for instance when ./config.status config.h
29695 if test -n "\$CONFIG_FILES"; then
29696   # Protect against being on the right side of a sed subst in config.status.
29697   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29698    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29699 s,@SHELL@,$SHELL,;t t
29700 s,@exec_prefix@,$exec_prefix,;t t
29701 s,@prefix@,$prefix,;t t
29702 s,@program_transform_name@,$program_transform_name,;t t
29703 s,@bindir@,$bindir,;t t
29704 s,@sbindir@,$sbindir,;t t
29705 s,@libexecdir@,$libexecdir,;t t
29706 s,@datarootdir@,$datarootdir,;t t
29707 s,@datadir@,$datadir,;t t
29708 s,@sysconfdir@,$sysconfdir,;t t
29709 s,@sharedstatedir@,$sharedstatedir,;t t
29710 s,@localstatedir@,$localstatedir,;t t
29711 s,@runstatedir@,$runstatedir,;t t
29712 s,@libdir@,$libdir,;t t
29713 s,@includedir@,$includedir,;t t
29714 s,@oldincludedir@,$oldincludedir,;t t
29715 s,@infodir@,$infodir,;t t
29716 s,@mandir@,$mandir,;t t
29717 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29718 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29719 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29720 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29721 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29722 s,@build_alias@,$build_alias,;t t
29723 s,@host_alias@,$host_alias,;t t
29724 s,@target_alias@,$target_alias,;t t
29725 s,@ECHO_C@,$ECHO_C,;t t
29726 s,@ECHO_N@,$ECHO_N,;t t
29727 s,@ECHO_T@,$ECHO_T,;t t
29728 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29729 s,@DEFS@,$DEFS,;t t
29730 s,@LIBS@,$LIBS,;t t
29731 s,@top_builddir@,$top_builddir,;t t
29732 s,@GREP@,$GREP,;t t
29733 s,@EGREP@,$EGREP,;t t
29734 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29735 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29736 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29737 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29738 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29739 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29740 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29741 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29742 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29743 s,@VERSION@,$VERSION,;t t
29744 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29745 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29746 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29747 s,@PACKAGE@,$PACKAGE,;t t
29748 s,@build@,$build,;t t
29749 s,@build_cpu@,$build_cpu,;t t
29750 s,@build_vendor@,$build_vendor,;t t
29751 s,@build_os@,$build_os,;t t
29752 s,@host@,$host,;t t
29753 s,@host_cpu@,$host_cpu,;t t
29754 s,@host_vendor@,$host_vendor,;t t
29755 s,@host_os@,$host_os,;t t
29756 s,@target@,$target,;t t
29757 s,@target_cpu@,$target_cpu,;t t
29758 s,@target_vendor@,$target_vendor,;t t
29759 s,@target_os@,$target_os,;t t
29760 s,@FGREP@,$FGREP,;t t
29761 s,@CC@,$CC,;t t
29762 s,@CFLAGS@,$CFLAGS,;t t
29763 s,@LDFLAGS@,$LDFLAGS,;t t
29764 s,@CPPFLAGS@,$CPPFLAGS,;t t
29765 s,@ac_ct_CC@,$ac_ct_CC,;t t
29766 s,@EXEEXT@,$EXEEXT,;t t
29767 s,@OBJEXT@,$OBJEXT,;t t
29768 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29769 s,@CPP@,$CPP,;t t
29770 s,@LDCONFIG@,$LDCONFIG,;t t
29771 s,@CXX@,$CXX,;t t
29772 s,@CXXFLAGS@,$CXXFLAGS,;t t
29773 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29774 s,@AWK@,$AWK,;t t
29775 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29776 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29777 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29778 s,@LINT@,$LINT,;t t
29779 s,@LINT_OPTS@,$LINT_OPTS,;t t
29780 s,@LINT_LIBS@,$LINT_LIBS,;t t
29781 s,@LN_S@,$LN_S,;t t
29782 s,@cf_config_suffix@,$cf_config_suffix,;t t
29783 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29784 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29785 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29786 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29787 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29788 s,@SET_MAKE@,$SET_MAKE,;t t
29789 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29790 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29791 s,@CTAGS@,$CTAGS,;t t
29792 s,@ETAGS@,$ETAGS,;t t
29793 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29794 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29795 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29796 s,@RANLIB@,$RANLIB,;t t
29797 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29798 s,@LD@,$LD,;t t
29799 s,@ac_ct_LD@,$ac_ct_LD,;t t
29800 s,@AR@,$AR,;t t
29801 s,@ac_ct_AR@,$ac_ct_AR,;t t
29802 s,@NM@,$NM,;t t
29803 s,@ac_ct_NM@,$ac_ct_NM,;t t
29804 s,@ARFLAGS@,$ARFLAGS,;t t
29805 s,@DESTDIR@,$DESTDIR,;t t
29806 s,@BUILD_CC@,$BUILD_CC,;t t
29807 s,@BUILD_CPP@,$BUILD_CPP,;t t
29808 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29809 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29810 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29811 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29812 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29813 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29814 s,@cf_list_models@,$cf_list_models,;t t
29815 s,@ABI_VERSION@,$ABI_VERSION,;t t
29816 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29817 s,@LIBTOOL@,$LIBTOOL,;t t
29818 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29819 s,@LT_UNDEF@,$LT_UNDEF,;t t
29820 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29821 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29822 s,@LIB_CREATE@,$LIB_CREATE,;t t
29823 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29824 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29825 s,@LIB_PREP@,$LIB_PREP,;t t
29826 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29827 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29828 s,@LIB_LINK@,$LIB_LINK,;t t
29829 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29830 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29831 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29832 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29833 s,@TICS_NAME@,$TICS_NAME,;t t
29834 s,@TINFO_NAME@,$TINFO_NAME,;t t
29835 s,@LIB_NAME@,$LIB_NAME,;t t
29836 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29837 s,@CC_G_OPT@,$CC_G_OPT,;t t
29838 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29839 s,@LD_MODEL@,$LD_MODEL,;t t
29840 s,@shlibdir@,$shlibdir,;t t
29841 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29842 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29843 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29844 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29845 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29846 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29847 s,@LINK_PROGS@,$LINK_PROGS,;t t
29848 s,@LINK_TESTS@,$LINK_TESTS,;t t
29849 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29850 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29851 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29852 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29853 s,@RPATH_LIST@,$RPATH_LIST,;t t
29854 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29855 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29856 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29857 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29858 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29859 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29860 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29861 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29862 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29863 s,@TIC@,$TIC,;t t
29864 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29865 s,@INFOCMP@,$INFOCMP,;t t
29866 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29867 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29868 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29869 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29870 s,@XTERM_KBS@,$XTERM_KBS,;t t
29871 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29872 s,@TERMINFO@,$TERMINFO,;t t
29873 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29874 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29875 s,@TERMPATH@,$TERMPATH,;t t
29876 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29877 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29878 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29879 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29880 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29881 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29882 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29883 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29884 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29885 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29886 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29887 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29888 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29889 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29890 s,@RGB_PATH@,$RGB_PATH,;t t
29891 s,@no_x11_rgb@,$no_x11_rgb,;t t
29892 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29893 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29894 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29895 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29896 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29897 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29898 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29899 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29900 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29901 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29902 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29903 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29904 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29905 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29906 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29907 s,@PTHREAD@,$PTHREAD,;t t
29908 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29909 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29910 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29911 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29912 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29913 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29914 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29915 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29916 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29917 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29918 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29919 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29920 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29921 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29922 s,@ECHO_LT@,$ECHO_LT,;t t
29923 s,@ECHO_LD@,$ECHO_LD,;t t
29924 s,@RULE_CC@,$RULE_CC,;t t
29925 s,@SHOW_CC@,$SHOW_CC,;t t
29926 s,@ECHO_CC@,$ECHO_CC,;t t
29927 s,@ECHO_LINK@,$ECHO_LINK,;t t
29928 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29929 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29930 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29931 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29932 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29933 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29934 s,@ADAFLAGS@,$ADAFLAGS,;t t
29935 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29936 s,@ADA_TRACE@,$ADA_TRACE,;t t
29937 s,@MATH_LIB@,$MATH_LIB,;t t
29938 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29939 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29940 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29941 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29942 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29943 s,@TEST_LIBS@,$TEST_LIBS,;t t
29944 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29945 s,@CXXCPP@,$CXXCPP,;t t
29946 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29947 s,@CXX_AR@,$CXX_AR,;t t
29948 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29949 s,@CXXLIBS@,$CXXLIBS,;t t
29950 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29951 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29952 s,@M4_exists@,$M4_exists,;t t
29953 s,@cf_ada_make@,$cf_ada_make,;t t
29954 s,@cf_ada_config@,$cf_ada_config,;t t
29955 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29956 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29957 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29958 s,@cf_compile_generics@,$cf_compile_generics,;t t
29959 s,@cf_generic_objects@,$cf_generic_objects,;t t
29960 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29961 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29962 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29963 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29964 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29965 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29966 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29967 s,@cf_ada_package@,$cf_ada_package,;t t
29968 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29969 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29970 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29971 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29972 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29973 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29974 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29975 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29976 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29977 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29978 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29979 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29980 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29981 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29982 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29983 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29984 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29985 s,@TICS_LIBS@,$TICS_LIBS,;t t
29986 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29987 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29988 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29989 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29990 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29991 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29992 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29993 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29994 s,@includesubdir@,$includesubdir,;t t
29995 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29996 s,@TICS_LIST@,$TICS_LIST,;t t
29997 s,@TINFO_LIST@,$TINFO_LIST,;t t
29998 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29999 s,@FORM_NAME@,$FORM_NAME,;t t
30000 s,@MENU_NAME@,$MENU_NAME,;t t
30001 s,@PANEL_NAME@,$PANEL_NAME,;t t
30002 s,@CXX_NAME@,$CXX_NAME,;t t
30003 s,@TEST_ARGS@,$TEST_ARGS,;t t
30004 s,@TEST_DEPS@,$TEST_DEPS,;t t
30005 s,@TEST_ARG2@,$TEST_ARG2,;t t
30006 s,@TEST_DEP2@,$TEST_DEP2,;t t
30007 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30008 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30009 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30010 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30011 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30012 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30013 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30014 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30015 s,@cross_compiling@,$cross_compiling,;t t
30016 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30017 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30018 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30019 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30020 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30021 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30022 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30023 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30024 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30025 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30026 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30027 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30028 CEOF
30029
30030 EOF
30031
30032   cat >>"$CONFIG_STATUS" <<\EOF
30033   # Split the substitutions into bite-sized pieces for seds with
30034   # small command number limits, like on Digital OSF/1 and HP-UX.
30035   ac_max_sed_lines=48
30036   ac_sed_frag=1 # Number of current file.
30037   ac_beg=1 # First line for current file.
30038   ac_end=$ac_max_sed_lines # Line after last line for current file.
30039   ac_more_lines=:
30040   ac_sed_cmds=
30041   while "$ac_more_lines"; do
30042     if test "$ac_beg" -gt 1; then
30043       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30044     else
30045       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30046     fi
30047     if test ! -s "$tmp"/subs.frag; then
30048       ac_more_lines=false
30049     else
30050       # The purpose of the label and of the branching condition is to
30051       # speed up the sed processing (if there are no `@' at all, there
30052       # is no need to browse any of the substitutions).
30053       # These are the two extra sed commands mentioned above.
30054       (echo ':t
30055   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30056       # It is possible to make a multiline substitution using escaped newlines.
30057       # Ensure that we do not split the substitution between script fragments.
30058       ac_BEG=$ac_end
30059       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30060       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30061       if test -s "$tmp"/subs.next; then
30062         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30063         if test ! -s "$tmp"/subs.edit; then
30064           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30065           if test ! -s "$tmp"/subs.edit; then
30066             if test "$ac_beg" -gt 1; then
30067               ac_end=`expr "$ac_end" - 1`
30068               continue
30069             fi
30070           fi
30071         fi
30072       fi
30073
30074       if test -z "$ac_sed_cmds"; then
30075         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30076       else
30077         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30078       fi
30079       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30080       ac_beg=$ac_end
30081       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30082     fi
30083   done
30084   if test -z "$ac_sed_cmds"; then
30085     ac_sed_cmds="cat"
30086   fi
30087 fi # test -n "$CONFIG_FILES"
30088
30089 EOF
30090 cat >>"$CONFIG_STATUS" <<\EOF
30091 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30092   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30093   case "$ac_file" in
30094   - | *:- | *:-:* ) # input from stdin
30095         cat >"$tmp"/stdin
30096         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30097         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30098   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30099         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30100   * )   ac_file_in=$ac_file.in ;;
30101   esac
30102
30103   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30104   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30105          X"$ac_file" : 'X\(//\)[^/]' \| \
30106          X"$ac_file" : 'X\(//\)$' \| \
30107          X"$ac_file" : 'X\(/\)' \| \
30108          .     : '\(.\)' 2>/dev/null ||
30109 echo X"$ac_file" |
30110     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30111           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30112           /^X\(\/\/\)$/{ s//\1/; q; }
30113           /^X\(\/\).*/{ s//\1/; q; }
30114           s/.*/./; q'`
30115   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30116     { case "$ac_dir" in
30117   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30118   *)                      as_incr_dir=.;;
30119 esac
30120 as_dummy="$ac_dir"
30121 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30122   case $as_mkdir_dir in
30123     # Skip DOS drivespec
30124     ?:) as_incr_dir=$as_mkdir_dir ;;
30125     *)
30126       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30127       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30128     ;;
30129   esac
30130 done; }
30131
30132     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30133     # A "../" for each directory in $ac_dir_suffix.
30134     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30135   else
30136     ac_dir_suffix= ac_dots=
30137   fi
30138
30139   case "$srcdir" in
30140   .)  ac_srcdir=.
30141       if test -z "$ac_dots"; then
30142          ac_top_srcdir=.
30143       else
30144          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30145       fi ;;
30146   [\\/]* | ?:[\\/]* )
30147       ac_srcdir="$srcdir$ac_dir_suffix";
30148       ac_top_srcdir="$srcdir" ;;
30149   *) # Relative path.
30150     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30151     ac_top_srcdir="$ac_dots$srcdir" ;;
30152   esac
30153
30154   case $INSTALL in
30155   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30156   *) ac_INSTALL=$ac_dots$INSTALL ;;
30157   esac
30158
30159   if test x"$ac_file" != x-; then
30160     { echo "$as_me:30160: creating $ac_file" >&5
30161 echo "$as_me: creating $ac_file" >&6;}
30162     rm -f "$ac_file"
30163   fi
30164   # Let's still pretend it is `configure' which instantiates (i.e., don't
30165   # use $as_me), people would be surprised to read:
30166   #    /* config.h.  Generated automatically by config.status.  */
30167   configure_input="Generated automatically from `echo $ac_file_in |
30168                                                  sed 's,.*/,,'` by configure."
30169
30170   # First look for the input files in the build tree, otherwise in the
30171   # src tree.
30172   ac_file_inputs=`IFS=:
30173     for f in $ac_file_in; do
30174       case $f in
30175       -) echo "$tmp"/stdin ;;
30176       [\\/$]*)
30177          # Absolute (can't be DOS-style, as IFS=:)
30178          test -f "$f" || { { echo "$as_me:30178: error: cannot find input file: $f" >&5
30179 echo "$as_me: error: cannot find input file: $f" >&2;}
30180    { (exit 1); exit 1; }; }
30181          echo "$f";;
30182       *) # Relative
30183          if test -f "$f"; then
30184            # Build tree
30185            echo "$f"
30186          elif test -f "$srcdir/$f"; then
30187            # Source tree
30188            echo "$srcdir/$f"
30189          else
30190            # /dev/null tree
30191            { { echo "$as_me:30191: error: cannot find input file: $f" >&5
30192 echo "$as_me: error: cannot find input file: $f" >&2;}
30193    { (exit 1); exit 1; }; }
30194          fi;;
30195       esac
30196     done` || { (exit 1); exit 1; }
30197 EOF
30198 cat >>"$CONFIG_STATUS" <<\EOF
30199   ac_warn_datarootdir=no
30200   if test x"$ac_file" != x-; then
30201     for ac_item in $ac_file_inputs
30202     do
30203       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30204       if test -n "$ac_seen"; then
30205         ac_used=`grep '@datarootdir@' "$ac_item"`
30206         if test -z "$ac_used"; then
30207           { echo "$as_me:30207: WARNING: datarootdir was used implicitly but not set:
30208 $ac_seen" >&5
30209 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30210 $ac_seen" >&2;}
30211           ac_warn_datarootdir=yes
30212         fi
30213       fi
30214       ac_seen=`grep '${datarootdir}' "$ac_item"`
30215       if test -n "$ac_seen"; then
30216         { echo "$as_me:30216: WARNING: datarootdir was used explicitly but not set:
30217 $ac_seen" >&5
30218 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30219 $ac_seen" >&2;}
30220         ac_warn_datarootdir=yes
30221       fi
30222     done
30223   fi
30224
30225 if test "x$ac_warn_datarootdir" = xyes; then
30226   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30227 fi
30228
30229 EOF
30230 cat >>"$CONFIG_STATUS" <<EOF
30231   sed "$ac_vpsub
30232 $extrasub
30233 EOF
30234 cat >>"$CONFIG_STATUS" <<\EOF
30235 :t
30236 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30237 s,@configure_input@,$configure_input,;t t
30238 s,@srcdir@,$ac_srcdir,;t t
30239 s,@top_srcdir@,$ac_top_srcdir,;t t
30240 s,@INSTALL@,$ac_INSTALL,;t t
30241 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30242   rm -f "$tmp"/stdin
30243 EOF
30244 : "${FGREP:=grep -F}"
30245 : "${EGREP:=grep -E}"
30246 cat >>"$CONFIG_STATUS" <<EOF
30247   : "\${FGREP:=$FGREP}"
30248   : "\${EGREP:=$EGREP}"
30249 EOF
30250 cat >>"$CONFIG_STATUS" <<\EOF
30251   if test x"$ac_file" != x-; then
30252     cp "$tmp/out" "$ac_file"
30253
30254     for ac_name in prefix exec_prefix datarootdir
30255     do
30256         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30257         if test -n "$ac_seen"; then
30258             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30259             if test -z "$ac_init"; then
30260               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30261               { echo "$as_me:30261: WARNING: Variable $ac_name is used but was not set:
30262 $ac_seen" >&5
30263 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30264 $ac_seen" >&2;}
30265             fi
30266         fi
30267     done
30268     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30269     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30270     if test -s "$tmp"/out; then
30271       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30272       { echo "$as_me:30272: WARNING: Some variables may not be substituted:
30273 $ac_seen" >&5
30274 echo "$as_me: WARNING: Some variables may not be substituted:
30275 $ac_seen" >&2;}
30276     fi
30277   else
30278     cat "$tmp"/out
30279   fi
30280   rm -f "$tmp"/out
30281
30282 done
30283 EOF
30284 cat >>"$CONFIG_STATUS" <<\EOF
30285
30286 #
30287 # CONFIG_HEADER section.
30288 #
30289
30290 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30291 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30292 #
30293 # ac_d sets the value in "#define NAME VALUE" lines.
30294 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30295 ac_dB='[        ].*$,\1#\2'
30296 ac_dC=' '
30297 ac_dD=',;t'
30298 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30299 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30300 ac_iB='\([      ]\),\1#\2define\3'
30301 ac_iC=' '
30302 ac_iD='\4,;t'
30303 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30304 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30305 ac_uB='$,\1#\2define\3'
30306 ac_uC=' '
30307 ac_uD=',;t'
30308
30309 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30310   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30311   case "$ac_file" in
30312   - | *:- | *:-:* ) # input from stdin
30313         cat >"$tmp"/stdin
30314         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30315         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30316   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30317         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30318   * )   ac_file_in=$ac_file.in ;;
30319   esac
30320
30321   test x"$ac_file" != x- && { echo "$as_me:30321: creating $ac_file" >&5
30322 echo "$as_me: creating $ac_file" >&6;}
30323
30324   # First look for the input files in the build tree, otherwise in the
30325   # src tree.
30326   ac_file_inputs=`IFS=:
30327     for f in $ac_file_in; do
30328       case $f in
30329       -) echo "$tmp"/stdin ;;
30330       [\\/$]*)
30331          # Absolute (can't be DOS-style, as IFS=:)
30332          test -f "$f" || { { echo "$as_me:30332: error: cannot find input file: $f" >&5
30333 echo "$as_me: error: cannot find input file: $f" >&2;}
30334    { (exit 1); exit 1; }; }
30335          echo $f;;
30336       *) # Relative
30337          if test -f "$f"; then
30338            # Build tree
30339            echo $f
30340          elif test -f "$srcdir/$f"; then
30341            # Source tree
30342            echo "$srcdir/$f"
30343          else
30344            # /dev/null tree
30345            { { echo "$as_me:30345: error: cannot find input file: $f" >&5
30346 echo "$as_me: error: cannot find input file: $f" >&2;}
30347    { (exit 1); exit 1; }; }
30348          fi;;
30349       esac
30350     done` || { (exit 1); exit 1; }
30351   # Remove the trailing spaces.
30352   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30353
30354 EOF
30355
30356 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30357 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30358 # be either 'cat' or 'sort'.
30359 cat confdefs.h | uniq >conftest.vals
30360
30361 # Break up conftest.vals because some shells have a limit on
30362 # the size of here documents, and old seds have small limits too.
30363
30364 rm -f conftest.tail
30365 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30366 while grep . conftest.vals >/dev/null
30367 do
30368   # Write chunks of a limited-size here document to conftest.frag.
30369   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30370   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30371   echo 'CEOF' >> "$CONFIG_STATUS"
30372   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30373   rm -f conftest.vals
30374   mv conftest.tail conftest.vals
30375 done
30376 rm -f conftest.vals
30377
30378 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30379 # marker @DEFS@.
30380 echo '  cat >> conftest.edit <<CEOF
30381 /@DEFS@/r conftest.frag
30382 /@DEFS@/d
30383 CEOF
30384 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30385 rm -f "$tmp"/in
30386 mv "$tmp"/out "$tmp"/in
30387 rm -f conftest.edit conftest.frag
30388 ' >> "$CONFIG_STATUS"
30389
30390 cat >>"$CONFIG_STATUS" <<\EOF
30391   # Let's still pretend it is `configure' which instantiates (i.e., don't
30392   # use $as_me), people would be surprised to read:
30393   #    /* config.h.  Generated automatically by config.status.  */
30394   if test x"$ac_file" = x-; then
30395     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30396   else
30397     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30398   fi
30399   cat "$tmp"/in >>"$tmp"/config.h
30400   rm -f "$tmp"/in
30401   if test x"$ac_file" != x-; then
30402     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30403       { echo "$as_me:30403: $ac_file is unchanged" >&5
30404 echo "$as_me: $ac_file is unchanged" >&6;}
30405     else
30406       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30407          X"$ac_file" : 'X\(//\)[^/]' \| \
30408          X"$ac_file" : 'X\(//\)$' \| \
30409          X"$ac_file" : 'X\(/\)' \| \
30410          .     : '\(.\)' 2>/dev/null ||
30411 echo X"$ac_file" |
30412     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30413           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30414           /^X\(\/\/\)$/{ s//\1/; q; }
30415           /^X\(\/\).*/{ s//\1/; q; }
30416           s/.*/./; q'`
30417       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30418         { case "$ac_dir" in
30419   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30420   *)                      as_incr_dir=.;;
30421 esac
30422 as_dummy="$ac_dir"
30423 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30424   case $as_mkdir_dir in
30425     # Skip DOS drivespec
30426     ?:) as_incr_dir=$as_mkdir_dir ;;
30427     *)
30428       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30429       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30430     ;;
30431   esac
30432 done; }
30433
30434       fi
30435       rm -f "$ac_file"
30436       mv "$tmp/config.h" "$ac_file"
30437     fi
30438   else
30439     cat "$tmp"/config.h
30440     rm -f "$tmp"/config.h
30441   fi
30442 done
30443 EOF
30444 cat >>"$CONFIG_STATUS" <<\EOF
30445 #
30446 # CONFIG_COMMANDS section.
30447 #
30448 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30449   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30450   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30451
30452   case "$ac_dest" in
30453     default )
30454 if test "x$cf_with_tests" != xno ; then
30455
30456 for cf_dir in test
30457 do
30458         if test ! -d "$srcdir/$cf_dir" ; then
30459                 continue
30460         elif test -f "$srcdir/$cf_dir/programs" ; then
30461                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30462         fi
30463 done
30464
30465 fi
30466
30467 cf_prefix=$LIB_PREFIX
30468
30469 case "$cf_cv_shlib_version" in
30470 (cygdll|msysdll|mingw|msvcdll)
30471         TINFO_NAME=$TINFO_ARG_SUFFIX
30472         TINFO_SUFFIX=.dll
30473         ;;
30474 esac
30475
30476 if test -n "$TINFO_SUFFIX" ; then
30477         case "$TINFO_SUFFIX" in
30478         (tw*)
30479                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30480                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30481                 ;;
30482         (t*)
30483                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30484                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30485                 ;;
30486         (w*)
30487                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30488                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30489                 ;;
30490         esac
30491 fi
30492
30493 for cf_dir in $SRC_SUBDIRS
30494 do
30495         if test ! -d "$srcdir/$cf_dir" ; then
30496                 continue
30497         elif test -f "$srcdir/$cf_dir/modules" ; then
30498
30499                 SHARED_LIB=
30500                 Libs_To_Make=
30501                 cf_awk_program=
30502                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30503                 then
30504                         cf_awk_program="$cf_awk_program\
30505 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30506 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30507 "
30508                 fi
30509
30510                 if test "x$WILDCARD_SYMS" = xno
30511                 then
30512                         cf_awk_program="$cf_awk_program\
30513 /[      ]_\\*;/ { skip=1; next; }\
30514 "
30515                 fi
30516
30517                 if test "x$cf_awk_program" != "x"
30518                 then
30519                         cat >>$cf_dir/Makefile <<CF_EOF
30520
30521 # Generated by CF_LIB_RULES
30522 resulting.map: $UNALTERED_SYMS
30523         $AWK 'BEGIN { skip = 1; last=""; } \
30524 $cf_awk_program \
30525 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30526  skip = 0; last = \$\$0; } \
30527 END { print last; }' < "$UNALTERED_SYMS" >\$@
30528
30529 distclean::
30530         rm -f resulting.map
30531 CF_EOF
30532                 fi
30533
30534                 for cf_item in $cf_LIST_MODELS
30535                 do
30536
30537         case X$cf_item in
30538         (Xlibtool)
30539                 cf_suffix='.la'
30540                 cf_depsuf=$cf_suffix
30541                 ;;
30542         (Xdebug)
30543                 case "$cf_cv_system_name" in
30544                 (*-msvc*)
30545                         cf_suffix='_g.lib'
30546                         ;;
30547                 (*)
30548                         cf_suffix='_g.a'
30549                         ;;
30550                 esac
30551                 cf_depsuf=$cf_suffix
30552                 ;;
30553         (Xprofile)
30554                 case "$cf_cv_system_name" in
30555                 (*-msvc*)
30556                         cf_suffix='_p.lib'
30557                         ;;
30558                 (*)
30559                         cf_suffix='_p.a'
30560                         ;;
30561                 esac
30562                 cf_depsuf=$cf_suffix
30563                 ;;
30564         (Xshared)
30565                 case "$cf_cv_system_name" in
30566                 (aix[5-7]*)
30567                         cf_suffix='.so'
30568                         cf_depsuf=$cf_suffix
30569                         ;;
30570                 (*-msvc*)
30571                         cf_suffix='.dll'
30572                         cf_depsuf='.dll.lib'
30573                         ;;
30574                 (cygwin*|msys*|mingw*)
30575                         cf_suffix='.dll'
30576                         cf_depsuf='.dll.a'
30577                         ;;
30578                 (darwin*)
30579                         cf_suffix='.dylib'
30580                         cf_depsuf=$cf_suffix
30581                         ;;
30582                 (hpux*)
30583                         case "$target" in
30584                         (ia64*)
30585                                 cf_suffix='.so'
30586                                 cf_depsuf=$cf_suffix
30587                                 ;;
30588                         (*)
30589                                 cf_suffix='.sl'
30590                                 cf_depsuf=$cf_suffix
30591                                 ;;
30592                         esac
30593                         ;;
30594                 (*)
30595                         cf_suffix='.so'
30596                         cf_depsuf=$cf_suffix
30597                         ;;
30598                 esac
30599                 ;;
30600         (*)
30601                 case "$target" in
30602                 (*-msvc*)
30603                         cf_suffix='.lib'
30604                         ;;
30605                 (*)
30606                         cf_suffix='.a'
30607                         ;;
30608                 esac
30609                 cf_depsuf=$cf_suffix
30610                 ;;
30611         esac
30612         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30613         then
30614                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30615                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30616         fi
30617
30618                         if test "$cf_dir" = "c++"
30619                         then
30620
30621 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30622
30623 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30624
30625                         else
30626
30627 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30628
30629 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30630
30631                         fi
30632                         test -z "$cf_libname" && cf_libname="$cf_dir"
30633                         if test "$cf_item" = shared ; then
30634                                 if test -n "${LIB_SUFFIX}"
30635                                 then
30636                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30637                                 else
30638                                         cf_shared_suffix="$cf_suffix"
30639                                 fi
30640                                 if test "$cf_cv_do_symlinks" = yes ; then
30641                                         cf_version_name=
30642
30643                                         case "$cf_cv_shlib_version" in
30644                                         (rel)
30645                                                 cf_version_name=REL_VERSION
30646                                                 ;;
30647                                         (abi)
30648                                                 cf_version_name=ABI_VERSION
30649                                                 ;;
30650                                         esac
30651
30652                                         if test -n "$cf_version_name"
30653                                         then
30654                                                 case "$cf_cv_system_name" in
30655                                                 (darwin*)
30656                                                         # "w", etc?
30657                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30658                                                         ;;
30659                                                 (*)
30660                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30661                                                         ;;
30662                                                 esac
30663                                         fi
30664                                         if test -n "${USE_LIB_SUFFIX}"
30665                                         then
30666                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30667                                         else
30668                                                 cf_shared_suffix="$cf_suffix"
30669                                         fi
30670                                 fi
30671                                 # cygwin needs import library, and has unique naming convention
30672                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30673                                 # use 'cyg' prefix for shared lib.
30674                                 case "$cf_cv_shlib_version" in
30675                                 (cygdll)
30676                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30677                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30678                                         ;;
30679                                 (msysdll)
30680                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30681                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30682                                         ;;
30683                                 (mingw)
30684                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30685                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30686                                         ;;
30687                                 (msvcdll)
30688                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30689                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30690                                         ;;
30691                                 (*)
30692                                         cf_add_lib=
30693                                         ;;
30694                                 esac
30695                                 if test -n "$cf_add_lib"
30696                                 then
30697                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30698                                         continue
30699                                 fi
30700                         fi
30701                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30702                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30703                 done
30704
30705                 if test "$cf_dir" = ncurses ; then
30706                         cf_subsets="$LIB_SUBSETS"
30707                         cf_r_parts="$cf_subsets"
30708                         cf_liblist="$Libs_To_Make"
30709
30710                         while test -n "$cf_r_parts"
30711                         do
30712                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30713                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30714                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30715                                         cf_add_lib=
30716                                         case "$cf_l_parts" in
30717                                         (*termlib*)
30718                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30719                                                 ;;
30720                                         (*ticlib*)
30721                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30722                                                 ;;
30723                                         (*)
30724                                                 break
30725                                                 ;;
30726                                         esac
30727                                         if test -n "$cf_add_lib"; then
30728                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30729                                         fi
30730                                 else
30731                                         break
30732                                 fi
30733                         done
30734                 else
30735                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30736                 fi
30737
30738                 if test "$cf_dir" = c++; then
30739                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30740                                 cf_list=
30741                                 for cf_item in $Libs_To_Make
30742                                 do
30743                                         case "$cf_item" in
30744                                         (*.a)
30745                                                 ;;
30746                                         (*)
30747                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30748                                                 ;;
30749                                         esac
30750                                         for cf_test in $cf_list
30751                                         do
30752                                                 if test "$cf_test" = "$cf_item"
30753                                                 then
30754                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30755                                                         cf_item=
30756                                                         break
30757                                                 fi
30758                                         done
30759                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30760                                 done
30761                                 Libs_To_Make="$cf_list"
30762                         fi
30763                 fi
30764
30765                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30766                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30767                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30768                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30769
30770                 $AWK -f "$srcdir/mk-0th.awk" \
30771                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30772                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30773
30774                 for cf_subset in $cf_subsets
30775                 do
30776                         cf_subdirs=
30777                         for cf_item in $cf_LIST_MODELS
30778                         do
30779
30780                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30781
30782 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30783
30784                         CXX_MODEL=$cf_ITEM
30785                         if test "$CXX_MODEL" = SHARED; then
30786                                 case "$cf_cv_shlib_version" in
30787                                 (cygdll|msysdll|mingw|msvcdll)
30788                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30789
30790 echo "${as_me:-configure}:30790: testing overriding CXX_MODEL to SHARED ..." 1>&5
30791
30792                                         with_shared_cxx=yes
30793                                         ;;
30794                                 (*)
30795                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30796                                         ;;
30797                                 esac
30798                         fi
30799
30800         case X$cf_item in
30801         (Xlibtool)
30802                 cf_suffix='.la'
30803                 cf_depsuf=$cf_suffix
30804                 ;;
30805         (Xdebug)
30806                 case "$cf_cv_system_name" in
30807                 (*-msvc*)
30808                         cf_suffix='_g.lib'
30809                         ;;
30810                 (*)
30811                         cf_suffix='_g.a'
30812                         ;;
30813                 esac
30814                 cf_depsuf=$cf_suffix
30815                 ;;
30816         (Xprofile)
30817                 case "$cf_cv_system_name" in
30818                 (*-msvc*)
30819                         cf_suffix='_p.lib'
30820                         ;;
30821                 (*)
30822                         cf_suffix='_p.a'
30823                         ;;
30824                 esac
30825                 cf_depsuf=$cf_suffix
30826                 ;;
30827         (Xshared)
30828                 case "$cf_cv_system_name" in
30829                 (aix[5-7]*)
30830                         cf_suffix='.so'
30831                         cf_depsuf=$cf_suffix
30832                         ;;
30833                 (*-msvc*)
30834                         cf_suffix='.dll'
30835                         cf_depsuf='.dll.lib'
30836                         ;;
30837                 (cygwin*|msys*|mingw*)
30838                         cf_suffix='.dll'
30839                         cf_depsuf='.dll.a'
30840                         ;;
30841                 (darwin*)
30842                         cf_suffix='.dylib'
30843                         cf_depsuf=$cf_suffix
30844                         ;;
30845                 (hpux*)
30846                         case "$target" in
30847                         (ia64*)
30848                                 cf_suffix='.so'
30849                                 cf_depsuf=$cf_suffix
30850                                 ;;
30851                         (*)
30852                                 cf_suffix='.sl'
30853                                 cf_depsuf=$cf_suffix
30854                                 ;;
30855                         esac
30856                         ;;
30857                 (*)
30858                         cf_suffix='.so'
30859                         cf_depsuf=$cf_suffix
30860                         ;;
30861                 esac
30862                 ;;
30863         (*)
30864                 case "$target" in
30865                 (*-msvc*)
30866                         cf_suffix='.lib'
30867                         ;;
30868                 (*)
30869                         cf_suffix='.a'
30870                         ;;
30871                 esac
30872                 cf_depsuf=$cf_suffix
30873                 ;;
30874         esac
30875         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30876         then
30877                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30878                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30879         fi
30880
30881         case $cf_item in
30882         (libtool) cf_subdir='obj_lo'  ;;
30883         (normal)  cf_subdir='objects' ;;
30884         (debug)   cf_subdir='obj_g' ;;
30885         (profile) cf_subdir='obj_p' ;;
30886         (shared)
30887                 case "$cf_cv_system_name" in
30888                 (cygwin|msys)
30889                         cf_subdir='objects' ;;
30890                 (*)
30891                         cf_subdir='obj_s' ;;
30892                 esac
30893         esac
30894
30895                         # Test for case where we build libtinfo with a different name.
30896                         cf_libname=$cf_dir
30897                         if test "$cf_dir" = ncurses ; then
30898                                 case "$cf_subset" in
30899                                 (*base*)
30900                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30901                                         ;;
30902                                 (*termlib*)
30903                                         cf_libname=$TINFO_LIB_SUFFIX
30904                                         ;;
30905                                 (ticlib*)
30906                                         cf_libname=$TICS_LIB_SUFFIX
30907                                         ;;
30908                                 esac
30909                         elif test "$cf_dir" = c++ ; then
30910
30911 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30912
30913 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30914
30915                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30916                         else
30917
30918 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30919
30920 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30921
30922                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30923                         fi
30924                         if test -n "${USE_ARG_SUFFIX}" ; then
30925                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30926                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30927                         fi
30928
30929                         # These dependencies really are for development, not
30930                         # builds, but they are useful in porting, too.
30931                         cf_depend="../include/ncurses_cfg.h"
30932                         if test "$srcdir" = "."; then
30933                                 cf_reldir="."
30934                         else
30935                                 cf_reldir="\${srcdir}"
30936                         fi
30937
30938                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30939                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30940                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30941                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30942                         fi
30943
30944                         cf_dir_suffix=
30945                         old_cf_suffix="$cf_suffix"
30946                         if test "$cf_cv_shlib_version_infix" = yes ; then
30947                         if test -n "$USE_LIB_SUFFIX" ; then
30948                                 case "$USE_LIB_SUFFIX" in
30949                                 (tw*)
30950                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30951                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30952                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30953                                         ;;
30954                                 (t*)
30955                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30956                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30957                                         cf_dir_suffix=t$EXTRA_SUFFIX
30958                                         ;;
30959                                 (w*)
30960                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30961                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30962                                         cf_dir_suffix=w$EXTRA_SUFFIX
30963                                         ;;
30964                                 (*)
30965                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30966                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30967                                         cf_dir_suffix=$EXTRA_SUFFIX
30968                                         ;;
30969                                 esac
30970                         fi
30971                         fi
30972
30973                         $AWK -f "$srcdir/mk-1st.awk" \
30974                                 name=${cf_libname}${cf_dir_suffix} \
30975                                 traces=$LIB_TRACING \
30976                                 MODEL=$cf_ITEM \
30977                                 CXX_MODEL=$CXX_MODEL \
30978                                 LIB_SUFFIX=$LIB_SUFFIX \
30979                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30980                                 make_phony="${cf_cv_make_PHONY:-no}" \
30981                                 model=$cf_subdir \
30982                                 prefix=$cf_prefix \
30983                                 suffix=$cf_suffix \
30984                                 subset=$cf_subset \
30985                                 driver=$cf_cv_term_driver \
30986                                 SymLink="$LN_S" \
30987                                 TermlibRoot=$TINFO_NAME \
30988                                 TermlibSuffix=$TINFO_SUFFIX \
30989                                 ShlibVer=$cf_cv_shlib_version \
30990                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30991                                 ReLink=${cf_cv_do_relink:-no} \
30992                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30993                                 DoLinks=$cf_cv_do_symlinks \
30994                                 rmSoLocs=$cf_cv_rm_so_locs \
30995                                 ldconfig="$LDCONFIG" \
30996                                 overwrite=$WITH_OVERWRITE \
30997                                 depend="$cf_depend" \
30998                                 host="$host" \
30999                                 libtool_version="$LIBTOOL_VERSION" \
31000                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31001
31002                         cf_suffix="$old_cf_suffix"
31003
31004                         for cf_subdir2 in $cf_subdirs lib
31005                         do
31006                                 test "$cf_subdir" = "$cf_subdir2" && break
31007                         done
31008                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31009                         $AWK -f "$srcdir/mk-2nd.awk" \
31010                                 name=$cf_dir \
31011                                 traces=$LIB_TRACING \
31012                                 MODEL=$cf_ITEM \
31013                                 model=$cf_subdir \
31014                                 subset=$cf_subset \
31015                                 srcdir=$srcdir \
31016                                 echo=$WITH_ECHO \
31017                                 crenames=$cf_cv_prog_CC_c_o \
31018                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31019                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31020                         cf_subdirs="$cf_subdirs $cf_subdir"
31021                         done
31022                 done
31023         fi
31024
31025         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31026 done
31027
31028 echo >> Makefile
31029 echo '# generated by CF_LIB_RULES' >> Makefile
31030
31031 if test "x$cf_cv_make_PHONY" = xyes ; then
31032         cat >> Makefile <<-CF_EOF
31033
31034         .PHONY :        libs
31035         .PHONY :        lintlib
31036         .PHONY :        install.includes
31037         .PHONY :        uninstall.includes
31038         .PHONY :        install.libs
31039         .PHONY :        uninstall.libs
31040 CF_EOF
31041 fi
31042
31043 for cf_dir in $SRC_SUBDIRS
31044 do
31045         if test ! -d "$srcdir/$cf_dir" ; then
31046                 continue
31047         fi
31048
31049         if test -f "$cf_dir/Makefile" ; then
31050                 case "$cf_dir" in
31051                 (Ada95)
31052                         echo 'libs \' >> Makefile
31053                         echo 'install.libs \' >> Makefile
31054                         echo 'uninstall.libs ::' >> Makefile
31055                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31056                         ;;
31057                 esac
31058         fi
31059
31060         if test -f "$srcdir/$cf_dir/modules" ; then
31061
31062                 if test "x$cf_cv_make_PHONY" = xyes ; then
31063                         cat >> Makefile <<-CF_EOF
31064
31065                         .PHONY :        install.$cf_dir
31066                         .PHONY :        uninstall.$cf_dir
31067 CF_EOF
31068                 fi
31069
31070                 echo >> Makefile
31071                 if test -f "$srcdir/$cf_dir/headers" ; then
31072 cat >> Makefile <<CF_EOF
31073 install.includes \\
31074 uninstall.includes \\
31075 CF_EOF
31076                 fi
31077
31078 cat >> Makefile <<CF_EOF
31079 lint \\
31080 libs \\
31081 lintlib \\
31082 install.libs \\
31083 uninstall.libs \\
31084 install.$cf_dir \\
31085 uninstall.$cf_dir ::
31086         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31087 CF_EOF
31088         elif test -f "$srcdir/$cf_dir/headers" ; then
31089 cat >> Makefile <<CF_EOF
31090
31091 libs \\
31092 install.libs \\
31093 uninstall.libs \\
31094 install.includes \\
31095 uninstall.includes ::
31096         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31097 CF_EOF
31098 fi
31099 done
31100
31101 if test "x$cf_cv_make_PHONY" = xyes ; then
31102         cat >> Makefile <<-CF_EOF
31103
31104         .PHONY :        install.data
31105         .PHONY :        uninstall.data
31106 CF_EOF
31107 fi
31108
31109 if test "x$cf_with_db_install" = xyes; then
31110 cat >> Makefile <<CF_EOF
31111
31112 install.libs uninstall.libs \\
31113 install.data uninstall.data ::
31114 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31115 CF_EOF
31116 else
31117 cat >> Makefile <<CF_EOF
31118
31119 install.libs uninstall.libs ::
31120         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31121 CF_EOF
31122 fi
31123
31124 if test "x$cf_with_manpages" = xyes; then
31125
31126 if test "x$cf_cv_make_PHONY" = xyes ; then
31127         cat >> Makefile <<-CF_EOF
31128
31129         .PHONY :        install.man
31130         .PHONY :        uninstall.man
31131 CF_EOF
31132 fi
31133
31134 cat >> Makefile <<CF_EOF
31135
31136 install.man \\
31137 uninstall.man ::
31138         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31139 CF_EOF
31140 fi
31141
31142 cat >> Makefile <<CF_EOF
31143
31144 distclean ::
31145         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31146         rm -f headers.sh headers.sed mk_shared_lib.sh
31147         rm -f edit_man.* man_alias.*
31148         rm -rf \${DIRS_TO_MAKE}
31149 CF_EOF
31150
31151 rm -f headers.sed headers.sh
31152
31153 echo creating headers.sh
31154 cat >headers.sh <<CF_EOF
31155 #! $SHELL
31156 # This shell script is generated by the 'configure' script.  It is invoked in a
31157 # subdirectory of the build tree.  It generates a sed-script in the parent
31158 # directory that is used to adjust includes for header files that reside in a
31159 # subdirectory of /usr/include, etc.
31160 PRG=""
31161 while test \$# != 3
31162 do
31163 PRG="\$PRG \$1"; shift
31164 done
31165 DST=\$1
31166 REF=\$2
31167 SRC=\$3
31168 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31169 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31170 echo installing \$SRC in \$DST
31171 CF_EOF
31172
31173 if test "$WITH_CURSES_H" = yes; then
31174         cat >>headers.sh <<CF_EOF
31175 case \$DST in
31176 (/*/include/*)
31177         END=\`basename \$DST\`
31178         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31179         do
31180                 NAME=\`basename \$i\`
31181                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31182         done
31183         ;;
31184 (*)
31185         echo "" >> \$TMPSED
31186         ;;
31187 esac
31188 CF_EOF
31189
31190 else
31191         cat >>headers.sh <<CF_EOF
31192 case \$DST in
31193 (/*/include/*)
31194         END=\`basename \$DST\`
31195         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31196         do
31197                 NAME=\`basename \$i\`
31198                 if test "\$NAME" = "curses.h"
31199                 then
31200                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31201                         NAME=ncurses.h
31202                 fi
31203                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31204         done
31205         ;;
31206 (*)
31207         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31208         ;;
31209 esac
31210 CF_EOF
31211 fi
31212 cat >>headers.sh <<CF_EOF
31213 rm -f \$TMPSRC
31214 sed -f \$TMPSED \$SRC > \$TMPSRC
31215 NAME=\`basename \$SRC\`
31216 CF_EOF
31217 if test "$WITH_CURSES_H" != yes; then
31218         cat >>headers.sh <<CF_EOF
31219 test "\$NAME" = "curses.h" && NAME=ncurses.h
31220 CF_EOF
31221 fi
31222 cat >>headers.sh <<CF_EOF
31223 # Just in case someone gzip'd manpages, remove the conflicting copy.
31224 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31225
31226 eval \$PRG \$TMPSRC \$DST/\$NAME
31227 rm -f \$TMPSRC \$TMPSED
31228 CF_EOF
31229
31230 chmod 0755 headers.sh
31231
31232 for cf_dir in $SRC_SUBDIRS
31233 do
31234         if test ! -d "$srcdir/$cf_dir" ; then
31235                 continue
31236         fi
31237
31238         if test -f "$srcdir/$cf_dir/headers" ; then
31239                 $AWK -f "$srcdir/mk-hdr.awk" \
31240                         subset="$LIB_SUBSETS" \
31241                         compat="$WITH_CURSES_H" \
31242                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31243         fi
31244
31245         if test -f "$srcdir/$cf_dir/modules" ; then
31246                 if test "$cf_dir" != "c++" ; then
31247                         if test "x$cf_cv_make_PHONY" = xyes ; then
31248                                 cat >> $cf_dir/Makefile <<-CF_EOF
31249
31250                                 .PHONY :        depend
31251 CF_EOF
31252                         fi
31253
31254                         cat >>$cf_dir/Makefile <<"CF_EOF"
31255 depend : ${AUTO_SRC}
31256         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31257
31258 # DO NOT DELETE THIS LINE -- make depend depends on it.
31259 CF_EOF
31260                 fi
31261         fi
31262 done
31263
31264 if test "$MANPAGE_RENAMES" != no ; then
31265         # Construct a sed-script to perform renaming within man-pages
31266         test -n "$verbose" && echo "creating edit_man.sed"
31267         test ! -d man && mkdir man
31268         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31269 fi
31270
31271 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31272 if test -z "$USE_OLD_MAKERULES" ; then
31273         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31274 fi
31275 fi
31276  ;;
31277   esac
31278 done
31279 EOF
31280
31281 cat >>"$CONFIG_STATUS" <<\EOF
31282
31283 { (exit 0); exit 0; }
31284 EOF
31285 chmod +x "$CONFIG_STATUS"
31286 ac_clean_files=$ac_clean_files_save
31287
31288 # configure is writing to config.log, and then calls config.status.
31289 # config.status does its own redirection, appending to config.log.
31290 # Unfortunately, on DOS this fails, as config.log is still kept open
31291 # by configure, so config.status won't be able to write to it; its
31292 # output is simply discarded.  So we exec the FD to /dev/null,
31293 # effectively closing config.log, so it can be properly (re)opened and
31294 # appended to by config.status.  When coming back to configure, we
31295 # need to make the FD available again.
31296 if test "$no_create" != yes; then
31297   ac_cs_success=:
31298   exec 5>/dev/null
31299   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31300   exec 5>>config.log
31301   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31302   # would make configure fail if this is the last instruction.
31303   "$ac_cs_success" || { (exit 1); exit 1; }
31304 fi
31305 ${MAKE:-make} preinstall