Debian Codegraph @

configure

raw
1 #! /bin/sh
2 # From configure.in Revision: 1.824 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20250126.
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 -*dir | -dvi* | -doc* | -html* | -local* | -pdf* | -ps* )
485 echo "$as_me: WARNING: unsupported option: $ac_option" >&2
486 ;;
487
488 -*) { echo "$as_me: error: unrecognized option: $ac_option
489 Try \`$0 --help' for more information." >&2
490 { (exit 1); exit 1; }; }
491 ;;
492
493 *=*)
494 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
495 # Reject names that are not valid shell variable names.
496 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
497 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
498 { (exit 1); exit 1; }; }
499 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
500 eval "$ac_envvar='$ac_optarg'"
501 export "$ac_envvar" ;;
502
503 *)
504 # FIXME: should be removed in autoconf 3.0.
505 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
506 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
507 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
508 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
509 ;;
510
511 esac
512 done
513
514 if test -n "$ac_prev"; then
515 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
516 { echo "$as_me: error: missing argument to $ac_option" >&2
517 { (exit 1); exit 1; }; }
518 fi
519
520 # Be sure to have absolute paths.
521 for ac_var in exec_prefix prefix
522 do
523 eval ac_val=$`echo "$ac_var"`
524 case "$ac_val" in
525 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
526 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
527 { (exit 1); exit 1; }; };;
528 esac
529 done
530
531 # Be sure to have absolute paths.
532 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
533 localstatedir libdir includedir oldincludedir infodir mandir
534 do
535 eval ac_val=$`echo "$ac_var"`
536 case "$ac_val" in
537 [\\/$]* | ?:[\\/]* ) ;;
538 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
539 { (exit 1); exit 1; }; };;
540 esac
541 done
542
543 # There might be people who depend on the old broken behavior: `$host'
544 # used to hold the argument of --host etc.
545 build=$build_alias
546 host=$host_alias
547 target=$target_alias
548
549 # FIXME: should be removed in autoconf 3.0.
550 if test "x$host_alias" != x; then
551 if test "x$build_alias" = x; then
552 cross_compiling=maybe
553 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
554 If a cross compiler is detected then cross compile mode will be used." >&2
555 elif test "x$build_alias" != "x$host_alias"; then
556 cross_compiling=yes
557 fi
558 fi
559
560 ac_tool_prefix=
561 test -n "$host_alias" && ac_tool_prefix=$host_alias-
562
563 test "$silent" = yes && exec 6>/dev/null
564
565 # Find the source files, if location was not specified.
566 if test -z "$srcdir"; then
567 ac_srcdir_defaulted=yes
568 # Try the directory containing this script, then its parent.
569 ac_prog=$0
570 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
571 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
572 srcdir=$ac_confdir
573 if test ! -r "$srcdir/$ac_unique_file"; then
574 srcdir=..
575 fi
576 else
577 ac_srcdir_defaulted=no
578 fi
579 if test ! -r "$srcdir/$ac_unique_file"; then
580 if test "$ac_srcdir_defaulted" = yes; then
581 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
582 { (exit 1); exit 1; }; }
583 else
584 { echo "$as_me: error: cannot find sources in $srcdir" >&2
585 { (exit 1); exit 1; }; }
586 fi
587 fi
588 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
589 ac_env_build_alias_set=${build_alias+set}
590 ac_env_build_alias_value=$build_alias
591 ac_cv_env_build_alias_set=${build_alias+set}
592 ac_cv_env_build_alias_value=$build_alias
593 ac_env_host_alias_set=${host_alias+set}
594 ac_env_host_alias_value=$host_alias
595 ac_cv_env_host_alias_set=${host_alias+set}
596 ac_cv_env_host_alias_value=$host_alias
597 ac_env_target_alias_set=${target_alias+set}
598 ac_env_target_alias_value=$target_alias
599 ac_cv_env_target_alias_set=${target_alias+set}
600 ac_cv_env_target_alias_value=$target_alias
601 ac_env_CC_set=${CC+set}
602 ac_env_CC_value=$CC
603 ac_cv_env_CC_set=${CC+set}
604 ac_cv_env_CC_value=$CC
605 ac_env_CFLAGS_set=${CFLAGS+set}
606 ac_env_CFLAGS_value=$CFLAGS
607 ac_cv_env_CFLAGS_set=${CFLAGS+set}
608 ac_cv_env_CFLAGS_value=$CFLAGS
609 ac_env_LDFLAGS_set=${LDFLAGS+set}
610 ac_env_LDFLAGS_value=$LDFLAGS
611 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
612 ac_cv_env_LDFLAGS_value=$LDFLAGS
613 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
614 ac_env_CPPFLAGS_value=$CPPFLAGS
615 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
616 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
617 ac_env_CPP_set=${CPP+set}
618 ac_env_CPP_value=$CPP
619 ac_cv_env_CPP_set=${CPP+set}
620 ac_cv_env_CPP_value=$CPP
621 ac_env_CXX_set=${CXX+set}
622 ac_env_CXX_value=$CXX
623 ac_cv_env_CXX_set=${CXX+set}
624 ac_cv_env_CXX_value=$CXX
625 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
626 ac_env_CXXFLAGS_value=$CXXFLAGS
627 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
628 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
629 ac_env_CXXCPP_set=${CXXCPP+set}
630 ac_env_CXXCPP_value=$CXXCPP
631 ac_cv_env_CXXCPP_set=${CXXCPP+set}
632 ac_cv_env_CXXCPP_value=$CXXCPP
633
634 #
635 # Report the --help message.
636 #
637 if test "$ac_init_help" = "long"; then
638 # Omit some internal or obsolete options to make the list less imposing.
639 # This message is too long to be a string in the A/UX 3.1 sh.
640 cat <<EOF
641 \`configure' configures this package to adapt to many kinds of systems.
642
643 Usage: $0 [OPTION]... [VAR=VALUE]...
644
645 To assign environment variables (e.g., CC, CFLAGS...), specify them as
646 VAR=VALUE. See below for descriptions of some of the useful variables.
647
648 Defaults for the options are specified in brackets.
649
650 Configuration:
651 -h, --help display this help and exit
652 --help=short display options specific to this package
653 --help=recursive display the short help of all the included packages
654 -V, --version display version information and exit
655 -q, --quiet, --silent do not print \`checking...' messages
656 --cache-file=FILE cache test results in FILE [disabled]
657 -C, --config-cache alias for \`--cache-file=config.cache'
658 -n, --no-create do not create output files
659 --srcdir=DIR find the sources in DIR [configure dir or \`..']
660
661 EOF
662
663 cat <<EOF
664 Installation directories:
665 --prefix=PREFIX install architecture-independent files in PREFIX
666 [$ac_default_prefix]
667 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
668 [PREFIX]
669
670 By default, \`make install' will install all the files in
671 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
672 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
673 for instance \`--prefix=\$HOME'.
674
675 For better control, use the options below.
676
677 Fine tuning of the installation directories:
678 --bindir=DIR user executables [EPREFIX/bin]
679 --sbindir=DIR system admin executables [EPREFIX/sbin]
680 --libexecdir=DIR program executables [EPREFIX/libexec]
681 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
682 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
683 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
684 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
685 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
686 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
687 --libdir=DIR object code libraries [EPREFIX/lib]
688 --includedir=DIR C header files [PREFIX/include]
689 --oldincludedir=DIR C header files for non-gcc [/usr/include]
690 --infodir=DIR info documentation [DATAROOTDIR/info]
691 --mandir=DIR man documentation [DATAROOTDIR/man]
692 EOF
693
694 cat <<\EOF
695
696 Program names:
697 --program-prefix=PREFIX prepend PREFIX to installed program names
698 --program-suffix=SUFFIX append SUFFIX to installed program names
699 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
700
701 System types:
702 --build=BUILD configure for building on BUILD [guessed]
703 --host=HOST build programs to run on HOST [BUILD]
704 --target=TARGET configure for building compilers for TARGET [HOST]
705 EOF
706 fi
707
708 if test -n "$ac_init_help"; then
709
710 cat <<\EOF
711
712 Optional Packages:
713 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
714 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
715
716 Optional Features:
717 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
718 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
719
720 --with-rel-version=XXX override derived release version
721 --with-abi-version=XXX override derived ABI version
722 --with-system-type=XXX test: override derived host system-type
723 --with-abi-altered=XXX override visible ABI version, for packaging
724 --without-ada suppress check for Ada compiler
725 --without-cxx do not adjust ncurses bool to match C++
726 --without-cxx-binding do not build C++ binding and demo
727 --disable-db-install suppress install of terminal database
728 --without-manpages suppress install of manpages
729 --without-progs suppress build/install with programs (e.g., tic)
730 --without-tests suppress build/install with test-programs
731 --without-curses-h install curses.h as ncurses.h only
732 --with-config-suffix=X name ncurses*X-config file with X
733 --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
734 --with-pkg-config-libdir[=XXX] use given directory for installing pc-files
735 --enable-pc-files generate and install .pc files for pkg-config
736 --with-pc-suffix[=XXX] suffix pkg-config files with XXX
737 --enable-mixed-case tic should assume mixed-case filenames
738 --with-install-prefix=DESTDIR use DESTDIR as installation directory prefix
739 --enable-install-prefix merge DESTDIR with installation prefix
740 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
741 --with-build-cc=XXX the build C compiler ($BUILD_CC)
742 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
743 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
744 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
745 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
746 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
747 Options to Specify the Libraries Built/Used:
748 --disable-libtool-version enable to use libtool's incompatible naming scheme
749 --with-libtool generate libraries with libtool
750 --with-shared generate shared-libraries
751 --with-normal generate normal-libraries (default)
752 --with-debug generate debug-libraries (default)
753 --with-profile generate profile-libraries
754 --with-cxx-shared generate C++ shared-libraries
755 --with-lib-prefix override library-prefix
756 --with-termlib generate separate terminfo library
757 --with-ticlib generate separate tic library
758 --enable-rpath use rpath option when generating shared libraries
759 --disable-relink relink shared libraries during install
760 --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names
761 --with-libtool-opts[=XXX] give libtool additional options XXX
762 --with-export-syms[=SYM-FILE] limit symbols exported by libtool to those listed in SYM-FILE
763 --with-versioned-syms[=MAP-FILE] version ELF shared library symbols per MAP-FILE
764 --with-gpm use Alessandro Rubini's GPM library
765 --without-dlsym do not use dlsym() to load GPM dynamically
766 --with-pcre2 use PCRE2 for regular-expressions
767 --with-sysmouse use sysmouse (FreeBSD console)
768 --disable-lib-suffixes disable library suffixes
769 --disable-rpath-hack don't add rpath options for additional libraries
770 --disable-pkg-ldflags disable extra LDFLAGS for package-scripts
771 Fine-Tuning Your Configuration:
772 --with-extra-suffix[=X] append extra suffix X to header/library paths
773 --disable-overwrite put headers in subdir, omit link to -lcurses
774 --disable-database do not use terminfo, only fallbacks/termcap
775 --with-database=XXX specify terminfo source to install
776 --with-hashed-db specify hashed-database library
777 --with-fallbacks=XXX specify list of fallback terminal descriptions
778 --with-tic-path=XXX specify path of tic for fallbacks
779 --with-infocmp-path=XXX specify path of infocmp for fallbacks
780 --without-xterm-new specify if xterm terminfo should be old version
781 --with-xterm-kbs[=XXX] specify if xterm backspace-key sends BS or DEL
782 --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
783 --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
784 --disable-big-core assume machine has little memory
785 --disable-big-strings assume compiler has only standard-size strings
786 --enable-termcap compile in termcap fallback support
787 --with-termpath=XXX specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
788 --enable-getcap fast termcap load, no xrefs to terminfo
789 --enable-getcap-cache cache translated termcaps in ~/.terminfo
790 --disable-home-terminfo drop ~/.terminfo from terminfo search-path
791 --disable-root-environ restrict root use of ncurses environment variables
792 --disable-root-access restrict file-access when running setuid
793 --disable-setuid-environ restrict setuid use of ncurses environment variables
794 --enable-symlinks make tic use symbolic links not hard links
795 --enable-broken_linker compile with broken-linker support code
796 --enable-bsdpad recognize BSD-style prefix padding
797 --disable-widec compile without wide character and UTF-8 support
798 --disable-lp64 allow chtype to be long (ignore _LP64)
799 --disable-largefile omit support for large files
800 --disable-tparm-varargs compile tparm() without varargs interface
801 --disable-tic-depends link tic library without explicit dependency on ncurses library
802 --enable-wattr-macros enable wattr* macros
803 --with-x11-rgb=FILE obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.txt)
804 --with-bool=TYPE fall back to TYPE for curses 'bool' typedef
805 --with-caps=alt compile with alternate Caps file
806 --with-chtype=TYPE override type of chtype
807 --with-ospeed=TYPE override type of ospeed variable
808 --with-mmask-t=TYPE override type of mmask_t
809 --with-ccharw-max=XXX override size CCHARW_MAX
810 --enable-signed-char use signed chars for Boolean array in term.h
811 --with-tparm-arg=TYPE override parameter type of tparm
812 --with-rcs-ids compile-in RCS identifiers
813 Extensions:
814 --disable-ext-funcs disable function-extensions
815 --enable-sp-funcs enable SCREEN-extensions
816 --enable-term-driver enable terminal-driver
817 --enable-const compile with extra/non-standard const
818 --enable-ext-colors compile for 256-color support
819 --enable-rgb-color compile for extended direct-color
820 --enable-ext-mouse compile for extended mouse-encoding
821 --enable-ext-putwin compile with extended putwin/screendump
822 --enable-no-padding compile with $NCURSES_NO_PADDING code
823 --enable-sigwinch compile with SIGWINCH handler
824 --enable-tcap-names compile with user-definable terminal capabilities
825 --enable-named-pipes use named pipes with Windows driver
826 Reentrant Code:
827 --with-pthread use POSIX thread library
828 --enable-pthreads-eintr enable EINTR in wgetch with pthreads
829 --enable-weak-symbols enable weak-symbols for pthreads
830 --enable-reentrant compile with reentrant code
831 --disable-opaque-curses do not make WINDOW, etc., structures opaque
832 --disable-opaque-form do not make form library structures opaque
833 --disable-opaque-menu do not make menu library structures opaque
834 --disable-opaque-panel do not make panel library structures opaque
835 --with-wrap-prefix=XXX override prefix used for public variables
836 Development Code:
837 --without-develop disable development options
838 --enable-check-size compile-in code to detect screensize of serial terminals
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 obsolete option for 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 --with-strip-program=XX specify program to use when stripping in install
855 --enable-warnings test: turn on gcc compiler warnings
856 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
857 --enable-string-hacks work around bogus compiler/loader warnings
858 --enable-assertions test: turn on generation of assertion code
859 --with-dmalloc test: use Gray Watson's dmalloc library
860 --with-dbmalloc test: use Conor Cahill's dbmalloc library
861 --with-valgrind test: use valgrind
862 --disable-leaks test: free permanent memory, analyze leaks
863 --enable-expanded test: generate functions for certain macros
864 --disable-macros test: use functions rather than macros
865 --with-trace test: add trace() function to all models of ncurses
866 --disable-gnat-projects test: disable GNAT projects even if usable
867 Ada Binding Options:
868 --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake)
869 --with-ada-include=DIR find Ada95 includes in DIR (default: PREFIX/share/ada/adainclude)
870 --with-ada-objects=DIR find Ada95 objects in DIR (default: PREFIX/lib/ada/adalib)
871 --with-ada-sharedlib build Ada95 shared library; requires GNAT project support
872 --with-ada-libname[=XXX] use XXX as Ada95 library name
873 Library basenames for pkgsrc:
874 --with-form-libname[=XXX] override ifelse(,,form,) basename of library
875 --with-menu-libname[=XXX] override ifelse(,,menu,) basename of library
876 --with-panel-libname[=XXX] override ifelse(,,panel,) basename of library
877 --with-cxx-libname[=XXX] override ifelse(ncurses++,,cxx,ncurses++) basename of library
878 Options to Specify How Manpages are Installed:
879 --with-manpage-format specify man page format: gzip/compress/bzip2/xz,
880 BSDI/normal and optionally formatted/catonly,
881 e.g., gzip,formatted
882 --with-manpage-renames specify man page renaming
883 --with-manpage-aliases specify man page aliases using .so
884 --with-manpage-symlinks specify man page aliases using symlinks
885 --with-manpage-tbl specify man page processing with tbl
886
887 Some influential environment variables:
888 CC C compiler command
889 CFLAGS C compiler flags
890 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
891 nonstandard directory <lib dir>
892 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
893 headers in a nonstandard directory <include dir>
894 CPP C preprocessor
895 CXX C++ compiler command
896 CXXFLAGS C++ compiler flags
897 CXXCPP C++ preprocessor
898
899 Use these variables to override the choices made by `configure' or to help
900 it to find libraries and programs with nonstandard names/locations.
901
902 EOF
903 fi
904
905 if test "$ac_init_help" = "recursive"; then
906 # If there are subdirs, report their specific --help.
907 ac_popdir=`pwd`
908 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
909 cd "$ac_subdir"
910 # A "../" for each directory in /$ac_subdir.
911 ac_dots=`echo "$ac_subdir" |
912 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
913
914 case "$srcdir" in
915 .) # No --srcdir option. We are building in place.
916 ac_sub_srcdir="$srcdir" ;;
917 [\\/]* | ?:[\\/]* ) # Absolute path.
918 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
919 *) # Relative path.
920 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
921 esac
922
923 # Check for guested configure; otherwise get Cygnus style configure.
924 if test -f "$ac_sub_srcdir/configure.gnu"; then
925 echo
926 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
927 elif test -f "$ac_sub_srcdir/configure"; then
928 echo
929 $SHELL "$ac_sub_srcdir/configure" --help=recursive
930 elif test -f "$ac_sub_srcdir/configure.ac" ||
931 test -f "$ac_sub_srcdir/configure.in"; then
932 echo
933 "$ac_configure" --help
934 else
935 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
936 fi
937 cd "$ac_popdir"
938 done
939 fi
940
941 test -n "$ac_init_help" && exit 0
942 if "$ac_init_version"; then
943 cat <<\EOF
944
945 Copyright 2003-2022,2023 Thomas E. Dickey
946 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
947 Free Software Foundation, Inc.
948 This configure script is free software; the Free Software Foundation
949 gives unlimited permission to copy, distribute and modify it.
950 EOF
951 exit 0
952 fi
953 exec 5>config.log
954 cat >&5 <<EOF
955 This file contains any messages produced by compilers while
956 running configure, to aid debugging if configure makes a mistake.
957
958 It was created by $as_me, which was
959 generated by GNU Autoconf 2.52.20250126. Invocation command line was
960
961 $ $0 $@
962
963 EOF
964 {
965 cat <<_ASUNAME
966 ## ---------- ##
967 ## Platform. ##
968 ## ---------- ##
969
970 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
971 uname -m = `(uname -m) 2>/dev/null || echo unknown`
972 uname -r = `(uname -r) 2>/dev/null || echo unknown`
973 uname -s = `(uname -s) 2>/dev/null || echo unknown`
974 uname -v = `(uname -v) 2>/dev/null || echo unknown`
975
976 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
977 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
978
979 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
980 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
981 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
982 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
983 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
984 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
985 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
986
987 PATH = $PATH
988
989 _ASUNAME
990 } >&5
991
992 cat >&5 <<EOF
993 ## ------------ ##
994 ## Core tests. ##
995 ## ------------ ##
996
997 EOF
998
999 # Keep a trace of the command line.
1000 # Strip out --no-create and --no-recursion so they do not pile up.
1001 # Also quote any args containing shell meta-characters.
1002 ac_configure_args=
1003 ac_sep=
1004 for ac_arg
1005 do
1006 case "$ac_arg" in
1007 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1008 | --no-cr | --no-c) ;;
1009 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1010 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1011 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1012 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1013 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1014 ac_sep=" " ;;
1015 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1016 ac_sep=" " ;;
1017 esac
1018 # Get rid of the leading space.
1019 done
1020
1021 # When interrupted or exit'd, cleanup temporary files, and complete
1022 # config.log. We remove comments because anyway the quotes in there
1023 # would cause problems or look ugly.
1024 trap 'exit_status=$?
1025 # Save into config.log some information that might help in debugging.
1026 echo >&5
1027 echo "## ----------------- ##" >&5
1028 echo "## Cache variables. ##" >&5
1029 echo "## ----------------- ##" >&5
1030 echo >&5
1031 # The following way of writing the cache mishandles newlines in values,
1032 {
1033 (set) 2>&1 |
1034 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1035 *ac_space=\ *)
1036 sed -n \
1037 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1038 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1039 ;;
1040 *)
1041 sed -n \
1042 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1043 ;;
1044 esac;
1045 } >&5
1046 sed "/^$/d" confdefs.h >conftest.log
1047 if test -s conftest.log; then
1048 echo >&5
1049 echo "## ------------ ##" >&5
1050 echo "## confdefs.h. ##" >&5
1051 echo "## ------------ ##" >&5
1052 echo >&5
1053 cat conftest.log >&5
1054 fi
1055 (echo; echo) >&5
1056 test "$ac_signal" != 0 &&
1057 echo "$as_me: caught signal $ac_signal" >&5
1058 echo "$as_me: exit $exit_status" >&5
1059 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1060 exit $exit_status
1061 ' 0
1062 for ac_signal in 1 2 13 15; do
1063 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1064 done
1065 ac_signal=0
1066
1067 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1068 rm -rf conftest* confdefs.h
1069 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1070 echo >confdefs.h
1071
1072 # Let the site file select an alternate cache file if it wants to.
1073 # Prefer explicitly selected file to automatically selected ones.
1074 if test -z "$CONFIG_SITE"; then
1075 if test "x$prefix" != xNONE; then
1076 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1077 else
1078 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1079 fi
1080 fi
1081 for ac_site_file in $CONFIG_SITE; do
1082 if test -r "$ac_site_file"; then
1083 { echo "$as_me:1083: loading site script $ac_site_file" >&5
1084 echo "$as_me: loading site script $ac_site_file" >&6;}
1085 cat "$ac_site_file" >&5
1086 . "$ac_site_file"
1087 fi
1088 done
1089
1090 if test -r "$cache_file"; then
1091 # Some versions of bash will fail to source /dev/null (special
1092 # files actually), so we avoid doing that.
1093 if test -f "$cache_file"; then
1094 { echo "$as_me:1094: loading cache $cache_file" >&5
1095 echo "$as_me: loading cache $cache_file" >&6;}
1096 case $cache_file in
1097 [\\/]* | ?:[\\/]* ) . $cache_file;;
1098 *) . ./$cache_file;;
1099 esac
1100 fi
1101 else
1102 { echo "$as_me:1102: creating cache $cache_file" >&5
1103 echo "$as_me: creating cache $cache_file" >&6;}
1104 >$cache_file
1105 fi
1106
1107 # Check that the precious variables saved in the cache have kept the same
1108 # value.
1109 ac_cache_corrupted=false
1110 for ac_var in `(set) 2>&1 |
1111 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1112 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1113 eval ac_new_set=\$ac_env_${ac_var}_set
1114 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1115 eval ac_new_val="\$ac_env_${ac_var}_value"
1116 case "$ac_old_set,$ac_new_set" in
1117 set,)
1118 { echo "$as_me:1118: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1119 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1120 ac_cache_corrupted=: ;;
1121 ,set)
1122 { echo "$as_me:1122: error: \`$ac_var' was not set in the previous run" >&5
1123 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1124 ac_cache_corrupted=: ;;
1125 ,);;
1126 *)
1127 if test "x$ac_old_val" != "x$ac_new_val"; then
1128 { echo "$as_me:1128: error: \`$ac_var' has changed since the previous run:" >&5
1129 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1130 { echo "$as_me:1130: former value: $ac_old_val" >&5
1131 echo "$as_me: former value: $ac_old_val" >&2;}
1132 { echo "$as_me:1132: current value: $ac_new_val" >&5
1133 echo "$as_me: current value: $ac_new_val" >&2;}
1134 ac_cache_corrupted=:
1135 fi;;
1136 esac
1137 # Pass precious variables to config.status. It doesn't matter if
1138 # we pass some twice (in addition to the command line arguments).
1139 if test "$ac_new_set" = set; then
1140 case "$ac_new_val" in
1141 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1142 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1143 ac_configure_args="$ac_configure_args '$ac_arg'"
1144 ;;
1145 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1146 ;;
1147 esac
1148 fi
1149 done
1150 if "$ac_cache_corrupted"; then
1151 { echo "$as_me:1151: error: changes in the environment can compromise the build" >&5
1152 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1153 { { echo "$as_me:1153: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1154 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1155 { (exit 1); exit 1; }; }
1156 fi
1157
1158 ac_ext=c
1159 ac_cpp='$CPP $CPPFLAGS'
1160 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1161 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1162 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1163 ac_main_return="return"
1164
1165 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1166 *c*,-n*) ECHO_N=
1167 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1168 ECHO_T=' '
1169 ;;
1170 *c*,* ) ECHO_N=-n
1171 ECHO_C=
1172 ECHO_T=
1173 ;;
1174 *) ECHO_N=
1175 ECHO_C='\c'
1176 ECHO_T=
1177 ;;
1178 esac
1179 echo "#! $SHELL" >conftest.sh
1180 echo "exit 0" >>conftest.sh
1181 chmod +x conftest.sh
1182 if { (echo "$as_me:1182: PATH=\".;.\"; conftest.sh") >&5
1183 (PATH=".;."; conftest.sh) 2>&5
1184 ac_status=$?
1185 echo "$as_me:1185: \$? = $ac_status" >&5
1186 (exit "$ac_status"); }; then
1187 ac_path_separator=';'
1188 else
1189 ac_path_separator=:
1190 fi
1191 PATH_SEPARATOR="$ac_path_separator"
1192 rm -f conftest.sh
1193
1194 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1195
1196 top_builddir=`pwd`
1197
1198 for ac_prog in ggrep grep
1199 do
1200 # Extract the first word of "$ac_prog", so it can be a program name with args.
1201 set dummy $ac_prog; ac_word=$2
1202 echo "$as_me:1202: checking for $ac_word" >&5
1203 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1204 if test "${ac_cv_prog_GREP+set}" = set; then
1205 echo $ECHO_N "(cached) $ECHO_C" >&6
1206 else
1207 if test -n "$GREP"; then
1208 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1209 else
1210 ac_save_IFS=$IFS; IFS=$ac_path_separator
1211 ac_dummy="$PATH"
1212 for ac_dir in $ac_dummy; do
1213 IFS=$ac_save_IFS
1214 test -z "$ac_dir" && ac_dir=.
1215 $as_executable_p "$ac_dir/$ac_word" || continue
1216 ac_cv_prog_GREP="$ac_prog"
1217 echo "$as_me:1217: found $ac_dir/$ac_word" >&5
1218 break
1219 done
1220
1221 fi
1222 fi
1223 GREP=$ac_cv_prog_GREP
1224 if test -n "$GREP"; then
1225 echo "$as_me:1225: result: $GREP" >&5
1226 echo "${ECHO_T}$GREP" >&6
1227 else
1228 echo "$as_me:1228: result: no" >&5
1229 echo "${ECHO_T}no" >&6
1230 fi
1231
1232 test -n "$GREP" && break
1233 done
1234 test -n "$GREP" || GREP=": "
1235
1236 echo "$as_me:1236: checking for egrep" >&5
1237 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1238 if test "${ac_cv_path_EGREP+set}" = set; then
1239 echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1242 then ac_cv_path_EGREP="$GREP -E"
1243 else
1244 for ac_prog in gegrep egrep
1245 do
1246 # Extract the first word of "$ac_prog", so it can be a program name with args.
1247 set dummy $ac_prog; ac_word=$2
1248 echo "$as_me:1248: checking for $ac_word" >&5
1249 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1250 if test "${ac_cv_path_EGREP+set}" = set; then
1251 echo $ECHO_N "(cached) $ECHO_C" >&6
1252 else
1253 case $EGREP in
1254 [\\/]* | ?:[\\/]*)
1255 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1256 ;;
1257 *)
1258 ac_save_IFS=$IFS; IFS=$ac_path_separator
1259 ac_dummy="$PATH"
1260 for ac_dir in $ac_dummy; do
1261 IFS=$ac_save_IFS
1262 test -z "$ac_dir" && ac_dir=.
1263 if $as_executable_p "$ac_dir/$ac_word"; then
1264 ac_cv_path_EGREP="$ac_dir/$ac_word"
1265 echo "$as_me:1265: found $ac_dir/$ac_word" >&5
1266 break
1267 fi
1268 done
1269
1270 ;;
1271 esac
1272 fi
1273 EGREP=$ac_cv_path_EGREP
1274
1275 if test -n "$EGREP"; then
1276 echo "$as_me:1276: result: $EGREP" >&5
1277 echo "${ECHO_T}$EGREP" >&6
1278 else
1279 echo "$as_me:1279: result: no" >&5
1280 echo "${ECHO_T}no" >&6
1281 fi
1282
1283 test -n "$EGREP" && break
1284 done
1285 test -n "$EGREP" || EGREP=": "
1286
1287 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1287: error: cannot find workable egrep" >&5
1288 echo "$as_me: error: cannot find workable egrep" >&2;}
1289 { (exit 1); exit 1; }; }
1290 fi
1291 fi
1292 echo "$as_me:1292: result: $ac_cv_path_EGREP" >&5
1293 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1294 EGREP="$ac_cv_path_EGREP"
1295
1296 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[ ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1297 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[ ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1298 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[ ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1299 cf_cv_abi_version=${NCURSES_MAJOR}
1300 cf_cv_abi_default=${NCURSES_MAJOR}
1301 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1302 cf_cv_timestamp=`date`
1303 echo "$as_me:1303: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1304 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1305
1306 if test -f "$srcdir/VERSION" ; then
1307 echo "$as_me:1307: checking for package version" >&5
1308 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1309
1310 # if there are not enough fields, cut returns the last one...
1311 cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1312 cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1313 cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1314
1315 # this is how CF_BUNDLED_INTL uses $VERSION:
1316 VERSION="$cf_field1"
1317
1318 VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1319 test -z "$VERSION_MAJOR" && { { echo "$as_me:1319: error: missing major-version" >&5
1320 echo "$as_me: error: missing major-version" >&2;}
1321 { (exit 1); exit 1; }; }
1322
1323 VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1324 test -z "$VERSION_MINOR" && { { echo "$as_me:1324: error: missing minor-version" >&5
1325 echo "$as_me: error: missing minor-version" >&2;}
1326 { (exit 1); exit 1; }; }
1327
1328 echo "$as_me:1328: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1329 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1330
1331 echo "$as_me:1331: checking for package patch date" >&5
1332 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1333 VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1334 case .$VERSION_PATCH in
1335 (.)
1336 { { echo "$as_me:1336: error: missing patch-date $VERSION_PATCH" >&5
1337 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1338 { (exit 1); exit 1; }; }
1339 ;;
1340 (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1341 ;;
1342 (*)
1343 { { echo "$as_me:1343: error: illegal patch-date $VERSION_PATCH" >&5
1344 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1345 { (exit 1); exit 1; }; }
1346 ;;
1347 esac
1348 echo "$as_me:1348: result: $VERSION_PATCH" >&5
1349 echo "${ECHO_T}$VERSION_PATCH" >&6
1350 else
1351 { { echo "$as_me:1351: error: did not find $srcdir/VERSION" >&5
1352 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1353 { (exit 1); exit 1; }; }
1354 fi
1355
1356 # show the actual data that we have for versions:
1357 test -n "$verbose" && echo " ABI VERSION $VERSION" 1>&6
1358
1359 echo "${as_me:-configure}:1359: testing ABI VERSION $VERSION ..." 1>&5
1360
1361 test -n "$verbose" && echo " VERSION_MAJOR $VERSION_MAJOR" 1>&6
1362
1363 echo "${as_me:-configure}:1363: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1364
1365 test -n "$verbose" && echo " VERSION_MINOR $VERSION_MINOR" 1>&6
1366
1367 echo "${as_me:-configure}:1367: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1368
1369 test -n "$verbose" && echo " VERSION_PATCH $VERSION_PATCH" 1>&6
1370
1371 echo "${as_me:-configure}:1371: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1372
1373 PROGRAM=NCURSES
1374 PACKAGE=ncurses
1375
1376 cat >>confdefs.h <<EOF
1377 #define PACKAGE "$PACKAGE"
1378 EOF
1379
1380 cat >>confdefs.h <<EOF
1381 #define NCURSES_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1382 EOF
1383
1384 cat >>confdefs.h <<EOF
1385 #define NCURSES_PATCHDATE ${VERSION_PATCH}
1386 EOF
1387
1388 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1389
1390 # Check whether --with-rel-version or --without-rel-version was given.
1391 if test "${with_rel_version+set}" = set; then
1392 withval="$with_rel_version"
1393 { echo "$as_me:1393: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1394 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1395 cf_cv_rel_version=$withval
1396 fi;
1397
1398 NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1399 NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1400 test -n "NCURSES_MINOR" || NCURSES_MINOR=0
1401
1402 if test -n "$NCURSES_MAJOR" ; then
1403 case `echo "$NCURSES_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in
1404 (0)
1405 ;;
1406 (*)
1407 { { echo "$as_me:1407: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1408 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1409 { (exit 1); exit 1; }; }
1410 ;;
1411 esac
1412 else
1413 { { echo "$as_me:1413: error: Release major-version value is empty" >&5
1414 echo "$as_me: error: Release major-version value is empty" >&2;}
1415 { (exit 1); exit 1; }; }
1416 fi
1417
1418 if test -n "$NCURSES_MINOR" ; then
1419 case `echo "$NCURSES_MINOR" | sed -e 's/^[0-9]*$/0/g'` in
1420 (0)
1421 ;;
1422 (*)
1423 { { echo "$as_me:1423: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1424 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1425 { (exit 1); exit 1; }; }
1426 ;;
1427 esac
1428 else
1429 { { echo "$as_me:1429: error: Release minor-version value is empty" >&5
1430 echo "$as_me: error: Release minor-version value is empty" >&2;}
1431 { (exit 1); exit 1; }; }
1432 fi
1433
1434 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1435
1436 # Check whether --with-abi-version or --without-abi-version was given.
1437 if test "${with_abi_version+set}" = set; then
1438 withval="$with_abi_version"
1439
1440 if test "x$cf_cv_abi_version" != "x$withval"
1441 then
1442 { echo "$as_me:1442: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1443 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1444 case "$cf_cv_rel_version" in
1445 (5.*)
1446 cf_cv_rel_version=$withval.0
1447 ;;
1448 (6.*)
1449 cf_cv_rel_version=$withval.9 # FIXME: should be 10 as of 6.0 release
1450 ;;
1451 esac
1452 fi
1453 cf_cv_abi_version=$withval
1454 fi;
1455
1456 if test -n "$cf_cv_abi_version" ; then
1457 case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in
1458 (0)
1459 ;;
1460 (*)
1461 { { echo "$as_me:1461: error: ABI version is not a number: $cf_cv_abi_version" >&5
1462 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1463 { (exit 1); exit 1; }; }
1464 ;;
1465 esac
1466 else
1467 { { echo "$as_me:1467: error: ABI version value is empty" >&5
1468 echo "$as_me: error: ABI version value is empty" >&2;}
1469 { (exit 1); exit 1; }; }
1470 fi
1471
1472 cf_cv_abi_default=$cf_cv_abi_version
1473
1474 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1475 then
1476 case "$cf_cv_rel_version" in
1477 (5.*)
1478 cf_cv_rel_version=$with_abi_version.0
1479 ;;
1480 esac
1481 fi
1482
1483 ac_aux_dir=
1484 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1485 if test -f "$ac_dir/install-sh"; then
1486 ac_aux_dir=$ac_dir
1487 ac_install_sh="$ac_aux_dir/install-sh -c"
1488 break
1489 elif test -f "$ac_dir/install.sh"; then
1490 ac_aux_dir=$ac_dir
1491 ac_install_sh="$ac_aux_dir/install.sh -c"
1492 break
1493 elif test -f "$ac_dir/shtool"; then
1494 ac_aux_dir=$ac_dir
1495 ac_install_sh="$ac_aux_dir/shtool install -c"
1496 break
1497 fi
1498 done
1499 if test -z "$ac_aux_dir"; then
1500 { { echo "$as_me:1500: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1501 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1502 { (exit 1); exit 1; }; }
1503 fi
1504 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1505 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1506 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1507
1508 # Make sure we can run config.sub.
1509 $ac_config_sub sun4 >/dev/null 2>&1 ||
1510 { { echo "$as_me:1510: error: cannot run $ac_config_sub" >&5
1511 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1512 { (exit 1); exit 1; }; }
1513
1514 echo "$as_me:1514: checking build system type" >&5
1515 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1516 if test "${ac_cv_build+set}" = set; then
1517 echo $ECHO_N "(cached) $ECHO_C" >&6
1518 else
1519 ac_cv_build_alias=$build_alias
1520 test -z "$ac_cv_build_alias" &&
1521 ac_cv_build_alias=`$ac_config_guess`
1522 test -z "$ac_cv_build_alias" &&
1523 { { echo "$as_me:1523: error: cannot guess build type; you must specify one" >&5
1524 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1525 { (exit 1); exit 1; }; }
1526 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1527 { { echo "$as_me:1527: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1528 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1529 { (exit 1); exit 1; }; }
1530
1531 fi
1532 echo "$as_me:1532: result: $ac_cv_build" >&5
1533 echo "${ECHO_T}$ac_cv_build" >&6
1534 build=$ac_cv_build
1535 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1536 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1537 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1538
1539 echo "$as_me:1539: checking host system type" >&5
1540 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1541 if test "${ac_cv_host+set}" = set; then
1542 echo $ECHO_N "(cached) $ECHO_C" >&6
1543 else
1544 ac_cv_host_alias=$host_alias
1545 test -z "$ac_cv_host_alias" &&
1546 ac_cv_host_alias=$ac_cv_build_alias
1547 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1548 { { echo "$as_me:1548: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1549 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1550 { (exit 1); exit 1; }; }
1551
1552 fi
1553 echo "$as_me:1553: result: $ac_cv_host" >&5
1554 echo "${ECHO_T}$ac_cv_host" >&6
1555 host=$ac_cv_host
1556 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1557 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1558 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1559
1560 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1561 echo "$as_me:1561: checking target system type" >&5
1562 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1563 if test "${ac_cv_target+set}" = set; then
1564 echo $ECHO_N "(cached) $ECHO_C" >&6
1565 else
1566 ac_cv_target_alias=$target_alias
1567 test "x$ac_cv_target_alias" = "x" &&
1568 ac_cv_target_alias=$ac_cv_host_alias
1569 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1570 { { echo "$as_me:1570: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1571 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1572 { (exit 1); exit 1; }; }
1573
1574 fi
1575 echo "$as_me:1575: result: $ac_cv_target" >&5
1576 echo "${ECHO_T}$ac_cv_target" >&6
1577 target=$ac_cv_target
1578 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1579 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1580 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1581
1582 # The aliases save the names the user supplied, while $host etc.
1583 # will get canonicalized.
1584 test -n "$target_alias" &&
1585 test "$program_prefix$program_suffix$program_transform_name" = \
1586 NONENONEs,x,x, &&
1587 program_prefix=${target_alias}-
1588 system_name="$host_os"
1589 else
1590 system_name="`(uname -s -r) 2>/dev/null`"
1591 if test -z "$system_name" ; then
1592 system_name="`(hostname) 2>/dev/null`"
1593 fi
1594 fi
1595 test -n "$system_name" &&
1596 cat >>confdefs.h <<EOF
1597 #define SYSTEM_NAME "$system_name"
1598 EOF
1599
1600 if test "${cf_cv_system_name+set}" = set; then
1601 echo $ECHO_N "(cached) $ECHO_C" >&6
1602 else
1603 cf_cv_system_name="$system_name"
1604 fi
1605
1606 test -z "$system_name" && system_name="$cf_cv_system_name"
1607 test -n "$cf_cv_system_name" && echo "$as_me:1607: result: Configuring for $cf_cv_system_name" >&5
1608 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1609
1610 if test ".$system_name" != ".$cf_cv_system_name" ; then
1611 echo "$as_me:1611: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1612 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1613 { { echo "$as_me:1613: error: \"Please remove config.cache and try again.\"" >&5
1614 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1615 { (exit 1); exit 1; }; }
1616 fi
1617
1618 # Check whether --with-system-type or --without-system-type was given.
1619 if test "${with_system_type+set}" = set; then
1620 withval="$with_system_type"
1621 { echo "$as_me:1621: WARNING: overriding system type to $withval" >&5
1622 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1623 cf_cv_system_name=$withval
1624 host_os=$withval
1625
1626 fi;
1627
1628 ### Save the given $CFLAGS to allow user-override.
1629 cf_user_CFLAGS="$CFLAGS"
1630
1631 ### Default install-location
1632 echo "$as_me:1632: checking for fgrep" >&5
1633 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1634 if test "${ac_cv_path_FGREP+set}" = set; then
1635 echo $ECHO_N "(cached) $ECHO_C" >&6
1636 else
1637 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1638 then ac_cv_path_FGREP="$GREP -F"
1639 else
1640 for ac_prog in gfgrep fgrep
1641 do
1642 # Extract the first word of "$ac_prog", so it can be a program name with args.
1643 set dummy $ac_prog; ac_word=$2
1644 echo "$as_me:1644: checking for $ac_word" >&5
1645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1646 if test "${ac_cv_path_FGREP+set}" = set; then
1647 echo $ECHO_N "(cached) $ECHO_C" >&6
1648 else
1649 case $FGREP in
1650 [\\/]* | ?:[\\/]*)
1651 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1652 ;;
1653 *)
1654 ac_save_IFS=$IFS; IFS=$ac_path_separator
1655 ac_dummy="$PATH"
1656 for ac_dir in $ac_dummy; do
1657 IFS=$ac_save_IFS
1658 test -z "$ac_dir" && ac_dir=.
1659 if $as_executable_p "$ac_dir/$ac_word"; then
1660 ac_cv_path_FGREP="$ac_dir/$ac_word"
1661 echo "$as_me:1661: found $ac_dir/$ac_word" >&5
1662 break
1663 fi
1664 done
1665
1666 ;;
1667 esac
1668 fi
1669 FGREP=$ac_cv_path_FGREP
1670
1671 if test -n "$FGREP"; then
1672 echo "$as_me:1672: result: $FGREP" >&5
1673 echo "${ECHO_T}$FGREP" >&6
1674 else
1675 echo "$as_me:1675: result: no" >&5
1676 echo "${ECHO_T}no" >&6
1677 fi
1678
1679 test -n "$FGREP" && break
1680 done
1681 test -n "$FGREP" || FGREP=": "
1682
1683 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1683: error: cannot find workable fgrep" >&5
1684 echo "$as_me: error: cannot find workable fgrep" >&2;}
1685 { (exit 1); exit 1; }; }
1686 fi
1687 fi
1688 echo "$as_me:1688: result: $ac_cv_path_FGREP" >&5
1689 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1690 FGREP="$ac_cv_path_FGREP"
1691
1692 echo "$as_me:1692: checking for prefix" >&5
1693 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1694 if test "x$prefix" = "xNONE" ; then
1695 case "$cf_cv_system_name" in
1696 # non-vendor systems don't have a conflict
1697 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1698 prefix=/usr
1699 ;;
1700 (*) prefix=$ac_default_prefix
1701 ;;
1702 esac
1703 fi
1704 echo "$as_me:1704: result: $prefix" >&5
1705 echo "${ECHO_T}$prefix" >&6
1706
1707 if test "x$prefix" = "xNONE" ; then
1708 echo "$as_me:1708: checking for default include-directory" >&5
1709 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1710 test -n "$verbose" && echo 1>&6
1711 for cf_symbol in \
1712 "$includedir" \
1713 "$includedir/ncurses" \
1714 "$prefix/include" \
1715 "$prefix/include/ncurses" \
1716 /usr/local/include \
1717 /usr/local/include/ncurses \
1718 /usr/include \
1719 /usr/include/ncurses
1720 do
1721 cf_dir=`eval echo "$cf_symbol"`
1722 if test -f "$cf_dir/curses.h" ; then
1723 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1724 includedir="$cf_symbol"
1725 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1726 break
1727 fi
1728 fi
1729 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1730 done
1731 echo "$as_me:1731: result: $includedir" >&5
1732 echo "${ECHO_T}$includedir" >&6
1733 fi
1734
1735 ### Defaults for ncurses ABI
1736
1737 # ABI 5 defaults:
1738 cf_dft_ccharw_max=5
1739 cf_dft_chtype=auto
1740 cf_dft_ext_colors=no
1741 cf_dft_ext_const=no
1742 cf_dft_ext_mouse=no
1743 cf_dft_ext_mouse2=no
1744 cf_dft_ext_putwin=no
1745 cf_dft_ext_spfuncs=no
1746 cf_dft_filter_syms=no
1747 cf_dft_interop=no
1748 cf_dft_mmask_t=auto
1749 cf_dft_opaque_curses=no
1750 cf_dft_ordinate_type=short
1751 cf_dft_rgb_color=no
1752 cf_dft_signed_char=no
1753 cf_dft_tparm_arg=long
1754 cf_dft_widec=no
1755 cf_dft_with_lp64=no
1756
1757 # ABI 6 default differences from ABI 5:
1758 case x$cf_cv_abi_default in
1759 (x[6789])
1760 cf_dft_chtype=uint32_t
1761 cf_dft_ext_colors=yes
1762 cf_dft_ext_const=yes
1763 cf_dft_ext_mouse=yes
1764 cf_dft_ext_putwin=yes
1765 cf_dft_ext_spfuncs=yes
1766 cf_dft_filter_syms=yes
1767 cf_dft_interop=yes
1768 cf_dft_mmask_t=uint32_t
1769 cf_dft_opaque_curses=yes
1770 cf_dft_tparm_arg=intptr_t
1771 cf_dft_widec=yes
1772 cf_dft_with_lp64=yes
1773 ;;
1774 esac
1775
1776 # ABI 7 default differences from ABI 6:
1777 case x$cf_cv_abi_default in
1778 (x[789])
1779 cf_dft_ccharw_max=6
1780 cf_dft_ext_mouse2=yes
1781 cf_dft_mmask_t=uint64_t
1782 cf_dft_ordinate_type=int
1783 cf_dft_rgb_color=yes
1784 cf_dft_signed_char=yes
1785 # also: remove the wgetch-events feature in ABI 7
1786 ;;
1787 esac
1788
1789 ### override ABI version, e.g., packagers
1790
1791 # Check whether --with-abi-altered or --without-abi-altered was given.
1792 if test "${with_abi_altered+set}" = set; then
1793 withval="$with_abi_altered"
1794
1795 if test -n "$withval" ; then
1796 case `echo "$withval" | sed -e 's/^[0-9]*$/0/g'` in
1797 (0)
1798 ;;
1799 (*)
1800 { { echo "$as_me:1800: error: ABI altered is not a number: $withval" >&5
1801 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1802 { (exit 1); exit 1; }; }
1803 ;;
1804 esac
1805 else
1806 { { echo "$as_me:1806: error: ABI altered value is empty" >&5
1807 echo "$as_me: error: ABI altered value is empty" >&2;}
1808 { (exit 1); exit 1; }; }
1809 fi
1810
1811 if test "$cf_cv_abi_version" != "$withval"
1812 then
1813 { echo "$as_me:1813: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1814 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1815 cf_cv_abi_version=$withval
1816 fi
1817
1818 fi;
1819
1820 ### Checks for programs.
1821
1822 # Check whether --with-ada or --without-ada was given.
1823 if test "${with_ada+set}" = set; then
1824 withval="$with_ada"
1825 cf_with_ada=$withval
1826 else
1827 cf_with_ada=yes
1828 fi;
1829
1830 cf_prog_cc="gcc cc"
1831 if test "x$cf_with_ada" = xyes
1832 then
1833
1834 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
1835 do
1836
1837 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1838
1839 unset ac_cv_path_cf_TEMP_gnat
1840 unset cf_TEMP_gnat
1841 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
1842 set dummy $cf_prog_gnat; ac_word=$2
1843 echo "$as_me:1843: checking for $ac_word" >&5
1844 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1845 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
1846 echo $ECHO_N "(cached) $ECHO_C" >&6
1847 else
1848 case $cf_TEMP_gnat in
1849 [\\/]* | ?:[\\/]*)
1850 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
1851 ;;
1852 *)
1853 ac_save_IFS=$IFS; IFS=$ac_path_separator
1854 ac_dummy="$PATH"
1855 for ac_dir in $ac_dummy; do
1856 IFS=$ac_save_IFS
1857 test -z "$ac_dir" && ac_dir=.
1858 if $as_executable_p "$ac_dir/$ac_word"; then
1859 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
1860 echo "$as_me:1860: found $ac_dir/$ac_word" >&5
1861 break
1862 fi
1863 done
1864
1865 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
1866 ;;
1867 esac
1868 fi
1869 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
1870
1871 if test -n "$cf_TEMP_gnat"; then
1872 echo "$as_me:1872: result: $cf_TEMP_gnat" >&5
1873 echo "${ECHO_T}$cf_TEMP_gnat" >&6
1874 else
1875 echo "$as_me:1875: result: no" >&5
1876 echo "${ECHO_T}no" >&6
1877 fi
1878
1879 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
1880
1881 if test "x$cf_TEMP_gnat" != xno; then
1882 unset cf_cv_gnat_version
1883 unset cf_TEMP_gnat
1884
1885 echo "$as_me:1885: checking for $cf_prog_gnat version" >&5
1886 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
1887 if test "${cf_cv_gnat_version+set}" = set; then
1888 echo $ECHO_N "(cached) $ECHO_C" >&6
1889 else
1890
1891 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
1892 grep '[0-9].[0-9][0-9]*' |\
1893 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
1894
1895 fi
1896 echo "$as_me:1896: result: $cf_cv_gnat_version" >&5
1897 echo "${ECHO_T}$cf_cv_gnat_version" >&6
1898 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
1899 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
1900
1901 fi
1902 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
1903
1904 unset cf_TEMP_gnat
1905 unset cf_cv_gnat_version
1906 unset ac_cv_path_cf_TEMP_gnat
1907 done
1908
1909 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
1910 cf_ada_make=
1911 cf_cv_prog_gnat_correct=no
1912 else
1913 cf_ada_make=gnatmake
1914 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
1915 # gprconfig is newer than gnatmake; we can continue...
1916 cf_ada_config="##"
1917 else
1918 rm -rf ./conftest* ./*~conftest*
1919 if mkdir conftest.src
1920 then
1921 cf_ada_config=""
1922 cd conftest.src
1923 for cf_gprconfig in Ada C
1924 do
1925 echo "$as_me:1925: checking for gprconfig name for $cf_gprconfig" >&5
1926 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
1927 if test "$cf_gprconfig" = C
1928 then
1929 for cf_gprconfig_param in \
1930 "$cf_gprconfig,,,,GNATGCC" \
1931 "$cf_gprconfig,,,,GCC" \
1932 "$cf_gprconfig"
1933 do
1934 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
1935 test -n "$cf_gprconfig_value" && break
1936 done
1937 else
1938 cf_gprconfig_param=$cf_gprconfig
1939 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
1940 fi
1941 if test -n "$cf_gprconfig_value"
1942 then
1943 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
1944 echo "$as_me:1944: result: $cf_gprconfig_value" >&5
1945 echo "${ECHO_T}$cf_gprconfig_value" >&6
1946 else
1947 echo "$as_me:1947: result: missing" >&5
1948 echo "${ECHO_T}missing" >&6
1949 cf_ada_config="#"
1950 break
1951 fi
1952 done
1953 cd ..
1954 rm -rf ./conftest* ./*~conftest*
1955 fi
1956 fi
1957 if test "x$cf_ada_config" != "x#"
1958 then
1959
1960 echo "$as_me:1960: checking for gnat version" >&5
1961 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
1962 if test "${cf_cv_gnat_version+set}" = set; then
1963 echo $ECHO_N "(cached) $ECHO_C" >&6
1964 else
1965
1966 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
1967 grep '[0-9].[0-9][0-9]*' |\
1968 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
1969
1970 fi
1971 echo "$as_me:1971: result: $cf_cv_gnat_version" >&5
1972 echo "${ECHO_T}$cf_cv_gnat_version" >&6
1973 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
1974
1975 case "$cf_cv_gnat_version" in
1976 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
1977 cf_cv_prog_gnat_correct=yes
1978 ;;
1979 (*)
1980 { echo "$as_me:1980: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
1981 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
1982 cf_cv_prog_gnat_correct=no
1983 ;;
1984 esac
1985
1986 # Extract the first word of "m4", so it can be a program name with args.
1987 set dummy m4; ac_word=$2
1988 echo "$as_me:1988: checking for $ac_word" >&5
1989 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1990 if test "${ac_cv_prog_M4_exists+set}" = set; then
1991 echo $ECHO_N "(cached) $ECHO_C" >&6
1992 else
1993 if test -n "$M4_exists"; then
1994 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
1995 else
1996 ac_save_IFS=$IFS; IFS=$ac_path_separator
1997 ac_dummy="$PATH"
1998 for ac_dir in $ac_dummy; do
1999 IFS=$ac_save_IFS
2000 test -z "$ac_dir" && ac_dir=.
2001 $as_executable_p "$ac_dir/$ac_word" || continue
2002 ac_cv_prog_M4_exists="yes"
2003 echo "$as_me:2003: found $ac_dir/$ac_word" >&5
2004 break
2005 done
2006
2007 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
2008 fi
2009 fi
2010 M4_exists=$ac_cv_prog_M4_exists
2011 if test -n "$M4_exists"; then
2012 echo "$as_me:2012: result: $M4_exists" >&5
2013 echo "${ECHO_T}$M4_exists" >&6
2014 else
2015 echo "$as_me:2015: result: no" >&5
2016 echo "${ECHO_T}no" >&6
2017 fi
2018
2019 if test "$ac_cv_prog_M4_exists" = no; then
2020 cf_cv_prog_gnat_correct=no
2021 { echo "$as_me:2021: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
2022 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
2023 fi
2024 if test "$cf_cv_prog_gnat_correct" = yes; then
2025 echo "$as_me:2025: checking if GNAT works" >&5
2026 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
2027
2028 rm -rf ./conftest* ./*~conftest*
2029 cat >>conftest.ads <<CF_EOF
2030 procedure conftest;
2031 CF_EOF
2032 cat >>conftest.adb <<CF_EOF
2033 with Text_IO;
2034 with GNAT.OS_Lib;
2035 procedure conftest is
2036 begin
2037 Text_IO.Put ("Hello World");
2038 Text_IO.New_Line;
2039 GNAT.OS_Lib.OS_Exit (0);
2040 end conftest;
2041 CF_EOF
2042 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
2043 if ( ./conftest 1>&5 2>&1 ) ; then
2044 cf_cv_prog_gnat_correct=yes
2045 else
2046 cf_cv_prog_gnat_correct=no
2047 fi
2048 else
2049 cf_cv_prog_gnat_correct=no
2050 fi
2051 rm -rf ./conftest* ./*~conftest*
2052
2053 echo "$as_me:2053: result: $cf_cv_prog_gnat_correct" >&5
2054 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
2055 fi
2056 else
2057 cf_cv_prog_gnat_correct=no
2058 fi
2059 fi
2060
2061 if test "x$cf_cv_prog_gnat_correct" = xyes; then
2062 # gcc's developers chose to deprecate gnatgcc before making gprconfig
2063 # work. They replaced gnatgcc in gcc 13 with a script which spits out
2064 # a warning offering advice which could never work.
2065 #
2066 # Here is a workaround.
2067 # Extract the first word of "gnatgcc", so it can be a program name with args.
2068 set dummy gnatgcc; ac_word=$2
2069 echo "$as_me:2069: checking for $ac_word" >&5
2070 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2071 if test "${ac_cv_path_cf_cv_path_gnatgcc+set}" = set; then
2072 echo $ECHO_N "(cached) $ECHO_C" >&6
2073 else
2074 case $cf_cv_path_gnatgcc in
2075 [\\/]* | ?:[\\/]*)
2076 ac_cv_path_cf_cv_path_gnatgcc="$cf_cv_path_gnatgcc" # Let the user override the test with a path.
2077 ;;
2078 *)
2079 ac_save_IFS=$IFS; IFS=$ac_path_separator
2080 ac_dummy="$PATH"
2081 for ac_dir in $ac_dummy; do
2082 IFS=$ac_save_IFS
2083 test -z "$ac_dir" && ac_dir=.
2084 if $as_executable_p "$ac_dir/$ac_word"; then
2085 ac_cv_path_cf_cv_path_gnatgcc="$ac_dir/$ac_word"
2086 echo "$as_me:2086: found $ac_dir/$ac_word" >&5
2087 break
2088 fi
2089 done
2090
2091 test -z "$ac_cv_path_cf_cv_path_gnatgcc" && ac_cv_path_cf_cv_path_gnatgcc="no"
2092 ;;
2093 esac
2094 fi
2095 cf_cv_path_gnatgcc=$ac_cv_path_cf_cv_path_gnatgcc
2096
2097 if test -n "$cf_cv_path_gnatgcc"; then
2098 echo "$as_me:2098: result: $cf_cv_path_gnatgcc" >&5
2099 echo "${ECHO_T}$cf_cv_path_gnatgcc" >&6
2100 else
2101 echo "$as_me:2101: result: no" >&5
2102 echo "${ECHO_T}no" >&6
2103 fi
2104
2105 if test "$cf_cv_path_gnatgcc" != no
2106 then
2107 echo "$as_me:2107: checking for improvement" >&5
2108 echo $ECHO_N "checking for improvement... $ECHO_C" >&6
2109 cf_file_gnatgcc=`file -L "$cf_cv_path_gnatgcc" 2>/dev/null`
2110 case "x$cf_file_gnatgcc" in
2111 (*script*)
2112 cf_cv_path_gnatgcc=`sh -x "$cf_cv_path_gnatgcc" --version 2>&1 | grep -w exec | sed -e 's/^[ ]*+[ ]*//' -e 's/exec[ ]//' -e 's/ .*//'`
2113 ;;
2114 (*)
2115 cf_cv_path_gnatgcc=no
2116 ;;
2117 esac
2118 echo "$as_me:2118: result: $cf_cv_path_gnatgcc" >&5
2119 echo "${ECHO_T}$cf_cv_path_gnatgcc" >&6
2120 test "$cf_cv_path_gnatgcc" = no && cf_cv_path_gnatgcc=gnatgcc
2121 cf_prog_cc="$cf_cv_path_gnatgcc $cf_prog_cc"
2122 fi
2123 fi
2124 fi
2125 case "$cf_prog_cc" in
2126 (*/*)
2127 CC="$cf_prog_cc"
2128
2129 ;;
2130 (*)
2131
2132 ac_ext=c
2133 ac_cpp='$CPP $CPPFLAGS'
2134 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2135 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2136 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2137 ac_main_return="return"
2138 if test -n "$ac_tool_prefix"; then
2139 for ac_prog in $cf_prog_cc
2140 do
2141 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2142 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2143 echo "$as_me:2143: checking for $ac_word" >&5
2144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2145 if test "${ac_cv_prog_CC+set}" = set; then
2146 echo $ECHO_N "(cached) $ECHO_C" >&6
2147 else
2148 if test -n "$CC"; then
2149 ac_cv_prog_CC="$CC" # Let the user override the test.
2150 else
2151 ac_save_IFS=$IFS; IFS=$ac_path_separator
2152 ac_dummy="$PATH"
2153 for ac_dir in $ac_dummy; do
2154 IFS=$ac_save_IFS
2155 test -z "$ac_dir" && ac_dir=.
2156 $as_executable_p "$ac_dir/$ac_word" || continue
2157 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2158 echo "$as_me:2158: found $ac_dir/$ac_word" >&5
2159 break
2160 done
2161
2162 fi
2163 fi
2164 CC=$ac_cv_prog_CC
2165 if test -n "$CC"; then
2166 echo "$as_me:2166: result: $CC" >&5
2167 echo "${ECHO_T}$CC" >&6
2168 else
2169 echo "$as_me:2169: result: no" >&5
2170 echo "${ECHO_T}no" >&6
2171 fi
2172
2173 test -n "$CC" && break
2174 done
2175 fi
2176 if test -z "$CC"; then
2177 ac_ct_CC=$CC
2178 for ac_prog in $cf_prog_cc
2179 do
2180 # Extract the first word of "$ac_prog", so it can be a program name with args.
2181 set dummy $ac_prog; ac_word=$2
2182 echo "$as_me:2182: checking for $ac_word" >&5
2183 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2184 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2185 echo $ECHO_N "(cached) $ECHO_C" >&6
2186 else
2187 if test -n "$ac_ct_CC"; then
2188 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2189 else
2190 ac_save_IFS=$IFS; IFS=$ac_path_separator
2191 ac_dummy="$PATH"
2192 for ac_dir in $ac_dummy; do
2193 IFS=$ac_save_IFS
2194 test -z "$ac_dir" && ac_dir=.
2195 $as_executable_p "$ac_dir/$ac_word" || continue
2196 ac_cv_prog_ac_ct_CC="$ac_prog"
2197 echo "$as_me:2197: found $ac_dir/$ac_word" >&5
2198 break
2199 done
2200
2201 fi
2202 fi
2203 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2204 if test -n "$ac_ct_CC"; then
2205 echo "$as_me:2205: result: $ac_ct_CC" >&5
2206 echo "${ECHO_T}$ac_ct_CC" >&6
2207 else
2208 echo "$as_me:2208: result: no" >&5
2209 echo "${ECHO_T}no" >&6
2210 fi
2211
2212 test -n "$ac_ct_CC" && break
2213 done
2214
2215 CC=$ac_ct_CC
2216 fi
2217
2218 test -z "$CC" && { { echo "$as_me:2218: error: no acceptable cc found in \$PATH" >&5
2219 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
2220 { (exit 1); exit 1; }; }
2221
2222 # Provide some information about the compiler.
2223 echo "$as_me:2223:" \
2224 "checking for C compiler version" >&5
2225 ac_compiler=`set X $ac_compile; echo "$2"`
2226 { (eval echo "$as_me:2226: \"$ac_compiler --version </dev/null >&5\"") >&5
2227 (eval $ac_compiler --version </dev/null >&5) 2>&5
2228 ac_status=$?
2229 echo "$as_me:2229: \$? = $ac_status" >&5
2230 (exit "$ac_status"); }
2231 { (eval echo "$as_me:2231: \"$ac_compiler -v </dev/null >&5\"") >&5
2232 (eval $ac_compiler -v </dev/null >&5) 2>&5
2233 ac_status=$?
2234 echo "$as_me:2234: \$? = $ac_status" >&5
2235 (exit "$ac_status"); }
2236 { (eval echo "$as_me:2236: \"$ac_compiler -V </dev/null >&5\"") >&5
2237 (eval $ac_compiler -V </dev/null >&5) 2>&5
2238 ac_status=$?
2239 echo "$as_me:2239: \$? = $ac_status" >&5
2240 (exit "$ac_status"); }
2241
2242 cat >"conftest.$ac_ext" <<_ACEOF
2243 #line 2243 "configure"
2244 #include "confdefs.h"
2245
2246 int
2247 main (void)
2248 {
2249
2250 ;
2251 return 0;
2252 }
2253 _ACEOF
2254 ac_clean_files_save=$ac_clean_files
2255 ac_clean_files="$ac_clean_files a.out a.exe"
2256 # Try to create an executable without -o first, disregard a.out.
2257 # It will help us diagnose broken compilers, and finding out an intuition
2258 # of exeext.
2259 echo "$as_me:2259: checking for C compiler default output" >&5
2260 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2261 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
2262 if { (eval echo "$as_me:2262: \"$ac_link_default\"") >&5
2263 (eval $ac_link_default) 2>&5
2264 ac_status=$?
2265 echo "$as_me:2265: \$? = $ac_status" >&5
2266 (exit "$ac_status"); }; then
2267 # Find the output, starting from the most likely. This scheme is
2268 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2269 # resort.
2270 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
2271 ls a.out conftest 2>/dev/null;
2272 ls a.* conftest.* 2>/dev/null`; do
2273 case $ac_file in
2274 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2275 a.out ) # We found the default executable, but exeext='' is most
2276 # certainly right.
2277 break;;
2278 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2279 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2280 export ac_cv_exeext
2281 break;;
2282 * ) break;;
2283 esac
2284 done
2285 else
2286 echo "$as_me: failed program was:" >&5
2287 cat "conftest.$ac_ext" >&5
2288 { { echo "$as_me:2288: error: C compiler cannot create executables" >&5
2289 echo "$as_me: error: C compiler cannot create executables" >&2;}
2290 { (exit 77); exit 77; }; }
2291 fi
2292
2293 ac_exeext=$ac_cv_exeext
2294 echo "$as_me:2294: result: $ac_file" >&5
2295 echo "${ECHO_T}$ac_file" >&6
2296
2297 # Check the compiler produces executables we can run. If not, either
2298 # the compiler is broken, or we cross compile.
2299 echo "$as_me:2299: checking whether the C compiler works" >&5
2300 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2301 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2302 # If not cross compiling, check that we can run a simple program.
2303 if test "$cross_compiling" != yes; then
2304 if { ac_try='./$ac_file'
2305 { (eval echo "$as_me:2305: \"$ac_try\"") >&5
2306 (eval $ac_try) 2>&5
2307 ac_status=$?
2308 echo "$as_me:2308: \$? = $ac_status" >&5
2309 (exit "$ac_status"); }; }; then
2310 cross_compiling=no
2311 else
2312 if test "$cross_compiling" = maybe; then
2313 cross_compiling=yes
2314 else
2315 { { echo "$as_me:2315: error: cannot run C compiled programs.
2316 If you meant to cross compile, use \`--host'." >&5
2317 echo "$as_me: error: cannot run C compiled programs.
2318 If you meant to cross compile, use \`--host'." >&2;}
2319 { (exit 1); exit 1; }; }
2320 fi
2321 fi
2322 fi
2323 echo "$as_me:2323: result: yes" >&5
2324 echo "${ECHO_T}yes" >&6
2325
2326 rm -f a.out a.exe "conftest$ac_cv_exeext"
2327 ac_clean_files=$ac_clean_files_save
2328 # Check the compiler produces executables we can run. If not, either
2329 # the compiler is broken, or we cross compile.
2330 echo "$as_me:2330: checking whether we are cross compiling" >&5
2331 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2332 echo "$as_me:2332: result: $cross_compiling" >&5
2333 echo "${ECHO_T}$cross_compiling" >&6
2334
2335 echo "$as_me:2335: checking for executable suffix" >&5
2336 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2337 if { (eval echo "$as_me:2337: \"$ac_link\"") >&5
2338 (eval $ac_link) 2>&5
2339 ac_status=$?
2340 echo "$as_me:2340: \$? = $ac_status" >&5
2341 (exit "$ac_status"); }; then
2342 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2343 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2344 # work properly (i.e., refer to `conftest.exe'), while it won't with
2345 # `rm'.
2346 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2347 case $ac_file in
2348 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2349 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2350 export ac_cv_exeext
2351 break;;
2352 * ) break;;
2353 esac
2354 done
2355 else
2356 { { echo "$as_me:2356: error: cannot compute EXEEXT: cannot compile and link" >&5
2357 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2358 { (exit 1); exit 1; }; }
2359 fi
2360
2361 rm -f "conftest$ac_cv_exeext"
2362 echo "$as_me:2362: result: $ac_cv_exeext" >&5
2363 echo "${ECHO_T}$ac_cv_exeext" >&6
2364
2365 rm -f "conftest.$ac_ext"
2366 EXEEXT=$ac_cv_exeext
2367 ac_exeext=$EXEEXT
2368 echo "$as_me:2368: checking for object suffix" >&5
2369 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2370 if test "${ac_cv_objext+set}" = set; then
2371 echo $ECHO_N "(cached) $ECHO_C" >&6
2372 else
2373 cat >"conftest.$ac_ext" <<_ACEOF
2374 #line 2374 "configure"
2375 #include "confdefs.h"
2376
2377 int
2378 main (void)
2379 {
2380
2381 ;
2382 return 0;
2383 }
2384 _ACEOF
2385 rm -f conftest.o conftest.obj
2386 if { (eval echo "$as_me:2386: \"$ac_compile\"") >&5
2387 (eval $ac_compile) 2>&5
2388 ac_status=$?
2389 echo "$as_me:2389: \$? = $ac_status" >&5
2390 (exit "$ac_status"); }; then
2391 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2392 case $ac_file in
2393 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2394 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2395 break;;
2396 esac
2397 done
2398 else
2399 echo "$as_me: failed program was:" >&5
2400 cat "conftest.$ac_ext" >&5
2401 { { echo "$as_me:2401: error: cannot compute OBJEXT: cannot compile" >&5
2402 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2403 { (exit 1); exit 1; }; }
2404 fi
2405
2406 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2407 fi
2408 echo "$as_me:2408: result: $ac_cv_objext" >&5
2409 echo "${ECHO_T}$ac_cv_objext" >&6
2410 OBJEXT=$ac_cv_objext
2411 ac_objext=$OBJEXT
2412 echo "$as_me:2412: checking whether we are using the GNU C compiler" >&5
2413 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2414 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2415 echo $ECHO_N "(cached) $ECHO_C" >&6
2416 else
2417 cat >"conftest.$ac_ext" <<_ACEOF
2418 #line 2418 "configure"
2419 #include "confdefs.h"
2420
2421 int
2422 main (void)
2423 {
2424 #ifndef __GNUC__
2425 choke me
2426 #endif
2427
2428 ;
2429 return 0;
2430 }
2431 _ACEOF
2432 rm -f "conftest.$ac_objext"
2433 if { (eval echo "$as_me:2433: \"$ac_compile\"") >&5
2434 (eval $ac_compile) 2>&5
2435 ac_status=$?
2436 echo "$as_me:2436: \$? = $ac_status" >&5
2437 (exit "$ac_status"); } &&
2438 { ac_try='test -s "conftest.$ac_objext"'
2439 { (eval echo "$as_me:2439: \"$ac_try\"") >&5
2440 (eval $ac_try) 2>&5
2441 ac_status=$?
2442 echo "$as_me:2442: \$? = $ac_status" >&5
2443 (exit "$ac_status"); }; }; then
2444 ac_compiler_gnu=yes
2445 else
2446 echo "$as_me: failed program was:" >&5
2447 cat "conftest.$ac_ext" >&5
2448 ac_compiler_gnu=no
2449 fi
2450 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2451 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2452
2453 fi
2454 echo "$as_me:2454: result: $ac_cv_c_compiler_gnu" >&5
2455 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2456 GCC=`test $ac_compiler_gnu = yes && echo yes`
2457 ac_test_CFLAGS=${CFLAGS+set}
2458 ac_save_CFLAGS=$CFLAGS
2459 CFLAGS="-g"
2460 echo "$as_me:2460: checking whether $CC accepts -g" >&5
2461 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2462 if test "${ac_cv_prog_cc_g+set}" = set; then
2463 echo $ECHO_N "(cached) $ECHO_C" >&6
2464 else
2465 cat >"conftest.$ac_ext" <<_ACEOF
2466 #line 2466 "configure"
2467 #include "confdefs.h"
2468
2469 int
2470 main (void)
2471 {
2472
2473 ;
2474 return 0;
2475 }
2476 _ACEOF
2477 rm -f "conftest.$ac_objext"
2478 if { (eval echo "$as_me:2478: \"$ac_compile\"") >&5
2479 (eval $ac_compile) 2>&5
2480 ac_status=$?
2481 echo "$as_me:2481: \$? = $ac_status" >&5
2482 (exit "$ac_status"); } &&
2483 { ac_try='test -s "conftest.$ac_objext"'
2484 { (eval echo "$as_me:2484: \"$ac_try\"") >&5
2485 (eval $ac_try) 2>&5
2486 ac_status=$?
2487 echo "$as_me:2487: \$? = $ac_status" >&5
2488 (exit "$ac_status"); }; }; then
2489 ac_cv_prog_cc_g=yes
2490 else
2491 echo "$as_me: failed program was:" >&5
2492 cat "conftest.$ac_ext" >&5
2493 ac_cv_prog_cc_g=no
2494 fi
2495 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2496 fi
2497 echo "$as_me:2497: result: $ac_cv_prog_cc_g" >&5
2498 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2499 if test "$ac_test_CFLAGS" = set; then
2500 CFLAGS=$ac_save_CFLAGS
2501 elif test $ac_cv_prog_cc_g = yes; then
2502 if test "$GCC" = yes; then
2503 CFLAGS="-g -O2"
2504 else
2505 CFLAGS="-g"
2506 fi
2507 else
2508 if test "$GCC" = yes; then
2509 CFLAGS="-O2"
2510 else
2511 CFLAGS=
2512 fi
2513 fi
2514 # Some people use a C++ compiler to compile C. Since we use `exit',
2515 # in C++ we need to declare it. In case someone uses the same compiler
2516 # for both compiling C and C++ we need to have the C++ compiler decide
2517 # the declaration of exit, since it's the most demanding environment.
2518 cat >"conftest.$ac_ext" <<_ACEOF
2519 #ifndef __cplusplus
2520 choke me
2521 #endif
2522 _ACEOF
2523 rm -f "conftest.$ac_objext"
2524 if { (eval echo "$as_me:2524: \"$ac_compile\"") >&5
2525 (eval $ac_compile) 2>&5
2526 ac_status=$?
2527 echo "$as_me:2527: \$? = $ac_status" >&5
2528 (exit "$ac_status"); } &&
2529 { ac_try='test -s "conftest.$ac_objext"'
2530 { (eval echo "$as_me:2530: \"$ac_try\"") >&5
2531 (eval $ac_try) 2>&5
2532 ac_status=$?
2533 echo "$as_me:2533: \$? = $ac_status" >&5
2534 (exit "$ac_status"); }; }; then
2535 for ac_declaration in \
2536 ''\
2537 '#include <stdlib.h>' \
2538 'extern "C" void std::exit (int) throw (); using std::exit;' \
2539 'extern "C" void std::exit (int); using std::exit;' \
2540 'extern "C" void exit (int) throw ();' \
2541 'extern "C" void exit (int);' \
2542 'void exit (int);'
2543 do
2544 cat >"conftest.$ac_ext" <<_ACEOF
2545 #line 2545 "configure"
2546 #include "confdefs.h"
2547 #include <stdlib.h>
2548 $ac_declaration
2549 int
2550 main (void)
2551 {
2552 exit (42);
2553 ;
2554 return 0;
2555 }
2556 _ACEOF
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 :
2570 else
2571 echo "$as_me: failed program was:" >&5
2572 cat "conftest.$ac_ext" >&5
2573 continue
2574 fi
2575 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2576 cat >"conftest.$ac_ext" <<_ACEOF
2577 #line 2577 "configure"
2578 #include "confdefs.h"
2579 $ac_declaration
2580 int
2581 main (void)
2582 {
2583 exit (42);
2584 ;
2585 return 0;
2586 }
2587 _ACEOF
2588 rm -f "conftest.$ac_objext"
2589 if { (eval echo "$as_me:2589: \"$ac_compile\"") >&5
2590 (eval $ac_compile) 2>&5
2591 ac_status=$?
2592 echo "$as_me:2592: \$? = $ac_status" >&5
2593 (exit "$ac_status"); } &&
2594 { ac_try='test -s "conftest.$ac_objext"'
2595 { (eval echo "$as_me:2595: \"$ac_try\"") >&5
2596 (eval $ac_try) 2>&5
2597 ac_status=$?
2598 echo "$as_me:2598: \$? = $ac_status" >&5
2599 (exit "$ac_status"); }; }; then
2600 break
2601 else
2602 echo "$as_me: failed program was:" >&5
2603 cat "conftest.$ac_ext" >&5
2604 fi
2605 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2606 done
2607 rm -rf conftest*
2608 if test -n "$ac_declaration"; then
2609 echo '#ifdef __cplusplus' >>confdefs.h
2610 echo "$ac_declaration" >>confdefs.h
2611 echo '#endif' >>confdefs.h
2612 fi
2613
2614 else
2615 echo "$as_me: failed program was:" >&5
2616 cat "conftest.$ac_ext" >&5
2617 fi
2618 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2619 ac_ext=c
2620 ac_cpp='$CPP $CPPFLAGS'
2621 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2622 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2623 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2624 ac_main_return="return"
2625
2626 GCC_VERSION=none
2627 if test "$GCC" = yes ; then
2628 echo "$as_me:2628: checking version of $CC" >&5
2629 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2630 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2631 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2632 echo "$as_me:2632: result: $GCC_VERSION" >&5
2633 echo "${ECHO_T}$GCC_VERSION" >&6
2634 fi
2635
2636 INTEL_COMPILER=no
2637
2638 if test "$GCC" = yes ; then
2639 case "$host_os" in
2640 (linux*|gnu*)
2641 echo "$as_me:2641: checking if this is really Intel C compiler" >&5
2642 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2643 cf_save_CFLAGS="$CFLAGS"
2644 CFLAGS="$CFLAGS -no-gcc"
2645 cat >"conftest.$ac_ext" <<_ACEOF
2646 #line 2646 "configure"
2647 #include "confdefs.h"
2648
2649 int
2650 main (void)
2651 {
2652
2653 #ifdef __INTEL_COMPILER
2654 #else
2655 #error __INTEL_COMPILER is not defined
2656 #endif
2657
2658 ;
2659 return 0;
2660 }
2661 _ACEOF
2662 rm -f "conftest.$ac_objext"
2663 if { (eval echo "$as_me:2663: \"$ac_compile\"") >&5
2664 (eval $ac_compile) 2>&5
2665 ac_status=$?
2666 echo "$as_me:2666: \$? = $ac_status" >&5
2667 (exit "$ac_status"); } &&
2668 { ac_try='test -s "conftest.$ac_objext"'
2669 { (eval echo "$as_me:2669: \"$ac_try\"") >&5
2670 (eval $ac_try) 2>&5
2671 ac_status=$?
2672 echo "$as_me:2672: \$? = $ac_status" >&5
2673 (exit "$ac_status"); }; }; then
2674 INTEL_COMPILER=yes
2675 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2676
2677 else
2678 echo "$as_me: failed program was:" >&5
2679 cat "conftest.$ac_ext" >&5
2680 fi
2681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2682 CFLAGS="$cf_save_CFLAGS"
2683 echo "$as_me:2683: result: $INTEL_COMPILER" >&5
2684 echo "${ECHO_T}$INTEL_COMPILER" >&6
2685 ;;
2686 esac
2687 fi
2688
2689 CLANG_COMPILER=no
2690
2691 if test "$GCC" = yes ; then
2692 echo "$as_me:2692: checking if this is really Clang C compiler" >&5
2693 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2694 cf_save_CFLAGS="$CFLAGS"
2695 cat >"conftest.$ac_ext" <<_ACEOF
2696 #line 2696 "configure"
2697 #include "confdefs.h"
2698
2699 int
2700 main (void)
2701 {
2702
2703 #ifdef __clang__
2704 #else
2705 #error __clang__ is not defined
2706 #endif
2707
2708 ;
2709 return 0;
2710 }
2711 _ACEOF
2712 rm -f "conftest.$ac_objext"
2713 if { (eval echo "$as_me:2713: \"$ac_compile\"") >&5
2714 (eval $ac_compile) 2>&5
2715 ac_status=$?
2716 echo "$as_me:2716: \$? = $ac_status" >&5
2717 (exit "$ac_status"); } &&
2718 { ac_try='test -s "conftest.$ac_objext"'
2719 { (eval echo "$as_me:2719: \"$ac_try\"") >&5
2720 (eval $ac_try) 2>&5
2721 ac_status=$?
2722 echo "$as_me:2722: \$? = $ac_status" >&5
2723 (exit "$ac_status"); }; }; then
2724 CLANG_COMPILER=yes
2725
2726 else
2727 echo "$as_me: failed program was:" >&5
2728 cat "conftest.$ac_ext" >&5
2729 fi
2730 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2731 CFLAGS="$cf_save_CFLAGS"
2732 echo "$as_me:2732: result: $CLANG_COMPILER" >&5
2733 echo "${ECHO_T}$CLANG_COMPILER" >&6
2734 fi
2735
2736 CLANG_VERSION=none
2737
2738 if test "x$CLANG_COMPILER" = "xyes" ; then
2739 case "$CC" in
2740 (c[1-9][0-9]|*/c[1-9][0-9])
2741 { echo "$as_me:2741: WARNING: replacing broken compiler alias $CC" >&5
2742 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2743 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2744 CC=clang
2745 ;;
2746 esac
2747
2748 echo "$as_me:2748: checking version of $CC" >&5
2749 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2750 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.].*//'`"
2751 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2752 echo "$as_me:2752: result: $CLANG_VERSION" >&5
2753 echo "${ECHO_T}$CLANG_VERSION" >&6
2754
2755 for cf_clang_opt in \
2756 -Qunused-arguments \
2757 -Wno-error=implicit-function-declaration
2758 do
2759 echo "$as_me:2759: checking if option $cf_clang_opt works" >&5
2760 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2761 cf_save_CFLAGS="$CFLAGS"
2762 CFLAGS="$CFLAGS $cf_clang_opt"
2763 cat >"conftest.$ac_ext" <<_ACEOF
2764 #line 2764 "configure"
2765 #include "confdefs.h"
2766
2767 #include <stdio.h>
2768 int
2769 main (void)
2770 {
2771
2772 printf("hello!\\n");
2773 ;
2774 return 0;
2775 }
2776 _ACEOF
2777 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2778 if { (eval echo "$as_me:2778: \"$ac_link\"") >&5
2779 (eval $ac_link) 2>&5
2780 ac_status=$?
2781 echo "$as_me:2781: \$? = $ac_status" >&5
2782 (exit "$ac_status"); } &&
2783 { ac_try='test -s "conftest$ac_exeext"'
2784 { (eval echo "$as_me:2784: \"$ac_try\"") >&5
2785 (eval $ac_try) 2>&5
2786 ac_status=$?
2787 echo "$as_me:2787: \$? = $ac_status" >&5
2788 (exit "$ac_status"); }; }; then
2789
2790 cf_clang_optok=yes
2791 else
2792 echo "$as_me: failed program was:" >&5
2793 cat "conftest.$ac_ext" >&5
2794
2795 cf_clang_optok=no
2796 fi
2797 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2798 echo "$as_me:2798: result: $cf_clang_optok" >&5
2799 echo "${ECHO_T}$cf_clang_optok" >&6
2800 CFLAGS="$cf_save_CFLAGS"
2801 if test "$cf_clang_optok" = yes; then
2802 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2803
2804 echo "${as_me:-configure}:2804: testing adding option $cf_clang_opt ..." 1>&5
2805
2806 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2807 CFLAGS="${CFLAGS}$cf_clang_opt"
2808
2809 fi
2810 done
2811 fi
2812
2813 echo "$as_me:2813: checking for $CC option to accept ANSI C" >&5
2814 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2815 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2816 echo $ECHO_N "(cached) $ECHO_C" >&6
2817 else
2818 ac_cv_prog_cc_stdc=no
2819 ac_save_CC=$CC
2820 cat >"conftest.$ac_ext" <<_ACEOF
2821 #line 2821 "configure"
2822 #include "confdefs.h"
2823 #include <stdarg.h>
2824 #include <stdio.h>
2825 #include <sys/types.h>
2826 #include <sys/stat.h>
2827 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2828 struct buf { int x; };
2829 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2830 static char *e (char **p, int i)
2831 {
2832 return p[i];
2833 }
2834 static char *f (char * (*g) (char **, int), char **p, ...)
2835 {
2836 char *s;
2837 va_list v;
2838 va_start (v,p);
2839 s = g (p, va_arg (v,int));
2840 va_end (v);
2841 return s;
2842 }
2843 int test (int i, double x);
2844 struct s1 {int (*f) (int a);};
2845 struct s2 {int (*f) (double a);};
2846 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2847 int argc;
2848 char **argv;
2849 int
2850 main (void)
2851 {
2852 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2853 ;
2854 return 0;
2855 }
2856 _ACEOF
2857 # Don't try gcc -ansi; that turns off useful extensions and
2858 # breaks some systems' header files.
2859 # AIX -qlanglvl=ansi
2860 # Ultrix and OSF/1 -std1
2861 # HP-UX 10.20 and later -Ae
2862 # HP-UX older versions -Aa -D_HPUX_SOURCE
2863 # SVR4 -Xc -D__EXTENSIONS__
2864 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2865 do
2866 CC="$ac_save_CC $ac_arg"
2867 rm -f "conftest.$ac_objext"
2868 if { (eval echo "$as_me:2868: \"$ac_compile\"") >&5
2869 (eval $ac_compile) 2>&5
2870 ac_status=$?
2871 echo "$as_me:2871: \$? = $ac_status" >&5
2872 (exit "$ac_status"); } &&
2873 { ac_try='test -s "conftest.$ac_objext"'
2874 { (eval echo "$as_me:2874: \"$ac_try\"") >&5
2875 (eval $ac_try) 2>&5
2876 ac_status=$?
2877 echo "$as_me:2877: \$? = $ac_status" >&5
2878 (exit "$ac_status"); }; }; then
2879 ac_cv_prog_cc_stdc=$ac_arg
2880 break
2881 else
2882 echo "$as_me: failed program was:" >&5
2883 cat "conftest.$ac_ext" >&5
2884 fi
2885 rm -f "conftest.$ac_objext"
2886 done
2887 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2888 CC=$ac_save_CC
2889
2890 fi
2891
2892 case "x$ac_cv_prog_cc_stdc" in
2893 x|xno)
2894 echo "$as_me:2894: result: none needed" >&5
2895 echo "${ECHO_T}none needed" >&6 ;;
2896 *)
2897 echo "$as_me:2897: result: $ac_cv_prog_cc_stdc" >&5
2898 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2899 CC="$CC $ac_cv_prog_cc_stdc" ;;
2900 esac
2901
2902 # This should have been defined by AC_PROG_CC
2903 : "${CC:=cc}"
2904
2905 echo "$as_me:2905: checking \$CFLAGS variable" >&5
2906 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2907 case "x$CFLAGS" in
2908 (*-[IUD]*)
2909 echo "$as_me:2909: result: broken" >&5
2910 echo "${ECHO_T}broken" >&6
2911 { echo "$as_me:2911: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2912 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2913 cf_flags="$CFLAGS"
2914 CFLAGS=
2915 for cf_arg in $cf_flags
2916 do
2917
2918 cf_fix_cppflags=no
2919 cf_new_cflags=
2920 cf_new_cppflags=
2921 cf_new_extra_cppflags=
2922
2923 for cf_add_cflags in $cf_arg
2924 do
2925 case "$cf_fix_cppflags" in
2926 (no)
2927 case "$cf_add_cflags" in
2928 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2929 case "$cf_add_cflags" in
2930 (-D*)
2931 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2932
2933 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2934 && test -z "${cf_tst_cflags}" \
2935 && cf_fix_cppflags=yes
2936
2937 if test "$cf_fix_cppflags" = yes ; then
2938
2939 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2940 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2941
2942 continue
2943 elif test "${cf_tst_cflags}" = "\"'" ; then
2944
2945 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2946 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2947
2948 continue
2949 fi
2950 ;;
2951 esac
2952 case "$CPPFLAGS" in
2953 (*$cf_add_cflags)
2954 ;;
2955 (*)
2956 case "$cf_add_cflags" in
2957 (-D*)
2958 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2959
2960 CPPFLAGS=`echo "$CPPFLAGS" | \
2961 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2962 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2963
2964 ;;
2965 esac
2966
2967 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2968 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2969
2970 ;;
2971 esac
2972 ;;
2973 (*)
2974
2975 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2976 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2977
2978 ;;
2979 esac
2980 ;;
2981 (yes)
2982
2983 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2984 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2985
2986 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2987
2988 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2989 && test -z "${cf_tst_cflags}" \
2990 && cf_fix_cppflags=no
2991 ;;
2992 esac
2993 done
2994
2995 if test -n "$cf_new_cflags" ; then
2996
2997 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2998 CFLAGS="${CFLAGS}$cf_new_cflags"
2999
3000 fi
3001
3002 if test -n "$cf_new_cppflags" ; then
3003
3004 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3005 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3006
3007 fi
3008
3009 if test -n "$cf_new_extra_cppflags" ; then
3010
3011 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3012 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3013
3014 fi
3015
3016 done
3017 ;;
3018 (*)
3019 echo "$as_me:3019: result: ok" >&5
3020 echo "${ECHO_T}ok" >&6
3021 ;;
3022 esac
3023
3024 echo "$as_me:3024: checking \$CC variable" >&5
3025 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
3026 case "$CC" in
3027 (*[\ \ ]-*)
3028 echo "$as_me:3028: result: broken" >&5
3029 echo "${ECHO_T}broken" >&6
3030 { echo "$as_me:3030: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
3031 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
3032 # humor him...
3033 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
3034 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
3035 CC="$cf_prog"
3036 for cf_arg in $cf_flags
3037 do
3038 case "x$cf_arg" in
3039 (x-[IUDfgOW]*)
3040
3041 cf_fix_cppflags=no
3042 cf_new_cflags=
3043 cf_new_cppflags=
3044 cf_new_extra_cppflags=
3045
3046 for cf_add_cflags in $cf_arg
3047 do
3048 case "$cf_fix_cppflags" in
3049 (no)
3050 case "$cf_add_cflags" in
3051 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3052 case "$cf_add_cflags" in
3053 (-D*)
3054 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3055
3056 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3057 && test -z "${cf_tst_cflags}" \
3058 && cf_fix_cppflags=yes
3059
3060 if test "$cf_fix_cppflags" = yes ; then
3061
3062 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3063 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3064
3065 continue
3066 elif test "${cf_tst_cflags}" = "\"'" ; then
3067
3068 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3069 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3070
3071 continue
3072 fi
3073 ;;
3074 esac
3075 case "$CPPFLAGS" in
3076 (*$cf_add_cflags)
3077 ;;
3078 (*)
3079 case "$cf_add_cflags" in
3080 (-D*)
3081 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3082
3083 CPPFLAGS=`echo "$CPPFLAGS" | \
3084 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3085 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3086
3087 ;;
3088 esac
3089
3090 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3091 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3092
3093 ;;
3094 esac
3095 ;;
3096 (*)
3097
3098 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3099 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3100
3101 ;;
3102 esac
3103 ;;
3104 (yes)
3105
3106 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3107 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3108
3109 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3110
3111 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3112 && test -z "${cf_tst_cflags}" \
3113 && cf_fix_cppflags=no
3114 ;;
3115 esac
3116 done
3117
3118 if test -n "$cf_new_cflags" ; then
3119
3120 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3121 CFLAGS="${CFLAGS}$cf_new_cflags"
3122
3123 fi
3124
3125 if test -n "$cf_new_cppflags" ; then
3126
3127 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3128 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3129
3130 fi
3131
3132 if test -n "$cf_new_extra_cppflags" ; then
3133
3134 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3135 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3136
3137 fi
3138
3139 ;;
3140 (*)
3141 CC="$CC $cf_arg"
3142 ;;
3143 esac
3144 done
3145 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
3146
3147 echo "${as_me:-configure}:3147: testing resulting CC: '$CC' ..." 1>&5
3148
3149 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
3150
3151 echo "${as_me:-configure}:3151: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
3152
3153 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
3154
3155 echo "${as_me:-configure}:3155: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
3156
3157 ;;
3158 (*)
3159 echo "$as_me:3159: result: ok" >&5
3160 echo "${ECHO_T}ok" >&6
3161 ;;
3162 esac
3163
3164 ;;
3165 esac
3166
3167 ac_ext=c
3168 ac_cpp='$CPP $CPPFLAGS'
3169 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3170 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3171 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3172 ac_main_return="return"
3173 echo "$as_me:3173: checking how to run the C preprocessor" >&5
3174 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3175 # On Suns, sometimes $CPP names a directory.
3176 if test -n "$CPP" && test -d "$CPP"; then
3177 CPP=
3178 fi
3179 if test -z "$CPP"; then
3180 if test "${ac_cv_prog_CPP+set}" = set; then
3181 echo $ECHO_N "(cached) $ECHO_C" >&6
3182 else
3183 # Double quotes because CPP needs to be expanded
3184 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3185 do
3186 ac_preproc_ok=false
3187 for ac_c_preproc_warn_flag in '' yes
3188 do
3189 # Use a header file that comes with gcc, so configuring glibc
3190 # with a fresh cross-compiler works.
3191 # On the NeXT, cc -E runs the code through the compiler's parser,
3192 # not just through cpp. "Syntax error" is here to catch this case.
3193 cat >"conftest.$ac_ext" <<_ACEOF
3194 #line 3194 "configure"
3195 #include "confdefs.h"
3196 #include <assert.h>
3197 Syntax error
3198 _ACEOF
3199 if { (eval echo "$as_me:3199: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3200 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3201 ac_status=$?
3202 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3203 rm -f conftest.er1
3204 cat conftest.err >&5
3205 echo "$as_me:3205: \$? = $ac_status" >&5
3206 (exit "$ac_status"); } >/dev/null; then
3207 if test -s conftest.err; then
3208 ac_cpp_err=$ac_c_preproc_warn_flag
3209 else
3210 ac_cpp_err=
3211 fi
3212 else
3213 ac_cpp_err=yes
3214 fi
3215 if test -z "$ac_cpp_err"; then
3216 :
3217 else
3218 echo "$as_me: failed program was:" >&5
3219 cat "conftest.$ac_ext" >&5
3220 # Broken: fails on valid input.
3221 continue
3222 fi
3223 rm -f conftest.err "conftest.$ac_ext"
3224
3225 # OK, works on sane cases. Now check whether non-existent headers
3226 # can be detected and how.
3227 cat >"conftest.$ac_ext" <<_ACEOF
3228 #line 3228 "configure"
3229 #include "confdefs.h"
3230 #include <ac_nonexistent.h>
3231 _ACEOF
3232 if { (eval echo "$as_me:3232: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3233 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3234 ac_status=$?
3235 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3236 rm -f conftest.er1
3237 cat conftest.err >&5
3238 echo "$as_me:3238: \$? = $ac_status" >&5
3239 (exit "$ac_status"); } >/dev/null; then
3240 if test -s conftest.err; then
3241 ac_cpp_err=$ac_c_preproc_warn_flag
3242 else
3243 ac_cpp_err=
3244 fi
3245 else
3246 ac_cpp_err=yes
3247 fi
3248 if test -z "$ac_cpp_err"; then
3249 # Broken: success on invalid input.
3250 continue
3251 else
3252 echo "$as_me: failed program was:" >&5
3253 cat "conftest.$ac_ext" >&5
3254 # Passes both tests.
3255 ac_preproc_ok=:
3256 break
3257 fi
3258 rm -f conftest.err "conftest.$ac_ext"
3259
3260 done
3261 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3262 rm -f conftest.err "conftest.$ac_ext"
3263 if $ac_preproc_ok; then
3264 break
3265 fi
3266
3267 done
3268 ac_cv_prog_CPP=$CPP
3269
3270 fi
3271 CPP=$ac_cv_prog_CPP
3272 else
3273 ac_cv_prog_CPP=$CPP
3274 fi
3275 echo "$as_me:3275: result: $CPP" >&5
3276 echo "${ECHO_T}$CPP" >&6
3277 ac_preproc_ok=false
3278 for ac_c_preproc_warn_flag in '' yes
3279 do
3280 # Use a header file that comes with gcc, so configuring glibc
3281 # with a fresh cross-compiler works.
3282 # On the NeXT, cc -E runs the code through the compiler's parser,
3283 # not just through cpp. "Syntax error" is here to catch this case.
3284 cat >"conftest.$ac_ext" <<_ACEOF
3285 #line 3285 "configure"
3286 #include "confdefs.h"
3287 #include <assert.h>
3288 Syntax error
3289 _ACEOF
3290 if { (eval echo "$as_me:3290: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3291 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3292 ac_status=$?
3293 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3294 rm -f conftest.er1
3295 cat conftest.err >&5
3296 echo "$as_me:3296: \$? = $ac_status" >&5
3297 (exit "$ac_status"); } >/dev/null; then
3298 if test -s conftest.err; then
3299 ac_cpp_err=$ac_c_preproc_warn_flag
3300 else
3301 ac_cpp_err=
3302 fi
3303 else
3304 ac_cpp_err=yes
3305 fi
3306 if test -z "$ac_cpp_err"; then
3307 :
3308 else
3309 echo "$as_me: failed program was:" >&5
3310 cat "conftest.$ac_ext" >&5
3311 # Broken: fails on valid input.
3312 continue
3313 fi
3314 rm -f conftest.err "conftest.$ac_ext"
3315
3316 # OK, works on sane cases. Now check whether non-existent headers
3317 # can be detected and how.
3318 cat >"conftest.$ac_ext" <<_ACEOF
3319 #line 3319 "configure"
3320 #include "confdefs.h"
3321 #include <ac_nonexistent.h>
3322 _ACEOF
3323 if { (eval echo "$as_me:3323: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3324 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3325 ac_status=$?
3326 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3327 rm -f conftest.er1
3328 cat conftest.err >&5
3329 echo "$as_me:3329: \$? = $ac_status" >&5
3330 (exit "$ac_status"); } >/dev/null; then
3331 if test -s conftest.err; then
3332 ac_cpp_err=$ac_c_preproc_warn_flag
3333 else
3334 ac_cpp_err=
3335 fi
3336 else
3337 ac_cpp_err=yes
3338 fi
3339 if test -z "$ac_cpp_err"; then
3340 # Broken: success on invalid input.
3341 continue
3342 else
3343 echo "$as_me: failed program was:" >&5
3344 cat "conftest.$ac_ext" >&5
3345 # Passes both tests.
3346 ac_preproc_ok=:
3347 break
3348 fi
3349 rm -f conftest.err "conftest.$ac_ext"
3350
3351 done
3352 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3353 rm -f conftest.err "conftest.$ac_ext"
3354 if $ac_preproc_ok; then
3355 :
3356 else
3357 { { echo "$as_me:3357: error: C preprocessor \"$CPP\" fails sanity check" >&5
3358 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3359 { (exit 1); exit 1; }; }
3360 fi
3361
3362 ac_ext=c
3363 ac_cpp='$CPP $CPPFLAGS'
3364 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3365 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3366 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3367 ac_main_return="return"
3368
3369 if test $ac_cv_c_compiler_gnu = yes; then
3370 echo "$as_me:3370: checking whether $CC needs -traditional" >&5
3371 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3372 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3373 echo $ECHO_N "(cached) $ECHO_C" >&6
3374 else
3375 ac_pattern="Autoconf.*'x'"
3376 cat >"conftest.$ac_ext" <<_ACEOF
3377 #line 3377 "configure"
3378 #include "confdefs.h"
3379 #include <sgtty.h>
3380 int Autoconf = TIOCGETP;
3381 _ACEOF
3382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3383 $EGREP "$ac_pattern" >/dev/null 2>&1; then
3384 ac_cv_prog_gcc_traditional=yes
3385 else
3386 ac_cv_prog_gcc_traditional=no
3387 fi
3388 rm -rf conftest*
3389
3390 if test $ac_cv_prog_gcc_traditional = no; then
3391 cat >"conftest.$ac_ext" <<_ACEOF
3392 #line 3392 "configure"
3393 #include "confdefs.h"
3394 #include <termio.h>
3395 int Autoconf = TCGETA;
3396 _ACEOF
3397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3398 $EGREP "$ac_pattern" >/dev/null 2>&1; then
3399 ac_cv_prog_gcc_traditional=yes
3400 fi
3401 rm -rf conftest*
3402
3403 fi
3404 fi
3405 echo "$as_me:3405: result: $ac_cv_prog_gcc_traditional" >&5
3406 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3407 if test $ac_cv_prog_gcc_traditional = yes; then
3408 CC="$CC -traditional"
3409 fi
3410 fi
3411
3412 echo "$as_me:3412: checking whether $CC understands -c and -o together" >&5
3413 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3414 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3415 echo $ECHO_N "(cached) $ECHO_C" >&6
3416 else
3417
3418 cat > conftest.$ac_ext <<CF_EOF
3419 int main(void)
3420 {
3421 ${cf_cv_main_return:-return}(0);
3422 }
3423 CF_EOF
3424 # We do the test twice because some compilers refuse to overwrite an
3425 # existing .o file with -o, though they will create one.
3426 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3427 if { (eval echo "$as_me:3427: \"$ac_try\"") >&5
3428 (eval $ac_try) 2>&5
3429 ac_status=$?
3430 echo "$as_me:3430: \$? = $ac_status" >&5
3431 (exit "$ac_status"); } &&
3432 test -f conftest2.$ac_objext && { (eval echo "$as_me:3432: \"$ac_try\"") >&5
3433 (eval $ac_try) 2>&5
3434 ac_status=$?
3435 echo "$as_me:3435: \$? = $ac_status" >&5
3436 (exit "$ac_status"); };
3437 then
3438 eval cf_cv_prog_CC_c_o=yes
3439 else
3440 eval cf_cv_prog_CC_c_o=no
3441 fi
3442 rm -rf ./conftest*
3443
3444 fi
3445 if test "$cf_cv_prog_CC_c_o" = yes; then
3446 echo "$as_me:3446: result: yes" >&5
3447 echo "${ECHO_T}yes" >&6
3448 else
3449 echo "$as_me:3449: result: no" >&5
3450 echo "${ECHO_T}no" >&6
3451 fi
3452
3453 if test "$cross_compiling" = yes ; then
3454 LDCONFIG=:
3455 else
3456 case "$cf_cv_system_name" in
3457 (dragonfly*|mirbsd*|freebsd*)
3458 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3459 ;;
3460 (*) LDPATH=$PATH:/sbin:/usr/sbin
3461 # Extract the first word of "ldconfig", so it can be a program name with args.
3462 set dummy ldconfig; ac_word=$2
3463 echo "$as_me:3463: checking for $ac_word" >&5
3464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3465 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3466 echo $ECHO_N "(cached) $ECHO_C" >&6
3467 else
3468 case $LDCONFIG in
3469 [\\/]* | ?:[\\/]*)
3470 ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3471 ;;
3472 *)
3473 ac_save_IFS=$IFS; IFS=$ac_path_separator
3474 ac_dummy="$LDPATH"
3475 for ac_dir in $ac_dummy; do
3476 IFS=$ac_save_IFS
3477 test -z "$ac_dir" && ac_dir=.
3478 if $as_executable_p "$ac_dir/$ac_word"; then
3479 ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3480 echo "$as_me:3480: found $ac_dir/$ac_word" >&5
3481 break
3482 fi
3483 done
3484
3485 ;;
3486 esac
3487 fi
3488 LDCONFIG=$ac_cv_path_LDCONFIG
3489
3490 if test -n "$LDCONFIG"; then
3491 echo "$as_me:3491: result: $LDCONFIG" >&5
3492 echo "${ECHO_T}$LDCONFIG" >&6
3493 else
3494 echo "$as_me:3494: result: no" >&5
3495 echo "${ECHO_T}no" >&6
3496 fi
3497
3498 ;;
3499 esac
3500 fi
3501
3502 echo "$as_me:3502: checking if you want to ensure bool is consistent with C++" >&5
3503 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3504
3505 # Check whether --with-cxx or --without-cxx was given.
3506 if test "${with_cxx+set}" = set; then
3507 withval="$with_cxx"
3508 cf_with_cxx=$withval
3509 else
3510 cf_with_cxx=yes
3511 fi;
3512 echo "$as_me:3512: result: $cf_with_cxx" >&5
3513 echo "${ECHO_T}$cf_with_cxx" >&6
3514 if test "X$cf_with_cxx" = Xno ; then
3515 CXX=""
3516 GXX=""
3517 else
3518 # with autoconf 2.13, we can change the error to a warning:
3519 ac_ext=cc
3520 ac_cpp='$CXXCPP $CPPFLAGS'
3521 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3522 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3523 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3524 ac_main_return="return"
3525 if test -n "$ac_tool_prefix"; then
3526 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3527 do
3528 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3529 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3530 echo "$as_me:3530: checking for $ac_word" >&5
3531 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3532 if test "${ac_cv_prog_CXX+set}" = set; then
3533 echo $ECHO_N "(cached) $ECHO_C" >&6
3534 else
3535 if test -n "$CXX"; then
3536 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3537 else
3538 ac_save_IFS=$IFS; IFS=$ac_path_separator
3539 ac_dummy="$PATH"
3540 for ac_dir in $ac_dummy; do
3541 IFS=$ac_save_IFS
3542 test -z "$ac_dir" && ac_dir=.
3543 $as_executable_p "$ac_dir/$ac_word" || continue
3544 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3545 echo "$as_me:3545: found $ac_dir/$ac_word" >&5
3546 break
3547 done
3548
3549 fi
3550 fi
3551 CXX=$ac_cv_prog_CXX
3552 if test -n "$CXX"; then
3553 echo "$as_me:3553: result: $CXX" >&5
3554 echo "${ECHO_T}$CXX" >&6
3555 else
3556 echo "$as_me:3556: result: no" >&5
3557 echo "${ECHO_T}no" >&6
3558 fi
3559
3560 test -n "$CXX" && break
3561 done
3562 fi
3563 if test -z "$CXX"; then
3564 ac_ct_CXX=$CXX
3565 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3566 do
3567 # Extract the first word of "$ac_prog", so it can be a program name with args.
3568 set dummy $ac_prog; ac_word=$2
3569 echo "$as_me:3569: checking for $ac_word" >&5
3570 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3571 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3572 echo $ECHO_N "(cached) $ECHO_C" >&6
3573 else
3574 if test -n "$ac_ct_CXX"; then
3575 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3576 else
3577 ac_save_IFS=$IFS; IFS=$ac_path_separator
3578 ac_dummy="$PATH"
3579 for ac_dir in $ac_dummy; do
3580 IFS=$ac_save_IFS
3581 test -z "$ac_dir" && ac_dir=.
3582 $as_executable_p "$ac_dir/$ac_word" || continue
3583 ac_cv_prog_ac_ct_CXX="$ac_prog"
3584 echo "$as_me:3584: found $ac_dir/$ac_word" >&5
3585 break
3586 done
3587
3588 fi
3589 fi
3590 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3591 if test -n "$ac_ct_CXX"; then
3592 echo "$as_me:3592: result: $ac_ct_CXX" >&5
3593 echo "${ECHO_T}$ac_ct_CXX" >&6
3594 else
3595 echo "$as_me:3595: result: no" >&5
3596 echo "${ECHO_T}no" >&6
3597 fi
3598
3599 test -n "$ac_ct_CXX" && break
3600 done
3601 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3602
3603 CXX=$ac_ct_CXX
3604 fi
3605
3606 # Provide some information about the compiler.
3607 echo "$as_me:3607:" \
3608 "checking for C++ compiler version" >&5
3609 ac_compiler=`set X $ac_compile; echo $2`
3610 { (eval echo "$as_me:3610: \"$ac_compiler --version </dev/null >&5\"") >&5
3611 (eval $ac_compiler --version </dev/null >&5) 2>&5
3612 ac_status=$?
3613 echo "$as_me:3613: \$? = $ac_status" >&5
3614 (exit "$ac_status"); }
3615 { (eval echo "$as_me:3615: \"$ac_compiler -v </dev/null >&5\"") >&5
3616 (eval $ac_compiler -v </dev/null >&5) 2>&5
3617 ac_status=$?
3618 echo "$as_me:3618: \$? = $ac_status" >&5
3619 (exit "$ac_status"); }
3620 { (eval echo "$as_me:3620: \"$ac_compiler -V </dev/null >&5\"") >&5
3621 (eval $ac_compiler -V </dev/null >&5) 2>&5
3622 ac_status=$?
3623 echo "$as_me:3623: \$? = $ac_status" >&5
3624 (exit "$ac_status"); }
3625
3626 echo "$as_me:3626: checking whether we are using the GNU C++ compiler" >&5
3627 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3628 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3629 echo $ECHO_N "(cached) $ECHO_C" >&6
3630 else
3631 cat >"conftest.$ac_ext" <<_ACEOF
3632 #line 3632 "configure"
3633 #include "confdefs.h"
3634
3635 int
3636 main (void)
3637 {
3638 #ifndef __GNUC__
3639 choke me
3640 #endif
3641
3642 ;
3643 return 0;
3644 }
3645 _ACEOF
3646 rm -f "conftest.$ac_objext"
3647 if { (eval echo "$as_me:3647: \"$ac_compile\"") >&5
3648 (eval $ac_compile) 2>&5
3649 ac_status=$?
3650 echo "$as_me:3650: \$? = $ac_status" >&5
3651 (exit "$ac_status"); } &&
3652 { ac_try='test -s "conftest.$ac_objext"'
3653 { (eval echo "$as_me:3653: \"$ac_try\"") >&5
3654 (eval $ac_try) 2>&5
3655 ac_status=$?
3656 echo "$as_me:3656: \$? = $ac_status" >&5
3657 (exit "$ac_status"); }; }; then
3658 ac_compiler_gnu=yes
3659 else
3660 echo "$as_me: failed program was:" >&5
3661 cat "conftest.$ac_ext" >&5
3662 ac_compiler_gnu=no
3663 fi
3664 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3665 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3666
3667 fi
3668 echo "$as_me:3668: result: $ac_cv_cxx_compiler_gnu" >&5
3669 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3670 GXX=`test $ac_compiler_gnu = yes && echo yes`
3671 ac_test_CXXFLAGS=${CXXFLAGS+set}
3672 ac_save_CXXFLAGS=$CXXFLAGS
3673 CXXFLAGS="-g"
3674 echo "$as_me:3674: checking whether $CXX accepts -g" >&5
3675 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3676 if test "${ac_cv_prog_cxx_g+set}" = set; then
3677 echo $ECHO_N "(cached) $ECHO_C" >&6
3678 else
3679 cat >"conftest.$ac_ext" <<_ACEOF
3680 #line 3680 "configure"
3681 #include "confdefs.h"
3682
3683 int
3684 main (void)
3685 {
3686
3687 ;
3688 return 0;
3689 }
3690 _ACEOF
3691 rm -f "conftest.$ac_objext"
3692 if { (eval echo "$as_me:3692: \"$ac_compile\"") >&5
3693 (eval $ac_compile) 2>&5
3694 ac_status=$?
3695 echo "$as_me:3695: \$? = $ac_status" >&5
3696 (exit "$ac_status"); } &&
3697 { ac_try='test -s "conftest.$ac_objext"'
3698 { (eval echo "$as_me:3698: \"$ac_try\"") >&5
3699 (eval $ac_try) 2>&5
3700 ac_status=$?
3701 echo "$as_me:3701: \$? = $ac_status" >&5
3702 (exit "$ac_status"); }; }; then
3703 ac_cv_prog_cxx_g=yes
3704 else
3705 echo "$as_me: failed program was:" >&5
3706 cat "conftest.$ac_ext" >&5
3707 ac_cv_prog_cxx_g=no
3708 fi
3709 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3710 fi
3711 echo "$as_me:3711: result: $ac_cv_prog_cxx_g" >&5
3712 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3713 if test "$ac_test_CXXFLAGS" = set; then
3714 CXXFLAGS=$ac_save_CXXFLAGS
3715 elif test $ac_cv_prog_cxx_g = yes; then
3716 if test "$GXX" = yes; then
3717 CXXFLAGS="-g -O2"
3718 else
3719 CXXFLAGS="-g"
3720 fi
3721 else
3722 if test "$GXX" = yes; then
3723 CXXFLAGS="-O2"
3724 else
3725 CXXFLAGS=
3726 fi
3727 fi
3728 for ac_declaration in \
3729 ''\
3730 '#include <stdlib.h>' \
3731 'extern "C" void std::exit (int) throw (); using std::exit;' \
3732 'extern "C" void std::exit (int); using std::exit;' \
3733 'extern "C" void exit (int) throw ();' \
3734 'extern "C" void exit (int);' \
3735 'void exit (int);'
3736 do
3737 cat >"conftest.$ac_ext" <<_ACEOF
3738 #line 3738 "configure"
3739 #include "confdefs.h"
3740 #include <stdlib.h>
3741 $ac_declaration
3742 int
3743 main (void)
3744 {
3745 exit (42);
3746 ;
3747 return 0;
3748 }
3749 _ACEOF
3750 rm -f "conftest.$ac_objext"
3751 if { (eval echo "$as_me:3751: \"$ac_compile\"") >&5
3752 (eval $ac_compile) 2>&5
3753 ac_status=$?
3754 echo "$as_me:3754: \$? = $ac_status" >&5
3755 (exit "$ac_status"); } &&
3756 { ac_try='test -s "conftest.$ac_objext"'
3757 { (eval echo "$as_me:3757: \"$ac_try\"") >&5
3758 (eval $ac_try) 2>&5
3759 ac_status=$?
3760 echo "$as_me:3760: \$? = $ac_status" >&5
3761 (exit "$ac_status"); }; }; then
3762 :
3763 else
3764 echo "$as_me: failed program was:" >&5
3765 cat "conftest.$ac_ext" >&5
3766 continue
3767 fi
3768 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3769 cat >"conftest.$ac_ext" <<_ACEOF
3770 #line 3770 "configure"
3771 #include "confdefs.h"
3772 $ac_declaration
3773 int
3774 main (void)
3775 {
3776 exit (42);
3777 ;
3778 return 0;
3779 }
3780 _ACEOF
3781 rm -f "conftest.$ac_objext"
3782 if { (eval echo "$as_me:3782: \"$ac_compile\"") >&5
3783 (eval $ac_compile) 2>&5
3784 ac_status=$?
3785 echo "$as_me:3785: \$? = $ac_status" >&5
3786 (exit "$ac_status"); } &&
3787 { ac_try='test -s "conftest.$ac_objext"'
3788 { (eval echo "$as_me:3788: \"$ac_try\"") >&5
3789 (eval $ac_try) 2>&5
3790 ac_status=$?
3791 echo "$as_me:3791: \$? = $ac_status" >&5
3792 (exit "$ac_status"); }; }; then
3793 break
3794 else
3795 echo "$as_me: failed program was:" >&5
3796 cat "conftest.$ac_ext" >&5
3797 fi
3798 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3799 done
3800 rm -rf conftest*
3801 if test -n "$ac_declaration"; then
3802 echo '#ifdef __cplusplus' >>confdefs.h
3803 echo "$ac_declaration" >>confdefs.h
3804 echo '#endif' >>confdefs.h
3805 fi
3806
3807 ac_ext=c
3808 ac_cpp='$CPP $CPPFLAGS'
3809 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3810 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3811 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3812 ac_main_return="return"
3813
3814 ac_ext=cc
3815 ac_cpp='$CXXCPP $CPPFLAGS'
3816 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3817 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3818 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3819 ac_main_return="return"
3820
3821 if test "x$cf_with_cxx" != xno
3822 then
3823 # Several of the C++ configurations do not work, particularly when
3824 # cross-compiling (20140913 -TD)
3825 echo "$as_me:3825: checking if $CXX works" >&5
3826 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3827
3828 save_CPPFLAGS="$CPPFLAGS"
3829 eval cf_includedir=${includedir}
3830 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3831
3832 cat >"conftest.$ac_ext" <<_ACEOF
3833 #line 3833 "configure"
3834 #include "confdefs.h"
3835
3836 #include <stdlib.h>
3837 #include <stdio.h>
3838
3839 int
3840 main (void)
3841 {
3842
3843 printf("Hello world!\n")
3844
3845 ;
3846 return 0;
3847 }
3848 _ACEOF
3849 rm -f "conftest.$ac_objext"
3850 if { (eval echo "$as_me:3850: \"$ac_compile\"") >&5
3851 (eval $ac_compile) 2>&5
3852 ac_status=$?
3853 echo "$as_me:3853: \$? = $ac_status" >&5
3854 (exit "$ac_status"); } &&
3855 { ac_try='test -s "conftest.$ac_objext"'
3856 { (eval echo "$as_me:3856: \"$ac_try\"") >&5
3857 (eval $ac_try) 2>&5
3858 ac_status=$?
3859 echo "$as_me:3859: \$? = $ac_status" >&5
3860 (exit "$ac_status"); }; }; then
3861 cf_cxx_works=yes
3862 else
3863 echo "$as_me: failed program was:" >&5
3864 cat "conftest.$ac_ext" >&5
3865 cf_cxx_works=no
3866 fi
3867 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3868 CPPFLAGS="$save_CPPFLAGS"
3869
3870 echo "$as_me:3870: result: $cf_cxx_works" >&5
3871 echo "${ECHO_T}$cf_cxx_works" >&6
3872 if test "x$cf_cxx_works" = xno
3873 then
3874 { echo "$as_me:3874: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3875 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3876 cf_with_cxx=no; CXX=""; GXX="";
3877 fi
3878 fi
3879 ac_ext=c
3880 ac_cpp='$CPP $CPPFLAGS'
3881 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3882 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3883 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3884 ac_main_return="return"
3885
3886 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3887 if test "$CXX" = "g++" ; then
3888 # Extract the first word of "g++", so it can be a program name with args.
3889 set dummy g++; ac_word=$2
3890 echo "$as_me:3890: checking for $ac_word" >&5
3891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3892 if test "${ac_cv_path_CXX+set}" = set; then
3893 echo $ECHO_N "(cached) $ECHO_C" >&6
3894 else
3895 case $CXX in
3896 [\\/]* | ?:[\\/]*)
3897 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3898 ;;
3899 *)
3900 ac_save_IFS=$IFS; IFS=$ac_path_separator
3901 ac_dummy="$PATH"
3902 for ac_dir in $ac_dummy; do
3903 IFS=$ac_save_IFS
3904 test -z "$ac_dir" && ac_dir=.
3905 if $as_executable_p "$ac_dir/$ac_word"; then
3906 ac_cv_path_CXX="$ac_dir/$ac_word"
3907 echo "$as_me:3907: found $ac_dir/$ac_word" >&5
3908 break
3909 fi
3910 done
3911
3912 ;;
3913 esac
3914 fi
3915 CXX=$ac_cv_path_CXX
3916
3917 if test -n "$CXX"; then
3918 echo "$as_me:3918: result: $CXX" >&5
3919 echo "${ECHO_T}$CXX" >&6
3920 else
3921 echo "$as_me:3921: result: no" >&5
3922 echo "${ECHO_T}no" >&6
3923 fi
3924
3925 fi
3926 case "x$CXX" in
3927 (x|xg++)
3928 { echo "$as_me:3928: WARNING: You don't have any C++ compiler, too bad" >&5
3929 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3930 cf_with_cxx=no; CXX=""; GXX="";
3931 ;;
3932 esac
3933 fi
3934
3935 GXX_VERSION=none
3936 if test "$GXX" = yes; then
3937 echo "$as_me:3937: checking version of ${CXX:-g++}" >&5
3938 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3939 GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3940 if test -z "$GXX_VERSION"
3941 then
3942 GXX_VERSION=unknown
3943 GXX=no
3944 fi
3945 echo "$as_me:3945: result: $GXX_VERSION" >&5
3946 echo "${ECHO_T}$GXX_VERSION" >&6
3947 fi
3948
3949 case "$GXX_VERSION" in
3950 ([1-9][0-9].*)
3951 ;;
3952 (1.*|2.[0-6]*)
3953 { echo "$as_me:3953: WARNING: templates do not work" >&5
3954 echo "$as_me: WARNING: templates do not work" >&2;}
3955 ;;
3956 esac
3957
3958 echo "$as_me:3958: checking if you want to build C++ binding and demo" >&5
3959 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3960
3961 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3962 if test "${with_cxx_binding+set}" = set; then
3963 withval="$with_cxx_binding"
3964 cf_with_cxx_binding=$withval
3965 else
3966 cf_with_cxx_binding=$cf_with_cxx
3967 fi;
3968 echo "$as_me:3968: result: $cf_with_cxx_binding" >&5
3969 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3970
3971 echo "$as_me:3971: checking if you want to build with Ada" >&5
3972 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3973 echo "$as_me:3973: result: $cf_with_ada" >&5
3974 echo "${ECHO_T}$cf_with_ada" >&6
3975
3976 echo "$as_me:3976: checking if you want to install terminal database" >&5
3977 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3978
3979 # Check whether --enable-db-install or --disable-db-install was given.
3980 if test "${enable_db_install+set}" = set; then
3981 enableval="$enable_db_install"
3982 cf_with_db_install=$enableval
3983 else
3984 cf_with_db_install=yes
3985 fi;
3986 echo "$as_me:3986: result: $cf_with_db_install" >&5
3987 echo "${ECHO_T}$cf_with_db_install" >&6
3988
3989 echo "$as_me:3989: checking if you want to install manpages" >&5
3990 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3991
3992 # Check whether --with-manpages or --without-manpages was given.
3993 if test "${with_manpages+set}" = set; then
3994 withval="$with_manpages"
3995 cf_with_manpages=$withval
3996 else
3997 cf_with_manpages=yes
3998 fi;
3999 echo "$as_me:3999: result: $cf_with_manpages" >&5
4000 echo "${ECHO_T}$cf_with_manpages" >&6
4001
4002 echo "$as_me:4002: checking if you want to build programs such as tic" >&5
4003 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
4004
4005 # Check whether --with-progs or --without-progs was given.
4006 if test "${with_progs+set}" = set; then
4007 withval="$with_progs"
4008 cf_with_progs=$withval
4009 else
4010 cf_with_progs=yes
4011 fi;
4012 echo "$as_me:4012: result: $cf_with_progs" >&5
4013 echo "${ECHO_T}$cf_with_progs" >&6
4014
4015 echo "$as_me:4015: checking if you want to build test-programs" >&5
4016 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
4017
4018 # Check whether --with-tests or --without-tests was given.
4019 if test "${with_tests+set}" = set; then
4020 withval="$with_tests"
4021 cf_with_tests=$withval
4022 else
4023 cf_with_tests=yes
4024 fi;
4025 echo "$as_me:4025: result: $cf_with_tests" >&5
4026 echo "${ECHO_T}$cf_with_tests" >&6
4027
4028 echo "$as_me:4028: checking if you wish to install curses.h" >&5
4029 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
4030
4031 # Check whether --with-curses-h or --without-curses-h was given.
4032 if test "${with_curses_h+set}" = set; then
4033 withval="$with_curses_h"
4034 with_curses_h=$withval
4035 else
4036 with_curses_h=yes
4037 fi;
4038 echo "$as_me:4038: result: $with_curses_h" >&5
4039 echo "${ECHO_T}$with_curses_h" >&6
4040
4041 modules_to_build="ncurses"
4042 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
4043 modules_to_build="$modules_to_build panel menu form"
4044
4045 test "$program_prefix" != NONE &&
4046 program_transform_name="s,^,$program_prefix,;$program_transform_name"
4047 # Use a double $ so make ignores it.
4048 test "$program_suffix" != NONE &&
4049 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
4050 # Double any \ or $. echo might interpret backslashes.
4051 # By default was `s,x,x', remove it if useless.
4052 cat <<\_ACEOF >conftest.sed
4053 s/[\\$]/&&/g;s/;s,x,x,$//
4054 _ACEOF
4055 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
4056 rm conftest.sed
4057
4058 for ac_prog in mawk gawk nawk awk
4059 do
4060 # Extract the first word of "$ac_prog", so it can be a program name with args.
4061 set dummy $ac_prog; ac_word=$2
4062 echo "$as_me:4062: checking for $ac_word" >&5
4063 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4064 if test "${ac_cv_prog_AWK+set}" = set; then
4065 echo $ECHO_N "(cached) $ECHO_C" >&6
4066 else
4067 if test -n "$AWK"; then
4068 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4069 else
4070 ac_save_IFS=$IFS; IFS=$ac_path_separator
4071 ac_dummy="$PATH"
4072 for ac_dir in $ac_dummy; do
4073 IFS=$ac_save_IFS
4074 test -z "$ac_dir" && ac_dir=.
4075 $as_executable_p "$ac_dir/$ac_word" || continue
4076 ac_cv_prog_AWK="$ac_prog"
4077 echo "$as_me:4077: found $ac_dir/$ac_word" >&5
4078 break
4079 done
4080
4081 fi
4082 fi
4083 AWK=$ac_cv_prog_AWK
4084 if test -n "$AWK"; then
4085 echo "$as_me:4085: result: $AWK" >&5
4086 echo "${ECHO_T}$AWK" >&6
4087 else
4088 echo "$as_me:4088: result: no" >&5
4089 echo "${ECHO_T}no" >&6
4090 fi
4091
4092 test -n "$AWK" && break
4093 done
4094
4095 test -z "$AWK" && { { echo "$as_me:4095: error: No awk program found" >&5
4096 echo "$as_me: error: No awk program found" >&2;}
4097 { (exit 1); exit 1; }; }
4098
4099 case "$cf_cv_system_name" in
4100 (cygwin*|msys*|mingw32*|mingw64|os2*)
4101 GLOB_FULLPATH_POSIX='/*'
4102 GLOB_FULLPATH_OTHER='[a-zA-Z]:[\\/]*'
4103 ;;
4104 (*)
4105 GLOB_FULLPATH_POSIX='/*'
4106 GLOB_FULLPATH_OTHER=$GLOB_FULLPATH_POSIX
4107 ;;
4108 esac
4109
4110 # Find a good install program. We prefer a C program (faster),
4111 # so one script is as good as another. But avoid the broken or
4112 # incompatible versions:
4113 # SysV /etc/install, /usr/sbin/install
4114 # SunOS /usr/etc/install
4115 # IRIX /sbin/install
4116 # AIX /bin/install
4117 # AmigaOS /C/install, which installs bootblocks on floppy discs
4118 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4119 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4120 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4121 # ./install, which can be erroneously created by make from ./install.sh.
4122 echo "$as_me:4122: checking for a BSD compatible install" >&5
4123 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
4124 if test -z "$INSTALL"; then
4125 if test "${ac_cv_path_install+set}" = set; then
4126 echo $ECHO_N "(cached) $ECHO_C" >&6
4127 else
4128 ac_save_IFS=$IFS; IFS=$ac_path_separator
4129 for ac_dir in $PATH; do
4130 IFS=$ac_save_IFS
4131 # Account for people who put trailing slashes in PATH elements.
4132 case $ac_dir/ in
4133 / | ./ | .// | /cC/* \
4134 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
4135 | /usr/ucb/* ) ;;
4136 *)
4137 # OSF1 and SCO ODT 3.0 have their own names for install.
4138 # Don't use installbsd from OSF since it installs stuff as root
4139 # by default.
4140 for ac_prog in ginstall scoinst install; do
4141 if $as_executable_p "$ac_dir/$ac_prog"; then
4142 if test $ac_prog = install &&
4143 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
4144 # AIX install. It has an incompatible calling convention.
4145 :
4146 elif test $ac_prog = install &&
4147 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
4148 # program-specific install script used by HP pwplus--don't use.
4149 :
4150 else
4151 ac_cv_path_install="$ac_dir/$ac_prog -c"
4152 break 2
4153 fi
4154 fi
4155 done
4156 ;;
4157 esac
4158 done
4159
4160 fi
4161 if test "${ac_cv_path_install+set}" = set; then
4162 INSTALL=$ac_cv_path_install
4163 else
4164 # As a last resort, use the slow shell script. We don't cache a
4165 # path for INSTALL within a source directory, because that will
4166 # break other packages using the cache if that directory is
4167 # removed, or if the path is relative.
4168 INSTALL=$ac_install_sh
4169 fi
4170 fi
4171 echo "$as_me:4171: result: $INSTALL" >&5
4172 echo "${ECHO_T}$INSTALL" >&6
4173
4174 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4175 # It thinks the first close brace ends the variable substitution.
4176 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4177
4178 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4179
4180 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4181
4182 if test "x$INSTALL" = "x./install-sh -c"; then
4183 if test -f /usr/sbin/install ; then
4184 case "$host_os" in
4185 (linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
4186 INSTALL=/usr/sbin/install
4187 ;;
4188 esac
4189 fi
4190 fi
4191 case x$INSTALL in
4192 (x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
4193 ;;
4194 (*)
4195 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
4196 test -z "$cf_dir" && cf_dir=.
4197 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
4198 ;;
4199 esac
4200
4201 for ac_prog in lint cppcheck splint
4202 do
4203 # Extract the first word of "$ac_prog", so it can be a program name with args.
4204 set dummy $ac_prog; ac_word=$2
4205 echo "$as_me:4205: checking for $ac_word" >&5
4206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4207 if test "${ac_cv_prog_LINT+set}" = set; then
4208 echo $ECHO_N "(cached) $ECHO_C" >&6
4209 else
4210 if test -n "$LINT"; then
4211 ac_cv_prog_LINT="$LINT" # Let the user override the test.
4212 else
4213 ac_save_IFS=$IFS; IFS=$ac_path_separator
4214 ac_dummy="$PATH"
4215 for ac_dir in $ac_dummy; do
4216 IFS=$ac_save_IFS
4217 test -z "$ac_dir" && ac_dir=.
4218 $as_executable_p "$ac_dir/$ac_word" || continue
4219 ac_cv_prog_LINT="$ac_prog"
4220 echo "$as_me:4220: found $ac_dir/$ac_word" >&5
4221 break
4222 done
4223
4224 fi
4225 fi
4226 LINT=$ac_cv_prog_LINT
4227 if test -n "$LINT"; then
4228 echo "$as_me:4228: result: $LINT" >&5
4229 echo "${ECHO_T}$LINT" >&6
4230 else
4231 echo "$as_me:4231: result: no" >&5
4232 echo "${ECHO_T}no" >&6
4233 fi
4234
4235 test -n "$LINT" && break
4236 done
4237
4238 case "x$LINT" in
4239 (xlint|x*/lint) # NetBSD 10
4240 test -z "$LINT_OPTS" && LINT_OPTS="-chapbrxzgFS -v -Ac11"
4241 ;;
4242 (xcppcheck|x*/cppcheck)
4243 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all -D__CPPCHECK__"
4244 ;;
4245 esac
4246
4247 echo "$as_me:4247: checking whether ln -s works" >&5
4248 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4249 LN_S=$as_ln_s
4250 if test "$LN_S" = "ln -s"; then
4251 echo "$as_me:4251: result: yes" >&5
4252 echo "${ECHO_T}yes" >&6
4253 else
4254 echo "$as_me:4254: result: no, using $LN_S" >&5
4255 echo "${ECHO_T}no, using $LN_S" >&6
4256 fi
4257
4258 echo "$as_me:4258: checking if $LN_S -f options work" >&5
4259 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
4260
4261 rm -f conf$$.src conf$$dst
4262 echo >conf$$.dst
4263 echo first >conf$$.src
4264 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
4265 cf_prog_ln_sf=yes
4266 else
4267 cf_prog_ln_sf=no
4268 fi
4269 rm -f conf$$.dst conf$$src
4270 echo "$as_me:4270: result: $cf_prog_ln_sf" >&5
4271 echo "${ECHO_T}$cf_prog_ln_sf" >&6
4272
4273 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
4274
4275 echo "$as_me:4275: checking for long file names" >&5
4276 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
4277 if test "${ac_cv_sys_long_file_names+set}" = set; then
4278 echo $ECHO_N "(cached) $ECHO_C" >&6
4279 else
4280 ac_cv_sys_long_file_names=yes
4281 # Test for long file names in all the places we know might matter:
4282 # . the current directory, where building will happen
4283 # $prefix/lib where we will be installing things
4284 # $exec_prefix/lib likewise
4285 # eval it to expand exec_prefix.
4286 # $TMPDIR if set, where it might want to write temporary files
4287 # if $TMPDIR is not set:
4288 # /tmp where it might want to write temporary files
4289 # /var/tmp likewise
4290 # /usr/tmp likewise
4291 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4292 ac_tmpdirs=$TMPDIR
4293 else
4294 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4295 fi
4296 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
4297 test -d "$ac_dir" || continue
4298 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
4299 ac_xdir=$ac_dir/cf$$
4300 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
4301 ac_tf1=$ac_xdir/conftest9012345
4302 ac_tf2=$ac_xdir/conftest9012346
4303 (echo 1 >"$ac_tf1") 2>/dev/null
4304 (echo 2 >"$ac_tf2") 2>/dev/null
4305 ac_val=`cat "$ac_tf1" 2>/dev/null`
4306 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
4307 ac_cv_sys_long_file_names=no
4308 rm -rf "$ac_xdir" 2>/dev/null
4309 break
4310 fi
4311 rm -rf "$ac_xdir" 2>/dev/null
4312 done
4313 fi
4314 echo "$as_me:4314: result: $ac_cv_sys_long_file_names" >&5
4315 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
4316 if test "$ac_cv_sys_long_file_names" = yes; then
4317
4318 cat >>confdefs.h <<\EOF
4319 #define HAVE_LONG_FILE_NAMES 1
4320 EOF
4321
4322 fi
4323
4324 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
4325 # of package conflict.
4326 cf_config_suffix=
4327
4328 # Check whether --with-config-suffix or --without-config-suffix was given.
4329 if test "${with_config_suffix+set}" = set; then
4330 withval="$with_config_suffix"
4331 case "x$withval" in
4332 (xyes|xno)
4333 { echo "$as_me:4333: WARNING: expected a value for config-suffix option" >&5
4334 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4335 ;;
4336 (*) cf_config_suffix="$withval"
4337 ;;
4338 esac
4339 fi;
4340
4341 # If we find pkg-config, check if we should install the ".pc" files.
4342
4343 echo "$as_me:4343: checking if you want to use pkg-config" >&5
4344 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4345
4346 # Check whether --with-pkg-config or --without-pkg-config was given.
4347 if test "${with_pkg_config+set}" = set; then
4348 withval="$with_pkg_config"
4349 cf_pkg_config=$withval
4350 else
4351 cf_pkg_config=yes
4352 fi;
4353 echo "$as_me:4353: result: $cf_pkg_config" >&5
4354 echo "${ECHO_T}$cf_pkg_config" >&6
4355
4356 case "$cf_pkg_config" in
4357 (no)
4358 PKG_CONFIG=none
4359 ;;
4360 (yes)
4361
4362 if test -n "$ac_tool_prefix"; then
4363 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4364 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4365 echo "$as_me:4365: checking for $ac_word" >&5
4366 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4367 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4368 echo $ECHO_N "(cached) $ECHO_C" >&6
4369 else
4370 case $PKG_CONFIG in
4371 [\\/]* | ?:[\\/]*)
4372 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4373 ;;
4374 *)
4375 ac_save_IFS=$IFS; IFS=$ac_path_separator
4376 ac_dummy="$PATH"
4377 for ac_dir in $ac_dummy; do
4378 IFS=$ac_save_IFS
4379 test -z "$ac_dir" && ac_dir=.
4380 if $as_executable_p "$ac_dir/$ac_word"; then
4381 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4382 echo "$as_me:4382: found $ac_dir/$ac_word" >&5
4383 break
4384 fi
4385 done
4386
4387 ;;
4388 esac
4389 fi
4390 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4391
4392 if test -n "$PKG_CONFIG"; then
4393 echo "$as_me:4393: result: $PKG_CONFIG" >&5
4394 echo "${ECHO_T}$PKG_CONFIG" >&6
4395 else
4396 echo "$as_me:4396: result: no" >&5
4397 echo "${ECHO_T}no" >&6
4398 fi
4399
4400 fi
4401 if test -z "$ac_cv_path_PKG_CONFIG"; then
4402 ac_pt_PKG_CONFIG=$PKG_CONFIG
4403 # Extract the first word of "pkg-config", so it can be a program name with args.
4404 set dummy pkg-config; ac_word=$2
4405 echo "$as_me:4405: checking for $ac_word" >&5
4406 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4407 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4408 echo $ECHO_N "(cached) $ECHO_C" >&6
4409 else
4410 case $ac_pt_PKG_CONFIG in
4411 [\\/]* | ?:[\\/]*)
4412 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4413 ;;
4414 *)
4415 ac_save_IFS=$IFS; IFS=$ac_path_separator
4416 ac_dummy="$PATH"
4417 for ac_dir in $ac_dummy; do
4418 IFS=$ac_save_IFS
4419 test -z "$ac_dir" && ac_dir=.
4420 if $as_executable_p "$ac_dir/$ac_word"; then
4421 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4422 echo "$as_me:4422: found $ac_dir/$ac_word" >&5
4423 break
4424 fi
4425 done
4426
4427 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4428 ;;
4429 esac
4430 fi
4431 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4432
4433 if test -n "$ac_pt_PKG_CONFIG"; then
4434 echo "$as_me:4434: result: $ac_pt_PKG_CONFIG" >&5
4435 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4436 else
4437 echo "$as_me:4437: result: no" >&5
4438 echo "${ECHO_T}no" >&6
4439 fi
4440
4441 PKG_CONFIG=$ac_pt_PKG_CONFIG
4442 else
4443 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4444 fi
4445
4446 ;;
4447 (*)
4448 PKG_CONFIG=$withval
4449 ;;
4450 esac
4451
4452 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4453 if test "$PKG_CONFIG" != none ; then
4454
4455 if test "x$prefix" != xNONE; then
4456 cf_path_syntax="$prefix"
4457 else
4458 cf_path_syntax="$ac_default_prefix"
4459 fi
4460
4461 case "x$PKG_CONFIG" in
4462 (x\$\(*\)*|x\'*\'*)
4463 ;;
4464 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
4465 ;;
4466 (x\$\{*prefix\}*|x\$\{*dir\}*)
4467 eval PKG_CONFIG="$PKG_CONFIG"
4468 case "x$PKG_CONFIG" in
4469 (xNONE/*)
4470 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4471 ;;
4472 esac
4473 ;;
4474 (xno|xNONE/*)
4475 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4476 ;;
4477 (*)
4478 { { echo "$as_me:4478: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4479 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4480 { (exit 1); exit 1; }; }
4481 ;;
4482 esac
4483
4484 elif test "x$cf_pkg_config" != xno ; then
4485 { echo "$as_me:4485: WARNING: pkg-config is not installed" >&5
4486 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4487 fi
4488
4489 case "$PKG_CONFIG" in
4490 (no|none|yes)
4491 echo "$as_me:4491: checking for pkg-config library directory" >&5
4492 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4493 ;;
4494 (*)
4495 echo "$as_me:4495: checking for $PKG_CONFIG library directory" >&5
4496 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4497 ;;
4498 esac
4499
4500 # if $PKG_CONFIG_LIBDIR is set, try to use that
4501 if test -n "$PKG_CONFIG_PATH"; then
4502 cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
4503 elif test -n "$PKG_CONFIG_LIBDIR"; then
4504 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
4505 else
4506 cf_search_path=auto
4507 fi
4508
4509 # if the option is used, let that override. otherwise default to "libdir"
4510
4511 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4512 if test "${with_pkg_config_libdir+set}" = set; then
4513 withval="$with_pkg_config_libdir"
4514 cf_search_path=$withval
4515 else
4516 test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4517 fi;
4518
4519 case "x$cf_search_path" in
4520 (xlibdir)
4521 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4522 echo "$as_me:4522: result: $PKG_CONFIG_LIBDIR" >&5
4523 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4524 cf_search_path=
4525 ;;
4526 (x)
4527 ;;
4528 (x$GLOB_FULLPATH_POSIX\ *|x$GLOB_FULLPATH_OTHER\ *)
4529 PKG_CONFIG_LIBDIR=
4530 ;;
4531 (x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
4532 PKG_CONFIG_LIBDIR="$cf_search_path"
4533 echo "$as_me:4533: result: $PKG_CONFIG_LIBDIR" >&5
4534 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4535 cf_search_path=
4536 ;;
4537 (xyes|xauto)
4538 echo "$as_me:4538: result: auto" >&5
4539 echo "${ECHO_T}auto" >&6
4540 cf_search_path=
4541 # Look for the library directory using the same prefix as the executable
4542 echo "$as_me:4542: checking for search-list" >&5
4543 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4544 if test "x$PKG_CONFIG" != xnone
4545 then
4546 # works for pkg-config since version 0.24 (2009)
4547 # works for pkgconf since version 0.8.3 (2012)
4548 for cf_pkg_program in \
4549 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4550 pkg-config \
4551 pkgconf
4552 do
4553 cf_raw_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null`
4554 case "$cf_raw_search_path" in
4555 (*\\*)
4556 cf_search_path=`echo "$cf_raw_search_path" | tr ';' ' ' | tr '\' '/'`
4557 ;;
4558 (*/*)
4559 cf_search_path=`echo "$cf_raw_search_path" | tr : ' '`
4560 ;;
4561 esac
4562 test -n "$cf_search_path" && break
4563 done
4564
4565 # works for pkg-config since import in 2005 of original 2001 HP code.
4566 test -z "$cf_search_path" && \
4567 cf_search_path=`
4568 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4569 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4570 sub(\"^[^']*'\",\"\"); \
4571 sub(\"'.*\",\"\"); \
4572 printf \" %s\", \\$0; } \
4573 { next; } \
4574 "`
4575 fi
4576
4577 echo "$as_me:4577: result: $cf_search_path" >&5
4578 echo "${ECHO_T}$cf_search_path" >&6
4579 ;;
4580 (*)
4581 { { echo "$as_me:4581: error: Unexpected option value: $cf_search_path" >&5
4582 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4583 { (exit 1); exit 1; }; }
4584 ;;
4585 esac
4586
4587 if test -n "$cf_search_path"
4588 then
4589 echo "$as_me:4589: checking for first directory" >&5
4590 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4591 cf_pkg_config_path=none
4592 for cf_config in $cf_search_path
4593 do
4594 if test -d "$cf_config"
4595 then
4596 cf_pkg_config_path=$cf_config
4597 break
4598 fi
4599 done
4600 echo "$as_me:4600: result: $cf_pkg_config_path" >&5
4601 echo "${ECHO_T}$cf_pkg_config_path" >&6
4602
4603 if test "x$cf_pkg_config_path" != xnone ; then
4604 # limit this to the first directory found
4605 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4606 fi
4607
4608 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4609 then
4610 echo "$as_me:4610: checking for workaround" >&5
4611 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4612 if test "$prefix" = "NONE" ; then
4613 cf_prefix="$ac_default_prefix"
4614 else
4615 cf_prefix="$prefix"
4616 fi
4617 eval cf_libdir=$libdir
4618 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4619 cf_backup=
4620 for cf_config in $cf_search_path
4621 do
4622 case $cf_config in
4623 $cf_libdir/pkgconfig)
4624 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4625 break
4626 ;;
4627 *)
4628 test -z "$cf_backup" && cf_backup=$cf_config
4629 ;;
4630 esac
4631 done
4632 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4633 echo "$as_me:4633: result: $PKG_CONFIG_LIBDIR" >&5
4634 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4635 fi
4636 fi
4637
4638 if test "x$PKG_CONFIG" != xnone
4639 then
4640 echo "$as_me:4640: checking if we should install .pc files for $PKG_CONFIG" >&5
4641 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4642 else
4643 echo "$as_me:4643: checking if we should install .pc files" >&5
4644 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4645 fi
4646
4647 # Check whether --enable-pc-files or --disable-pc-files was given.
4648 if test "${enable_pc_files+set}" = set; then
4649 enableval="$enable_pc_files"
4650 enable_pc_files=$enableval
4651 else
4652 enable_pc_files=no
4653 fi;
4654 echo "$as_me:4654: result: $enable_pc_files" >&5
4655 echo "${ECHO_T}$enable_pc_files" >&6
4656
4657 if test "x$enable_pc_files" != xno
4658 then
4659 MAKE_PC_FILES=
4660 case "x$PKG_CONFIG_LIBDIR" in
4661 (xno|xnone|xyes|x)
4662 { echo "$as_me:4662: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4663 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4664 ;;
4665 (*)
4666 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4667
4668 if test "x$prefix" != xNONE; then
4669 cf_path_syntax="$prefix"
4670 else
4671 cf_path_syntax="$ac_default_prefix"
4672 fi
4673
4674 case "x$cf_pkg_config_libdir" in
4675 (x\$\(*\)*|x\'*\'*)
4676 ;;
4677 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
4678 ;;
4679 (x\$\{*prefix\}*|x\$\{*dir\}*)
4680 eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4681 case "x$cf_pkg_config_libdir" in
4682 (xNONE/*)
4683 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4684 ;;
4685 esac
4686 ;;
4687 (xno|xNONE/*)
4688 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4689 ;;
4690 (*)
4691 { { echo "$as_me:4691: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4692 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4693 { (exit 1); exit 1; }; }
4694 ;;
4695 esac
4696
4697 ;;
4698 esac
4699 else
4700 MAKE_PC_FILES="#"
4701 fi
4702
4703 if test -z "$MAKE_PC_FILES"
4704 then
4705 echo "$as_me:4705: checking for suffix to add to pkg-config files" >&5
4706 echo $ECHO_N "checking for suffix to add to pkg-config files... $ECHO_C" >&6
4707
4708 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4709 if test "${with_pc_suffix+set}" = set; then
4710 withval="$with_pc_suffix"
4711 case "x$withval" in
4712 (xyes|xno)
4713 PC_MODULE_SUFFIX=
4714 ;;
4715 (*) PC_MODULE_SUFFIX="$withval"
4716 ;;
4717 esac
4718 fi;
4719 test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4720 echo "$as_me:4720: result: $PC_MODULE_SUFFIX" >&5
4721 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4722 test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4723
4724 fi
4725
4726 echo "$as_me:4726: checking if we should assume mixed-case filenames" >&5
4727 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4728
4729 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4730 if test "${enable_mixed_case+set}" = set; then
4731 enableval="$enable_mixed_case"
4732 enable_mixedcase=$enableval
4733 else
4734 enable_mixedcase=auto
4735 fi;
4736 echo "$as_me:4736: result: $enable_mixedcase" >&5
4737 echo "${ECHO_T}$enable_mixedcase" >&6
4738 if test "$enable_mixedcase" = "auto" ; then
4739
4740 echo "$as_me:4740: checking if filesystem supports mixed-case filenames" >&5
4741 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4742 if test "${cf_cv_mixedcase+set}" = set; then
4743 echo $ECHO_N "(cached) $ECHO_C" >&6
4744 else
4745
4746 if test "$cross_compiling" = yes ; then
4747 case "$target_alias" in
4748 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4749 cf_cv_mixedcase=no
4750 ;;
4751 (*)
4752 cf_cv_mixedcase=yes
4753 ;;
4754 esac
4755 else
4756 rm -f conftest CONFTEST
4757 echo test >conftest
4758 if test -f CONFTEST ; then
4759 cf_cv_mixedcase=no
4760 else
4761 cf_cv_mixedcase=yes
4762 fi
4763 rm -f conftest CONFTEST
4764 fi
4765
4766 fi
4767 echo "$as_me:4767: result: $cf_cv_mixedcase" >&5
4768 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4769 test "$cf_cv_mixedcase" = yes &&
4770 cat >>confdefs.h <<\EOF
4771 #define MIXEDCASE_FILENAMES 1
4772 EOF
4773
4774 else
4775 cf_cv_mixedcase=$enable_mixedcase
4776 if test "x$enable_mixedcase" = "xyes" ; then
4777
4778 cat >>confdefs.h <<\EOF
4779 #define MIXEDCASE_FILENAMES 1
4780 EOF
4781
4782 fi
4783 fi
4784
4785 # do this after mixed-case option (tags/TAGS is not as important as tic).
4786 echo "$as_me:4786: checking whether ${MAKE-make} sets \${MAKE}" >&5
4787 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4788 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4789 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4790 echo $ECHO_N "(cached) $ECHO_C" >&6
4791 else
4792 cat >conftest.make <<\EOF
4793 all:
4794 @echo 'ac_maketemp="${MAKE}"'
4795 EOF
4796 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4797 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4798 if test -n "$ac_maketemp"; then
4799 eval ac_cv_prog_make_${ac_make}_set=yes
4800 else
4801 eval ac_cv_prog_make_${ac_make}_set=no
4802 fi
4803 rm -f conftest.make
4804 fi
4805 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4806 echo "$as_me:4806: result: yes" >&5
4807 echo "${ECHO_T}yes" >&6
4808 SET_MAKE=
4809 else
4810 echo "$as_me:4810: result: no" >&5
4811 echo "${ECHO_T}no" >&6
4812 SET_MAKE="MAKE=${MAKE-make}"
4813 fi
4814
4815 echo "$as_me:4815: checking for \".PHONY\" make-support" >&5
4816 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4817 if test "${cf_cv_make_PHONY+set}" = set; then
4818 echo $ECHO_N "(cached) $ECHO_C" >&6
4819 else
4820
4821 rm -rf conftest*
4822 (
4823 mkdir conftest || exit 1
4824 cd conftest
4825 cat >makefile <<'CF_EOF'
4826 .PHONY: always
4827 DATA=0
4828 always: always.out
4829 @echo "** making $@ $(DATA)"
4830 once: once.out
4831 @echo "** making $@ $(DATA)"
4832 always.out:
4833 @echo "** making $@ $(DATA)"
4834 echo $(DATA) > $@
4835 once.out:
4836 @echo "** making $@ $(DATA)"
4837 echo $(DATA) > $@
4838 CF_EOF
4839 for cf_data in 1 2 3
4840 do
4841 ${MAKE:-make} always DATA=$cf_data
4842 ${MAKE:-make} once DATA=$cf_data
4843 ${MAKE:-make} -t always once
4844 if test -f always ; then
4845 echo "no (case 1)" > ../conftest.tmp
4846 elif test ! -f always.out ; then
4847 echo "no (case 2)" > ../conftest.tmp
4848 elif test ! -f once.out ; then
4849 echo "no (case 3)" > ../conftest.tmp
4850 elif ! cmp -s always.out once.out ; then
4851 echo "no (case 4)" > ../conftest.tmp
4852 diff always.out once.out
4853 else
4854 cf_check="`cat always.out`"
4855 if test "x$cf_check" != "x$cf_data" ; then
4856 echo "no (case 5)" > ../conftest.tmp
4857 else
4858 echo yes > ../conftest.tmp
4859 rm -f ./*.out
4860 continue
4861 fi
4862 fi
4863 break
4864 done
4865 ) >&5 2>&1
4866 cf_cv_make_PHONY="`cat conftest.tmp`"
4867 rm -rf conftest*
4868
4869 fi
4870 echo "$as_me:4870: result: $cf_cv_make_PHONY" >&5
4871 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4872 MAKE_NO_PHONY="#"
4873 MAKE_PHONY="#"
4874 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4875 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4876
4877 for ac_prog in exctags ctags
4878 do
4879 # Extract the first word of "$ac_prog", so it can be a program name with args.
4880 set dummy $ac_prog; ac_word=$2
4881 echo "$as_me:4881: checking for $ac_word" >&5
4882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4883 if test "${ac_cv_prog_CTAGS+set}" = set; then
4884 echo $ECHO_N "(cached) $ECHO_C" >&6
4885 else
4886 if test -n "$CTAGS"; then
4887 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4888 else
4889 ac_save_IFS=$IFS; IFS=$ac_path_separator
4890 ac_dummy="$PATH"
4891 for ac_dir in $ac_dummy; do
4892 IFS=$ac_save_IFS
4893 test -z "$ac_dir" && ac_dir=.
4894 $as_executable_p "$ac_dir/$ac_word" || continue
4895 ac_cv_prog_CTAGS="$ac_prog"
4896 echo "$as_me:4896: found $ac_dir/$ac_word" >&5
4897 break
4898 done
4899
4900 fi
4901 fi
4902 CTAGS=$ac_cv_prog_CTAGS
4903 if test -n "$CTAGS"; then
4904 echo "$as_me:4904: result: $CTAGS" >&5
4905 echo "${ECHO_T}$CTAGS" >&6
4906 else
4907 echo "$as_me:4907: result: no" >&5
4908 echo "${ECHO_T}no" >&6
4909 fi
4910
4911 test -n "$CTAGS" && break
4912 done
4913
4914 for ac_prog in exetags etags
4915 do
4916 # Extract the first word of "$ac_prog", so it can be a program name with args.
4917 set dummy $ac_prog; ac_word=$2
4918 echo "$as_me:4918: checking for $ac_word" >&5
4919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4920 if test "${ac_cv_prog_ETAGS+set}" = set; then
4921 echo $ECHO_N "(cached) $ECHO_C" >&6
4922 else
4923 if test -n "$ETAGS"; then
4924 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4925 else
4926 ac_save_IFS=$IFS; IFS=$ac_path_separator
4927 ac_dummy="$PATH"
4928 for ac_dir in $ac_dummy; do
4929 IFS=$ac_save_IFS
4930 test -z "$ac_dir" && ac_dir=.
4931 $as_executable_p "$ac_dir/$ac_word" || continue
4932 ac_cv_prog_ETAGS="$ac_prog"
4933 echo "$as_me:4933: found $ac_dir/$ac_word" >&5
4934 break
4935 done
4936
4937 fi
4938 fi
4939 ETAGS=$ac_cv_prog_ETAGS
4940 if test -n "$ETAGS"; then
4941 echo "$as_me:4941: result: $ETAGS" >&5
4942 echo "${ECHO_T}$ETAGS" >&6
4943 else
4944 echo "$as_me:4944: result: no" >&5
4945 echo "${ECHO_T}no" >&6
4946 fi
4947
4948 test -n "$ETAGS" && break
4949 done
4950
4951 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4952 set dummy ${CTAGS:-ctags}; ac_word=$2
4953 echo "$as_me:4953: checking for $ac_word" >&5
4954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4955 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4956 echo $ECHO_N "(cached) $ECHO_C" >&6
4957 else
4958 if test -n "$MAKE_LOWER_TAGS"; then
4959 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4960 else
4961 ac_save_IFS=$IFS; IFS=$ac_path_separator
4962 ac_dummy="$PATH"
4963 for ac_dir in $ac_dummy; do
4964 IFS=$ac_save_IFS
4965 test -z "$ac_dir" && ac_dir=.
4966 $as_executable_p "$ac_dir/$ac_word" || continue
4967 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4968 echo "$as_me:4968: found $ac_dir/$ac_word" >&5
4969 break
4970 done
4971
4972 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4973 fi
4974 fi
4975 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4976 if test -n "$MAKE_LOWER_TAGS"; then
4977 echo "$as_me:4977: result: $MAKE_LOWER_TAGS" >&5
4978 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4979 else
4980 echo "$as_me:4980: result: no" >&5
4981 echo "${ECHO_T}no" >&6
4982 fi
4983
4984 if test "$cf_cv_mixedcase" = yes ; then
4985 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4986 set dummy ${ETAGS:-etags}; ac_word=$2
4987 echo "$as_me:4987: checking for $ac_word" >&5
4988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4989 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4990 echo $ECHO_N "(cached) $ECHO_C" >&6
4991 else
4992 if test -n "$MAKE_UPPER_TAGS"; then
4993 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4994 else
4995 ac_save_IFS=$IFS; IFS=$ac_path_separator
4996 ac_dummy="$PATH"
4997 for ac_dir in $ac_dummy; do
4998 IFS=$ac_save_IFS
4999 test -z "$ac_dir" && ac_dir=.
5000 $as_executable_p "$ac_dir/$ac_word" || continue
5001 ac_cv_prog_MAKE_UPPER_TAGS="yes"
5002 echo "$as_me:5002: found $ac_dir/$ac_word" >&5
5003 break
5004 done
5005
5006 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
5007 fi
5008 fi
5009 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
5010 if test -n "$MAKE_UPPER_TAGS"; then
5011 echo "$as_me:5011: result: $MAKE_UPPER_TAGS" >&5
5012 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
5013 else
5014 echo "$as_me:5014: result: no" >&5
5015 echo "${ECHO_T}no" >&6
5016 fi
5017
5018 else
5019 MAKE_UPPER_TAGS=no
5020 fi
5021
5022 if test "$MAKE_UPPER_TAGS" = yes ; then
5023 MAKE_UPPER_TAGS=
5024 else
5025 MAKE_UPPER_TAGS="#"
5026 fi
5027
5028 if test "$MAKE_LOWER_TAGS" = yes ; then
5029 MAKE_LOWER_TAGS=
5030 else
5031 MAKE_LOWER_TAGS="#"
5032 fi
5033
5034 if test -n "$ac_tool_prefix"; then
5035 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5036 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5037 echo "$as_me:5037: checking for $ac_word" >&5
5038 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5039 if test "${ac_cv_prog_RANLIB+set}" = set; then
5040 echo $ECHO_N "(cached) $ECHO_C" >&6
5041 else
5042 if test -n "$RANLIB"; then
5043 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5044 else
5045 ac_save_IFS=$IFS; IFS=$ac_path_separator
5046 ac_dummy="$PATH"
5047 for ac_dir in $ac_dummy; do
5048 IFS=$ac_save_IFS
5049 test -z "$ac_dir" && ac_dir=.
5050 $as_executable_p "$ac_dir/$ac_word" || continue
5051 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5052 echo "$as_me:5052: found $ac_dir/$ac_word" >&5
5053 break
5054 done
5055
5056 fi
5057 fi
5058 RANLIB=$ac_cv_prog_RANLIB
5059 if test -n "$RANLIB"; then
5060 echo "$as_me:5060: result: $RANLIB" >&5
5061 echo "${ECHO_T}$RANLIB" >&6
5062 else
5063 echo "$as_me:5063: result: no" >&5
5064 echo "${ECHO_T}no" >&6
5065 fi
5066
5067 fi
5068 if test -z "$ac_cv_prog_RANLIB"; then
5069 ac_ct_RANLIB=$RANLIB
5070 # Extract the first word of "ranlib", so it can be a program name with args.
5071 set dummy ranlib; ac_word=$2
5072 echo "$as_me:5072: checking for $ac_word" >&5
5073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5074 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5075 echo $ECHO_N "(cached) $ECHO_C" >&6
5076 else
5077 if test -n "$ac_ct_RANLIB"; then
5078 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5079 else
5080 ac_save_IFS=$IFS; IFS=$ac_path_separator
5081 ac_dummy="$PATH"
5082 for ac_dir in $ac_dummy; do
5083 IFS=$ac_save_IFS
5084 test -z "$ac_dir" && ac_dir=.
5085 $as_executable_p "$ac_dir/$ac_word" || continue
5086 ac_cv_prog_ac_ct_RANLIB="ranlib"
5087 echo "$as_me:5087: found $ac_dir/$ac_word" >&5
5088 break
5089 done
5090
5091 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
5092 fi
5093 fi
5094 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5095 if test -n "$ac_ct_RANLIB"; then
5096 echo "$as_me:5096: result: $ac_ct_RANLIB" >&5
5097 echo "${ECHO_T}$ac_ct_RANLIB" >&6
5098 else
5099 echo "$as_me:5099: result: no" >&5
5100 echo "${ECHO_T}no" >&6
5101 fi
5102
5103 RANLIB=$ac_ct_RANLIB
5104 else
5105 RANLIB="$ac_cv_prog_RANLIB"
5106 fi
5107
5108 if test -n "$ac_tool_prefix"; then
5109 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
5110 set dummy ${ac_tool_prefix}ld; ac_word=$2
5111 echo "$as_me:5111: checking for $ac_word" >&5
5112 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5113 if test "${ac_cv_prog_LD+set}" = set; then
5114 echo $ECHO_N "(cached) $ECHO_C" >&6
5115 else
5116 if test -n "$LD"; then
5117 ac_cv_prog_LD="$LD" # Let the user override the test.
5118 else
5119 ac_save_IFS=$IFS; IFS=$ac_path_separator
5120 ac_dummy="$PATH"
5121 for ac_dir in $ac_dummy; do
5122 IFS=$ac_save_IFS
5123 test -z "$ac_dir" && ac_dir=.
5124 $as_executable_p "$ac_dir/$ac_word" || continue
5125 ac_cv_prog_LD="${ac_tool_prefix}ld"
5126 echo "$as_me:5126: found $ac_dir/$ac_word" >&5
5127 break
5128 done
5129
5130 fi
5131 fi
5132 LD=$ac_cv_prog_LD
5133 if test -n "$LD"; then
5134 echo "$as_me:5134: result: $LD" >&5
5135 echo "${ECHO_T}$LD" >&6
5136 else
5137 echo "$as_me:5137: result: no" >&5
5138 echo "${ECHO_T}no" >&6
5139 fi
5140
5141 fi
5142 if test -z "$ac_cv_prog_LD"; then
5143 ac_ct_LD=$LD
5144 # Extract the first word of "ld", so it can be a program name with args.
5145 set dummy ld; ac_word=$2
5146 echo "$as_me:5146: checking for $ac_word" >&5
5147 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5148 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
5149 echo $ECHO_N "(cached) $ECHO_C" >&6
5150 else
5151 if test -n "$ac_ct_LD"; then
5152 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
5153 else
5154 ac_save_IFS=$IFS; IFS=$ac_path_separator
5155 ac_dummy="$PATH"
5156 for ac_dir in $ac_dummy; do
5157 IFS=$ac_save_IFS
5158 test -z "$ac_dir" && ac_dir=.
5159 $as_executable_p "$ac_dir/$ac_word" || continue
5160 ac_cv_prog_ac_ct_LD="ld"
5161 echo "$as_me:5161: found $ac_dir/$ac_word" >&5
5162 break
5163 done
5164
5165 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
5166 fi
5167 fi
5168 ac_ct_LD=$ac_cv_prog_ac_ct_LD
5169 if test -n "$ac_ct_LD"; then
5170 echo "$as_me:5170: result: $ac_ct_LD" >&5
5171 echo "${ECHO_T}$ac_ct_LD" >&6
5172 else
5173 echo "$as_me:5173: result: no" >&5
5174 echo "${ECHO_T}no" >&6
5175 fi
5176
5177 LD=$ac_ct_LD
5178 else
5179 LD="$ac_cv_prog_LD"
5180 fi
5181
5182 if test -n "$ac_tool_prefix"; then
5183 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5184 set dummy ${ac_tool_prefix}ar; ac_word=$2
5185 echo "$as_me:5185: checking for $ac_word" >&5
5186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5187 if test "${ac_cv_prog_AR+set}" = set; then
5188 echo $ECHO_N "(cached) $ECHO_C" >&6
5189 else
5190 if test -n "$AR"; then
5191 ac_cv_prog_AR="$AR" # Let the user override the test.
5192 else
5193 ac_save_IFS=$IFS; IFS=$ac_path_separator
5194 ac_dummy="$PATH"
5195 for ac_dir in $ac_dummy; do
5196 IFS=$ac_save_IFS
5197 test -z "$ac_dir" && ac_dir=.
5198 $as_executable_p "$ac_dir/$ac_word" || continue
5199 ac_cv_prog_AR="${ac_tool_prefix}ar"
5200 echo "$as_me:5200: found $ac_dir/$ac_word" >&5
5201 break
5202 done
5203
5204 fi
5205 fi
5206 AR=$ac_cv_prog_AR
5207 if test -n "$AR"; then
5208 echo "$as_me:5208: result: $AR" >&5
5209 echo "${ECHO_T}$AR" >&6
5210 else
5211 echo "$as_me:5211: result: no" >&5
5212 echo "${ECHO_T}no" >&6
5213 fi
5214
5215 fi
5216 if test -z "$ac_cv_prog_AR"; then
5217 ac_ct_AR=$AR
5218 # Extract the first word of "ar", so it can be a program name with args.
5219 set dummy ar; ac_word=$2
5220 echo "$as_me:5220: checking for $ac_word" >&5
5221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5222 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5223 echo $ECHO_N "(cached) $ECHO_C" >&6
5224 else
5225 if test -n "$ac_ct_AR"; then
5226 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5227 else
5228 ac_save_IFS=$IFS; IFS=$ac_path_separator
5229 ac_dummy="$PATH"
5230 for ac_dir in $ac_dummy; do
5231 IFS=$ac_save_IFS
5232 test -z "$ac_dir" && ac_dir=.
5233 $as_executable_p "$ac_dir/$ac_word" || continue
5234 ac_cv_prog_ac_ct_AR="ar"
5235 echo "$as_me:5235: found $ac_dir/$ac_word" >&5
5236 break
5237 done
5238
5239 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5240 fi
5241 fi
5242 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5243 if test -n "$ac_ct_AR"; then
5244 echo "$as_me:5244: result: $ac_ct_AR" >&5
5245 echo "${ECHO_T}$ac_ct_AR" >&6
5246 else
5247 echo "$as_me:5247: result: no" >&5
5248 echo "${ECHO_T}no" >&6
5249 fi
5250
5251 AR=$ac_ct_AR
5252 else
5253 AR="$ac_cv_prog_AR"
5254 fi
5255
5256 if test -n "$ac_tool_prefix"; then
5257 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
5258 set dummy ${ac_tool_prefix}nm; ac_word=$2
5259 echo "$as_me:5259: checking for $ac_word" >&5
5260 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5261 if test "${ac_cv_prog_NM+set}" = set; then
5262 echo $ECHO_N "(cached) $ECHO_C" >&6
5263 else
5264 if test -n "$NM"; then
5265 ac_cv_prog_NM="$NM" # Let the user override the test.
5266 else
5267 ac_save_IFS=$IFS; IFS=$ac_path_separator
5268 ac_dummy="$PATH"
5269 for ac_dir in $ac_dummy; do
5270 IFS=$ac_save_IFS
5271 test -z "$ac_dir" && ac_dir=.
5272 $as_executable_p "$ac_dir/$ac_word" || continue
5273 ac_cv_prog_NM="${ac_tool_prefix}nm"
5274 echo "$as_me:5274: found $ac_dir/$ac_word" >&5
5275 break
5276 done
5277
5278 fi
5279 fi
5280 NM=$ac_cv_prog_NM
5281 if test -n "$NM"; then
5282 echo "$as_me:5282: result: $NM" >&5
5283 echo "${ECHO_T}$NM" >&6
5284 else
5285 echo "$as_me:5285: result: no" >&5
5286 echo "${ECHO_T}no" >&6
5287 fi
5288
5289 fi
5290 if test -z "$ac_cv_prog_NM"; then
5291 ac_ct_NM=$NM
5292 # Extract the first word of "nm", so it can be a program name with args.
5293 set dummy nm; ac_word=$2
5294 echo "$as_me:5294: checking for $ac_word" >&5
5295 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5296 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5297 echo $ECHO_N "(cached) $ECHO_C" >&6
5298 else
5299 if test -n "$ac_ct_NM"; then
5300 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5301 else
5302 ac_save_IFS=$IFS; IFS=$ac_path_separator
5303 ac_dummy="$PATH"
5304 for ac_dir in $ac_dummy; do
5305 IFS=$ac_save_IFS
5306 test -z "$ac_dir" && ac_dir=.
5307 $as_executable_p "$ac_dir/$ac_word" || continue
5308 ac_cv_prog_ac_ct_NM="nm"
5309 echo "$as_me:5309: found $ac_dir/$ac_word" >&5
5310 break
5311 done
5312
5313 test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5314 fi
5315 fi
5316 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5317 if test -n "$ac_ct_NM"; then
5318 echo "$as_me:5318: result: $ac_ct_NM" >&5
5319 echo "${ECHO_T}$ac_ct_NM" >&6
5320 else
5321 echo "$as_me:5321: result: no" >&5
5322 echo "${ECHO_T}no" >&6
5323 fi
5324
5325 NM=$ac_ct_NM
5326 else
5327 NM="$ac_cv_prog_NM"
5328 fi
5329
5330 if test -n "$ac_tool_prefix"; then
5331 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5332 set dummy ${ac_tool_prefix}ar; ac_word=$2
5333 echo "$as_me:5333: checking for $ac_word" >&5
5334 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5335 if test "${ac_cv_prog_AR+set}" = set; then
5336 echo $ECHO_N "(cached) $ECHO_C" >&6
5337 else
5338 if test -n "$AR"; then
5339 ac_cv_prog_AR="$AR" # Let the user override the test.
5340 else
5341 ac_save_IFS=$IFS; IFS=$ac_path_separator
5342 ac_dummy="$PATH"
5343 for ac_dir in $ac_dummy; do
5344 IFS=$ac_save_IFS
5345 test -z "$ac_dir" && ac_dir=.
5346 $as_executable_p "$ac_dir/$ac_word" || continue
5347 ac_cv_prog_AR="${ac_tool_prefix}ar"
5348 echo "$as_me:5348: found $ac_dir/$ac_word" >&5
5349 break
5350 done
5351
5352 fi
5353 fi
5354 AR=$ac_cv_prog_AR
5355 if test -n "$AR"; then
5356 echo "$as_me:5356: result: $AR" >&5
5357 echo "${ECHO_T}$AR" >&6
5358 else
5359 echo "$as_me:5359: result: no" >&5
5360 echo "${ECHO_T}no" >&6
5361 fi
5362
5363 fi
5364 if test -z "$ac_cv_prog_AR"; then
5365 ac_ct_AR=$AR
5366 # Extract the first word of "ar", so it can be a program name with args.
5367 set dummy ar; ac_word=$2
5368 echo "$as_me:5368: checking for $ac_word" >&5
5369 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5370 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5371 echo $ECHO_N "(cached) $ECHO_C" >&6
5372 else
5373 if test -n "$ac_ct_AR"; then
5374 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5375 else
5376 ac_save_IFS=$IFS; IFS=$ac_path_separator
5377 ac_dummy="$PATH"
5378 for ac_dir in $ac_dummy; do
5379 IFS=$ac_save_IFS
5380 test -z "$ac_dir" && ac_dir=.
5381 $as_executable_p "$ac_dir/$ac_word" || continue
5382 ac_cv_prog_ac_ct_AR="ar"
5383 echo "$as_me:5383: found $ac_dir/$ac_word" >&5
5384 break
5385 done
5386
5387 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5388 fi
5389 fi
5390 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5391 if test -n "$ac_ct_AR"; then
5392 echo "$as_me:5392: result: $ac_ct_AR" >&5
5393 echo "${ECHO_T}$ac_ct_AR" >&6
5394 else
5395 echo "$as_me:5395: result: no" >&5
5396 echo "${ECHO_T}no" >&6
5397 fi
5398
5399 AR=$ac_ct_AR
5400 else
5401 AR="$ac_cv_prog_AR"
5402 fi
5403
5404 echo "$as_me:5404: checking for options to update archives" >&5
5405 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5406 if test "${cf_cv_ar_flags+set}" = set; then
5407 echo $ECHO_N "(cached) $ECHO_C" >&6
5408 else
5409
5410 case "$cf_cv_system_name" in
5411 (*-msvc*)
5412 cf_cv_ar_flags=''
5413 cat >mk_static_lib.sh <<-EOF
5414 #!$SHELL
5415 MSVC_BIN="$AR"
5416 out="\$1"
5417 shift
5418 exec \$MSVC_BIN -out:"\$out" \$@
5419 EOF
5420 chmod +x mk_static_lib.sh
5421 AR=`pwd`/mk_static_lib.sh
5422 ;;
5423 (*)
5424 cf_cv_ar_flags=unknown
5425 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5426 do
5427
5428 # check if $ARFLAGS already contains this choice
5429 if test "x$ARFLAGS" != "x" ; then
5430 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5431 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5432 cf_cv_ar_flags=
5433 break
5434 fi
5435 fi
5436
5437 rm -f "conftest.$ac_cv_objext"
5438 rm -f conftest.a
5439
5440 cat >"conftest.$ac_ext" <<EOF
5441 #line 5441 "configure"
5442 int testdata[3] = { 123, 456, 789 };
5443 EOF
5444 if { (eval echo "$as_me:5444: \"$ac_compile\"") >&5
5445 (eval $ac_compile) 2>&5
5446 ac_status=$?
5447 echo "$as_me:5447: \$? = $ac_status" >&5
5448 (exit "$ac_status"); } ; then
5449 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5450 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5451 if test -f conftest.a ; then
5452 cf_cv_ar_flags="$cf_ar_flags"
5453 break
5454 fi
5455 else
5456 test -n "$verbose" && echo " cannot compile test-program" 1>&6
5457
5458 echo "${as_me:-configure}:5458: testing cannot compile test-program ..." 1>&5
5459
5460 break
5461 fi
5462 done
5463 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5464 ;;
5465 esac
5466
5467 fi
5468 echo "$as_me:5468: result: $cf_cv_ar_flags" >&5
5469 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5470
5471 if test -n "$ARFLAGS" ; then
5472 if test -n "$cf_cv_ar_flags" ; then
5473 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5474 fi
5475 else
5476 ARFLAGS=$cf_cv_ar_flags
5477 fi
5478
5479 echo "$as_me:5479: checking for an installation directory prefix" >&5
5480 echo $ECHO_N "checking for an installation directory prefix... $ECHO_C" >&6
5481
5482 # Check whether --with-install-prefix or --without-install-prefix was given.
5483 if test "${with_install_prefix+set}" = set; then
5484 withval="$with_install_prefix"
5485 case "x$withval" in
5486 (xyes|xno)
5487 ;;
5488 (*) DESTDIR="$withval"
5489 ;;
5490 esac
5491 fi;
5492 echo "$as_me:5492: result: ${DESTDIR:-(none)}" >&5
5493 echo "${ECHO_T}${DESTDIR:-(none)}" >&6
5494
5495 SET_DESTDIR=
5496 test -n "$DESTDIR" && SET_DESTDIR="DESTDIR=$DESTDIR"
5497
5498 echo "$as_me:5498: checking if installation directory prefix should be merged" >&5
5499 echo $ECHO_N "checking if installation directory prefix should be merged... $ECHO_C" >&6
5500
5501 # Check whether --enable-install-prefix or --disable-install-prefix was given.
5502 if test "${enable_install_prefix+set}" = set; then
5503 enableval="$enable_install_prefix"
5504 test "$enableval" != yes && enableval=no
5505 if test "$enableval" != "no" ; then
5506 cf_install_prefix=yes
5507 else
5508 cf_install_prefix=no
5509 fi
5510 else
5511 enableval=no
5512 cf_install_prefix=no
5513
5514 fi;
5515 echo "$as_me:5515: result: $cf_install_prefix" >&5
5516 echo "${ECHO_T}$cf_install_prefix" >&6
5517
5518 if test "$cf_install_prefix" = yes ; then
5519 MERGE_PREFIX=':$(prefix)%=%'
5520 else
5521 MERGE_PREFIX=''
5522 fi
5523
5524 ###############################################################################
5525
5526 # If we're cross-compiling, allow the user to override the tools and their
5527 # options. The configure script is oriented toward identifying the host
5528 # compiler, etc., but we need a build compiler to generate parts of the source.
5529
5530 case "$cf_cv_system_name" in
5531 (*-msvc*)
5532 LDFLAGS="$LDFLAGS user32.lib"
5533 export LDFLAGS
5534 ;;
5535 esac
5536
5537 if test "$cross_compiling" = yes ; then
5538
5539 # defaults that we might want to override
5540 : ${BUILD_CFLAGS:=''}
5541 : ${BUILD_CPPFLAGS:=''}
5542 : ${BUILD_LDFLAGS:=''}
5543 : ${BUILD_LIBS:=''}
5544 : ${BUILD_EXEEXT:='$x'}
5545 : ${BUILD_OBJEXT:='o'}
5546
5547 # Check whether --with-build-cc or --without-build-cc was given.
5548 if test "${with_build_cc+set}" = set; then
5549 withval="$with_build_cc"
5550 BUILD_CC="$withval"
5551 else
5552 for ac_prog in gcc clang c99 c89 cc cl
5553 do
5554 # Extract the first word of "$ac_prog", so it can be a program name with args.
5555 set dummy $ac_prog; ac_word=$2
5556 echo "$as_me:5556: checking for $ac_word" >&5
5557 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5558 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5559 echo $ECHO_N "(cached) $ECHO_C" >&6
5560 else
5561 if test -n "$BUILD_CC"; then
5562 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5563 else
5564 ac_save_IFS=$IFS; IFS=$ac_path_separator
5565 ac_dummy="$PATH"
5566 for ac_dir in $ac_dummy; do
5567 IFS=$ac_save_IFS
5568 test -z "$ac_dir" && ac_dir=.
5569 $as_executable_p "$ac_dir/$ac_word" || continue
5570 ac_cv_prog_BUILD_CC="$ac_prog"
5571 echo "$as_me:5571: found $ac_dir/$ac_word" >&5
5572 break
5573 done
5574
5575 fi
5576 fi
5577 BUILD_CC=$ac_cv_prog_BUILD_CC
5578 if test -n "$BUILD_CC"; then
5579 echo "$as_me:5579: result: $BUILD_CC" >&5
5580 echo "${ECHO_T}$BUILD_CC" >&6
5581 else
5582 echo "$as_me:5582: result: no" >&5
5583 echo "${ECHO_T}no" >&6
5584 fi
5585
5586 test -n "$BUILD_CC" && break
5587 done
5588 test -n "$BUILD_CC" || BUILD_CC="none"
5589
5590 fi;
5591 echo "$as_me:5591: checking for native build C compiler" >&5
5592 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5593 echo "$as_me:5593: result: $BUILD_CC" >&5
5594 echo "${ECHO_T}$BUILD_CC" >&6
5595
5596 echo "$as_me:5596: checking for native build C preprocessor" >&5
5597 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5598
5599 # Check whether --with-build-cpp or --without-build-cpp was given.
5600 if test "${with_build_cpp+set}" = set; then
5601 withval="$with_build_cpp"
5602 BUILD_CPP="$withval"
5603 else
5604 BUILD_CPP='${BUILD_CC} -E'
5605 fi;
5606 echo "$as_me:5606: result: $BUILD_CPP" >&5
5607 echo "${ECHO_T}$BUILD_CPP" >&6
5608
5609 echo "$as_me:5609: checking for native build C flags" >&5
5610 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5611
5612 # Check whether --with-build-cflags or --without-build-cflags was given.
5613 if test "${with_build_cflags+set}" = set; then
5614 withval="$with_build_cflags"
5615 BUILD_CFLAGS="$withval"
5616 fi;
5617 echo "$as_me:5617: result: $BUILD_CFLAGS" >&5
5618 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5619
5620 echo "$as_me:5620: checking for native build C preprocessor-flags" >&5
5621 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5622
5623 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5624 if test "${with_build_cppflags+set}" = set; then
5625 withval="$with_build_cppflags"
5626 BUILD_CPPFLAGS="$withval"
5627 fi;
5628 echo "$as_me:5628: result: $BUILD_CPPFLAGS" >&5
5629 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5630
5631 echo "$as_me:5631: checking for native build linker-flags" >&5
5632 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5633
5634 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5635 if test "${with_build_ldflags+set}" = set; then
5636 withval="$with_build_ldflags"
5637 BUILD_LDFLAGS="$withval"
5638 fi;
5639 echo "$as_me:5639: result: $BUILD_LDFLAGS" >&5
5640 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5641
5642 echo "$as_me:5642: checking for native build linker-libraries" >&5
5643 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5644
5645 # Check whether --with-build-libs or --without-build-libs was given.
5646 if test "${with_build_libs+set}" = set; then
5647 withval="$with_build_libs"
5648 BUILD_LIBS="$withval"
5649 fi;
5650 echo "$as_me:5650: result: $BUILD_LIBS" >&5
5651 echo "${ECHO_T}$BUILD_LIBS" >&6
5652
5653 # this assumes we're on Unix.
5654 BUILD_EXEEXT=
5655 BUILD_OBJEXT=o
5656
5657 : ${BUILD_CC:='${CC}'}
5658
5659 echo "$as_me:5659: checking if the build-compiler \"$BUILD_CC\" works" >&5
5660 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5661
5662 cf_save_crossed=$cross_compiling
5663 cf_save_ac_link=$ac_link
5664 cross_compiling=no
5665 cf_build_cppflags=$BUILD_CPPFLAGS
5666 test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5667 ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5668
5669 if test "$cross_compiling" = yes; then
5670 cf_ok_build_cc=unknown
5671 else
5672 cat >"conftest.$ac_ext" <<_ACEOF
5673 #line 5673 "configure"
5674 #include "confdefs.h"
5675 #include <stdio.h>
5676 int main(int argc, char *argv[])
5677 {
5678 ${cf_cv_main_return:-return}(argc < 0 || argv == (void*)0 || argv[0] == (void*)0);
5679 }
5680
5681 _ACEOF
5682 rm -f "conftest$ac_exeext"
5683 if { (eval echo "$as_me:5683: \"$ac_link\"") >&5
5684 (eval $ac_link) 2>&5
5685 ac_status=$?
5686 echo "$as_me:5686: \$? = $ac_status" >&5
5687 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5688 { (eval echo "$as_me:5688: \"$ac_try\"") >&5
5689 (eval $ac_try) 2>&5
5690 ac_status=$?
5691 echo "$as_me:5691: \$? = $ac_status" >&5
5692 (exit "$ac_status"); }; }; then
5693 cf_ok_build_cc=yes
5694 else
5695 echo "$as_me: program exited with status $ac_status" >&5
5696 echo "$as_me: failed program was:" >&5
5697 cat "conftest.$ac_ext" >&5
5698 cf_ok_build_cc=no
5699 fi
5700 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5701 fi
5702
5703 cross_compiling=$cf_save_crossed
5704 ac_link=$cf_save_ac_link
5705
5706 echo "$as_me:5706: result: $cf_ok_build_cc" >&5
5707 echo "${ECHO_T}$cf_ok_build_cc" >&6
5708
5709 if test "$cf_ok_build_cc" != yes
5710 then
5711 { { echo "$as_me:5711: error: Cross-build requires two compilers.
5712 Use --with-build-cc to specify the native compiler." >&5
5713 echo "$as_me: error: Cross-build requires two compilers.
5714 Use --with-build-cc to specify the native compiler." >&2;}
5715 { (exit 1); exit 1; }; }
5716 fi
5717
5718 else
5719 : ${BUILD_CC:='${CC}'}
5720 : ${BUILD_CPP:='${CPP}'}
5721 : ${BUILD_CFLAGS:='${CFLAGS}'}
5722 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5723 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5724 : ${BUILD_LIBS:='${LIBS}'}
5725 : ${BUILD_EXEEXT:='$x'}
5726 : ${BUILD_OBJEXT:='o'}
5727 fi
5728
5729 ###############################################################################
5730
5731 ### Options to allow the user to specify the set of libraries which are used.
5732 ### Use "--without-normal --with-shared" to allow the default model to be
5733 ### shared, for example.
5734 cf_list_models=""
5735
5736 echo "$as_me:5736: checking if libtool -version-number should be used" >&5
5737 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5738
5739 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5740 if test "${enable_libtool_version+set}" = set; then
5741 enableval="$enable_libtool_version"
5742 test "$enableval" != no && enableval=yes
5743 if test "$enableval" != "yes" ; then
5744 cf_libtool_version=no
5745 else
5746 cf_libtool_version=yes
5747 fi
5748 else
5749 enableval=yes
5750 cf_libtool_version=yes
5751
5752 fi;
5753 echo "$as_me:5753: result: $cf_libtool_version" >&5
5754 echo "${ECHO_T}$cf_libtool_version" >&6
5755
5756 if test "$cf_libtool_version" = yes ; then
5757 LIBTOOL_VERSION="-version-number"
5758 else
5759 LIBTOOL_VERSION="-version-info"
5760 case "x$VERSION" in
5761 (x)
5762 { echo "$as_me:5762: WARNING: VERSION was not set" >&5
5763 echo "$as_me: WARNING: VERSION was not set" >&2;}
5764 ;;
5765 (x*.*.*)
5766 ABI_VERSION="$VERSION"
5767 test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6
5768
5769 echo "${as_me:-configure}:5769: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5770
5771 ;;
5772 (x*:*:*)
5773 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5774 test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6
5775
5776 echo "${as_me:-configure}:5776: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5777
5778 ;;
5779 (*)
5780 { echo "$as_me:5780: WARNING: unexpected VERSION value: $VERSION" >&5
5781 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5782 ;;
5783 esac
5784 fi
5785
5786 LIBTOOL=
5787
5788 # common library maintenance symbols that are convenient for libtool scripts:
5789 LIB_CREATE='${AR} -cr'
5790 LIB_OBJECT='${OBJECTS}'
5791 LIB_SUFFIX=.a
5792 LIB_PREP="$RANLIB"
5793
5794 # symbols used to prop libtool up to enable it to determine what it should be
5795 # doing:
5796 LIB_CLEAN=
5797 LIB_COMPILE=
5798 LIB_LINK='${CC}'
5799 LIB_INSTALL=
5800 LIB_UNINSTALL=
5801
5802 echo "$as_me:5802: checking if you want to build libraries with libtool" >&5
5803 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5804
5805 # Check whether --with-libtool or --without-libtool was given.
5806 if test "${with_libtool+set}" = set; then
5807 withval="$with_libtool"
5808 with_libtool=$withval
5809 else
5810 with_libtool=no
5811 fi;
5812 echo "$as_me:5812: result: $with_libtool" >&5
5813 echo "${ECHO_T}$with_libtool" >&6
5814 if test "$with_libtool" != "no"; then
5815
5816 if test "$with_libtool" != "yes" ; then
5817
5818 if test "x$prefix" != xNONE; then
5819 cf_path_syntax="$prefix"
5820 else
5821 cf_path_syntax="$ac_default_prefix"
5822 fi
5823
5824 case "x$with_libtool" in
5825 (x\$\(*\)*|x\'*\'*)
5826 ;;
5827 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
5828 ;;
5829 (x\$\{*prefix\}*|x\$\{*dir\}*)
5830 eval with_libtool="$with_libtool"
5831 case "x$with_libtool" in
5832 (xNONE/*)
5833 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5834 ;;
5835 esac
5836 ;;
5837 (xno|xNONE/*)
5838 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5839 ;;
5840 (*)
5841 { { echo "$as_me:5841: error: expected a pathname, not \"$with_libtool\"" >&5
5842 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5843 { (exit 1); exit 1; }; }
5844 ;;
5845 esac
5846
5847 LIBTOOL=$with_libtool
5848 else
5849 if test -n "$ac_tool_prefix"; then
5850 for ac_prog in libtool glibtool
5851 do
5852 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5853 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5854 echo "$as_me:5854: checking for $ac_word" >&5
5855 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5856 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5857 echo $ECHO_N "(cached) $ECHO_C" >&6
5858 else
5859 if test -n "$LIBTOOL"; then
5860 ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5861 else
5862 ac_save_IFS=$IFS; IFS=$ac_path_separator
5863 ac_dummy="$PATH"
5864 for ac_dir in $ac_dummy; do
5865 IFS=$ac_save_IFS
5866 test -z "$ac_dir" && ac_dir=.
5867 $as_executable_p "$ac_dir/$ac_word" || continue
5868 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5869 echo "$as_me:5869: found $ac_dir/$ac_word" >&5
5870 break
5871 done
5872
5873 fi
5874 fi
5875 LIBTOOL=$ac_cv_prog_LIBTOOL
5876 if test -n "$LIBTOOL"; then
5877 echo "$as_me:5877: result: $LIBTOOL" >&5
5878 echo "${ECHO_T}$LIBTOOL" >&6
5879 else
5880 echo "$as_me:5880: result: no" >&5
5881 echo "${ECHO_T}no" >&6
5882 fi
5883
5884 test -n "$LIBTOOL" && break
5885 done
5886 fi
5887 if test -z "$LIBTOOL"; then
5888 ac_ct_LIBTOOL=$LIBTOOL
5889 for ac_prog in libtool glibtool
5890 do
5891 # Extract the first word of "$ac_prog", so it can be a program name with args.
5892 set dummy $ac_prog; ac_word=$2
5893 echo "$as_me:5893: checking for $ac_word" >&5
5894 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5895 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5896 echo $ECHO_N "(cached) $ECHO_C" >&6
5897 else
5898 if test -n "$ac_ct_LIBTOOL"; then
5899 ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5900 else
5901 ac_save_IFS=$IFS; IFS=$ac_path_separator
5902 ac_dummy="$PATH"
5903 for ac_dir in $ac_dummy; do
5904 IFS=$ac_save_IFS
5905 test -z "$ac_dir" && ac_dir=.
5906 $as_executable_p "$ac_dir/$ac_word" || continue
5907 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5908 echo "$as_me:5908: found $ac_dir/$ac_word" >&5
5909 break
5910 done
5911
5912 fi
5913 fi
5914 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5915 if test -n "$ac_ct_LIBTOOL"; then
5916 echo "$as_me:5916: result: $ac_ct_LIBTOOL" >&5
5917 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5918 else
5919 echo "$as_me:5919: result: no" >&5
5920 echo "${ECHO_T}no" >&6
5921 fi
5922
5923 test -n "$ac_ct_LIBTOOL" && break
5924 done
5925 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5926
5927 LIBTOOL=$ac_ct_LIBTOOL
5928 fi
5929
5930 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5931 then
5932 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.].*//'`
5933 else
5934 cf_cv_libtool_version=
5935 fi
5936 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5937
5938 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5939 then
5940
5941 unset ac_cv_prog_ac_ct_LIBTOOL
5942 unset ac_ct_LIBTOOL
5943 unset LIBTOOL
5944
5945 if test -n "$ac_tool_prefix"; then
5946 for ac_prog in glibtool
5947 do
5948 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5949 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5950 echo "$as_me:5950: checking for $ac_word" >&5
5951 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5952 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5953 echo $ECHO_N "(cached) $ECHO_C" >&6
5954 else
5955 if test -n "$LIBTOOL"; then
5956 ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5957 else
5958 ac_save_IFS=$IFS; IFS=$ac_path_separator
5959 ac_dummy="$PATH"
5960 for ac_dir in $ac_dummy; do
5961 IFS=$ac_save_IFS
5962 test -z "$ac_dir" && ac_dir=.
5963 $as_executable_p "$ac_dir/$ac_word" || continue
5964 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5965 echo "$as_me:5965: found $ac_dir/$ac_word" >&5
5966 break
5967 done
5968
5969 fi
5970 fi
5971 LIBTOOL=$ac_cv_prog_LIBTOOL
5972 if test -n "$LIBTOOL"; then
5973 echo "$as_me:5973: result: $LIBTOOL" >&5
5974 echo "${ECHO_T}$LIBTOOL" >&6
5975 else
5976 echo "$as_me:5976: result: no" >&5
5977 echo "${ECHO_T}no" >&6
5978 fi
5979
5980 test -n "$LIBTOOL" && break
5981 done
5982 fi
5983 if test -z "$LIBTOOL"; then
5984 ac_ct_LIBTOOL=$LIBTOOL
5985 for ac_prog in glibtool
5986 do
5987 # Extract the first word of "$ac_prog", so it can be a program name with args.
5988 set dummy $ac_prog; ac_word=$2
5989 echo "$as_me:5989: checking for $ac_word" >&5
5990 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5991 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5992 echo $ECHO_N "(cached) $ECHO_C" >&6
5993 else
5994 if test -n "$ac_ct_LIBTOOL"; then
5995 ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5996 else
5997 ac_save_IFS=$IFS; IFS=$ac_path_separator
5998 ac_dummy="$PATH"
5999 for ac_dir in $ac_dummy; do
6000 IFS=$ac_save_IFS
6001 test -z "$ac_dir" && ac_dir=.
6002 $as_executable_p "$ac_dir/$ac_word" || continue
6003 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
6004 echo "$as_me:6004: found $ac_dir/$ac_word" >&5
6005 break
6006 done
6007
6008 fi
6009 fi
6010 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
6011 if test -n "$ac_ct_LIBTOOL"; then
6012 echo "$as_me:6012: result: $ac_ct_LIBTOOL" >&5
6013 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
6014 else
6015 echo "$as_me:6015: result: no" >&5
6016 echo "${ECHO_T}no" >&6
6017 fi
6018
6019 test -n "$ac_ct_LIBTOOL" && break
6020 done
6021 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
6022
6023 LIBTOOL=$ac_ct_LIBTOOL
6024 fi
6025
6026 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
6027 then
6028 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.].*//'`
6029 else
6030 cf_cv_libtool_version=
6031 fi
6032 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
6033
6034 fi
6035 fi
6036 if test -z "$LIBTOOL" ; then
6037 { { echo "$as_me:6037: error: Cannot find libtool" >&5
6038 echo "$as_me: error: Cannot find libtool" >&2;}
6039 { (exit 1); exit 1; }; }
6040 fi
6041 LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
6042 LIB_OBJECT='${OBJECTS:.${OBJEXT}=.lo}'
6043 LIB_SUFFIX=.la
6044 LIB_CLEAN='${LIBTOOL} --mode=clean'
6045 LIB_COMPILE='${LIBTOOL} --mode=compile'
6046 LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
6047 LIB_INSTALL='${LIBTOOL} --mode=install'
6048 LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
6049 LIB_PREP=:
6050
6051 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
6052 then
6053 echo "$as_me:6053: checking version of $LIBTOOL" >&5
6054 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
6055
6056 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
6057 then
6058 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.].*//'`
6059 else
6060 cf_cv_libtool_version=
6061 fi
6062 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
6063
6064 echo "$as_me:6064: result: $cf_cv_libtool_version" >&5
6065 echo "${ECHO_T}$cf_cv_libtool_version" >&6
6066
6067 if test -n "$cf_cv_libtool_version"
6068 then
6069 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
6070 case "x$cf_check_libtool_version" in
6071 (*...GNU-libtool...*)
6072 ;;
6073 (*)
6074 { { echo "$as_me:6074: error: This is not GNU libtool" >&5
6075 echo "$as_me: error: This is not GNU libtool" >&2;}
6076 { (exit 1); exit 1; }; }
6077 ;;
6078 esac
6079 else
6080 { { echo "$as_me:6080: error: No version found for $LIBTOOL" >&5
6081 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
6082 { (exit 1); exit 1; }; }
6083 fi
6084
6085 else
6086 { { echo "$as_me:6086: error: GNU libtool has not been found" >&5
6087 echo "$as_me: error: GNU libtool has not been found" >&2;}
6088 { (exit 1); exit 1; }; }
6089 fi
6090
6091 # special hack to add -no-undefined (which libtool should do for itself)
6092 LT_UNDEF=
6093 case "$cf_cv_system_name" in
6094 (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
6095 LT_UNDEF=-no-undefined
6096 ;;
6097 esac
6098
6099 # special hack to add --tag option for C++ compiler
6100 case "$cf_cv_libtool_version" in
6101 (1.[5-9]*|[2-9].[0-9.a-z]*)
6102 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
6103 LIBTOOL="$LIBTOOL --tag=CC"
6104 ;;
6105 (*)
6106 LIBTOOL_CXX="$LIBTOOL"
6107 ;;
6108 esac
6109 else
6110 LIBTOOL=""
6111 LIBTOOL_CXX=""
6112 fi
6113
6114 test -z "$LIBTOOL" && ECHO_LT=
6115
6116 if test "$with_libtool" != "no" ; then
6117
6118 cf_list_models="$cf_list_models libtool"
6119
6120 else
6121
6122 echo "$as_me:6122: checking if you want to build shared libraries" >&5
6123 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
6124
6125 # Check whether --with-shared or --without-shared was given.
6126 if test "${with_shared+set}" = set; then
6127 withval="$with_shared"
6128 with_shared=$withval
6129 else
6130 with_shared=no
6131 fi;
6132 echo "$as_me:6132: result: $with_shared" >&5
6133 echo "${ECHO_T}$with_shared" >&6
6134 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
6135
6136 echo "$as_me:6136: checking if you want to build static libraries" >&5
6137 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
6138
6139 # Check whether --with-normal or --without-normal was given.
6140 if test "${with_normal+set}" = set; then
6141 withval="$with_normal"
6142 with_normal=$withval
6143 else
6144 with_normal=yes
6145 fi;
6146 echo "$as_me:6146: result: $with_normal" >&5
6147 echo "${ECHO_T}$with_normal" >&6
6148 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
6149
6150 echo "$as_me:6150: checking if you want to build debug libraries" >&5
6151 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
6152
6153 # Check whether --with-debug or --without-debug was given.
6154 if test "${with_debug+set}" = set; then
6155 withval="$with_debug"
6156 with_debug=$withval
6157 else
6158 with_debug=yes
6159 fi;
6160 echo "$as_me:6160: result: $with_debug" >&5
6161 echo "${ECHO_T}$with_debug" >&6
6162 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
6163
6164 echo "$as_me:6164: checking if you want to build profiling libraries" >&5
6165 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
6166
6167 # Check whether --with-profile or --without-profile was given.
6168 if test "${with_profile+set}" = set; then
6169 withval="$with_profile"
6170 with_profile=$withval
6171 else
6172 with_profile=no
6173 fi;
6174 echo "$as_me:6174: result: $with_profile" >&5
6175 echo "${ECHO_T}$with_profile" >&6
6176 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
6177
6178 fi
6179
6180 if test "X$cf_with_cxx_binding" != Xno; then
6181 if test "x$with_shared" = "xyes"; then
6182 echo "$as_me:6182: checking if you want to build C++ shared libraries" >&5
6183 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
6184
6185 # Check whether --with-cxx-shared or --without-cxx-shared was given.
6186 if test "${with_cxx_shared+set}" = set; then
6187 withval="$with_cxx_shared"
6188 with_shared_cxx=$withval
6189 else
6190 with_shared_cxx=no
6191 fi;
6192 echo "$as_me:6192: result: $with_shared_cxx" >&5
6193 echo "${ECHO_T}$with_shared_cxx" >&6
6194 fi
6195 fi
6196
6197 ###############################################################################
6198
6199 echo "$as_me:6199: checking for specified models" >&5
6200 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
6201 test -z "$cf_list_models" && cf_list_models=normal
6202 test "$with_libtool" != "no" && cf_list_models=libtool
6203 echo "$as_me:6203: result: $cf_list_models" >&5
6204 echo "${ECHO_T}$cf_list_models" >&6
6205
6206 ### Use the first model as the default, and save its suffix for use in building
6207 ### up test-applications.
6208 echo "$as_me:6208: checking for default model" >&5
6209 echo $ECHO_N "checking for default model... $ECHO_C" >&6
6210 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
6211 echo "$as_me:6211: result: $DFT_LWR_MODEL" >&5
6212 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
6213
6214 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6215
6216 TICS_NAME=tic
6217
6218 TINFO_NAME=tinfo
6219
6220 LIB_NAME=ncurses
6221
6222 LIB_DIR=../lib
6223 LIB_2ND=../../lib
6224
6225 echo "$as_me:6225: checking if you want to have a library-prefix" >&5
6226 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
6227
6228 # Check whether --with-lib-prefix or --without-lib-prefix was given.
6229 if test "${with_lib_prefix+set}" = set; then
6230 withval="$with_lib_prefix"
6231 with_lib_prefix=$withval
6232 else
6233 with_lib_prefix=auto
6234 fi;
6235 echo "$as_me:6235: result: $with_lib_prefix" >&5
6236 echo "${ECHO_T}$with_lib_prefix" >&6
6237
6238 if test "$with_lib_prefix" = auto
6239 then
6240
6241 case "$cf_cv_system_name" in
6242 (OS/2*|os2*)
6243 if test "$DFT_LWR_MODEL" = libtool; then
6244 LIB_PREFIX='lib'
6245 else
6246 LIB_PREFIX=''
6247 fi
6248 ;;
6249 (*-msvc*)
6250 LIB_PREFIX=''
6251 ;;
6252 (*) LIB_PREFIX='lib'
6253 ;;
6254 esac
6255 cf_prefix=$LIB_PREFIX
6256
6257 elif test "$with_lib_prefix" = no
6258 then
6259 LIB_PREFIX=
6260 else
6261 LIB_PREFIX=$with_lib_prefix
6262 fi
6263
6264 LIB_SUFFIX=
6265
6266 echo "$as_me:6266: checking for PATH separator" >&5
6267 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
6268 case "$cf_cv_system_name" in
6269 (os2*) PATH_SEPARATOR=';' ;;
6270 (*) ${PATH_SEPARATOR:=':'} ;;
6271 esac
6272
6273 echo "$as_me:6273: result: $PATH_SEPARATOR" >&5
6274 echo "${ECHO_T}$PATH_SEPARATOR" >&6
6275
6276 # headers needed for checks...
6277 echo "$as_me:6277: checking for ANSI C header files" >&5
6278 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6279 if test "${ac_cv_header_stdc+set}" = set; then
6280 echo $ECHO_N "(cached) $ECHO_C" >&6
6281 else
6282 cat >"conftest.$ac_ext" <<_ACEOF
6283 #line 6283 "configure"
6284 #include "confdefs.h"
6285 #include <stdlib.h>
6286 #include <stdarg.h>
6287 #include <string.h>
6288 #include <float.h>
6289
6290 _ACEOF
6291 if { (eval echo "$as_me:6291: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6292 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6293 ac_status=$?
6294 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6295 rm -f conftest.er1
6296 cat conftest.err >&5
6297 echo "$as_me:6297: \$? = $ac_status" >&5
6298 (exit "$ac_status"); } >/dev/null; then
6299 if test -s conftest.err; then
6300 ac_cpp_err=$ac_c_preproc_warn_flag
6301 else
6302 ac_cpp_err=
6303 fi
6304 else
6305 ac_cpp_err=yes
6306 fi
6307 if test -z "$ac_cpp_err"; then
6308 ac_cv_header_stdc=yes
6309 else
6310 echo "$as_me: failed program was:" >&5
6311 cat "conftest.$ac_ext" >&5
6312 ac_cv_header_stdc=no
6313 fi
6314 rm -f conftest.err "conftest.$ac_ext"
6315
6316 if test $ac_cv_header_stdc = yes; then
6317 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6318 cat >"conftest.$ac_ext" <<_ACEOF
6319 #line 6319 "configure"
6320 #include "confdefs.h"
6321 #include <string.h>
6322
6323 _ACEOF
6324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6325 $EGREP "memchr" >/dev/null 2>&1; then
6326 :
6327 else
6328 ac_cv_header_stdc=no
6329 fi
6330 rm -rf conftest*
6331
6332 fi
6333
6334 if test $ac_cv_header_stdc = yes; then
6335 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6336 cat >"conftest.$ac_ext" <<_ACEOF
6337 #line 6337 "configure"
6338 #include "confdefs.h"
6339 #include <stdlib.h>
6340
6341 _ACEOF
6342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6343 $EGREP "free" >/dev/null 2>&1; then
6344 :
6345 else
6346 ac_cv_header_stdc=no
6347 fi
6348 rm -rf conftest*
6349
6350 fi
6351
6352 if test $ac_cv_header_stdc = yes; then
6353 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6354 if test "$cross_compiling" = yes; then
6355 :
6356 else
6357 cat >"conftest.$ac_ext" <<_ACEOF
6358 #line 6358 "configure"
6359 #include "confdefs.h"
6360 #include <ctype.h>
6361 #if ((' ' & 0x0FF) == 0x020)
6362 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6363 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6364 #else
6365 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6366 || ('j' <= (c) && (c) <= 'r') \
6367 || ('s' <= (c) && (c) <= 'z'))
6368 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6369 #endif
6370
6371 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6372 int
6373 main (void)
6374 {
6375 int i;
6376 for (i = 0; i < 256; i++)
6377 if (XOR (islower (i), ISLOWER (i))
6378 || toupper (i) != TOUPPER (i))
6379 $ac_main_return(2);
6380 $ac_main_return (0);
6381 }
6382 _ACEOF
6383 rm -f "conftest$ac_exeext"
6384 if { (eval echo "$as_me:6384: \"$ac_link\"") >&5
6385 (eval $ac_link) 2>&5
6386 ac_status=$?
6387 echo "$as_me:6387: \$? = $ac_status" >&5
6388 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6389 { (eval echo "$as_me:6389: \"$ac_try\"") >&5
6390 (eval $ac_try) 2>&5
6391 ac_status=$?
6392 echo "$as_me:6392: \$? = $ac_status" >&5
6393 (exit "$ac_status"); }; }; then
6394 :
6395 else
6396 echo "$as_me: program exited with status $ac_status" >&5
6397 echo "$as_me: failed program was:" >&5
6398 cat "conftest.$ac_ext" >&5
6399 ac_cv_header_stdc=no
6400 fi
6401 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6402 fi
6403 fi
6404 fi
6405 echo "$as_me:6405: result: $ac_cv_header_stdc" >&5
6406 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6407 if test $ac_cv_header_stdc = yes; then
6408
6409 cat >>confdefs.h <<\EOF
6410 #define STDC_HEADERS 1
6411 EOF
6412
6413 fi
6414
6415 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6416
6417 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6418 inttypes.h stdint.h unistd.h
6419 do
6420 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6421 echo "$as_me:6421: checking for $ac_header" >&5
6422 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6423 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6424 echo $ECHO_N "(cached) $ECHO_C" >&6
6425 else
6426 cat >"conftest.$ac_ext" <<_ACEOF
6427 #line 6427 "configure"
6428 #include "confdefs.h"
6429 $ac_includes_default
6430 #include <$ac_header>
6431 _ACEOF
6432 rm -f "conftest.$ac_objext"
6433 if { (eval echo "$as_me:6433: \"$ac_compile\"") >&5
6434 (eval $ac_compile) 2>&5
6435 ac_status=$?
6436 echo "$as_me:6436: \$? = $ac_status" >&5
6437 (exit "$ac_status"); } &&
6438 { ac_try='test -s "conftest.$ac_objext"'
6439 { (eval echo "$as_me:6439: \"$ac_try\"") >&5
6440 (eval $ac_try) 2>&5
6441 ac_status=$?
6442 echo "$as_me:6442: \$? = $ac_status" >&5
6443 (exit "$ac_status"); }; }; then
6444 eval "$as_ac_Header=yes"
6445 else
6446 echo "$as_me: failed program was:" >&5
6447 cat "conftest.$ac_ext" >&5
6448 eval "$as_ac_Header=no"
6449 fi
6450 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6451 fi
6452 echo "$as_me:6452: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6453 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6454 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6455 cat >>confdefs.h <<EOF
6456 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6457 EOF
6458
6459 fi
6460 done
6461
6462 echo "$as_me:6462: checking whether exit is declared" >&5
6463 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6464 if test "${ac_cv_have_decl_exit+set}" = set; then
6465 echo $ECHO_N "(cached) $ECHO_C" >&6
6466 else
6467 cat >"conftest.$ac_ext" <<_ACEOF
6468 #line 6468 "configure"
6469 #include "confdefs.h"
6470 $ac_includes_default
6471 int
6472 main (void)
6473 {
6474 #ifndef exit
6475 (void) exit;
6476 #endif
6477
6478 ;
6479 return 0;
6480 }
6481 _ACEOF
6482 rm -f "conftest.$ac_objext"
6483 if { (eval echo "$as_me:6483: \"$ac_compile\"") >&5
6484 (eval $ac_compile) 2>&5
6485 ac_status=$?
6486 echo "$as_me:6486: \$? = $ac_status" >&5
6487 (exit "$ac_status"); } &&
6488 { ac_try='test -s "conftest.$ac_objext"'
6489 { (eval echo "$as_me:6489: \"$ac_try\"") >&5
6490 (eval $ac_try) 2>&5
6491 ac_status=$?
6492 echo "$as_me:6492: \$? = $ac_status" >&5
6493 (exit "$ac_status"); }; }; then
6494 ac_cv_have_decl_exit=yes
6495 else
6496 echo "$as_me: failed program was:" >&5
6497 cat "conftest.$ac_ext" >&5
6498 ac_cv_have_decl_exit=no
6499 fi
6500 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6501 fi
6502 echo "$as_me:6502: result: $ac_cv_have_decl_exit" >&5
6503 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6504
6505 ac_header_dirent=no
6506 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6507 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6508 echo "$as_me:6508: checking for $ac_hdr that defines DIR" >&5
6509 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6510 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6511 echo $ECHO_N "(cached) $ECHO_C" >&6
6512 else
6513 cat >"conftest.$ac_ext" <<_ACEOF
6514 #line 6514 "configure"
6515 #include "confdefs.h"
6516 #include <sys/types.h>
6517 #include <$ac_hdr>
6518
6519 int
6520 main (void)
6521 {
6522 if ((DIR *) 0)
6523 return 0;
6524 ;
6525 return 0;
6526 }
6527 _ACEOF
6528 rm -f "conftest.$ac_objext"
6529 if { (eval echo "$as_me:6529: \"$ac_compile\"") >&5
6530 (eval $ac_compile) 2>&5
6531 ac_status=$?
6532 echo "$as_me:6532: \$? = $ac_status" >&5
6533 (exit "$ac_status"); } &&
6534 { ac_try='test -s "conftest.$ac_objext"'
6535 { (eval echo "$as_me:6535: \"$ac_try\"") >&5
6536 (eval $ac_try) 2>&5
6537 ac_status=$?
6538 echo "$as_me:6538: \$? = $ac_status" >&5
6539 (exit "$ac_status"); }; }; then
6540 eval "$as_ac_Header=yes"
6541 else
6542 echo "$as_me: failed program was:" >&5
6543 cat "conftest.$ac_ext" >&5
6544 eval "$as_ac_Header=no"
6545 fi
6546 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6547 fi
6548 echo "$as_me:6548: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6549 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6550 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6551 cat >>confdefs.h <<EOF
6552 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6553 EOF
6554
6555 ac_header_dirent=$ac_hdr; break
6556 fi
6557
6558 done
6559 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6560 if test $ac_header_dirent = dirent.h; then
6561 echo "$as_me:6561: checking for opendir in -ldir" >&5
6562 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6563 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6564 echo $ECHO_N "(cached) $ECHO_C" >&6
6565 else
6566 ac_check_lib_save_LIBS=$LIBS
6567 LIBS="-ldir $LIBS"
6568 cat >"conftest.$ac_ext" <<_ACEOF
6569 #line 6569 "configure"
6570 #include "confdefs.h"
6571
6572 /* Override any gcc2 internal prototype to avoid an error. */
6573 #ifdef __cplusplus
6574 extern "C"
6575 #endif
6576 /* We use char because int might match the return type of a gcc2
6577 builtin and then its argument prototype would still apply. */
6578 char opendir (void);
6579 int
6580 main (void)
6581 {
6582 opendir ();
6583 ;
6584 return 0;
6585 }
6586 _ACEOF
6587 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6588 if { (eval echo "$as_me:6588: \"$ac_link\"") >&5
6589 (eval $ac_link) 2>&5
6590 ac_status=$?
6591 echo "$as_me:6591: \$? = $ac_status" >&5
6592 (exit "$ac_status"); } &&
6593 { ac_try='test -s "conftest$ac_exeext"'
6594 { (eval echo "$as_me:6594: \"$ac_try\"") >&5
6595 (eval $ac_try) 2>&5
6596 ac_status=$?
6597 echo "$as_me:6597: \$? = $ac_status" >&5
6598 (exit "$ac_status"); }; }; then
6599 ac_cv_lib_dir_opendir=yes
6600 else
6601 echo "$as_me: failed program was:" >&5
6602 cat "conftest.$ac_ext" >&5
6603 ac_cv_lib_dir_opendir=no
6604 fi
6605 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6606 LIBS=$ac_check_lib_save_LIBS
6607 fi
6608 echo "$as_me:6608: result: $ac_cv_lib_dir_opendir" >&5
6609 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6610 if test "$ac_cv_lib_dir_opendir" = yes; then
6611 LIBS="$LIBS -ldir"
6612 fi
6613
6614 else
6615 echo "$as_me:6615: checking for opendir in -lx" >&5
6616 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6617 if test "${ac_cv_lib_x_opendir+set}" = set; then
6618 echo $ECHO_N "(cached) $ECHO_C" >&6
6619 else
6620 ac_check_lib_save_LIBS=$LIBS
6621 LIBS="-lx $LIBS"
6622 cat >"conftest.$ac_ext" <<_ACEOF
6623 #line 6623 "configure"
6624 #include "confdefs.h"
6625
6626 /* Override any gcc2 internal prototype to avoid an error. */
6627 #ifdef __cplusplus
6628 extern "C"
6629 #endif
6630 /* We use char because int might match the return type of a gcc2
6631 builtin and then its argument prototype would still apply. */
6632 char opendir (void);
6633 int
6634 main (void)
6635 {
6636 opendir ();
6637 ;
6638 return 0;
6639 }
6640 _ACEOF
6641 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6642 if { (eval echo "$as_me:6642: \"$ac_link\"") >&5
6643 (eval $ac_link) 2>&5
6644 ac_status=$?
6645 echo "$as_me:6645: \$? = $ac_status" >&5
6646 (exit "$ac_status"); } &&
6647 { ac_try='test -s "conftest$ac_exeext"'
6648 { (eval echo "$as_me:6648: \"$ac_try\"") >&5
6649 (eval $ac_try) 2>&5
6650 ac_status=$?
6651 echo "$as_me:6651: \$? = $ac_status" >&5
6652 (exit "$ac_status"); }; }; then
6653 ac_cv_lib_x_opendir=yes
6654 else
6655 echo "$as_me: failed program was:" >&5
6656 cat "conftest.$ac_ext" >&5
6657 ac_cv_lib_x_opendir=no
6658 fi
6659 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6660 LIBS=$ac_check_lib_save_LIBS
6661 fi
6662 echo "$as_me:6662: result: $ac_cv_lib_x_opendir" >&5
6663 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6664 if test "$ac_cv_lib_x_opendir" = yes; then
6665 LIBS="$LIBS -lx"
6666 fi
6667
6668 fi
6669
6670 ###############################################################################
6671
6672 echo "$as_me:6672: checking if you want to build a separate terminfo library" >&5
6673 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6674
6675 # Check whether --with-termlib or --without-termlib was given.
6676 if test "${with_termlib+set}" = set; then
6677 withval="$with_termlib"
6678 with_termlib=$withval
6679 else
6680 with_termlib=no
6681 fi;
6682 echo "$as_me:6682: result: $with_termlib" >&5
6683 echo "${ECHO_T}$with_termlib" >&6
6684
6685 echo "$as_me:6685: checking if you want to build a separate tic library" >&5
6686 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6687
6688 # Check whether --with-ticlib or --without-ticlib was given.
6689 if test "${with_ticlib+set}" = set; then
6690 withval="$with_ticlib"
6691 with_ticlib=$withval
6692 else
6693 with_ticlib=no
6694 fi;
6695 echo "$as_me:6695: result: $with_ticlib" >&5
6696 echo "${ECHO_T}$with_ticlib" >&6
6697
6698 if test X"$CC_G_OPT" = X"" ; then
6699 CC_G_OPT='-g'
6700 test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6701 fi
6702
6703 if test X"$CXX_G_OPT" = X"" ; then
6704 CXX_G_OPT='-g'
6705 test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6706 fi
6707
6708 echo "$as_me:6708: checking for default loader flags" >&5
6709 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6710 case "$DFT_LWR_MODEL" in
6711 (libtool) LD_MODEL='' ;;
6712 (normal) LD_MODEL='' ;;
6713 (debug) LD_MODEL=$CC_G_OPT ;;
6714 (profile) LD_MODEL='-pg';;
6715 (shared) LD_MODEL='' ;;
6716 esac
6717 echo "$as_me:6717: result: ${LD_MODEL:-(none)}" >&5
6718 echo "${ECHO_T}${LD_MODEL:-(none)}" >&6
6719
6720 case "$DFT_LWR_MODEL" in
6721 (shared)
6722
6723 echo "$as_me:6723: checking if rpath option should be used" >&5
6724 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6725
6726 # Check whether --enable-rpath or --disable-rpath was given.
6727 if test "${enable_rpath+set}" = set; then
6728 enableval="$enable_rpath"
6729 cf_cv_enable_rpath=$enableval
6730 else
6731 cf_cv_enable_rpath=no
6732 fi;
6733 echo "$as_me:6733: result: $cf_cv_enable_rpath" >&5
6734 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6735
6736 echo "$as_me:6736: checking if shared libraries should be relinked during install" >&5
6737 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6738
6739 # Check whether --enable-relink or --disable-relink was given.
6740 if test "${enable_relink+set}" = set; then
6741 enableval="$enable_relink"
6742 cf_cv_do_relink=$enableval
6743 else
6744 cf_cv_do_relink=yes
6745 fi;
6746 echo "$as_me:6746: result: $cf_cv_do_relink" >&5
6747 echo "${ECHO_T}$cf_cv_do_relink" >&6
6748 ;;
6749 esac
6750
6751 # we will build libraries one-level down.
6752 rel_builddir=..
6753
6754 LD_RPATH_OPT=
6755 if test "x$cf_cv_enable_rpath" != xno
6756 then
6757 echo "$as_me:6757: checking for an rpath option" >&5
6758 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6759 case "$cf_cv_system_name" in
6760 (irix*)
6761 if test "$GCC" = yes; then
6762 LD_RPATH_OPT="-Wl,-rpath,"
6763 else
6764 LD_RPATH_OPT="-rpath "
6765 fi
6766 ;;
6767 (linux*|gnu*|k*bsd*-gnu|freebsd*)
6768 LD_RPATH_OPT="-Wl,-rpath,"
6769 ;;
6770 (openbsd[2-9].*|mirbsd*)
6771 LD_RPATH_OPT="-Wl,-rpath,"
6772 ;;
6773 (dragonfly*)
6774 LD_RPATH_OPT="-rpath "
6775 ;;
6776 (netbsd*)
6777 LD_RPATH_OPT="-Wl,-rpath,"
6778 ;;
6779 (osf*|mls+*)
6780 LD_RPATH_OPT="-rpath "
6781 ;;
6782 (solaris2*)
6783 LD_RPATH_OPT="-R"
6784 ;;
6785 (*)
6786 ;;
6787 esac
6788 echo "$as_me:6788: result: $LD_RPATH_OPT" >&5
6789 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6790
6791 case "x$LD_RPATH_OPT" in
6792 (x-R*)
6793 echo "$as_me:6793: checking if we need a space after rpath option" >&5
6794 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6795 cf_save_LIBS="$LIBS"
6796
6797 cf_add_libs="$LIBS"
6798 # reverse order
6799 cf_add_0lib=
6800 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6801 # filter duplicates
6802 for cf_add_1lib in $cf_add_0lib; do
6803 for cf_add_2lib in $cf_add_libs; do
6804 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6805 cf_add_1lib=
6806 break
6807 fi
6808 done
6809 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6810 done
6811 LIBS="$cf_add_libs"
6812
6813 cat >"conftest.$ac_ext" <<_ACEOF
6814 #line 6814 "configure"
6815 #include "confdefs.h"
6816
6817 int
6818 main (void)
6819 {
6820
6821 ;
6822 return 0;
6823 }
6824 _ACEOF
6825 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6826 if { (eval echo "$as_me:6826: \"$ac_link\"") >&5
6827 (eval $ac_link) 2>&5
6828 ac_status=$?
6829 echo "$as_me:6829: \$? = $ac_status" >&5
6830 (exit "$ac_status"); } &&
6831 { ac_try='test -s "conftest$ac_exeext"'
6832 { (eval echo "$as_me:6832: \"$ac_try\"") >&5
6833 (eval $ac_try) 2>&5
6834 ac_status=$?
6835 echo "$as_me:6835: \$? = $ac_status" >&5
6836 (exit "$ac_status"); }; }; then
6837 cf_rpath_space=no
6838 else
6839 echo "$as_me: failed program was:" >&5
6840 cat "conftest.$ac_ext" >&5
6841 cf_rpath_space=yes
6842 fi
6843 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6844 LIBS="$cf_save_LIBS"
6845 echo "$as_me:6845: result: $cf_rpath_space" >&5
6846 echo "${ECHO_T}$cf_rpath_space" >&6
6847 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6848 ;;
6849 esac
6850 fi
6851
6852 RM_SHARED_OPTS=
6853 LOCAL_LDFLAGS=
6854 LOCAL_LDFLAGS2=
6855 LD_SHARED_OPTS=
6856 INSTALL_LIB="-m 644"
6857 : ${rel_builddir:=.}
6858
6859 shlibdir=$libdir
6860
6861 MAKE_DLLS="#"
6862
6863 cf_cv_do_symlinks=no
6864 cf_ld_rpath_opt=
6865 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6866
6867 echo "$as_me:6867: checking whether to use release or ABI version in shared library file names" >&5
6868 echo $ECHO_N "checking whether to use release or ABI version in shared library file names... $ECHO_C" >&6
6869
6870 # Check whether --with-shlib-version or --without-shlib-version was given.
6871 if test "${with_shlib_version+set}" = set; then
6872 withval="$with_shlib_version"
6873 test -z "$withval" && withval=auto
6874 case "$withval" in
6875 (yes)
6876 cf_cv_shlib_version=auto
6877 ;;
6878 (rel|abi|auto)
6879 cf_cv_shlib_version=$withval
6880 ;;
6881 (*)
6882 echo "$as_me:6882: result: $withval" >&5
6883 echo "${ECHO_T}$withval" >&6
6884 { { echo "$as_me:6884: error: option value must be one of: rel, abi, or auto" >&5
6885 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6886 { (exit 1); exit 1; }; }
6887 ;;
6888 esac
6889
6890 else
6891 cf_cv_shlib_version=auto
6892 fi;
6893 echo "$as_me:6893: result: $cf_cv_shlib_version" >&5
6894 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6895
6896 cf_cv_rm_so_locs=no
6897 cf_try_cflags=
6898
6899 # Some less-capable ports of gcc support only -fpic
6900 CC_SHARED_OPTS=
6901
6902 cf_try_fPIC=no
6903 if test "$GCC" = yes
6904 then
6905 cf_try_fPIC=yes
6906 else
6907 case "$cf_cv_system_name" in
6908 (*linux*) # e.g., PGI compiler
6909 cf_try_fPIC=yes
6910 ;;
6911 esac
6912 fi
6913
6914 if test "$cf_try_fPIC" = yes
6915 then
6916 echo "$as_me:6916: checking which $CC option to use" >&5
6917 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6918 cf_save_CFLAGS="$CFLAGS"
6919 for CC_SHARED_OPTS in -fPIC -fpic ''
6920 do
6921 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6922 cat >"conftest.$ac_ext" <<_ACEOF
6923 #line 6923 "configure"
6924 #include "confdefs.h"
6925 #include <stdio.h>
6926 int
6927 main (void)
6928 {
6929 int x = 1; (void)x
6930 ;
6931 return 0;
6932 }
6933 _ACEOF
6934 rm -f "conftest.$ac_objext"
6935 if { (eval echo "$as_me:6935: \"$ac_compile\"") >&5
6936 (eval $ac_compile) 2>&5
6937 ac_status=$?
6938 echo "$as_me:6938: \$? = $ac_status" >&5
6939 (exit "$ac_status"); } &&
6940 { ac_try='test -s "conftest.$ac_objext"'
6941 { (eval echo "$as_me:6941: \"$ac_try\"") >&5
6942 (eval $ac_try) 2>&5
6943 ac_status=$?
6944 echo "$as_me:6944: \$? = $ac_status" >&5
6945 (exit "$ac_status"); }; }; then
6946 break
6947 else
6948 echo "$as_me: failed program was:" >&5
6949 cat "conftest.$ac_ext" >&5
6950 fi
6951 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6952 done
6953 echo "$as_me:6953: result: $CC_SHARED_OPTS" >&5
6954 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6955 CFLAGS="$cf_save_CFLAGS"
6956 fi
6957
6958 cf_cv_shlib_version_infix=no
6959
6960 case "$cf_cv_system_name" in
6961 (aix4.3-9*|aix[5-7]*)
6962 if test "$GCC" = yes; then
6963 CC_SHARED_OPTS='-Wl,-brtl'
6964 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6965 else
6966 CC_SHARED_OPTS='-brtl'
6967 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6968 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6969 fi
6970 ;;
6971 (beos*)
6972 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6973 ;;
6974 (cygwin*)
6975 CC_SHARED_OPTS=
6976 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6977 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6978 cf_cv_shlib_version=cygdll
6979 cf_cv_shlib_version_infix=cygdll
6980 shlibdir=$bindir
6981 MAKE_DLLS=
6982 cat >mk_shared_lib.sh <<-CF_EOF
6983 #!$SHELL
6984 SHARED_LIB=\$1
6985 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6986 shift
6987 cat <<-EOF
6988 Linking shared library
6989 ** SHARED_LIB \$SHARED_LIB
6990 ** IMPORT_LIB \$IMPORT_LIB
6991 EOF
6992 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6993 CF_EOF
6994 chmod +x mk_shared_lib.sh
6995 ;;
6996 (msys*)
6997 CC_SHARED_OPTS=
6998 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6999 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7000 cf_cv_shlib_version=msysdll
7001 cf_cv_shlib_version_infix=msysdll
7002 shlibdir=$bindir
7003 MAKE_DLLS=
7004 cat >mk_shared_lib.sh <<-CF_EOF
7005 #!$SHELL
7006 SHARED_LIB=\$1
7007 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7008 shift
7009 cat <<-EOF
7010 Linking shared library
7011 ** SHARED_LIB \$SHARED_LIB
7012 ** IMPORT_LIB \$IMPORT_LIB
7013 EOF
7014 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7015 CF_EOF
7016 chmod +x mk_shared_lib.sh
7017 ;;
7018 (darwin*)
7019 cf_try_cflags="no-cpp-precomp"
7020 CC_SHARED_OPTS="-dynamic"
7021 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7022 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7023 cf_cv_shlib_version_infix=yes
7024 echo "$as_me:7024: checking if ld -search_paths_first works" >&5
7025 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7026 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7027 echo $ECHO_N "(cached) $ECHO_C" >&6
7028 else
7029
7030 cf_save_LDFLAGS=$LDFLAGS
7031 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7032 cat >"conftest.$ac_ext" <<_ACEOF
7033 #line 7033 "configure"
7034 #include "confdefs.h"
7035
7036 int
7037 main (void)
7038 {
7039 int i;
7040 ;
7041 return 0;
7042 }
7043 _ACEOF
7044 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7045 if { (eval echo "$as_me:7045: \"$ac_link\"") >&5
7046 (eval $ac_link) 2>&5
7047 ac_status=$?
7048 echo "$as_me:7048: \$? = $ac_status" >&5
7049 (exit "$ac_status"); } &&
7050 { ac_try='test -s "conftest$ac_exeext"'
7051 { (eval echo "$as_me:7051: \"$ac_try\"") >&5
7052 (eval $ac_try) 2>&5
7053 ac_status=$?
7054 echo "$as_me:7054: \$? = $ac_status" >&5
7055 (exit "$ac_status"); }; }; then
7056 cf_cv_ldflags_search_paths_first=yes
7057 else
7058 echo "$as_me: failed program was:" >&5
7059 cat "conftest.$ac_ext" >&5
7060 cf_cv_ldflags_search_paths_first=no
7061 fi
7062 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7063 LDFLAGS=$cf_save_LDFLAGS
7064 fi
7065 echo "$as_me:7065: result: $cf_cv_ldflags_search_paths_first" >&5
7066 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7067 if test "$cf_cv_ldflags_search_paths_first" = yes; then
7068 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7069 fi
7070 ;;
7071 (haiku*)
7072
7073 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7074 if test "$cf_cv_shlib_version" = rel; then
7075 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7076 else
7077 cf_cv_shared_soname='`basename $@`'
7078 fi
7079
7080 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7081 ;;
7082 (hpux[7-8]*)
7083 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
7084 if test "$GCC" != yes; then
7085 CC_SHARED_OPTS='+Z'
7086 fi
7087 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
7088 INSTALL_LIB="-m 555"
7089 ;;
7090 (hpux*)
7091 # (tested with gcc 2.7.2 -- I don't have c89)
7092 if test "$GCC" = yes; then
7093 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7094 else
7095 CC_SHARED_OPTS='+Z'
7096 LD_SHARED_OPTS='-Wl,+b,${libdir}'
7097 fi
7098 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
7099 # HP-UX shared libraries must be executable, and should be
7100 # readonly to exploit a quirk in the memory manager.
7101 INSTALL_LIB="-m 555"
7102 ;;
7103 (interix*)
7104 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7105 if test "$cf_cv_shlib_version" = rel; then
7106 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7107 else
7108 cf_shared_soname='`basename $@`'
7109 fi
7110 CC_SHARED_OPTS=
7111 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
7112 ;;
7113 (irix*)
7114 if test "$cf_cv_enable_rpath" = yes ; then
7115 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7116 fi
7117 # tested with IRIX 5.2 and 'cc'.
7118 if test "$GCC" != yes; then
7119 CC_SHARED_OPTS='-KPIC'
7120 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
7121 else
7122 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
7123 fi
7124 cf_cv_rm_so_locs=yes
7125 ;;
7126 (linux*|gnu*|k*bsd*-gnu)
7127 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7128 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7129 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7130 fi
7131 if test "$cf_cv_enable_rpath" = yes ; then
7132 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7133 fi
7134
7135 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7136 if test "$cf_cv_shlib_version" = rel; then
7137 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7138 else
7139 cf_cv_shared_soname='`basename $@`'
7140 fi
7141
7142 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7143 ;;
7144 (mingw*msvc*)
7145 cf_cv_shlib_version=msvcdll
7146 cf_cv_shlib_version_infix=msvcdll
7147 shlibdir=$bindir
7148 MAKE_DLLS=
7149 if test "$DFT_LWR_MODEL" = "shared" ; then
7150 LOCAL_LDFLAGS="-link -dll"
7151 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7152 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
7153 fi
7154 CC_SHARED_OPTS=
7155 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
7156 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
7157 cat >mk_shared_lib.sh <<-CF_EOF
7158 #!$SHELL
7159 SHARED_LIB=\$1
7160 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
7161 shift
7162 my_ld=\$1
7163 shift
7164 cat <<-EOF
7165 Linking shared library
7166 ** SHARED LIB \$SHARED_LIB
7167 ** IMPORT_LIB \$IMPORT_LIB
7168 EOF
7169 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
7170 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
7171 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
7172 CF_EOF
7173 chmod +x mk_shared_lib.sh
7174 cat >mk_prog.sh <<-CF_EOF
7175 #!$SHELL
7176 shift
7177 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
7178 LD="$LD"
7179 clopts=()
7180 ldopts=("/subsystem:console")
7181 libs=()
7182 isdll=0
7183 while test \$# -gt 0; do
7184 case "\$1" in
7185 -link)
7186 # ignore -link argument
7187 ;;
7188 -M[TD] | -M[TD]d)
7189 # ignore runtime-library option
7190 ;;
7191 -dll)
7192 isdll=1
7193 ;;
7194 -W* | -w*)
7195 # ignore warnings
7196 ;;
7197 -D*)
7198 clopts+=("\$1")
7199 ;;
7200 -I*)
7201 clopts+=("\$1")
7202 ;;
7203 -l*)
7204 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
7205 ;;
7206 -L*)
7207 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
7208 ;;
7209 *.obj | *.$OBJEXT)
7210 ldopts+=("\$1")
7211 ;;
7212 -Wl,*)
7213 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
7214 ldopts+=("\${linkarg}")
7215 done
7216 ;;
7217 *.lib)
7218 ldopts+=("\$1")
7219 ;;
7220 -o)
7221 shift
7222 ldopts+=("-out:\$1")
7223 ;;
7224 *)
7225 clopts+=("\$1")
7226 ldopts+=("\$1")
7227 ;;
7228 esac
7229 shift
7230 done
7231 if [ "\$isdll" -ne 0 ]; then
7232 for lib in \${libs[*]}; do
7233 ldopts+=("\$lib.dll.lib")
7234 done
7235 else
7236 for lib in \${libs[*]}; do
7237 ldopts+=("\$lib.lib")
7238 done
7239 fi
7240 cat <<-EOF
7241 Creating program
7242 ** ld options: "\${ldopts[@]}"
7243 EOF
7244 exec \$LD \${ldopts[@]}
7245 CF_EOF
7246 chmod +x mk_prog.sh
7247 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
7248 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
7249 ;;
7250 (mingw*)
7251 cf_cv_shlib_version=mingw
7252 cf_cv_shlib_version_infix=mingw
7253 shlibdir=$bindir
7254 MAKE_DLLS=
7255 if test "$DFT_LWR_MODEL" = "shared" ; then
7256 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
7257 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7258 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
7259 fi
7260 CC_SHARED_OPTS=
7261 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7262 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7263 cat >mk_shared_lib.sh <<-CF_EOF
7264 #!$SHELL
7265 SHARED_LIB=\$1
7266 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
7267 shift
7268 cat <<-EOF
7269 Linking shared library
7270 ** SHARED_LIB \$SHARED_LIB
7271 ** IMPORT_LIB \$IMPORT_LIB
7272 EOF
7273 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7274 CF_EOF
7275 chmod +x mk_shared_lib.sh
7276 ;;
7277 (openbsd[2-9].*|mirbsd*)
7278 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7279 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7280 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7281 fi
7282 if test "$cf_cv_enable_rpath" = yes ; then
7283 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7284 fi
7285 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7286
7287 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7288 if test "$cf_cv_shlib_version" = rel; then
7289 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7290 else
7291 cf_cv_shared_soname='`basename $@`'
7292 fi
7293
7294 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7295 ;;
7296 (nskJ*)
7297 CC_SHARED_OPTS=
7298 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
7299 ;;
7300 (nskL*)
7301 CC_SHARED_OPTS=
7302 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
7303 ;;
7304 (nto-qnx*|openbsd*|freebsd[12].*)
7305 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7306 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
7307 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7308 ;;
7309 (dragonfly*|freebsd*)
7310 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7311 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7312 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7313 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
7314 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7315 fi
7316
7317 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7318 if test "$cf_cv_shlib_version" = rel; then
7319 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7320 else
7321 cf_cv_shared_soname='`basename $@`'
7322 fi
7323
7324 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7325 ;;
7326 (netbsd*)
7327 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7328 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7329 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7330 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7331 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7332 if test "$cf_cv_shlib_version" = auto; then
7333 if test -f /usr/libexec/ld.elf_so; then
7334 cf_cv_shlib_version=abi
7335 else
7336 cf_cv_shlib_version=rel
7337 fi
7338 fi
7339
7340 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7341 if test "$cf_cv_shlib_version" = rel; then
7342 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7343 else
7344 cf_cv_shared_soname='`basename $@`'
7345 fi
7346
7347 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7348 else
7349 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7350 fi
7351 ;;
7352 (osf*|mls+*)
7353 # tested with OSF/1 V3.2 and 'cc'
7354 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7355 # link with shared libs).
7356 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7357 case "$host_os" in
7358 (osf4*)
7359 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7360 ;;
7361 esac
7362 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7363 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7364 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7365 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7366 fi
7367 cf_cv_rm_so_locs=yes
7368 ;;
7369 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
7370 # tested with osr5.0.5
7371 if test "$GCC" != yes; then
7372 CC_SHARED_OPTS='-belf -KPIC'
7373 fi
7374 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7375 if test "$cf_cv_enable_rpath" = yes ; then
7376 # only way is to set LD_RUN_PATH but no switch for it
7377 RUN_PATH=$libdir
7378 fi
7379 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7380 LINK_PROGS='LD_RUN_PATH=${libdir}'
7381 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7382 ;;
7383 (sunos4*)
7384 # tested with SunOS 4.1.1 and gcc 2.7.0
7385 if test "$GCC" != yes; then
7386 CC_SHARED_OPTS='-KPIC'
7387 fi
7388 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7389 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7390 ;;
7391 (solaris2*)
7392 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7393 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7394 if test "$DFT_LWR_MODEL" = "shared" ; then
7395 LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}"
7396 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7397 fi
7398 if test "$cf_cv_enable_rpath" = yes ; then
7399 EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS"
7400 fi
7401
7402 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7403 if test "$cf_cv_shlib_version" = rel; then
7404 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7405 else
7406 cf_cv_shared_soname='`basename $@`'
7407 fi
7408
7409 if test "$GCC" != yes; then
7410 cf_save_CFLAGS="$CFLAGS"
7411 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7412 do
7413 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7414 cat >"conftest.$ac_ext" <<_ACEOF
7415 #line 7415 "configure"
7416 #include "confdefs.h"
7417 #include <stdio.h>
7418 int
7419 main (void)
7420 {
7421 printf("Hello\\n");
7422 ;
7423 return 0;
7424 }
7425 _ACEOF
7426 rm -f "conftest.$ac_objext"
7427 if { (eval echo "$as_me:7427: \"$ac_compile\"") >&5
7428 (eval $ac_compile) 2>&5
7429 ac_status=$?
7430 echo "$as_me:7430: \$? = $ac_status" >&5
7431 (exit "$ac_status"); } &&
7432 { ac_try='test -s "conftest.$ac_objext"'
7433 { (eval echo "$as_me:7433: \"$ac_try\"") >&5
7434 (eval $ac_try) 2>&5
7435 ac_status=$?
7436 echo "$as_me:7436: \$? = $ac_status" >&5
7437 (exit "$ac_status"); }; }; then
7438 break
7439 else
7440 echo "$as_me: failed program was:" >&5
7441 cat "conftest.$ac_ext" >&5
7442 fi
7443 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7444 done
7445 CFLAGS="$cf_save_CFLAGS"
7446 CC_SHARED_OPTS=$cf_shared_opts
7447 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
7448 else
7449 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
7450 fi
7451 ;;
7452 (sysv5uw7*|unix_sv*)
7453 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7454 if test "$GCC" != yes; then
7455 CC_SHARED_OPTS='-KPIC'
7456 fi
7457 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7458 ;;
7459 (*)
7460 CC_SHARED_OPTS='unknown'
7461 MK_SHARED_LIB='echo unknown'
7462 ;;
7463 esac
7464
7465 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7466 case "$cf_cv_shlib_version" in
7467 (rel|abi)
7468 case "$MK_SHARED_LIB" in
7469 (*'-o $@')
7470 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7471 ;;
7472 (*)
7473 { echo "$as_me:7473: WARNING: ignored --with-shlib-version" >&5
7474 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7475 ;;
7476 esac
7477 ;;
7478 esac
7479
7480 if test -n "$cf_try_cflags"
7481 then
7482 cat > conftest.$ac_ext <<EOF
7483 #line 7483 "${as_me:-configure}"
7484 #include <stdio.h>
7485 int main(int argc, char *argv[])
7486 {
7487 printf("hello\\n");
7488 return (argv[argc-1] == NULL) ;
7489 }
7490 EOF
7491 cf_save_CFLAGS="$CFLAGS"
7492 for cf_opt in $cf_try_cflags
7493 do
7494 CFLAGS="$cf_save_CFLAGS -$cf_opt"
7495 echo "$as_me:7495: checking if CFLAGS option -$cf_opt works" >&5
7496 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7497 if { (eval echo "$as_me:7497: \"$ac_compile\"") >&5
7498 (eval $ac_compile) 2>&5
7499 ac_status=$?
7500 echo "$as_me:7500: \$? = $ac_status" >&5
7501 (exit "$ac_status"); }; then
7502 echo "$as_me:7502: result: yes" >&5
7503 echo "${ECHO_T}yes" >&6
7504 cf_save_CFLAGS="$CFLAGS"
7505 else
7506 echo "$as_me:7506: result: no" >&5
7507 echo "${ECHO_T}no" >&6
7508 fi
7509 done
7510 CFLAGS="$cf_save_CFLAGS"
7511 fi
7512
7513 # RPATH_LIST is a colon-separated list of directories
7514 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7515 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7516
7517 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7518
7519 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7520
7521 echo "${as_me:-configure}:7521: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7522
7523 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
7524
7525 echo "${as_me:-configure}:7525: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
7526
7527 for model in $cf_list_models ; do
7528 case "$model" in
7529 (libtool)
7530
7531 echo "$as_me:7531: checking for additional libtool options" >&5
7532 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7533
7534 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7535 if test "${with_libtool_opts+set}" = set; then
7536 withval="$with_libtool_opts"
7537 with_libtool_opts=$withval
7538 else
7539 with_libtool_opts=no
7540 fi;
7541 echo "$as_me:7541: result: $with_libtool_opts" >&5
7542 echo "${ECHO_T}$with_libtool_opts" >&6
7543
7544 case .$with_libtool_opts in
7545 (.yes|.no|.)
7546 ;;
7547 (*)
7548 LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7549 ;;
7550 esac
7551
7552 echo "$as_me:7552: checking if exported-symbols file should be used" >&5
7553 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7554
7555 # Check whether --with-export-syms or --without-export-syms was given.
7556 if test "${with_export_syms+set}" = set; then
7557 withval="$with_export_syms"
7558 with_export_syms=$withval
7559 else
7560 with_export_syms=no
7561 fi;
7562 if test "x$with_export_syms" = xyes
7563 then
7564 with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7565
7566 fi
7567 echo "$as_me:7567: result: $with_export_syms" >&5
7568 echo "${ECHO_T}$with_export_syms" >&6
7569 if test "x$with_export_syms" != xno
7570 then
7571 EXPORT_SYMS="-export-symbols $with_export_syms"
7572
7573 fi
7574
7575 ;;
7576 (shared)
7577 if test "$CC_SHARED_OPTS" = "unknown"; then
7578 { { echo "$as_me:7578: error: Shared libraries are not supported in this version" >&5
7579 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7580 { (exit 1); exit 1; }; }
7581 fi
7582 # workaround for inept transition to PIE vs PIC...
7583 echo "$as_me:7583: checking if current CFLAGS link properly" >&5
7584 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7585 cat >"conftest.$ac_ext" <<_ACEOF
7586 #line 7586 "configure"
7587 #include "confdefs.h"
7588 #include <stdio.h>
7589 int
7590 main (void)
7591 {
7592 printf("Hello work\\n");
7593 ;
7594 return 0;
7595 }
7596 _ACEOF
7597 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7598 if { (eval echo "$as_me:7598: \"$ac_link\"") >&5
7599 (eval $ac_link) 2>&5
7600 ac_status=$?
7601 echo "$as_me:7601: \$? = $ac_status" >&5
7602 (exit "$ac_status"); } &&
7603 { ac_try='test -s "conftest$ac_exeext"'
7604 { (eval echo "$as_me:7604: \"$ac_try\"") >&5
7605 (eval $ac_try) 2>&5
7606 ac_status=$?
7607 echo "$as_me:7607: \$? = $ac_status" >&5
7608 (exit "$ac_status"); }; }; then
7609 cf_cflags_work=yes
7610 else
7611 echo "$as_me: failed program was:" >&5
7612 cat "conftest.$ac_ext" >&5
7613 cf_cflags_work=no
7614 fi
7615 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7616 echo "$as_me:7616: result: $cf_cflags_work" >&5
7617 echo "${ECHO_T}$cf_cflags_work" >&6
7618 if test "$cf_cflags_work" = no
7619 then
7620 test -n "$verbose" && echo " try to work around by appending shared-options" 1>&6
7621
7622 echo "${as_me:-configure}:7622: testing try to work around by appending shared-options ..." 1>&5
7623
7624 CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7625 fi
7626
7627 if test "$with_libtool" = "yes" ; then
7628 :
7629 elif test "$with_shared" = "yes" ; then
7630 echo "$as_me:7630: checking if versioned-symbols file should be used" >&5
7631 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7632
7633 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7634 if test "${with_versioned_syms+set}" = set; then
7635 withval="$with_versioned_syms"
7636 with_versioned_syms=$withval
7637 else
7638 with_versioned_syms=no
7639 fi;
7640 case "x$with_versioned_syms" in
7641 (xyes)
7642 with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7643
7644 ;;
7645 (xno)
7646 ;;
7647 (x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
7648 test -f "$with_versioned_syms" || { { echo "$as_me:7648: error: expected a filename: $with_versioned_syms" >&5
7649 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7650 { (exit 1); exit 1; }; }
7651 ;;
7652 (*)
7653 test -f "$with_versioned_syms" || { { echo "$as_me:7653: error: expected a filename: $with_versioned_syms" >&5
7654 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7655 { (exit 1); exit 1; }; }
7656 with_versioned_syms=`pwd`/"$with_versioned_syms"
7657 ;;
7658 esac
7659 echo "$as_me:7659: result: $with_versioned_syms" >&5
7660 echo "${ECHO_T}$with_versioned_syms" >&6
7661
7662 RESULTING_SYMS=
7663 VERSIONED_SYMS=
7664 WILDCARD_SYMS=
7665
7666 if test "x$with_versioned_syms" != xno
7667 then
7668 RESULTING_SYMS=$with_versioned_syms
7669 case "x$MK_SHARED_LIB" in
7670 (*-Wl,*)
7671 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7672 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7673 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
7674
7675 echo "${as_me:-configure}:7675: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
7676
7677 LIB_CREATE="$MK_SHARED_LIB"
7678 ;;
7679 (*-dy\ *)
7680 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7681 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7682 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
7683
7684 echo "${as_me:-configure}:7684: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
7685
7686 LIB_CREATE="$MK_SHARED_LIB"
7687 ;;
7688 (*)
7689 { echo "$as_me:7689: WARNING: this system does not support versioned-symbols" >&5
7690 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7691 ;;
7692 esac
7693
7694 # Linux ld can selectively override scope, e.g., of symbols beginning with
7695 # "_" by first declaring some as global, and then using a wildcard to
7696 # declare the others as local. Some other loaders cannot do this. Check
7697 # by constructing a (very) simple shared library and inspecting its
7698 # symbols.
7699 if test "x$VERSIONED_SYMS" != "x"
7700 then
7701 echo "$as_me:7701: checking if wildcards can be used to selectively omit symbols" >&5
7702 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7703 WILDCARD_SYMS=no
7704
7705 # make sources
7706 rm -f conftest.*
7707
7708 cat >conftest.ver <<EOF
7709 module_1.0 {
7710 global:
7711 globalf1;
7712 local:
7713 localf1;
7714 };
7715 module_2.0 {
7716 global:
7717 globalf2;
7718 local:
7719 localf2;
7720 _*;
7721 } module_1.0;
7722 submodule_1.0 {
7723 global:
7724 subglobalf1;
7725 _ismissing;
7726 local:
7727 sublocalf1;
7728 };
7729 submodule_2.0 {
7730 global:
7731 subglobalf2;
7732 local:
7733 sublocalf2;
7734 _*;
7735 } submodule_1.0;
7736 EOF
7737 cat >conftest.$ac_ext <<EOF
7738 #line 7738 "configure"
7739 extern int _ismissing(void); int _ismissing(void) { return 1; }
7740 extern int _localf1(void); int _localf1(void) { return 1; }
7741 extern int _localf2(void); int _localf2(void) { return 2; }
7742 extern int globalf1(void); int globalf1(void) { return 1; }
7743 extern int globalf2(void); int globalf2(void) { return 2; }
7744 extern int _sublocalf1(void); int _sublocalf1(void) { return 1; }
7745 extern int _sublocalf2(void); int _sublocalf2(void) { return 2; }
7746 extern int subglobalf1(void); int subglobalf1(void) { return 1; }
7747 extern int subglobalf2(void); int subglobalf2(void) { return 2; }
7748 EOF
7749 cat >conftest.mk <<EOF
7750 CC=${CC}
7751 CFLAGS=${CFLAGS}
7752 CPPFLAGS=${CPPFLAGS}
7753 LDFLAGS=${LDFLAGS}
7754 LIBS=${LIBS}
7755 VERSIONED_SYMS=${VERSIONED_SYMS}
7756 RESULTING_SYMS=conftest.ver
7757 MK_SHARED_LIB=${MK_SHARED_LIB}
7758 conftest.so: conftest.$ac_cv_objext
7759 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7760 EOF
7761
7762 # compile source, make library
7763 if make -f conftest.mk 2>&5 >/dev/null
7764 then
7765 # test for missing symbol in either Data or Text section
7766 cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[ ][DT][ ]'`"
7767 test -n "$cf_missing" && WILDCARD_SYMS=yes
7768 fi
7769 echo "$as_me:7769: result: $WILDCARD_SYMS" >&5
7770 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7771 rm -f conftest.*
7772 fi
7773 fi
7774
7775 fi
7776
7777 ;;
7778 esac
7779 done
7780
7781 ### Checks for special libraries, must be done up-front.
7782 SHLIB_LIST=""
7783
7784 echo "$as_me:7784: checking if you want to link with the GPM mouse library" >&5
7785 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7786
7787 # Check whether --with-gpm or --without-gpm was given.
7788 if test "${with_gpm+set}" = set; then
7789 withval="$with_gpm"
7790 with_gpm=$withval
7791 else
7792 with_gpm=maybe
7793 fi;
7794 echo "$as_me:7794: result: $with_gpm" >&5
7795 echo "${ECHO_T}$with_gpm" >&6
7796
7797 if test "$with_gpm" != no ; then
7798 echo "$as_me:7798: checking for gpm.h" >&5
7799 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7800 if test "${ac_cv_header_gpm_h+set}" = set; then
7801 echo $ECHO_N "(cached) $ECHO_C" >&6
7802 else
7803 cat >"conftest.$ac_ext" <<_ACEOF
7804 #line 7804 "configure"
7805 #include "confdefs.h"
7806 #include <gpm.h>
7807 _ACEOF
7808 if { (eval echo "$as_me:7808: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7809 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7810 ac_status=$?
7811 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7812 rm -f conftest.er1
7813 cat conftest.err >&5
7814 echo "$as_me:7814: \$? = $ac_status" >&5
7815 (exit "$ac_status"); } >/dev/null; then
7816 if test -s conftest.err; then
7817 ac_cpp_err=$ac_c_preproc_warn_flag
7818 else
7819 ac_cpp_err=
7820 fi
7821 else
7822 ac_cpp_err=yes
7823 fi
7824 if test -z "$ac_cpp_err"; then
7825 ac_cv_header_gpm_h=yes
7826 else
7827 echo "$as_me: failed program was:" >&5
7828 cat "conftest.$ac_ext" >&5
7829 ac_cv_header_gpm_h=no
7830 fi
7831 rm -f conftest.err "conftest.$ac_ext"
7832 fi
7833 echo "$as_me:7833: result: $ac_cv_header_gpm_h" >&5
7834 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7835 if test "$ac_cv_header_gpm_h" = yes; then
7836
7837 cat >>confdefs.h <<\EOF
7838 #define HAVE_GPM_H 1
7839 EOF
7840
7841 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7842 test -n "$verbose" && echo " assuming we really have GPM library" 1>&6
7843
7844 echo "${as_me:-configure}:7844: testing assuming we really have GPM library ..." 1>&5
7845
7846 cat >>confdefs.h <<\EOF
7847 #define HAVE_LIBGPM 1
7848 EOF
7849
7850 with_gpm=yes
7851 else
7852 echo "$as_me:7852: checking for Gpm_Open in -lgpm" >&5
7853 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7854 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7855 echo $ECHO_N "(cached) $ECHO_C" >&6
7856 else
7857 ac_check_lib_save_LIBS=$LIBS
7858 LIBS="-lgpm $LIBS"
7859 cat >"conftest.$ac_ext" <<_ACEOF
7860 #line 7860 "configure"
7861 #include "confdefs.h"
7862
7863 /* Override any gcc2 internal prototype to avoid an error. */
7864 #ifdef __cplusplus
7865 extern "C"
7866 #endif
7867 /* We use char because int might match the return type of a gcc2
7868 builtin and then its argument prototype would still apply. */
7869 char Gpm_Open (void);
7870 int
7871 main (void)
7872 {
7873 Gpm_Open ();
7874 ;
7875 return 0;
7876 }
7877 _ACEOF
7878 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7879 if { (eval echo "$as_me:7879: \"$ac_link\"") >&5
7880 (eval $ac_link) 2>&5
7881 ac_status=$?
7882 echo "$as_me:7882: \$? = $ac_status" >&5
7883 (exit "$ac_status"); } &&
7884 { ac_try='test -s "conftest$ac_exeext"'
7885 { (eval echo "$as_me:7885: \"$ac_try\"") >&5
7886 (eval $ac_try) 2>&5
7887 ac_status=$?
7888 echo "$as_me:7888: \$? = $ac_status" >&5
7889 (exit "$ac_status"); }; }; then
7890 ac_cv_lib_gpm_Gpm_Open=yes
7891 else
7892 echo "$as_me: failed program was:" >&5
7893 cat "conftest.$ac_ext" >&5
7894 ac_cv_lib_gpm_Gpm_Open=no
7895 fi
7896 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7897 LIBS=$ac_check_lib_save_LIBS
7898 fi
7899 echo "$as_me:7899: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7900 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7901 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7902 with_gpm=yes
7903 else
7904
7905 if test "$with_gpm" = maybe; then
7906 { echo "$as_me:7906: WARNING: Cannot link with GPM library" >&5
7907 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7908 with_gpm=no
7909 else
7910 { { echo "$as_me:7910: error: Cannot link with GPM library" >&5
7911 echo "$as_me: error: Cannot link with GPM library" >&2;}
7912 { (exit 1); exit 1; }; }
7913 fi
7914
7915 fi
7916
7917 fi
7918
7919 else
7920
7921 test "$with_gpm" != maybe && { echo "$as_me:7921: WARNING: Cannot find GPM header" >&5
7922 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7923 with_gpm=no
7924
7925 fi
7926
7927 fi
7928
7929 if test "$with_gpm" != no ; then
7930 echo "$as_me:7930: checking if you want to load GPM dynamically" >&5
7931 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7932
7933 # Check whether --with-dlsym or --without-dlsym was given.
7934 if test "${with_dlsym+set}" = set; then
7935 withval="$with_dlsym"
7936 with_dlsym=$withval
7937 else
7938 with_dlsym=yes
7939 fi;
7940 echo "$as_me:7940: result: $with_dlsym" >&5
7941 echo "${ECHO_T}$with_dlsym" >&6
7942 if test "x$with_dlsym" = xyes ; then
7943
7944 cf_have_dlsym=no
7945 echo "$as_me:7945: checking for dlsym" >&5
7946 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7947 if test "${ac_cv_func_dlsym+set}" = set; then
7948 echo $ECHO_N "(cached) $ECHO_C" >&6
7949 else
7950 cat >"conftest.$ac_ext" <<_ACEOF
7951 #line 7951 "configure"
7952 #include "confdefs.h"
7953 #define dlsym autoconf_temporary
7954 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7955 #undef dlsym
7956
7957 #ifdef __cplusplus
7958 extern "C"
7959 #endif
7960
7961 /* We use char because int might match the return type of a gcc2
7962 builtin and then its argument prototype would still apply. */
7963 char dlsym (void);
7964
7965 int
7966 main (void)
7967 {
7968
7969 /* The GNU C library defines stubs for functions which it implements
7970 to always fail with ENOSYS. Some functions are actually named
7971 something starting with __ and the normal name is an alias. */
7972 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7973 #error found stub for dlsym
7974 #endif
7975
7976 return dlsym ();
7977 ;
7978 return 0;
7979 }
7980 _ACEOF
7981 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7982 if { (eval echo "$as_me:7982: \"$ac_link\"") >&5
7983 (eval $ac_link) 2>&5
7984 ac_status=$?
7985 echo "$as_me:7985: \$? = $ac_status" >&5
7986 (exit "$ac_status"); } &&
7987 { ac_try='test -s "conftest$ac_exeext"'
7988 { (eval echo "$as_me:7988: \"$ac_try\"") >&5
7989 (eval $ac_try) 2>&5
7990 ac_status=$?
7991 echo "$as_me:7991: \$? = $ac_status" >&5
7992 (exit "$ac_status"); }; }; then
7993 ac_cv_func_dlsym=yes
7994 else
7995 echo "$as_me: failed program was:" >&5
7996 cat "conftest.$ac_ext" >&5
7997 ac_cv_func_dlsym=no
7998 fi
7999 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8000 fi
8001 echo "$as_me:8001: result: $ac_cv_func_dlsym" >&5
8002 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
8003 if test "$ac_cv_func_dlsym" = yes; then
8004 cf_have_dlsym=yes
8005 else
8006
8007 cf_have_libdl=no
8008 echo "$as_me:8008: checking for dlsym in -ldl" >&5
8009 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
8010 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
8011 echo $ECHO_N "(cached) $ECHO_C" >&6
8012 else
8013 ac_check_lib_save_LIBS=$LIBS
8014 LIBS="-ldl $LIBS"
8015 cat >"conftest.$ac_ext" <<_ACEOF
8016 #line 8016 "configure"
8017 #include "confdefs.h"
8018
8019 /* Override any gcc2 internal prototype to avoid an error. */
8020 #ifdef __cplusplus
8021 extern "C"
8022 #endif
8023 /* We use char because int might match the return type of a gcc2
8024 builtin and then its argument prototype would still apply. */
8025 char dlsym (void);
8026 int
8027 main (void)
8028 {
8029 dlsym ();
8030 ;
8031 return 0;
8032 }
8033 _ACEOF
8034 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8035 if { (eval echo "$as_me:8035: \"$ac_link\"") >&5
8036 (eval $ac_link) 2>&5
8037 ac_status=$?
8038 echo "$as_me:8038: \$? = $ac_status" >&5
8039 (exit "$ac_status"); } &&
8040 { ac_try='test -s "conftest$ac_exeext"'
8041 { (eval echo "$as_me:8041: \"$ac_try\"") >&5
8042 (eval $ac_try) 2>&5
8043 ac_status=$?
8044 echo "$as_me:8044: \$? = $ac_status" >&5
8045 (exit "$ac_status"); }; }; then
8046 ac_cv_lib_dl_dlsym=yes
8047 else
8048 echo "$as_me: failed program was:" >&5
8049 cat "conftest.$ac_ext" >&5
8050 ac_cv_lib_dl_dlsym=no
8051 fi
8052 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8053 LIBS=$ac_check_lib_save_LIBS
8054 fi
8055 echo "$as_me:8055: result: $ac_cv_lib_dl_dlsym" >&5
8056 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
8057 if test "$ac_cv_lib_dl_dlsym" = yes; then
8058
8059 cf_have_dlsym=yes
8060 cf_have_libdl=yes
8061 fi
8062
8063 fi
8064
8065 if test "$cf_have_dlsym" = yes ; then
8066 test "$cf_have_libdl" = yes && {
8067 cf_add_libs="$LIBS"
8068 # reverse order
8069 cf_add_0lib=
8070 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8071 # filter duplicates
8072 for cf_add_1lib in $cf_add_0lib; do
8073 for cf_add_2lib in $cf_add_libs; do
8074 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8075 cf_add_1lib=
8076 break
8077 fi
8078 done
8079 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8080 done
8081 LIBS="$cf_add_libs"
8082 }
8083
8084 echo "$as_me:8084: checking whether able to link to dl*() functions" >&5
8085 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
8086 cat >"conftest.$ac_ext" <<_ACEOF
8087 #line 8087 "configure"
8088 #include "confdefs.h"
8089
8090 #include <stdio.h>
8091 #include <dlfcn.h>
8092
8093 int
8094 main (void)
8095 {
8096
8097 void *obj;
8098 if ((obj = dlopen("filename", 0)) != NULL) {
8099 if (dlsym(obj, "symbolname") == 0) {
8100 dlclose(obj);
8101 }
8102 }
8103 ;
8104 return 0;
8105 }
8106 _ACEOF
8107 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8108 if { (eval echo "$as_me:8108: \"$ac_link\"") >&5
8109 (eval $ac_link) 2>&5
8110 ac_status=$?
8111 echo "$as_me:8111: \$? = $ac_status" >&5
8112 (exit "$ac_status"); } &&
8113 { ac_try='test -s "conftest$ac_exeext"'
8114 { (eval echo "$as_me:8114: \"$ac_try\"") >&5
8115 (eval $ac_try) 2>&5
8116 ac_status=$?
8117 echo "$as_me:8117: \$? = $ac_status" >&5
8118 (exit "$ac_status"); }; }; then
8119
8120 cat >>confdefs.h <<\EOF
8121 #define HAVE_LIBDL 1
8122 EOF
8123
8124 else
8125 echo "$as_me: failed program was:" >&5
8126 cat "conftest.$ac_ext" >&5
8127
8128 { { echo "$as_me:8128: error: Cannot link test program for libdl" >&5
8129 echo "$as_me: error: Cannot link test program for libdl" >&2;}
8130 { (exit 1); exit 1; }; }
8131 fi
8132 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8133 echo "$as_me:8133: result: ok" >&5
8134 echo "${ECHO_T}ok" >&6
8135 else
8136 { { echo "$as_me:8136: error: Cannot find dlsym function" >&5
8137 echo "$as_me: error: Cannot find dlsym function" >&2;}
8138 { (exit 1); exit 1; }; }
8139 fi
8140
8141 if test "x$with_gpm" != xyes ; then
8142 test -n "$verbose" && echo " assuming soname for gpm is $with_gpm" 1>&6
8143
8144 echo "${as_me:-configure}:8144: testing assuming soname for gpm is $with_gpm ..." 1>&5
8145
8146 cf_cv_gpm_soname="$with_gpm"
8147 else
8148
8149 echo "$as_me:8149: checking for soname of gpm library" >&5
8150 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
8151 if test "${cf_cv_gpm_soname+set}" = set; then
8152 echo $ECHO_N "(cached) $ECHO_C" >&6
8153 else
8154
8155 cf_cv_gpm_soname=unknown
8156 if test "$cross_compiling" != yes ; then
8157 cat >conftest.$ac_ext <<CF_EOF
8158 #include <gpm.h>
8159 int main(void)
8160 {
8161 if (Gpm_Open(0,0)) Gpm_Close();
8162 ${cf_cv_main_return:-return}(0);
8163 }
8164 CF_EOF
8165 cf_save_LIBS="$LIBS"
8166
8167 cf_add_libs="$LIBS"
8168 # reverse order
8169 cf_add_0lib=
8170 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8171 # filter duplicates
8172 for cf_add_1lib in $cf_add_0lib; do
8173 for cf_add_2lib in $cf_add_libs; do
8174 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8175 cf_add_1lib=
8176 break
8177 fi
8178 done
8179 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8180 done
8181 LIBS="$cf_add_libs"
8182
8183 if { (eval echo "$as_me:8183: \"$ac_compile\"") >&5
8184 (eval $ac_compile) 2>&5
8185 ac_status=$?
8186 echo "$as_me:8186: \$? = $ac_status" >&5
8187 (exit "$ac_status"); } ; then
8188 if { (eval echo "$as_me:8188: \"$ac_link\"") >&5
8189 (eval $ac_link) 2>&5
8190 ac_status=$?
8191 echo "$as_me:8191: \$? = $ac_status" >&5
8192 (exit "$ac_status"); } ; then
8193 cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
8194 test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
8195 fi
8196 fi
8197 rm -rf ./conftest*
8198 LIBS="$cf_save_LIBS"
8199 fi
8200
8201 fi
8202 echo "$as_me:8202: result: $cf_cv_gpm_soname" >&5
8203 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
8204
8205 fi
8206 test "$cf_cv_gpm_soname" != "unknown" &&
8207 cat >>confdefs.h <<EOF
8208 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
8209 EOF
8210
8211 SHLIB_LIST="-ldl $SHLIB_LIST"
8212
8213 cf_add_libs="$PRIVATE_LIBS"
8214 # reverse order
8215 cf_add_0lib=
8216 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8217 # filter duplicates
8218 for cf_add_1lib in $cf_add_0lib; do
8219 for cf_add_2lib in $cf_add_libs; do
8220 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8221 cf_add_1lib=
8222 break
8223 fi
8224 done
8225 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8226 done
8227 PRIVATE_LIBS="$cf_add_libs"
8228
8229 else
8230 SHLIB_LIST="-lgpm $SHLIB_LIST"
8231
8232 cf_add_libs="$TEST_LIBS"
8233 # reverse order
8234 cf_add_0lib=
8235 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8236 # filter duplicates
8237 for cf_add_1lib in $cf_add_0lib; do
8238 for cf_add_2lib in $cf_add_libs; do
8239 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8240 cf_add_1lib=
8241 break
8242 fi
8243 done
8244 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8245 done
8246 TEST_LIBS="$cf_add_libs"
8247
8248 cf_add_libs="$PRIVATE_LIBS"
8249 # reverse order
8250 cf_add_0lib=
8251 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8252 # filter duplicates
8253 for cf_add_1lib in $cf_add_0lib; do
8254 for cf_add_2lib in $cf_add_libs; do
8255 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8256 cf_add_1lib=
8257 break
8258 fi
8259 done
8260 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8261 done
8262 PRIVATE_LIBS="$cf_add_libs"
8263
8264 fi
8265
8266 cat >>confdefs.h <<\EOF
8267 #define HAVE_LIBGPM 1
8268 EOF
8269
8270 echo "$as_me:8270: checking for Gpm_Wgetch in -lgpm" >&5
8271 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
8272 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
8273 echo $ECHO_N "(cached) $ECHO_C" >&6
8274 else
8275 ac_check_lib_save_LIBS=$LIBS
8276 LIBS="-lgpm $LIBS"
8277 cat >"conftest.$ac_ext" <<_ACEOF
8278 #line 8278 "configure"
8279 #include "confdefs.h"
8280
8281 /* Override any gcc2 internal prototype to avoid an error. */
8282 #ifdef __cplusplus
8283 extern "C"
8284 #endif
8285 /* We use char because int might match the return type of a gcc2
8286 builtin and then its argument prototype would still apply. */
8287 char Gpm_Wgetch (void);
8288 int
8289 main (void)
8290 {
8291 Gpm_Wgetch ();
8292 ;
8293 return 0;
8294 }
8295 _ACEOF
8296 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8297 if { (eval echo "$as_me:8297: \"$ac_link\"") >&5
8298 (eval $ac_link) 2>&5
8299 ac_status=$?
8300 echo "$as_me:8300: \$? = $ac_status" >&5
8301 (exit "$ac_status"); } &&
8302 { ac_try='test -s "conftest$ac_exeext"'
8303 { (eval echo "$as_me:8303: \"$ac_try\"") >&5
8304 (eval $ac_try) 2>&5
8305 ac_status=$?
8306 echo "$as_me:8306: \$? = $ac_status" >&5
8307 (exit "$ac_status"); }; }; then
8308 ac_cv_lib_gpm_Gpm_Wgetch=yes
8309 else
8310 echo "$as_me: failed program was:" >&5
8311 cat "conftest.$ac_ext" >&5
8312 ac_cv_lib_gpm_Gpm_Wgetch=no
8313 fi
8314 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8315 LIBS=$ac_check_lib_save_LIBS
8316 fi
8317 echo "$as_me:8317: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
8318 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
8319 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
8320
8321 echo "$as_me:8321: checking if GPM is weakly bound to curses library" >&5
8322 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
8323 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
8324 echo $ECHO_N "(cached) $ECHO_C" >&6
8325 else
8326
8327 cf_cv_check_gpm_wgetch=unknown
8328 if test "$cross_compiling" != yes ; then
8329
8330 cat >conftest.$ac_ext <<CF_EOF
8331 #include <gpm.h>
8332 int main(void)
8333 {
8334 Gpm_Wgetch();
8335 ${cf_cv_main_return:-return}(0);
8336 }
8337 CF_EOF
8338
8339 cf_save_LIBS="$LIBS"
8340 # This only works if we can look at the symbol table. If a shared
8341 # library is stripped for install, we cannot use that. So we're forced
8342 # to rely on the static library, noting that some packagers may not
8343 # include it.
8344 LIBS="-static -lgpm -dynamic $LIBS"
8345 if { (eval echo "$as_me:8345: \"$ac_compile\"") >&5
8346 (eval $ac_compile) 2>&5
8347 ac_status=$?
8348 echo "$as_me:8348: \$? = $ac_status" >&5
8349 (exit "$ac_status"); } ; then
8350 if { (eval echo "$as_me:8350: \"$ac_link\"") >&5
8351 (eval $ac_link) 2>&5
8352 ac_status=$?
8353 echo "$as_me:8353: \$? = $ac_status" >&5
8354 (exit "$ac_status"); } ; then
8355 cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8356 test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8357 test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8358 fi
8359 fi
8360 rm -rf ./conftest*
8361 LIBS="$cf_save_LIBS"
8362 fi
8363
8364 fi
8365 echo "$as_me:8365: result: $cf_cv_check_gpm_wgetch" >&5
8366 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8367
8368 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8369 { echo "$as_me:8369: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8370 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8371 fi
8372
8373 fi
8374
8375 fi
8376
8377 echo "$as_me:8377: checking if you want to use PCRE2 for regular-expressions" >&5
8378 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8379
8380 # Check whether --with-pcre2 or --without-pcre2 was given.
8381 if test "${with_pcre2+set}" = set; then
8382 withval="$with_pcre2"
8383
8384 fi;
8385 test -z "$with_pcre2" && with_pcre2=no
8386 echo "$as_me:8386: result: $with_pcre2" >&5
8387 echo "${ECHO_T}$with_pcre2" >&6
8388
8389 if test "x$with_pcre2" != xno ; then
8390 cf_with_pcre2_ok=no
8391 for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8392 do
8393
8394 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8395 test -n "$verbose" && echo " found package $cf_with_pcre2" 1>&6
8396
8397 echo "${as_me:-configure}:8397: testing found package $cf_with_pcre2 ..." 1>&5
8398
8399 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8400 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_with_pcre2" 2>/dev/null`"
8401 test -n "$verbose" && echo " package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8402
8403 echo "${as_me:-configure}:8403: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8404
8405 test -n "$verbose" && echo " package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8406
8407 echo "${as_me:-configure}:8407: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8408
8409 for cf_required in $cf_with_pcre2
8410 do
8411 # check for duplicates
8412 for cf_require_pkg in $REQUIRE_PKG
8413 do
8414 if test "$cf_required" = "$cf_require_pkg"
8415 then
8416 cf_required=
8417 break
8418 fi
8419 done
8420 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
8421 done
8422
8423 cf_fix_cppflags=no
8424 cf_new_cflags=
8425 cf_new_cppflags=
8426 cf_new_extra_cppflags=
8427
8428 for cf_add_cflags in $cf_pkgconfig_incs
8429 do
8430 case "$cf_fix_cppflags" in
8431 (no)
8432 case "$cf_add_cflags" in
8433 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8434 case "$cf_add_cflags" in
8435 (-D*)
8436 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8437
8438 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8439 && test -z "${cf_tst_cflags}" \
8440 && cf_fix_cppflags=yes
8441
8442 if test "$cf_fix_cppflags" = yes ; then
8443
8444 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8445 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8446
8447 continue
8448 elif test "${cf_tst_cflags}" = "\"'" ; then
8449
8450 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8451 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8452
8453 continue
8454 fi
8455 ;;
8456 esac
8457 case "$CPPFLAGS" in
8458 (*$cf_add_cflags)
8459 ;;
8460 (*)
8461 case "$cf_add_cflags" in
8462 (-D*)
8463 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8464
8465 CPPFLAGS=`echo "$CPPFLAGS" | \
8466 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8467 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8468
8469 ;;
8470 esac
8471
8472 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8473 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8474
8475 ;;
8476 esac
8477 ;;
8478 (*)
8479
8480 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8481 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8482
8483 ;;
8484 esac
8485 ;;
8486 (yes)
8487
8488 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8489 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8490
8491 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8492
8493 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8494 && test -z "${cf_tst_cflags}" \
8495 && cf_fix_cppflags=no
8496 ;;
8497 esac
8498 done
8499
8500 if test -n "$cf_new_cflags" ; then
8501
8502 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8503 CFLAGS="${CFLAGS}$cf_new_cflags"
8504
8505 fi
8506
8507 if test -n "$cf_new_cppflags" ; then
8508
8509 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8510 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8511
8512 fi
8513
8514 if test -n "$cf_new_extra_cppflags" ; then
8515
8516 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8517 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8518
8519 fi
8520
8521 cf_add_libs="$LIBS"
8522 # reverse order
8523 cf_add_0lib=
8524 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8525 # filter duplicates
8526 for cf_add_1lib in $cf_add_0lib; do
8527 for cf_add_2lib in $cf_add_libs; do
8528 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8529 cf_add_1lib=
8530 break
8531 fi
8532 done
8533 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8534 done
8535 LIBS="$cf_add_libs"
8536
8537 cf_with_pcre2_ok=yes; break
8538 else
8539 cf_pkgconfig_incs=
8540 cf_pkgconfig_libs=
8541 :
8542 fi
8543
8544 done
8545 cf_with_pcre2_ok=yes || { { echo "$as_me:8545: error: Cannot find PCRE2 library" >&5
8546 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8547 { (exit 1); exit 1; }; }
8548
8549 cat >>confdefs.h <<\EOF
8550 #define HAVE_LIB_PCRE2 1
8551 EOF
8552
8553 # if pkgconfig gave no results, look for the libraries directly
8554 case "$LIBS" in
8555 (*pcre2-posix*|*pcreposix*)
8556 ;;
8557 (*)
8558 echo "$as_me:8558: checking for regcomp in -lpcre2-posix" >&5
8559 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8560 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8561 echo $ECHO_N "(cached) $ECHO_C" >&6
8562 else
8563 ac_check_lib_save_LIBS=$LIBS
8564 LIBS="-lpcre2-posix $LIBS"
8565 cat >"conftest.$ac_ext" <<_ACEOF
8566 #line 8566 "configure"
8567 #include "confdefs.h"
8568
8569 /* Override any gcc2 internal prototype to avoid an error. */
8570 #ifdef __cplusplus
8571 extern "C"
8572 #endif
8573 /* We use char because int might match the return type of a gcc2
8574 builtin and then its argument prototype would still apply. */
8575 char regcomp (void);
8576 int
8577 main (void)
8578 {
8579 regcomp ();
8580 ;
8581 return 0;
8582 }
8583 _ACEOF
8584 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8585 if { (eval echo "$as_me:8585: \"$ac_link\"") >&5
8586 (eval $ac_link) 2>&5
8587 ac_status=$?
8588 echo "$as_me:8588: \$? = $ac_status" >&5
8589 (exit "$ac_status"); } &&
8590 { ac_try='test -s "conftest$ac_exeext"'
8591 { (eval echo "$as_me:8591: \"$ac_try\"") >&5
8592 (eval $ac_try) 2>&5
8593 ac_status=$?
8594 echo "$as_me:8594: \$? = $ac_status" >&5
8595 (exit "$ac_status"); }; }; then
8596 ac_cv_lib_pcre2_posix_regcomp=yes
8597 else
8598 echo "$as_me: failed program was:" >&5
8599 cat "conftest.$ac_ext" >&5
8600 ac_cv_lib_pcre2_posix_regcomp=no
8601 fi
8602 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8603 LIBS=$ac_check_lib_save_LIBS
8604 fi
8605 echo "$as_me:8605: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8606 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8607 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8608
8609 cf_add_libs="$LIBS"
8610 # reverse order
8611 cf_add_0lib=
8612 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8613 # filter duplicates
8614 for cf_add_1lib in $cf_add_0lib; do
8615 for cf_add_2lib in $cf_add_libs; do
8616 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8617 cf_add_1lib=
8618 break
8619 fi
8620 done
8621 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8622 done
8623 LIBS="$cf_add_libs"
8624
8625 else
8626 echo "$as_me:8626: checking for regcomp in -lpcreposix" >&5
8627 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8628 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8629 echo $ECHO_N "(cached) $ECHO_C" >&6
8630 else
8631 ac_check_lib_save_LIBS=$LIBS
8632 LIBS="-lpcreposix $LIBS"
8633 cat >"conftest.$ac_ext" <<_ACEOF
8634 #line 8634 "configure"
8635 #include "confdefs.h"
8636
8637 /* Override any gcc2 internal prototype to avoid an error. */
8638 #ifdef __cplusplus
8639 extern "C"
8640 #endif
8641 /* We use char because int might match the return type of a gcc2
8642 builtin and then its argument prototype would still apply. */
8643 char regcomp (void);
8644 int
8645 main (void)
8646 {
8647 regcomp ();
8648 ;
8649 return 0;
8650 }
8651 _ACEOF
8652 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8653 if { (eval echo "$as_me:8653: \"$ac_link\"") >&5
8654 (eval $ac_link) 2>&5
8655 ac_status=$?
8656 echo "$as_me:8656: \$? = $ac_status" >&5
8657 (exit "$ac_status"); } &&
8658 { ac_try='test -s "conftest$ac_exeext"'
8659 { (eval echo "$as_me:8659: \"$ac_try\"") >&5
8660 (eval $ac_try) 2>&5
8661 ac_status=$?
8662 echo "$as_me:8662: \$? = $ac_status" >&5
8663 (exit "$ac_status"); }; }; then
8664 ac_cv_lib_pcreposix_regcomp=yes
8665 else
8666 echo "$as_me: failed program was:" >&5
8667 cat "conftest.$ac_ext" >&5
8668 ac_cv_lib_pcreposix_regcomp=no
8669 fi
8670 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8671 LIBS=$ac_check_lib_save_LIBS
8672 fi
8673 echo "$as_me:8673: result: $ac_cv_lib_pcreposix_regcomp" >&5
8674 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8675 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8676
8677 cf_add_libs="$LIBS"
8678 # reverse order
8679 cf_add_0lib=
8680 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8681 # filter duplicates
8682 for cf_add_1lib in $cf_add_0lib; do
8683 for cf_add_2lib in $cf_add_libs; do
8684 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8685 cf_add_1lib=
8686 break
8687 fi
8688 done
8689 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8690 done
8691 LIBS="$cf_add_libs"
8692
8693 else
8694 { { echo "$as_me:8694: error: Cannot find PCRE2 POSIX library" >&5
8695 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8696 { (exit 1); exit 1; }; }
8697 fi
8698
8699 fi
8700
8701 ;;
8702 esac
8703
8704 # either way, check for the library header files
8705
8706 for ac_header in pcre2posix.h pcreposix.h
8707 do
8708 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8709 echo "$as_me:8709: checking for $ac_header" >&5
8710 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8711 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8712 echo $ECHO_N "(cached) $ECHO_C" >&6
8713 else
8714 cat >"conftest.$ac_ext" <<_ACEOF
8715 #line 8715 "configure"
8716 #include "confdefs.h"
8717 #include <$ac_header>
8718 _ACEOF
8719 if { (eval echo "$as_me:8719: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8720 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8721 ac_status=$?
8722 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8723 rm -f conftest.er1
8724 cat conftest.err >&5
8725 echo "$as_me:8725: \$? = $ac_status" >&5
8726 (exit "$ac_status"); } >/dev/null; then
8727 if test -s conftest.err; then
8728 ac_cpp_err=$ac_c_preproc_warn_flag
8729 else
8730 ac_cpp_err=
8731 fi
8732 else
8733 ac_cpp_err=yes
8734 fi
8735 if test -z "$ac_cpp_err"; then
8736 eval "$as_ac_Header=yes"
8737 else
8738 echo "$as_me: failed program was:" >&5
8739 cat "conftest.$ac_ext" >&5
8740 eval "$as_ac_Header=no"
8741 fi
8742 rm -f conftest.err "conftest.$ac_ext"
8743 fi
8744 echo "$as_me:8744: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8745 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8746 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8747 cat >>confdefs.h <<EOF
8748 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8749 EOF
8750
8751 fi
8752 done
8753
8754 for ac_func in PCRE2regcomp
8755 do
8756 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8757 echo "$as_me:8757: checking for $ac_func" >&5
8758 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8759 if eval "test \"\${$as_ac_var+set}\" = set"; then
8760 echo $ECHO_N "(cached) $ECHO_C" >&6
8761 else
8762 cat >"conftest.$ac_ext" <<_ACEOF
8763 #line 8763 "configure"
8764 #include "confdefs.h"
8765 #define $ac_func autoconf_temporary
8766 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8767 #undef $ac_func
8768
8769 #ifdef __cplusplus
8770 extern "C"
8771 #endif
8772
8773 /* We use char because int might match the return type of a gcc2
8774 builtin and then its argument prototype would still apply. */
8775 char $ac_func (void);
8776
8777 int
8778 main (void)
8779 {
8780
8781 /* The GNU C library defines stubs for functions which it implements
8782 to always fail with ENOSYS. Some functions are actually named
8783 something starting with __ and the normal name is an alias. */
8784 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8785 #error found stub for $ac_func
8786 #endif
8787
8788 return $ac_func ();
8789 ;
8790 return 0;
8791 }
8792 _ACEOF
8793 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8794 if { (eval echo "$as_me:8794: \"$ac_link\"") >&5
8795 (eval $ac_link) 2>&5
8796 ac_status=$?
8797 echo "$as_me:8797: \$? = $ac_status" >&5
8798 (exit "$ac_status"); } &&
8799 { ac_try='test -s "conftest$ac_exeext"'
8800 { (eval echo "$as_me:8800: \"$ac_try\"") >&5
8801 (eval $ac_try) 2>&5
8802 ac_status=$?
8803 echo "$as_me:8803: \$? = $ac_status" >&5
8804 (exit "$ac_status"); }; }; then
8805 eval "$as_ac_var=yes"
8806 else
8807 echo "$as_me: failed program was:" >&5
8808 cat "conftest.$ac_ext" >&5
8809 eval "$as_ac_var=no"
8810 fi
8811 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8812 fi
8813 echo "$as_me:8813: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8814 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8815 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8816 cat >>confdefs.h <<EOF
8817 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8818 EOF
8819
8820 fi
8821 done
8822
8823 fi
8824
8825 # not everyone has "test -c"
8826 if test -c /dev/sysmouse 2>/dev/null ; then
8827 echo "$as_me:8827: checking if you want to use sysmouse" >&5
8828 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8829
8830 # Check whether --with-sysmouse or --without-sysmouse was given.
8831 if test "${with_sysmouse+set}" = set; then
8832 withval="$with_sysmouse"
8833 cf_with_sysmouse=$withval
8834 else
8835 cf_with_sysmouse=maybe
8836 fi;
8837 if test "$cf_with_sysmouse" != no ; then
8838 cat >"conftest.$ac_ext" <<_ACEOF
8839 #line 8839 "configure"
8840 #include "confdefs.h"
8841
8842 #include <osreldate.h>
8843 #if (__FreeBSD_version >= 400017)
8844 #include <sys/consio.h>
8845 #include <sys/fbio.h>
8846 #else
8847 #include <machine/console.h>
8848 #endif
8849
8850 int
8851 main (void)
8852 {
8853
8854 struct mouse_info the_mouse;
8855 ioctl(0, CONS_MOUSECTL, &the_mouse);
8856
8857 ;
8858 return 0;
8859 }
8860 _ACEOF
8861 rm -f "conftest.$ac_objext"
8862 if { (eval echo "$as_me:8862: \"$ac_compile\"") >&5
8863 (eval $ac_compile) 2>&5
8864 ac_status=$?
8865 echo "$as_me:8865: \$? = $ac_status" >&5
8866 (exit "$ac_status"); } &&
8867 { ac_try='test -s "conftest.$ac_objext"'
8868 { (eval echo "$as_me:8868: \"$ac_try\"") >&5
8869 (eval $ac_try) 2>&5
8870 ac_status=$?
8871 echo "$as_me:8871: \$? = $ac_status" >&5
8872 (exit "$ac_status"); }; }; then
8873 cf_with_sysmouse=yes
8874 else
8875 echo "$as_me: failed program was:" >&5
8876 cat "conftest.$ac_ext" >&5
8877 cf_with_sysmouse=no
8878 fi
8879 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8880 fi
8881 echo "$as_me:8881: result: $cf_with_sysmouse" >&5
8882 echo "${ECHO_T}$cf_with_sysmouse" >&6
8883 test "$cf_with_sysmouse" = yes &&
8884 cat >>confdefs.h <<\EOF
8885 #define USE_SYSMOUSE 1
8886 EOF
8887
8888 fi
8889
8890 # pretend that ncurses==ncursesw==ncursest
8891 echo "$as_me:8891: checking if you want to disable library suffixes" >&5
8892 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8893
8894 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8895 if test "${enable_lib_suffixes+set}" = set; then
8896 enableval="$enable_lib_suffixes"
8897 test "$enableval" != no && enableval=yes
8898 if test "$enableval" != "yes" ; then
8899 disable_lib_suffixes=yes
8900 else
8901 disable_lib_suffixes=no
8902 fi
8903 else
8904 enableval=yes
8905 disable_lib_suffixes=no
8906
8907 fi;
8908 echo "$as_me:8908: result: $disable_lib_suffixes" >&5
8909 echo "${ECHO_T}$disable_lib_suffixes" >&6
8910
8911 ### If we're building with rpath, try to link non-standard libs that way too.
8912 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8913
8914 echo "$as_me:8914: checking if rpath-hack should be disabled" >&5
8915 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8916
8917 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8918 if test "${enable_rpath_hack+set}" = set; then
8919 enableval="$enable_rpath_hack"
8920 test "$enableval" != no && enableval=yes
8921 if test "$enableval" != "yes" ; then
8922 enable_rpath_hack=no
8923 else
8924 enable_rpath_hack=yes
8925 fi
8926 else
8927 enableval=yes
8928 enable_rpath_hack=yes
8929
8930 fi;
8931 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8932 echo "$as_me:8932: result: $cf_disable_rpath_hack" >&5
8933 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8934
8935 if test "$enable_rpath_hack" = yes ; then
8936
8937 echo "$as_me:8937: checking for updated LDFLAGS" >&5
8938 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8939 if test -n "$LD_RPATH_OPT" ; then
8940 echo "$as_me:8940: result: maybe" >&5
8941 echo "${ECHO_T}maybe" >&6
8942
8943 for ac_prog in ldd
8944 do
8945 # Extract the first word of "$ac_prog", so it can be a program name with args.
8946 set dummy $ac_prog; ac_word=$2
8947 echo "$as_me:8947: checking for $ac_word" >&5
8948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8949 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8950 echo $ECHO_N "(cached) $ECHO_C" >&6
8951 else
8952 if test -n "$cf_ldd_prog"; then
8953 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8954 else
8955 ac_save_IFS=$IFS; IFS=$ac_path_separator
8956 ac_dummy="$PATH"
8957 for ac_dir in $ac_dummy; do
8958 IFS=$ac_save_IFS
8959 test -z "$ac_dir" && ac_dir=.
8960 $as_executable_p "$ac_dir/$ac_word" || continue
8961 ac_cv_prog_cf_ldd_prog="$ac_prog"
8962 echo "$as_me:8962: found $ac_dir/$ac_word" >&5
8963 break
8964 done
8965
8966 fi
8967 fi
8968 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8969 if test -n "$cf_ldd_prog"; then
8970 echo "$as_me:8970: result: $cf_ldd_prog" >&5
8971 echo "${ECHO_T}$cf_ldd_prog" >&6
8972 else
8973 echo "$as_me:8973: result: no" >&5
8974 echo "${ECHO_T}no" >&6
8975 fi
8976
8977 test -n "$cf_ldd_prog" && break
8978 done
8979 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8980
8981 cf_rpath_list="/usr/lib /lib"
8982 if test "$cf_ldd_prog" != no
8983 then
8984 cf_rpath_oops=
8985
8986 cat >"conftest.$ac_ext" <<_ACEOF
8987 #line 8987 "configure"
8988 #include "confdefs.h"
8989 #include <stdio.h>
8990 int
8991 main (void)
8992 {
8993 printf("Hello");
8994 ;
8995 return 0;
8996 }
8997 _ACEOF
8998 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8999 if { (eval echo "$as_me:8999: \"$ac_link\"") >&5
9000 (eval $ac_link) 2>&5
9001 ac_status=$?
9002 echo "$as_me:9002: \$? = $ac_status" >&5
9003 (exit "$ac_status"); } &&
9004 { ac_try='test -s "conftest$ac_exeext"'
9005 { (eval echo "$as_me:9005: \"$ac_try\"") >&5
9006 (eval $ac_try) 2>&5
9007 ac_status=$?
9008 echo "$as_me:9008: \$? = $ac_status" >&5
9009 (exit "$ac_status"); }; }; then
9010 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
9011 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
9012 else
9013 echo "$as_me: failed program was:" >&5
9014 cat "conftest.$ac_ext" >&5
9015 fi
9016 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9017
9018 # If we passed the link-test, but get a "not found" on a given library,
9019 # this could be due to inept reconfiguration of gcc to make it only
9020 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
9021 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
9022 # /usr/local libraries.
9023 if test -n "$cf_rpath_oops"
9024 then
9025 for cf_rpath_src in $cf_rpath_oops
9026 do
9027 for cf_rpath_dir in \
9028 /usr/local \
9029 /usr/pkg \
9030 /opt/sfw
9031 do
9032 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
9033 then
9034 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
9035
9036 echo "${as_me:-configure}:9036: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
9037
9038 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
9039 break
9040 fi
9041 done
9042 done
9043 fi
9044 fi
9045
9046 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
9047
9048 echo "${as_me:-configure}:9048: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
9049
9050 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
9051
9052 echo "${as_me:-configure}:9052: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
9053
9054 cf_rpath_dst=
9055 for cf_rpath_src in $LDFLAGS
9056 do
9057 case "$cf_rpath_src" in
9058 (-L*)
9059
9060 # check if this refers to a directory which we will ignore
9061 cf_rpath_skip=no
9062 if test -n "$cf_rpath_list"
9063 then
9064 for cf_rpath_item in $cf_rpath_list
9065 do
9066 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
9067 then
9068 cf_rpath_skip=yes
9069 break
9070 fi
9071 done
9072 fi
9073
9074 if test "$cf_rpath_skip" = no
9075 then
9076 # transform the option
9077 if test "$LD_RPATH_OPT" = "-R " ; then
9078 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
9079 else
9080 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
9081 fi
9082
9083 # if we have not already added this, add it now
9084 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
9085 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
9086 then
9087 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
9088
9089 echo "${as_me:-configure}:9089: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
9090
9091 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
9092 fi
9093 fi
9094 ;;
9095 esac
9096 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
9097 done
9098 LDFLAGS=$cf_rpath_dst
9099
9100 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
9101
9102 echo "${as_me:-configure}:9102: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
9103
9104 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
9105
9106 echo "${as_me:-configure}:9106: testing ...checking LIBS $LIBS ..." 1>&5
9107
9108 cf_rpath_dst=
9109 for cf_rpath_src in $LIBS
9110 do
9111 case "$cf_rpath_src" in
9112 (-L*)
9113
9114 # check if this refers to a directory which we will ignore
9115 cf_rpath_skip=no
9116 if test -n "$cf_rpath_list"
9117 then
9118 for cf_rpath_item in $cf_rpath_list
9119 do
9120 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
9121 then
9122 cf_rpath_skip=yes
9123 break
9124 fi
9125 done
9126 fi
9127
9128 if test "$cf_rpath_skip" = no
9129 then
9130 # transform the option
9131 if test "$LD_RPATH_OPT" = "-R " ; then
9132 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
9133 else
9134 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
9135 fi
9136
9137 # if we have not already added this, add it now
9138 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
9139 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
9140 then
9141 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
9142
9143 echo "${as_me:-configure}:9143: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
9144
9145 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
9146 fi
9147 fi
9148 ;;
9149 esac
9150 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
9151 done
9152 LIBS=$cf_rpath_dst
9153
9154 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
9155
9156 echo "${as_me:-configure}:9156: testing ...checked LIBS $LIBS ..." 1>&5
9157
9158 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
9159
9160 echo "${as_me:-configure}:9160: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
9161
9162 else
9163 echo "$as_me:9163: result: no" >&5
9164 echo "${ECHO_T}no" >&6
9165 fi
9166
9167 fi
9168
9169 fi
9170
9171 ### Depending on the system, someone may use rpath to build ncurses but not
9172 # want users of the package to rely upon that feature. Give those people an
9173 # option to suppress that detail from EXTRA_LDFLAGS.
9174 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
9175 if test -n "$EXTRA_PKG_LDFLAGS"
9176 then
9177 echo "$as_me:9177: checking if you want to disable extra LDFLAGS for package-scripts" >&5
9178 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
9179
9180 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
9181 if test "${enable_pkg_ldflags+set}" = set; then
9182 enableval="$enable_pkg_ldflags"
9183 test "$enableval" != no && enableval=yes
9184 if test "$enableval" != "yes" ; then
9185 disable_pkg_ldflags=yes
9186 else
9187 disable_pkg_ldflags=no
9188 fi
9189 else
9190 enableval=yes
9191 disable_pkg_ldflags=no
9192
9193 fi;
9194 echo "$as_me:9194: result: $disable_pkg_ldflags" >&5
9195 echo "${ECHO_T}$disable_pkg_ldflags" >&6
9196 test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
9197 fi
9198
9199 ###############################################################################
9200
9201 ### use option --with-extra-suffix to append suffix to headers and libraries
9202 echo "$as_me:9202: checking for extra suffix to append to header/library paths" >&5
9203 echo $ECHO_N "checking for extra suffix to append to header/library paths... $ECHO_C" >&6
9204 EXTRA_SUFFIX=
9205
9206 # Check whether --with-extra-suffix or --without-extra-suffix was given.
9207 if test "${with_extra_suffix+set}" = set; then
9208 withval="$with_extra_suffix"
9209 case x$withval in
9210 (xno)
9211 ;;
9212 (xyes|x)
9213 EXTRA_SUFFIX=$cf_cv_abi_version
9214 ;;
9215 (*)
9216 EXTRA_SUFFIX=$withval
9217 ;;
9218 esac
9219
9220 fi;
9221 echo "$as_me:9221: result: ${EXTRA_SUFFIX:-(none)}" >&5
9222 echo "${ECHO_T}${EXTRA_SUFFIX:-(none)}" >&6
9223
9224 ### use option --disable-overwrite to leave out the link to -lcurses
9225 echo "$as_me:9225: checking if you wish to install ncurses overwriting curses" >&5
9226 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
9227
9228 # Check whether --enable-overwrite or --disable-overwrite was given.
9229 if test "${enable_overwrite+set}" = set; then
9230 enableval="$enable_overwrite"
9231 with_overwrite=$enableval
9232 else
9233 if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
9234 fi;
9235 echo "$as_me:9235: result: $with_overwrite" >&5
9236 echo "${ECHO_T}$with_overwrite" >&6
9237
9238 echo "$as_me:9238: checking if external terminfo-database is used" >&5
9239 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
9240
9241 # Check whether --enable-database or --disable-database was given.
9242 if test "${enable_database+set}" = set; then
9243 enableval="$enable_database"
9244 use_database=$enableval
9245 else
9246 use_database=yes
9247 fi;
9248 echo "$as_me:9248: result: $use_database" >&5
9249 echo "${ECHO_T}$use_database" >&6
9250
9251 case "$host_os" in
9252 (os2*)
9253 TERMINFO_SRC='${top_srcdir}/misc/emx.src'
9254 ;;
9255 (*)
9256 TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
9257 ;;
9258 esac
9259
9260 NCURSES_USE_DATABASE=0
9261 if test "$use_database" != no ; then
9262 NCURSES_USE_DATABASE=1
9263
9264 echo "$as_me:9264: checking which terminfo source-file will be installed" >&5
9265 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
9266
9267 # Check whether --with-database or --without-database was given.
9268 if test "${with_database+set}" = set; then
9269 withval="$with_database"
9270 TERMINFO_SRC=$withval
9271 fi;
9272 echo "$as_me:9272: result: $TERMINFO_SRC" >&5
9273 echo "${ECHO_T}$TERMINFO_SRC" >&6
9274
9275 echo "$as_me:9275: checking whether to use hashed database instead of directory/tree" >&5
9276 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
9277
9278 # Check whether --with-hashed-db or --without-hashed-db was given.
9279 if test "${with_hashed_db+set}" = set; then
9280 withval="$with_hashed_db"
9281
9282 else
9283 with_hashed_db=no
9284 fi;
9285 echo "$as_me:9285: result: $with_hashed_db" >&5
9286 echo "${ECHO_T}$with_hashed_db" >&6
9287 else
9288 with_hashed_db=no
9289 fi
9290
9291 echo "$as_me:9291: checking for list of fallback terminal descriptions" >&5
9292 echo $ECHO_N "checking for list of fallback terminal descriptions... $ECHO_C" >&6
9293
9294 # Check whether --with-fallbacks or --without-fallbacks was given.
9295 if test "${with_fallbacks+set}" = set; then
9296 withval="$with_fallbacks"
9297 with_fallback=$withval
9298 else
9299 with_fallback=
9300 fi;
9301 echo "$as_me:9301: result: ${with_fallback:-(none)}" >&5
9302 echo "${ECHO_T}${with_fallback:-(none)}" >&6
9303
9304 case ".$with_fallback" in
9305 (.|.no)
9306 FALLBACK_LIST=
9307 ;;
9308 (.yes)
9309 { echo "$as_me:9309: WARNING: expected a list of terminal descriptions" >&5
9310 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
9311 ;;
9312 (*)
9313 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
9314 ;;
9315 esac
9316
9317 # The fallback feature in ncurses relies upon tic/infocmp outside the build
9318 # tree for generating the terminal descriptions that will be compiled into the
9319 # library. If your toolchain is old, it may not handle current terminal
9320 # databases. Use configure-options to point to the tools which will be used,
9321 # rather than the first ones found on the $PATH.
9322 if test -n "$ac_tool_prefix"; then
9323 # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
9324 set dummy ${ac_tool_prefix}tic; ac_word=$2
9325 echo "$as_me:9325: checking for $ac_word" >&5
9326 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9327 if test "${ac_cv_prog_TIC+set}" = set; then
9328 echo $ECHO_N "(cached) $ECHO_C" >&6
9329 else
9330 if test -n "$TIC"; then
9331 ac_cv_prog_TIC="$TIC" # Let the user override the test.
9332 else
9333 ac_save_IFS=$IFS; IFS=$ac_path_separator
9334 ac_dummy="$PATH"
9335 for ac_dir in $ac_dummy; do
9336 IFS=$ac_save_IFS
9337 test -z "$ac_dir" && ac_dir=.
9338 $as_executable_p "$ac_dir/$ac_word" || continue
9339 ac_cv_prog_TIC="${ac_tool_prefix}tic"
9340 echo "$as_me:9340: found $ac_dir/$ac_word" >&5
9341 break
9342 done
9343
9344 fi
9345 fi
9346 TIC=$ac_cv_prog_TIC
9347 if test -n "$TIC"; then
9348 echo "$as_me:9348: result: $TIC" >&5
9349 echo "${ECHO_T}$TIC" >&6
9350 else
9351 echo "$as_me:9351: result: no" >&5
9352 echo "${ECHO_T}no" >&6
9353 fi
9354
9355 fi
9356 if test -z "$ac_cv_prog_TIC"; then
9357 ac_ct_TIC=$TIC
9358 # Extract the first word of "tic", so it can be a program name with args.
9359 set dummy tic; ac_word=$2
9360 echo "$as_me:9360: checking for $ac_word" >&5
9361 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9362 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9363 echo $ECHO_N "(cached) $ECHO_C" >&6
9364 else
9365 if test -n "$ac_ct_TIC"; then
9366 ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9367 else
9368 ac_save_IFS=$IFS; IFS=$ac_path_separator
9369 ac_dummy="$PATH"
9370 for ac_dir in $ac_dummy; do
9371 IFS=$ac_save_IFS
9372 test -z "$ac_dir" && ac_dir=.
9373 $as_executable_p "$ac_dir/$ac_word" || continue
9374 ac_cv_prog_ac_ct_TIC="tic"
9375 echo "$as_me:9375: found $ac_dir/$ac_word" >&5
9376 break
9377 done
9378
9379 fi
9380 fi
9381 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9382 if test -n "$ac_ct_TIC"; then
9383 echo "$as_me:9383: result: $ac_ct_TIC" >&5
9384 echo "${ECHO_T}$ac_ct_TIC" >&6
9385 else
9386 echo "$as_me:9386: result: no" >&5
9387 echo "${ECHO_T}no" >&6
9388 fi
9389
9390 TIC=$ac_ct_TIC
9391 else
9392 TIC="$ac_cv_prog_TIC"
9393 fi
9394
9395 if test -n "$ac_tool_prefix"; then
9396 # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9397 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9398 echo "$as_me:9398: checking for $ac_word" >&5
9399 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9400 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9401 echo $ECHO_N "(cached) $ECHO_C" >&6
9402 else
9403 if test -n "$INFOCMP"; then
9404 ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9405 else
9406 ac_save_IFS=$IFS; IFS=$ac_path_separator
9407 ac_dummy="$PATH"
9408 for ac_dir in $ac_dummy; do
9409 IFS=$ac_save_IFS
9410 test -z "$ac_dir" && ac_dir=.
9411 $as_executable_p "$ac_dir/$ac_word" || continue
9412 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9413 echo "$as_me:9413: found $ac_dir/$ac_word" >&5
9414 break
9415 done
9416
9417 fi
9418 fi
9419 INFOCMP=$ac_cv_prog_INFOCMP
9420 if test -n "$INFOCMP"; then
9421 echo "$as_me:9421: result: $INFOCMP" >&5
9422 echo "${ECHO_T}$INFOCMP" >&6
9423 else
9424 echo "$as_me:9424: result: no" >&5
9425 echo "${ECHO_T}no" >&6
9426 fi
9427
9428 fi
9429 if test -z "$ac_cv_prog_INFOCMP"; then
9430 ac_ct_INFOCMP=$INFOCMP
9431 # Extract the first word of "infocmp", so it can be a program name with args.
9432 set dummy infocmp; ac_word=$2
9433 echo "$as_me:9433: checking for $ac_word" >&5
9434 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9435 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9436 echo $ECHO_N "(cached) $ECHO_C" >&6
9437 else
9438 if test -n "$ac_ct_INFOCMP"; then
9439 ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9440 else
9441 ac_save_IFS=$IFS; IFS=$ac_path_separator
9442 ac_dummy="$PATH"
9443 for ac_dir in $ac_dummy; do
9444 IFS=$ac_save_IFS
9445 test -z "$ac_dir" && ac_dir=.
9446 $as_executable_p "$ac_dir/$ac_word" || continue
9447 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9448 echo "$as_me:9448: found $ac_dir/$ac_word" >&5
9449 break
9450 done
9451
9452 fi
9453 fi
9454 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9455 if test -n "$ac_ct_INFOCMP"; then
9456 echo "$as_me:9456: result: $ac_ct_INFOCMP" >&5
9457 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9458 else
9459 echo "$as_me:9459: result: no" >&5
9460 echo "${ECHO_T}no" >&6
9461 fi
9462
9463 INFOCMP=$ac_ct_INFOCMP
9464 else
9465 INFOCMP="$ac_cv_prog_INFOCMP"
9466 fi
9467
9468 if test -n "$FALLBACK_LIST"
9469 then
9470
9471 # Check whether --with-tic-path or --without-tic-path was given.
9472 if test "${with_tic_path+set}" = set; then
9473 withval="$with_tic_path"
9474 echo "$as_me:9474: checking for tic program for fallbacks" >&5
9475 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9476 TIC=$withval
9477 echo "$as_me:9477: result: $TIC" >&5
9478 echo "${ECHO_T}$TIC" >&6
9479
9480 if test "x$prefix" != xNONE; then
9481 cf_path_syntax="$prefix"
9482 else
9483 cf_path_syntax="$ac_default_prefix"
9484 fi
9485
9486 case "x$TIC" in
9487 (x\$\(*\)*|x\'*\'*)
9488 ;;
9489 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
9490 ;;
9491 (x\$\{*prefix\}*|x\$\{*dir\}*)
9492 eval TIC="$TIC"
9493 case "x$TIC" in
9494 (xNONE/*)
9495 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9496 ;;
9497 esac
9498 ;;
9499 (xno|xNONE/*)
9500 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9501 ;;
9502 (*)
9503 { { echo "$as_me:9503: error: expected a pathname, not \"$TIC\"" >&5
9504 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9505 { (exit 1); exit 1; }; }
9506 ;;
9507 esac
9508
9509 else
9510
9511 test -z "$TIC" && TIC="tic"
9512 for ac_prog in $TIC tic
9513 do
9514 # Extract the first word of "$ac_prog", so it can be a program name with args.
9515 set dummy $ac_prog; ac_word=$2
9516 echo "$as_me:9516: checking for $ac_word" >&5
9517 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9518 if test "${ac_cv_path_TIC+set}" = set; then
9519 echo $ECHO_N "(cached) $ECHO_C" >&6
9520 else
9521 case $TIC in
9522 [\\/]* | ?:[\\/]*)
9523 ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9524 ;;
9525 *)
9526 ac_save_IFS=$IFS; IFS=$ac_path_separator
9527 ac_dummy="$PATH:/usr/local/ncurses/bin"
9528 for ac_dir in $ac_dummy; do
9529 IFS=$ac_save_IFS
9530 test -z "$ac_dir" && ac_dir=.
9531 if $as_executable_p "$ac_dir/$ac_word"; then
9532 ac_cv_path_TIC="$ac_dir/$ac_word"
9533 echo "$as_me:9533: found $ac_dir/$ac_word" >&5
9534 break
9535 fi
9536 done
9537
9538 ;;
9539 esac
9540 fi
9541 TIC=$ac_cv_path_TIC
9542
9543 if test -n "$TIC"; then
9544 echo "$as_me:9544: result: $TIC" >&5
9545 echo "${ECHO_T}$TIC" >&6
9546 else
9547 echo "$as_me:9547: result: no" >&5
9548 echo "${ECHO_T}no" >&6
9549 fi
9550
9551 test -n "$TIC" && break
9552 done
9553 test -n "$TIC" || TIC="$TIC"
9554
9555 cf_path_prog=""
9556 cf_path_args=""
9557 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9558 for cf_temp in $ac_cv_path_TIC
9559 do
9560 if test -z "$cf_path_prog" ; then
9561 if test "$with_full_paths" = yes ; then
9562
9563 if test "x$prefix" != xNONE; then
9564 cf_path_syntax="$prefix"
9565 else
9566 cf_path_syntax="$ac_default_prefix"
9567 fi
9568
9569 case "x$cf_temp" in
9570 (x\$\(*\)*|x\'*\'*)
9571 ;;
9572 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
9573 ;;
9574 (x\$\{*prefix\}*|x\$\{*dir\}*)
9575 eval cf_temp="$cf_temp"
9576 case "x$cf_temp" in
9577 (xNONE/*)
9578 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9579 ;;
9580 esac
9581 ;;
9582 (xno|xNONE/*)
9583 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9584 ;;
9585 (*)
9586 break
9587 ;;
9588 esac
9589
9590 cf_path_prog="$cf_temp"
9591 else
9592 cf_path_prog="`basename "$cf_temp"`"
9593 fi
9594 elif test -z "$cf_path_args" ; then
9595 cf_path_args="$cf_temp"
9596 else
9597 cf_path_args="$cf_path_args $cf_temp"
9598 fi
9599 done
9600 IFS="$cf_save_ifs"
9601
9602 if test -n "$cf_path_prog" ; then
9603
9604 echo "${as_me:-configure}:9604: testing defining path for ${cf_path_prog} ..." 1>&5
9605
9606 cat >>confdefs.h <<EOF
9607 #define TIC_PATH "$cf_path_prog"
9608 EOF
9609
9610 test -n "$cf_path_args" &&
9611 cat >>confdefs.h <<EOF
9612 #define TIC_ARGS "$cf_path_args"
9613 EOF
9614
9615 fi
9616
9617 if test -z "$TIC"
9618 then
9619 { echo "$as_me:9619: WARNING: no tic program found for fallbacks" >&5
9620 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9621 fi
9622
9623 fi;
9624
9625 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9626 if test "${with_infocmp_path+set}" = set; then
9627 withval="$with_infocmp_path"
9628 echo "$as_me:9628: checking for infocmp program for fallbacks" >&5
9629 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9630 INFOCMP=$withval
9631 echo "$as_me:9631: result: $INFOCMP" >&5
9632 echo "${ECHO_T}$INFOCMP" >&6
9633
9634 if test "x$prefix" != xNONE; then
9635 cf_path_syntax="$prefix"
9636 else
9637 cf_path_syntax="$ac_default_prefix"
9638 fi
9639
9640 case "x$INFOCMP" in
9641 (x\$\(*\)*|x\'*\'*)
9642 ;;
9643 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
9644 ;;
9645 (x\$\{*prefix\}*|x\$\{*dir\}*)
9646 eval INFOCMP="$INFOCMP"
9647 case "x$INFOCMP" in
9648 (xNONE/*)
9649 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9650 ;;
9651 esac
9652 ;;
9653 (xno|xNONE/*)
9654 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9655 ;;
9656 (*)
9657 { { echo "$as_me:9657: error: expected a pathname, not \"$INFOCMP\"" >&5
9658 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9659 { (exit 1); exit 1; }; }
9660 ;;
9661 esac
9662
9663 else
9664
9665 test -z "$INFOCMP" && INFOCMP="infocmp"
9666 for ac_prog in $INFOCMP infocmp
9667 do
9668 # Extract the first word of "$ac_prog", so it can be a program name with args.
9669 set dummy $ac_prog; ac_word=$2
9670 echo "$as_me:9670: checking for $ac_word" >&5
9671 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9672 if test "${ac_cv_path_INFOCMP+set}" = set; then
9673 echo $ECHO_N "(cached) $ECHO_C" >&6
9674 else
9675 case $INFOCMP in
9676 [\\/]* | ?:[\\/]*)
9677 ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9678 ;;
9679 *)
9680 ac_save_IFS=$IFS; IFS=$ac_path_separator
9681 ac_dummy="$PATH:/usr/local/ncurses/bin"
9682 for ac_dir in $ac_dummy; do
9683 IFS=$ac_save_IFS
9684 test -z "$ac_dir" && ac_dir=.
9685 if $as_executable_p "$ac_dir/$ac_word"; then
9686 ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9687 echo "$as_me:9687: found $ac_dir/$ac_word" >&5
9688 break
9689 fi
9690 done
9691
9692 ;;
9693 esac
9694 fi
9695 INFOCMP=$ac_cv_path_INFOCMP
9696
9697 if test -n "$INFOCMP"; then
9698 echo "$as_me:9698: result: $INFOCMP" >&5
9699 echo "${ECHO_T}$INFOCMP" >&6
9700 else
9701 echo "$as_me:9701: result: no" >&5
9702 echo "${ECHO_T}no" >&6
9703 fi
9704
9705 test -n "$INFOCMP" && break
9706 done
9707 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9708
9709 cf_path_prog=""
9710 cf_path_args=""
9711 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9712 for cf_temp in $ac_cv_path_INFOCMP
9713 do
9714 if test -z "$cf_path_prog" ; then
9715 if test "$with_full_paths" = yes ; then
9716
9717 if test "x$prefix" != xNONE; then
9718 cf_path_syntax="$prefix"
9719 else
9720 cf_path_syntax="$ac_default_prefix"
9721 fi
9722
9723 case "x$cf_temp" in
9724 (x\$\(*\)*|x\'*\'*)
9725 ;;
9726 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
9727 ;;
9728 (x\$\{*prefix\}*|x\$\{*dir\}*)
9729 eval cf_temp="$cf_temp"
9730 case "x$cf_temp" in
9731 (xNONE/*)
9732 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9733 ;;
9734 esac
9735 ;;
9736 (xno|xNONE/*)
9737 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9738 ;;
9739 (*)
9740 break
9741 ;;
9742 esac
9743
9744 cf_path_prog="$cf_temp"
9745 else
9746 cf_path_prog="`basename "$cf_temp"`"
9747 fi
9748 elif test -z "$cf_path_args" ; then
9749 cf_path_args="$cf_temp"
9750 else
9751 cf_path_args="$cf_path_args $cf_temp"
9752 fi
9753 done
9754 IFS="$cf_save_ifs"
9755
9756 if test -n "$cf_path_prog" ; then
9757
9758 echo "${as_me:-configure}:9758: testing defining path for ${cf_path_prog} ..." 1>&5
9759
9760 cat >>confdefs.h <<EOF
9761 #define INFOCMP_PATH "$cf_path_prog"
9762 EOF
9763
9764 test -n "$cf_path_args" &&
9765 cat >>confdefs.h <<EOF
9766 #define INFOCMP_ARGS "$cf_path_args"
9767 EOF
9768
9769 fi
9770
9771 if test -z "$INFOCMP"
9772 then
9773 { echo "$as_me:9773: WARNING: no infocmp program found for fallbacks" >&5
9774 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9775 fi
9776
9777 fi;
9778
9779 test -z "$TIC" && FALLBACK_LIST=
9780 test -z "$INFOCMP" && FALLBACK_LIST=
9781 if test -z "$FALLBACK_LIST"
9782 then
9783 { echo "$as_me:9783: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9784 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9785 fi
9786 fi
9787
9788 USE_FALLBACKS=
9789 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9790
9791 echo "$as_me:9791: checking if you want modern xterm or antique" >&5
9792 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9793
9794 # Check whether --with-xterm-new or --without-xterm-new was given.
9795 if test "${with_xterm_new+set}" = set; then
9796 withval="$with_xterm_new"
9797 with_xterm_new=$withval
9798 else
9799 with_xterm_new=yes
9800 fi;
9801 case "$with_xterm_new" in
9802 (no) with_xterm_new=xterm-old;;
9803 (*) with_xterm_new=xterm-new;;
9804 esac
9805 echo "$as_me:9805: result: $with_xterm_new" >&5
9806 echo "${ECHO_T}$with_xterm_new" >&6
9807 WHICH_XTERM=$with_xterm_new
9808
9809 case $host_os in
9810 (linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc|linux*musl|openbsd*|darwin*)
9811 want_xterm_kbs=DEL
9812 ;;
9813 (*)
9814 want_xterm_kbs=BS
9815 ;;
9816 esac
9817
9818 echo "$as_me:9818: checking if xterm backspace-key sends BS or DEL" >&5
9819 echo $ECHO_N "checking if xterm backspace-key sends BS or DEL... $ECHO_C" >&6
9820
9821 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9822 if test "${with_xterm_kbs+set}" = set; then
9823 withval="$with_xterm_kbs"
9824 with_xterm_kbs=$withval
9825 else
9826 with_xterm_kbs=auto
9827 fi;
9828 case x$with_xterm_kbs in
9829 (xyes|xno|xBS|xbs|x8)
9830 with_xterm_kbs=BS
9831 ;;
9832 (xDEL|xdel|x127)
9833 with_xterm_kbs=DEL
9834 ;;
9835 (xauto)
9836 with_xterm_kbs=$want_xterm_kbs
9837 ;;
9838 (*)
9839 with_xterm_kbs=$withval
9840 ;;
9841 esac
9842 echo "$as_me:9842: result: $with_xterm_kbs" >&5
9843 echo "${ECHO_T}$with_xterm_kbs" >&6
9844 XTERM_KBS=$with_xterm_kbs
9845
9846 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9847 then
9848 { echo "$as_me:9848: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&5
9849 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&2;}
9850 fi
9851
9852 MAKE_TERMINFO=
9853 if test "$use_database" = no ; then
9854 TERMINFO="${datadir}/terminfo"
9855 MAKE_TERMINFO="#"
9856 else
9857
9858 echo "$as_me:9858: checking for list of terminfo directories" >&5
9859 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9860
9861 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9862 if test "${with_terminfo_dirs+set}" = set; then
9863 withval="$with_terminfo_dirs"
9864
9865 else
9866 withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9867 fi;
9868 IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9869 cf_dst_path=
9870 for cf_src_path in $withval
9871 do
9872
9873 if test "x$prefix" != xNONE; then
9874 cf_path_syntax="$prefix"
9875 else
9876 cf_path_syntax="$ac_default_prefix"
9877 fi
9878
9879 case "x$cf_src_path" in
9880 (x\$\(*\)*|x\'*\'*)
9881 ;;
9882 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
9883 ;;
9884 (x\$\{*prefix\}*|x\$\{*dir\}*)
9885 eval cf_src_path="$cf_src_path"
9886 case "x$cf_src_path" in
9887 (xNONE/*)
9888 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9889 ;;
9890 esac
9891 ;;
9892 (xno|xNONE/*)
9893 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9894 ;;
9895 (*)
9896 { { echo "$as_me:9896: error: expected a pathname, not \"$cf_src_path\"" >&5
9897 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9898 { (exit 1); exit 1; }; }
9899 ;;
9900 esac
9901
9902 test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9903 cf_dst_path="${cf_dst_path}${cf_src_path}"
9904 done
9905 IFS="$ac_save_ifs"
9906
9907 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9908 # so we have to check/work around. We do prefer the result of "eval"...
9909 eval cf_dst_eval="$cf_dst_path"
9910 case "x$cf_dst_eval" in
9911 (xNONE*)
9912 TERMINFO_DIRS=$cf_dst_path
9913 ;;
9914 (*)
9915 TERMINFO_DIRS="$cf_dst_eval"
9916 ;;
9917 esac
9918
9919 echo "$as_me:9919: result: $TERMINFO_DIRS" >&5
9920 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9921 test -n "$TERMINFO_DIRS" &&
9922 cat >>confdefs.h <<EOF
9923 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9924 EOF
9925
9926 case "x$TERMINFO" in
9927 x???:*)
9928 { echo "$as_me:9928: WARNING: ignoring non-directory/file TERMINFO value" >&5
9929 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9930 unset TERMINFO
9931 ;;
9932 esac
9933
9934 echo "$as_me:9934: checking for default terminfo directory" >&5
9935 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9936
9937 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9938 if test "${with_default_terminfo_dir+set}" = set; then
9939 withval="$with_default_terminfo_dir"
9940
9941 else
9942 withval="${TERMINFO:-${datadir}/terminfo}"
9943 fi; if test -n "${datadir}/terminfo" ; then
9944
9945 if test "x$prefix" != xNONE; then
9946 cf_path_syntax="$prefix"
9947 else
9948 cf_path_syntax="$ac_default_prefix"
9949 fi
9950
9951 case "x$withval" in
9952 (x\$\(*\)*|x\'*\'*)
9953 ;;
9954 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
9955 ;;
9956 (x\$\{*prefix\}*|x\$\{*dir\}*)
9957 eval withval="$withval"
9958 case "x$withval" in
9959 (xNONE/*)
9960 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9961 ;;
9962 esac
9963 ;;
9964 (xno|xNONE/*)
9965 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9966 ;;
9967 (*)
9968 { { echo "$as_me:9968: error: expected a pathname, not \"$withval\"" >&5
9969 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9970 { (exit 1); exit 1; }; }
9971 ;;
9972 esac
9973
9974 fi
9975 eval TERMINFO="$withval"
9976
9977 echo "$as_me:9977: result: $TERMINFO" >&5
9978 echo "${ECHO_T}$TERMINFO" >&6
9979
9980 cat >>confdefs.h <<EOF
9981 #define TERMINFO "$TERMINFO"
9982 EOF
9983
9984 fi
9985
9986 ### use option --disable-big-core to make tic run on small machines
9987 ### We need 4Mb, check if we can allocate 50% more than that.
9988 echo "$as_me:9988: checking if big-core option selected" >&5
9989 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9990
9991 # Check whether --enable-big-core or --disable-big-core was given.
9992 if test "${enable_big_core+set}" = set; then
9993 enableval="$enable_big_core"
9994 with_big_core=$enableval
9995 else
9996 if test "$cross_compiling" = yes; then
9997 with_big_core=no
9998 else
9999 cat >"conftest.$ac_ext" <<_ACEOF
10000 #line 10000 "configure"
10001 #include "confdefs.h"
10002
10003 #include <stdlib.h>
10004 #include <string.h>
10005 int main(void) {
10006 unsigned long n = 6000000L;
10007 char *s = malloc(n);
10008 if (s != 0)
10009 s[0] = s[n-1] = 0;
10010 ${cf_cv_main_return:-return}(s == 0);
10011 }
10012 _ACEOF
10013 rm -f "conftest$ac_exeext"
10014 if { (eval echo "$as_me:10014: \"$ac_link\"") >&5
10015 (eval $ac_link) 2>&5
10016 ac_status=$?
10017 echo "$as_me:10017: \$? = $ac_status" >&5
10018 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10019 { (eval echo "$as_me:10019: \"$ac_try\"") >&5
10020 (eval $ac_try) 2>&5
10021 ac_status=$?
10022 echo "$as_me:10022: \$? = $ac_status" >&5
10023 (exit "$ac_status"); }; }; then
10024 with_big_core=yes
10025 else
10026 echo "$as_me: program exited with status $ac_status" >&5
10027 echo "$as_me: failed program was:" >&5
10028 cat "conftest.$ac_ext" >&5
10029 with_big_core=no
10030 fi
10031 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10032 fi
10033 fi;
10034 echo "$as_me:10034: result: $with_big_core" >&5
10035 echo "${ECHO_T}$with_big_core" >&6
10036 test "x$with_big_core" = "xyes" &&
10037 cat >>confdefs.h <<\EOF
10038 #define HAVE_BIG_CORE 1
10039 EOF
10040
10041 ### ISO C only guarantees 512-char strings, we have tables which load faster
10042 ### when constructed using "big" strings. More than the C compiler, the awk
10043 ### program is a limit on most vendor UNIX systems. Check that we can build.
10044 echo "$as_me:10044: checking if big-strings option selected" >&5
10045 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
10046
10047 # Check whether --enable-big-strings or --disable-big-strings was given.
10048 if test "${enable_big_strings+set}" = set; then
10049 enableval="$enable_big_strings"
10050 with_big_strings=$enableval
10051 else
10052
10053 case x$AWK in
10054 (x)
10055 eval with_big_strings=no
10056 ;;
10057 (*)
10058 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
10059 | $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
10060 eval with_big_strings=yes
10061 else
10062 eval with_big_strings=no
10063 fi
10064 ;;
10065 esac
10066
10067 fi;
10068 echo "$as_me:10068: result: $with_big_strings" >&5
10069 echo "${ECHO_T}$with_big_strings" >&6
10070
10071 USE_BIG_STRINGS=0
10072 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
10073
10074 ### use option --enable-termcap to compile in the termcap fallback support
10075 echo "$as_me:10075: checking if you want termcap-fallback support" >&5
10076 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
10077
10078 # Check whether --enable-termcap or --disable-termcap was given.
10079 if test "${enable_termcap+set}" = set; then
10080 enableval="$enable_termcap"
10081 with_termcap=$enableval
10082 else
10083 with_termcap=no
10084 fi;
10085 echo "$as_me:10085: result: $with_termcap" >&5
10086 echo "${ECHO_T}$with_termcap" >&6
10087
10088 NCURSES_USE_TERMCAP=0
10089 if test "x$with_termcap" != "xyes" ; then
10090 if test "$use_database" = no ; then
10091 if test -z "$with_fallback" ; then
10092 { { echo "$as_me:10092: error: You have disabled the database w/o specifying fallbacks" >&5
10093 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
10094 { (exit 1); exit 1; }; }
10095 fi
10096 fi
10097
10098 cat >>confdefs.h <<\EOF
10099 #define PURE_TERMINFO 1
10100 EOF
10101
10102 else
10103
10104 if test "$with_ticlib" != no ; then
10105 { { echo "$as_me:10105: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
10106 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
10107 { (exit 1); exit 1; }; }
10108 fi
10109
10110 NCURSES_USE_TERMCAP=1
10111 echo "$as_me:10111: checking for list of termcap files" >&5
10112 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
10113
10114 # Check whether --with-termpath or --without-termpath was given.
10115 if test "${with_termpath+set}" = set; then
10116 withval="$with_termpath"
10117
10118 else
10119 withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
10120 fi;
10121 IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
10122 cf_dst_path=
10123 for cf_src_path in $withval
10124 do
10125
10126 if test "x$prefix" != xNONE; then
10127 cf_path_syntax="$prefix"
10128 else
10129 cf_path_syntax="$ac_default_prefix"
10130 fi
10131
10132 case "x$cf_src_path" in
10133 (x\$\(*\)*|x\'*\'*)
10134 ;;
10135 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
10136 ;;
10137 (x\$\{*prefix\}*|x\$\{*dir\}*)
10138 eval cf_src_path="$cf_src_path"
10139 case "x$cf_src_path" in
10140 (xNONE/*)
10141 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
10142 ;;
10143 esac
10144 ;;
10145 (xno|xNONE/*)
10146 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
10147 ;;
10148 (*)
10149 { { echo "$as_me:10149: error: expected a pathname, not \"$cf_src_path\"" >&5
10150 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
10151 { (exit 1); exit 1; }; }
10152 ;;
10153 esac
10154
10155 test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
10156 cf_dst_path="${cf_dst_path}${cf_src_path}"
10157 done
10158 IFS="$ac_save_ifs"
10159
10160 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
10161 # so we have to check/work around. We do prefer the result of "eval"...
10162 eval cf_dst_eval="$cf_dst_path"
10163 case "x$cf_dst_eval" in
10164 (xNONE*)
10165 TERMPATH=$cf_dst_path
10166 ;;
10167 (*)
10168 TERMPATH="$cf_dst_eval"
10169 ;;
10170 esac
10171
10172 echo "$as_me:10172: result: $TERMPATH" >&5
10173 echo "${ECHO_T}$TERMPATH" >&6
10174 test -n "$TERMPATH" &&
10175 cat >>confdefs.h <<EOF
10176 #define TERMPATH "$TERMPATH"
10177 EOF
10178
10179 ### use option --enable-getcap to use a hacked getcap for reading termcaps
10180 echo "$as_me:10180: checking if fast termcap-loader is needed" >&5
10181 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
10182
10183 # Check whether --enable-getcap or --disable-getcap was given.
10184 if test "${enable_getcap+set}" = set; then
10185 enableval="$enable_getcap"
10186 with_getcap=$enableval
10187 else
10188 with_getcap=no
10189 fi;
10190 echo "$as_me:10190: result: $with_getcap" >&5
10191 echo "${ECHO_T}$with_getcap" >&6
10192 test "x$with_getcap" = "xyes" &&
10193 cat >>confdefs.h <<\EOF
10194 #define USE_GETCAP 1
10195 EOF
10196
10197 echo "$as_me:10197: checking if translated termcaps will be cached in ~/.terminfo" >&5
10198 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
10199
10200 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
10201 if test "${enable_getcap_cache+set}" = set; then
10202 enableval="$enable_getcap_cache"
10203 with_getcap_cache=$enableval
10204 else
10205 with_getcap_cache=no
10206 fi;
10207 echo "$as_me:10207: result: $with_getcap_cache" >&5
10208 echo "${ECHO_T}$with_getcap_cache" >&6
10209 test "x$with_getcap_cache" = "xyes" &&
10210 cat >>confdefs.h <<\EOF
10211 #define USE_GETCAP_CACHE 1
10212 EOF
10213
10214 fi
10215
10216 ### Use option --disable-home-terminfo to completely remove ~/.terminfo
10217 echo "$as_me:10217: checking if ~/.terminfo is wanted" >&5
10218 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
10219
10220 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
10221 if test "${enable_home_terminfo+set}" = set; then
10222 enableval="$enable_home_terminfo"
10223 with_home_terminfo=$enableval
10224 else
10225 with_home_terminfo=yes
10226 fi;
10227 echo "$as_me:10227: result: $with_home_terminfo" >&5
10228 echo "${ECHO_T}$with_home_terminfo" >&6
10229 test "x$with_home_terminfo" = "xyes" &&
10230 cat >>confdefs.h <<\EOF
10231 #define USE_HOME_TERMINFO 1
10232 EOF
10233
10234 echo "$as_me:10234: checking for conventional multiuser system" >&5
10235 echo $ECHO_N "checking for conventional multiuser system... $ECHO_C" >&6
10236 if test "${cf_cv_multiuser+set}" = set; then
10237 echo $ECHO_N "(cached) $ECHO_C" >&6
10238 else
10239
10240 cf_cv_multiuser=no
10241 if test -f /etc/passwd
10242 then
10243 sed \
10244 -e '/true$/d' \
10245 -e '/false$/d' \
10246 -e '/nologin$/d' \
10247 -e '/^[^:]*:[^:]*:[0-9]:/d' \
10248 -e '/^[^:]*:[^:]*:[0-9][0-9]:/d' \
10249 -e '/:$/d' < /etc/passwd >conftest.tmp
10250 test -s conftest.tmp && cf_cv_multiuser=yes
10251 rm -f conftest.tmp
10252 fi
10253
10254 fi
10255 echo "$as_me:10255: result: $cf_cv_multiuser" >&5
10256 echo "${ECHO_T}$cf_cv_multiuser" >&6
10257
10258 if test "$cf_cv_multiuser" = yes; then
10259
10260 echo "$as_me:10260: checking if you want to permit root to use ncurses environment variables" >&5
10261 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
10262
10263 # Check whether --enable-root-environ or --disable-root-environ was given.
10264 if test "${enable_root_environ+set}" = set; then
10265 enableval="$enable_root_environ"
10266 with_root_environ=$enableval
10267 else
10268 with_root_environ=yes
10269 fi;
10270 echo "$as_me:10270: result: $with_root_environ" >&5
10271 echo "${ECHO_T}$with_root_environ" >&6
10272 test "x$with_root_environ" = xyes &&
10273 cat >>confdefs.h <<\EOF
10274 #define USE_ROOT_ENVIRON 1
10275 EOF
10276
10277 echo "$as_me:10277: checking if you want to permit setuid programs to access all files" >&5
10278 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
10279
10280 # Check whether --enable-root-access or --disable-root-access was given.
10281 if test "${enable_root_access+set}" = set; then
10282 enableval="$enable_root_access"
10283 with_root_access=$enableval
10284 else
10285 with_root_access=yes
10286 fi;
10287 echo "$as_me:10287: result: $with_root_access" >&5
10288 echo "${ECHO_T}$with_root_access" >&6
10289 test "x$with_root_access" = xyes &&
10290 cat >>confdefs.h <<\EOF
10291 #define USE_ROOT_ACCESS 1
10292 EOF
10293
10294 echo "$as_me:10294: checking if you want to permit setuid use of ncurses environment variables" >&5
10295 echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
10296
10297 # Check whether --enable-setuid-environ or --disable-setuid-environ was given.
10298 if test "${enable_setuid_environ+set}" = set; then
10299 enableval="$enable_setuid_environ"
10300 with_setuid_environ=$enableval
10301 else
10302 with_setuid_environ=$with_root_environ
10303 fi;
10304 echo "$as_me:10304: result: $with_setuid_environ" >&5
10305 echo "${ECHO_T}$with_setuid_environ" >&6
10306 test "x$with_setuid_environ" = xyes &&
10307 cat >>confdefs.h <<\EOF
10308 #define USE_SETUID_ENVIRON 1
10309 EOF
10310
10311 else
10312 if test -n "$enable_root_environ$enable_root_access$enable_setuid_environ"
10313 then
10314 { echo "$as_me:10314: WARNING: ignoring options used only for multiuser systems" >&5
10315 echo "$as_me: WARNING: ignoring options used only for multiuser systems" >&2;}
10316 fi
10317
10318 fi # cf_cv_multiuser
10319
10320 ### Use option --enable-symlinks to make tic use symlinks, not hard links
10321 ### to reduce storage requirements for the terminfo database.
10322
10323 for ac_header in \
10324 unistd.h \
10325
10326 do
10327 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10328 echo "$as_me:10328: checking for $ac_header" >&5
10329 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10330 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10331 echo $ECHO_N "(cached) $ECHO_C" >&6
10332 else
10333 cat >"conftest.$ac_ext" <<_ACEOF
10334 #line 10334 "configure"
10335 #include "confdefs.h"
10336 #include <$ac_header>
10337 _ACEOF
10338 if { (eval echo "$as_me:10338: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10339 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10340 ac_status=$?
10341 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10342 rm -f conftest.er1
10343 cat conftest.err >&5
10344 echo "$as_me:10344: \$? = $ac_status" >&5
10345 (exit "$ac_status"); } >/dev/null; then
10346 if test -s conftest.err; then
10347 ac_cpp_err=$ac_c_preproc_warn_flag
10348 else
10349 ac_cpp_err=
10350 fi
10351 else
10352 ac_cpp_err=yes
10353 fi
10354 if test -z "$ac_cpp_err"; then
10355 eval "$as_ac_Header=yes"
10356 else
10357 echo "$as_me: failed program was:" >&5
10358 cat "conftest.$ac_ext" >&5
10359 eval "$as_ac_Header=no"
10360 fi
10361 rm -f conftest.err "conftest.$ac_ext"
10362 fi
10363 echo "$as_me:10363: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10364 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10365 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10366 cat >>confdefs.h <<EOF
10367 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10368 EOF
10369
10370 fi
10371 done
10372
10373 for ac_func in \
10374 remove \
10375 unlink
10376 do
10377 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10378 echo "$as_me:10378: checking for $ac_func" >&5
10379 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10380 if eval "test \"\${$as_ac_var+set}\" = set"; then
10381 echo $ECHO_N "(cached) $ECHO_C" >&6
10382 else
10383 cat >"conftest.$ac_ext" <<_ACEOF
10384 #line 10384 "configure"
10385 #include "confdefs.h"
10386 #define $ac_func autoconf_temporary
10387 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10388 #undef $ac_func
10389
10390 #ifdef __cplusplus
10391 extern "C"
10392 #endif
10393
10394 /* We use char because int might match the return type of a gcc2
10395 builtin and then its argument prototype would still apply. */
10396 char $ac_func (void);
10397
10398 int
10399 main (void)
10400 {
10401
10402 /* The GNU C library defines stubs for functions which it implements
10403 to always fail with ENOSYS. Some functions are actually named
10404 something starting with __ and the normal name is an alias. */
10405 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10406 #error found stub for $ac_func
10407 #endif
10408
10409 return $ac_func ();
10410 ;
10411 return 0;
10412 }
10413 _ACEOF
10414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10415 if { (eval echo "$as_me:10415: \"$ac_link\"") >&5
10416 (eval $ac_link) 2>&5
10417 ac_status=$?
10418 echo "$as_me:10418: \$? = $ac_status" >&5
10419 (exit "$ac_status"); } &&
10420 { ac_try='test -s "conftest$ac_exeext"'
10421 { (eval echo "$as_me:10421: \"$ac_try\"") >&5
10422 (eval $ac_try) 2>&5
10423 ac_status=$?
10424 echo "$as_me:10424: \$? = $ac_status" >&5
10425 (exit "$ac_status"); }; }; then
10426 eval "$as_ac_var=yes"
10427 else
10428 echo "$as_me: failed program was:" >&5
10429 cat "conftest.$ac_ext" >&5
10430 eval "$as_ac_var=no"
10431 fi
10432 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10433 fi
10434 echo "$as_me:10434: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10435 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10436 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10437 cat >>confdefs.h <<EOF
10438 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10439 EOF
10440
10441 fi
10442 done
10443
10444 if test "$cross_compiling" = yes ; then
10445
10446 for ac_func in \
10447 link \
10448 symlink
10449 do
10450 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10451 echo "$as_me:10451: checking for $ac_func" >&5
10452 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10453 if eval "test \"\${$as_ac_var+set}\" = set"; then
10454 echo $ECHO_N "(cached) $ECHO_C" >&6
10455 else
10456 cat >"conftest.$ac_ext" <<_ACEOF
10457 #line 10457 "configure"
10458 #include "confdefs.h"
10459 #define $ac_func autoconf_temporary
10460 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10461 #undef $ac_func
10462
10463 #ifdef __cplusplus
10464 extern "C"
10465 #endif
10466
10467 /* We use char because int might match the return type of a gcc2
10468 builtin and then its argument prototype would still apply. */
10469 char $ac_func (void);
10470
10471 int
10472 main (void)
10473 {
10474
10475 /* The GNU C library defines stubs for functions which it implements
10476 to always fail with ENOSYS. Some functions are actually named
10477 something starting with __ and the normal name is an alias. */
10478 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10479 #error found stub for $ac_func
10480 #endif
10481
10482 return $ac_func ();
10483 ;
10484 return 0;
10485 }
10486 _ACEOF
10487 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10488 if { (eval echo "$as_me:10488: \"$ac_link\"") >&5
10489 (eval $ac_link) 2>&5
10490 ac_status=$?
10491 echo "$as_me:10491: \$? = $ac_status" >&5
10492 (exit "$ac_status"); } &&
10493 { ac_try='test -s "conftest$ac_exeext"'
10494 { (eval echo "$as_me:10494: \"$ac_try\"") >&5
10495 (eval $ac_try) 2>&5
10496 ac_status=$?
10497 echo "$as_me:10497: \$? = $ac_status" >&5
10498 (exit "$ac_status"); }; }; then
10499 eval "$as_ac_var=yes"
10500 else
10501 echo "$as_me: failed program was:" >&5
10502 cat "conftest.$ac_ext" >&5
10503 eval "$as_ac_var=no"
10504 fi
10505 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10506 fi
10507 echo "$as_me:10507: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10508 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10509 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10510 cat >>confdefs.h <<EOF
10511 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10512 EOF
10513
10514 fi
10515 done
10516
10517 else
10518 echo "$as_me:10518: checking if link/symlink functions work" >&5
10519 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10520 if test "${cf_cv_link_funcs+set}" = set; then
10521 echo $ECHO_N "(cached) $ECHO_C" >&6
10522 else
10523
10524 cf_cv_link_funcs=
10525 for cf_func in link symlink ; do
10526 if test "$cross_compiling" = yes; then
10527
10528 eval 'ac_cv_func_'$cf_func'=error'
10529 else
10530 cat >"conftest.$ac_ext" <<_ACEOF
10531 #line 10531 "configure"
10532 #include "confdefs.h"
10533
10534 $ac_includes_default
10535
10536 int main(void)
10537 {
10538 int fail = 0;
10539 char src[] = "conftest.tmp";
10540 char dst[] = "conftest.chk";
10541 struct stat src_sb, dst_sb;
10542 FILE *fp = fopen(src, "w");
10543 if (fp == NULL) { fail = 3; } else {
10544 fclose(fp); stat(src, &src_sb);
10545 if ($cf_func(src, dst) < 0) {
10546 fail = 1;
10547 } else if (stat(dst, &dst_sb) < 0) {
10548 fail = 2;
10549 } else {
10550 long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10551 if (diff < 0) diff = -diff;
10552 if (diff > 2) fail = 3;
10553 }
10554 }
10555 #ifdef HAVE_UNLINK
10556 unlink(dst); unlink(src);
10557 #else
10558 remove(dst); remove(src);
10559 #endif
10560 ${cf_cv_main_return:-return} (fail);
10561 }
10562
10563 _ACEOF
10564 rm -f "conftest$ac_exeext"
10565 if { (eval echo "$as_me:10565: \"$ac_link\"") >&5
10566 (eval $ac_link) 2>&5
10567 ac_status=$?
10568 echo "$as_me:10568: \$? = $ac_status" >&5
10569 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10570 { (eval echo "$as_me:10570: \"$ac_try\"") >&5
10571 (eval $ac_try) 2>&5
10572 ac_status=$?
10573 echo "$as_me:10573: \$? = $ac_status" >&5
10574 (exit "$ac_status"); }; }; then
10575
10576 cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10577 eval 'ac_cv_func_'$cf_func'=yes'
10578 else
10579 echo "$as_me: program exited with status $ac_status" >&5
10580 echo "$as_me: failed program was:" >&5
10581 cat "conftest.$ac_ext" >&5
10582
10583 eval 'ac_cv_func_'$cf_func'=no'
10584 fi
10585 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10586 fi
10587 done
10588 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10589
10590 fi
10591 echo "$as_me:10591: result: $cf_cv_link_funcs" >&5
10592 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10593 test "$ac_cv_func_link" = yes &&
10594 cat >>confdefs.h <<\EOF
10595 #define HAVE_LINK 1
10596 EOF
10597
10598 test "$ac_cv_func_symlink" = yes &&
10599 cat >>confdefs.h <<\EOF
10600 #define HAVE_SYMLINK 1
10601 EOF
10602
10603 fi
10604
10605 with_links=no
10606 with_symlinks=no
10607
10608 # soft links (symbolic links) are useful for some systems where hard links do
10609 # not work, or to make it simpler to copy terminfo trees around.
10610 if test "x$ac_cv_func_symlink" = xyes ; then
10611 echo "$as_me:10611: checking if tic should use symbolic links" >&5
10612 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10613
10614 # Check whether --enable-symlinks or --disable-symlinks was given.
10615 if test "${enable_symlinks+set}" = set; then
10616 enableval="$enable_symlinks"
10617 with_symlinks=$enableval
10618 else
10619 with_symlinks=no
10620 fi;
10621 echo "$as_me:10621: result: $with_symlinks" >&5
10622 echo "${ECHO_T}$with_symlinks" >&6
10623 fi
10624
10625 # If we have hard links and did not choose to use soft links instead, there is
10626 # no reason to make this choice optional - use the hard links.
10627 if test "$with_symlinks" = no ; then
10628 echo "$as_me:10628: checking if tic should use hard links" >&5
10629 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10630 if test "x$ac_cv_func_link" = xyes ; then
10631 with_links=yes
10632 else
10633 with_links=no
10634 fi
10635 echo "$as_me:10635: result: $with_links" >&5
10636 echo "${ECHO_T}$with_links" >&6
10637 fi
10638
10639 test "x$with_links" = xyes &&
10640 cat >>confdefs.h <<\EOF
10641 #define USE_LINKS 1
10642 EOF
10643
10644 test "x$with_symlinks" = xyes &&
10645 cat >>confdefs.h <<\EOF
10646 #define USE_SYMLINKS 1
10647 EOF
10648
10649 ### use option --enable-broken-linker to force on use of broken-linker support
10650
10651 echo "$as_me:10651: checking if you want broken-linker support code" >&5
10652 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10653
10654 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10655 if test "${enable_broken_linker+set}" = set; then
10656 enableval="$enable_broken_linker"
10657 with_broken_linker=$enableval
10658 else
10659 with_broken_linker=no
10660 fi;
10661 echo "$as_me:10661: result: $with_broken_linker" >&5
10662 echo "${ECHO_T}$with_broken_linker" >&6
10663
10664 : "${BROKEN_LINKER:=0}"
10665 if test "x$with_broken_linker" = xyes ; then
10666
10667 cat >>confdefs.h <<\EOF
10668 #define BROKEN_LINKER 1
10669 EOF
10670
10671 BROKEN_LINKER=1
10672 fi
10673
10674 ### use option --enable-bsdpad to have tputs process BSD-style prefix padding
10675 echo "$as_me:10675: checking if tputs should process BSD-style prefix padding" >&5
10676 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10677
10678 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10679 if test "${enable_bsdpad+set}" = set; then
10680 enableval="$enable_bsdpad"
10681 with_bsdpad=$enableval
10682 else
10683 with_bsdpad=no
10684 fi;
10685 echo "$as_me:10685: result: $with_bsdpad" >&5
10686 echo "${ECHO_T}$with_bsdpad" >&6
10687 test "x$with_bsdpad" = xyes &&
10688 cat >>confdefs.h <<\EOF
10689 #define BSD_TPUTS 1
10690 EOF
10691
10692 ### use option --enable-widec to turn on use of wide-character support
10693 NCURSES_CH_T=chtype
10694 NCURSES_LIBUTF8=0
10695
10696 NEED_WCHAR_H=0
10697 NCURSES_MBSTATE_T=0
10698 NCURSES_WCHAR_T=0
10699 NCURSES_WINT_T=0
10700
10701 # Check to define _XOPEN_SOURCE "automatically"
10702 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10703
10704 echo "$as_me:10704: checking if the POSIX test-macros are already defined" >&5
10705 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10706 if test "${cf_cv_posix_visible+set}" = set; then
10707 echo $ECHO_N "(cached) $ECHO_C" >&6
10708 else
10709
10710 cat >"conftest.$ac_ext" <<_ACEOF
10711 #line 10711 "configure"
10712 #include "confdefs.h"
10713 #include <stdio.h>
10714 int
10715 main (void)
10716 {
10717
10718 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10719 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10720 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10721 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10722 #error conflicting symbols found
10723 #endif
10724
10725 ;
10726 return 0;
10727 }
10728 _ACEOF
10729 rm -f "conftest.$ac_objext"
10730 if { (eval echo "$as_me:10730: \"$ac_compile\"") >&5
10731 (eval $ac_compile) 2>&5
10732 ac_status=$?
10733 echo "$as_me:10733: \$? = $ac_status" >&5
10734 (exit "$ac_status"); } &&
10735 { ac_try='test -s "conftest.$ac_objext"'
10736 { (eval echo "$as_me:10736: \"$ac_try\"") >&5
10737 (eval $ac_try) 2>&5
10738 ac_status=$?
10739 echo "$as_me:10739: \$? = $ac_status" >&5
10740 (exit "$ac_status"); }; }; then
10741 cf_cv_posix_visible=no
10742 else
10743 echo "$as_me: failed program was:" >&5
10744 cat "conftest.$ac_ext" >&5
10745 cf_cv_posix_visible=yes
10746 fi
10747 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10748
10749 fi
10750 echo "$as_me:10750: result: $cf_cv_posix_visible" >&5
10751 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10752
10753 if test "$cf_cv_posix_visible" = no; then
10754
10755 cf_XOPEN_SOURCE=600
10756 cf_POSIX_C_SOURCE=199506L
10757 cf_xopen_source=
10758
10759 case "$host_os" in
10760 (aix[4-7]*)
10761 cf_xopen_source="-D_ALL_SOURCE"
10762 ;;
10763 (darwin[0-8].*)
10764 cf_xopen_source="-D_APPLE_C_SOURCE"
10765 ;;
10766 (darwin*)
10767 cf_xopen_source="-D_DARWIN_C_SOURCE"
10768 cf_XOPEN_SOURCE=
10769 ;;
10770 (freebsd*|dragonfly*|midnightbsd*)
10771 # 5.x headers associate
10772 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10773 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10774 cf_POSIX_C_SOURCE=200112L
10775 cf_XOPEN_SOURCE=600
10776 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10777 ;;
10778 (hpux11*)
10779 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10780 ;;
10781 (hpux*)
10782 cf_xopen_source="-D_HPUX_SOURCE"
10783 ;;
10784 (irix[56].*)
10785 cf_xopen_source="-D_SGI_SOURCE"
10786 cf_XOPEN_SOURCE=
10787 ;;
10788 (linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
10789
10790 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10791
10792 echo "$as_me:10792: checking if this is the GNU C library" >&5
10793 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10794 if test "${cf_cv_gnu_library+set}" = set; then
10795 echo $ECHO_N "(cached) $ECHO_C" >&6
10796 else
10797
10798 cat >"conftest.$ac_ext" <<_ACEOF
10799 #line 10799 "configure"
10800 #include "confdefs.h"
10801 #include <sys/types.h>
10802 int
10803 main (void)
10804 {
10805
10806 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10807 return 0;
10808 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10809 return 0;
10810 #else
10811 # error not GNU C library
10812 #endif
10813 ;
10814 return 0;
10815 }
10816 _ACEOF
10817 rm -f "conftest.$ac_objext"
10818 if { (eval echo "$as_me:10818: \"$ac_compile\"") >&5
10819 (eval $ac_compile) 2>&5
10820 ac_status=$?
10821 echo "$as_me:10821: \$? = $ac_status" >&5
10822 (exit "$ac_status"); } &&
10823 { ac_try='test -s "conftest.$ac_objext"'
10824 { (eval echo "$as_me:10824: \"$ac_try\"") >&5
10825 (eval $ac_try) 2>&5
10826 ac_status=$?
10827 echo "$as_me:10827: \$? = $ac_status" >&5
10828 (exit "$ac_status"); }; }; then
10829 cf_cv_gnu_library=yes
10830 else
10831 echo "$as_me: failed program was:" >&5
10832 cat "conftest.$ac_ext" >&5
10833 cf_cv_gnu_library=no
10834 fi
10835 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10836
10837 fi
10838 echo "$as_me:10838: result: $cf_cv_gnu_library" >&5
10839 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10840
10841 if test x$cf_cv_gnu_library = xyes; then
10842
10843 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10844 # was changed to help a little. newlib incorporated the change about 4
10845 # years later.
10846 echo "$as_me:10846: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10847 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10848 if test "${cf_cv_gnu_library_219+set}" = set; then
10849 echo $ECHO_N "(cached) $ECHO_C" >&6
10850 else
10851
10852 cf_save="$CPPFLAGS"
10853
10854 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10855 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10856
10857 cat >"conftest.$ac_ext" <<_ACEOF
10858 #line 10858 "configure"
10859 #include "confdefs.h"
10860 #include <sys/types.h>
10861 int
10862 main (void)
10863 {
10864
10865 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10866 return 0;
10867 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10868 return 0;
10869 #else
10870 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10871 #endif
10872 ;
10873 return 0;
10874 }
10875 _ACEOF
10876 rm -f "conftest.$ac_objext"
10877 if { (eval echo "$as_me:10877: \"$ac_compile\"") >&5
10878 (eval $ac_compile) 2>&5
10879 ac_status=$?
10880 echo "$as_me:10880: \$? = $ac_status" >&5
10881 (exit "$ac_status"); } &&
10882 { ac_try='test -s "conftest.$ac_objext"'
10883 { (eval echo "$as_me:10883: \"$ac_try\"") >&5
10884 (eval $ac_try) 2>&5
10885 ac_status=$?
10886 echo "$as_me:10886: \$? = $ac_status" >&5
10887 (exit "$ac_status"); }; }; then
10888 cf_cv_gnu_library_219=yes
10889 else
10890 echo "$as_me: failed program was:" >&5
10891 cat "conftest.$ac_ext" >&5
10892 cf_cv_gnu_library_219=no
10893 fi
10894 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10895 CPPFLAGS="$cf_save"
10896
10897 fi
10898 echo "$as_me:10898: result: $cf_cv_gnu_library_219" >&5
10899 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10900
10901 if test "x$cf_cv_gnu_library_219" = xyes; then
10902 cf_save="$CPPFLAGS"
10903 echo "$as_me:10903: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10904 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10905 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10906 echo $ECHO_N "(cached) $ECHO_C" >&6
10907 else
10908
10909 cf_fix_cppflags=no
10910 cf_new_cflags=
10911 cf_new_cppflags=
10912 cf_new_extra_cppflags=
10913
10914 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10915 do
10916 case "$cf_fix_cppflags" in
10917 (no)
10918 case "$cf_add_cflags" in
10919 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10920 case "$cf_add_cflags" in
10921 (-D*)
10922 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10923
10924 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10925 && test -z "${cf_tst_cflags}" \
10926 && cf_fix_cppflags=yes
10927
10928 if test "$cf_fix_cppflags" = yes ; then
10929
10930 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10931 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10932
10933 continue
10934 elif test "${cf_tst_cflags}" = "\"'" ; then
10935
10936 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10937 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10938
10939 continue
10940 fi
10941 ;;
10942 esac
10943 case "$CPPFLAGS" in
10944 (*$cf_add_cflags)
10945 ;;
10946 (*)
10947 case "$cf_add_cflags" in
10948 (-D*)
10949 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10950
10951 CPPFLAGS=`echo "$CPPFLAGS" | \
10952 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10953 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10954
10955 ;;
10956 esac
10957
10958 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10959 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10960
10961 ;;
10962 esac
10963 ;;
10964 (*)
10965
10966 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10967 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10968
10969 ;;
10970 esac
10971 ;;
10972 (yes)
10973
10974 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10975 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10976
10977 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10978
10979 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10980 && test -z "${cf_tst_cflags}" \
10981 && cf_fix_cppflags=no
10982 ;;
10983 esac
10984 done
10985
10986 if test -n "$cf_new_cflags" ; then
10987
10988 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10989 CFLAGS="${CFLAGS}$cf_new_cflags"
10990
10991 fi
10992
10993 if test -n "$cf_new_cppflags" ; then
10994
10995 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10996 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10997
10998 fi
10999
11000 if test -n "$cf_new_extra_cppflags" ; then
11001
11002 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11003 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11004
11005 fi
11006
11007 cat >"conftest.$ac_ext" <<_ACEOF
11008 #line 11008 "configure"
11009 #include "confdefs.h"
11010
11011 #include <limits.h>
11012 #include <sys/types.h>
11013
11014 int
11015 main (void)
11016 {
11017
11018 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
11019 return 0;
11020 #else
11021 # error GNU C library is too old
11022 #endif
11023 ;
11024 return 0;
11025 }
11026 _ACEOF
11027 rm -f "conftest.$ac_objext"
11028 if { (eval echo "$as_me:11028: \"$ac_compile\"") >&5
11029 (eval $ac_compile) 2>&5
11030 ac_status=$?
11031 echo "$as_me:11031: \$? = $ac_status" >&5
11032 (exit "$ac_status"); } &&
11033 { ac_try='test -s "conftest.$ac_objext"'
11034 { (eval echo "$as_me:11034: \"$ac_try\"") >&5
11035 (eval $ac_try) 2>&5
11036 ac_status=$?
11037 echo "$as_me:11037: \$? = $ac_status" >&5
11038 (exit "$ac_status"); }; }; then
11039 cf_cv_gnu_dftsrc_219=yes
11040 else
11041 echo "$as_me: failed program was:" >&5
11042 cat "conftest.$ac_ext" >&5
11043 cf_cv_gnu_dftsrc_219=no
11044 fi
11045 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11046
11047 fi
11048 echo "$as_me:11048: result: $cf_cv_gnu_dftsrc_219" >&5
11049 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
11050 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
11051 else
11052 cf_cv_gnu_dftsrc_219=maybe
11053 fi
11054
11055 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
11056
11057 echo "$as_me:11057: checking if we must define _GNU_SOURCE" >&5
11058 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
11059 if test "${cf_cv_gnu_source+set}" = set; then
11060 echo $ECHO_N "(cached) $ECHO_C" >&6
11061 else
11062
11063 cat >"conftest.$ac_ext" <<_ACEOF
11064 #line 11064 "configure"
11065 #include "confdefs.h"
11066 #include <sys/types.h>
11067 int
11068 main (void)
11069 {
11070
11071 #ifndef _XOPEN_SOURCE
11072 #error expected _XOPEN_SOURCE to be defined
11073 #endif
11074 ;
11075 return 0;
11076 }
11077 _ACEOF
11078 rm -f "conftest.$ac_objext"
11079 if { (eval echo "$as_me:11079: \"$ac_compile\"") >&5
11080 (eval $ac_compile) 2>&5
11081 ac_status=$?
11082 echo "$as_me:11082: \$? = $ac_status" >&5
11083 (exit "$ac_status"); } &&
11084 { ac_try='test -s "conftest.$ac_objext"'
11085 { (eval echo "$as_me:11085: \"$ac_try\"") >&5
11086 (eval $ac_try) 2>&5
11087 ac_status=$?
11088 echo "$as_me:11088: \$? = $ac_status" >&5
11089 (exit "$ac_status"); }; }; then
11090 cf_cv_gnu_source=no
11091 else
11092 echo "$as_me: failed program was:" >&5
11093 cat "conftest.$ac_ext" >&5
11094 cf_save="$CPPFLAGS"
11095
11096 cf_fix_cppflags=no
11097 cf_new_cflags=
11098 cf_new_cppflags=
11099 cf_new_extra_cppflags=
11100
11101 for cf_add_cflags in -D_GNU_SOURCE
11102 do
11103 case "$cf_fix_cppflags" in
11104 (no)
11105 case "$cf_add_cflags" in
11106 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11107 case "$cf_add_cflags" in
11108 (-D*)
11109 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11110
11111 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11112 && test -z "${cf_tst_cflags}" \
11113 && cf_fix_cppflags=yes
11114
11115 if test "$cf_fix_cppflags" = yes ; then
11116
11117 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11118 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11119
11120 continue
11121 elif test "${cf_tst_cflags}" = "\"'" ; then
11122
11123 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11124 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11125
11126 continue
11127 fi
11128 ;;
11129 esac
11130 case "$CPPFLAGS" in
11131 (*$cf_add_cflags)
11132 ;;
11133 (*)
11134 case "$cf_add_cflags" in
11135 (-D*)
11136 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11137
11138 CPPFLAGS=`echo "$CPPFLAGS" | \
11139 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11140 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11141
11142 ;;
11143 esac
11144
11145 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11146 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11147
11148 ;;
11149 esac
11150 ;;
11151 (*)
11152
11153 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11154 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11155
11156 ;;
11157 esac
11158 ;;
11159 (yes)
11160
11161 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11162 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11163
11164 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11165
11166 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11167 && test -z "${cf_tst_cflags}" \
11168 && cf_fix_cppflags=no
11169 ;;
11170 esac
11171 done
11172
11173 if test -n "$cf_new_cflags" ; then
11174
11175 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11176 CFLAGS="${CFLAGS}$cf_new_cflags"
11177
11178 fi
11179
11180 if test -n "$cf_new_cppflags" ; then
11181
11182 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11183 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11184
11185 fi
11186
11187 if test -n "$cf_new_extra_cppflags" ; then
11188
11189 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11190 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11191
11192 fi
11193
11194 cat >"conftest.$ac_ext" <<_ACEOF
11195 #line 11195 "configure"
11196 #include "confdefs.h"
11197 #include <sys/types.h>
11198 int
11199 main (void)
11200 {
11201
11202 #ifdef _XOPEN_SOURCE
11203 #error expected _XOPEN_SOURCE to be undefined
11204 #endif
11205 ;
11206 return 0;
11207 }
11208 _ACEOF
11209 rm -f "conftest.$ac_objext"
11210 if { (eval echo "$as_me:11210: \"$ac_compile\"") >&5
11211 (eval $ac_compile) 2>&5
11212 ac_status=$?
11213 echo "$as_me:11213: \$? = $ac_status" >&5
11214 (exit "$ac_status"); } &&
11215 { ac_try='test -s "conftest.$ac_objext"'
11216 { (eval echo "$as_me:11216: \"$ac_try\"") >&5
11217 (eval $ac_try) 2>&5
11218 ac_status=$?
11219 echo "$as_me:11219: \$? = $ac_status" >&5
11220 (exit "$ac_status"); }; }; then
11221 cf_cv_gnu_source=no
11222 else
11223 echo "$as_me: failed program was:" >&5
11224 cat "conftest.$ac_ext" >&5
11225 cf_cv_gnu_source=yes
11226 fi
11227 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11228 CPPFLAGS="$cf_save"
11229
11230 fi
11231 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11232
11233 fi
11234 echo "$as_me:11234: result: $cf_cv_gnu_source" >&5
11235 echo "${ECHO_T}$cf_cv_gnu_source" >&6
11236
11237 if test "$cf_cv_gnu_source" = yes
11238 then
11239 echo "$as_me:11239: checking if we should also define _DEFAULT_SOURCE" >&5
11240 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
11241 if test "${cf_cv_default_source+set}" = set; then
11242 echo $ECHO_N "(cached) $ECHO_C" >&6
11243 else
11244
11245 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11246 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
11247
11248 cat >"conftest.$ac_ext" <<_ACEOF
11249 #line 11249 "configure"
11250 #include "confdefs.h"
11251 #include <sys/types.h>
11252 int
11253 main (void)
11254 {
11255
11256 #ifdef _DEFAULT_SOURCE
11257 #error expected _DEFAULT_SOURCE to be undefined
11258 #endif
11259 ;
11260 return 0;
11261 }
11262 _ACEOF
11263 rm -f "conftest.$ac_objext"
11264 if { (eval echo "$as_me:11264: \"$ac_compile\"") >&5
11265 (eval $ac_compile) 2>&5
11266 ac_status=$?
11267 echo "$as_me:11267: \$? = $ac_status" >&5
11268 (exit "$ac_status"); } &&
11269 { ac_try='test -s "conftest.$ac_objext"'
11270 { (eval echo "$as_me:11270: \"$ac_try\"") >&5
11271 (eval $ac_try) 2>&5
11272 ac_status=$?
11273 echo "$as_me:11273: \$? = $ac_status" >&5
11274 (exit "$ac_status"); }; }; then
11275 cf_cv_default_source=no
11276 else
11277 echo "$as_me: failed program was:" >&5
11278 cat "conftest.$ac_ext" >&5
11279 cf_cv_default_source=yes
11280 fi
11281 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11282
11283 fi
11284 echo "$as_me:11284: result: $cf_cv_default_source" >&5
11285 echo "${ECHO_T}$cf_cv_default_source" >&6
11286 if test "$cf_cv_default_source" = yes
11287 then
11288
11289 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11290 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11291
11292 fi
11293 fi
11294 fi
11295
11296 fi
11297
11298 ;;
11299 linux*musl)
11300 cf_xopen_source="-D_BSD_SOURCE"
11301 ;;
11302 (minix*)
11303 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
11304 ;;
11305 (mirbsd*)
11306 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
11307 cf_XOPEN_SOURCE=
11308
11309 if test "$cf_cv_posix_visible" = no; then
11310
11311 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11312
11313 cf_save_CFLAGS="$CFLAGS"
11314 cf_save_CPPFLAGS="$CPPFLAGS"
11315
11316 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11317 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11318 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11319
11320 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11321 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11322 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11323
11324 echo "$as_me:11324: checking if we should define _POSIX_C_SOURCE" >&5
11325 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11326 if test "${cf_cv_posix_c_source+set}" = set; then
11327 echo $ECHO_N "(cached) $ECHO_C" >&6
11328 else
11329
11330 echo "${as_me:-configure}:11330: testing if the symbol is already defined go no further ..." 1>&5
11331
11332 cat >"conftest.$ac_ext" <<_ACEOF
11333 #line 11333 "configure"
11334 #include "confdefs.h"
11335 #include <sys/types.h>
11336 int
11337 main (void)
11338 {
11339
11340 #ifndef _POSIX_C_SOURCE
11341 #error _POSIX_C_SOURCE is not defined
11342 #endif
11343 ;
11344 return 0;
11345 }
11346 _ACEOF
11347 rm -f "conftest.$ac_objext"
11348 if { (eval echo "$as_me:11348: \"$ac_compile\"") >&5
11349 (eval $ac_compile) 2>&5
11350 ac_status=$?
11351 echo "$as_me:11351: \$? = $ac_status" >&5
11352 (exit "$ac_status"); } &&
11353 { ac_try='test -s "conftest.$ac_objext"'
11354 { (eval echo "$as_me:11354: \"$ac_try\"") >&5
11355 (eval $ac_try) 2>&5
11356 ac_status=$?
11357 echo "$as_me:11357: \$? = $ac_status" >&5
11358 (exit "$ac_status"); }; }; then
11359 cf_cv_posix_c_source=no
11360 else
11361 echo "$as_me: failed program was:" >&5
11362 cat "conftest.$ac_ext" >&5
11363 cf_want_posix_source=no
11364 case .$cf_POSIX_C_SOURCE in
11365 (.[12]??*)
11366 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11367 ;;
11368 (.2)
11369 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11370 cf_want_posix_source=yes
11371 ;;
11372 (.*)
11373 cf_want_posix_source=yes
11374 ;;
11375 esac
11376 if test "$cf_want_posix_source" = yes ; then
11377 cat >"conftest.$ac_ext" <<_ACEOF
11378 #line 11378 "configure"
11379 #include "confdefs.h"
11380 #include <sys/types.h>
11381 int
11382 main (void)
11383 {
11384
11385 #ifdef _POSIX_SOURCE
11386 #error _POSIX_SOURCE is defined
11387 #endif
11388 ;
11389 return 0;
11390 }
11391 _ACEOF
11392 rm -f "conftest.$ac_objext"
11393 if { (eval echo "$as_me:11393: \"$ac_compile\"") >&5
11394 (eval $ac_compile) 2>&5
11395 ac_status=$?
11396 echo "$as_me:11396: \$? = $ac_status" >&5
11397 (exit "$ac_status"); } &&
11398 { ac_try='test -s "conftest.$ac_objext"'
11399 { (eval echo "$as_me:11399: \"$ac_try\"") >&5
11400 (eval $ac_try) 2>&5
11401 ac_status=$?
11402 echo "$as_me:11402: \$? = $ac_status" >&5
11403 (exit "$ac_status"); }; }; then
11404 :
11405 else
11406 echo "$as_me: failed program was:" >&5
11407 cat "conftest.$ac_ext" >&5
11408 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11409 fi
11410 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11411 fi
11412
11413 echo "${as_me:-configure}:11413: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11414
11415 CFLAGS="$cf_trim_CFLAGS"
11416 CPPFLAGS="$cf_trim_CPPFLAGS"
11417
11418 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11419 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11420
11421 echo "${as_me:-configure}:11421: testing if the second compile does not leave our definition intact error ..." 1>&5
11422
11423 cat >"conftest.$ac_ext" <<_ACEOF
11424 #line 11424 "configure"
11425 #include "confdefs.h"
11426 #include <sys/types.h>
11427 int
11428 main (void)
11429 {
11430
11431 #ifndef _POSIX_C_SOURCE
11432 #error _POSIX_C_SOURCE is not defined
11433 #endif
11434 ;
11435 return 0;
11436 }
11437 _ACEOF
11438 rm -f "conftest.$ac_objext"
11439 if { (eval echo "$as_me:11439: \"$ac_compile\"") >&5
11440 (eval $ac_compile) 2>&5
11441 ac_status=$?
11442 echo "$as_me:11442: \$? = $ac_status" >&5
11443 (exit "$ac_status"); } &&
11444 { ac_try='test -s "conftest.$ac_objext"'
11445 { (eval echo "$as_me:11445: \"$ac_try\"") >&5
11446 (eval $ac_try) 2>&5
11447 ac_status=$?
11448 echo "$as_me:11448: \$? = $ac_status" >&5
11449 (exit "$ac_status"); }; }; then
11450 :
11451 else
11452 echo "$as_me: failed program was:" >&5
11453 cat "conftest.$ac_ext" >&5
11454 cf_cv_posix_c_source=no
11455 fi
11456 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11457 CFLAGS="$cf_save_CFLAGS"
11458 CPPFLAGS="$cf_save_CPPFLAGS"
11459
11460 fi
11461 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11462
11463 fi
11464 echo "$as_me:11464: result: $cf_cv_posix_c_source" >&5
11465 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11466
11467 if test "$cf_cv_posix_c_source" != no ; then
11468 CFLAGS="$cf_trim_CFLAGS"
11469 CPPFLAGS="$cf_trim_CPPFLAGS"
11470
11471 cf_fix_cppflags=no
11472 cf_new_cflags=
11473 cf_new_cppflags=
11474 cf_new_extra_cppflags=
11475
11476 for cf_add_cflags in $cf_cv_posix_c_source
11477 do
11478 case "$cf_fix_cppflags" in
11479 (no)
11480 case "$cf_add_cflags" in
11481 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11482 case "$cf_add_cflags" in
11483 (-D*)
11484 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11485
11486 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11487 && test -z "${cf_tst_cflags}" \
11488 && cf_fix_cppflags=yes
11489
11490 if test "$cf_fix_cppflags" = yes ; then
11491
11492 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11493 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11494
11495 continue
11496 elif test "${cf_tst_cflags}" = "\"'" ; then
11497
11498 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11499 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11500
11501 continue
11502 fi
11503 ;;
11504 esac
11505 case "$CPPFLAGS" in
11506 (*$cf_add_cflags)
11507 ;;
11508 (*)
11509 case "$cf_add_cflags" in
11510 (-D*)
11511 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11512
11513 CPPFLAGS=`echo "$CPPFLAGS" | \
11514 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11515 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11516
11517 ;;
11518 esac
11519
11520 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11521 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11522
11523 ;;
11524 esac
11525 ;;
11526 (*)
11527
11528 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11529 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11530
11531 ;;
11532 esac
11533 ;;
11534 (yes)
11535
11536 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11537 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11538
11539 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11540
11541 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11542 && test -z "${cf_tst_cflags}" \
11543 && cf_fix_cppflags=no
11544 ;;
11545 esac
11546 done
11547
11548 if test -n "$cf_new_cflags" ; then
11549
11550 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11551 CFLAGS="${CFLAGS}$cf_new_cflags"
11552
11553 fi
11554
11555 if test -n "$cf_new_cppflags" ; then
11556
11557 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11558 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11559
11560 fi
11561
11562 if test -n "$cf_new_extra_cppflags" ; then
11563
11564 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11565 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11566
11567 fi
11568
11569 fi
11570
11571 fi # cf_cv_posix_visible
11572
11573 ;;
11574 (netbsd*)
11575 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11576 ;;
11577 (openbsd[6-9]*)
11578 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11579 # see https://www.mail-archive.com/[email protected]/msg13200.html
11580 # Abusing the conformance level is a workaround.
11581 { echo "$as_me:11581: WARNING: this system does not provide usable locale support" >&5
11582 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11583 cf_xopen_source="-D_BSD_SOURCE"
11584 cf_XOPEN_SOURCE=700
11585 ;;
11586 (openbsd[4-5]*)
11587 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11588 cf_xopen_source="-D_BSD_SOURCE"
11589 cf_XOPEN_SOURCE=600
11590 ;;
11591 (openbsd*)
11592 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11593 ;;
11594 (osf[45]*)
11595 cf_xopen_source="-D_OSF_SOURCE"
11596 ;;
11597 (nto-qnx*)
11598 cf_xopen_source="-D_QNX_SOURCE"
11599 ;;
11600 (sco*)
11601 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11602 ;;
11603 (solaris2.*)
11604 cf_xopen_source="-D__EXTENSIONS__"
11605 cf_cv_xopen_source=broken
11606 ;;
11607 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11608 cf_XOPEN_SOURCE=
11609 cf_POSIX_C_SOURCE=
11610 ;;
11611 (*)
11612
11613 echo "$as_me:11613: checking if we should define _XOPEN_SOURCE" >&5
11614 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11615 if test "${cf_cv_xopen_source+set}" = set; then
11616 echo $ECHO_N "(cached) $ECHO_C" >&6
11617 else
11618
11619 cat >"conftest.$ac_ext" <<_ACEOF
11620 #line 11620 "configure"
11621 #include "confdefs.h"
11622
11623 $ac_includes_default
11624
11625 int
11626 main (void)
11627 {
11628
11629 #ifndef _XOPEN_SOURCE
11630 #error _XOPEN_SOURCE is not defined
11631 #endif
11632
11633 ;
11634 return 0;
11635 }
11636 _ACEOF
11637 rm -f "conftest.$ac_objext"
11638 if { (eval echo "$as_me:11638: \"$ac_compile\"") >&5
11639 (eval $ac_compile) 2>&5
11640 ac_status=$?
11641 echo "$as_me:11641: \$? = $ac_status" >&5
11642 (exit "$ac_status"); } &&
11643 { ac_try='test -s "conftest.$ac_objext"'
11644 { (eval echo "$as_me:11644: \"$ac_try\"") >&5
11645 (eval $ac_try) 2>&5
11646 ac_status=$?
11647 echo "$as_me:11647: \$? = $ac_status" >&5
11648 (exit "$ac_status"); }; }; then
11649 cf_cv_xopen_source=no
11650 else
11651 echo "$as_me: failed program was:" >&5
11652 cat "conftest.$ac_ext" >&5
11653 cf_save="$CPPFLAGS"
11654
11655 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11656 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11657
11658 cat >"conftest.$ac_ext" <<_ACEOF
11659 #line 11659 "configure"
11660 #include "confdefs.h"
11661
11662 $ac_includes_default
11663
11664 int
11665 main (void)
11666 {
11667
11668 #ifndef _XOPEN_SOURCE
11669 #error _XOPEN_SOURCE is not defined
11670 #endif
11671
11672 ;
11673 return 0;
11674 }
11675 _ACEOF
11676 rm -f "conftest.$ac_objext"
11677 if { (eval echo "$as_me:11677: \"$ac_compile\"") >&5
11678 (eval $ac_compile) 2>&5
11679 ac_status=$?
11680 echo "$as_me:11680: \$? = $ac_status" >&5
11681 (exit "$ac_status"); } &&
11682 { ac_try='test -s "conftest.$ac_objext"'
11683 { (eval echo "$as_me:11683: \"$ac_try\"") >&5
11684 (eval $ac_try) 2>&5
11685 ac_status=$?
11686 echo "$as_me:11686: \$? = $ac_status" >&5
11687 (exit "$ac_status"); }; }; then
11688 cf_cv_xopen_source=no
11689 else
11690 echo "$as_me: failed program was:" >&5
11691 cat "conftest.$ac_ext" >&5
11692 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11693 fi
11694 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11695 CPPFLAGS="$cf_save"
11696
11697 fi
11698 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11699
11700 fi
11701 echo "$as_me:11701: result: $cf_cv_xopen_source" >&5
11702 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11703
11704 if test "$cf_cv_xopen_source" != no ; then
11705
11706 CFLAGS=`echo "$CFLAGS" | \
11707 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11708 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11709
11710 CPPFLAGS=`echo "$CPPFLAGS" | \
11711 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11712 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11713
11714 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11715
11716 for cf_add_cflags in $cf_temp_xopen_source
11717 do
11718 case "x$cf_add_cflags" in
11719 (x-[DU]*)
11720
11721 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11722 while true
11723 do
11724 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'`
11725 test "$CFLAGS" != "$cf_old_cflag" || break
11726
11727 CFLAGS="$cf_old_cflag"
11728 done
11729
11730 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11731 while true
11732 do
11733 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'`
11734 test "$CPPFLAGS" != "$cf_old_cflag" || break
11735
11736 CPPFLAGS="$cf_old_cflag"
11737 done
11738
11739 ;;
11740 esac
11741
11742 cf_fix_cppflags=no
11743 cf_new_cflags=
11744 cf_new_cppflags=
11745 cf_new_extra_cppflags=
11746
11747 for cf_add_cflags in $cf_add_cflags
11748 do
11749 case "$cf_fix_cppflags" in
11750 (no)
11751 case "$cf_add_cflags" in
11752 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11753 case "$cf_add_cflags" in
11754 (-D*)
11755 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11756
11757 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11758 && test -z "${cf_tst_cflags}" \
11759 && cf_fix_cppflags=yes
11760
11761 if test "$cf_fix_cppflags" = yes ; then
11762
11763 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11764 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11765
11766 continue
11767 elif test "${cf_tst_cflags}" = "\"'" ; then
11768
11769 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11770 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11771
11772 continue
11773 fi
11774 ;;
11775 esac
11776 case "$CPPFLAGS" in
11777 (*$cf_add_cflags)
11778 ;;
11779 (*)
11780 case "$cf_add_cflags" in
11781 (-D*)
11782 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11783
11784 CPPFLAGS=`echo "$CPPFLAGS" | \
11785 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11786 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11787
11788 ;;
11789 esac
11790
11791 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11792 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11793
11794 ;;
11795 esac
11796 ;;
11797 (*)
11798
11799 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11800 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11801
11802 ;;
11803 esac
11804 ;;
11805 (yes)
11806
11807 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11808 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11809
11810 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11811
11812 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11813 && test -z "${cf_tst_cflags}" \
11814 && cf_fix_cppflags=no
11815 ;;
11816 esac
11817 done
11818
11819 if test -n "$cf_new_cflags" ; then
11820
11821 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11822 CFLAGS="${CFLAGS}$cf_new_cflags"
11823
11824 fi
11825
11826 if test -n "$cf_new_cppflags" ; then
11827
11828 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11829 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11830
11831 fi
11832
11833 if test -n "$cf_new_extra_cppflags" ; then
11834
11835 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11836 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11837
11838 fi
11839
11840 done
11841
11842 fi
11843
11844 cf_save_xopen_cppflags="$CPPFLAGS"
11845
11846 if test "$cf_cv_posix_visible" = no; then
11847
11848 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11849
11850 cf_save_CFLAGS="$CFLAGS"
11851 cf_save_CPPFLAGS="$CPPFLAGS"
11852
11853 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11854 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11855 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11856
11857 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11858 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11859 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11860
11861 echo "$as_me:11861: checking if we should define _POSIX_C_SOURCE" >&5
11862 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11863 if test "${cf_cv_posix_c_source+set}" = set; then
11864 echo $ECHO_N "(cached) $ECHO_C" >&6
11865 else
11866
11867 echo "${as_me:-configure}:11867: testing if the symbol is already defined go no further ..." 1>&5
11868
11869 cat >"conftest.$ac_ext" <<_ACEOF
11870 #line 11870 "configure"
11871 #include "confdefs.h"
11872 #include <sys/types.h>
11873 int
11874 main (void)
11875 {
11876
11877 #ifndef _POSIX_C_SOURCE
11878 #error _POSIX_C_SOURCE is not defined
11879 #endif
11880 ;
11881 return 0;
11882 }
11883 _ACEOF
11884 rm -f "conftest.$ac_objext"
11885 if { (eval echo "$as_me:11885: \"$ac_compile\"") >&5
11886 (eval $ac_compile) 2>&5
11887 ac_status=$?
11888 echo "$as_me:11888: \$? = $ac_status" >&5
11889 (exit "$ac_status"); } &&
11890 { ac_try='test -s "conftest.$ac_objext"'
11891 { (eval echo "$as_me:11891: \"$ac_try\"") >&5
11892 (eval $ac_try) 2>&5
11893 ac_status=$?
11894 echo "$as_me:11894: \$? = $ac_status" >&5
11895 (exit "$ac_status"); }; }; then
11896 cf_cv_posix_c_source=no
11897 else
11898 echo "$as_me: failed program was:" >&5
11899 cat "conftest.$ac_ext" >&5
11900 cf_want_posix_source=no
11901 case .$cf_POSIX_C_SOURCE in
11902 (.[12]??*)
11903 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11904 ;;
11905 (.2)
11906 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11907 cf_want_posix_source=yes
11908 ;;
11909 (.*)
11910 cf_want_posix_source=yes
11911 ;;
11912 esac
11913 if test "$cf_want_posix_source" = yes ; then
11914 cat >"conftest.$ac_ext" <<_ACEOF
11915 #line 11915 "configure"
11916 #include "confdefs.h"
11917 #include <sys/types.h>
11918 int
11919 main (void)
11920 {
11921
11922 #ifdef _POSIX_SOURCE
11923 #error _POSIX_SOURCE is defined
11924 #endif
11925 ;
11926 return 0;
11927 }
11928 _ACEOF
11929 rm -f "conftest.$ac_objext"
11930 if { (eval echo "$as_me:11930: \"$ac_compile\"") >&5
11931 (eval $ac_compile) 2>&5
11932 ac_status=$?
11933 echo "$as_me:11933: \$? = $ac_status" >&5
11934 (exit "$ac_status"); } &&
11935 { ac_try='test -s "conftest.$ac_objext"'
11936 { (eval echo "$as_me:11936: \"$ac_try\"") >&5
11937 (eval $ac_try) 2>&5
11938 ac_status=$?
11939 echo "$as_me:11939: \$? = $ac_status" >&5
11940 (exit "$ac_status"); }; }; then
11941 :
11942 else
11943 echo "$as_me: failed program was:" >&5
11944 cat "conftest.$ac_ext" >&5
11945 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11946 fi
11947 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11948 fi
11949
11950 echo "${as_me:-configure}:11950: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11951
11952 CFLAGS="$cf_trim_CFLAGS"
11953 CPPFLAGS="$cf_trim_CPPFLAGS"
11954
11955 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11956 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11957
11958 echo "${as_me:-configure}:11958: testing if the second compile does not leave our definition intact error ..." 1>&5
11959
11960 cat >"conftest.$ac_ext" <<_ACEOF
11961 #line 11961 "configure"
11962 #include "confdefs.h"
11963 #include <sys/types.h>
11964 int
11965 main (void)
11966 {
11967
11968 #ifndef _POSIX_C_SOURCE
11969 #error _POSIX_C_SOURCE is not defined
11970 #endif
11971 ;
11972 return 0;
11973 }
11974 _ACEOF
11975 rm -f "conftest.$ac_objext"
11976 if { (eval echo "$as_me:11976: \"$ac_compile\"") >&5
11977 (eval $ac_compile) 2>&5
11978 ac_status=$?
11979 echo "$as_me:11979: \$? = $ac_status" >&5
11980 (exit "$ac_status"); } &&
11981 { ac_try='test -s "conftest.$ac_objext"'
11982 { (eval echo "$as_me:11982: \"$ac_try\"") >&5
11983 (eval $ac_try) 2>&5
11984 ac_status=$?
11985 echo "$as_me:11985: \$? = $ac_status" >&5
11986 (exit "$ac_status"); }; }; then
11987 :
11988 else
11989 echo "$as_me: failed program was:" >&5
11990 cat "conftest.$ac_ext" >&5
11991 cf_cv_posix_c_source=no
11992 fi
11993 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11994 CFLAGS="$cf_save_CFLAGS"
11995 CPPFLAGS="$cf_save_CPPFLAGS"
11996
11997 fi
11998 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11999
12000 fi
12001 echo "$as_me:12001: result: $cf_cv_posix_c_source" >&5
12002 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12003
12004 if test "$cf_cv_posix_c_source" != no ; then
12005 CFLAGS="$cf_trim_CFLAGS"
12006 CPPFLAGS="$cf_trim_CPPFLAGS"
12007
12008 cf_fix_cppflags=no
12009 cf_new_cflags=
12010 cf_new_cppflags=
12011 cf_new_extra_cppflags=
12012
12013 for cf_add_cflags in $cf_cv_posix_c_source
12014 do
12015 case "$cf_fix_cppflags" in
12016 (no)
12017 case "$cf_add_cflags" in
12018 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12019 case "$cf_add_cflags" in
12020 (-D*)
12021 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12022
12023 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12024 && test -z "${cf_tst_cflags}" \
12025 && cf_fix_cppflags=yes
12026
12027 if test "$cf_fix_cppflags" = yes ; then
12028
12029 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12030 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12031
12032 continue
12033 elif test "${cf_tst_cflags}" = "\"'" ; then
12034
12035 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12036 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12037
12038 continue
12039 fi
12040 ;;
12041 esac
12042 case "$CPPFLAGS" in
12043 (*$cf_add_cflags)
12044 ;;
12045 (*)
12046 case "$cf_add_cflags" in
12047 (-D*)
12048 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12049
12050 CPPFLAGS=`echo "$CPPFLAGS" | \
12051 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12052 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12053
12054 ;;
12055 esac
12056
12057 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12058 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12059
12060 ;;
12061 esac
12062 ;;
12063 (*)
12064
12065 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12066 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12067
12068 ;;
12069 esac
12070 ;;
12071 (yes)
12072
12073 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12074 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12075
12076 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12077
12078 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12079 && test -z "${cf_tst_cflags}" \
12080 && cf_fix_cppflags=no
12081 ;;
12082 esac
12083 done
12084
12085 if test -n "$cf_new_cflags" ; then
12086
12087 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12088 CFLAGS="${CFLAGS}$cf_new_cflags"
12089
12090 fi
12091
12092 if test -n "$cf_new_cppflags" ; then
12093
12094 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12095 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12096
12097 fi
12098
12099 if test -n "$cf_new_extra_cppflags" ; then
12100
12101 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12102 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12103
12104 fi
12105
12106 fi
12107
12108 fi # cf_cv_posix_visible
12109
12110 # Some of these niche implementations use copy/paste, double-check...
12111 if test "$cf_cv_xopen_source" = no ; then
12112 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
12113
12114 echo "${as_me:-configure}:12114: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
12115
12116 cat >"conftest.$ac_ext" <<_ACEOF
12117 #line 12117 "configure"
12118 #include "confdefs.h"
12119
12120 $ac_includes_default
12121
12122 int
12123 main (void)
12124 {
12125
12126 #ifndef _XOPEN_SOURCE
12127 #error _XOPEN_SOURCE is not defined
12128 #endif
12129
12130 ;
12131 return 0;
12132 }
12133 _ACEOF
12134 rm -f "conftest.$ac_objext"
12135 if { (eval echo "$as_me:12135: \"$ac_compile\"") >&5
12136 (eval $ac_compile) 2>&5
12137 ac_status=$?
12138 echo "$as_me:12138: \$? = $ac_status" >&5
12139 (exit "$ac_status"); } &&
12140 { ac_try='test -s "conftest.$ac_objext"'
12141 { (eval echo "$as_me:12141: \"$ac_try\"") >&5
12142 (eval $ac_try) 2>&5
12143 ac_status=$?
12144 echo "$as_me:12144: \$? = $ac_status" >&5
12145 (exit "$ac_status"); }; }; then
12146 :
12147 else
12148 echo "$as_me: failed program was:" >&5
12149 cat "conftest.$ac_ext" >&5
12150
12151 { echo "$as_me:12151: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
12152 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
12153 CPPFLAGS="$cf_save_xopen_cppflags"
12154 fi
12155 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12156 fi
12157 ;;
12158 esac
12159
12160 if test -n "$cf_xopen_source" ; then
12161
12162 for cf_add_cflags in $cf_xopen_source
12163 do
12164 case "x$cf_add_cflags" in
12165 (x-[DU]*)
12166
12167 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12168 while true
12169 do
12170 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'`
12171 test "$CFLAGS" != "$cf_old_cflag" || break
12172 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
12173
12174 echo "${as_me:-configure}:12174: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
12175
12176 CFLAGS="$cf_old_cflag"
12177 done
12178
12179 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12180 while true
12181 do
12182 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'`
12183 test "$CPPFLAGS" != "$cf_old_cflag" || break
12184 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
12185
12186 echo "${as_me:-configure}:12186: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
12187
12188 CPPFLAGS="$cf_old_cflag"
12189 done
12190
12191 ;;
12192 esac
12193
12194 cf_fix_cppflags=no
12195 cf_new_cflags=
12196 cf_new_cppflags=
12197 cf_new_extra_cppflags=
12198
12199 for cf_add_cflags in $cf_add_cflags
12200 do
12201 case "$cf_fix_cppflags" in
12202 (no)
12203 case "$cf_add_cflags" in
12204 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12205 case "$cf_add_cflags" in
12206 (-D*)
12207 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12208
12209 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12210 && test -z "${cf_tst_cflags}" \
12211 && cf_fix_cppflags=yes
12212
12213 if test "$cf_fix_cppflags" = yes ; then
12214
12215 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12216 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12217
12218 continue
12219 elif test "${cf_tst_cflags}" = "\"'" ; then
12220
12221 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12222 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12223
12224 continue
12225 fi
12226 ;;
12227 esac
12228 case "$CPPFLAGS" in
12229 (*$cf_add_cflags)
12230 ;;
12231 (*)
12232 case "$cf_add_cflags" in
12233 (-D*)
12234 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12235
12236 CPPFLAGS=`echo "$CPPFLAGS" | \
12237 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12238 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12239
12240 ;;
12241 esac
12242
12243 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12244 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12245
12246 ;;
12247 esac
12248 ;;
12249 (*)
12250
12251 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12252 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12253
12254 ;;
12255 esac
12256 ;;
12257 (yes)
12258
12259 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12260 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12261
12262 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12263
12264 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12265 && test -z "${cf_tst_cflags}" \
12266 && cf_fix_cppflags=no
12267 ;;
12268 esac
12269 done
12270
12271 if test -n "$cf_new_cflags" ; then
12272 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12273
12274 echo "${as_me:-configure}:12274: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12275
12276 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12277 CFLAGS="${CFLAGS}$cf_new_cflags"
12278
12279 fi
12280
12281 if test -n "$cf_new_cppflags" ; then
12282 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12283
12284 echo "${as_me:-configure}:12284: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12285
12286 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12287 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12288
12289 fi
12290
12291 if test -n "$cf_new_extra_cppflags" ; then
12292 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12293
12294 echo "${as_me:-configure}:12294: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12295
12296 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12297 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12298
12299 fi
12300
12301 done
12302
12303 fi
12304
12305 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
12306 echo "$as_me:12306: checking if _XOPEN_SOURCE really is set" >&5
12307 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
12308 cat >"conftest.$ac_ext" <<_ACEOF
12309 #line 12309 "configure"
12310 #include "confdefs.h"
12311 #include <stdlib.h>
12312 int
12313 main (void)
12314 {
12315
12316 #ifndef _XOPEN_SOURCE
12317 #error _XOPEN_SOURCE is not defined
12318 #endif
12319 ;
12320 return 0;
12321 }
12322 _ACEOF
12323 rm -f "conftest.$ac_objext"
12324 if { (eval echo "$as_me:12324: \"$ac_compile\"") >&5
12325 (eval $ac_compile) 2>&5
12326 ac_status=$?
12327 echo "$as_me:12327: \$? = $ac_status" >&5
12328 (exit "$ac_status"); } &&
12329 { ac_try='test -s "conftest.$ac_objext"'
12330 { (eval echo "$as_me:12330: \"$ac_try\"") >&5
12331 (eval $ac_try) 2>&5
12332 ac_status=$?
12333 echo "$as_me:12333: \$? = $ac_status" >&5
12334 (exit "$ac_status"); }; }; then
12335 cf_XOPEN_SOURCE_set=yes
12336 else
12337 echo "$as_me: failed program was:" >&5
12338 cat "conftest.$ac_ext" >&5
12339 cf_XOPEN_SOURCE_set=no
12340 fi
12341 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12342 echo "$as_me:12342: result: $cf_XOPEN_SOURCE_set" >&5
12343 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
12344 if test "$cf_XOPEN_SOURCE_set" = yes
12345 then
12346 cat >"conftest.$ac_ext" <<_ACEOF
12347 #line 12347 "configure"
12348 #include "confdefs.h"
12349 #include <stdlib.h>
12350 int
12351 main (void)
12352 {
12353
12354 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
12355 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
12356 #endif
12357 ;
12358 return 0;
12359 }
12360 _ACEOF
12361 rm -f "conftest.$ac_objext"
12362 if { (eval echo "$as_me:12362: \"$ac_compile\"") >&5
12363 (eval $ac_compile) 2>&5
12364 ac_status=$?
12365 echo "$as_me:12365: \$? = $ac_status" >&5
12366 (exit "$ac_status"); } &&
12367 { ac_try='test -s "conftest.$ac_objext"'
12368 { (eval echo "$as_me:12368: \"$ac_try\"") >&5
12369 (eval $ac_try) 2>&5
12370 ac_status=$?
12371 echo "$as_me:12371: \$? = $ac_status" >&5
12372 (exit "$ac_status"); }; }; then
12373 cf_XOPEN_SOURCE_set_ok=yes
12374 else
12375 echo "$as_me: failed program was:" >&5
12376 cat "conftest.$ac_ext" >&5
12377 cf_XOPEN_SOURCE_set_ok=no
12378 fi
12379 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12380 if test "$cf_XOPEN_SOURCE_set_ok" = no
12381 then
12382 { echo "$as_me:12382: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12383 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12384 fi
12385 else
12386
12387 echo "$as_me:12387: checking if we should define _XOPEN_SOURCE" >&5
12388 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12389 if test "${cf_cv_xopen_source+set}" = set; then
12390 echo $ECHO_N "(cached) $ECHO_C" >&6
12391 else
12392
12393 cat >"conftest.$ac_ext" <<_ACEOF
12394 #line 12394 "configure"
12395 #include "confdefs.h"
12396
12397 $ac_includes_default
12398
12399 int
12400 main (void)
12401 {
12402
12403 #ifndef _XOPEN_SOURCE
12404 #error _XOPEN_SOURCE is not defined
12405 #endif
12406
12407 ;
12408 return 0;
12409 }
12410 _ACEOF
12411 rm -f "conftest.$ac_objext"
12412 if { (eval echo "$as_me:12412: \"$ac_compile\"") >&5
12413 (eval $ac_compile) 2>&5
12414 ac_status=$?
12415 echo "$as_me:12415: \$? = $ac_status" >&5
12416 (exit "$ac_status"); } &&
12417 { ac_try='test -s "conftest.$ac_objext"'
12418 { (eval echo "$as_me:12418: \"$ac_try\"") >&5
12419 (eval $ac_try) 2>&5
12420 ac_status=$?
12421 echo "$as_me:12421: \$? = $ac_status" >&5
12422 (exit "$ac_status"); }; }; then
12423 cf_cv_xopen_source=no
12424 else
12425 echo "$as_me: failed program was:" >&5
12426 cat "conftest.$ac_ext" >&5
12427 cf_save="$CPPFLAGS"
12428
12429 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12430 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12431
12432 cat >"conftest.$ac_ext" <<_ACEOF
12433 #line 12433 "configure"
12434 #include "confdefs.h"
12435
12436 $ac_includes_default
12437
12438 int
12439 main (void)
12440 {
12441
12442 #ifndef _XOPEN_SOURCE
12443 #error _XOPEN_SOURCE is not defined
12444 #endif
12445
12446 ;
12447 return 0;
12448 }
12449 _ACEOF
12450 rm -f "conftest.$ac_objext"
12451 if { (eval echo "$as_me:12451: \"$ac_compile\"") >&5
12452 (eval $ac_compile) 2>&5
12453 ac_status=$?
12454 echo "$as_me:12454: \$? = $ac_status" >&5
12455 (exit "$ac_status"); } &&
12456 { ac_try='test -s "conftest.$ac_objext"'
12457 { (eval echo "$as_me:12457: \"$ac_try\"") >&5
12458 (eval $ac_try) 2>&5
12459 ac_status=$?
12460 echo "$as_me:12460: \$? = $ac_status" >&5
12461 (exit "$ac_status"); }; }; then
12462 cf_cv_xopen_source=no
12463 else
12464 echo "$as_me: failed program was:" >&5
12465 cat "conftest.$ac_ext" >&5
12466 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12467 fi
12468 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12469 CPPFLAGS="$cf_save"
12470
12471 fi
12472 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12473
12474 fi
12475 echo "$as_me:12475: result: $cf_cv_xopen_source" >&5
12476 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12477
12478 if test "$cf_cv_xopen_source" != no ; then
12479
12480 CFLAGS=`echo "$CFLAGS" | \
12481 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12482 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12483
12484 CPPFLAGS=`echo "$CPPFLAGS" | \
12485 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12486 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12487
12488 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12489
12490 for cf_add_cflags in $cf_temp_xopen_source
12491 do
12492 case "x$cf_add_cflags" in
12493 (x-[DU]*)
12494
12495 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12496 while true
12497 do
12498 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'`
12499 test "$CFLAGS" != "$cf_old_cflag" || break
12500
12501 CFLAGS="$cf_old_cflag"
12502 done
12503
12504 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12505 while true
12506 do
12507 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'`
12508 test "$CPPFLAGS" != "$cf_old_cflag" || break
12509
12510 CPPFLAGS="$cf_old_cflag"
12511 done
12512
12513 ;;
12514 esac
12515
12516 cf_fix_cppflags=no
12517 cf_new_cflags=
12518 cf_new_cppflags=
12519 cf_new_extra_cppflags=
12520
12521 for cf_add_cflags in $cf_add_cflags
12522 do
12523 case "$cf_fix_cppflags" in
12524 (no)
12525 case "$cf_add_cflags" in
12526 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12527 case "$cf_add_cflags" in
12528 (-D*)
12529 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12530
12531 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12532 && test -z "${cf_tst_cflags}" \
12533 && cf_fix_cppflags=yes
12534
12535 if test "$cf_fix_cppflags" = yes ; then
12536
12537 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12538 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12539
12540 continue
12541 elif test "${cf_tst_cflags}" = "\"'" ; then
12542
12543 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12544 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12545
12546 continue
12547 fi
12548 ;;
12549 esac
12550 case "$CPPFLAGS" in
12551 (*$cf_add_cflags)
12552 ;;
12553 (*)
12554 case "$cf_add_cflags" in
12555 (-D*)
12556 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12557
12558 CPPFLAGS=`echo "$CPPFLAGS" | \
12559 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12560 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12561
12562 ;;
12563 esac
12564
12565 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12566 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12567
12568 ;;
12569 esac
12570 ;;
12571 (*)
12572
12573 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12574 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12575
12576 ;;
12577 esac
12578 ;;
12579 (yes)
12580
12581 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12582 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12583
12584 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12585
12586 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12587 && test -z "${cf_tst_cflags}" \
12588 && cf_fix_cppflags=no
12589 ;;
12590 esac
12591 done
12592
12593 if test -n "$cf_new_cflags" ; then
12594
12595 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12596 CFLAGS="${CFLAGS}$cf_new_cflags"
12597
12598 fi
12599
12600 if test -n "$cf_new_cppflags" ; then
12601
12602 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12603 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12604
12605 fi
12606
12607 if test -n "$cf_new_extra_cppflags" ; then
12608
12609 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12610 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12611
12612 fi
12613
12614 done
12615
12616 fi
12617
12618 fi
12619 fi
12620 fi # cf_cv_posix_visible
12621
12622 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12623
12624 # Work around breakage on OS X
12625
12626 echo "$as_me:12626: checking if SIGWINCH is defined" >&5
12627 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12628 if test "${cf_cv_define_sigwinch+set}" = set; then
12629 echo $ECHO_N "(cached) $ECHO_C" >&6
12630 else
12631
12632 cat >"conftest.$ac_ext" <<_ACEOF
12633 #line 12633 "configure"
12634 #include "confdefs.h"
12635
12636 #include <sys/types.h>
12637 #include <sys/signal.h>
12638
12639 int
12640 main (void)
12641 {
12642 int x = SIGWINCH; (void)x
12643 ;
12644 return 0;
12645 }
12646 _ACEOF
12647 rm -f "conftest.$ac_objext"
12648 if { (eval echo "$as_me:12648: \"$ac_compile\"") >&5
12649 (eval $ac_compile) 2>&5
12650 ac_status=$?
12651 echo "$as_me:12651: \$? = $ac_status" >&5
12652 (exit "$ac_status"); } &&
12653 { ac_try='test -s "conftest.$ac_objext"'
12654 { (eval echo "$as_me:12654: \"$ac_try\"") >&5
12655 (eval $ac_try) 2>&5
12656 ac_status=$?
12657 echo "$as_me:12657: \$? = $ac_status" >&5
12658 (exit "$ac_status"); }; }; then
12659 cf_cv_define_sigwinch=yes
12660 else
12661 echo "$as_me: failed program was:" >&5
12662 cat "conftest.$ac_ext" >&5
12663 cat >"conftest.$ac_ext" <<_ACEOF
12664 #line 12664 "configure"
12665 #include "confdefs.h"
12666
12667 #undef _XOPEN_SOURCE
12668 #undef _POSIX_SOURCE
12669 #undef _POSIX_C_SOURCE
12670 #include <sys/types.h>
12671 #include <sys/signal.h>
12672
12673 int
12674 main (void)
12675 {
12676 int x = SIGWINCH; (void)x
12677 ;
12678 return 0;
12679 }
12680 _ACEOF
12681 rm -f "conftest.$ac_objext"
12682 if { (eval echo "$as_me:12682: \"$ac_compile\"") >&5
12683 (eval $ac_compile) 2>&5
12684 ac_status=$?
12685 echo "$as_me:12685: \$? = $ac_status" >&5
12686 (exit "$ac_status"); } &&
12687 { ac_try='test -s "conftest.$ac_objext"'
12688 { (eval echo "$as_me:12688: \"$ac_try\"") >&5
12689 (eval $ac_try) 2>&5
12690 ac_status=$?
12691 echo "$as_me:12691: \$? = $ac_status" >&5
12692 (exit "$ac_status"); }; }; then
12693 cf_cv_define_sigwinch=maybe
12694 else
12695 echo "$as_me: failed program was:" >&5
12696 cat "conftest.$ac_ext" >&5
12697 cf_cv_define_sigwinch=no
12698 fi
12699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12700
12701 fi
12702 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12703
12704 fi
12705 echo "$as_me:12705: result: $cf_cv_define_sigwinch" >&5
12706 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12707
12708 if test "$cf_cv_define_sigwinch" = maybe ; then
12709 echo "$as_me:12709: checking for actual SIGWINCH definition" >&5
12710 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12711 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12712 echo $ECHO_N "(cached) $ECHO_C" >&6
12713 else
12714
12715 cf_cv_fixup_sigwinch=unknown
12716 cf_sigwinch=32
12717 while test "$cf_sigwinch" != 1
12718 do
12719 cat >"conftest.$ac_ext" <<_ACEOF
12720 #line 12720 "configure"
12721 #include "confdefs.h"
12722
12723 #undef _XOPEN_SOURCE
12724 #undef _POSIX_SOURCE
12725 #undef _POSIX_C_SOURCE
12726 #include <sys/types.h>
12727 #include <sys/signal.h>
12728
12729 int
12730 main (void)
12731 {
12732
12733 #if SIGWINCH != $cf_sigwinch
12734 #error SIGWINCH is not $cf_sigwinch
12735 #endif
12736 int x = SIGWINCH; (void)x
12737 ;
12738 return 0;
12739 }
12740 _ACEOF
12741 rm -f "conftest.$ac_objext"
12742 if { (eval echo "$as_me:12742: \"$ac_compile\"") >&5
12743 (eval $ac_compile) 2>&5
12744 ac_status=$?
12745 echo "$as_me:12745: \$? = $ac_status" >&5
12746 (exit "$ac_status"); } &&
12747 { ac_try='test -s "conftest.$ac_objext"'
12748 { (eval echo "$as_me:12748: \"$ac_try\"") >&5
12749 (eval $ac_try) 2>&5
12750 ac_status=$?
12751 echo "$as_me:12751: \$? = $ac_status" >&5
12752 (exit "$ac_status"); }; }; then
12753 cf_cv_fixup_sigwinch=$cf_sigwinch
12754 break
12755 else
12756 echo "$as_me: failed program was:" >&5
12757 cat "conftest.$ac_ext" >&5
12758 fi
12759 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12760
12761 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12762 done
12763
12764 fi
12765 echo "$as_me:12765: result: $cf_cv_fixup_sigwinch" >&5
12766 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12767
12768 if test "$cf_cv_fixup_sigwinch" != unknown ; then
12769 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12770 fi
12771 fi
12772
12773 # Checks for CODESET support.
12774
12775 echo "$as_me:12775: checking for nl_langinfo and CODESET" >&5
12776 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12777 if test "${am_cv_langinfo_codeset+set}" = set; then
12778 echo $ECHO_N "(cached) $ECHO_C" >&6
12779 else
12780 cat >"conftest.$ac_ext" <<_ACEOF
12781 #line 12781 "configure"
12782 #include "confdefs.h"
12783
12784 $ac_includes_default
12785 #include <langinfo.h>
12786 int
12787 main (void)
12788 {
12789 char* cs = nl_langinfo(CODESET); (void)cs
12790 ;
12791 return 0;
12792 }
12793 _ACEOF
12794 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12795 if { (eval echo "$as_me:12795: \"$ac_link\"") >&5
12796 (eval $ac_link) 2>&5
12797 ac_status=$?
12798 echo "$as_me:12798: \$? = $ac_status" >&5
12799 (exit "$ac_status"); } &&
12800 { ac_try='test -s "conftest$ac_exeext"'
12801 { (eval echo "$as_me:12801: \"$ac_try\"") >&5
12802 (eval $ac_try) 2>&5
12803 ac_status=$?
12804 echo "$as_me:12804: \$? = $ac_status" >&5
12805 (exit "$ac_status"); }; }; then
12806 am_cv_langinfo_codeset=yes
12807 else
12808 echo "$as_me: failed program was:" >&5
12809 cat "conftest.$ac_ext" >&5
12810 am_cv_langinfo_codeset=no
12811 fi
12812 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12813
12814 fi
12815 echo "$as_me:12815: result: $am_cv_langinfo_codeset" >&5
12816 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12817 if test "$am_cv_langinfo_codeset" = yes; then
12818
12819 cat >>confdefs.h <<\EOF
12820 #define HAVE_LANGINFO_CODESET 1
12821 EOF
12822
12823 fi
12824
12825 # use these variables to work around a defect in gcc's fixincludes.
12826 NCURSES_OK_WCHAR_T=
12827 NCURSES_OK_WINT_T=
12828
12829 echo "$as_me:12829: checking if you want wide-character code" >&5
12830 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12831
12832 # Check whether --enable-widec or --disable-widec was given.
12833 if test "${enable_widec+set}" = set; then
12834 enableval="$enable_widec"
12835 with_widec=$enableval
12836 else
12837 with_widec=$cf_dft_widec
12838 fi;
12839 echo "$as_me:12839: result: $with_widec" >&5
12840 echo "${ECHO_T}$with_widec" >&6
12841
12842 NCURSES_WCWIDTH_GRAPHICS=1
12843
12844 if test "x$with_widec" = xyes ; then
12845 if test "x$disable_lib_suffixes" = xno ; then
12846 LIB_SUFFIX="w${LIB_SUFFIX}"
12847 fi
12848
12849 cat >>confdefs.h <<\EOF
12850 #define USE_WIDEC_SUPPORT 1
12851 EOF
12852
12853 cat >>confdefs.h <<\EOF
12854 #define NCURSES_WIDECHAR 1
12855 EOF
12856
12857 case "$CPPFLAGS" in
12858 (*_XOPEN_SOURCE=*)
12859 ;;
12860 (*)
12861 { echo "$as_me:12861: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12862 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12863 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12864 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12865 ;;
12866 esac
12867
12868 for ac_header in \
12869 wchar.h \
12870 wctype.h \
12871
12872 do
12873 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12874 echo "$as_me:12874: checking for $ac_header" >&5
12875 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12876 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12877 echo $ECHO_N "(cached) $ECHO_C" >&6
12878 else
12879 cat >"conftest.$ac_ext" <<_ACEOF
12880 #line 12880 "configure"
12881 #include "confdefs.h"
12882 #include <$ac_header>
12883 _ACEOF
12884 if { (eval echo "$as_me:12884: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12885 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12886 ac_status=$?
12887 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12888 rm -f conftest.er1
12889 cat conftest.err >&5
12890 echo "$as_me:12890: \$? = $ac_status" >&5
12891 (exit "$ac_status"); } >/dev/null; then
12892 if test -s conftest.err; then
12893 ac_cpp_err=$ac_c_preproc_warn_flag
12894 else
12895 ac_cpp_err=
12896 fi
12897 else
12898 ac_cpp_err=yes
12899 fi
12900 if test -z "$ac_cpp_err"; then
12901 eval "$as_ac_Header=yes"
12902 else
12903 echo "$as_me: failed program was:" >&5
12904 cat "conftest.$ac_ext" >&5
12905 eval "$as_ac_Header=no"
12906 fi
12907 rm -f conftest.err "conftest.$ac_ext"
12908 fi
12909 echo "$as_me:12909: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12910 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12911 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12912 cat >>confdefs.h <<EOF
12913 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12914 EOF
12915
12916 fi
12917 done
12918
12919 echo "$as_me:12919: checking if wchar.h can be used as is" >&5
12920 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12921 if test "${cf_cv_wchar_h_okay+set}" = set; then
12922 echo $ECHO_N "(cached) $ECHO_C" >&6
12923 else
12924
12925 cat >"conftest.$ac_ext" <<_ACEOF
12926 #line 12926 "configure"
12927 #include "confdefs.h"
12928
12929 $ac_includes_default
12930 #ifdef HAVE_WCHAR_H
12931 #include <wchar.h>
12932 #endif
12933 #ifdef HAVE_WCTYPE_H
12934 #include <wctype.h>
12935 #endif
12936
12937 int
12938 main (void)
12939 {
12940
12941 wint_t foo = 0;
12942 int bar = iswpunct(foo); (void) bar
12943 ;
12944 return 0;
12945 }
12946 _ACEOF
12947 rm -f "conftest.$ac_objext"
12948 if { (eval echo "$as_me:12948: \"$ac_compile\"") >&5
12949 (eval $ac_compile) 2>&5
12950 ac_status=$?
12951 echo "$as_me:12951: \$? = $ac_status" >&5
12952 (exit "$ac_status"); } &&
12953 { ac_try='test -s "conftest.$ac_objext"'
12954 { (eval echo "$as_me:12954: \"$ac_try\"") >&5
12955 (eval $ac_try) 2>&5
12956 ac_status=$?
12957 echo "$as_me:12957: \$? = $ac_status" >&5
12958 (exit "$ac_status"); }; }; then
12959 cf_cv_wchar_h_okay=yes
12960 else
12961 echo "$as_me: failed program was:" >&5
12962 cat "conftest.$ac_ext" >&5
12963 cf_cv_wchar_h_okay=no
12964 fi
12965 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12966 fi
12967 echo "$as_me:12967: result: $cf_cv_wchar_h_okay" >&5
12968 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12969
12970 if test "$cf_cv_wchar_h_okay" = no
12971 then
12972
12973 echo "$as_me:12973: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12974 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12975 cat >"conftest.$ac_ext" <<_ACEOF
12976 #line 12976 "configure"
12977 #include "confdefs.h"
12978 #include <sys/types.h>
12979
12980 int
12981 main (void)
12982 {
12983
12984 #ifndef _XOPEN_SOURCE_EXTENDED
12985 #error _XOPEN_SOURCE_EXTENDED is not defined
12986 #endif
12987 ;
12988 return 0;
12989 }
12990 _ACEOF
12991 rm -f "conftest.$ac_objext"
12992 if { (eval echo "$as_me:12992: \"$ac_compile\"") >&5
12993 (eval $ac_compile) 2>&5
12994 ac_status=$?
12995 echo "$as_me:12995: \$? = $ac_status" >&5
12996 (exit "$ac_status"); } &&
12997 { ac_try='test -s "conftest.$ac_objext"'
12998 { (eval echo "$as_me:12998: \"$ac_try\"") >&5
12999 (eval $ac_try) 2>&5
13000 ac_status=$?
13001 echo "$as_me:13001: \$? = $ac_status" >&5
13002 (exit "$ac_status"); }; }; then
13003 cf_result=no
13004 else
13005 echo "$as_me: failed program was:" >&5
13006 cat "conftest.$ac_ext" >&5
13007 cf_result=yes
13008 fi
13009 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13010 echo "$as_me:13010: result: $cf_result" >&5
13011 echo "${ECHO_T}$cf_result" >&6
13012
13013 if test "$cf_result" = yes ; then
13014 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
13015 elif test "x" != "x" ; then
13016 echo "$as_me:13016: checking checking for compatible value versus " >&5
13017 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
13018 cat >"conftest.$ac_ext" <<_ACEOF
13019 #line 13019 "configure"
13020 #include "confdefs.h"
13021 #include <sys/types.h>
13022
13023 int
13024 main (void)
13025 {
13026
13027 #if _XOPEN_SOURCE_EXTENDED- < 0
13028 #error _XOPEN_SOURCE_EXTENDED- is negative
13029 #endif
13030 ;
13031 return 0;
13032 }
13033 _ACEOF
13034 rm -f "conftest.$ac_objext"
13035 if { (eval echo "$as_me:13035: \"$ac_compile\"") >&5
13036 (eval $ac_compile) 2>&5
13037 ac_status=$?
13038 echo "$as_me:13038: \$? = $ac_status" >&5
13039 (exit "$ac_status"); } &&
13040 { ac_try='test -s "conftest.$ac_objext"'
13041 { (eval echo "$as_me:13041: \"$ac_try\"") >&5
13042 (eval $ac_try) 2>&5
13043 ac_status=$?
13044 echo "$as_me:13044: \$? = $ac_status" >&5
13045 (exit "$ac_status"); }; }; then
13046 cf_result=yes
13047 else
13048 echo "$as_me: failed program was:" >&5
13049 cat "conftest.$ac_ext" >&5
13050 cf_result=no
13051 fi
13052 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13053 echo "$as_me:13053: result: $cf_result" >&5
13054 echo "${ECHO_T}$cf_result" >&6
13055 if test "$cf_result" = no ; then
13056 # perhaps we can override it - try...
13057 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
13058 fi
13059 fi
13060
13061 fi
13062
13063 echo "$as_me:13063: checking if wcwidth agrees graphics are single-width" >&5
13064 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
13065 if test "${cf_cv_wcwidth_graphics+set}" = set; then
13066 echo $ECHO_N "(cached) $ECHO_C" >&6
13067 else
13068
13069 cat >conftest.in <<CF_EOF
13070 - VT100 symbols
13071 0x250c upper left corner
13072 0x2514 lower left corner
13073 0x2510 upper right corner
13074 0x2518 lower right corner
13075 0x251c tee pointing left
13076 0x2524 tee pointing right
13077 0x2534 tee pointing up
13078 0x252c tee pointing down
13079 0x2500 horizontal line
13080 0x2502 vertical line
13081 0x253c large plus or crossover
13082 0x23ba scan line 1
13083 0x23bd scan line 9
13084 0x25c6 diamond
13085 0x2592 checker board (stipple)
13086 0x00b0 degree symbol
13087 0x00b1 plus/minus
13088 0x00b7 bullet
13089 - Teletype 5410v1 symbols
13090 0x2190 arrow pointing left
13091 0x2192 arrow pointing right
13092 0x2193 arrow pointing down
13093 0x2191 arrow pointing up
13094 0x2592 board of squares
13095 0x2603 lantern symbol
13096 0x25ae solid square block
13097 - these defaults were invented for ncurses
13098 0x23bb scan line 3
13099 0x23bc scan line 7
13100 0x2264 less-than-or-equal-to
13101 0x2265 greater-than-or-equal-to
13102 0x03c0 greek pi
13103 0x2260 not-equal
13104 0x00a3 pound-sterling symbol
13105 - thick-line-drawing
13106 0x250f upper left corner
13107 0x2517 lower left corner
13108 0x2513 upper right corner
13109 0x251b lower right corner
13110 0x2523 tee pointing left
13111 0x252b tee pointing right
13112 0x253b tee pointing up
13113 0x2533 tee pointing down
13114 0x2501 horizontal line
13115 0x2503 vertical line
13116 0x254b large plus or crossover
13117 - double-line-drawing
13118 0x2554 upper left corner
13119 0x255a lower left corner
13120 0x2557 upper right corner
13121 0x255d lower right corner
13122 0x2563 tee pointing left
13123 0x2560 tee pointing right
13124 0x2569 tee pointing up
13125 0x2566 tee pointing down
13126 0x2550 horizontal line
13127 0x2551 vertical line
13128 0x256c large plus or crossover
13129 CF_EOF
13130 if test "$cross_compiling" = yes; then
13131 cf_cv_wcwidth_graphics=unknown
13132 else
13133 cat >"conftest.$ac_ext" <<_ACEOF
13134 #line 13134 "configure"
13135 #include "confdefs.h"
13136
13137 $ac_includes_default
13138
13139 #include <locale.h>
13140 #include <wchar.h>
13141
13142 #define MY_LEN 80
13143
13144 int
13145 main(void)
13146 {
13147 FILE *fp;
13148 unsigned value;
13149 char buffer[MY_LEN + 1];
13150 char notes[MY_LEN + 1];
13151 int totals = 0;
13152 int passed = 0;
13153
13154 if (setlocale(LC_ALL, "en_US.UTF8") ||
13155 setlocale(LC_ALL, "en_US.UTF-8") ||
13156 setlocale(LC_ALL, "en_US.utf8") ||
13157 setlocale(LC_ALL, "en_US.utf-8")) {
13158 if ((fp = fopen("conftest.in", "r")) != NULL) {
13159 while (fgets(buffer, MY_LEN, fp) != NULL) {
13160 if (*buffer == '-') {
13161 fprintf(stderr, "\\t%s", buffer);
13162 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
13163 ++totals;
13164 if (wcwidth((int)value) == 1)
13165 ++passed;
13166 fprintf(stderr, "%d\\t%s", wcwidth((int)value), buffer);
13167 } else {
13168 fprintf(stderr, "?\\t%s", buffer);
13169 }
13170 }
13171 }
13172 }
13173 fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
13174 return (totals == passed) ? 0 : 1;
13175 }
13176
13177 _ACEOF
13178 rm -f "conftest$ac_exeext"
13179 if { (eval echo "$as_me:13179: \"$ac_link\"") >&5
13180 (eval $ac_link) 2>&5
13181 ac_status=$?
13182 echo "$as_me:13182: \$? = $ac_status" >&5
13183 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13184 { (eval echo "$as_me:13184: \"$ac_try\"") >&5
13185 (eval $ac_try) 2>&5
13186 ac_status=$?
13187 echo "$as_me:13187: \$? = $ac_status" >&5
13188 (exit "$ac_status"); }; }; then
13189 cf_cv_wcwidth_graphics=yes
13190 else
13191 echo "$as_me: program exited with status $ac_status" >&5
13192 echo "$as_me: failed program was:" >&5
13193 cat "conftest.$ac_ext" >&5
13194 cf_cv_wcwidth_graphics=no
13195 fi
13196 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
13197 fi
13198
13199 fi
13200 echo "$as_me:13200: result: $cf_cv_wcwidth_graphics" >&5
13201 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
13202
13203 test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
13204
13205 # with_overwrite=no
13206 NCURSES_CH_T=cchar_t
13207
13208 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs wcwidth
13209 do
13210 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13211 echo "$as_me:13211: checking for $ac_func" >&5
13212 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13213 if eval "test \"\${$as_ac_var+set}\" = set"; then
13214 echo $ECHO_N "(cached) $ECHO_C" >&6
13215 else
13216 cat >"conftest.$ac_ext" <<_ACEOF
13217 #line 13217 "configure"
13218 #include "confdefs.h"
13219 #define $ac_func autoconf_temporary
13220 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13221 #undef $ac_func
13222
13223 #ifdef __cplusplus
13224 extern "C"
13225 #endif
13226
13227 /* We use char because int might match the return type of a gcc2
13228 builtin and then its argument prototype would still apply. */
13229 char $ac_func (void);
13230
13231 int
13232 main (void)
13233 {
13234
13235 /* The GNU C library defines stubs for functions which it implements
13236 to always fail with ENOSYS. Some functions are actually named
13237 something starting with __ and the normal name is an alias. */
13238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13239 #error found stub for $ac_func
13240 #endif
13241
13242 return $ac_func ();
13243 ;
13244 return 0;
13245 }
13246 _ACEOF
13247 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13248 if { (eval echo "$as_me:13248: \"$ac_link\"") >&5
13249 (eval $ac_link) 2>&5
13250 ac_status=$?
13251 echo "$as_me:13251: \$? = $ac_status" >&5
13252 (exit "$ac_status"); } &&
13253 { ac_try='test -s "conftest$ac_exeext"'
13254 { (eval echo "$as_me:13254: \"$ac_try\"") >&5
13255 (eval $ac_try) 2>&5
13256 ac_status=$?
13257 echo "$as_me:13257: \$? = $ac_status" >&5
13258 (exit "$ac_status"); }; }; then
13259 eval "$as_ac_var=yes"
13260 else
13261 echo "$as_me: failed program was:" >&5
13262 cat "conftest.$ac_ext" >&5
13263 eval "$as_ac_var=no"
13264 fi
13265 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13266 fi
13267 echo "$as_me:13267: result: `eval echo '${'"$as_ac_var"'}'`" >&5
13268 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
13269 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
13270 cat >>confdefs.h <<EOF
13271 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13272 EOF
13273
13274 fi
13275 done
13276
13277 if test "x$ac_cv_func_putwc" != xyes ; then
13278
13279 for ac_header in wchar.h
13280 do
13281 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13282 echo "$as_me:13282: checking for $ac_header" >&5
13283 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13284 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13285 echo $ECHO_N "(cached) $ECHO_C" >&6
13286 else
13287 cat >"conftest.$ac_ext" <<_ACEOF
13288 #line 13288 "configure"
13289 #include "confdefs.h"
13290 #include <$ac_header>
13291 _ACEOF
13292 if { (eval echo "$as_me:13292: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13293 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13294 ac_status=$?
13295 $EGREP -v '^ *\+' conftest.er1 >conftest.err
13296 rm -f conftest.er1
13297 cat conftest.err >&5
13298 echo "$as_me:13298: \$? = $ac_status" >&5
13299 (exit "$ac_status"); } >/dev/null; then
13300 if test -s conftest.err; then
13301 ac_cpp_err=$ac_c_preproc_warn_flag
13302 else
13303 ac_cpp_err=
13304 fi
13305 else
13306 ac_cpp_err=yes
13307 fi
13308 if test -z "$ac_cpp_err"; then
13309 eval "$as_ac_Header=yes"
13310 else
13311 echo "$as_me: failed program was:" >&5
13312 cat "conftest.$ac_ext" >&5
13313 eval "$as_ac_Header=no"
13314 fi
13315 rm -f conftest.err "conftest.$ac_ext"
13316 fi
13317 echo "$as_me:13317: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13318 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13319 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13320 cat >>confdefs.h <<EOF
13321 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13322 EOF
13323
13324 fi
13325 done
13326
13327 echo "$as_me:13327: checking for multibyte character support" >&5
13328 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
13329 if test "${cf_cv_utf8_lib+set}" = set; then
13330 echo $ECHO_N "(cached) $ECHO_C" >&6
13331 else
13332
13333 cf_save_LIBS="$LIBS"
13334 cat >"conftest.$ac_ext" <<_ACEOF
13335 #line 13335 "configure"
13336 #include "confdefs.h"
13337
13338 $ac_includes_default
13339 #ifdef HAVE_WCHAR_H
13340 #include <wchar.h>
13341 #endif
13342
13343 int
13344 main (void)
13345 {
13346 putwc(0,0);
13347 ;
13348 return 0;
13349 }
13350 _ACEOF
13351 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13352 if { (eval echo "$as_me:13352: \"$ac_link\"") >&5
13353 (eval $ac_link) 2>&5
13354 ac_status=$?
13355 echo "$as_me:13355: \$? = $ac_status" >&5
13356 (exit "$ac_status"); } &&
13357 { ac_try='test -s "conftest$ac_exeext"'
13358 { (eval echo "$as_me:13358: \"$ac_try\"") >&5
13359 (eval $ac_try) 2>&5
13360 ac_status=$?
13361 echo "$as_me:13361: \$? = $ac_status" >&5
13362 (exit "$ac_status"); }; }; then
13363 cf_cv_utf8_lib=yes
13364 else
13365 echo "$as_me: failed program was:" >&5
13366 cat "conftest.$ac_ext" >&5
13367
13368 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
13369 # will be set on completion of the AC_LINK_IFELSE below.
13370 cf_cv_header_path_utf8=
13371 cf_cv_library_path_utf8=
13372
13373 echo "${as_me:-configure}:13373: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13374
13375 cf_save_LIBS="$LIBS"
13376
13377 cat >"conftest.$ac_ext" <<_ACEOF
13378 #line 13378 "configure"
13379 #include "confdefs.h"
13380
13381 #include <libutf8.h>
13382 int
13383 main (void)
13384 {
13385 putwc(0,0);
13386 ;
13387 return 0;
13388 }
13389 _ACEOF
13390 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13391 if { (eval echo "$as_me:13391: \"$ac_link\"") >&5
13392 (eval $ac_link) 2>&5
13393 ac_status=$?
13394 echo "$as_me:13394: \$? = $ac_status" >&5
13395 (exit "$ac_status"); } &&
13396 { ac_try='test -s "conftest$ac_exeext"'
13397 { (eval echo "$as_me:13397: \"$ac_try\"") >&5
13398 (eval $ac_try) 2>&5
13399 ac_status=$?
13400 echo "$as_me:13400: \$? = $ac_status" >&5
13401 (exit "$ac_status"); }; }; then
13402
13403 cf_cv_find_linkage_utf8=yes
13404 cf_cv_header_path_utf8=/usr/include
13405 cf_cv_library_path_utf8=/usr/lib
13406
13407 else
13408 echo "$as_me: failed program was:" >&5
13409 cat "conftest.$ac_ext" >&5
13410
13411 LIBS="-lutf8 $cf_save_LIBS"
13412
13413 cat >"conftest.$ac_ext" <<_ACEOF
13414 #line 13414 "configure"
13415 #include "confdefs.h"
13416
13417 #include <libutf8.h>
13418 int
13419 main (void)
13420 {
13421 putwc(0,0);
13422 ;
13423 return 0;
13424 }
13425 _ACEOF
13426 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13427 if { (eval echo "$as_me:13427: \"$ac_link\"") >&5
13428 (eval $ac_link) 2>&5
13429 ac_status=$?
13430 echo "$as_me:13430: \$? = $ac_status" >&5
13431 (exit "$ac_status"); } &&
13432 { ac_try='test -s "conftest$ac_exeext"'
13433 { (eval echo "$as_me:13433: \"$ac_try\"") >&5
13434 (eval $ac_try) 2>&5
13435 ac_status=$?
13436 echo "$as_me:13436: \$? = $ac_status" >&5
13437 (exit "$ac_status"); }; }; then
13438
13439 cf_cv_find_linkage_utf8=yes
13440 cf_cv_header_path_utf8=/usr/include
13441 cf_cv_library_path_utf8=/usr/lib
13442 cf_cv_library_file_utf8="-lutf8"
13443
13444 else
13445 echo "$as_me: failed program was:" >&5
13446 cat "conftest.$ac_ext" >&5
13447
13448 cf_cv_find_linkage_utf8=no
13449 LIBS="$cf_save_LIBS"
13450
13451 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
13452
13453 echo "${as_me:-configure}:13453: testing find linkage for utf8 library ..." 1>&5
13454
13455 echo "${as_me:-configure}:13455: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13456
13457 cf_save_CPPFLAGS="$CPPFLAGS"
13458 cf_test_CPPFLAGS="$CPPFLAGS"
13459
13460 cf_search=
13461
13462 # collect the current set of include-directories from compiler flags
13463 cf_header_path_list=""
13464 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13465 for cf_header_path in $CPPFLAGS $CFLAGS
13466 do
13467 case "$cf_header_path" in
13468 (-I*)
13469 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13470
13471 test "x$cf_header_path" != "xNONE" && \
13472 test -d "$cf_header_path" && \
13473 {
13474 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
13475 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
13476 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
13477 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
13478 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
13479 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13480 }
13481
13482 cf_header_path_list="$cf_header_path_list $cf_search"
13483 ;;
13484 esac
13485 done
13486 fi
13487
13488 # add the variations for the package we are looking for
13489
13490 cf_search=
13491
13492 test "x$prefix" != "xNONE" && \
13493 test -d "$prefix" && \
13494 {
13495 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
13496 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
13497 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
13498 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
13499 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
13500 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
13501 }
13502
13503 for cf_subdir_prefix in \
13504 /usr \
13505 /usr/local \
13506 /usr/pkg \
13507 /opt \
13508 /opt/local \
13509 $HOME
13510 do
13511
13512 test "x$cf_subdir_prefix" != "x$prefix" && \
13513 test -d "$cf_subdir_prefix" && \
13514 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13515 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
13516 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
13517 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13518 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13519 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13520 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13521 }
13522
13523 done
13524
13525 test "$includedir" != NONE && \
13526 test "$includedir" != "/usr/include" && \
13527 test -d "$includedir" && {
13528 test -d "$includedir" && cf_search="$cf_search $includedir"
13529 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13530 }
13531
13532 test "$oldincludedir" != NONE && \
13533 test "$oldincludedir" != "/usr/include" && \
13534 test -d "$oldincludedir" && {
13535 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
13536 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13537 }
13538
13539 cf_search="$cf_search $cf_header_path_list"
13540
13541 for cf_cv_header_path_utf8 in $cf_search
13542 do
13543 if test -d "$cf_cv_header_path_utf8" ; then
13544 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
13545
13546 echo "${as_me:-configure}:13546: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13547
13548 CPPFLAGS="$cf_save_CPPFLAGS"
13549
13550 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13551 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13552
13553 cat >"conftest.$ac_ext" <<_ACEOF
13554 #line 13554 "configure"
13555 #include "confdefs.h"
13556
13557 #include <libutf8.h>
13558 int
13559 main (void)
13560 {
13561 putwc(0,0);
13562 ;
13563 return 0;
13564 }
13565 _ACEOF
13566 rm -f "conftest.$ac_objext"
13567 if { (eval echo "$as_me:13567: \"$ac_compile\"") >&5
13568 (eval $ac_compile) 2>&5
13569 ac_status=$?
13570 echo "$as_me:13570: \$? = $ac_status" >&5
13571 (exit "$ac_status"); } &&
13572 { ac_try='test -s "conftest.$ac_objext"'
13573 { (eval echo "$as_me:13573: \"$ac_try\"") >&5
13574 (eval $ac_try) 2>&5
13575 ac_status=$?
13576 echo "$as_me:13576: \$? = $ac_status" >&5
13577 (exit "$ac_status"); }; }; then
13578
13579 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13580
13581 echo "${as_me:-configure}:13581: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13582
13583 cf_cv_find_linkage_utf8=maybe
13584 cf_test_CPPFLAGS="$CPPFLAGS"
13585 break
13586 else
13587 echo "$as_me: failed program was:" >&5
13588 cat "conftest.$ac_ext" >&5
13589
13590 CPPFLAGS="$cf_save_CPPFLAGS"
13591
13592 fi
13593 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13594 fi
13595 done
13596
13597 if test "$cf_cv_find_linkage_utf8" = maybe ; then
13598
13599 echo "${as_me:-configure}:13599: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13600
13601 cf_save_LIBS="$LIBS"
13602 cf_save_LDFLAGS="$LDFLAGS"
13603
13604 if test "$cf_cv_find_linkage_utf8" != yes ; then
13605
13606 cf_search=
13607 cf_library_path_list=""
13608 if test -n "${LDFLAGS}${LIBS}" ; then
13609 for cf_library_path in $LDFLAGS $LIBS
13610 do
13611 case "$cf_library_path" in
13612 (-L*)
13613 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13614
13615 test "x$cf_library_path" != "xNONE" && \
13616 test -d "$cf_library_path" && \
13617 {
13618 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
13619 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
13620 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
13621 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13622 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
13623 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13624 }
13625
13626 cf_library_path_list="$cf_library_path_list $cf_search"
13627 ;;
13628 esac
13629 done
13630 fi
13631
13632 cf_search=
13633
13634 test "x$prefix" != "xNONE" && \
13635 test -d "$prefix" && \
13636 {
13637 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
13638 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
13639 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
13640 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
13641 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
13642 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
13643 }
13644
13645 for cf_subdir_prefix in \
13646 /usr \
13647 /usr/local \
13648 /usr/pkg \
13649 /opt \
13650 /opt/local \
13651 $HOME
13652 do
13653
13654 test "x$cf_subdir_prefix" != "x$prefix" && \
13655 test -d "$cf_subdir_prefix" && \
13656 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13657 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
13658 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
13659 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13660 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13661 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13662 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13663 }
13664
13665 done
13666
13667 cf_search="$cf_library_path_list $cf_search"
13668
13669 for cf_cv_library_path_utf8 in $cf_search
13670 do
13671 if test -d "$cf_cv_library_path_utf8" ; then
13672 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
13673
13674 echo "${as_me:-configure}:13674: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13675
13676 CPPFLAGS="$cf_test_CPPFLAGS"
13677 LIBS="-lutf8 $cf_save_LIBS"
13678 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13679 cat >"conftest.$ac_ext" <<_ACEOF
13680 #line 13680 "configure"
13681 #include "confdefs.h"
13682
13683 #include <libutf8.h>
13684 int
13685 main (void)
13686 {
13687 putwc(0,0);
13688 ;
13689 return 0;
13690 }
13691 _ACEOF
13692 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13693 if { (eval echo "$as_me:13693: \"$ac_link\"") >&5
13694 (eval $ac_link) 2>&5
13695 ac_status=$?
13696 echo "$as_me:13696: \$? = $ac_status" >&5
13697 (exit "$ac_status"); } &&
13698 { ac_try='test -s "conftest$ac_exeext"'
13699 { (eval echo "$as_me:13699: \"$ac_try\"") >&5
13700 (eval $ac_try) 2>&5
13701 ac_status=$?
13702 echo "$as_me:13702: \$? = $ac_status" >&5
13703 (exit "$ac_status"); }; }; then
13704
13705 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13706
13707 echo "${as_me:-configure}:13707: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13708
13709 cf_cv_find_linkage_utf8=yes
13710 cf_cv_library_file_utf8="-lutf8"
13711 break
13712 else
13713 echo "$as_me: failed program was:" >&5
13714 cat "conftest.$ac_ext" >&5
13715
13716 CPPFLAGS="$cf_save_CPPFLAGS"
13717 LIBS="$cf_save_LIBS"
13718 LDFLAGS="$cf_save_LDFLAGS"
13719
13720 fi
13721 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13722 fi
13723 done
13724 CPPFLAGS="$cf_save_CPPFLAGS"
13725 LDFLAGS="$cf_save_LDFLAGS"
13726 fi
13727
13728 else
13729 cf_cv_find_linkage_utf8=no
13730 fi
13731
13732 fi
13733 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13734
13735 fi
13736 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13737
13738 LIBS="$cf_save_LIBS"
13739
13740 if test "$cf_cv_find_linkage_utf8" = yes ; then
13741 cf_cv_utf8_lib=add-on
13742 else
13743 cf_cv_utf8_lib=no
13744 fi
13745
13746 fi
13747 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13748 fi
13749 echo "$as_me:13749: result: $cf_cv_utf8_lib" >&5
13750 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13751
13752 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13753 # ncurses/ncursesw:
13754 if test "$cf_cv_utf8_lib" = "add-on" ; then
13755
13756 cat >>confdefs.h <<\EOF
13757 #define HAVE_LIBUTF8_H 1
13758 EOF
13759
13760 if test -n "$cf_cv_header_path_utf8" ; then
13761 for cf_add_incdir in $cf_cv_header_path_utf8
13762 do
13763 while test "$cf_add_incdir" != /usr/include
13764 do
13765 if test -d "$cf_add_incdir"
13766 then
13767 cf_have_incdir=no
13768 if test -n "$CFLAGS$CPPFLAGS" ; then
13769 # a loop is needed to ensure we can add subdirs of existing dirs
13770 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13771 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13772 cf_have_incdir=yes; break
13773 fi
13774 done
13775 fi
13776
13777 if test "$cf_have_incdir" = no ; then
13778 if test "$cf_add_incdir" = /usr/local/include ; then
13779 if test "$GCC" = yes
13780 then
13781 cf_save_CPPFLAGS=$CPPFLAGS
13782
13783 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13784 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13785
13786 cat >"conftest.$ac_ext" <<_ACEOF
13787 #line 13787 "configure"
13788 #include "confdefs.h"
13789 #include <stdio.h>
13790 int
13791 main (void)
13792 {
13793 printf("Hello")
13794 ;
13795 return 0;
13796 }
13797 _ACEOF
13798 rm -f "conftest.$ac_objext"
13799 if { (eval echo "$as_me:13799: \"$ac_compile\"") >&5
13800 (eval $ac_compile) 2>&5
13801 ac_status=$?
13802 echo "$as_me:13802: \$? = $ac_status" >&5
13803 (exit "$ac_status"); } &&
13804 { ac_try='test -s "conftest.$ac_objext"'
13805 { (eval echo "$as_me:13805: \"$ac_try\"") >&5
13806 (eval $ac_try) 2>&5
13807 ac_status=$?
13808 echo "$as_me:13808: \$? = $ac_status" >&5
13809 (exit "$ac_status"); }; }; then
13810 :
13811 else
13812 echo "$as_me: failed program was:" >&5
13813 cat "conftest.$ac_ext" >&5
13814 cf_have_incdir=yes
13815 fi
13816 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13817 CPPFLAGS=$cf_save_CPPFLAGS
13818 fi
13819 fi
13820 fi
13821
13822 if test "$cf_have_incdir" = no ; then
13823 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
13824
13825 echo "${as_me:-configure}:13825: testing adding $cf_add_incdir to include-path ..." 1>&5
13826
13827 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13828
13829 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13830 test "$cf_top_incdir" = "$cf_add_incdir" && break
13831 cf_add_incdir="$cf_top_incdir"
13832 else
13833 break
13834 fi
13835 else
13836 break
13837 fi
13838 done
13839 done
13840 fi
13841
13842 if test -n "$cf_cv_library_path_utf8" ; then
13843 for cf_add_libdir in $cf_cv_library_path_utf8
13844 do
13845 if test "$cf_add_libdir" = /usr/lib ; then
13846 :
13847 elif test -d "$cf_add_libdir"
13848 then
13849 cf_have_libdir=no
13850 if test -n "$LDFLAGS$LIBS" ; then
13851 # a loop is needed to ensure we can add subdirs of existing dirs
13852 for cf_test_libdir in $LDFLAGS $LIBS ; do
13853 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13854 cf_have_libdir=yes; break
13855 fi
13856 done
13857 fi
13858 if test "$cf_have_libdir" = no ; then
13859 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
13860
13861 echo "${as_me:-configure}:13861: testing adding $cf_add_libdir to library-path ..." 1>&5
13862
13863 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13864 fi
13865 fi
13866 done
13867 fi
13868
13869 cf_add_libs="$LIBS"
13870 # reverse order
13871 cf_add_0lib=
13872 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13873 # filter duplicates
13874 for cf_add_1lib in $cf_add_0lib; do
13875 for cf_add_2lib in $cf_add_libs; do
13876 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13877 cf_add_1lib=
13878 break
13879 fi
13880 done
13881 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13882 done
13883 LIBS="$cf_add_libs"
13884
13885 fi
13886
13887 if test "$cf_cv_utf8_lib" != no ; then
13888 NCURSES_LIBUTF8=1
13889 fi
13890 fi
13891
13892 # This is needed on Tru64 5.0 to declare mbstate_t
13893 echo "$as_me:13893: checking if we must include wchar.h to declare mbstate_t" >&5
13894 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13895 if test "${cf_cv_mbstate_t+set}" = set; then
13896 echo $ECHO_N "(cached) $ECHO_C" >&6
13897 else
13898
13899 cat >"conftest.$ac_ext" <<_ACEOF
13900 #line 13900 "configure"
13901 #include "confdefs.h"
13902
13903 #include <stdlib.h>
13904 #include <stdarg.h>
13905 #include <stdio.h>
13906 #ifdef HAVE_LIBUTF8_H
13907 #include <libutf8.h>
13908 #endif
13909 int
13910 main (void)
13911 {
13912 mbstate_t state; (void)state
13913 ;
13914 return 0;
13915 }
13916 _ACEOF
13917 rm -f "conftest.$ac_objext"
13918 if { (eval echo "$as_me:13918: \"$ac_compile\"") >&5
13919 (eval $ac_compile) 2>&5
13920 ac_status=$?
13921 echo "$as_me:13921: \$? = $ac_status" >&5
13922 (exit "$ac_status"); } &&
13923 { ac_try='test -s "conftest.$ac_objext"'
13924 { (eval echo "$as_me:13924: \"$ac_try\"") >&5
13925 (eval $ac_try) 2>&5
13926 ac_status=$?
13927 echo "$as_me:13927: \$? = $ac_status" >&5
13928 (exit "$ac_status"); }; }; then
13929 cf_cv_mbstate_t=no
13930 else
13931 echo "$as_me: failed program was:" >&5
13932 cat "conftest.$ac_ext" >&5
13933 cat >"conftest.$ac_ext" <<_ACEOF
13934 #line 13934 "configure"
13935 #include "confdefs.h"
13936
13937 #include <stdlib.h>
13938 #include <stdarg.h>
13939 #include <stdio.h>
13940 #include <wchar.h>
13941 #ifdef HAVE_LIBUTF8_H
13942 #include <libutf8.h>
13943 #endif
13944 int
13945 main (void)
13946 {
13947 mbstate_t value; (void) value
13948 ;
13949 return 0;
13950 }
13951 _ACEOF
13952 rm -f "conftest.$ac_objext"
13953 if { (eval echo "$as_me:13953: \"$ac_compile\"") >&5
13954 (eval $ac_compile) 2>&5
13955 ac_status=$?
13956 echo "$as_me:13956: \$? = $ac_status" >&5
13957 (exit "$ac_status"); } &&
13958 { ac_try='test -s "conftest.$ac_objext"'
13959 { (eval echo "$as_me:13959: \"$ac_try\"") >&5
13960 (eval $ac_try) 2>&5
13961 ac_status=$?
13962 echo "$as_me:13962: \$? = $ac_status" >&5
13963 (exit "$ac_status"); }; }; then
13964 cf_cv_mbstate_t=yes
13965 else
13966 echo "$as_me: failed program was:" >&5
13967 cat "conftest.$ac_ext" >&5
13968 cf_cv_mbstate_t=unknown
13969 fi
13970 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13971 fi
13972 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13973 fi
13974 echo "$as_me:13974: result: $cf_cv_mbstate_t" >&5
13975 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13976
13977 if test "$cf_cv_mbstate_t" = yes ; then
13978
13979 cat >>confdefs.h <<\EOF
13980 #define NEED_WCHAR_H 1
13981 EOF
13982
13983 NEED_WCHAR_H=1
13984 fi
13985
13986 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13987 if test "$cf_cv_mbstate_t" = unknown ; then
13988 NCURSES_MBSTATE_T=1
13989 fi
13990
13991 # This is needed on Tru64 5.0 to declare wchar_t
13992 echo "$as_me:13992: checking if we must include wchar.h to declare wchar_t" >&5
13993 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13994 if test "${cf_cv_wchar_t+set}" = set; then
13995 echo $ECHO_N "(cached) $ECHO_C" >&6
13996 else
13997
13998 cat >"conftest.$ac_ext" <<_ACEOF
13999 #line 13999 "configure"
14000 #include "confdefs.h"
14001
14002 #include <stdlib.h>
14003 #include <stdarg.h>
14004 #include <stdio.h>
14005 #ifdef HAVE_LIBUTF8_H
14006 #include <libutf8.h>
14007 #endif
14008 int
14009 main (void)
14010 {
14011 wchar_t state; (void)state
14012 ;
14013 return 0;
14014 }
14015 _ACEOF
14016 rm -f "conftest.$ac_objext"
14017 if { (eval echo "$as_me:14017: \"$ac_compile\"") >&5
14018 (eval $ac_compile) 2>&5
14019 ac_status=$?
14020 echo "$as_me:14020: \$? = $ac_status" >&5
14021 (exit "$ac_status"); } &&
14022 { ac_try='test -s "conftest.$ac_objext"'
14023 { (eval echo "$as_me:14023: \"$ac_try\"") >&5
14024 (eval $ac_try) 2>&5
14025 ac_status=$?
14026 echo "$as_me:14026: \$? = $ac_status" >&5
14027 (exit "$ac_status"); }; }; then
14028 cf_cv_wchar_t=no
14029 else
14030 echo "$as_me: failed program was:" >&5
14031 cat "conftest.$ac_ext" >&5
14032 cat >"conftest.$ac_ext" <<_ACEOF
14033 #line 14033 "configure"
14034 #include "confdefs.h"
14035
14036 #include <stdlib.h>
14037 #include <stdarg.h>
14038 #include <stdio.h>
14039 #include <wchar.h>
14040 #ifdef HAVE_LIBUTF8_H
14041 #include <libutf8.h>
14042 #endif
14043 int
14044 main (void)
14045 {
14046 wchar_t value; (void) value
14047 ;
14048 return 0;
14049 }
14050 _ACEOF
14051 rm -f "conftest.$ac_objext"
14052 if { (eval echo "$as_me:14052: \"$ac_compile\"") >&5
14053 (eval $ac_compile) 2>&5
14054 ac_status=$?
14055 echo "$as_me:14055: \$? = $ac_status" >&5
14056 (exit "$ac_status"); } &&
14057 { ac_try='test -s "conftest.$ac_objext"'
14058 { (eval echo "$as_me:14058: \"$ac_try\"") >&5
14059 (eval $ac_try) 2>&5
14060 ac_status=$?
14061 echo "$as_me:14061: \$? = $ac_status" >&5
14062 (exit "$ac_status"); }; }; then
14063 cf_cv_wchar_t=yes
14064 else
14065 echo "$as_me: failed program was:" >&5
14066 cat "conftest.$ac_ext" >&5
14067 cf_cv_wchar_t=unknown
14068 fi
14069 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14070 fi
14071 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14072 fi
14073 echo "$as_me:14073: result: $cf_cv_wchar_t" >&5
14074 echo "${ECHO_T}$cf_cv_wchar_t" >&6
14075
14076 if test "$cf_cv_wchar_t" = yes ; then
14077
14078 cat >>confdefs.h <<\EOF
14079 #define NEED_WCHAR_H 1
14080 EOF
14081
14082 NEED_WCHAR_H=1
14083 fi
14084
14085 # if we do not find wchar_t in either place, use substitution to provide a fallback.
14086 if test "$cf_cv_wchar_t" = unknown ; then
14087 NCURSES_WCHAR_T=1
14088 fi
14089
14090 # if we find wchar_t in either place, use substitution to provide a fallback.
14091 if test "$cf_cv_wchar_t" != unknown ; then
14092 NCURSES_OK_WCHAR_T=1
14093 fi
14094
14095 # This is needed on Tru64 5.0 to declare wint_t
14096 echo "$as_me:14096: checking if we must include wchar.h to declare wint_t" >&5
14097 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
14098 if test "${cf_cv_wint_t+set}" = set; then
14099 echo $ECHO_N "(cached) $ECHO_C" >&6
14100 else
14101
14102 cat >"conftest.$ac_ext" <<_ACEOF
14103 #line 14103 "configure"
14104 #include "confdefs.h"
14105
14106 #include <stdlib.h>
14107 #include <stdarg.h>
14108 #include <stdio.h>
14109 #ifdef HAVE_LIBUTF8_H
14110 #include <libutf8.h>
14111 #endif
14112 int
14113 main (void)
14114 {
14115 wint_t state; (void)state
14116 ;
14117 return 0;
14118 }
14119 _ACEOF
14120 rm -f "conftest.$ac_objext"
14121 if { (eval echo "$as_me:14121: \"$ac_compile\"") >&5
14122 (eval $ac_compile) 2>&5
14123 ac_status=$?
14124 echo "$as_me:14124: \$? = $ac_status" >&5
14125 (exit "$ac_status"); } &&
14126 { ac_try='test -s "conftest.$ac_objext"'
14127 { (eval echo "$as_me:14127: \"$ac_try\"") >&5
14128 (eval $ac_try) 2>&5
14129 ac_status=$?
14130 echo "$as_me:14130: \$? = $ac_status" >&5
14131 (exit "$ac_status"); }; }; then
14132 cf_cv_wint_t=no
14133 else
14134 echo "$as_me: failed program was:" >&5
14135 cat "conftest.$ac_ext" >&5
14136 cat >"conftest.$ac_ext" <<_ACEOF
14137 #line 14137 "configure"
14138 #include "confdefs.h"
14139
14140 #include <stdlib.h>
14141 #include <stdarg.h>
14142 #include <stdio.h>
14143 #include <wchar.h>
14144 #ifdef HAVE_LIBUTF8_H
14145 #include <libutf8.h>
14146 #endif
14147 int
14148 main (void)
14149 {
14150 wint_t value; (void) value
14151 ;
14152 return 0;
14153 }
14154 _ACEOF
14155 rm -f "conftest.$ac_objext"
14156 if { (eval echo "$as_me:14156: \"$ac_compile\"") >&5
14157 (eval $ac_compile) 2>&5
14158 ac_status=$?
14159 echo "$as_me:14159: \$? = $ac_status" >&5
14160 (exit "$ac_status"); } &&
14161 { ac_try='test -s "conftest.$ac_objext"'
14162 { (eval echo "$as_me:14162: \"$ac_try\"") >&5
14163 (eval $ac_try) 2>&5
14164 ac_status=$?
14165 echo "$as_me:14165: \$? = $ac_status" >&5
14166 (exit "$ac_status"); }; }; then
14167 cf_cv_wint_t=yes
14168 else
14169 echo "$as_me: failed program was:" >&5
14170 cat "conftest.$ac_ext" >&5
14171 cf_cv_wint_t=unknown
14172 fi
14173 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14174 fi
14175 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14176 fi
14177 echo "$as_me:14177: result: $cf_cv_wint_t" >&5
14178 echo "${ECHO_T}$cf_cv_wint_t" >&6
14179
14180 if test "$cf_cv_wint_t" = yes ; then
14181
14182 cat >>confdefs.h <<\EOF
14183 #define NEED_WCHAR_H 1
14184 EOF
14185
14186 NEED_WCHAR_H=1
14187 fi
14188
14189 # if we do not find wint_t in either place, use substitution to provide a fallback.
14190 if test "$cf_cv_wint_t" = unknown ; then
14191 NCURSES_WINT_T=1
14192 fi
14193
14194 # if we find wint_t in either place, use substitution to provide a fallback.
14195 if test "$cf_cv_wint_t" != unknown ; then
14196 NCURSES_OK_WINT_T=1
14197 fi
14198
14199 if test "$NCURSES_MBSTATE_T" != 0; then
14200
14201 cat >>confdefs.h <<\EOF
14202 #define NEED_MBSTATE_T_DEF 1
14203 EOF
14204
14205 fi
14206 fi
14207
14208 ### use option --disable-lp64 to allow long chtype
14209 echo "$as_me:14209: checking whether to enable _LP64 definition in curses.h" >&5
14210 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
14211
14212 # Check whether --enable-lp64 or --disable-lp64 was given.
14213 if test "${enable_lp64+set}" = set; then
14214 enableval="$enable_lp64"
14215 with_lp64=$enableval
14216 else
14217 with_lp64=$cf_dft_with_lp64
14218 fi;
14219 echo "$as_me:14219: result: $with_lp64" >&5
14220 echo "${ECHO_T}$with_lp64" >&6
14221
14222 if test "x$with_lp64" = xyes ; then
14223 cf_cv_enable_lp64=1
14224 else
14225 cf_cv_enable_lp64=0
14226 fi
14227
14228 # Check whether --enable-largefile or --disable-largefile was given.
14229 if test "${enable_largefile+set}" = set; then
14230 enableval="$enable_largefile"
14231
14232 fi;
14233 if test "$enable_largefile" != no; then
14234
14235 echo "$as_me:14235: checking for special C compiler options needed for large files" >&5
14236 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14237 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14238 echo $ECHO_N "(cached) $ECHO_C" >&6
14239 else
14240 ac_cv_sys_largefile_CC=no
14241 if test "$GCC" != yes; then
14242 ac_save_CC=$CC
14243 while :; do
14244 # IRIX 6.2 and later do not support large files by default,
14245 # so use the C compiler's -n32 option if that helps.
14246 cat >"conftest.$ac_ext" <<_ACEOF
14247 #line 14247 "configure"
14248 #include "confdefs.h"
14249 #include <sys/types.h>
14250 /* Check that off_t can represent 2**63 - 1 correctly.
14251 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14252 since some C++ compilers masquerading as C compilers
14253 incorrectly reject 9223372036854775807. */
14254 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14255 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14256 && LARGE_OFF_T % 2147483647 == 1)
14257 ? 1 : -1];
14258 int
14259 main (void)
14260 {
14261
14262 ;
14263 return 0;
14264 }
14265 _ACEOF
14266 rm -f "conftest.$ac_objext"
14267 if { (eval echo "$as_me:14267: \"$ac_compile\"") >&5
14268 (eval $ac_compile) 2>&5
14269 ac_status=$?
14270 echo "$as_me:14270: \$? = $ac_status" >&5
14271 (exit "$ac_status"); } &&
14272 { ac_try='test -s "conftest.$ac_objext"'
14273 { (eval echo "$as_me:14273: \"$ac_try\"") >&5
14274 (eval $ac_try) 2>&5
14275 ac_status=$?
14276 echo "$as_me:14276: \$? = $ac_status" >&5
14277 (exit "$ac_status"); }; }; then
14278 break
14279 else
14280 echo "$as_me: failed program was:" >&5
14281 cat "conftest.$ac_ext" >&5
14282 fi
14283 rm -f "conftest.$ac_objext"
14284 CC="$CC -n32"
14285 rm -f "conftest.$ac_objext"
14286 if { (eval echo "$as_me:14286: \"$ac_compile\"") >&5
14287 (eval $ac_compile) 2>&5
14288 ac_status=$?
14289 echo "$as_me:14289: \$? = $ac_status" >&5
14290 (exit "$ac_status"); } &&
14291 { ac_try='test -s "conftest.$ac_objext"'
14292 { (eval echo "$as_me:14292: \"$ac_try\"") >&5
14293 (eval $ac_try) 2>&5
14294 ac_status=$?
14295 echo "$as_me:14295: \$? = $ac_status" >&5
14296 (exit "$ac_status"); }; }; then
14297 ac_cv_sys_largefile_CC=' -n32'; break
14298 else
14299 echo "$as_me: failed program was:" >&5
14300 cat "conftest.$ac_ext" >&5
14301 fi
14302 rm -f "conftest.$ac_objext"
14303 break
14304 done
14305 CC=$ac_save_CC
14306 rm -f "conftest.$ac_ext"
14307 fi
14308 fi
14309 echo "$as_me:14309: result: $ac_cv_sys_largefile_CC" >&5
14310 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14311 if test "$ac_cv_sys_largefile_CC" != no; then
14312 CC=$CC$ac_cv_sys_largefile_CC
14313 fi
14314
14315 echo "$as_me:14315: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14316 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14317 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14318 echo $ECHO_N "(cached) $ECHO_C" >&6
14319 else
14320 while :; do
14321 ac_cv_sys_file_offset_bits=no
14322 cat >"conftest.$ac_ext" <<_ACEOF
14323 #line 14323 "configure"
14324 #include "confdefs.h"
14325 #include <sys/types.h>
14326 /* Check that off_t can represent 2**63 - 1 correctly.
14327 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14328 since some C++ compilers masquerading as C compilers
14329 incorrectly reject 9223372036854775807. */
14330 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14331 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14332 && LARGE_OFF_T % 2147483647 == 1)
14333 ? 1 : -1];
14334 int
14335 main (void)
14336 {
14337
14338 ;
14339 return 0;
14340 }
14341 _ACEOF
14342 rm -f "conftest.$ac_objext"
14343 if { (eval echo "$as_me:14343: \"$ac_compile\"") >&5
14344 (eval $ac_compile) 2>&5
14345 ac_status=$?
14346 echo "$as_me:14346: \$? = $ac_status" >&5
14347 (exit "$ac_status"); } &&
14348 { ac_try='test -s "conftest.$ac_objext"'
14349 { (eval echo "$as_me:14349: \"$ac_try\"") >&5
14350 (eval $ac_try) 2>&5
14351 ac_status=$?
14352 echo "$as_me:14352: \$? = $ac_status" >&5
14353 (exit "$ac_status"); }; }; then
14354 break
14355 else
14356 echo "$as_me: failed program was:" >&5
14357 cat "conftest.$ac_ext" >&5
14358 fi
14359 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14360 cat >"conftest.$ac_ext" <<_ACEOF
14361 #line 14361 "configure"
14362 #include "confdefs.h"
14363 #define _FILE_OFFSET_BITS 64
14364 #include <sys/types.h>
14365 /* Check that off_t can represent 2**63 - 1 correctly.
14366 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14367 since some C++ compilers masquerading as C compilers
14368 incorrectly reject 9223372036854775807. */
14369 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14370 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14371 && LARGE_OFF_T % 2147483647 == 1)
14372 ? 1 : -1];
14373 int
14374 main (void)
14375 {
14376
14377 ;
14378 return 0;
14379 }
14380 _ACEOF
14381 rm -f "conftest.$ac_objext"
14382 if { (eval echo "$as_me:14382: \"$ac_compile\"") >&5
14383 (eval $ac_compile) 2>&5
14384 ac_status=$?
14385 echo "$as_me:14385: \$? = $ac_status" >&5
14386 (exit "$ac_status"); } &&
14387 { ac_try='test -s "conftest.$ac_objext"'
14388 { (eval echo "$as_me:14388: \"$ac_try\"") >&5
14389 (eval $ac_try) 2>&5
14390 ac_status=$?
14391 echo "$as_me:14391: \$? = $ac_status" >&5
14392 (exit "$ac_status"); }; }; then
14393 ac_cv_sys_file_offset_bits=64; break
14394 else
14395 echo "$as_me: failed program was:" >&5
14396 cat "conftest.$ac_ext" >&5
14397 fi
14398 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14399 break
14400 done
14401 fi
14402 echo "$as_me:14402: result: $ac_cv_sys_file_offset_bits" >&5
14403 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14404 if test "$ac_cv_sys_file_offset_bits" != no; then
14405
14406 cat >>confdefs.h <<EOF
14407 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14408 EOF
14409
14410 fi
14411 rm -rf conftest*
14412 echo "$as_me:14412: checking for _LARGE_FILES value needed for large files" >&5
14413 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14414 if test "${ac_cv_sys_large_files+set}" = set; then
14415 echo $ECHO_N "(cached) $ECHO_C" >&6
14416 else
14417 while :; do
14418 ac_cv_sys_large_files=no
14419 cat >"conftest.$ac_ext" <<_ACEOF
14420 #line 14420 "configure"
14421 #include "confdefs.h"
14422 #include <sys/types.h>
14423 /* Check that off_t can represent 2**63 - 1 correctly.
14424 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14425 since some C++ compilers masquerading as C compilers
14426 incorrectly reject 9223372036854775807. */
14427 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14428 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14429 && LARGE_OFF_T % 2147483647 == 1)
14430 ? 1 : -1];
14431 int
14432 main (void)
14433 {
14434
14435 ;
14436 return 0;
14437 }
14438 _ACEOF
14439 rm -f "conftest.$ac_objext"
14440 if { (eval echo "$as_me:14440: \"$ac_compile\"") >&5
14441 (eval $ac_compile) 2>&5
14442 ac_status=$?
14443 echo "$as_me:14443: \$? = $ac_status" >&5
14444 (exit "$ac_status"); } &&
14445 { ac_try='test -s "conftest.$ac_objext"'
14446 { (eval echo "$as_me:14446: \"$ac_try\"") >&5
14447 (eval $ac_try) 2>&5
14448 ac_status=$?
14449 echo "$as_me:14449: \$? = $ac_status" >&5
14450 (exit "$ac_status"); }; }; then
14451 break
14452 else
14453 echo "$as_me: failed program was:" >&5
14454 cat "conftest.$ac_ext" >&5
14455 fi
14456 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14457 cat >"conftest.$ac_ext" <<_ACEOF
14458 #line 14458 "configure"
14459 #include "confdefs.h"
14460 #define _LARGE_FILES 1
14461 #include <sys/types.h>
14462 /* Check that off_t can represent 2**63 - 1 correctly.
14463 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14464 since some C++ compilers masquerading as C compilers
14465 incorrectly reject 9223372036854775807. */
14466 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14467 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14468 && LARGE_OFF_T % 2147483647 == 1)
14469 ? 1 : -1];
14470 int
14471 main (void)
14472 {
14473
14474 ;
14475 return 0;
14476 }
14477 _ACEOF
14478 rm -f "conftest.$ac_objext"
14479 if { (eval echo "$as_me:14479: \"$ac_compile\"") >&5
14480 (eval $ac_compile) 2>&5
14481 ac_status=$?
14482 echo "$as_me:14482: \$? = $ac_status" >&5
14483 (exit "$ac_status"); } &&
14484 { ac_try='test -s "conftest.$ac_objext"'
14485 { (eval echo "$as_me:14485: \"$ac_try\"") >&5
14486 (eval $ac_try) 2>&5
14487 ac_status=$?
14488 echo "$as_me:14488: \$? = $ac_status" >&5
14489 (exit "$ac_status"); }; }; then
14490 ac_cv_sys_large_files=1; break
14491 else
14492 echo "$as_me: failed program was:" >&5
14493 cat "conftest.$ac_ext" >&5
14494 fi
14495 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14496 break
14497 done
14498 fi
14499 echo "$as_me:14499: result: $ac_cv_sys_large_files" >&5
14500 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14501 if test "$ac_cv_sys_large_files" != no; then
14502
14503 cat >>confdefs.h <<EOF
14504 #define _LARGE_FILES $ac_cv_sys_large_files
14505 EOF
14506
14507 fi
14508 rm -rf conftest*
14509 fi
14510
14511 if test "$enable_largefile" != no ; then
14512 echo "$as_me:14512: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14513 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14514 if test "${ac_cv_sys_largefile_source+set}" = set; then
14515 echo $ECHO_N "(cached) $ECHO_C" >&6
14516 else
14517 while :; do
14518 ac_cv_sys_largefile_source=no
14519 cat >"conftest.$ac_ext" <<_ACEOF
14520 #line 14520 "configure"
14521 #include "confdefs.h"
14522 #include <stdio.h>
14523 #include <sys/types.h>
14524 int
14525 main (void)
14526 {
14527
14528 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14529 return my_fseeko(stdin, 0, 0);
14530 ;
14531 return 0;
14532 }
14533 _ACEOF
14534 rm -f "conftest.$ac_objext"
14535 if { (eval echo "$as_me:14535: \"$ac_compile\"") >&5
14536 (eval $ac_compile) 2>&5
14537 ac_status=$?
14538 echo "$as_me:14538: \$? = $ac_status" >&5
14539 (exit "$ac_status"); } &&
14540 { ac_try='test -s "conftest.$ac_objext"'
14541 { (eval echo "$as_me:14541: \"$ac_try\"") >&5
14542 (eval $ac_try) 2>&5
14543 ac_status=$?
14544 echo "$as_me:14544: \$? = $ac_status" >&5
14545 (exit "$ac_status"); }; }; then
14546 break
14547 else
14548 echo "$as_me: failed program was:" >&5
14549 cat "conftest.$ac_ext" >&5
14550 fi
14551 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14552 cat >"conftest.$ac_ext" <<_ACEOF
14553 #line 14553 "configure"
14554 #include "confdefs.h"
14555 #define _LARGEFILE_SOURCE 1
14556 #include <stdio.h>
14557 #include <sys/types.h>
14558 int
14559 main (void)
14560 {
14561
14562 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14563 return my_fseeko(stdin, 0, 0);
14564 ;
14565 return 0;
14566 }
14567 _ACEOF
14568 rm -f "conftest.$ac_objext"
14569 if { (eval echo "$as_me:14569: \"$ac_compile\"") >&5
14570 (eval $ac_compile) 2>&5
14571 ac_status=$?
14572 echo "$as_me:14572: \$? = $ac_status" >&5
14573 (exit "$ac_status"); } &&
14574 { ac_try='test -s "conftest.$ac_objext"'
14575 { (eval echo "$as_me:14575: \"$ac_try\"") >&5
14576 (eval $ac_try) 2>&5
14577 ac_status=$?
14578 echo "$as_me:14578: \$? = $ac_status" >&5
14579 (exit "$ac_status"); }; }; then
14580 ac_cv_sys_largefile_source=1; break
14581 else
14582 echo "$as_me: failed program was:" >&5
14583 cat "conftest.$ac_ext" >&5
14584 fi
14585 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14586 break
14587 done
14588 fi
14589 echo "$as_me:14589: result: $ac_cv_sys_largefile_source" >&5
14590 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14591 if test "$ac_cv_sys_largefile_source" != no; then
14592
14593 cat >>confdefs.h <<EOF
14594 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14595 EOF
14596
14597 fi
14598 rm -rf conftest*
14599
14600 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14601 # in glibc 2.1.3, but that breaks too many other things.
14602 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14603 echo "$as_me:14603: checking for fseeko" >&5
14604 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14605 if test "${ac_cv_func_fseeko+set}" = set; then
14606 echo $ECHO_N "(cached) $ECHO_C" >&6
14607 else
14608 cat >"conftest.$ac_ext" <<_ACEOF
14609 #line 14609 "configure"
14610 #include "confdefs.h"
14611 #include <stdio.h>
14612 #include <sys/types.h>
14613 int
14614 main (void)
14615 {
14616 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14617 return my_fseeko && my_fseeko (stdin, 0, 0);
14618 ;
14619 return 0;
14620 }
14621 _ACEOF
14622 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14623 if { (eval echo "$as_me:14623: \"$ac_link\"") >&5
14624 (eval $ac_link) 2>&5
14625 ac_status=$?
14626 echo "$as_me:14626: \$? = $ac_status" >&5
14627 (exit "$ac_status"); } &&
14628 { ac_try='test -s "conftest$ac_exeext"'
14629 { (eval echo "$as_me:14629: \"$ac_try\"") >&5
14630 (eval $ac_try) 2>&5
14631 ac_status=$?
14632 echo "$as_me:14632: \$? = $ac_status" >&5
14633 (exit "$ac_status"); }; }; then
14634 ac_cv_func_fseeko=yes
14635 else
14636 echo "$as_me: failed program was:" >&5
14637 cat "conftest.$ac_ext" >&5
14638 ac_cv_func_fseeko=no
14639 fi
14640 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14641 fi
14642 echo "$as_me:14642: result: $ac_cv_func_fseeko" >&5
14643 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14644 if test $ac_cv_func_fseeko = yes; then
14645
14646 cat >>confdefs.h <<\EOF
14647 #define HAVE_FSEEKO 1
14648 EOF
14649
14650 fi
14651
14652 # Normally we would collect these definitions in the config.h,
14653 # but (like _XOPEN_SOURCE), some environments rely on having these
14654 # defined before any of the system headers are included. Another
14655 # case comes up with C++, e.g., on AIX the compiler compiles the
14656 # header files by themselves before looking at the body files it is
14657 # told to compile. For ncurses, those header files do not include
14658 # the config.h
14659 if test "$ac_cv_sys_large_files" != no
14660 then
14661
14662 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14663 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14664
14665 fi
14666 if test "$ac_cv_sys_largefile_source" != no
14667 then
14668
14669 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14670 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14671
14672 fi
14673 if test "$ac_cv_sys_file_offset_bits" != no
14674 then
14675
14676 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14677 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14678
14679 fi
14680
14681 echo "$as_me:14681: checking whether to use struct dirent64" >&5
14682 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14683 if test "${cf_cv_struct_dirent64+set}" = set; then
14684 echo $ECHO_N "(cached) $ECHO_C" >&6
14685 else
14686
14687 cat >"conftest.$ac_ext" <<_ACEOF
14688 #line 14688 "configure"
14689 #include "confdefs.h"
14690
14691 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14692 #include <sys/types.h>
14693 #include <dirent.h>
14694
14695 #ifndef __REDIRECT
14696 /* if transitional largefile support is setup, this is true */
14697 extern struct dirent64 * readdir(DIR *);
14698 #endif
14699
14700 int
14701 main (void)
14702 {
14703
14704 DIR *dp = opendir(".");
14705 struct dirent64 *x = readdir(dp);
14706 struct dirent *y = readdir(dp);
14707 int z = x - y;
14708 (void)z;
14709
14710 ;
14711 return 0;
14712 }
14713 _ACEOF
14714 rm -f "conftest.$ac_objext"
14715 if { (eval echo "$as_me:14715: \"$ac_compile\"") >&5
14716 (eval $ac_compile) 2>&5
14717 ac_status=$?
14718 echo "$as_me:14718: \$? = $ac_status" >&5
14719 (exit "$ac_status"); } &&
14720 { ac_try='test -s "conftest.$ac_objext"'
14721 { (eval echo "$as_me:14721: \"$ac_try\"") >&5
14722 (eval $ac_try) 2>&5
14723 ac_status=$?
14724 echo "$as_me:14724: \$? = $ac_status" >&5
14725 (exit "$ac_status"); }; }; then
14726 cf_cv_struct_dirent64=yes
14727 else
14728 echo "$as_me: failed program was:" >&5
14729 cat "conftest.$ac_ext" >&5
14730 cf_cv_struct_dirent64=no
14731 fi
14732 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14733
14734 fi
14735 echo "$as_me:14735: result: $cf_cv_struct_dirent64" >&5
14736 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14737 test "$cf_cv_struct_dirent64" = yes &&
14738 cat >>confdefs.h <<\EOF
14739 #define HAVE_STRUCT_DIRENT64 1
14740 EOF
14741
14742 fi
14743
14744 ### use option --disable-tparm-varargs to make tparm() conform to X/Open
14745 echo "$as_me:14745: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14746 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14747
14748 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14749 if test "${enable_tparm_varargs+set}" = set; then
14750 enableval="$enable_tparm_varargs"
14751 with_tparm_varargs=$enableval
14752 else
14753 with_tparm_varargs=yes
14754 fi;
14755 echo "$as_me:14755: result: $with_tparm_varargs" >&5
14756 echo "${ECHO_T}$with_tparm_varargs" >&6
14757 NCURSES_TPARM_VARARGS=0
14758 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14759
14760 ### use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14761 if test "$with_ticlib" != no ; then
14762 echo "$as_me:14762: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14763 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14764
14765 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14766 if test "${enable_tic_depends+set}" = set; then
14767 enableval="$enable_tic_depends"
14768 with_tic_depends=$enableval
14769 else
14770 with_tic_depends=yes
14771 fi;
14772 echo "$as_me:14772: result: $with_tic_depends" >&5
14773 echo "${ECHO_T}$with_tic_depends" >&6
14774 else
14775 with_tic_depends=no
14776 fi
14777
14778 ### use option --enable-wattr-macros to enable wattr* macros in curses.h
14779 echo "$as_me:14779: checking if you want to enable wattr* macros" >&5
14780 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14781
14782 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14783 if test "${enable_wattr_macros+set}" = set; then
14784 enableval="$enable_wattr_macros"
14785 with_wattr_macros=$enableval
14786 else
14787 with_wattr_macros=no
14788 fi;
14789 if [ "x$with_wattr_macros" != xyes ]; then
14790 NCURSES_WATTR_MACROS=0
14791 echo "$as_me:14791: result: no" >&5
14792 echo "${ECHO_T}no" >&6
14793 else
14794 NCURSES_WATTR_MACROS=1
14795 echo "$as_me:14795: result: yes" >&5
14796 echo "${ECHO_T}yes" >&6
14797 fi
14798
14799 echo "$as_me:14799: checking for X11 rgb file" >&5
14800 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14801
14802 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14803 if test "${with_x11_rgb+set}" = set; then
14804 withval="$with_x11_rgb"
14805 RGB_PATH=$withval
14806 else
14807 RGB_PATH=auto
14808 fi;
14809
14810 if test "x$RGB_PATH" = xauto
14811 then
14812 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14813 for cf_path in \
14814 /opt/local/share/X11/rgb.txt \
14815 /opt/X11/share/X11/rgb.txt \
14816 /usr/share/X11/rgb.txt \
14817 /usr/X11/share/X11/rgb.txt \
14818 /usr/X11/lib/X11/rgb.txt \
14819 /usr/lib/X11/rgb.txt \
14820 /etc/X11/rgb.txt \
14821 /usr/pkg/lib/X11/rgb.txt \
14822 /usr/X11R7/lib/X11/rgb.txt \
14823 /usr/X11R6/lib/X11/rgb.txt \
14824 /usr/X11R5/lib/X11/rgb.txt \
14825 /usr/X11R4/lib/X11/rgb.txt \
14826 /usr/local/lib/X11/rgb.txt \
14827 /usr/local/share/X11/rgb.txt \
14828 /usr/lib64/X11/rgb.txt
14829 do
14830 if test -f "$cf_path" ; then
14831 RGB_PATH="$cf_path"
14832 break
14833 fi
14834 done
14835 else
14836 cf_path=$RGB_PATH
14837
14838 if test "x$prefix" != xNONE; then
14839 cf_path_syntax="$prefix"
14840 else
14841 cf_path_syntax="$ac_default_prefix"
14842 fi
14843
14844 case "x$cf_path" in
14845 (x\$\(*\)*|x\'*\'*)
14846 ;;
14847 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
14848 ;;
14849 (x\$\{*prefix\}*|x\$\{*dir\}*)
14850 eval cf_path="$cf_path"
14851 case "x$cf_path" in
14852 (xNONE/*)
14853 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14854 ;;
14855 esac
14856 ;;
14857 (xno|xNONE/*)
14858 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14859 ;;
14860 (*)
14861 { { echo "$as_me:14861: error: expected a pathname, not \"$cf_path\"" >&5
14862 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14863 { (exit 1); exit 1; }; }
14864 ;;
14865 esac
14866
14867 fi
14868
14869 echo "$as_me:14869: result: $RGB_PATH" >&5
14870 echo "${ECHO_T}$RGB_PATH" >&6
14871
14872 cat >>confdefs.h <<EOF
14873 #define RGB_PATH "$cf_path"
14874 EOF
14875
14876 no_x11_rgb=
14877 if test "$RGB_PATH" = no
14878 then
14879 no_x11_rgb="#"
14880 fi
14881
14882 ### use option --with-bool to override bool's type
14883
14884 echo "$as_me:14884: checking for type of bool" >&5
14885 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14886
14887 # Check whether --with-bool or --without-bool was given.
14888 if test "${with_bool+set}" = set; then
14889 withval="$with_bool"
14890 NCURSES_BOOL="$withval"
14891 else
14892 NCURSES_BOOL=auto
14893 fi;
14894 echo "$as_me:14894: result: $NCURSES_BOOL" >&5
14895 echo "${ECHO_T}$NCURSES_BOOL" >&6
14896 case x$NCURSES_BOOL in
14897 (x|xyes|xno)
14898 { { echo "$as_me:14898: error: expected a type name for bool" >&5
14899 echo "$as_me: error: expected a type name for bool" >&2;}
14900 { (exit 1); exit 1; }; }
14901 ;;
14902 esac
14903
14904 echo "$as_me:14904: checking for alternate terminal capabilities file" >&5
14905 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14906
14907 # Check whether --with-caps or --without-caps was given.
14908 if test "${with_caps+set}" = set; then
14909 withval="$with_caps"
14910 TERMINFO_CAPS=Caps.$withval
14911 else
14912 TERMINFO_CAPS=Caps
14913 fi;
14914 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14915 then
14916 { echo "$as_me:14916: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14917 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14918 TERMINFO_CAPS=Caps
14919 fi
14920 echo "$as_me:14920: result: $TERMINFO_CAPS" >&5
14921 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14922
14923 ### use option --with-chtype to override chtype's type
14924
14925 echo "$as_me:14925: checking for type of chtype" >&5
14926 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14927
14928 # Check whether --with-chtype or --without-chtype was given.
14929 if test "${with_chtype+set}" = set; then
14930 withval="$with_chtype"
14931 NCURSES_CHTYPE="$withval"
14932 else
14933 NCURSES_CHTYPE=$cf_dft_chtype
14934 fi;
14935 echo "$as_me:14935: result: $NCURSES_CHTYPE" >&5
14936 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14937 case x$NCURSES_CHTYPE in
14938 (x|xyes|xno)
14939 { { echo "$as_me:14939: error: expected a type name for chtype" >&5
14940 echo "$as_me: error: expected a type name for chtype" >&2;}
14941 { (exit 1); exit 1; }; }
14942 ;;
14943 esac
14944
14945 ### use option --with-ospeed to override ospeed's type
14946
14947 echo "$as_me:14947: checking for type of ospeed" >&5
14948 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14949
14950 # Check whether --with-ospeed or --without-ospeed was given.
14951 if test "${with_ospeed+set}" = set; then
14952 withval="$with_ospeed"
14953 NCURSES_OSPEED="$withval"
14954 else
14955 NCURSES_OSPEED=short
14956 fi;
14957 echo "$as_me:14957: result: $NCURSES_OSPEED" >&5
14958 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14959 case x$NCURSES_OSPEED in
14960 (x|xyes|xno)
14961 { { echo "$as_me:14961: error: expected a type name for ospeed" >&5
14962 echo "$as_me: error: expected a type name for ospeed" >&2;}
14963 { (exit 1); exit 1; }; }
14964 ;;
14965 esac
14966
14967 ### use option --with-mmask-t to override mmask_t's type
14968
14969 echo "$as_me:14969: checking for type of mmask-t" >&5
14970 echo $ECHO_N "checking for type of mmask-t... $ECHO_C" >&6
14971
14972 # Check whether --with-mmask-t or --without-mmask-t was given.
14973 if test "${with_mmask_t+set}" = set; then
14974 withval="$with_mmask_t"
14975 NCURSES_MMASK_T="$withval"
14976 else
14977 NCURSES_MMASK_T=$cf_dft_mmask_t
14978 fi;
14979 echo "$as_me:14979: result: $NCURSES_MMASK_T" >&5
14980 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14981 case x$NCURSES_MMASK_T in
14982 (x|xyes|xno)
14983 { { echo "$as_me:14983: error: expected a type name for mmask-t" >&5
14984 echo "$as_me: error: expected a type name for mmask-t" >&2;}
14985 { (exit 1); exit 1; }; }
14986 ;;
14987 esac
14988
14989 ### option --enable-lp64 can give unexpected results
14990 if test "$cf_cv_enable_lp64" = 1 ; then
14991 test -n "$with_chtype" && test "$NCURSES_CHTYPE" != unsigned && { echo "$as_me:14991: WARNING: option --enable-lp64 overrides --with-chtype" >&5
14992 echo "$as_me: WARNING: option --enable-lp64 overrides --with-chtype" >&2;}
14993 test -n "$with_mmask_t" && test "$NCURSES_MMASK_T" != unsigned && { echo "$as_me:14993: WARNING: option --enable-lp64 overrides --with-mmask-t" >&5
14994 echo "$as_me: WARNING: option --enable-lp64 overrides --with-mmask-t" >&2;}
14995 fi
14996
14997 ### use option --with-ccharw-max to override CCHARW_MAX size
14998 echo "$as_me:14998: checking for size CCHARW_MAX" >&5
14999 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
15000
15001 # Check whether --with-ccharw-max or --without-ccharw-max was given.
15002 if test "${with_ccharw_max+set}" = set; then
15003 withval="$with_ccharw_max"
15004 NCURSES_CCHARW_MAX="$withval"
15005 else
15006 NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
15007 fi;
15008 echo "$as_me:15008: result: $NCURSES_CCHARW_MAX" >&5
15009 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
15010
15011 echo "$as_me:15011: checking for signed char" >&5
15012 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
15013 if test "${ac_cv_type_signed_char+set}" = set; then
15014 echo $ECHO_N "(cached) $ECHO_C" >&6
15015 else
15016 cat >"conftest.$ac_ext" <<_ACEOF
15017 #line 15017 "configure"
15018 #include "confdefs.h"
15019 $ac_includes_default
15020 int
15021 main (void)
15022 {
15023 if ((signed char *) 0)
15024 return 0;
15025 if (sizeof (signed char))
15026 return 0;
15027 ;
15028 return 0;
15029 }
15030 _ACEOF
15031 rm -f "conftest.$ac_objext"
15032 if { (eval echo "$as_me:15032: \"$ac_compile\"") >&5
15033 (eval $ac_compile) 2>&5
15034 ac_status=$?
15035 echo "$as_me:15035: \$? = $ac_status" >&5
15036 (exit "$ac_status"); } &&
15037 { ac_try='test -s "conftest.$ac_objext"'
15038 { (eval echo "$as_me:15038: \"$ac_try\"") >&5
15039 (eval $ac_try) 2>&5
15040 ac_status=$?
15041 echo "$as_me:15041: \$? = $ac_status" >&5
15042 (exit "$ac_status"); }; }; then
15043 ac_cv_type_signed_char=yes
15044 else
15045 echo "$as_me: failed program was:" >&5
15046 cat "conftest.$ac_ext" >&5
15047 ac_cv_type_signed_char=no
15048 fi
15049 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15050 fi
15051 echo "$as_me:15051: result: $ac_cv_type_signed_char" >&5
15052 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
15053
15054 echo "$as_me:15054: checking size of signed char" >&5
15055 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
15056 if test "${ac_cv_sizeof_signed_char+set}" = set; then
15057 echo $ECHO_N "(cached) $ECHO_C" >&6
15058 else
15059 if test "$ac_cv_type_signed_char" = yes; then
15060 if test "$cross_compiling" = yes; then
15061 # Depending upon the size, compute the lo and hi bounds.
15062 cat >"conftest.$ac_ext" <<_ACEOF
15063 #line 15063 "configure"
15064 #include "confdefs.h"
15065 $ac_includes_default
15066 int
15067 main (void)
15068 {
15069 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
15070 ;
15071 return 0;
15072 }
15073 _ACEOF
15074 rm -f "conftest.$ac_objext"
15075 if { (eval echo "$as_me:15075: \"$ac_compile\"") >&5
15076 (eval $ac_compile) 2>&5
15077 ac_status=$?
15078 echo "$as_me:15078: \$? = $ac_status" >&5
15079 (exit "$ac_status"); } &&
15080 { ac_try='test -s "conftest.$ac_objext"'
15081 { (eval echo "$as_me:15081: \"$ac_try\"") >&5
15082 (eval $ac_try) 2>&5
15083 ac_status=$?
15084 echo "$as_me:15084: \$? = $ac_status" >&5
15085 (exit "$ac_status"); }; }; then
15086 ac_lo=0 ac_mid=0
15087 while :; do
15088 cat >"conftest.$ac_ext" <<_ACEOF
15089 #line 15089 "configure"
15090 #include "confdefs.h"
15091 $ac_includes_default
15092 int
15093 main (void)
15094 {
15095 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15096 ;
15097 return 0;
15098 }
15099 _ACEOF
15100 rm -f "conftest.$ac_objext"
15101 if { (eval echo "$as_me:15101: \"$ac_compile\"") >&5
15102 (eval $ac_compile) 2>&5
15103 ac_status=$?
15104 echo "$as_me:15104: \$? = $ac_status" >&5
15105 (exit "$ac_status"); } &&
15106 { ac_try='test -s "conftest.$ac_objext"'
15107 { (eval echo "$as_me:15107: \"$ac_try\"") >&5
15108 (eval $ac_try) 2>&5
15109 ac_status=$?
15110 echo "$as_me:15110: \$? = $ac_status" >&5
15111 (exit "$ac_status"); }; }; then
15112 ac_hi=$ac_mid; break
15113 else
15114 echo "$as_me: failed program was:" >&5
15115 cat "conftest.$ac_ext" >&5
15116 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
15117 fi
15118 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15119 done
15120 else
15121 echo "$as_me: failed program was:" >&5
15122 cat "conftest.$ac_ext" >&5
15123 ac_hi=-1 ac_mid=-1
15124 while :; do
15125 cat >"conftest.$ac_ext" <<_ACEOF
15126 #line 15126 "configure"
15127 #include "confdefs.h"
15128 $ac_includes_default
15129 int
15130 main (void)
15131 {
15132 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
15133 ;
15134 return 0;
15135 }
15136 _ACEOF
15137 rm -f "conftest.$ac_objext"
15138 if { (eval echo "$as_me:15138: \"$ac_compile\"") >&5
15139 (eval $ac_compile) 2>&5
15140 ac_status=$?
15141 echo "$as_me:15141: \$? = $ac_status" >&5
15142 (exit "$ac_status"); } &&
15143 { ac_try='test -s "conftest.$ac_objext"'
15144 { (eval echo "$as_me:15144: \"$ac_try\"") >&5
15145 (eval $ac_try) 2>&5
15146 ac_status=$?
15147 echo "$as_me:15147: \$? = $ac_status" >&5
15148 (exit "$ac_status"); }; }; then
15149 ac_lo=$ac_mid; break
15150 else
15151 echo "$as_me: failed program was:" >&5
15152 cat "conftest.$ac_ext" >&5
15153 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
15154 fi
15155 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15156 done
15157 fi
15158 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15159 # Binary search between lo and hi bounds.
15160 while test "x$ac_lo" != "x$ac_hi"; do
15161 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
15162 cat >"conftest.$ac_ext" <<_ACEOF
15163 #line 15163 "configure"
15164 #include "confdefs.h"
15165 $ac_includes_default
15166 int
15167 main (void)
15168 {
15169 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15170 ;
15171 return 0;
15172 }
15173 _ACEOF
15174 rm -f "conftest.$ac_objext"
15175 if { (eval echo "$as_me:15175: \"$ac_compile\"") >&5
15176 (eval $ac_compile) 2>&5
15177 ac_status=$?
15178 echo "$as_me:15178: \$? = $ac_status" >&5
15179 (exit "$ac_status"); } &&
15180 { ac_try='test -s "conftest.$ac_objext"'
15181 { (eval echo "$as_me:15181: \"$ac_try\"") >&5
15182 (eval $ac_try) 2>&5
15183 ac_status=$?
15184 echo "$as_me:15184: \$? = $ac_status" >&5
15185 (exit "$ac_status"); }; }; then
15186 ac_hi=$ac_mid
15187 else
15188 echo "$as_me: failed program was:" >&5
15189 cat "conftest.$ac_ext" >&5
15190 ac_lo=`expr "$ac_mid" + 1`
15191 fi
15192 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15193 done
15194 ac_cv_sizeof_signed_char=$ac_lo
15195 else
15196 if test "$cross_compiling" = yes; then
15197 { { echo "$as_me:15197: error: cannot run test program while cross compiling" >&5
15198 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15199 { (exit 1); exit 1; }; }
15200 else
15201 cat >"conftest.$ac_ext" <<_ACEOF
15202 #line 15202 "configure"
15203 #include "confdefs.h"
15204 $ac_includes_default
15205 int
15206 main (void)
15207 {
15208 FILE *f = fopen ("conftest.val", "w");
15209 if (!f)
15210 $ac_main_return (1);
15211 fprintf (f, "%ld", (long)(sizeof (signed char)));
15212 fclose (f);
15213 ;
15214 return 0;
15215 }
15216 _ACEOF
15217 rm -f "conftest$ac_exeext"
15218 if { (eval echo "$as_me:15218: \"$ac_link\"") >&5
15219 (eval $ac_link) 2>&5
15220 ac_status=$?
15221 echo "$as_me:15221: \$? = $ac_status" >&5
15222 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15223 { (eval echo "$as_me:15223: \"$ac_try\"") >&5
15224 (eval $ac_try) 2>&5
15225 ac_status=$?
15226 echo "$as_me:15226: \$? = $ac_status" >&5
15227 (exit "$ac_status"); }; }; then
15228 ac_cv_sizeof_signed_char=`cat conftest.val`
15229 else
15230 echo "$as_me: program exited with status $ac_status" >&5
15231 echo "$as_me: failed program was:" >&5
15232 cat "conftest.$ac_ext" >&5
15233 fi
15234 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15235 fi
15236 fi
15237 rm -f conftest.val
15238 else
15239 ac_cv_sizeof_signed_char=0
15240 fi
15241 fi
15242 echo "$as_me:15242: result: $ac_cv_sizeof_signed_char" >&5
15243 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
15244 cat >>confdefs.h <<EOF
15245 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
15246 EOF
15247
15248 if test "$ac_cv_sizeof_signed_char" = 1 ; then
15249 NCURSES_SBOOL="signed char"
15250 else
15251 NCURSES_SBOOL="char"
15252 fi
15253 echo "$as_me:15253: checking whether to use signed chars for Boolean array in term.h" >&5
15254 echo $ECHO_N "checking whether to use signed chars for Boolean array in term.h... $ECHO_C" >&6
15255
15256 # Check whether --enable-signed-char or --disable-signed-char was given.
15257 if test "${enable_signed_char+set}" = set; then
15258 enableval="$enable_signed_char"
15259 with_signed_char=$enableval
15260 else
15261 with_signed_char=$cf_dft_signed_char
15262 fi;
15263 echo "$as_me:15263: result: $with_signed_char" >&5
15264 echo "${ECHO_T}$with_signed_char" >&6
15265 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
15266
15267 ### use option --with-tparm-arg to override tparm's argument type
15268
15269 echo "$as_me:15269: checking for type of tparm-arg" >&5
15270 echo $ECHO_N "checking for type of tparm-arg... $ECHO_C" >&6
15271
15272 # Check whether --with-tparm-arg or --without-tparm-arg was given.
15273 if test "${with_tparm_arg+set}" = set; then
15274 withval="$with_tparm_arg"
15275 NCURSES_TPARM_ARG="$withval"
15276 else
15277 NCURSES_TPARM_ARG=$cf_dft_tparm_arg
15278 fi;
15279 echo "$as_me:15279: result: $NCURSES_TPARM_ARG" >&5
15280 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
15281 case x$NCURSES_TPARM_ARG in
15282 (x|xyes|xno)
15283 { { echo "$as_me:15283: error: expected a type name for tparm-arg" >&5
15284 echo "$as_me: error: expected a type name for tparm-arg" >&2;}
15285 { (exit 1); exit 1; }; }
15286 ;;
15287 esac
15288
15289 ### Enable compiling-in rcs id's
15290 echo "$as_me:15290: checking if RCS identifiers should be compiled-in" >&5
15291 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
15292
15293 # Check whether --with-rcs-ids or --without-rcs-ids was given.
15294 if test "${with_rcs_ids+set}" = set; then
15295 withval="$with_rcs_ids"
15296 with_rcs_ids=$withval
15297 else
15298 with_rcs_ids=no
15299 fi;
15300 echo "$as_me:15300: result: $with_rcs_ids" >&5
15301 echo "${ECHO_T}$with_rcs_ids" >&6
15302 test "x$with_rcs_ids" = xyes &&
15303 cat >>confdefs.h <<\EOF
15304 #define USE_RCS_IDS 1
15305 EOF
15306
15307 ###############################################################################
15308
15309 ### Note that some functions (such as const) are normally disabled anyway.
15310 echo "$as_me:15310: checking if you want to build with function extensions" >&5
15311 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15312
15313 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15314 if test "${enable_ext_funcs+set}" = set; then
15315 enableval="$enable_ext_funcs"
15316 with_ext_funcs=$enableval
15317 else
15318 with_ext_funcs=yes
15319 fi;
15320 echo "$as_me:15320: result: $with_ext_funcs" >&5
15321 echo "${ECHO_T}$with_ext_funcs" >&6
15322 if test "x$with_ext_funcs" = xyes ; then
15323 NCURSES_EXT_FUNCS=1
15324
15325 cat >>confdefs.h <<\EOF
15326 #define NCURSES_EXT_FUNCS 1
15327 EOF
15328
15329 cat >>confdefs.h <<\EOF
15330 #define HAVE_ASSUME_DEFAULT_COLORS 1
15331 EOF
15332
15333 cat >>confdefs.h <<\EOF
15334 #define HAVE_CURSES_VERSION 1
15335 EOF
15336
15337 cat >>confdefs.h <<\EOF
15338 #define HAVE_HAS_KEY 1
15339 EOF
15340
15341 cat >>confdefs.h <<\EOF
15342 #define HAVE_RESIZETERM 1
15343 EOF
15344
15345 cat >>confdefs.h <<\EOF
15346 #define HAVE_RESIZE_TERM 1
15347 EOF
15348
15349 cat >>confdefs.h <<\EOF
15350 #define HAVE_TERM_ENTRY_H 1
15351 EOF
15352
15353 cat >>confdefs.h <<\EOF
15354 #define HAVE_USE_DEFAULT_COLORS 1
15355 EOF
15356
15357 cat >>confdefs.h <<\EOF
15358 #define HAVE_USE_SCREEN 1
15359 EOF
15360
15361 cat >>confdefs.h <<\EOF
15362 #define HAVE_USE_WINDOW 1
15363 EOF
15364
15365 cat >>confdefs.h <<\EOF
15366 #define HAVE_WRESIZE 1
15367 EOF
15368
15369 GENERATED_EXT_FUNCS=generated
15370 else
15371 cf_dft_ext_spfuncs=no
15372 cf_dft_ext_colors=no
15373 NCURSES_EXT_FUNCS=0
15374 GENERATED_EXT_FUNCS=
15375 fi
15376
15377 echo "$as_me:15377: checking if you want to build with SCREEN extensions" >&5
15378 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15379
15380 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15381 if test "${enable_sp_funcs+set}" = set; then
15382 enableval="$enable_sp_funcs"
15383 with_sp_funcs=$enableval
15384 else
15385 with_sp_funcs=$cf_dft_ext_spfuncs
15386 fi;
15387 echo "$as_me:15387: result: $with_sp_funcs" >&5
15388 echo "${ECHO_T}$with_sp_funcs" >&6
15389 if test "x$with_sp_funcs" = xyes ; then
15390 NCURSES_SP_FUNCS=1
15391
15392 cat >>confdefs.h <<\EOF
15393 #define NCURSES_SP_FUNCS 1
15394 EOF
15395
15396 cat >>confdefs.h <<\EOF
15397 #define HAVE_TPUTS_SP 1
15398 EOF
15399
15400 GENERATED_SP_FUNCS=generated
15401 else
15402 NCURSES_SP_FUNCS=0
15403 GENERATED_SP_FUNCS=
15404 fi
15405
15406 case "$cf_cv_system_name" in
15407 (*mingw32*|*mingw64*|*-msvc*)
15408 cf_dft_term_driver=yes
15409 ;;
15410 (*)
15411 cf_dft_term_driver=no
15412 ;;
15413 esac
15414
15415 echo "$as_me:15415: checking if you want to build with terminal-driver" >&5
15416 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15417
15418 # Check whether --enable-term-driver or --disable-term-driver was given.
15419 if test "${enable_term_driver+set}" = set; then
15420 enableval="$enable_term_driver"
15421 with_term_driver=$enableval
15422 else
15423 with_term_driver=$cf_dft_term_driver
15424 fi;
15425 echo "$as_me:15425: result: $with_term_driver" >&5
15426 echo "${ECHO_T}$with_term_driver" >&6
15427 if test "x$with_term_driver" = xyes ; then
15428
15429 cat >>confdefs.h <<\EOF
15430 #define USE_TERM_DRIVER 1
15431 EOF
15432
15433 if test "x$with_termlib" != xno ; then
15434 { { echo "$as_me:15434: error: The term-driver option conflicts with the termlib option" >&5
15435 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15436 { (exit 1); exit 1; }; }
15437 fi
15438 if test "x$with_sp_funcs" != xyes ; then
15439 { { echo "$as_me:15439: error: The term-driver option relies upon sp-funcs" >&5
15440 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15441 { (exit 1); exit 1; }; }
15442 fi
15443 fi
15444
15445 ### use option --enable-const to turn on use of const beyond that in XSI.
15446 echo "$as_me:15446: checking for extended use of const keyword" >&5
15447 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15448
15449 # Check whether --enable-const or --disable-const was given.
15450 if test "${enable_const+set}" = set; then
15451 enableval="$enable_const"
15452 with_ext_const=$enableval
15453 else
15454 with_ext_const=$cf_dft_ext_const
15455 fi;
15456 echo "$as_me:15456: result: $with_ext_const" >&5
15457 echo "${ECHO_T}$with_ext_const" >&6
15458 NCURSES_CONST='/*nothing*/'
15459 if test "x$with_ext_const" = xyes ; then
15460 NCURSES_CONST=const
15461 fi
15462
15463 ### use option --enable-ext-colors to turn on use of colors beyond 16.
15464 NCURSES_EXT_COLORS=0
15465 NCURSES_RGB_COLORS=0
15466 echo "$as_me:15466: checking if you want to use extended colors" >&5
15467 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15468
15469 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15470 if test "${enable_ext_colors+set}" = set; then
15471 enableval="$enable_ext_colors"
15472 with_ext_colors=$enableval
15473 else
15474 with_ext_colors=$cf_dft_ext_colors
15475 fi;
15476 echo "$as_me:15476: result: $with_ext_colors" >&5
15477 echo "${ECHO_T}$with_ext_colors" >&6
15478 if test "x$with_ext_colors" = xyes ; then
15479 if test "x$with_widec" != xyes ; then
15480 { echo "$as_me:15480: WARNING: This option applies only to wide-character library" >&5
15481 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15482 else
15483 # cannot be ABI 5 since it changes sizeof(cchar_t)
15484
15485 if test "${with_abi_version+set}" != set; then
15486 case "$cf_cv_rel_version" in
15487 (5.*)
15488 cf_cv_rel_version=6.0
15489 cf_cv_abi_version=6
15490 cf_cv_abi_default=6
15491 { echo "$as_me:15491: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15492 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15493 ;;
15494 esac
15495 fi
15496
15497 NCURSES_EXT_COLORS=1
15498
15499 cat >>confdefs.h <<\EOF
15500 #define NCURSES_EXT_COLORS 1
15501 EOF
15502
15503 cat >>confdefs.h <<\EOF
15504 #define HAVE_ALLOC_PAIR 1
15505 EOF
15506
15507 cat >>confdefs.h <<\EOF
15508 #define HAVE_INIT_EXTENDED_COLOR 1
15509 EOF
15510
15511 cat >>confdefs.h <<\EOF
15512 #define HAVE_RESET_COLOR_PAIRS 1
15513 EOF
15514
15515 fi
15516 ### use option --enable-rgb-color to extend support for direct-color
15517 echo "$as_me:15517: checking if you want to extend support for direct color" >&5
15518 echo $ECHO_N "checking if you want to extend support for direct color... $ECHO_C" >&6
15519
15520 # Check whether --enable-rgb-color or --disable-rgb-color was given.
15521 if test "${enable_rgb_color+set}" = set; then
15522 enableval="$enable_rgb_color"
15523 with_rgb_color=$enableval
15524 else
15525 with_rgb_color=$cf_dft_rgb_color
15526 fi;
15527 echo "$as_me:15527: result: $with_rgb_color" >&5
15528 echo "${ECHO_T}$with_rgb_color" >&6
15529 if test "x$with_rgb_color" = xyes ; then
15530 NCURSES_RGB_COLORS=1
15531
15532 cat >>confdefs.h <<\EOF
15533 #define NCURSES_RGB_COLORS 1
15534 EOF
15535
15536 fi
15537 fi
15538
15539 ### use option --enable-ext-mouse to modify coding to support 5-button mice
15540 echo "$as_me:15540: checking if you want to use extended mouse encoding" >&5
15541 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15542
15543 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15544 if test "${enable_ext_mouse+set}" = set; then
15545 enableval="$enable_ext_mouse"
15546 with_ext_mouse=$enableval
15547 else
15548 with_ext_mouse=$cf_dft_ext_mouse
15549 fi;
15550 echo "$as_me:15550: result: $with_ext_mouse" >&5
15551 echo "${ECHO_T}$with_ext_mouse" >&6
15552 if test "x$with_ext_mouse" = xyes ; then
15553
15554 if test "${with_abi_version+set}" != set; then
15555 case "$cf_cv_rel_version" in
15556 (5.*)
15557 cf_cv_rel_version=6.0
15558 cf_cv_abi_version=6
15559 cf_cv_abi_default=6
15560 { echo "$as_me:15560: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15561 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15562 ;;
15563 esac
15564 fi
15565
15566 fi
15567
15568 if test $cf_cv_abi_default -le 5 ; then
15569 NCURSES_MOUSE_VERSION=1
15570 elif test $cf_cv_abi_default -le 6 ; then
15571 NCURSES_MOUSE_VERSION=2
15572 else
15573 NCURSES_MOUSE_VERSION=3
15574 fi
15575
15576 ### use option --enable-ext-putwin to turn on extended screendumps
15577 echo "$as_me:15577: checking if you want to use extended putwin/screendump" >&5
15578 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15579
15580 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15581 if test "${enable_ext_putwin+set}" = set; then
15582 enableval="$enable_ext_putwin"
15583 with_ext_putwin=$enableval
15584 else
15585 with_ext_putwin=$cf_dft_ext_putwin
15586 fi;
15587 echo "$as_me:15587: result: $with_ext_putwin" >&5
15588 echo "${ECHO_T}$with_ext_putwin" >&6
15589 if test "x$with_ext_putwin" = xyes ; then
15590
15591 cat >>confdefs.h <<\EOF
15592 #define NCURSES_EXT_PUTWIN 1
15593 EOF
15594
15595 fi
15596
15597 echo "$as_me:15597: checking if you want \$NCURSES_NO_PADDING code" >&5
15598 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15599
15600 # Check whether --enable-no-padding or --disable-no-padding was given.
15601 if test "${enable_no_padding+set}" = set; then
15602 enableval="$enable_no_padding"
15603 with_no_padding=$enableval
15604 else
15605 with_no_padding=$with_ext_funcs
15606 fi;
15607 echo "$as_me:15607: result: $with_no_padding" >&5
15608 echo "${ECHO_T}$with_no_padding" >&6
15609 test "x$with_no_padding" = xyes &&
15610 cat >>confdefs.h <<\EOF
15611 #define NCURSES_NO_PADDING 1
15612 EOF
15613
15614 ### use option --enable-sigwinch to turn on use of SIGWINCH logic
15615 echo "$as_me:15615: checking if you want SIGWINCH handler" >&5
15616 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15617
15618 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15619 if test "${enable_sigwinch+set}" = set; then
15620 enableval="$enable_sigwinch"
15621 with_sigwinch=$enableval
15622 else
15623 with_sigwinch=$with_ext_funcs
15624 fi;
15625 echo "$as_me:15625: result: $with_sigwinch" >&5
15626 echo "${ECHO_T}$with_sigwinch" >&6
15627 if test "x$with_sigwinch" = xyes
15628 then
15629
15630 cat >>confdefs.h <<\EOF
15631 #define USE_SIGWINCH 1
15632 EOF
15633
15634 cf_cv_enable_sigwinch=1
15635 else
15636 cf_cv_enable_sigwinch=0
15637 fi
15638
15639 ### use option --enable-tcap-names to allow user to define new capabilities
15640 echo "$as_me:15640: checking if you want user-definable terminal capabilities like termcap" >&5
15641 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15642
15643 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15644 if test "${enable_tcap_names+set}" = set; then
15645 enableval="$enable_tcap_names"
15646 with_tcap_names=$enableval
15647 else
15648 with_tcap_names=$with_ext_funcs
15649 fi;
15650 echo "$as_me:15650: result: $with_tcap_names" >&5
15651 echo "${ECHO_T}$with_tcap_names" >&6
15652 NCURSES_XNAMES=0
15653 if test "x$with_tcap_names" = xyes; then
15654 NCURSES_XNAMES=1
15655
15656 cat >>confdefs.h <<\EOF
15657 #define NCURSES_XNAMES 1
15658 EOF
15659
15660 fi
15661
15662 ##############################################################################
15663
15664 USE_NAMED_PIPES=0
15665 INTERNALS_HDR=
15666
15667 case "$cf_cv_system_name" in
15668 (*mingw32*|*mingw64*|*-msvc*)
15669
15670 echo "$as_me:15670: checking for named pipe functions" >&5
15671 echo $ECHO_N "checking for named pipe functions... $ECHO_C" >&6
15672 if test "${cf_cv_named_pipes+set}" = set; then
15673 echo $ECHO_N "(cached) $ECHO_C" >&6
15674 else
15675
15676 cf_save_CPPFLAGS="$CPPFLAGS"
15677 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
15678 cat >"conftest.$ac_ext" <<_ACEOF
15679 #line 15679 "configure"
15680 #include "confdefs.h"
15681 #include <windows.h>
15682 int
15683 main (void)
15684 {
15685
15686 HANDLE handle = 0;
15687 ULONG pPid = 0;
15688 if (GetNamedPipeInfo(handle, NULL, NULL, NULL, NULL)) {
15689 if (GetNamedPipeServerProcessId(handle, &pPid)) {
15690 ${cf_cv_main_return:-return} (0);
15691 }
15692 }
15693
15694 ;
15695 return 0;
15696 }
15697 _ACEOF
15698 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15699 if { (eval echo "$as_me:15699: \"$ac_link\"") >&5
15700 (eval $ac_link) 2>&5
15701 ac_status=$?
15702 echo "$as_me:15702: \$? = $ac_status" >&5
15703 (exit "$ac_status"); } &&
15704 { ac_try='test -s "conftest$ac_exeext"'
15705 { (eval echo "$as_me:15705: \"$ac_try\"") >&5
15706 (eval $ac_try) 2>&5
15707 ac_status=$?
15708 echo "$as_me:15708: \$? = $ac_status" >&5
15709 (exit "$ac_status"); }; }; then
15710 cf_cv_named_pipes=yes
15711 else
15712 echo "$as_me: failed program was:" >&5
15713 cat "conftest.$ac_ext" >&5
15714 cf_cv_named_pipes=no
15715 fi
15716 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15717 CPPFLAGS="$cf_save_CPPFLAGS"
15718
15719 fi
15720 echo "$as_me:15720: result: $cf_cv_named_pipes" >&5
15721 echo "${ECHO_T}$cf_cv_named_pipes" >&6
15722 if test "$cf_cv_named_pipes" = yes; then
15723 echo "$as_me:15723: checking if you want to use named pipes with -Windows driver" >&5
15724 echo $ECHO_N "checking if you want to use named pipes with -Windows driver... $ECHO_C" >&6
15725
15726 # Check whether --enable-named-pipes or --disable-named-pipes was given.
15727 if test "${enable_named_pipes+set}" = set; then
15728 enableval="$enable_named_pipes"
15729 with_named_pipes=$enableval
15730 else
15731 with_named_pipes=no
15732 fi;
15733 echo "$as_me:15733: result: $with_named_pipes" >&5
15734 echo "${ECHO_T}$with_named_pipes" >&6
15735 else
15736 with_named_pipes=no
15737 fi
15738 if test "x$with_named_pipes" = xyes
15739 then
15740
15741 cat >>confdefs.h <<\EOF
15742 #define USE_NAMED_PIPES 1
15743 EOF
15744
15745 USE_NAMED_PIPES=1
15746 fi
15747 INTERNALS_HDR='../include/nc_win32.h'
15748 # MinGW32 sets $WD to its directory.
15749 if test -n "$WD"
15750 then
15751 if test -d "$WD"
15752 then
15753
15754 cat >>confdefs.h <<\EOF
15755 #define USE_DOS_PATHS 1
15756 EOF
15757
15758 fi
15759 fi
15760 ;;
15761 esac
15762
15763 ##############################################################################
15764
15765 echo "$as_me:15765: checking if you want to link with the pthread library" >&5
15766 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15767
15768 # Check whether --with-pthread or --without-pthread was given.
15769 if test "${with_pthread+set}" = set; then
15770 withval="$with_pthread"
15771 with_pthread=$withval
15772 else
15773 with_pthread=no
15774 fi;
15775 echo "$as_me:15775: result: $with_pthread" >&5
15776 echo "${ECHO_T}$with_pthread" >&6
15777
15778 if test "$with_pthread" != no ; then
15779 echo "$as_me:15779: checking for pthread.h" >&5
15780 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15781 if test "${ac_cv_header_pthread_h+set}" = set; then
15782 echo $ECHO_N "(cached) $ECHO_C" >&6
15783 else
15784 cat >"conftest.$ac_ext" <<_ACEOF
15785 #line 15785 "configure"
15786 #include "confdefs.h"
15787 #include <pthread.h>
15788 _ACEOF
15789 if { (eval echo "$as_me:15789: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15790 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15791 ac_status=$?
15792 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15793 rm -f conftest.er1
15794 cat conftest.err >&5
15795 echo "$as_me:15795: \$? = $ac_status" >&5
15796 (exit "$ac_status"); } >/dev/null; then
15797 if test -s conftest.err; then
15798 ac_cpp_err=$ac_c_preproc_warn_flag
15799 else
15800 ac_cpp_err=
15801 fi
15802 else
15803 ac_cpp_err=yes
15804 fi
15805 if test -z "$ac_cpp_err"; then
15806 ac_cv_header_pthread_h=yes
15807 else
15808 echo "$as_me: failed program was:" >&5
15809 cat "conftest.$ac_ext" >&5
15810 ac_cv_header_pthread_h=no
15811 fi
15812 rm -f conftest.err "conftest.$ac_ext"
15813 fi
15814 echo "$as_me:15814: result: $ac_cv_header_pthread_h" >&5
15815 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15816 if test "$ac_cv_header_pthread_h" = yes; then
15817
15818 cat >>confdefs.h <<\EOF
15819 #define HAVE_PTHREADS_H 1
15820 EOF
15821
15822 for cf_lib_pthread in pthread c_r
15823 do
15824 echo "$as_me:15824: checking if we can link with the $cf_lib_pthread library" >&5
15825 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15826 cf_save_LIBS="$LIBS"
15827
15828 cf_add_libs="$LIBS"
15829 # reverse order
15830 cf_add_0lib=
15831 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15832 # filter duplicates
15833 for cf_add_1lib in $cf_add_0lib; do
15834 for cf_add_2lib in $cf_add_libs; do
15835 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15836 cf_add_1lib=
15837 break
15838 fi
15839 done
15840 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15841 done
15842 LIBS="$cf_add_libs"
15843
15844 cat >"conftest.$ac_ext" <<_ACEOF
15845 #line 15845 "configure"
15846 #include "confdefs.h"
15847
15848 #include <pthread.h>
15849
15850 int
15851 main (void)
15852 {
15853
15854 int rc = pthread_create(0,0,0,0);
15855 int r2 = pthread_mutexattr_settype(0, 0);
15856
15857 ;
15858 return 0;
15859 }
15860 _ACEOF
15861 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15862 if { (eval echo "$as_me:15862: \"$ac_link\"") >&5
15863 (eval $ac_link) 2>&5
15864 ac_status=$?
15865 echo "$as_me:15865: \$? = $ac_status" >&5
15866 (exit "$ac_status"); } &&
15867 { ac_try='test -s "conftest$ac_exeext"'
15868 { (eval echo "$as_me:15868: \"$ac_try\"") >&5
15869 (eval $ac_try) 2>&5
15870 ac_status=$?
15871 echo "$as_me:15871: \$? = $ac_status" >&5
15872 (exit "$ac_status"); }; }; then
15873 with_pthread=yes
15874 else
15875 echo "$as_me: failed program was:" >&5
15876 cat "conftest.$ac_ext" >&5
15877 with_pthread=no
15878 fi
15879 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15880 LIBS="$cf_save_LIBS"
15881 echo "$as_me:15881: result: $with_pthread" >&5
15882 echo "${ECHO_T}$with_pthread" >&6
15883 test "$with_pthread" = yes && break
15884 done
15885
15886 if test "$with_pthread" = yes ; then
15887
15888 cf_add_libs="$LIBS"
15889 # reverse order
15890 cf_add_0lib=
15891 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15892 # filter duplicates
15893 for cf_add_1lib in $cf_add_0lib; do
15894 for cf_add_2lib in $cf_add_libs; do
15895 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15896 cf_add_1lib=
15897 break
15898 fi
15899 done
15900 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15901 done
15902 LIBS="$cf_add_libs"
15903
15904 cat >>confdefs.h <<\EOF
15905 #define HAVE_LIBPTHREADS 1
15906 EOF
15907
15908 else
15909 { { echo "$as_me:15909: error: Cannot link with pthread library" >&5
15910 echo "$as_me: error: Cannot link with pthread library" >&2;}
15911 { (exit 1); exit 1; }; }
15912 fi
15913
15914 fi
15915
15916 fi
15917
15918 if test "x$with_pthread" != xno; then
15919 echo "$as_me:15919: checking for pthread_kill" >&5
15920 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15921 if test "${ac_cv_func_pthread_kill+set}" = set; then
15922 echo $ECHO_N "(cached) $ECHO_C" >&6
15923 else
15924 cat >"conftest.$ac_ext" <<_ACEOF
15925 #line 15925 "configure"
15926 #include "confdefs.h"
15927 #define pthread_kill autoconf_temporary
15928 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15929 #undef pthread_kill
15930
15931 #ifdef __cplusplus
15932 extern "C"
15933 #endif
15934
15935 /* We use char because int might match the return type of a gcc2
15936 builtin and then its argument prototype would still apply. */
15937 char pthread_kill (void);
15938
15939 int
15940 main (void)
15941 {
15942
15943 /* The GNU C library defines stubs for functions which it implements
15944 to always fail with ENOSYS. Some functions are actually named
15945 something starting with __ and the normal name is an alias. */
15946 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15947 #error found stub for pthread_kill
15948 #endif
15949
15950 return pthread_kill ();
15951 ;
15952 return 0;
15953 }
15954 _ACEOF
15955 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15956 if { (eval echo "$as_me:15956: \"$ac_link\"") >&5
15957 (eval $ac_link) 2>&5
15958 ac_status=$?
15959 echo "$as_me:15959: \$? = $ac_status" >&5
15960 (exit "$ac_status"); } &&
15961 { ac_try='test -s "conftest$ac_exeext"'
15962 { (eval echo "$as_me:15962: \"$ac_try\"") >&5
15963 (eval $ac_try) 2>&5
15964 ac_status=$?
15965 echo "$as_me:15965: \$? = $ac_status" >&5
15966 (exit "$ac_status"); }; }; then
15967 ac_cv_func_pthread_kill=yes
15968 else
15969 echo "$as_me: failed program was:" >&5
15970 cat "conftest.$ac_ext" >&5
15971 ac_cv_func_pthread_kill=no
15972 fi
15973 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15974 fi
15975 echo "$as_me:15975: result: $ac_cv_func_pthread_kill" >&5
15976 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15977 if test "$ac_cv_func_pthread_kill" = yes; then
15978
15979 echo "$as_me:15979: checking if you want to allow EINTR in wgetch with pthreads" >&5
15980 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15981
15982 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15983 if test "${enable_pthreads_eintr+set}" = set; then
15984 enableval="$enable_pthreads_eintr"
15985 use_pthreads_eintr=$enableval
15986 else
15987 use_pthreads_eintr=no
15988 fi;
15989 echo "$as_me:15989: result: $use_pthreads_eintr" >&5
15990 echo "${ECHO_T}$use_pthreads_eintr" >&6
15991 if test "x$use_pthreads_eintr" = xyes ; then
15992
15993 cat >>confdefs.h <<\EOF
15994 #define USE_PTHREADS_EINTR 1
15995 EOF
15996
15997 fi
15998 fi
15999
16000 echo "$as_me:16000: checking if you want to use weak-symbols for pthreads" >&5
16001 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
16002
16003 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
16004 if test "${enable_weak_symbols+set}" = set; then
16005 enableval="$enable_weak_symbols"
16006 use_weak_symbols=$enableval
16007 else
16008 use_weak_symbols=no
16009 fi;
16010 echo "$as_me:16010: result: $use_weak_symbols" >&5
16011 echo "${ECHO_T}$use_weak_symbols" >&6
16012 if test "x$use_weak_symbols" = xyes ; then
16013
16014 echo "$as_me:16014: checking if $CC supports weak symbols" >&5
16015 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
16016 if test "${cf_cv_weak_symbols+set}" = set; then
16017 echo $ECHO_N "(cached) $ECHO_C" >&6
16018 else
16019
16020 cat >"conftest.$ac_ext" <<_ACEOF
16021 #line 16021 "configure"
16022 #include "confdefs.h"
16023
16024 #include <stdio.h>
16025 int
16026 main (void)
16027 {
16028
16029 #if defined(__GNUC__)
16030 # if defined __USE_ISOC99
16031 # define _cat_pragma(exp) _Pragma(#exp)
16032 # define _weak_pragma(exp) _cat_pragma(weak name)
16033 # else
16034 # define _weak_pragma(exp)
16035 # endif
16036 # define _declare(name) __extension__ extern __typeof__(name) name
16037 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
16038 #endif
16039
16040 weak_symbol(fopen);
16041
16042 ;
16043 return 0;
16044 }
16045 _ACEOF
16046 rm -f "conftest.$ac_objext"
16047 if { (eval echo "$as_me:16047: \"$ac_compile\"") >&5
16048 (eval $ac_compile) 2>&5
16049 ac_status=$?
16050 echo "$as_me:16050: \$? = $ac_status" >&5
16051 (exit "$ac_status"); } &&
16052 { ac_try='test -s "conftest.$ac_objext"'
16053 { (eval echo "$as_me:16053: \"$ac_try\"") >&5
16054 (eval $ac_try) 2>&5
16055 ac_status=$?
16056 echo "$as_me:16056: \$? = $ac_status" >&5
16057 (exit "$ac_status"); }; }; then
16058 cf_cv_weak_symbols=yes
16059 else
16060 echo "$as_me: failed program was:" >&5
16061 cat "conftest.$ac_ext" >&5
16062 cf_cv_weak_symbols=no
16063 fi
16064 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16065
16066 fi
16067 echo "$as_me:16067: result: $cf_cv_weak_symbols" >&5
16068 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16069
16070 else
16071 cf_cv_weak_symbols=no
16072 fi
16073
16074 if test "x$cf_cv_weak_symbols" = xyes ; then
16075
16076 cat >>confdefs.h <<\EOF
16077 #define USE_WEAK_SYMBOLS 1
16078 EOF
16079
16080 fi
16081 fi
16082
16083 PTHREAD=
16084 if test "x$with_pthread" = "xyes" ; then
16085
16086 cat >>confdefs.h <<\EOF
16087 #define USE_PTHREADS 1
16088 EOF
16089
16090 enable_reentrant=yes
16091 if test "x$cf_cv_weak_symbols" = xyes ; then
16092 PTHREAD=-lpthread
16093
16094 cf_add_libs="$PRIVATE_LIBS"
16095 # reverse order
16096 cf_add_0lib=
16097 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16098 # filter duplicates
16099 for cf_add_1lib in $cf_add_0lib; do
16100 for cf_add_2lib in $cf_add_libs; do
16101 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16102 cf_add_1lib=
16103 break
16104 fi
16105 done
16106 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16107 done
16108 PRIVATE_LIBS="$cf_add_libs"
16109
16110 fi
16111 fi
16112
16113 # Reentrant code has to be opaque; there's little advantage to making ncurses
16114 # opaque outside of that, so there is no --enable-opaque option. We can use
16115 # this option without --with-pthreads, but this will be always set for
16116 # pthreads.
16117 echo "$as_me:16117: checking if you want reentrant code" >&5
16118 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16119
16120 # Check whether --enable-reentrant or --disable-reentrant was given.
16121 if test "${enable_reentrant+set}" = set; then
16122 enableval="$enable_reentrant"
16123 with_reentrant=$enableval
16124 else
16125 with_reentrant=no
16126 fi;
16127 echo "$as_me:16127: result: $with_reentrant" >&5
16128 echo "${ECHO_T}$with_reentrant" >&6
16129 if test "x$with_reentrant" = xyes ; then
16130 cf_cv_enable_reentrant=1
16131 cf_cv_enable_opaque="NCURSES_INTERNALS"
16132 NCURSES_SIZE_T=int
16133 if test "x$cf_cv_weak_symbols" = xyes ; then
16134
16135 # remove pthread library from $LIBS
16136 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
16137
16138 cf_add_libs="$TEST_LIBS"
16139 # reverse order
16140 cf_add_0lib=
16141 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16142 # filter duplicates
16143 for cf_add_1lib in $cf_add_0lib; do
16144 for cf_add_2lib in $cf_add_libs; do
16145 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16146 cf_add_1lib=
16147 break
16148 fi
16149 done
16150 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16151 done
16152 TEST_LIBS="$cf_add_libs"
16153
16154 cf_add_libs="$TEST_LIBS2"
16155 # reverse order
16156 cf_add_0lib=
16157 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16158 # filter duplicates
16159 for cf_add_1lib in $cf_add_0lib; do
16160 for cf_add_2lib in $cf_add_libs; do
16161 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16162 cf_add_1lib=
16163 break
16164 fi
16165 done
16166 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16167 done
16168 TEST_LIBS2="$cf_add_libs"
16169
16170 cf_add_libs="$PRIVATE_LIBS"
16171 # reverse order
16172 cf_add_0lib=
16173 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16174 # filter duplicates
16175 for cf_add_1lib in $cf_add_0lib; do
16176 for cf_add_2lib in $cf_add_libs; do
16177 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16178 cf_add_1lib=
16179 break
16180 fi
16181 done
16182 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16183 done
16184 PRIVATE_LIBS="$cf_add_libs"
16185
16186 else
16187 # when not using weak symbols but with_reentrant,
16188 # add 't' to the library suffix on all platforms
16189 # except cygwin, where we only do that if ALSO
16190 # compiling with full thread support.
16191 case "$host" in
16192 (*cygwin* | *msys*)
16193 if test "$with_pthread" = "yes" ; then
16194 if test "x$disable_lib_suffixes" = "xno" ; then
16195 LIB_SUFFIX="t${LIB_SUFFIX}"
16196 fi
16197 fi ;;
16198 (*)
16199 if test "x$disable_lib_suffixes" = "xno" ; then
16200 LIB_SUFFIX="t${LIB_SUFFIX}"
16201 fi
16202 ;;
16203 esac
16204 fi
16205
16206 cat >>confdefs.h <<\EOF
16207 #define USE_REENTRANT 1
16208 EOF
16209
16210 if test "${with_abi_version+set}" != set; then
16211 case "$cf_cv_rel_version" in
16212 (5.*)
16213 cf_cv_rel_version=6.0
16214 cf_cv_abi_version=6
16215 cf_cv_abi_default=6
16216 { echo "$as_me:16216: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16217 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16218 ;;
16219 esac
16220 fi
16221
16222 else
16223 cf_cv_enable_reentrant=0
16224 cf_cv_enable_opaque="NCURSES_OPAQUE"
16225 NCURSES_SIZE_T=$cf_dft_ordinate_type
16226 fi
16227
16228 echo "$as_me:16228: checking whether curses library structures should be opaque" >&5
16229 echo $ECHO_N "checking whether curses library structures should be opaque... $ECHO_C" >&6
16230
16231 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16232 if test "${enable_opaque_curses+set}" = set; then
16233 enableval="$enable_opaque_curses"
16234 test "$enableval" != no && enableval=yes
16235 if test "$enableval" != "yes" ; then
16236 enable_opaque_curses=no
16237 else
16238
16239 test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16240 test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16241
16242 fi
16243 else
16244 enableval=yes
16245
16246 test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16247 test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16248
16249 fi;
16250 echo "$as_me:16250: result: $enable_opaque_curses" >&5
16251 echo "${ECHO_T}$enable_opaque_curses" >&6
16252
16253 test "$cf_cv_enable_reentrant" = 1 && \
16254 test "$enable_opaque_curses" = no && \
16255 { { echo "$as_me:16255: error: reentrant configuration requires opaque library" >&5
16256 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16257 { (exit 1); exit 1; }; }
16258
16259 echo "$as_me:16259: checking whether form library structures should be opaque" >&5
16260 echo $ECHO_N "checking whether form library structures should be opaque... $ECHO_C" >&6
16261
16262 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16263 if test "${enable_opaque_form+set}" = set; then
16264 enableval="$enable_opaque_form"
16265 test "$enableval" != no && enableval=yes
16266 if test "$enableval" != "yes" ; then
16267 enable_opaque_form=no
16268 else
16269 enable_opaque_form=$cf_dft_opaque_curses
16270 fi
16271 else
16272 enableval=yes
16273 enable_opaque_form=$cf_dft_opaque_curses
16274
16275 fi;
16276 echo "$as_me:16276: result: $enable_opaque_form" >&5
16277 echo "${ECHO_T}$enable_opaque_form" >&6
16278
16279 echo "$as_me:16279: checking whether menu library structures should be opaque" >&5
16280 echo $ECHO_N "checking whether menu library structures should be opaque... $ECHO_C" >&6
16281
16282 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16283 if test "${enable_opaque_menu+set}" = set; then
16284 enableval="$enable_opaque_menu"
16285 test "$enableval" != no && enableval=yes
16286 if test "$enableval" != "yes" ; then
16287 enable_opaque_menu=no
16288 else
16289 enable_opaque_menu=$cf_dft_opaque_curses
16290 fi
16291 else
16292 enableval=yes
16293 enable_opaque_menu=$cf_dft_opaque_curses
16294
16295 fi;
16296 echo "$as_me:16296: result: $enable_opaque_menu" >&5
16297 echo "${ECHO_T}$enable_opaque_menu" >&6
16298
16299 echo "$as_me:16299: checking whether panel library structures should be opaque" >&5
16300 echo $ECHO_N "checking whether panel library structures should be opaque... $ECHO_C" >&6
16301
16302 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16303 if test "${enable_opaque_panel+set}" = set; then
16304 enableval="$enable_opaque_panel"
16305 test "$enableval" != no && enableval=yes
16306 if test "$enableval" != "yes" ; then
16307 enable_opaque_panel=no
16308 else
16309 enable_opaque_panel=$cf_dft_opaque_curses
16310 fi
16311 else
16312 enableval=yes
16313 enable_opaque_panel=$cf_dft_opaque_curses
16314
16315 fi;
16316 echo "$as_me:16316: result: $enable_opaque_panel" >&5
16317 echo "${ECHO_T}$enable_opaque_panel" >&6
16318
16319 NCURSES_OPAQUE=0; test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16320 NCURSES_OPAQUE_FORM=0; test "$enable_opaque_form" = yes && NCURSES_OPAQUE_FORM=1
16321 NCURSES_OPAQUE_MENU=0; test "$enable_opaque_menu" = yes && NCURSES_OPAQUE_MENU=1
16322 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel" = yes && NCURSES_OPAQUE_PANEL=1
16323
16324 ### Allow using a different wrap-prefix
16325 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16326 echo "$as_me:16326: checking for prefix used to wrap public variables" >&5
16327 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16328
16329 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16330 if test "${with_wrap_prefix+set}" = set; then
16331 withval="$with_wrap_prefix"
16332 NCURSES_WRAP_PREFIX=$withval
16333 else
16334 NCURSES_WRAP_PREFIX=_nc_
16335 fi;
16336 echo "$as_me:16336: result: $NCURSES_WRAP_PREFIX" >&5
16337 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16338 else
16339 NCURSES_WRAP_PREFIX=_nc_
16340 fi
16341
16342 cat >>confdefs.h <<EOF
16343 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16344 EOF
16345
16346 ###############################################################################
16347 # These options are relatively safe to experiment with.
16348
16349 echo "$as_me:16349: checking if you want all development code" >&5
16350 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16351
16352 # Check whether --with-develop or --without-develop was given.
16353 if test "${with_develop+set}" = set; then
16354 withval="$with_develop"
16355 with_develop=$withval
16356 else
16357 with_develop=no
16358 fi;
16359 echo "$as_me:16359: result: $with_develop" >&5
16360 echo "${ECHO_T}$with_develop" >&6
16361
16362 ### use option --enable-check-size to detect screensize with CPR
16363 echo "$as_me:16363: checking if you want to check screensize of serial terminals" >&5
16364 echo $ECHO_N "checking if you want to check screensize of serial terminals... $ECHO_C" >&6
16365
16366 # Check whether --enable-check-size or --disable-check-size was given.
16367 if test "${enable_check_size+set}" = set; then
16368 enableval="$enable_check_size"
16369
16370 else
16371 enable_check_size=$with_develop
16372 fi;
16373 echo "$as_me:16373: result: $enable_check_size" >&5
16374 echo "${ECHO_T}$enable_check_size" >&6
16375 test "x$enable_check_size" = xyes &&
16376 cat >>confdefs.h <<\EOF
16377 #define USE_CHECK_SIZE 1
16378 EOF
16379
16380 ### use option --enable-hard-tabs to turn on use of hard-tabs optimize
16381 echo "$as_me:16381: checking if you want hard-tabs code" >&5
16382 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16383
16384 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16385 if test "${enable_hard_tabs+set}" = set; then
16386 enableval="$enable_hard_tabs"
16387
16388 else
16389 enable_hard_tabs=$with_develop
16390 fi;
16391 echo "$as_me:16391: result: $enable_hard_tabs" >&5
16392 echo "${ECHO_T}$enable_hard_tabs" >&6
16393 test "x$enable_hard_tabs" = xyes &&
16394 cat >>confdefs.h <<\EOF
16395 #define USE_HARD_TABS 1
16396 EOF
16397
16398 ### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16399 echo "$as_me:16399: checking if you want limited support for xmc" >&5
16400 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16401
16402 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16403 if test "${enable_xmc_glitch+set}" = set; then
16404 enableval="$enable_xmc_glitch"
16405
16406 else
16407 enable_xmc_glitch=$with_develop
16408 fi;
16409 echo "$as_me:16409: result: $enable_xmc_glitch" >&5
16410 echo "${ECHO_T}$enable_xmc_glitch" >&6
16411 test "x$enable_xmc_glitch" = xyes &&
16412 cat >>confdefs.h <<\EOF
16413 #define USE_XMC_SUPPORT 1
16414 EOF
16415
16416 ###############################################################################
16417 # These are just experimental, probably should not be in a package:
16418
16419 echo "$as_me:16419: checking if you do not want to assume colors are white-on-black" >&5
16420 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16421
16422 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16423 if test "${enable_assumed_color+set}" = set; then
16424 enableval="$enable_assumed_color"
16425 with_assumed_color=$enableval
16426 else
16427 with_assumed_color=yes
16428 fi;
16429 echo "$as_me:16429: result: $with_assumed_color" >&5
16430 echo "${ECHO_T}$with_assumed_color" >&6
16431 test "x$with_assumed_color" = xyes &&
16432 cat >>confdefs.h <<\EOF
16433 #define USE_ASSUMED_COLOR 1
16434 EOF
16435
16436 ### use option --enable-hashmap to turn on use of hashmap scrolling logic
16437 echo "$as_me:16437: checking if you want hashmap scrolling-optimization code" >&5
16438 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16439
16440 # Check whether --enable-hashmap or --disable-hashmap was given.
16441 if test "${enable_hashmap+set}" = set; then
16442 enableval="$enable_hashmap"
16443 with_hashmap=$enableval
16444 else
16445 with_hashmap=yes
16446 fi;
16447 echo "$as_me:16447: result: $with_hashmap" >&5
16448 echo "${ECHO_T}$with_hashmap" >&6
16449 test "x$with_hashmap" = xyes &&
16450 cat >>confdefs.h <<\EOF
16451 #define USE_HASHMAP 1
16452 EOF
16453
16454 ### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16455 echo "$as_me:16455: checking if you want colorfgbg code" >&5
16456 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16457
16458 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16459 if test "${enable_colorfgbg+set}" = set; then
16460 enableval="$enable_colorfgbg"
16461 with_colorfgbg=$enableval
16462 else
16463 with_colorfgbg=no
16464 fi;
16465 echo "$as_me:16465: result: $with_colorfgbg" >&5
16466 echo "${ECHO_T}$with_colorfgbg" >&6
16467 test "x$with_colorfgbg" = xyes &&
16468 cat >>confdefs.h <<\EOF
16469 #define USE_COLORFGBG 1
16470 EOF
16471
16472 ### use option --enable-fvisibility to turn on use of gcc-specific feature
16473 echo "$as_me:16473: checking if you want to use gcc -fvisibility option" >&5
16474 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16475
16476 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16477 if test "${enable_fvisibility+set}" = set; then
16478 enableval="$enable_fvisibility"
16479 cf_with_fvisibility=$enableval
16480 else
16481 cf_with_fvisibility=no
16482 fi;
16483 echo "$as_me:16483: result: $cf_with_fvisibility" >&5
16484 echo "${ECHO_T}$cf_with_fvisibility" >&6
16485
16486 NCURSES_IMPEXP=
16487 NCURSES_CXX_IMPEXP=
16488 if test "x$cf_with_fvisibility" = xyes; then
16489
16490 echo "$as_me:16490: checking if $CC -fvisibility=hidden option works" >&5
16491 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16492 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16493 echo $ECHO_N "(cached) $ECHO_C" >&6
16494 else
16495
16496 cf_save_cflags="$CFLAGS"
16497 CFLAGS="$CFLAGS -fvisibility=hidden"
16498 cat >"conftest.$ac_ext" <<_ACEOF
16499 #line 16499 "configure"
16500 #include "confdefs.h"
16501
16502 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16503
16504 int
16505 main (void)
16506 {
16507
16508 if (somefunc()) return 1;
16509
16510 ;
16511 return 0;
16512 }
16513 _ACEOF
16514 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16515 if { (eval echo "$as_me:16515: \"$ac_link\"") >&5
16516 (eval $ac_link) 2>&5
16517 ac_status=$?
16518 echo "$as_me:16518: \$? = $ac_status" >&5
16519 (exit "$ac_status"); } &&
16520 { ac_try='test -s "conftest$ac_exeext"'
16521 { (eval echo "$as_me:16521: \"$ac_try\"") >&5
16522 (eval $ac_try) 2>&5
16523 ac_status=$?
16524 echo "$as_me:16524: \$? = $ac_status" >&5
16525 (exit "$ac_status"); }; }; then
16526 cf_cv_fvisibility_hidden=yes
16527 else
16528 echo "$as_me: failed program was:" >&5
16529 cat "conftest.$ac_ext" >&5
16530 cf_cv_fvisibility_hidden=no
16531 fi
16532 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16533 CFLAGS=$cf_save_cflags
16534
16535 fi
16536 echo "$as_me:16536: result: $cf_cv_fvisibility_hidden" >&5
16537 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16538
16539 if test "x$cf_cv_fvisibility_hidden" = xyes
16540 then
16541
16542 cf_fix_cppflags=no
16543 cf_new_cflags=
16544 cf_new_cppflags=
16545 cf_new_extra_cppflags=
16546
16547 for cf_add_cflags in -fvisibility=hidden
16548 do
16549 case "$cf_fix_cppflags" in
16550 (no)
16551 case "$cf_add_cflags" in
16552 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16553 case "$cf_add_cflags" in
16554 (-D*)
16555 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16556
16557 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16558 && test -z "${cf_tst_cflags}" \
16559 && cf_fix_cppflags=yes
16560
16561 if test "$cf_fix_cppflags" = yes ; then
16562
16563 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16564 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16565
16566 continue
16567 elif test "${cf_tst_cflags}" = "\"'" ; then
16568
16569 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16570 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16571
16572 continue
16573 fi
16574 ;;
16575 esac
16576 case "$CPPFLAGS" in
16577 (*$cf_add_cflags)
16578 ;;
16579 (*)
16580 case "$cf_add_cflags" in
16581 (-D*)
16582 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16583
16584 CPPFLAGS=`echo "$CPPFLAGS" | \
16585 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16586 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16587
16588 ;;
16589 esac
16590
16591 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16592 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16593
16594 ;;
16595 esac
16596 ;;
16597 (*)
16598
16599 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16600 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16601
16602 ;;
16603 esac
16604 ;;
16605 (yes)
16606
16607 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16608 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16609
16610 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16611
16612 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16613 && test -z "${cf_tst_cflags}" \
16614 && cf_fix_cppflags=no
16615 ;;
16616 esac
16617 done
16618
16619 if test -n "$cf_new_cflags" ; then
16620
16621 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16622 CFLAGS="${CFLAGS}$cf_new_cflags"
16623
16624 fi
16625
16626 if test -n "$cf_new_cppflags" ; then
16627
16628 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16629 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16630
16631 fi
16632
16633 if test -n "$cf_new_extra_cppflags" ; then
16634
16635 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16636 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16637
16638 fi
16639
16640 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16641 fi
16642 if test -n "$CXX"
16643 then
16644 ac_ext=cc
16645 ac_cpp='$CXXCPP $CPPFLAGS'
16646 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16647 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16648 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16649 ac_main_return="return"
16650
16651 echo "$as_me:16651: checking if $CXX -fvisibility=hidden option works" >&5
16652 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16653 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16654 echo $ECHO_N "(cached) $ECHO_C" >&6
16655 else
16656
16657 cf_save_cflags="$CXXFLAGS"
16658 CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16659 cat >"conftest.$ac_ext" <<_ACEOF
16660 #line 16660 "configure"
16661 #include "confdefs.h"
16662
16663 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16664
16665 int
16666 main (void)
16667 {
16668
16669 if (somefunc()) return 1;
16670
16671 ;
16672 return 0;
16673 }
16674 _ACEOF
16675 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16676 if { (eval echo "$as_me:16676: \"$ac_link\"") >&5
16677 (eval $ac_link) 2>&5
16678 ac_status=$?
16679 echo "$as_me:16679: \$? = $ac_status" >&5
16680 (exit "$ac_status"); } &&
16681 { ac_try='test -s "conftest$ac_exeext"'
16682 { (eval echo "$as_me:16682: \"$ac_try\"") >&5
16683 (eval $ac_try) 2>&5
16684 ac_status=$?
16685 echo "$as_me:16685: \$? = $ac_status" >&5
16686 (exit "$ac_status"); }; }; then
16687 cf_cv_fvisibility_hidden2=yes
16688 else
16689 echo "$as_me: failed program was:" >&5
16690 cat "conftest.$ac_ext" >&5
16691 cf_cv_fvisibility_hidden2=no
16692 fi
16693 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16694 CXXFLAGS=$cf_save_cflags
16695
16696 fi
16697 echo "$as_me:16697: result: $cf_cv_fvisibility_hidden2" >&5
16698 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16699
16700 if test "x$cf_cv_fvisibility_hidden2" = xyes
16701 then
16702
16703 cf_save_CXXFLAGS="$CFLAGS"
16704 CFLAGS="$CXXFLAGS"
16705
16706 cf_fix_cppflags=no
16707 cf_new_cflags=
16708 cf_new_cppflags=
16709 cf_new_extra_cppflags=
16710
16711 for cf_add_cflags in -fvisibility=hidden
16712 do
16713 case "$cf_fix_cppflags" in
16714 (no)
16715 case "$cf_add_cflags" in
16716 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16717 case "$cf_add_cflags" in
16718 (-D*)
16719 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16720
16721 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16722 && test -z "${cf_tst_cflags}" \
16723 && cf_fix_cppflags=yes
16724
16725 if test "$cf_fix_cppflags" = yes ; then
16726
16727 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16728 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16729
16730 continue
16731 elif test "${cf_tst_cflags}" = "\"'" ; then
16732
16733 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16734 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16735
16736 continue
16737 fi
16738 ;;
16739 esac
16740 case "$CPPFLAGS" in
16741 (*$cf_add_cflags)
16742 ;;
16743 (*)
16744 case "$cf_add_cflags" in
16745 (-D*)
16746 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16747
16748 CPPFLAGS=`echo "$CPPFLAGS" | \
16749 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16750 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16751
16752 ;;
16753 esac
16754
16755 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16756 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16757
16758 ;;
16759 esac
16760 ;;
16761 (*)
16762
16763 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16764 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16765
16766 ;;
16767 esac
16768 ;;
16769 (yes)
16770
16771 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16772 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16773
16774 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16775
16776 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16777 && test -z "${cf_tst_cflags}" \
16778 && cf_fix_cppflags=no
16779 ;;
16780 esac
16781 done
16782
16783 if test -n "$cf_new_cflags" ; then
16784
16785 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16786 CFLAGS="${CFLAGS}$cf_new_cflags"
16787
16788 fi
16789
16790 if test -n "$cf_new_cppflags" ; then
16791
16792 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16793 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16794
16795 fi
16796
16797 if test -n "$cf_new_extra_cppflags" ; then
16798
16799 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16800 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16801
16802 fi
16803
16804 CXXFLAGS="$CFLAGS"
16805 CFLAGS="$cf_save_CXXFLAGS"
16806
16807 NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16808 fi
16809 ac_ext=c
16810 ac_cpp='$CPP $CPPFLAGS'
16811 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16812 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16813 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16814 ac_main_return="return"
16815
16816 fi
16817 fi
16818
16819 ### use option --enable-interop to turn on use of bindings used for interop
16820 echo "$as_me:16820: checking if you want interop bindings" >&5
16821 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16822
16823 # Check whether --enable-interop or --disable-interop was given.
16824 if test "${enable_interop+set}" = set; then
16825 enableval="$enable_interop"
16826 with_exp_interop=$enableval
16827 else
16828 with_exp_interop=$cf_dft_interop
16829 fi;
16830 echo "$as_me:16830: result: $with_exp_interop" >&5
16831 echo "${ECHO_T}$with_exp_interop" >&6
16832
16833 NCURSES_INTEROP_FUNCS=0
16834 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16835
16836 echo "$as_me:16836: checking if you want experimental safe-sprintf code" >&5
16837 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16838
16839 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16840 if test "${enable_safe_sprintf+set}" = set; then
16841 enableval="$enable_safe_sprintf"
16842 with_safe_sprintf=$enableval
16843 else
16844 with_safe_sprintf=no
16845 fi;
16846 echo "$as_me:16846: result: $with_safe_sprintf" >&5
16847 echo "${ECHO_T}$with_safe_sprintf" >&6
16848
16849 ### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16850 # when hashmap is used scroll hints are useless
16851 if test "$with_hashmap" = no ; then
16852 echo "$as_me:16852: checking if you want to experiment without scrolling-hints code" >&5
16853 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16854
16855 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16856 if test "${enable_scroll_hints+set}" = set; then
16857 enableval="$enable_scroll_hints"
16858 with_scroll_hints=$enableval
16859 else
16860 with_scroll_hints=yes
16861 fi;
16862 echo "$as_me:16862: result: $with_scroll_hints" >&5
16863 echo "${ECHO_T}$with_scroll_hints" >&6
16864 test "x$with_scroll_hints" = xyes &&
16865 cat >>confdefs.h <<\EOF
16866 #define USE_SCROLL_HINTS 1
16867 EOF
16868
16869 fi
16870
16871 case x$cf_cv_abi_default in
16872 (x[789])
16873 NCURSES_WGETCH_EVENTS=0
16874 ;;
16875 (*)
16876 echo "$as_me:16876: checking if you want wgetch-events code" >&5
16877 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16878
16879 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16880 if test "${enable_wgetch_events+set}" = set; then
16881 enableval="$enable_wgetch_events"
16882 with_wgetch_events=$enableval
16883 else
16884 with_wgetch_events=no
16885 fi;
16886 echo "$as_me:16886: result: $with_wgetch_events" >&5
16887 echo "${ECHO_T}$with_wgetch_events" >&6
16888 if test "x$with_wgetch_events" = xyes ; then
16889
16890 cat >>confdefs.h <<\EOF
16891 #define NCURSES_WGETCH_EVENTS 1
16892 EOF
16893
16894 NCURSES_WGETCH_EVENTS=1
16895 else
16896 NCURSES_WGETCH_EVENTS=0
16897 fi
16898 esac
16899
16900 case "$cf_cv_system_name" in
16901 (*mingw32*|*mingw64*|*-msvc*)
16902
16903 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16904 if test "${enable_exp_win32+set}" = set; then
16905 enableval="$enable_exp_win32"
16906 { echo "$as_me:16906: WARNING: The --enable-exp-win32 option is obsolete" >&5
16907 echo "$as_me: WARNING: The --enable-exp-win32 option is obsolete" >&2;}
16908 fi;
16909 ;;
16910 esac
16911
16912 ###############################################################################
16913
16914 ### use option --disable-echo to suppress full display compiling commands
16915
16916 echo "$as_me:16916: checking if you want to see long compiling messages" >&5
16917 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16918
16919 # Check whether --enable-echo or --disable-echo was given.
16920 if test "${enable_echo+set}" = set; then
16921 enableval="$enable_echo"
16922 test "$enableval" != no && enableval=yes
16923 if test "$enableval" != "yes" ; then
16924
16925 ECHO_LT='--silent'
16926 ECHO_LD='@echo linking $@;'
16927 RULE_CC='@echo compiling $<'
16928 SHOW_CC='@echo compiling $@'
16929 ECHO_CC='@'
16930
16931 else
16932
16933 ECHO_LT=''
16934 ECHO_LD=''
16935 RULE_CC=''
16936 SHOW_CC=''
16937 ECHO_CC=''
16938
16939 fi
16940 else
16941 enableval=yes
16942
16943 ECHO_LT=''
16944 ECHO_LD=''
16945 RULE_CC=''
16946 SHOW_CC=''
16947 ECHO_CC=''
16948
16949 fi;
16950 echo "$as_me:16950: result: $enableval" >&5
16951 echo "${ECHO_T}$enableval" >&6
16952
16953 if test "x$enable_echo" = xyes; then
16954 ECHO_LINK=
16955 else
16956 ECHO_LINK='@ echo linking $@ ... ;'
16957 test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16958 test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16959 fi
16960
16961 # --disable-stripping is used for debugging
16962
16963 echo "$as_me:16963: checking if you want to install stripped executables" >&5
16964 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16965
16966 # Check whether --enable-stripping or --disable-stripping was given.
16967 if test "${enable_stripping+set}" = set; then
16968 enableval="$enable_stripping"
16969 test "$enableval" != no && enableval=yes
16970 if test "$enableval" != "yes" ; then
16971 enable_stripping=no
16972 else
16973 enable_stripping=yes
16974 fi
16975 else
16976 enableval=yes
16977 enable_stripping=yes
16978
16979 fi;
16980 echo "$as_me:16980: result: $enable_stripping" >&5
16981 echo "${ECHO_T}$enable_stripping" >&6
16982
16983 if test "$enable_stripping" = yes
16984 then
16985 INSTALL_OPT_S="-s"
16986 else
16987 INSTALL_OPT_S=
16988 fi
16989
16990 : "${INSTALL:=install}"
16991 echo "$as_me:16991: checking if install accepts -p option" >&5
16992 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16993 if test "${cf_cv_install_p+set}" = set; then
16994 echo $ECHO_N "(cached) $ECHO_C" >&6
16995 else
16996
16997 rm -rf ./conftest*
16998 date >conftest.in
16999 mkdir conftest.out
17000 sleep 3
17001 if $INSTALL -p conftest.in conftest.out 2>/dev/null
17002 then
17003 if test -f conftest.out/conftest.in
17004 then
17005 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
17006 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
17007 if test -s conftest.err
17008 then
17009 cf_cv_install_p=no
17010 else
17011 cf_cv_install_p=yes
17012 fi
17013 else
17014 cf_cv_install_p=no
17015 fi
17016 else
17017 cf_cv_install_p=no
17018 fi
17019 rm -rf ./conftest*
17020
17021 fi
17022 echo "$as_me:17022: result: $cf_cv_install_p" >&5
17023 echo "${ECHO_T}$cf_cv_install_p" >&6
17024
17025 echo "$as_me:17025: checking if install needs to be told about ownership" >&5
17026 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
17027 case `$ac_config_guess` in
17028 (*minix)
17029 with_install_o=yes
17030 ;;
17031 (*)
17032 with_install_o=no
17033 ;;
17034 esac
17035
17036 echo "$as_me:17036: result: $with_install_o" >&5
17037 echo "${ECHO_T}$with_install_o" >&6
17038 if test "x$with_install_o" = xyes
17039 then
17040 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'`"
17041 else
17042 INSTALL_OPT_O=
17043 fi
17044
17045 if test -n "$INSTALL_OPT_S"
17046 then
17047 echo "$as_me:17047: checking if you want to specify strip-program" >&5
17048 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
17049
17050 # Check whether --with-strip-program or --without-strip-program was given.
17051 if test "${with_strip_program+set}" = set; then
17052 withval="$with_strip_program"
17053 with_strip_program=$withval
17054 else
17055 with_strip_program=no
17056 fi;
17057 echo "$as_me:17057: result: $with_strip_program" >&5
17058 echo "${ECHO_T}$with_strip_program" >&6
17059 if test "$with_strip_program" != no
17060 then
17061 echo "$as_me:17061: checking if strip-program is supported with this installer" >&5
17062 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
17063 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
17064 check_install_strip=no
17065 if test -f "$cf_install_program"
17066 then
17067 check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
17068 if test -n "$check_install_version"
17069 then
17070 check_install_strip="option"
17071 else
17072 for check_strip_variable in STRIPBIN STRIP
17073 do
17074 if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
17075 then
17076 check_install_strip="environ"
17077 break
17078 fi
17079 done
17080 fi
17081 fi
17082 echo "$as_me:17082: result: $check_install_strip" >&5
17083 echo "${ECHO_T}$check_install_strip" >&6
17084 case "$check_install_strip" in
17085 (no)
17086 { echo "$as_me:17086: WARNING: $cf_install_program does not support strip program option" >&5
17087 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
17088 with_strip_program=no
17089 ;;
17090 (environ)
17091 cat >install.tmp <<-CF_EOF
17092 #! $SHELL
17093 STRIPBIN="$with_strip_program" \\
17094 STRIP="$with_strip_program" \\
17095 $INSTALL "$@"
17096 CF_EOF
17097 INSTALL="`pwd`/install.tmp"
17098 chmod +x "$INSTALL"
17099 test -n "$verbose" && echo " created $INSTALL" 1>&6
17100
17101 echo "${as_me:-configure}:17101: testing created $INSTALL ..." 1>&5
17102
17103 ;;
17104 (option)
17105 INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
17106 ;;
17107 esac
17108 fi
17109 fi
17110
17111 # If we're avoiding relinking of shared libraries during install, that is to
17112 # avoid modifying the build-tree. For the same reason, avoid doing ranlib if
17113 # the install program has "-p" (for preserving timestamps).
17114 cf_cv_do_reranlib=yes
17115 if test "x$cf_cv_install_p" = xyes
17116 then
17117 if test "x$cf_cv_do_relink" != xyes
17118 then
17119 cf_cv_do_reranlib=no
17120 INSTALL_OPT_P="-p"
17121 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17122 fi
17123 fi
17124
17125 ### use option --enable-warnings to turn on all gcc warnings
17126
17127 echo "$as_me:17127: checking if you want to use C11 _Noreturn feature" >&5
17128 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17129
17130 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17131 if test "${enable_stdnoreturn+set}" = set; then
17132 enableval="$enable_stdnoreturn"
17133 test "$enableval" != yes && enableval=no
17134 if test "$enableval" != "no" ; then
17135 enable_stdnoreturn=yes
17136 else
17137 enable_stdnoreturn=no
17138 fi
17139 else
17140 enableval=no
17141 enable_stdnoreturn=no
17142
17143 fi;
17144 echo "$as_me:17144: result: $enable_stdnoreturn" >&5
17145 echo "${ECHO_T}$enable_stdnoreturn" >&6
17146
17147 if test $enable_stdnoreturn = yes; then
17148 echo "$as_me:17148: checking for C11 _Noreturn feature" >&5
17149 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17150 if test "${cf_cv_c11_noreturn+set}" = set; then
17151 echo $ECHO_N "(cached) $ECHO_C" >&6
17152 else
17153 cat >"conftest.$ac_ext" <<_ACEOF
17154 #line 17154 "configure"
17155 #include "confdefs.h"
17156
17157 $ac_includes_default
17158 #include <stdnoreturn.h>
17159 static _Noreturn void giveup(void) { exit(0); }
17160
17161 int
17162 main (void)
17163 {
17164 if (feof(stdin)) giveup()
17165 ;
17166 return 0;
17167 }
17168 _ACEOF
17169 rm -f "conftest.$ac_objext"
17170 if { (eval echo "$as_me:17170: \"$ac_compile\"") >&5
17171 (eval $ac_compile) 2>&5
17172 ac_status=$?
17173 echo "$as_me:17173: \$? = $ac_status" >&5
17174 (exit "$ac_status"); } &&
17175 { ac_try='test -s "conftest.$ac_objext"'
17176 { (eval echo "$as_me:17176: \"$ac_try\"") >&5
17177 (eval $ac_try) 2>&5
17178 ac_status=$?
17179 echo "$as_me:17179: \$? = $ac_status" >&5
17180 (exit "$ac_status"); }; }; then
17181 cf_cv_c11_noreturn=yes
17182 else
17183 echo "$as_me: failed program was:" >&5
17184 cat "conftest.$ac_ext" >&5
17185 cf_cv_c11_noreturn=no
17186 fi
17187 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17188
17189 fi
17190 echo "$as_me:17190: result: $cf_cv_c11_noreturn" >&5
17191 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17192 else
17193 cf_cv_c11_noreturn=no,
17194 fi
17195
17196 if test "$cf_cv_c11_noreturn" = yes; then
17197
17198 cat >>confdefs.h <<\EOF
17199 #define HAVE_STDNORETURN_H 1
17200 EOF
17201
17202 cat >>confdefs.h <<EOF
17203 #define STDC_NORETURN _Noreturn
17204 EOF
17205
17206 HAVE_STDNORETURN_H=1
17207 else
17208 HAVE_STDNORETURN_H=0
17209 fi
17210
17211 if test "$GCC" = yes || test "$GXX" = yes
17212 then
17213
17214 if test "$GCC" = yes || test "$GXX" = yes
17215 then
17216 case $CFLAGS in
17217 (*-Werror=*)
17218 cf_temp_flags=
17219 for cf_temp_scan in $CFLAGS
17220 do
17221 case "x$cf_temp_scan" in
17222 (x-Werror=format*)
17223
17224 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17225 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17226
17227 ;;
17228 (x-Werror=*)
17229
17230 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17231 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17232
17233 ;;
17234 (*)
17235
17236 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17237 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17238
17239 ;;
17240 esac
17241 done
17242 if test "x$CFLAGS" != "x$cf_temp_flags"
17243 then
17244 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
17245
17246 echo "${as_me:-configure}:17246: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17247
17248 CFLAGS="$cf_temp_flags"
17249 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
17250
17251 echo "${as_me:-configure}:17251: testing ... fixed $CFLAGS ..." 1>&5
17252
17253 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
17254
17255 echo "${as_me:-configure}:17255: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17256
17257 fi
17258 ;;
17259 esac
17260 fi
17261
17262 if test "$GCC" = yes || test "$GXX" = yes
17263 then
17264 case $CPPFLAGS in
17265 (*-Werror=*)
17266 cf_temp_flags=
17267 for cf_temp_scan in $CPPFLAGS
17268 do
17269 case "x$cf_temp_scan" in
17270 (x-Werror=format*)
17271
17272 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17273 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17274
17275 ;;
17276 (x-Werror=*)
17277
17278 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17279 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17280
17281 ;;
17282 (*)
17283
17284 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17285 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17286
17287 ;;
17288 esac
17289 done
17290 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17291 then
17292 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
17293
17294 echo "${as_me:-configure}:17294: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17295
17296 CPPFLAGS="$cf_temp_flags"
17297 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
17298
17299 echo "${as_me:-configure}:17299: testing ... fixed $CPPFLAGS ..." 1>&5
17300
17301 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
17302
17303 echo "${as_me:-configure}:17303: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17304
17305 fi
17306 ;;
17307 esac
17308 fi
17309
17310 if test "$GCC" = yes || test "$GXX" = yes
17311 then
17312 case $LDFLAGS in
17313 (*-Werror=*)
17314 cf_temp_flags=
17315 for cf_temp_scan in $LDFLAGS
17316 do
17317 case "x$cf_temp_scan" in
17318 (x-Werror=format*)
17319
17320 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17321 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17322
17323 ;;
17324 (x-Werror=*)
17325
17326 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17327 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17328
17329 ;;
17330 (*)
17331
17332 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17333 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17334
17335 ;;
17336 esac
17337 done
17338 if test "x$LDFLAGS" != "x$cf_temp_flags"
17339 then
17340 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
17341
17342 echo "${as_me:-configure}:17342: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17343
17344 LDFLAGS="$cf_temp_flags"
17345 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
17346
17347 echo "${as_me:-configure}:17347: testing ... fixed $LDFLAGS ..." 1>&5
17348
17349 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
17350
17351 echo "${as_me:-configure}:17351: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17352
17353 fi
17354 ;;
17355 esac
17356 fi
17357
17358 echo "$as_me:17358: checking if you want to turn on gcc warnings" >&5
17359 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17360
17361 # Check whether --enable-warnings or --disable-warnings was given.
17362 if test "${enable_warnings+set}" = set; then
17363 enableval="$enable_warnings"
17364 test "$enableval" != yes && enableval=no
17365 if test "$enableval" != "no" ; then
17366 enable_warnings=yes
17367 else
17368 enable_warnings=no
17369 fi
17370 else
17371 enableval=no
17372 enable_warnings=no
17373
17374 fi;
17375 echo "$as_me:17375: result: $enable_warnings" >&5
17376 echo "${ECHO_T}$enable_warnings" >&6
17377 if test "$enable_warnings" = "yes"
17378 then
17379
17380 if test "x$have_x" = xyes; then
17381
17382 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17383 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17384 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17385 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17386 for cf_X_CFLAGS in $X_CFLAGS
17387 do
17388 case "x$cf_X_CFLAGS" in
17389 x-[IUD]*)
17390 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17391 ;;
17392 *)
17393 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17394 ;;
17395 esac
17396 done
17397
17398 cat >"conftest.$ac_ext" <<_ACEOF
17399 #line 17399 "configure"
17400 #include "confdefs.h"
17401
17402 $ac_includes_default
17403 #include <X11/Intrinsic.h>
17404
17405 int
17406 main (void)
17407 {
17408 String foo = malloc(1); free((void*)foo)
17409 ;
17410 return 0;
17411 }
17412 _ACEOF
17413 rm -f "conftest.$ac_objext"
17414 if { (eval echo "$as_me:17414: \"$ac_compile\"") >&5
17415 (eval $ac_compile) 2>&5
17416 ac_status=$?
17417 echo "$as_me:17417: \$? = $ac_status" >&5
17418 (exit "$ac_status"); } &&
17419 { ac_try='test -s "conftest.$ac_objext"'
17420 { (eval echo "$as_me:17420: \"$ac_try\"") >&5
17421 (eval $ac_try) 2>&5
17422 ac_status=$?
17423 echo "$as_me:17423: \$? = $ac_status" >&5
17424 (exit "$ac_status"); }; }; then
17425
17426 echo "$as_me:17426: checking for X11/Xt const-feature" >&5
17427 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17428 if test "${cf_cv_const_x_string+set}" = set; then
17429 echo $ECHO_N "(cached) $ECHO_C" >&6
17430 else
17431
17432 cat >"conftest.$ac_ext" <<_ACEOF
17433 #line 17433 "configure"
17434 #include "confdefs.h"
17435
17436 #undef _CONST_X_STRING
17437 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17438 #undef XTSTRINGDEFINES /* X11R5 and later */
17439 $ac_includes_default
17440 #include <X11/Intrinsic.h>
17441
17442 int
17443 main (void)
17444 {
17445 String foo = malloc(1); *foo = 0
17446 ;
17447 return 0;
17448 }
17449 _ACEOF
17450 rm -f "conftest.$ac_objext"
17451 if { (eval echo "$as_me:17451: \"$ac_compile\"") >&5
17452 (eval $ac_compile) 2>&5
17453 ac_status=$?
17454 echo "$as_me:17454: \$? = $ac_status" >&5
17455 (exit "$ac_status"); } &&
17456 { ac_try='test -s "conftest.$ac_objext"'
17457 { (eval echo "$as_me:17457: \"$ac_try\"") >&5
17458 (eval $ac_try) 2>&5
17459 ac_status=$?
17460 echo "$as_me:17460: \$? = $ac_status" >&5
17461 (exit "$ac_status"); }; }; then
17462
17463 cf_cv_const_x_string=no
17464
17465 else
17466 echo "$as_me: failed program was:" >&5
17467 cat "conftest.$ac_ext" >&5
17468
17469 cf_cv_const_x_string=yes
17470
17471 fi
17472 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17473
17474 fi
17475 echo "$as_me:17475: result: $cf_cv_const_x_string" >&5
17476 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17477
17478 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17479 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17480 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17481
17482 case "$cf_cv_const_x_string" in
17483 (no)
17484
17485 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17486 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17487
17488 ;;
17489 (*)
17490
17491 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17492 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17493
17494 ;;
17495 esac
17496
17497 else
17498 echo "$as_me: failed program was:" >&5
17499 cat "conftest.$ac_ext" >&5
17500 fi
17501 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17502 fi
17503 cat > "conftest.$ac_ext" <<EOF
17504 #line 17504 "${as_me:-configure}"
17505 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17506 EOF
17507 if test "$INTEL_COMPILER" = yes
17508 then
17509 # The "-wdXXX" options suppress warnings:
17510 # remark #1419: external declaration in primary source file
17511 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17512 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17513 # remark #193: zero used for undefined preprocessing identifier
17514 # remark #593: variable "curs_sb_left_arrow" was set but never used
17515 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17516 # remark #869: parameter "tw" was never referenced
17517 # remark #981: operands are evaluated in unspecified order
17518 # warning #279: controlling expression is constant
17519
17520 echo "$as_me:17520: checking for $CC warning options" >&5
17521 echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
17522 test -n "$verbose" && echo "$as_me:17522: result: " >&5
17523 echo "${ECHO_T}" >&6
17524 cf_save_CFLAGS="$CFLAGS"
17525 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17526 for cf_opt in \
17527 wd1419 \
17528 wd1683 \
17529 wd1684 \
17530 wd193 \
17531 wd593 \
17532 wd279 \
17533 wd810 \
17534 wd869 \
17535 wd981
17536 do
17537 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17538 if { (eval echo "$as_me:17538: \"$ac_compile\"") >&5
17539 (eval $ac_compile) 2>&5
17540 ac_status=$?
17541 echo "$as_me:17541: \$? = $ac_status" >&5
17542 (exit "$ac_status"); }; then
17543 test -n "$verbose" && echo "$as_me:17543: result: ... -$cf_opt" >&5
17544 echo "${ECHO_T}... -$cf_opt" >&6
17545 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17546 fi
17547 done
17548 CFLAGS="$cf_save_CFLAGS"
17549 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17550 then
17551 echo "$as_me:17551: checking for $CC warning options" >&5
17552 echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
17553 test -n "$verbose" && echo "$as_me:17553: result: " >&5
17554 echo "${ECHO_T}" >&6
17555 cf_save_CFLAGS="$CFLAGS"
17556 cf_warn_CONST=""
17557 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17558 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17559 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17560 for cf_opt in W Wall \
17561 Wbad-function-cast \
17562 Wcast-align \
17563 Wcast-qual \
17564 Wdeclaration-after-statement \
17565 Wextra \
17566 Winline \
17567 Wmissing-declarations \
17568 Wmissing-prototypes \
17569 Wnested-externs \
17570 Wpointer-arith \
17571 Wshadow \
17572 Wstrict-prototypes \
17573 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17574 do
17575 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17576 if { (eval echo "$as_me:17576: \"$ac_compile\"") >&5
17577 (eval $ac_compile) 2>&5
17578 ac_status=$?
17579 echo "$as_me:17579: \$? = $ac_status" >&5
17580 (exit "$ac_status"); }; then
17581 test -n "$verbose" && echo "$as_me:17581: result: ... -$cf_opt" >&5
17582 echo "${ECHO_T}... -$cf_opt" >&6
17583 case "$cf_opt" in
17584 (Winline)
17585 case "$GCC_VERSION" in
17586 ([34].*)
17587 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17588
17589 echo "${as_me:-configure}:17589: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17590
17591 continue;;
17592 esac
17593 ;;
17594 (Wpointer-arith)
17595 case "$GCC_VERSION" in
17596 ([12].*)
17597 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17598
17599 echo "${as_me:-configure}:17599: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17600
17601 continue;;
17602 esac
17603 ;;
17604 esac
17605 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17606 fi
17607 done
17608 CFLAGS="$cf_save_CFLAGS"
17609 fi
17610 rm -rf ./conftest*
17611
17612 fi
17613
17614 if test "$GCC" = yes || test "$GXX" = yes
17615 then
17616 cat > conftest.i <<EOF
17617 #ifndef GCC_PRINTF
17618 #define GCC_PRINTF 0
17619 #endif
17620 #ifndef GCC_SCANF
17621 #define GCC_SCANF 0
17622 #endif
17623 #ifndef GCC_NORETURN
17624 #define GCC_NORETURN /* nothing */
17625 #endif
17626 #ifndef GCC_UNUSED
17627 #define GCC_UNUSED /* nothing */
17628 #endif
17629 EOF
17630 if test "$GCC" = yes
17631 then
17632 echo "$as_me:17632: checking for $CC __attribute__ directives" >&5
17633 echo $ECHO_N "checking for $CC __attribute__ directives... $ECHO_C" >&6
17634 test -n "$verbose" && echo "$as_me:17634: result: " >&5
17635 echo "${ECHO_T}" >&6
17636 cat > "conftest.$ac_ext" <<EOF
17637 #line 17637 "${as_me:-configure}"
17638 #include <stdio.h>
17639 #include "confdefs.h"
17640 #include "conftest.h"
17641 #include "conftest.i"
17642 #if GCC_PRINTF
17643 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17644 #else
17645 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17646 #endif
17647 #if GCC_SCANF
17648 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
17649 #else
17650 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
17651 #endif
17652 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17653 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17654 extern GCC_NORETURN void foo(void);
17655 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17656 EOF
17657 cf_printf_attribute=no
17658 cf_scanf_attribute=no
17659 for cf_attribute in scanf printf unused noreturn
17660 do
17661
17662 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17663
17664 cf_directive="__attribute__(($cf_attribute))"
17665 echo "checking for $CC $cf_directive" 1>&5
17666
17667 case "$cf_attribute" in
17668 (printf)
17669 cf_printf_attribute=yes
17670 cat >conftest.h <<EOF
17671 #define GCC_$cf_ATTRIBUTE 1
17672 EOF
17673 ;;
17674 (scanf)
17675 cf_scanf_attribute=yes
17676 cat >conftest.h <<EOF
17677 #define GCC_$cf_ATTRIBUTE 1
17678 EOF
17679 ;;
17680 (*)
17681 cat >conftest.h <<EOF
17682 #define GCC_$cf_ATTRIBUTE $cf_directive
17683 EOF
17684 ;;
17685 esac
17686
17687 if { (eval echo "$as_me:17687: \"$ac_compile\"") >&5
17688 (eval $ac_compile) 2>&5
17689 ac_status=$?
17690 echo "$as_me:17690: \$? = $ac_status" >&5
17691 (exit "$ac_status"); }; then
17692 test -n "$verbose" && echo "$as_me:17692: result: ... $cf_attribute" >&5
17693 echo "${ECHO_T}... $cf_attribute" >&6
17694 cat conftest.h >>confdefs.h
17695 case "$cf_attribute" in
17696 (noreturn)
17697
17698 cat >>confdefs.h <<EOF
17699 #define GCC_NORETURN $cf_directive
17700 EOF
17701
17702 ;;
17703 (printf)
17704 cf_value='/* nothing */'
17705 if test "$cf_printf_attribute" != no ; then
17706 cf_value='__attribute__((format(printf,fmt,var)))'
17707
17708 cat >>confdefs.h <<\EOF
17709 #define GCC_PRINTF 1
17710 EOF
17711
17712 fi
17713
17714 cat >>confdefs.h <<EOF
17715 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17716 EOF
17717
17718 ;;
17719 (scanf)
17720 cf_value='/* nothing */'
17721 if test "$cf_scanf_attribute" != no ; then
17722 cf_value='__attribute__((format(scanf,fmt,var)))'
17723
17724 cat >>confdefs.h <<\EOF
17725 #define GCC_SCANF 1
17726 EOF
17727
17728 fi
17729
17730 cat >>confdefs.h <<EOF
17731 #define GCC_SCANFLIKE(fmt,var) $cf_value
17732 EOF
17733
17734 ;;
17735 (unused)
17736
17737 cat >>confdefs.h <<EOF
17738 #define GCC_UNUSED $cf_directive
17739 EOF
17740
17741 ;;
17742 esac
17743 fi
17744 done
17745 else
17746 ${FGREP-fgrep} define conftest.i >>confdefs.h
17747 fi
17748 rm -rf ./conftest*
17749 fi
17750
17751 fi
17752
17753 if test "x$enable_warnings" = "xyes"; then
17754
17755 ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17756
17757 if test "x$cf_with_cxx" = xyes ; then
17758
17759 INTEL_CPLUSPLUS=no
17760
17761 if test "$GCC" = yes ; then
17762 case "$host_os" in
17763 (linux*|gnu*)
17764 echo "$as_me:17764: checking if this is really Intel C++ compiler" >&5
17765 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17766 cf_save_CFLAGS="$CXXFLAGS"
17767 CXXFLAGS="$CXXFLAGS -no-gcc"
17768 cat >"conftest.$ac_ext" <<_ACEOF
17769 #line 17769 "configure"
17770 #include "confdefs.h"
17771
17772 int
17773 main (void)
17774 {
17775
17776 #ifdef __INTEL_COMPILER
17777 #else
17778 #error __INTEL_COMPILER is not defined
17779 #endif
17780
17781 ;
17782 return 0;
17783 }
17784 _ACEOF
17785 rm -f "conftest.$ac_objext"
17786 if { (eval echo "$as_me:17786: \"$ac_compile\"") >&5
17787 (eval $ac_compile) 2>&5
17788 ac_status=$?
17789 echo "$as_me:17789: \$? = $ac_status" >&5
17790 (exit "$ac_status"); } &&
17791 { ac_try='test -s "conftest.$ac_objext"'
17792 { (eval echo "$as_me:17792: \"$ac_try\"") >&5
17793 (eval $ac_try) 2>&5
17794 ac_status=$?
17795 echo "$as_me:17795: \$? = $ac_status" >&5
17796 (exit "$ac_status"); }; }; then
17797 INTEL_CPLUSPLUS=yes
17798 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17799
17800 else
17801 echo "$as_me: failed program was:" >&5
17802 cat "conftest.$ac_ext" >&5
17803 fi
17804 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17805 CXXFLAGS="$cf_save_CFLAGS"
17806 echo "$as_me:17806: result: $INTEL_CPLUSPLUS" >&5
17807 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17808 ;;
17809 esac
17810 fi
17811
17812 CLANG_CPLUSPLUS=no
17813
17814 if test "$GCC" = yes ; then
17815 echo "$as_me:17815: checking if this is really Clang C++ compiler" >&5
17816 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17817 cf_save_CFLAGS="$CXXFLAGS"
17818 cat >"conftest.$ac_ext" <<_ACEOF
17819 #line 17819 "configure"
17820 #include "confdefs.h"
17821
17822 int
17823 main (void)
17824 {
17825
17826 #ifdef __clang__
17827 #else
17828 #error __clang__ is not defined
17829 #endif
17830
17831 ;
17832 return 0;
17833 }
17834 _ACEOF
17835 rm -f "conftest.$ac_objext"
17836 if { (eval echo "$as_me:17836: \"$ac_compile\"") >&5
17837 (eval $ac_compile) 2>&5
17838 ac_status=$?
17839 echo "$as_me:17839: \$? = $ac_status" >&5
17840 (exit "$ac_status"); } &&
17841 { ac_try='test -s "conftest.$ac_objext"'
17842 { (eval echo "$as_me:17842: \"$ac_try\"") >&5
17843 (eval $ac_try) 2>&5
17844 ac_status=$?
17845 echo "$as_me:17845: \$? = $ac_status" >&5
17846 (exit "$ac_status"); }; }; then
17847 CLANG_CPLUSPLUS=yes
17848
17849 else
17850 echo "$as_me: failed program was:" >&5
17851 cat "conftest.$ac_ext" >&5
17852 fi
17853 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17854 CXXFLAGS="$cf_save_CFLAGS"
17855 echo "$as_me:17855: result: $CLANG_CPLUSPLUS" >&5
17856 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17857 fi
17858
17859 CLANG_VERSION=none
17860
17861 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17862 case "$CC" in
17863 (c[1-9][0-9]|*/c[1-9][0-9])
17864 { echo "$as_me:17864: WARNING: replacing broken compiler alias $CC" >&5
17865 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17866 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17867 CC=clang
17868 ;;
17869 esac
17870
17871 echo "$as_me:17871: checking version of $CC" >&5
17872 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17873 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.].*//'`"
17874 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17875 echo "$as_me:17875: result: $CLANG_VERSION" >&5
17876 echo "${ECHO_T}$CLANG_VERSION" >&6
17877
17878 for cf_clang_opt in \
17879 -Qunused-arguments \
17880 -Wno-error=implicit-function-declaration
17881 do
17882 echo "$as_me:17882: checking if option $cf_clang_opt works" >&5
17883 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17884 cf_save_CFLAGS="$CFLAGS"
17885 CFLAGS="$CFLAGS $cf_clang_opt"
17886 cat >"conftest.$ac_ext" <<_ACEOF
17887 #line 17887 "configure"
17888 #include "confdefs.h"
17889
17890 #include <stdio.h>
17891 int
17892 main (void)
17893 {
17894
17895 printf("hello!\\n");
17896 ;
17897 return 0;
17898 }
17899 _ACEOF
17900 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17901 if { (eval echo "$as_me:17901: \"$ac_link\"") >&5
17902 (eval $ac_link) 2>&5
17903 ac_status=$?
17904 echo "$as_me:17904: \$? = $ac_status" >&5
17905 (exit "$ac_status"); } &&
17906 { ac_try='test -s "conftest$ac_exeext"'
17907 { (eval echo "$as_me:17907: \"$ac_try\"") >&5
17908 (eval $ac_try) 2>&5
17909 ac_status=$?
17910 echo "$as_me:17910: \$? = $ac_status" >&5
17911 (exit "$ac_status"); }; }; then
17912
17913 cf_clang_optok=yes
17914 else
17915 echo "$as_me: failed program was:" >&5
17916 cat "conftest.$ac_ext" >&5
17917
17918 cf_clang_optok=no
17919 fi
17920 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17921 echo "$as_me:17921: result: $cf_clang_optok" >&5
17922 echo "${ECHO_T}$cf_clang_optok" >&6
17923 CFLAGS="$cf_save_CFLAGS"
17924 if test "$cf_clang_optok" = yes; then
17925 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
17926
17927 echo "${as_me:-configure}:17927: testing adding option $cf_clang_opt ..." 1>&5
17928
17929 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17930 CFLAGS="${CFLAGS}$cf_clang_opt"
17931
17932 fi
17933 done
17934 fi
17935
17936 ac_ext=cc
17937 ac_cpp='$CXXCPP $CPPFLAGS'
17938 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17939 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17940 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17941 ac_main_return="return"
17942
17943 cat > conftest.$ac_ext <<EOF
17944 #line 17944 "configure"
17945 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17946 EOF
17947
17948 if test "$INTEL_CPLUSPLUS" = yes
17949 then
17950 # The "-wdXXX" options suppress warnings:
17951 # remark #1419: external declaration in primary source file
17952 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17953 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17954 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17955 # remark #193: zero used for undefined preprocessing identifier
17956 # remark #593: variable "curs_sb_left_arrow" was set but never used
17957 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17958 # remark #869: parameter "tw" was never referenced
17959 # remark #981: operands are evaluated in unspecified order
17960 # warning #269: invalid format string conversion
17961
17962 echo "$as_me:17962: checking for $CC warning options" >&5
17963 echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
17964 test -n "$verbose" && echo "$as_me:17964: result: " >&5
17965 echo "${ECHO_T}" >&6
17966 cf_save_CXXFLAGS="$CXXFLAGS"
17967 EXTRA_CXXFLAGS="-Wall"
17968 for cf_opt in \
17969 wd1419 \
17970 wd1682 \
17971 wd1683 \
17972 wd1684 \
17973 wd193 \
17974 wd279 \
17975 wd593 \
17976 wd810 \
17977 wd869 \
17978 wd981
17979 do
17980 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17981 if { (eval echo "$as_me:17981: \"$ac_compile\"") >&5
17982 (eval $ac_compile) 2>&5
17983 ac_status=$?
17984 echo "$as_me:17984: \$? = $ac_status" >&5
17985 (exit "$ac_status"); }; then
17986 test -n "$verbose" && echo "$as_me:17986: result: ... -$cf_opt" >&5
17987 echo "${ECHO_T}... -$cf_opt" >&6
17988 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17989 fi
17990 done
17991 CXXFLAGS="$cf_save_CXXFLAGS"
17992
17993 elif test "$GXX" = yes
17994 then
17995 echo "$as_me:17995: checking for $CXX warning options" >&5
17996 echo $ECHO_N "checking for $CXX warning options... $ECHO_C" >&6
17997 test -n "$verbose" && echo "$as_me:17997: result: " >&5
17998 echo "${ECHO_T}" >&6
17999 cf_save_CXXFLAGS="$CXXFLAGS"
18000 EXTRA_CXXFLAGS="-W -Wall"
18001 cf_gxx_extra_warnings=""
18002 test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
18003 case "$GXX_VERSION" in
18004 ([1-2].*)
18005 ;;
18006 (*)
18007 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
18008 ;;
18009 esac
18010 for cf_opt in \
18011 Wabi \
18012 fabi-version=0 \
18013 Wextra \
18014 Wignored-qualifiers \
18015 Wlogical-op \
18016 Woverloaded-virtual \
18017 Wsign-promo \
18018 Wsynth \
18019 Wold-style-cast \
18020 Wcast-align \
18021 Wcast-qual \
18022 Wpointer-arith \
18023 Wshadow \
18024 Wundef $cf_gxx_extra_warnings Wno-unused
18025 do
18026 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
18027 if { (eval echo "$as_me:18027: \"$ac_compile\"") >&5
18028 (eval $ac_compile) 2>&5
18029 ac_status=$?
18030 echo "$as_me:18030: \$? = $ac_status" >&5
18031 (exit "$ac_status"); }; then
18032 test -n "$verbose" && echo "$as_me:18032: result: ... -$cf_opt" >&5
18033 echo "${ECHO_T}... -$cf_opt" >&6
18034 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
18035 else
18036 test -n "$verbose" && echo "$as_me:18036: result: ... no -$cf_opt" >&5
18037 echo "${ECHO_T}... no -$cf_opt" >&6
18038 fi
18039 done
18040 CXXFLAGS="$cf_save_CXXFLAGS"
18041 fi
18042
18043 rm -rf ./conftest*
18044 ac_ext=c
18045 ac_cpp='$CPP $CPPFLAGS'
18046 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
18047 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
18048 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18049 ac_main_return="return"
18050
18051 fi
18052 fi
18053
18054 echo "$as_me:18054: checking if you want to work around bogus compiler/loader warnings" >&5
18055 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
18056
18057 # Check whether --enable-string-hacks or --disable-string-hacks was given.
18058 if test "${enable_string_hacks+set}" = set; then
18059 enableval="$enable_string_hacks"
18060 enable_string_hacks=$enableval
18061 else
18062 enable_string_hacks=no
18063 fi;
18064 echo "$as_me:18064: result: $enable_string_hacks" >&5
18065 echo "${ECHO_T}$enable_string_hacks" >&6
18066
18067 if test "x$enable_string_hacks" = "xyes"; then
18068
18069 cat >>confdefs.h <<\EOF
18070 #define USE_STRING_HACKS 1
18071 EOF
18072
18073 { echo "$as_me:18073: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
18074 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
18075 echo "$as_me:18075: checking for strlcat" >&5
18076 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
18077 if test "${ac_cv_func_strlcat+set}" = set; then
18078 echo $ECHO_N "(cached) $ECHO_C" >&6
18079 else
18080 cat >"conftest.$ac_ext" <<_ACEOF
18081 #line 18081 "configure"
18082 #include "confdefs.h"
18083 #define strlcat autoconf_temporary
18084 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18085 #undef strlcat
18086
18087 #ifdef __cplusplus
18088 extern "C"
18089 #endif
18090
18091 /* We use char because int might match the return type of a gcc2
18092 builtin and then its argument prototype would still apply. */
18093 char strlcat (void);
18094
18095 int
18096 main (void)
18097 {
18098
18099 /* The GNU C library defines stubs for functions which it implements
18100 to always fail with ENOSYS. Some functions are actually named
18101 something starting with __ and the normal name is an alias. */
18102 #if defined (__stub_strlcat) || defined (__stub___strlcat)
18103 #error found stub for strlcat
18104 #endif
18105
18106 return strlcat ();
18107 ;
18108 return 0;
18109 }
18110 _ACEOF
18111 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18112 if { (eval echo "$as_me:18112: \"$ac_link\"") >&5
18113 (eval $ac_link) 2>&5
18114 ac_status=$?
18115 echo "$as_me:18115: \$? = $ac_status" >&5
18116 (exit "$ac_status"); } &&
18117 { ac_try='test -s "conftest$ac_exeext"'
18118 { (eval echo "$as_me:18118: \"$ac_try\"") >&5
18119 (eval $ac_try) 2>&5
18120 ac_status=$?
18121 echo "$as_me:18121: \$? = $ac_status" >&5
18122 (exit "$ac_status"); }; }; then
18123 ac_cv_func_strlcat=yes
18124 else
18125 echo "$as_me: failed program was:" >&5
18126 cat "conftest.$ac_ext" >&5
18127 ac_cv_func_strlcat=no
18128 fi
18129 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18130 fi
18131 echo "$as_me:18131: result: $ac_cv_func_strlcat" >&5
18132 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18133 if test "$ac_cv_func_strlcat" = yes; then
18134
18135 cat >>confdefs.h <<\EOF
18136 #define HAVE_STRLCAT 1
18137 EOF
18138
18139 else
18140
18141 echo "$as_me:18141: checking for strlcat in -lbsd" >&5
18142 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18143 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18144 echo $ECHO_N "(cached) $ECHO_C" >&6
18145 else
18146 ac_check_lib_save_LIBS=$LIBS
18147 LIBS="-lbsd $LIBS"
18148 cat >"conftest.$ac_ext" <<_ACEOF
18149 #line 18149 "configure"
18150 #include "confdefs.h"
18151
18152 /* Override any gcc2 internal prototype to avoid an error. */
18153 #ifdef __cplusplus
18154 extern "C"
18155 #endif
18156 /* We use char because int might match the return type of a gcc2
18157 builtin and then its argument prototype would still apply. */
18158 char strlcat (void);
18159 int
18160 main (void)
18161 {
18162 strlcat ();
18163 ;
18164 return 0;
18165 }
18166 _ACEOF
18167 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18168 if { (eval echo "$as_me:18168: \"$ac_link\"") >&5
18169 (eval $ac_link) 2>&5
18170 ac_status=$?
18171 echo "$as_me:18171: \$? = $ac_status" >&5
18172 (exit "$ac_status"); } &&
18173 { ac_try='test -s "conftest$ac_exeext"'
18174 { (eval echo "$as_me:18174: \"$ac_try\"") >&5
18175 (eval $ac_try) 2>&5
18176 ac_status=$?
18177 echo "$as_me:18177: \$? = $ac_status" >&5
18178 (exit "$ac_status"); }; }; then
18179 ac_cv_lib_bsd_strlcat=yes
18180 else
18181 echo "$as_me: failed program was:" >&5
18182 cat "conftest.$ac_ext" >&5
18183 ac_cv_lib_bsd_strlcat=no
18184 fi
18185 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18186 LIBS=$ac_check_lib_save_LIBS
18187 fi
18188 echo "$as_me:18188: result: $ac_cv_lib_bsd_strlcat" >&5
18189 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18190 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18191
18192 cf_add_libs="$LIBS"
18193 # reverse order
18194 cf_add_0lib=
18195 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18196 # filter duplicates
18197 for cf_add_1lib in $cf_add_0lib; do
18198 for cf_add_2lib in $cf_add_libs; do
18199 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18200 cf_add_1lib=
18201 break
18202 fi
18203 done
18204 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18205 done
18206 LIBS="$cf_add_libs"
18207
18208 for ac_header in bsd/string.h
18209 do
18210 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18211 echo "$as_me:18211: checking for $ac_header" >&5
18212 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18213 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18214 echo $ECHO_N "(cached) $ECHO_C" >&6
18215 else
18216 cat >"conftest.$ac_ext" <<_ACEOF
18217 #line 18217 "configure"
18218 #include "confdefs.h"
18219 #include <$ac_header>
18220 _ACEOF
18221 if { (eval echo "$as_me:18221: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18222 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18223 ac_status=$?
18224 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18225 rm -f conftest.er1
18226 cat conftest.err >&5
18227 echo "$as_me:18227: \$? = $ac_status" >&5
18228 (exit "$ac_status"); } >/dev/null; then
18229 if test -s conftest.err; then
18230 ac_cpp_err=$ac_c_preproc_warn_flag
18231 else
18232 ac_cpp_err=
18233 fi
18234 else
18235 ac_cpp_err=yes
18236 fi
18237 if test -z "$ac_cpp_err"; then
18238 eval "$as_ac_Header=yes"
18239 else
18240 echo "$as_me: failed program was:" >&5
18241 cat "conftest.$ac_ext" >&5
18242 eval "$as_ac_Header=no"
18243 fi
18244 rm -f conftest.err "conftest.$ac_ext"
18245 fi
18246 echo "$as_me:18246: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18247 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18248 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18249 cat >>confdefs.h <<EOF
18250 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18251 EOF
18252
18253 fi
18254 done
18255
18256 cat >>confdefs.h <<\EOF
18257 #define HAVE_STRLCAT 1
18258 EOF
18259
18260 fi
18261
18262 fi
18263
18264 for ac_func in strlcpy snprintf
18265 do
18266 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18267 echo "$as_me:18267: checking for $ac_func" >&5
18268 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18269 if eval "test \"\${$as_ac_var+set}\" = set"; then
18270 echo $ECHO_N "(cached) $ECHO_C" >&6
18271 else
18272 cat >"conftest.$ac_ext" <<_ACEOF
18273 #line 18273 "configure"
18274 #include "confdefs.h"
18275 #define $ac_func autoconf_temporary
18276 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18277 #undef $ac_func
18278
18279 #ifdef __cplusplus
18280 extern "C"
18281 #endif
18282
18283 /* We use char because int might match the return type of a gcc2
18284 builtin and then its argument prototype would still apply. */
18285 char $ac_func (void);
18286
18287 int
18288 main (void)
18289 {
18290
18291 /* The GNU C library defines stubs for functions which it implements
18292 to always fail with ENOSYS. Some functions are actually named
18293 something starting with __ and the normal name is an alias. */
18294 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18295 #error found stub for $ac_func
18296 #endif
18297
18298 return $ac_func ();
18299 ;
18300 return 0;
18301 }
18302 _ACEOF
18303 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18304 if { (eval echo "$as_me:18304: \"$ac_link\"") >&5
18305 (eval $ac_link) 2>&5
18306 ac_status=$?
18307 echo "$as_me:18307: \$? = $ac_status" >&5
18308 (exit "$ac_status"); } &&
18309 { ac_try='test -s "conftest$ac_exeext"'
18310 { (eval echo "$as_me:18310: \"$ac_try\"") >&5
18311 (eval $ac_try) 2>&5
18312 ac_status=$?
18313 echo "$as_me:18313: \$? = $ac_status" >&5
18314 (exit "$ac_status"); }; }; then
18315 eval "$as_ac_var=yes"
18316 else
18317 echo "$as_me: failed program was:" >&5
18318 cat "conftest.$ac_ext" >&5
18319 eval "$as_ac_var=no"
18320 fi
18321 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18322 fi
18323 echo "$as_me:18323: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18324 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18325 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18326 cat >>confdefs.h <<EOF
18327 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18328 EOF
18329
18330 fi
18331 done
18332
18333 fi
18334
18335 ### use option --enable-assertions to turn on generation of assertion code
18336 echo "$as_me:18336: checking if you want to enable runtime assertions" >&5
18337 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18338
18339 # Check whether --enable-assertions or --disable-assertions was given.
18340 if test "${enable_assertions+set}" = set; then
18341 enableval="$enable_assertions"
18342 with_assertions=$enableval
18343 else
18344 with_assertions=no
18345 fi;
18346 echo "$as_me:18346: result: $with_assertions" >&5
18347 echo "${ECHO_T}$with_assertions" >&6
18348 if test -n "$GCC"
18349 then
18350 if test "$with_assertions" = no
18351 then
18352 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18353 else
18354
18355 ADAFLAGS="$ADAFLAGS -gnata"
18356
18357 fi
18358 fi
18359
18360 ### use option --disable-leaks to suppress "permanent" leaks, for testing
18361
18362 echo "$as_me:18362: checking if you want to use dmalloc for testing" >&5
18363 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18364
18365 # Check whether --with-dmalloc or --without-dmalloc was given.
18366 if test "${with_dmalloc+set}" = set; then
18367 withval="$with_dmalloc"
18368 case "x$withval" in
18369 (x|xno) ;;
18370 (*)
18371 : "${with_cflags:=-g}"
18372 : "${enable_leaks:=no}"
18373 with_dmalloc=yes
18374
18375 cat >>confdefs.h <<EOF
18376 #define USE_DMALLOC 1
18377 EOF
18378
18379 ;;
18380 esac
18381 else
18382 with_dmalloc=
18383 fi;
18384 echo "$as_me:18384: result: ${with_dmalloc:-no}" >&5
18385 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18386
18387 case ".$with_cflags" in
18388 (.*-g*)
18389 case .$CFLAGS in
18390 (.*-g*)
18391 ;;
18392 (*)
18393
18394 cf_fix_cppflags=no
18395 cf_new_cflags=
18396 cf_new_cppflags=
18397 cf_new_extra_cppflags=
18398
18399 for cf_add_cflags in -g
18400 do
18401 case "$cf_fix_cppflags" in
18402 (no)
18403 case "$cf_add_cflags" in
18404 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18405 case "$cf_add_cflags" in
18406 (-D*)
18407 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18408
18409 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18410 && test -z "${cf_tst_cflags}" \
18411 && cf_fix_cppflags=yes
18412
18413 if test "$cf_fix_cppflags" = yes ; then
18414
18415 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18416 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18417
18418 continue
18419 elif test "${cf_tst_cflags}" = "\"'" ; then
18420
18421 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18422 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18423
18424 continue
18425 fi
18426 ;;
18427 esac
18428 case "$CPPFLAGS" in
18429 (*$cf_add_cflags)
18430 ;;
18431 (*)
18432 case "$cf_add_cflags" in
18433 (-D*)
18434 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18435
18436 CPPFLAGS=`echo "$CPPFLAGS" | \
18437 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18438 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18439
18440 ;;
18441 esac
18442
18443 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18444 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18445
18446 ;;
18447 esac
18448 ;;
18449 (*)
18450
18451 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18452 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18453
18454 ;;
18455 esac
18456 ;;
18457 (yes)
18458
18459 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18460 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18461
18462 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18463
18464 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18465 && test -z "${cf_tst_cflags}" \
18466 && cf_fix_cppflags=no
18467 ;;
18468 esac
18469 done
18470
18471 if test -n "$cf_new_cflags" ; then
18472
18473 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18474 CFLAGS="${CFLAGS}$cf_new_cflags"
18475
18476 fi
18477
18478 if test -n "$cf_new_cppflags" ; then
18479
18480 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18481 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18482
18483 fi
18484
18485 if test -n "$cf_new_extra_cppflags" ; then
18486
18487 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18488 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18489
18490 fi
18491
18492 ;;
18493 esac
18494 ;;
18495 esac
18496
18497 if test "$with_dmalloc" = yes ; then
18498 echo "$as_me:18498: checking for dmalloc.h" >&5
18499 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18500 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18501 echo $ECHO_N "(cached) $ECHO_C" >&6
18502 else
18503 cat >"conftest.$ac_ext" <<_ACEOF
18504 #line 18504 "configure"
18505 #include "confdefs.h"
18506 #include <dmalloc.h>
18507 _ACEOF
18508 if { (eval echo "$as_me:18508: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18509 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18510 ac_status=$?
18511 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18512 rm -f conftest.er1
18513 cat conftest.err >&5
18514 echo "$as_me:18514: \$? = $ac_status" >&5
18515 (exit "$ac_status"); } >/dev/null; then
18516 if test -s conftest.err; then
18517 ac_cpp_err=$ac_c_preproc_warn_flag
18518 else
18519 ac_cpp_err=
18520 fi
18521 else
18522 ac_cpp_err=yes
18523 fi
18524 if test -z "$ac_cpp_err"; then
18525 ac_cv_header_dmalloc_h=yes
18526 else
18527 echo "$as_me: failed program was:" >&5
18528 cat "conftest.$ac_ext" >&5
18529 ac_cv_header_dmalloc_h=no
18530 fi
18531 rm -f conftest.err "conftest.$ac_ext"
18532 fi
18533 echo "$as_me:18533: result: $ac_cv_header_dmalloc_h" >&5
18534 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18535 if test "$ac_cv_header_dmalloc_h" = yes; then
18536
18537 echo "$as_me:18537: checking for dmalloc_debug in -ldmalloc" >&5
18538 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18539 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18540 echo $ECHO_N "(cached) $ECHO_C" >&6
18541 else
18542 ac_check_lib_save_LIBS=$LIBS
18543 LIBS="-ldmalloc $LIBS"
18544 cat >"conftest.$ac_ext" <<_ACEOF
18545 #line 18545 "configure"
18546 #include "confdefs.h"
18547
18548 /* Override any gcc2 internal prototype to avoid an error. */
18549 #ifdef __cplusplus
18550 extern "C"
18551 #endif
18552 /* We use char because int might match the return type of a gcc2
18553 builtin and then its argument prototype would still apply. */
18554 char dmalloc_debug (void);
18555 int
18556 main (void)
18557 {
18558 dmalloc_debug ();
18559 ;
18560 return 0;
18561 }
18562 _ACEOF
18563 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18564 if { (eval echo "$as_me:18564: \"$ac_link\"") >&5
18565 (eval $ac_link) 2>&5
18566 ac_status=$?
18567 echo "$as_me:18567: \$? = $ac_status" >&5
18568 (exit "$ac_status"); } &&
18569 { ac_try='test -s "conftest$ac_exeext"'
18570 { (eval echo "$as_me:18570: \"$ac_try\"") >&5
18571 (eval $ac_try) 2>&5
18572 ac_status=$?
18573 echo "$as_me:18573: \$? = $ac_status" >&5
18574 (exit "$ac_status"); }; }; then
18575 ac_cv_lib_dmalloc_dmalloc_debug=yes
18576 else
18577 echo "$as_me: failed program was:" >&5
18578 cat "conftest.$ac_ext" >&5
18579 ac_cv_lib_dmalloc_dmalloc_debug=no
18580 fi
18581 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18582 LIBS=$ac_check_lib_save_LIBS
18583 fi
18584 echo "$as_me:18584: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18585 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18586 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18587 cat >>confdefs.h <<EOF
18588 #define HAVE_LIBDMALLOC 1
18589 EOF
18590
18591 LIBS="-ldmalloc $LIBS"
18592
18593 fi
18594
18595 fi
18596
18597 fi
18598
18599 echo "$as_me:18599: checking if you want to use dbmalloc for testing" >&5
18600 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18601
18602 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18603 if test "${with_dbmalloc+set}" = set; then
18604 withval="$with_dbmalloc"
18605 case "x$withval" in
18606 (x|xno) ;;
18607 (*)
18608 : "${with_cflags:=-g}"
18609 : "${enable_leaks:=no}"
18610 with_dbmalloc=yes
18611
18612 cat >>confdefs.h <<EOF
18613 #define USE_DBMALLOC 1
18614 EOF
18615
18616 ;;
18617 esac
18618 else
18619 with_dbmalloc=
18620 fi;
18621 echo "$as_me:18621: result: ${with_dbmalloc:-no}" >&5
18622 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18623
18624 case ".$with_cflags" in
18625 (.*-g*)
18626 case .$CFLAGS in
18627 (.*-g*)
18628 ;;
18629 (*)
18630
18631 cf_fix_cppflags=no
18632 cf_new_cflags=
18633 cf_new_cppflags=
18634 cf_new_extra_cppflags=
18635
18636 for cf_add_cflags in -g
18637 do
18638 case "$cf_fix_cppflags" in
18639 (no)
18640 case "$cf_add_cflags" in
18641 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18642 case "$cf_add_cflags" in
18643 (-D*)
18644 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18645
18646 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18647 && test -z "${cf_tst_cflags}" \
18648 && cf_fix_cppflags=yes
18649
18650 if test "$cf_fix_cppflags" = yes ; then
18651
18652 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18653 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18654
18655 continue
18656 elif test "${cf_tst_cflags}" = "\"'" ; then
18657
18658 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18659 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18660
18661 continue
18662 fi
18663 ;;
18664 esac
18665 case "$CPPFLAGS" in
18666 (*$cf_add_cflags)
18667 ;;
18668 (*)
18669 case "$cf_add_cflags" in
18670 (-D*)
18671 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18672
18673 CPPFLAGS=`echo "$CPPFLAGS" | \
18674 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18675 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18676
18677 ;;
18678 esac
18679
18680 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18681 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18682
18683 ;;
18684 esac
18685 ;;
18686 (*)
18687
18688 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18689 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18690
18691 ;;
18692 esac
18693 ;;
18694 (yes)
18695
18696 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18697 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18698
18699 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18700
18701 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18702 && test -z "${cf_tst_cflags}" \
18703 && cf_fix_cppflags=no
18704 ;;
18705 esac
18706 done
18707
18708 if test -n "$cf_new_cflags" ; then
18709
18710 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18711 CFLAGS="${CFLAGS}$cf_new_cflags"
18712
18713 fi
18714
18715 if test -n "$cf_new_cppflags" ; then
18716
18717 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18718 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18719
18720 fi
18721
18722 if test -n "$cf_new_extra_cppflags" ; then
18723
18724 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18725 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18726
18727 fi
18728
18729 ;;
18730 esac
18731 ;;
18732 esac
18733
18734 if test "$with_dbmalloc" = yes ; then
18735 echo "$as_me:18735: checking for dbmalloc.h" >&5
18736 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18737 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18738 echo $ECHO_N "(cached) $ECHO_C" >&6
18739 else
18740 cat >"conftest.$ac_ext" <<_ACEOF
18741 #line 18741 "configure"
18742 #include "confdefs.h"
18743 #include <dbmalloc.h>
18744 _ACEOF
18745 if { (eval echo "$as_me:18745: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18746 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18747 ac_status=$?
18748 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18749 rm -f conftest.er1
18750 cat conftest.err >&5
18751 echo "$as_me:18751: \$? = $ac_status" >&5
18752 (exit "$ac_status"); } >/dev/null; then
18753 if test -s conftest.err; then
18754 ac_cpp_err=$ac_c_preproc_warn_flag
18755 else
18756 ac_cpp_err=
18757 fi
18758 else
18759 ac_cpp_err=yes
18760 fi
18761 if test -z "$ac_cpp_err"; then
18762 ac_cv_header_dbmalloc_h=yes
18763 else
18764 echo "$as_me: failed program was:" >&5
18765 cat "conftest.$ac_ext" >&5
18766 ac_cv_header_dbmalloc_h=no
18767 fi
18768 rm -f conftest.err "conftest.$ac_ext"
18769 fi
18770 echo "$as_me:18770: result: $ac_cv_header_dbmalloc_h" >&5
18771 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18772 if test "$ac_cv_header_dbmalloc_h" = yes; then
18773
18774 echo "$as_me:18774: checking for debug_malloc in -ldbmalloc" >&5
18775 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18776 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18777 echo $ECHO_N "(cached) $ECHO_C" >&6
18778 else
18779 ac_check_lib_save_LIBS=$LIBS
18780 LIBS="-ldbmalloc $LIBS"
18781 cat >"conftest.$ac_ext" <<_ACEOF
18782 #line 18782 "configure"
18783 #include "confdefs.h"
18784
18785 /* Override any gcc2 internal prototype to avoid an error. */
18786 #ifdef __cplusplus
18787 extern "C"
18788 #endif
18789 /* We use char because int might match the return type of a gcc2
18790 builtin and then its argument prototype would still apply. */
18791 char debug_malloc (void);
18792 int
18793 main (void)
18794 {
18795 debug_malloc ();
18796 ;
18797 return 0;
18798 }
18799 _ACEOF
18800 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18801 if { (eval echo "$as_me:18801: \"$ac_link\"") >&5
18802 (eval $ac_link) 2>&5
18803 ac_status=$?
18804 echo "$as_me:18804: \$? = $ac_status" >&5
18805 (exit "$ac_status"); } &&
18806 { ac_try='test -s "conftest$ac_exeext"'
18807 { (eval echo "$as_me:18807: \"$ac_try\"") >&5
18808 (eval $ac_try) 2>&5
18809 ac_status=$?
18810 echo "$as_me:18810: \$? = $ac_status" >&5
18811 (exit "$ac_status"); }; }; then
18812 ac_cv_lib_dbmalloc_debug_malloc=yes
18813 else
18814 echo "$as_me: failed program was:" >&5
18815 cat "conftest.$ac_ext" >&5
18816 ac_cv_lib_dbmalloc_debug_malloc=no
18817 fi
18818 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18819 LIBS=$ac_check_lib_save_LIBS
18820 fi
18821 echo "$as_me:18821: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18822 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18823 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18824 cat >>confdefs.h <<EOF
18825 #define HAVE_LIBDBMALLOC 1
18826 EOF
18827
18828 LIBS="-ldbmalloc $LIBS"
18829
18830 fi
18831
18832 fi
18833
18834 fi
18835
18836 echo "$as_me:18836: checking if you want to use valgrind for testing" >&5
18837 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18838
18839 # Check whether --with-valgrind or --without-valgrind was given.
18840 if test "${with_valgrind+set}" = set; then
18841 withval="$with_valgrind"
18842 case "x$withval" in
18843 (x|xno) ;;
18844 (*)
18845 : "${with_cflags:=-g}"
18846 : "${enable_leaks:=no}"
18847 with_valgrind=yes
18848
18849 cat >>confdefs.h <<EOF
18850 #define USE_VALGRIND 1
18851 EOF
18852
18853 ;;
18854 esac
18855 else
18856 with_valgrind=
18857 fi;
18858 echo "$as_me:18858: result: ${with_valgrind:-no}" >&5
18859 echo "${ECHO_T}${with_valgrind:-no}" >&6
18860
18861 case ".$with_cflags" in
18862 (.*-g*)
18863 case .$CFLAGS in
18864 (.*-g*)
18865 ;;
18866 (*)
18867
18868 cf_fix_cppflags=no
18869 cf_new_cflags=
18870 cf_new_cppflags=
18871 cf_new_extra_cppflags=
18872
18873 for cf_add_cflags in -g
18874 do
18875 case "$cf_fix_cppflags" in
18876 (no)
18877 case "$cf_add_cflags" in
18878 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18879 case "$cf_add_cflags" in
18880 (-D*)
18881 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18882
18883 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18884 && test -z "${cf_tst_cflags}" \
18885 && cf_fix_cppflags=yes
18886
18887 if test "$cf_fix_cppflags" = yes ; then
18888
18889 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18890 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18891
18892 continue
18893 elif test "${cf_tst_cflags}" = "\"'" ; then
18894
18895 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18896 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18897
18898 continue
18899 fi
18900 ;;
18901 esac
18902 case "$CPPFLAGS" in
18903 (*$cf_add_cflags)
18904 ;;
18905 (*)
18906 case "$cf_add_cflags" in
18907 (-D*)
18908 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18909
18910 CPPFLAGS=`echo "$CPPFLAGS" | \
18911 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18912 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18913
18914 ;;
18915 esac
18916
18917 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18918 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18919
18920 ;;
18921 esac
18922 ;;
18923 (*)
18924
18925 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18926 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18927
18928 ;;
18929 esac
18930 ;;
18931 (yes)
18932
18933 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18934 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18935
18936 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18937
18938 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18939 && test -z "${cf_tst_cflags}" \
18940 && cf_fix_cppflags=no
18941 ;;
18942 esac
18943 done
18944
18945 if test -n "$cf_new_cflags" ; then
18946
18947 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18948 CFLAGS="${CFLAGS}$cf_new_cflags"
18949
18950 fi
18951
18952 if test -n "$cf_new_cppflags" ; then
18953
18954 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18955 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18956
18957 fi
18958
18959 if test -n "$cf_new_extra_cppflags" ; then
18960
18961 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18962 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18963
18964 fi
18965
18966 ;;
18967 esac
18968 ;;
18969 esac
18970
18971 echo "$as_me:18971: checking if you want to perform memory-leak testing" >&5
18972 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18973
18974 # Check whether --enable-leaks or --disable-leaks was given.
18975 if test "${enable_leaks+set}" = set; then
18976 enableval="$enable_leaks"
18977 enable_leaks=$enableval
18978 else
18979 enable_leaks=yes
18980 fi;
18981 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18982 echo "$as_me:18982: result: $with_no_leaks" >&5
18983 echo "${ECHO_T}$with_no_leaks" >&6
18984
18985 if test "$enable_leaks" = no ; then
18986
18987 cat >>confdefs.h <<\EOF
18988 #define NO_LEAKS 1
18989 EOF
18990
18991 cat >>confdefs.h <<\EOF
18992 #define YY_NO_LEAKS 1
18993 EOF
18994
18995 fi
18996
18997 cat >>confdefs.h <<\EOF
18998 #define HAVE_NC_ALLOC_H 1
18999 EOF
19000
19001 ### use option --enable-expanded to generate certain macros as functions
19002
19003 # Check whether --enable-expanded or --disable-expanded was given.
19004 if test "${enable_expanded+set}" = set; then
19005 enableval="$enable_expanded"
19006 test "x$enableval" = xyes &&
19007 cat >>confdefs.h <<\EOF
19008 #define NCURSES_EXPANDED 1
19009 EOF
19010
19011 fi;
19012
19013 ### use option --disable-macros to suppress macros in favor of functions
19014
19015 # Check whether --enable-macros or --disable-macros was given.
19016 if test "${enable_macros+set}" = set; then
19017 enableval="$enable_macros"
19018 test "$enableval" = no &&
19019 cat >>confdefs.h <<\EOF
19020 #define NCURSES_NOMACROS 1
19021 EOF
19022
19023 fi;
19024
19025 # Normally we only add trace() to the debug-library. Allow this to be
19026 # extended to all models of the ncurses library:
19027 cf_all_traces=no
19028 case "$CFLAGS $CPPFLAGS" in
19029 (*-DTRACE*)
19030 cf_all_traces=yes
19031 ;;
19032 esac
19033
19034 echo "$as_me:19034: checking whether to add trace feature to all models" >&5
19035 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
19036
19037 # Check whether --with-trace or --without-trace was given.
19038 if test "${with_trace+set}" = set; then
19039 withval="$with_trace"
19040 cf_with_trace=$withval
19041 else
19042 cf_with_trace=$cf_all_traces
19043 fi;
19044 echo "$as_me:19044: result: $cf_with_trace" >&5
19045 echo "${ECHO_T}$cf_with_trace" >&6
19046
19047 if test "x$cf_with_trace" = xyes ; then
19048 LIB_TRACING=all
19049 ADA_TRACE=TRUE
19050
19051 cat >>confdefs.h <<\EOF
19052 #define TRACE 1
19053 EOF
19054
19055 cat >>confdefs.h <<\EOF
19056 #define HAVE__TRACEF 1
19057 EOF
19058
19059 else
19060 LIB_TRACING=DEBUG
19061 ADA_TRACE=FALSE
19062 fi
19063
19064 echo "$as_me:19064: checking if we want to use GNAT projects" >&5
19065 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19066
19067 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19068 if test "${enable_gnat_projects+set}" = set; then
19069 enableval="$enable_gnat_projects"
19070 test "$enableval" != no && enableval=yes
19071 if test "$enableval" != "yes" ; then
19072 enable_gnat_projects=no
19073 else
19074 enable_gnat_projects=yes
19075 fi
19076 else
19077 enableval=yes
19078 enable_gnat_projects=yes
19079
19080 fi;
19081 echo "$as_me:19081: result: $enable_gnat_projects" >&5
19082 echo "${ECHO_T}$enable_gnat_projects" >&6
19083
19084 ### Checks for libraries.
19085 case "$cf_cv_system_name" in
19086 (*mingw32*|*mingw64*)
19087 # Note: WINVER may be a problem with Windows 10
19088 if test "x$with_named_pipes" = xyes ; then
19089 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19090 else
19091 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19092 fi
19093
19094 echo "$as_me:19094: checking if ssp library is needed" >&5
19095 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19096 if test "${cf_cv_need_libssp+set}" = set; then
19097 echo $ECHO_N "(cached) $ECHO_C" >&6
19098 else
19099
19100 cat >"conftest.$ac_ext" <<_ACEOF
19101 #line 19101 "configure"
19102 #include "confdefs.h"
19103
19104 #include <sys/types.h>
19105 #include <dirent.h>
19106
19107 int
19108 main (void)
19109 {
19110
19111 DIR *dp = opendir(".");
19112
19113 ;
19114 return 0;
19115 }
19116 _ACEOF
19117 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19118 if { (eval echo "$as_me:19118: \"$ac_link\"") >&5
19119 (eval $ac_link) 2>&5
19120 ac_status=$?
19121 echo "$as_me:19121: \$? = $ac_status" >&5
19122 (exit "$ac_status"); } &&
19123 { ac_try='test -s "conftest$ac_exeext"'
19124 { (eval echo "$as_me:19124: \"$ac_try\"") >&5
19125 (eval $ac_try) 2>&5
19126 ac_status=$?
19127 echo "$as_me:19127: \$? = $ac_status" >&5
19128 (exit "$ac_status"); }; }; then
19129 cf_cv_need_libssp=no
19130 else
19131 echo "$as_me: failed program was:" >&5
19132 cat "conftest.$ac_ext" >&5
19133
19134 cf_save_LIBS="$LIBS"
19135 LIBS="$LIBS -lssp"
19136 cat >"conftest.$ac_ext" <<_ACEOF
19137 #line 19137 "configure"
19138 #include "confdefs.h"
19139
19140 #include <sys/types.h>
19141 #include <dirent.h>
19142
19143 int
19144 main (void)
19145 {
19146
19147 DIR *dp = opendir(".");
19148
19149 ;
19150 return 0;
19151 }
19152 _ACEOF
19153 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19154 if { (eval echo "$as_me:19154: \"$ac_link\"") >&5
19155 (eval $ac_link) 2>&5
19156 ac_status=$?
19157 echo "$as_me:19157: \$? = $ac_status" >&5
19158 (exit "$ac_status"); } &&
19159 { ac_try='test -s "conftest$ac_exeext"'
19160 { (eval echo "$as_me:19160: \"$ac_try\"") >&5
19161 (eval $ac_try) 2>&5
19162 ac_status=$?
19163 echo "$as_me:19163: \$? = $ac_status" >&5
19164 (exit "$ac_status"); }; }; then
19165 cf_cv_need_libssp=yes
19166 else
19167 echo "$as_me: failed program was:" >&5
19168 cat "conftest.$ac_ext" >&5
19169 cf_cv_need_libssp=maybe
19170 fi
19171 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19172 LIBS="$cf_save_LIBS"
19173
19174 fi
19175 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19176 fi
19177 echo "$as_me:19177: result: $cf_cv_need_libssp" >&5
19178 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19179
19180 if test "x$cf_cv_need_libssp" = xyes
19181 then
19182
19183 cf_add_libs="$LIBS"
19184 # reverse order
19185 cf_add_0lib=
19186 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19187 # filter duplicates
19188 for cf_add_1lib in $cf_add_0lib; do
19189 for cf_add_2lib in $cf_add_libs; do
19190 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19191 cf_add_1lib=
19192 break
19193 fi
19194 done
19195 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19196 done
19197 LIBS="$cf_add_libs"
19198
19199 fi
19200
19201 ;;
19202 (*)
19203 ;;
19204 esac
19205
19206 echo "$as_me:19206: checking if -lm needed for math functions" >&5
19207 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19208 if test "${cf_cv_need_libm+set}" = set; then
19209 echo $ECHO_N "(cached) $ECHO_C" >&6
19210 else
19211
19212 cat >"conftest.$ac_ext" <<_ACEOF
19213 #line 19213 "configure"
19214 #include "confdefs.h"
19215
19216 #include <stdio.h>
19217 #include <stdlib.h>
19218 #include <math.h>
19219
19220 int
19221 main (void)
19222 {
19223 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19224 ;
19225 return 0;
19226 }
19227 _ACEOF
19228 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19229 if { (eval echo "$as_me:19229: \"$ac_link\"") >&5
19230 (eval $ac_link) 2>&5
19231 ac_status=$?
19232 echo "$as_me:19232: \$? = $ac_status" >&5
19233 (exit "$ac_status"); } &&
19234 { ac_try='test -s "conftest$ac_exeext"'
19235 { (eval echo "$as_me:19235: \"$ac_try\"") >&5
19236 (eval $ac_try) 2>&5
19237 ac_status=$?
19238 echo "$as_me:19238: \$? = $ac_status" >&5
19239 (exit "$ac_status"); }; }; then
19240 cf_cv_need_libm=no
19241 else
19242 echo "$as_me: failed program was:" >&5
19243 cat "conftest.$ac_ext" >&5
19244 cf_cv_need_libm=yes
19245 fi
19246 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19247 fi
19248 echo "$as_me:19248: result: $cf_cv_need_libm" >&5
19249 echo "${ECHO_T}$cf_cv_need_libm" >&6
19250
19251 if test "$cf_cv_need_libm" = yes
19252 then
19253
19254 cf_save_LIBS="$LIBS"
19255 LIBS="$LIBS -lm"
19256 echo "$as_me:19256: checking if -lm is available for math functions" >&5
19257 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19258 if test "${cf_cv_have_libm+set}" = set; then
19259 echo $ECHO_N "(cached) $ECHO_C" >&6
19260 else
19261
19262 cat >"conftest.$ac_ext" <<_ACEOF
19263 #line 19263 "configure"
19264 #include "confdefs.h"
19265
19266 #include <stdio.h>
19267 #include <stdlib.h>
19268 #include <math.h>
19269
19270 int
19271 main (void)
19272 {
19273 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19274 ;
19275 return 0;
19276 }
19277 _ACEOF
19278 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19279 if { (eval echo "$as_me:19279: \"$ac_link\"") >&5
19280 (eval $ac_link) 2>&5
19281 ac_status=$?
19282 echo "$as_me:19282: \$? = $ac_status" >&5
19283 (exit "$ac_status"); } &&
19284 { ac_try='test -s "conftest$ac_exeext"'
19285 { (eval echo "$as_me:19285: \"$ac_try\"") >&5
19286 (eval $ac_try) 2>&5
19287 ac_status=$?
19288 echo "$as_me:19288: \$? = $ac_status" >&5
19289 (exit "$ac_status"); }; }; then
19290 cf_cv_have_libm=yes
19291 else
19292 echo "$as_me: failed program was:" >&5
19293 cat "conftest.$ac_ext" >&5
19294 cf_cv_have_libm=no
19295 fi
19296 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19297 fi
19298 echo "$as_me:19298: result: $cf_cv_have_libm" >&5
19299 echo "${ECHO_T}$cf_cv_have_libm" >&6
19300 LIBS="$cf_save_LIBS"
19301
19302 if test "$cf_cv_have_libm" = yes
19303 then
19304 MATH_LIB=-lm
19305 fi
19306 else
19307 cf_cv_have_libm=yes
19308 fi
19309
19310 if test "$cf_cv_have_libm" = yes
19311 then
19312
19313 cat >>confdefs.h <<\EOF
19314 #define HAVE_MATH_FUNCS 1
19315 EOF
19316
19317 fi
19318
19319 ### Checks for header files.
19320 echo "$as_me:19320: checking whether time.h and sys/time.h may both be included" >&5
19321 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19322 if test "${ac_cv_header_time+set}" = set; then
19323 echo $ECHO_N "(cached) $ECHO_C" >&6
19324 else
19325 cat >"conftest.$ac_ext" <<_ACEOF
19326 #line 19326 "configure"
19327 #include "confdefs.h"
19328 #include <sys/types.h>
19329 #include <sys/time.h>
19330 #include <time.h>
19331
19332 int
19333 main (void)
19334 {
19335 if ((struct tm *) 0)
19336 return 0;
19337 ;
19338 return 0;
19339 }
19340 _ACEOF
19341 rm -f "conftest.$ac_objext"
19342 if { (eval echo "$as_me:19342: \"$ac_compile\"") >&5
19343 (eval $ac_compile) 2>&5
19344 ac_status=$?
19345 echo "$as_me:19345: \$? = $ac_status" >&5
19346 (exit "$ac_status"); } &&
19347 { ac_try='test -s "conftest.$ac_objext"'
19348 { (eval echo "$as_me:19348: \"$ac_try\"") >&5
19349 (eval $ac_try) 2>&5
19350 ac_status=$?
19351 echo "$as_me:19351: \$? = $ac_status" >&5
19352 (exit "$ac_status"); }; }; then
19353 ac_cv_header_time=yes
19354 else
19355 echo "$as_me: failed program was:" >&5
19356 cat "conftest.$ac_ext" >&5
19357 ac_cv_header_time=no
19358 fi
19359 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19360 fi
19361 echo "$as_me:19361: result: $ac_cv_header_time" >&5
19362 echo "${ECHO_T}$ac_cv_header_time" >&6
19363 if test $ac_cv_header_time = yes; then
19364
19365 cat >>confdefs.h <<\EOF
19366 #define TIME_WITH_SYS_TIME 1
19367 EOF
19368
19369 fi
19370
19371 cf_regex_func=no
19372 cf_regex_libs=
19373 case "$host_os" in
19374 (mingw*)
19375 # -lsystre -ltre -lintl -liconv
19376 echo "$as_me:19376: checking for regcomp in -lsystre" >&5
19377 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19378 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19379 echo $ECHO_N "(cached) $ECHO_C" >&6
19380 else
19381 ac_check_lib_save_LIBS=$LIBS
19382 LIBS="-lsystre $LIBS"
19383 cat >"conftest.$ac_ext" <<_ACEOF
19384 #line 19384 "configure"
19385 #include "confdefs.h"
19386
19387 /* Override any gcc2 internal prototype to avoid an error. */
19388 #ifdef __cplusplus
19389 extern "C"
19390 #endif
19391 /* We use char because int might match the return type of a gcc2
19392 builtin and then its argument prototype would still apply. */
19393 char regcomp (void);
19394 int
19395 main (void)
19396 {
19397 regcomp ();
19398 ;
19399 return 0;
19400 }
19401 _ACEOF
19402 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19403 if { (eval echo "$as_me:19403: \"$ac_link\"") >&5
19404 (eval $ac_link) 2>&5
19405 ac_status=$?
19406 echo "$as_me:19406: \$? = $ac_status" >&5
19407 (exit "$ac_status"); } &&
19408 { ac_try='test -s "conftest$ac_exeext"'
19409 { (eval echo "$as_me:19409: \"$ac_try\"") >&5
19410 (eval $ac_try) 2>&5
19411 ac_status=$?
19412 echo "$as_me:19412: \$? = $ac_status" >&5
19413 (exit "$ac_status"); }; }; then
19414 ac_cv_lib_systre_regcomp=yes
19415 else
19416 echo "$as_me: failed program was:" >&5
19417 cat "conftest.$ac_ext" >&5
19418 ac_cv_lib_systre_regcomp=no
19419 fi
19420 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19421 LIBS=$ac_check_lib_save_LIBS
19422 fi
19423 echo "$as_me:19423: result: $ac_cv_lib_systre_regcomp" >&5
19424 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19425 if test "$ac_cv_lib_systre_regcomp" = yes; then
19426
19427 echo "$as_me:19427: checking for libiconv_open in -liconv" >&5
19428 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19429 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19430 echo $ECHO_N "(cached) $ECHO_C" >&6
19431 else
19432 ac_check_lib_save_LIBS=$LIBS
19433 LIBS="-liconv $LIBS"
19434 cat >"conftest.$ac_ext" <<_ACEOF
19435 #line 19435 "configure"
19436 #include "confdefs.h"
19437
19438 /* Override any gcc2 internal prototype to avoid an error. */
19439 #ifdef __cplusplus
19440 extern "C"
19441 #endif
19442 /* We use char because int might match the return type of a gcc2
19443 builtin and then its argument prototype would still apply. */
19444 char libiconv_open (void);
19445 int
19446 main (void)
19447 {
19448 libiconv_open ();
19449 ;
19450 return 0;
19451 }
19452 _ACEOF
19453 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19454 if { (eval echo "$as_me:19454: \"$ac_link\"") >&5
19455 (eval $ac_link) 2>&5
19456 ac_status=$?
19457 echo "$as_me:19457: \$? = $ac_status" >&5
19458 (exit "$ac_status"); } &&
19459 { ac_try='test -s "conftest$ac_exeext"'
19460 { (eval echo "$as_me:19460: \"$ac_try\"") >&5
19461 (eval $ac_try) 2>&5
19462 ac_status=$?
19463 echo "$as_me:19463: \$? = $ac_status" >&5
19464 (exit "$ac_status"); }; }; then
19465 ac_cv_lib_iconv_libiconv_open=yes
19466 else
19467 echo "$as_me: failed program was:" >&5
19468 cat "conftest.$ac_ext" >&5
19469 ac_cv_lib_iconv_libiconv_open=no
19470 fi
19471 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19472 LIBS=$ac_check_lib_save_LIBS
19473 fi
19474 echo "$as_me:19474: result: $ac_cv_lib_iconv_libiconv_open" >&5
19475 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19476 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19477
19478 cf_add_libs="$LIBS"
19479 # reverse order
19480 cf_add_0lib=
19481 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19482 # filter duplicates
19483 for cf_add_1lib in $cf_add_0lib; do
19484 for cf_add_2lib in $cf_add_libs; do
19485 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19486 cf_add_1lib=
19487 break
19488 fi
19489 done
19490 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19491 done
19492 LIBS="$cf_add_libs"
19493
19494 fi
19495
19496 echo "$as_me:19496: checking for libintl_gettext in -lintl" >&5
19497 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19498 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19499 echo $ECHO_N "(cached) $ECHO_C" >&6
19500 else
19501 ac_check_lib_save_LIBS=$LIBS
19502 LIBS="-lintl $LIBS"
19503 cat >"conftest.$ac_ext" <<_ACEOF
19504 #line 19504 "configure"
19505 #include "confdefs.h"
19506
19507 /* Override any gcc2 internal prototype to avoid an error. */
19508 #ifdef __cplusplus
19509 extern "C"
19510 #endif
19511 /* We use char because int might match the return type of a gcc2
19512 builtin and then its argument prototype would still apply. */
19513 char libintl_gettext (void);
19514 int
19515 main (void)
19516 {
19517 libintl_gettext ();
19518 ;
19519 return 0;
19520 }
19521 _ACEOF
19522 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19523 if { (eval echo "$as_me:19523: \"$ac_link\"") >&5
19524 (eval $ac_link) 2>&5
19525 ac_status=$?
19526 echo "$as_me:19526: \$? = $ac_status" >&5
19527 (exit "$ac_status"); } &&
19528 { ac_try='test -s "conftest$ac_exeext"'
19529 { (eval echo "$as_me:19529: \"$ac_try\"") >&5
19530 (eval $ac_try) 2>&5
19531 ac_status=$?
19532 echo "$as_me:19532: \$? = $ac_status" >&5
19533 (exit "$ac_status"); }; }; then
19534 ac_cv_lib_intl_libintl_gettext=yes
19535 else
19536 echo "$as_me: failed program was:" >&5
19537 cat "conftest.$ac_ext" >&5
19538 ac_cv_lib_intl_libintl_gettext=no
19539 fi
19540 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19541 LIBS=$ac_check_lib_save_LIBS
19542 fi
19543 echo "$as_me:19543: result: $ac_cv_lib_intl_libintl_gettext" >&5
19544 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19545 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19546
19547 cf_add_libs="$LIBS"
19548 # reverse order
19549 cf_add_0lib=
19550 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19551 # filter duplicates
19552 for cf_add_1lib in $cf_add_0lib; do
19553 for cf_add_2lib in $cf_add_libs; do
19554 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19555 cf_add_1lib=
19556 break
19557 fi
19558 done
19559 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19560 done
19561 LIBS="$cf_add_libs"
19562
19563 fi
19564
19565 echo "$as_me:19565: checking for tre_regcomp in -ltre" >&5
19566 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19567 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19568 echo $ECHO_N "(cached) $ECHO_C" >&6
19569 else
19570 ac_check_lib_save_LIBS=$LIBS
19571 LIBS="-ltre $LIBS"
19572 cat >"conftest.$ac_ext" <<_ACEOF
19573 #line 19573 "configure"
19574 #include "confdefs.h"
19575
19576 /* Override any gcc2 internal prototype to avoid an error. */
19577 #ifdef __cplusplus
19578 extern "C"
19579 #endif
19580 /* We use char because int might match the return type of a gcc2
19581 builtin and then its argument prototype would still apply. */
19582 char tre_regcomp (void);
19583 int
19584 main (void)
19585 {
19586 tre_regcomp ();
19587 ;
19588 return 0;
19589 }
19590 _ACEOF
19591 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19592 if { (eval echo "$as_me:19592: \"$ac_link\"") >&5
19593 (eval $ac_link) 2>&5
19594 ac_status=$?
19595 echo "$as_me:19595: \$? = $ac_status" >&5
19596 (exit "$ac_status"); } &&
19597 { ac_try='test -s "conftest$ac_exeext"'
19598 { (eval echo "$as_me:19598: \"$ac_try\"") >&5
19599 (eval $ac_try) 2>&5
19600 ac_status=$?
19601 echo "$as_me:19601: \$? = $ac_status" >&5
19602 (exit "$ac_status"); }; }; then
19603 ac_cv_lib_tre_tre_regcomp=yes
19604 else
19605 echo "$as_me: failed program was:" >&5
19606 cat "conftest.$ac_ext" >&5
19607 ac_cv_lib_tre_tre_regcomp=no
19608 fi
19609 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19610 LIBS=$ac_check_lib_save_LIBS
19611 fi
19612 echo "$as_me:19612: result: $ac_cv_lib_tre_tre_regcomp" >&5
19613 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19614 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19615
19616 cf_add_libs="$LIBS"
19617 # reverse order
19618 cf_add_0lib=
19619 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19620 # filter duplicates
19621 for cf_add_1lib in $cf_add_0lib; do
19622 for cf_add_2lib in $cf_add_libs; do
19623 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19624 cf_add_1lib=
19625 break
19626 fi
19627 done
19628 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19629 done
19630 LIBS="$cf_add_libs"
19631
19632 fi
19633
19634 cf_add_libs="$LIBS"
19635 # reverse order
19636 cf_add_0lib=
19637 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19638 # filter duplicates
19639 for cf_add_1lib in $cf_add_0lib; do
19640 for cf_add_2lib in $cf_add_libs; do
19641 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19642 cf_add_1lib=
19643 break
19644 fi
19645 done
19646 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19647 done
19648 LIBS="$cf_add_libs"
19649
19650 cf_regex_func=regcomp
19651
19652 else
19653
19654 echo "$as_me:19654: checking for regcomp in -lgnurx" >&5
19655 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19656 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19657 echo $ECHO_N "(cached) $ECHO_C" >&6
19658 else
19659 ac_check_lib_save_LIBS=$LIBS
19660 LIBS="-lgnurx $LIBS"
19661 cat >"conftest.$ac_ext" <<_ACEOF
19662 #line 19662 "configure"
19663 #include "confdefs.h"
19664
19665 /* Override any gcc2 internal prototype to avoid an error. */
19666 #ifdef __cplusplus
19667 extern "C"
19668 #endif
19669 /* We use char because int might match the return type of a gcc2
19670 builtin and then its argument prototype would still apply. */
19671 char regcomp (void);
19672 int
19673 main (void)
19674 {
19675 regcomp ();
19676 ;
19677 return 0;
19678 }
19679 _ACEOF
19680 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19681 if { (eval echo "$as_me:19681: \"$ac_link\"") >&5
19682 (eval $ac_link) 2>&5
19683 ac_status=$?
19684 echo "$as_me:19684: \$? = $ac_status" >&5
19685 (exit "$ac_status"); } &&
19686 { ac_try='test -s "conftest$ac_exeext"'
19687 { (eval echo "$as_me:19687: \"$ac_try\"") >&5
19688 (eval $ac_try) 2>&5
19689 ac_status=$?
19690 echo "$as_me:19690: \$? = $ac_status" >&5
19691 (exit "$ac_status"); }; }; then
19692 ac_cv_lib_gnurx_regcomp=yes
19693 else
19694 echo "$as_me: failed program was:" >&5
19695 cat "conftest.$ac_ext" >&5
19696 ac_cv_lib_gnurx_regcomp=no
19697 fi
19698 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19699 LIBS=$ac_check_lib_save_LIBS
19700 fi
19701 echo "$as_me:19701: result: $ac_cv_lib_gnurx_regcomp" >&5
19702 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19703 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19704
19705 cf_add_libs="$LIBS"
19706 # reverse order
19707 cf_add_0lib=
19708 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19709 # filter duplicates
19710 for cf_add_1lib in $cf_add_0lib; do
19711 for cf_add_2lib in $cf_add_libs; do
19712 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19713 cf_add_1lib=
19714 break
19715 fi
19716 done
19717 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19718 done
19719 LIBS="$cf_add_libs"
19720
19721 cf_regex_func=regcomp
19722 fi
19723
19724 fi
19725
19726 ;;
19727 (*)
19728 cf_regex_libs="regex re"
19729 echo "$as_me:19729: checking for regcomp" >&5
19730 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19731 if test "${ac_cv_func_regcomp+set}" = set; then
19732 echo $ECHO_N "(cached) $ECHO_C" >&6
19733 else
19734 cat >"conftest.$ac_ext" <<_ACEOF
19735 #line 19735 "configure"
19736 #include "confdefs.h"
19737 #define regcomp autoconf_temporary
19738 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
19739 #undef regcomp
19740
19741 #ifdef __cplusplus
19742 extern "C"
19743 #endif
19744
19745 /* We use char because int might match the return type of a gcc2
19746 builtin and then its argument prototype would still apply. */
19747 char regcomp (void);
19748
19749 int
19750 main (void)
19751 {
19752
19753 /* The GNU C library defines stubs for functions which it implements
19754 to always fail with ENOSYS. Some functions are actually named
19755 something starting with __ and the normal name is an alias. */
19756 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19757 #error found stub for regcomp
19758 #endif
19759
19760 return regcomp ();
19761 ;
19762 return 0;
19763 }
19764 _ACEOF
19765 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19766 if { (eval echo "$as_me:19766: \"$ac_link\"") >&5
19767 (eval $ac_link) 2>&5
19768 ac_status=$?
19769 echo "$as_me:19769: \$? = $ac_status" >&5
19770 (exit "$ac_status"); } &&
19771 { ac_try='test -s "conftest$ac_exeext"'
19772 { (eval echo "$as_me:19772: \"$ac_try\"") >&5
19773 (eval $ac_try) 2>&5
19774 ac_status=$?
19775 echo "$as_me:19775: \$? = $ac_status" >&5
19776 (exit "$ac_status"); }; }; then
19777 ac_cv_func_regcomp=yes
19778 else
19779 echo "$as_me: failed program was:" >&5
19780 cat "conftest.$ac_ext" >&5
19781 ac_cv_func_regcomp=no
19782 fi
19783 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19784 fi
19785 echo "$as_me:19785: result: $ac_cv_func_regcomp" >&5
19786 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19787 if test "$ac_cv_func_regcomp" = yes; then
19788 cf_regex_func=regcomp
19789 else
19790
19791 for cf_regex_lib in $cf_regex_libs
19792 do
19793 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19794 echo "$as_me:19794: checking for regcomp in -l$cf_regex_lib" >&5
19795 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19796 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19797 echo $ECHO_N "(cached) $ECHO_C" >&6
19798 else
19799 ac_check_lib_save_LIBS=$LIBS
19800 LIBS="-l$cf_regex_lib $LIBS"
19801 cat >"conftest.$ac_ext" <<_ACEOF
19802 #line 19802 "configure"
19803 #include "confdefs.h"
19804
19805 /* Override any gcc2 internal prototype to avoid an error. */
19806 #ifdef __cplusplus
19807 extern "C"
19808 #endif
19809 /* We use char because int might match the return type of a gcc2
19810 builtin and then its argument prototype would still apply. */
19811 char regcomp (void);
19812 int
19813 main (void)
19814 {
19815 regcomp ();
19816 ;
19817 return 0;
19818 }
19819 _ACEOF
19820 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19821 if { (eval echo "$as_me:19821: \"$ac_link\"") >&5
19822 (eval $ac_link) 2>&5
19823 ac_status=$?
19824 echo "$as_me:19824: \$? = $ac_status" >&5
19825 (exit "$ac_status"); } &&
19826 { ac_try='test -s "conftest$ac_exeext"'
19827 { (eval echo "$as_me:19827: \"$ac_try\"") >&5
19828 (eval $ac_try) 2>&5
19829 ac_status=$?
19830 echo "$as_me:19830: \$? = $ac_status" >&5
19831 (exit "$ac_status"); }; }; then
19832 eval "$as_ac_Lib=yes"
19833 else
19834 echo "$as_me: failed program was:" >&5
19835 cat "conftest.$ac_ext" >&5
19836 eval "$as_ac_Lib=no"
19837 fi
19838 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19839 LIBS=$ac_check_lib_save_LIBS
19840 fi
19841 echo "$as_me:19841: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19842 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19843 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19844
19845 cf_add_libs="$LIBS"
19846 # reverse order
19847 cf_add_0lib=
19848 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19849 # filter duplicates
19850 for cf_add_1lib in $cf_add_0lib; do
19851 for cf_add_2lib in $cf_add_libs; do
19852 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19853 cf_add_1lib=
19854 break
19855 fi
19856 done
19857 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19858 done
19859 LIBS="$cf_add_libs"
19860
19861 cf_regex_func=regcomp
19862 break
19863 fi
19864
19865 done
19866
19867 fi
19868
19869 ;;
19870 esac
19871
19872 if test "$cf_regex_func" = no ; then
19873 echo "$as_me:19873: checking for compile" >&5
19874 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19875 if test "${ac_cv_func_compile+set}" = set; then
19876 echo $ECHO_N "(cached) $ECHO_C" >&6
19877 else
19878 cat >"conftest.$ac_ext" <<_ACEOF
19879 #line 19879 "configure"
19880 #include "confdefs.h"
19881 #define compile autoconf_temporary
19882 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
19883 #undef compile
19884
19885 #ifdef __cplusplus
19886 extern "C"
19887 #endif
19888
19889 /* We use char because int might match the return type of a gcc2
19890 builtin and then its argument prototype would still apply. */
19891 char compile (void);
19892
19893 int
19894 main (void)
19895 {
19896
19897 /* The GNU C library defines stubs for functions which it implements
19898 to always fail with ENOSYS. Some functions are actually named
19899 something starting with __ and the normal name is an alias. */
19900 #if defined (__stub_compile) || defined (__stub___compile)
19901 #error found stub for compile
19902 #endif
19903
19904 return compile ();
19905 ;
19906 return 0;
19907 }
19908 _ACEOF
19909 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19910 if { (eval echo "$as_me:19910: \"$ac_link\"") >&5
19911 (eval $ac_link) 2>&5
19912 ac_status=$?
19913 echo "$as_me:19913: \$? = $ac_status" >&5
19914 (exit "$ac_status"); } &&
19915 { ac_try='test -s "conftest$ac_exeext"'
19916 { (eval echo "$as_me:19916: \"$ac_try\"") >&5
19917 (eval $ac_try) 2>&5
19918 ac_status=$?
19919 echo "$as_me:19919: \$? = $ac_status" >&5
19920 (exit "$ac_status"); }; }; then
19921 ac_cv_func_compile=yes
19922 else
19923 echo "$as_me: failed program was:" >&5
19924 cat "conftest.$ac_ext" >&5
19925 ac_cv_func_compile=no
19926 fi
19927 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19928 fi
19929 echo "$as_me:19929: result: $ac_cv_func_compile" >&5
19930 echo "${ECHO_T}$ac_cv_func_compile" >&6
19931 if test "$ac_cv_func_compile" = yes; then
19932 cf_regex_func=compile
19933 else
19934
19935 echo "$as_me:19935: checking for compile in -lgen" >&5
19936 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19937 if test "${ac_cv_lib_gen_compile+set}" = set; then
19938 echo $ECHO_N "(cached) $ECHO_C" >&6
19939 else
19940 ac_check_lib_save_LIBS=$LIBS
19941 LIBS="-lgen $LIBS"
19942 cat >"conftest.$ac_ext" <<_ACEOF
19943 #line 19943 "configure"
19944 #include "confdefs.h"
19945
19946 /* Override any gcc2 internal prototype to avoid an error. */
19947 #ifdef __cplusplus
19948 extern "C"
19949 #endif
19950 /* We use char because int might match the return type of a gcc2
19951 builtin and then its argument prototype would still apply. */
19952 char compile (void);
19953 int
19954 main (void)
19955 {
19956 compile ();
19957 ;
19958 return 0;
19959 }
19960 _ACEOF
19961 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19962 if { (eval echo "$as_me:19962: \"$ac_link\"") >&5
19963 (eval $ac_link) 2>&5
19964 ac_status=$?
19965 echo "$as_me:19965: \$? = $ac_status" >&5
19966 (exit "$ac_status"); } &&
19967 { ac_try='test -s "conftest$ac_exeext"'
19968 { (eval echo "$as_me:19968: \"$ac_try\"") >&5
19969 (eval $ac_try) 2>&5
19970 ac_status=$?
19971 echo "$as_me:19971: \$? = $ac_status" >&5
19972 (exit "$ac_status"); }; }; then
19973 ac_cv_lib_gen_compile=yes
19974 else
19975 echo "$as_me: failed program was:" >&5
19976 cat "conftest.$ac_ext" >&5
19977 ac_cv_lib_gen_compile=no
19978 fi
19979 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19980 LIBS=$ac_check_lib_save_LIBS
19981 fi
19982 echo "$as_me:19982: result: $ac_cv_lib_gen_compile" >&5
19983 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19984 if test "$ac_cv_lib_gen_compile" = yes; then
19985
19986 cf_add_libs="$LIBS"
19987 # reverse order
19988 cf_add_0lib=
19989 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19990 # filter duplicates
19991 for cf_add_1lib in $cf_add_0lib; do
19992 for cf_add_2lib in $cf_add_libs; do
19993 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19994 cf_add_1lib=
19995 break
19996 fi
19997 done
19998 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19999 done
20000 LIBS="$cf_add_libs"
20001
20002 cf_regex_func=compile
20003 fi
20004
20005 fi
20006
20007 fi
20008
20009 if test "$cf_regex_func" = no ; then
20010 { echo "$as_me:20010: WARNING: cannot find regular expression library" >&5
20011 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20012 fi
20013
20014 echo "$as_me:20014: checking for regular-expression headers" >&5
20015 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20016 if test "${cf_cv_regex_hdrs+set}" = set; then
20017 echo $ECHO_N "(cached) $ECHO_C" >&6
20018 else
20019
20020 cf_cv_regex_hdrs=no
20021 case "$cf_regex_func" in
20022 (compile)
20023 for cf_regex_hdr in regexp.h regexpr.h
20024 do
20025 cat >"conftest.$ac_ext" <<_ACEOF
20026 #line 20026 "configure"
20027 #include "confdefs.h"
20028 #include <$cf_regex_hdr>
20029 int
20030 main (void)
20031 {
20032
20033 char *p = compile("", "", "", 0);
20034 int x = step("", "");
20035 (void)p;
20036 (void)x;
20037
20038 ;
20039 return 0;
20040 }
20041 _ACEOF
20042 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20043 if { (eval echo "$as_me:20043: \"$ac_link\"") >&5
20044 (eval $ac_link) 2>&5
20045 ac_status=$?
20046 echo "$as_me:20046: \$? = $ac_status" >&5
20047 (exit "$ac_status"); } &&
20048 { ac_try='test -s "conftest$ac_exeext"'
20049 { (eval echo "$as_me:20049: \"$ac_try\"") >&5
20050 (eval $ac_try) 2>&5
20051 ac_status=$?
20052 echo "$as_me:20052: \$? = $ac_status" >&5
20053 (exit "$ac_status"); }; }; then
20054
20055 cf_cv_regex_hdrs=$cf_regex_hdr
20056 break
20057
20058 else
20059 echo "$as_me: failed program was:" >&5
20060 cat "conftest.$ac_ext" >&5
20061 fi
20062 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20063 done
20064 ;;
20065 (*)
20066 for cf_regex_hdr in regex.h
20067 do
20068 cat >"conftest.$ac_ext" <<_ACEOF
20069 #line 20069 "configure"
20070 #include "confdefs.h"
20071 #include <sys/types.h>
20072 #include <stdio.h>
20073 #include <$cf_regex_hdr>
20074 int
20075 main (void)
20076 {
20077
20078 regex_t *p = NULL;
20079 int x = regcomp(p, "", 0);
20080 int y = regexec(p, "", 0, 0, 0);
20081 (void)x;
20082 (void)y;
20083 regfree(p);
20084
20085 ;
20086 return 0;
20087 }
20088 _ACEOF
20089 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20090 if { (eval echo "$as_me:20090: \"$ac_link\"") >&5
20091 (eval $ac_link) 2>&5
20092 ac_status=$?
20093 echo "$as_me:20093: \$? = $ac_status" >&5
20094 (exit "$ac_status"); } &&
20095 { ac_try='test -s "conftest$ac_exeext"'
20096 { (eval echo "$as_me:20096: \"$ac_try\"") >&5
20097 (eval $ac_try) 2>&5
20098 ac_status=$?
20099 echo "$as_me:20099: \$? = $ac_status" >&5
20100 (exit "$ac_status"); }; }; then
20101
20102 cf_cv_regex_hdrs=$cf_regex_hdr
20103 break
20104
20105 else
20106 echo "$as_me: failed program was:" >&5
20107 cat "conftest.$ac_ext" >&5
20108 fi
20109 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20110 done
20111 ;;
20112 esac
20113
20114 fi
20115 echo "$as_me:20115: result: $cf_cv_regex_hdrs" >&5
20116 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20117
20118 case "$cf_cv_regex_hdrs" in
20119 (no) { echo "$as_me:20119: WARNING: no regular expression header found" >&5
20120 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20121 (regex.h)
20122 cat >>confdefs.h <<\EOF
20123 #define HAVE_REGEX_H_FUNCS 1
20124 EOF
20125 ;;
20126 (regexp.h)
20127 cat >>confdefs.h <<\EOF
20128 #define HAVE_REGEXP_H_FUNCS 1
20129 EOF
20130 ;;
20131 (regexpr.h)
20132 cat >>confdefs.h <<\EOF
20133 #define HAVE_REGEXPR_H_FUNCS 1
20134 EOF
20135 ;;
20136 esac
20137
20138 for ac_header in \
20139 alloca.h \
20140 fcntl.h \
20141 getopt.h \
20142 limits.h \
20143 locale.h \
20144 malloc.h \
20145 math.h \
20146 poll.h \
20147 sys/auxv.h \
20148 sys/fsuid.h \
20149 sys/ioctl.h \
20150 sys/param.h \
20151 sys/poll.h \
20152 sys/select.h \
20153 sys/time.h \
20154 sys/times.h \
20155 unistd.h \
20156 wctype.h \
20157
20158 do
20159 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20160 echo "$as_me:20160: checking for $ac_header" >&5
20161 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20162 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20163 echo $ECHO_N "(cached) $ECHO_C" >&6
20164 else
20165 cat >"conftest.$ac_ext" <<_ACEOF
20166 #line 20166 "configure"
20167 #include "confdefs.h"
20168 #include <$ac_header>
20169 _ACEOF
20170 if { (eval echo "$as_me:20170: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20171 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20172 ac_status=$?
20173 $EGREP -v '^ *\+' conftest.er1 >conftest.err
20174 rm -f conftest.er1
20175 cat conftest.err >&5
20176 echo "$as_me:20176: \$? = $ac_status" >&5
20177 (exit "$ac_status"); } >/dev/null; then
20178 if test -s conftest.err; then
20179 ac_cpp_err=$ac_c_preproc_warn_flag
20180 else
20181 ac_cpp_err=
20182 fi
20183 else
20184 ac_cpp_err=yes
20185 fi
20186 if test -z "$ac_cpp_err"; then
20187 eval "$as_ac_Header=yes"
20188 else
20189 echo "$as_me: failed program was:" >&5
20190 cat "conftest.$ac_ext" >&5
20191 eval "$as_ac_Header=no"
20192 fi
20193 rm -f conftest.err "conftest.$ac_ext"
20194 fi
20195 echo "$as_me:20195: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20196 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20197 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20198 cat >>confdefs.h <<EOF
20199 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20200 EOF
20201
20202 fi
20203 done
20204
20205 for ac_header in getopt.h
20206 do
20207 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20208 echo "$as_me:20208: checking for $ac_header" >&5
20209 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20210 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20211 echo $ECHO_N "(cached) $ECHO_C" >&6
20212 else
20213 cat >"conftest.$ac_ext" <<_ACEOF
20214 #line 20214 "configure"
20215 #include "confdefs.h"
20216 #include <$ac_header>
20217 _ACEOF
20218 if { (eval echo "$as_me:20218: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20219 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20220 ac_status=$?
20221 $EGREP -v '^ *\+' conftest.er1 >conftest.err
20222 rm -f conftest.er1
20223 cat conftest.err >&5
20224 echo "$as_me:20224: \$? = $ac_status" >&5
20225 (exit "$ac_status"); } >/dev/null; then
20226 if test -s conftest.err; then
20227 ac_cpp_err=$ac_c_preproc_warn_flag
20228 else
20229 ac_cpp_err=
20230 fi
20231 else
20232 ac_cpp_err=yes
20233 fi
20234 if test -z "$ac_cpp_err"; then
20235 eval "$as_ac_Header=yes"
20236 else
20237 echo "$as_me: failed program was:" >&5
20238 cat "conftest.$ac_ext" >&5
20239 eval "$as_ac_Header=no"
20240 fi
20241 rm -f conftest.err "conftest.$ac_ext"
20242 fi
20243 echo "$as_me:20243: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20244 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20245 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20246 cat >>confdefs.h <<EOF
20247 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20248 EOF
20249
20250 fi
20251 done
20252
20253 echo "$as_me:20253: checking for header declaring getopt variables" >&5
20254 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20255 if test "${cf_cv_getopt_header+set}" = set; then
20256 echo $ECHO_N "(cached) $ECHO_C" >&6
20257 else
20258
20259 cf_cv_getopt_header=none
20260 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20261 do
20262 cat >"conftest.$ac_ext" <<_ACEOF
20263 #line 20263 "configure"
20264 #include "confdefs.h"
20265
20266 #include <$cf_header>
20267 int
20268 main (void)
20269 {
20270 int x = optind; char *y = optarg; (void)x; (void)y
20271 ;
20272 return 0;
20273 }
20274 _ACEOF
20275 rm -f "conftest.$ac_objext"
20276 if { (eval echo "$as_me:20276: \"$ac_compile\"") >&5
20277 (eval $ac_compile) 2>&5
20278 ac_status=$?
20279 echo "$as_me:20279: \$? = $ac_status" >&5
20280 (exit "$ac_status"); } &&
20281 { ac_try='test -s "conftest.$ac_objext"'
20282 { (eval echo "$as_me:20282: \"$ac_try\"") >&5
20283 (eval $ac_try) 2>&5
20284 ac_status=$?
20285 echo "$as_me:20285: \$? = $ac_status" >&5
20286 (exit "$ac_status"); }; }; then
20287 cf_cv_getopt_header=$cf_header
20288 break
20289 else
20290 echo "$as_me: failed program was:" >&5
20291 cat "conftest.$ac_ext" >&5
20292 fi
20293 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20294 done
20295
20296 fi
20297 echo "$as_me:20297: result: $cf_cv_getopt_header" >&5
20298 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20299 if test "$cf_cv_getopt_header" != none ; then
20300
20301 cat >>confdefs.h <<\EOF
20302 #define HAVE_GETOPT_HEADER 1
20303 EOF
20304
20305 fi
20306 if test "$cf_cv_getopt_header" = getopt.h ; then
20307
20308 cat >>confdefs.h <<\EOF
20309 #define NEED_GETOPT_H 1
20310 EOF
20311
20312 fi
20313
20314 echo "$as_me:20314: checking if external environ is declared" >&5
20315 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20316 if test "${cf_cv_dcl_environ+set}" = set; then
20317 echo $ECHO_N "(cached) $ECHO_C" >&6
20318 else
20319
20320 cat >"conftest.$ac_ext" <<_ACEOF
20321 #line 20321 "configure"
20322 #include "confdefs.h"
20323
20324 $ac_includes_default
20325 int
20326 main (void)
20327 {
20328 void* x = (void*) environ; (void)x
20329 ;
20330 return 0;
20331 }
20332 _ACEOF
20333 rm -f "conftest.$ac_objext"
20334 if { (eval echo "$as_me:20334: \"$ac_compile\"") >&5
20335 (eval $ac_compile) 2>&5
20336 ac_status=$?
20337 echo "$as_me:20337: \$? = $ac_status" >&5
20338 (exit "$ac_status"); } &&
20339 { ac_try='test -s "conftest.$ac_objext"'
20340 { (eval echo "$as_me:20340: \"$ac_try\"") >&5
20341 (eval $ac_try) 2>&5
20342 ac_status=$?
20343 echo "$as_me:20343: \$? = $ac_status" >&5
20344 (exit "$ac_status"); }; }; then
20345 cf_cv_dcl_environ=yes
20346 else
20347 echo "$as_me: failed program was:" >&5
20348 cat "conftest.$ac_ext" >&5
20349 cf_cv_dcl_environ=no
20350 fi
20351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20352
20353 fi
20354 echo "$as_me:20354: result: $cf_cv_dcl_environ" >&5
20355 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20356
20357 if test "$cf_cv_dcl_environ" = no ; then
20358
20359 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20360
20361 cat >>confdefs.h <<EOF
20362 #define $cf_result 1
20363 EOF
20364
20365 fi
20366
20367 # It's possible (for near-UNIX clones) that the data doesn't exist
20368
20369 echo "$as_me:20369: checking if external environ exists" >&5
20370 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20371 if test "${cf_cv_have_environ+set}" = set; then
20372 echo $ECHO_N "(cached) $ECHO_C" >&6
20373 else
20374
20375 cat >"conftest.$ac_ext" <<_ACEOF
20376 #line 20376 "configure"
20377 #include "confdefs.h"
20378
20379 #undef environ
20380 extern int environ;
20381
20382 int
20383 main (void)
20384 {
20385 environ = 2
20386 ;
20387 return 0;
20388 }
20389 _ACEOF
20390 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20391 if { (eval echo "$as_me:20391: \"$ac_link\"") >&5
20392 (eval $ac_link) 2>&5
20393 ac_status=$?
20394 echo "$as_me:20394: \$? = $ac_status" >&5
20395 (exit "$ac_status"); } &&
20396 { ac_try='test -s "conftest$ac_exeext"'
20397 { (eval echo "$as_me:20397: \"$ac_try\"") >&5
20398 (eval $ac_try) 2>&5
20399 ac_status=$?
20400 echo "$as_me:20400: \$? = $ac_status" >&5
20401 (exit "$ac_status"); }; }; then
20402 cf_cv_have_environ=yes
20403 else
20404 echo "$as_me: failed program was:" >&5
20405 cat "conftest.$ac_ext" >&5
20406 cf_cv_have_environ=no
20407 fi
20408 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20409
20410 fi
20411 echo "$as_me:20411: result: $cf_cv_have_environ" >&5
20412 echo "${ECHO_T}$cf_cv_have_environ" >&6
20413
20414 if test "$cf_cv_have_environ" = yes ; then
20415
20416 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20417
20418 cat >>confdefs.h <<EOF
20419 #define $cf_result 1
20420 EOF
20421
20422 fi
20423
20424 echo "$as_me:20424: checking for getenv" >&5
20425 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20426 if test "${ac_cv_func_getenv+set}" = set; then
20427 echo $ECHO_N "(cached) $ECHO_C" >&6
20428 else
20429 cat >"conftest.$ac_ext" <<_ACEOF
20430 #line 20430 "configure"
20431 #include "confdefs.h"
20432 #define getenv autoconf_temporary
20433 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20434 #undef getenv
20435
20436 #ifdef __cplusplus
20437 extern "C"
20438 #endif
20439
20440 /* We use char because int might match the return type of a gcc2
20441 builtin and then its argument prototype would still apply. */
20442 char getenv (void);
20443
20444 int
20445 main (void)
20446 {
20447
20448 /* The GNU C library defines stubs for functions which it implements
20449 to always fail with ENOSYS. Some functions are actually named
20450 something starting with __ and the normal name is an alias. */
20451 #if defined (__stub_getenv) || defined (__stub___getenv)
20452 #error found stub for getenv
20453 #endif
20454
20455 return getenv ();
20456 ;
20457 return 0;
20458 }
20459 _ACEOF
20460 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20461 if { (eval echo "$as_me:20461: \"$ac_link\"") >&5
20462 (eval $ac_link) 2>&5
20463 ac_status=$?
20464 echo "$as_me:20464: \$? = $ac_status" >&5
20465 (exit "$ac_status"); } &&
20466 { ac_try='test -s "conftest$ac_exeext"'
20467 { (eval echo "$as_me:20467: \"$ac_try\"") >&5
20468 (eval $ac_try) 2>&5
20469 ac_status=$?
20470 echo "$as_me:20470: \$? = $ac_status" >&5
20471 (exit "$ac_status"); }; }; then
20472 ac_cv_func_getenv=yes
20473 else
20474 echo "$as_me: failed program was:" >&5
20475 cat "conftest.$ac_ext" >&5
20476 ac_cv_func_getenv=no
20477 fi
20478 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20479 fi
20480 echo "$as_me:20480: result: $ac_cv_func_getenv" >&5
20481 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20482
20483 for ac_func in putenv setenv strdup
20484 do
20485 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20486 echo "$as_me:20486: checking for $ac_func" >&5
20487 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20488 if eval "test \"\${$as_ac_var+set}\" = set"; then
20489 echo $ECHO_N "(cached) $ECHO_C" >&6
20490 else
20491 cat >"conftest.$ac_ext" <<_ACEOF
20492 #line 20492 "configure"
20493 #include "confdefs.h"
20494 #define $ac_func autoconf_temporary
20495 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20496 #undef $ac_func
20497
20498 #ifdef __cplusplus
20499 extern "C"
20500 #endif
20501
20502 /* We use char because int might match the return type of a gcc2
20503 builtin and then its argument prototype would still apply. */
20504 char $ac_func (void);
20505
20506 int
20507 main (void)
20508 {
20509
20510 /* The GNU C library defines stubs for functions which it implements
20511 to always fail with ENOSYS. Some functions are actually named
20512 something starting with __ and the normal name is an alias. */
20513 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20514 #error found stub for $ac_func
20515 #endif
20516
20517 return $ac_func ();
20518 ;
20519 return 0;
20520 }
20521 _ACEOF
20522 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20523 if { (eval echo "$as_me:20523: \"$ac_link\"") >&5
20524 (eval $ac_link) 2>&5
20525 ac_status=$?
20526 echo "$as_me:20526: \$? = $ac_status" >&5
20527 (exit "$ac_status"); } &&
20528 { ac_try='test -s "conftest$ac_exeext"'
20529 { (eval echo "$as_me:20529: \"$ac_try\"") >&5
20530 (eval $ac_try) 2>&5
20531 ac_status=$?
20532 echo "$as_me:20532: \$? = $ac_status" >&5
20533 (exit "$ac_status"); }; }; then
20534 eval "$as_ac_var=yes"
20535 else
20536 echo "$as_me: failed program was:" >&5
20537 cat "conftest.$ac_ext" >&5
20538 eval "$as_ac_var=no"
20539 fi
20540 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20541 fi
20542 echo "$as_me:20542: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20543 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20544 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20545 cat >>confdefs.h <<EOF
20546 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20547 EOF
20548
20549 fi
20550 done
20551
20552 echo "$as_me:20552: checking if getenv returns consistent values" >&5
20553 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20554 if test "${cf_cv_consistent_getenv+set}" = set; then
20555 echo $ECHO_N "(cached) $ECHO_C" >&6
20556 else
20557
20558 if test "$cross_compiling" = yes; then
20559 cf_cv_consistent_getenv=unknown
20560 else
20561 cat >"conftest.$ac_ext" <<_ACEOF
20562 #line 20562 "configure"
20563 #include "confdefs.h"
20564
20565 $ac_includes_default
20566
20567 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20568 extern char **environ; /* POSIX, but some systems are not... */
20569 #endif
20570
20571 #if defined(HAVE_STRDUP)
20572 #define str_alloc(s) strdup(s)
20573 #else
20574 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20575 #endif
20576
20577 static void set_value(const char *name, const char *value)
20578 {
20579 #if defined(HAVE_SETENV)
20580 setenv(name, value, 1);
20581 #elif defined(HAVE_PUTENV)
20582 char buffer[1024];
20583 sprintf(buffer, "%s=%s", name, value);
20584 putenv(str_alloc(buffer));
20585 #else
20586 #error neither putenv/setenv found
20587 #endif
20588 }
20589 int main(void)
20590 {
20591 int pass;
20592 size_t numenv, limit, j;
20593 char **mynames;
20594 char **myvalues;
20595 char **mypointer;
20596 char *equals;
20597 for (numenv = 0; environ[numenv]; ++numenv) ;
20598 limit = numenv + 10;
20599 mynames = (char **) calloc(limit + 1, sizeof(char *));
20600 myvalues = (char **) calloc(limit + 1, sizeof(char *));
20601 mypointer = (char **) calloc(limit + 1, sizeof(char *));
20602 #if defined(HAVE_ENVIRON)
20603 for (j = 0; environ[j]; ++j) {
20604 mynames[j] = str_alloc(environ[j]);
20605 equals = strchr(mynames[j], '=');
20606 if (equals != NULL) {
20607 *equals++ = '\\0';
20608 myvalues[j] = str_alloc(equals);
20609 } else {
20610 myvalues[j] = str_alloc("");
20611 }
20612 }
20613 #endif
20614 for (j = numenv; j < limit; ++j) {
20615 char name[80];
20616 char value[80];
20617 size_t found;
20618 size_t k = 0;
20619 do {
20620 size_t jk;
20621 found = 0;
20622 sprintf(name, "TERM%lu", (unsigned long) k);
20623 for (jk = 0; jk < j; ++jk) {
20624 if (!strcmp(name, mynames[jk])) {
20625 found = 1;
20626 ++k;
20627 break;
20628 }
20629 }
20630 } while (found);
20631 sprintf(value, "%lu:%p", (unsigned long) k, (void*)&mynames[j]);
20632 set_value(name, value);
20633 mynames[j] = str_alloc(name);
20634 myvalues[j] = str_alloc(value);
20635 }
20636 for (pass = 0; pass < 3; ++pass) {
20637 for (j = 0; j < limit; ++j) {
20638 char *value = getenv(mynames[j]);
20639 if (pass) {
20640 if (value == 0) {
20641 fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20642 ${cf_cv_main_return:-return}(1);
20643 } else if (value != mypointer[j]) {
20644 fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20645 ${cf_cv_main_return:-return}(1);
20646 } else if (strcmp(value, myvalues[j])) {
20647 fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20648 ${cf_cv_main_return:-return}(1);
20649 }
20650 } else {
20651 size_t k;
20652 mypointer[j] = value;
20653 for (k = 0; k < j; ++k) {
20654 if (mypointer[j] == mypointer[k]) {
20655 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20656 ${cf_cv_main_return:-return}(1);
20657 }
20658 }
20659 }
20660 }
20661 }
20662 ${cf_cv_main_return:-return}(0);
20663 }
20664
20665 _ACEOF
20666 rm -f "conftest$ac_exeext"
20667 if { (eval echo "$as_me:20667: \"$ac_link\"") >&5
20668 (eval $ac_link) 2>&5
20669 ac_status=$?
20670 echo "$as_me:20670: \$? = $ac_status" >&5
20671 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20672 { (eval echo "$as_me:20672: \"$ac_try\"") >&5
20673 (eval $ac_try) 2>&5
20674 ac_status=$?
20675 echo "$as_me:20675: \$? = $ac_status" >&5
20676 (exit "$ac_status"); }; }; then
20677 cf_cv_consistent_getenv=yes
20678 else
20679 echo "$as_me: program exited with status $ac_status" >&5
20680 echo "$as_me: failed program was:" >&5
20681 cat "conftest.$ac_ext" >&5
20682 cf_cv_consistent_getenv=no
20683 fi
20684 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20685 fi
20686
20687 fi
20688 echo "$as_me:20688: result: $cf_cv_consistent_getenv" >&5
20689 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20690
20691 if test "x$cf_cv_consistent_getenv" = xno
20692 then
20693
20694 cat >>confdefs.h <<\EOF
20695 #define HAVE_CONSISTENT_GETENV 1
20696 EOF
20697
20698 fi
20699
20700 if test "x$cf_cv_consistent_getenv" = xno && \
20701 test "x$cf_with_trace" = xyes
20702 then
20703 { echo "$as_me:20703: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20704 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20705 fi
20706
20707 echo "$as_me:20707: checking if sys/time.h works with sys/select.h" >&5
20708 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20709 if test "${cf_cv_sys_time_select+set}" = set; then
20710 echo $ECHO_N "(cached) $ECHO_C" >&6
20711 else
20712
20713 cat >"conftest.$ac_ext" <<_ACEOF
20714 #line 20714 "configure"
20715 #include "confdefs.h"
20716
20717 #include <sys/types.h>
20718 #ifdef HAVE_SYS_TIME_H
20719 #include <sys/time.h>
20720 #endif
20721 #ifdef HAVE_SYS_SELECT_H
20722 #include <sys/select.h>
20723 #endif
20724
20725 int
20726 main (void)
20727 {
20728
20729 ;
20730 return 0;
20731 }
20732 _ACEOF
20733 rm -f "conftest.$ac_objext"
20734 if { (eval echo "$as_me:20734: \"$ac_compile\"") >&5
20735 (eval $ac_compile) 2>&5
20736 ac_status=$?
20737 echo "$as_me:20737: \$? = $ac_status" >&5
20738 (exit "$ac_status"); } &&
20739 { ac_try='test -s "conftest.$ac_objext"'
20740 { (eval echo "$as_me:20740: \"$ac_try\"") >&5
20741 (eval $ac_try) 2>&5
20742 ac_status=$?
20743 echo "$as_me:20743: \$? = $ac_status" >&5
20744 (exit "$ac_status"); }; }; then
20745 cf_cv_sys_time_select=yes
20746 else
20747 echo "$as_me: failed program was:" >&5
20748 cat "conftest.$ac_ext" >&5
20749 cf_cv_sys_time_select=no
20750 fi
20751 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20752
20753 fi
20754
20755 echo "$as_me:20755: result: $cf_cv_sys_time_select" >&5
20756 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20757 test "$cf_cv_sys_time_select" = yes &&
20758 cat >>confdefs.h <<\EOF
20759 #define HAVE_SYS_TIME_SELECT 1
20760 EOF
20761
20762 ### checks for compiler characteristics
20763 ac_ext=c
20764 ac_cpp='$CPP $CPPFLAGS'
20765 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20766 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20767 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20768 ac_main_return="return"
20769
20770 echo "$as_me:20770: checking for an ANSI C-conforming const" >&5
20771 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20772 if test "${ac_cv_c_const+set}" = set; then
20773 echo $ECHO_N "(cached) $ECHO_C" >&6
20774 else
20775 cat >"conftest.$ac_ext" <<_ACEOF
20776 #line 20776 "configure"
20777 #include "confdefs.h"
20778
20779 int
20780 main (void)
20781 {
20782 /* FIXME: Include the comments suggested by Paul. */
20783 #ifndef __cplusplus
20784 /* Ultrix mips cc rejects this. */
20785 typedef int charset[2];
20786 const charset x;
20787 /* SunOS 4.1.1 cc rejects this. */
20788 char const *const *ccp;
20789 char **p;
20790 /* NEC SVR4.0.2 mips cc rejects this. */
20791 struct point {int x, y;};
20792 static struct point const zero = {0,0};
20793 /* AIX XL C 1.02.0.0 rejects this.
20794 It does not let you subtract one const X* pointer from another in
20795 an arm of an if-expression whose if-part is not a constant
20796 expression */
20797 const char *g = "string";
20798 ccp = &g + (g ? g-g : 0);
20799 /* HPUX 7.0 cc rejects these. */
20800 ++ccp;
20801 p = (char**) ccp;
20802 ccp = (char const *const *) p;
20803 { /* SCO 3.2v4 cc rejects this. */
20804 char *t;
20805 char const *s = 0 ? (char *) 0 : (char const *) 0;
20806
20807 *t++ = 0;
20808 (void)s; (void)x; (void)zero;
20809 }
20810 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20811 int x[] = {25, 17};
20812 const int *foo = &x[0];
20813 ++foo;
20814 (void)foo;
20815 }
20816 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20817 typedef const int *iptr;
20818 iptr p = 0;
20819 ++p;
20820 (void)p;
20821 }
20822 { /* AIX XL C 1.02.0.0 rejects this saying
20823 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20824 struct s { int j; const int *ap[3]; };
20825 struct s *b; b->j = 5;
20826 }
20827 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20828 const int foo = 10;
20829 (void)foo;
20830 }
20831 #endif
20832
20833 ;
20834 return 0;
20835 }
20836 _ACEOF
20837 rm -f "conftest.$ac_objext"
20838 if { (eval echo "$as_me:20838: \"$ac_compile\"") >&5
20839 (eval $ac_compile) 2>&5
20840 ac_status=$?
20841 echo "$as_me:20841: \$? = $ac_status" >&5
20842 (exit "$ac_status"); } &&
20843 { ac_try='test -s "conftest.$ac_objext"'
20844 { (eval echo "$as_me:20844: \"$ac_try\"") >&5
20845 (eval $ac_try) 2>&5
20846 ac_status=$?
20847 echo "$as_me:20847: \$? = $ac_status" >&5
20848 (exit "$ac_status"); }; }; then
20849 ac_cv_c_const=yes
20850 else
20851 echo "$as_me: failed program was:" >&5
20852 cat "conftest.$ac_ext" >&5
20853 ac_cv_c_const=no
20854 fi
20855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20856 fi
20857 echo "$as_me:20857: result: $ac_cv_c_const" >&5
20858 echo "${ECHO_T}$ac_cv_c_const" >&6
20859 if test $ac_cv_c_const = no; then
20860
20861 cat >>confdefs.h <<\EOF
20862 #define const
20863 EOF
20864
20865 fi
20866
20867 echo "$as_me:20867: checking for inline" >&5
20868 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20869 if test "${ac_cv_c_inline+set}" = set; then
20870 echo $ECHO_N "(cached) $ECHO_C" >&6
20871 else
20872 ac_cv_c_inline=no
20873 for ac_kw in inline __inline__ __inline; do
20874 cat >"conftest.$ac_ext" <<_ACEOF
20875 #line 20875 "configure"
20876 #include "confdefs.h"
20877 #ifndef __cplusplus
20878 static $ac_kw int static_foo (void) {return 0; }
20879 $ac_kw int foo (void) {return 0; }
20880 #endif
20881
20882 _ACEOF
20883 rm -f "conftest.$ac_objext"
20884 if { (eval echo "$as_me:20884: \"$ac_compile\"") >&5
20885 (eval $ac_compile) 2>&5
20886 ac_status=$?
20887 echo "$as_me:20887: \$? = $ac_status" >&5
20888 (exit "$ac_status"); } &&
20889 { ac_try='test -s "conftest.$ac_objext"'
20890 { (eval echo "$as_me:20890: \"$ac_try\"") >&5
20891 (eval $ac_try) 2>&5
20892 ac_status=$?
20893 echo "$as_me:20893: \$? = $ac_status" >&5
20894 (exit "$ac_status"); }; }; then
20895 ac_cv_c_inline=$ac_kw; break
20896 else
20897 echo "$as_me: failed program was:" >&5
20898 cat "conftest.$ac_ext" >&5
20899 fi
20900 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20901 done
20902
20903 fi
20904 echo "$as_me:20904: result: $ac_cv_c_inline" >&5
20905 echo "${ECHO_T}$ac_cv_c_inline" >&6
20906 case $ac_cv_c_inline in
20907 inline | yes) ;;
20908 no)
20909 cat >>confdefs.h <<\EOF
20910 #define inline
20911 EOF
20912 ;;
20913 *) cat >>confdefs.h <<EOF
20914 #define inline $ac_cv_c_inline
20915 EOF
20916 ;;
20917 esac
20918
20919 NCURSES_INLINE=
20920 if test "$ac_cv_c_inline" != no ; then
20921 NCURSES_INLINE=inline
20922 if test "$INTEL_COMPILER" = yes
20923 then
20924 :
20925 elif test "$CLANG_COMPILER" = yes
20926 then
20927 :
20928 elif test "$GCC" = yes
20929 then
20930 echo "$as_me:20930: checking if $CC supports options to tune inlining" >&5
20931 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20932 if test "${cf_cv_gcc_inline+set}" = set; then
20933 echo $ECHO_N "(cached) $ECHO_C" >&6
20934 else
20935
20936 cf_save_CFLAGS=$CFLAGS
20937 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20938 cat >"conftest.$ac_ext" <<_ACEOF
20939 #line 20939 "configure"
20940 #include "confdefs.h"
20941 inline int foo(void) { return 1; }
20942 int
20943 main (void)
20944 {
20945 ${cf_cv_main_return:-return} foo()
20946 ;
20947 return 0;
20948 }
20949 _ACEOF
20950 rm -f "conftest.$ac_objext"
20951 if { (eval echo "$as_me:20951: \"$ac_compile\"") >&5
20952 (eval $ac_compile) 2>&5
20953 ac_status=$?
20954 echo "$as_me:20954: \$? = $ac_status" >&5
20955 (exit "$ac_status"); } &&
20956 { ac_try='test -s "conftest.$ac_objext"'
20957 { (eval echo "$as_me:20957: \"$ac_try\"") >&5
20958 (eval $ac_try) 2>&5
20959 ac_status=$?
20960 echo "$as_me:20960: \$? = $ac_status" >&5
20961 (exit "$ac_status"); }; }; then
20962 cf_cv_gcc_inline=yes
20963 else
20964 echo "$as_me: failed program was:" >&5
20965 cat "conftest.$ac_ext" >&5
20966 cf_cv_gcc_inline=no
20967 fi
20968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20969 CFLAGS=$cf_save_CFLAGS
20970
20971 fi
20972 echo "$as_me:20972: result: $cf_cv_gcc_inline" >&5
20973 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20974 if test "$cf_cv_gcc_inline" = yes ; then
20975
20976 cf_fix_cppflags=no
20977 cf_new_cflags=
20978 cf_new_cppflags=
20979 cf_new_extra_cppflags=
20980
20981 for cf_add_cflags in --param max-inline-insns-single=1200
20982 do
20983 case "$cf_fix_cppflags" in
20984 (no)
20985 case "$cf_add_cflags" in
20986 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20987 case "$cf_add_cflags" in
20988 (-D*)
20989 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20990
20991 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20992 && test -z "${cf_tst_cflags}" \
20993 && cf_fix_cppflags=yes
20994
20995 if test "$cf_fix_cppflags" = yes ; then
20996
20997 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20998 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20999
21000 continue
21001 elif test "${cf_tst_cflags}" = "\"'" ; then
21002
21003 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21004 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21005
21006 continue
21007 fi
21008 ;;
21009 esac
21010 case "$CPPFLAGS" in
21011 (*$cf_add_cflags)
21012 ;;
21013 (*)
21014 case "$cf_add_cflags" in
21015 (-D*)
21016 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21017
21018 CPPFLAGS=`echo "$CPPFLAGS" | \
21019 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21020 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21021
21022 ;;
21023 esac
21024
21025 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21026 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21027
21028 ;;
21029 esac
21030 ;;
21031 (*)
21032
21033 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21034 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21035
21036 ;;
21037 esac
21038 ;;
21039 (yes)
21040
21041 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21042 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21043
21044 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21045
21046 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21047 && test -z "${cf_tst_cflags}" \
21048 && cf_fix_cppflags=no
21049 ;;
21050 esac
21051 done
21052
21053 if test -n "$cf_new_cflags" ; then
21054
21055 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21056 CFLAGS="${CFLAGS}$cf_new_cflags"
21057
21058 fi
21059
21060 if test -n "$cf_new_cppflags" ; then
21061
21062 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21063 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21064
21065 fi
21066
21067 if test -n "$cf_new_extra_cppflags" ; then
21068
21069 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21070 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21071
21072 fi
21073
21074 fi
21075 fi
21076 fi
21077
21078 echo "$as_me:21078: checking for signal global datatype" >&5
21079 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21080 if test "${cf_cv_sig_atomic_t+set}" = set; then
21081 echo $ECHO_N "(cached) $ECHO_C" >&6
21082 else
21083
21084 for cf_type in \
21085 "volatile sig_atomic_t" \
21086 "sig_atomic_t" \
21087 "int"
21088 do
21089 cat >"conftest.$ac_ext" <<_ACEOF
21090 #line 21090 "configure"
21091 #include "confdefs.h"
21092
21093 #include <sys/types.h>
21094 #include <signal.h>
21095 #include <stdio.h>
21096
21097 extern $cf_type x;
21098 $cf_type x;
21099 static void handler(int sig)
21100 {
21101 (void)sig;
21102 x = 5;
21103 }
21104 int
21105 main (void)
21106 {
21107 signal(SIGINT, handler);
21108 x = 1
21109 ;
21110 return 0;
21111 }
21112 _ACEOF
21113 rm -f "conftest.$ac_objext"
21114 if { (eval echo "$as_me:21114: \"$ac_compile\"") >&5
21115 (eval $ac_compile) 2>&5
21116 ac_status=$?
21117 echo "$as_me:21117: \$? = $ac_status" >&5
21118 (exit "$ac_status"); } &&
21119 { ac_try='test -s "conftest.$ac_objext"'
21120 { (eval echo "$as_me:21120: \"$ac_try\"") >&5
21121 (eval $ac_try) 2>&5
21122 ac_status=$?
21123 echo "$as_me:21123: \$? = $ac_status" >&5
21124 (exit "$ac_status"); }; }; then
21125 cf_cv_sig_atomic_t=$cf_type
21126 else
21127 echo "$as_me: failed program was:" >&5
21128 cat "conftest.$ac_ext" >&5
21129 cf_cv_sig_atomic_t=no
21130 fi
21131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21132 test "$cf_cv_sig_atomic_t" != no && break
21133 done
21134
21135 fi
21136
21137 echo "$as_me:21137: result: $cf_cv_sig_atomic_t" >&5
21138 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21139 test "$cf_cv_sig_atomic_t" != no &&
21140 cat >>confdefs.h <<EOF
21141 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21142 EOF
21143
21144 if test "$NCURSES_CHTYPE" = auto ; then
21145
21146 echo "$as_me:21146: checking for type of chtype" >&5
21147 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21148 if test "${cf_cv_typeof_chtype+set}" = set; then
21149 echo $ECHO_N "(cached) $ECHO_C" >&6
21150 else
21151
21152 if test "$cross_compiling" = yes; then
21153 cf_cv_typeof_chtype=long
21154 else
21155 cat >"conftest.$ac_ext" <<_ACEOF
21156 #line 21156 "configure"
21157 #include "confdefs.h"
21158
21159 $ac_includes_default
21160 #define WANT_BITS 31
21161 int main(void)
21162 {
21163 FILE *fp = fopen("cf_test.out", "w");
21164 if (fp != NULL) {
21165 char *result = "long";
21166 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21167 int n;
21168 unsigned int x, y;
21169 for (n = 0; n < WANT_BITS; n++) {
21170 x = (1 << n);
21171 y = (x >> n);
21172 if (y != 1 || x == 0) {
21173 x = 0;
21174 break;
21175 }
21176 }
21177 /*
21178 * If x is nonzero, an int is big enough for the bits
21179 * that we want.
21180 */
21181 result = (x != 0) ? "int" : "long";
21182 }
21183 fputs(result, fp);
21184 fclose(fp);
21185 }
21186 ${cf_cv_main_return:-return}(0);
21187 }
21188
21189 _ACEOF
21190 rm -f "conftest$ac_exeext"
21191 if { (eval echo "$as_me:21191: \"$ac_link\"") >&5
21192 (eval $ac_link) 2>&5
21193 ac_status=$?
21194 echo "$as_me:21194: \$? = $ac_status" >&5
21195 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
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_typeof_chtype=`cat cf_test.out`
21202 else
21203 echo "$as_me: program exited with status $ac_status" >&5
21204 echo "$as_me: failed program was:" >&5
21205 cat "conftest.$ac_ext" >&5
21206 cf_cv_typeof_chtype=long
21207 fi
21208 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21209 fi
21210 rm -f cf_test.out
21211
21212 fi
21213
21214 echo "$as_me:21214: result: $cf_cv_typeof_chtype" >&5
21215 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21216
21217 cat >>confdefs.h <<EOF
21218 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21219 EOF
21220
21221 else
21222 cf_cv_typeof_chtype=$NCURSES_CHTYPE
21223 fi
21224 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21225
21226 echo "$as_me:21226: checking if unsigned literals are legal" >&5
21227 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21228 if test "${cf_cv_unsigned_literals+set}" = set; then
21229 echo $ECHO_N "(cached) $ECHO_C" >&6
21230 else
21231
21232 cat >"conftest.$ac_ext" <<_ACEOF
21233 #line 21233 "configure"
21234 #include "confdefs.h"
21235
21236 int
21237 main (void)
21238 {
21239 long x = 1L + 1UL + 1U + 1; (void)x
21240 ;
21241 return 0;
21242 }
21243 _ACEOF
21244 rm -f "conftest.$ac_objext"
21245 if { (eval echo "$as_me:21245: \"$ac_compile\"") >&5
21246 (eval $ac_compile) 2>&5
21247 ac_status=$?
21248 echo "$as_me:21248: \$? = $ac_status" >&5
21249 (exit "$ac_status"); } &&
21250 { ac_try='test -s "conftest.$ac_objext"'
21251 { (eval echo "$as_me:21251: \"$ac_try\"") >&5
21252 (eval $ac_try) 2>&5
21253 ac_status=$?
21254 echo "$as_me:21254: \$? = $ac_status" >&5
21255 (exit "$ac_status"); }; }; then
21256 cf_cv_unsigned_literals=yes
21257 else
21258 echo "$as_me: failed program was:" >&5
21259 cat "conftest.$ac_ext" >&5
21260 cf_cv_unsigned_literals=no
21261 fi
21262 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21263
21264 fi
21265
21266 echo "$as_me:21266: result: $cf_cv_unsigned_literals" >&5
21267 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21268
21269 cf_cv_1UL="1"
21270 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21271 test ".$cf_cv_typeof_chtype" = .long && cf_cv_1UL="${cf_cv_1UL}L"
21272
21273 if test "$NCURSES_MMASK_T" = auto ; then
21274 cf_cv_typeof_mmask_t=long
21275 else
21276 cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21277 fi
21278 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21279
21280 ### Checks for external-data
21281
21282 echo "$as_me:21282: checking if external errno is declared" >&5
21283 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21284 if test "${cf_cv_dcl_errno+set}" = set; then
21285 echo $ECHO_N "(cached) $ECHO_C" >&6
21286 else
21287
21288 cat >"conftest.$ac_ext" <<_ACEOF
21289 #line 21289 "configure"
21290 #include "confdefs.h"
21291
21292 $ac_includes_default
21293 #include <errno.h>
21294 int
21295 main (void)
21296 {
21297 int x = (int) errno; (void)x
21298 ;
21299 return 0;
21300 }
21301 _ACEOF
21302 rm -f "conftest.$ac_objext"
21303 if { (eval echo "$as_me:21303: \"$ac_compile\"") >&5
21304 (eval $ac_compile) 2>&5
21305 ac_status=$?
21306 echo "$as_me:21306: \$? = $ac_status" >&5
21307 (exit "$ac_status"); } &&
21308 { ac_try='test -s "conftest.$ac_objext"'
21309 { (eval echo "$as_me:21309: \"$ac_try\"") >&5
21310 (eval $ac_try) 2>&5
21311 ac_status=$?
21312 echo "$as_me:21312: \$? = $ac_status" >&5
21313 (exit "$ac_status"); }; }; then
21314 cf_cv_dcl_errno=yes
21315 else
21316 echo "$as_me: failed program was:" >&5
21317 cat "conftest.$ac_ext" >&5
21318 cf_cv_dcl_errno=no
21319 fi
21320 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21321
21322 fi
21323 echo "$as_me:21323: result: $cf_cv_dcl_errno" >&5
21324 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21325
21326 if test "$cf_cv_dcl_errno" = no ; then
21327
21328 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21329
21330 cat >>confdefs.h <<EOF
21331 #define $cf_result 1
21332 EOF
21333
21334 fi
21335
21336 # It's possible (for near-UNIX clones) that the data doesn't exist
21337
21338 echo "$as_me:21338: checking if external errno exists" >&5
21339 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21340 if test "${cf_cv_have_errno+set}" = set; then
21341 echo $ECHO_N "(cached) $ECHO_C" >&6
21342 else
21343
21344 cat >"conftest.$ac_ext" <<_ACEOF
21345 #line 21345 "configure"
21346 #include "confdefs.h"
21347
21348 #undef errno
21349 extern int errno;
21350
21351 int
21352 main (void)
21353 {
21354 errno = 2
21355 ;
21356 return 0;
21357 }
21358 _ACEOF
21359 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21360 if { (eval echo "$as_me:21360: \"$ac_link\"") >&5
21361 (eval $ac_link) 2>&5
21362 ac_status=$?
21363 echo "$as_me:21363: \$? = $ac_status" >&5
21364 (exit "$ac_status"); } &&
21365 { ac_try='test -s "conftest$ac_exeext"'
21366 { (eval echo "$as_me:21366: \"$ac_try\"") >&5
21367 (eval $ac_try) 2>&5
21368 ac_status=$?
21369 echo "$as_me:21369: \$? = $ac_status" >&5
21370 (exit "$ac_status"); }; }; then
21371 cf_cv_have_errno=yes
21372 else
21373 echo "$as_me: failed program was:" >&5
21374 cat "conftest.$ac_ext" >&5
21375 cf_cv_have_errno=no
21376 fi
21377 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21378
21379 fi
21380 echo "$as_me:21380: result: $cf_cv_have_errno" >&5
21381 echo "${ECHO_T}$cf_cv_have_errno" >&6
21382
21383 if test "$cf_cv_have_errno" = yes ; then
21384
21385 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21386
21387 cat >>confdefs.h <<EOF
21388 #define $cf_result 1
21389 EOF
21390
21391 fi
21392
21393 echo "$as_me:21393: checking if data-only library module links" >&5
21394 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21395 if test "${cf_cv_link_dataonly+set}" = set; then
21396 echo $ECHO_N "(cached) $ECHO_C" >&6
21397 else
21398
21399 rm -f conftest.a
21400 cat >conftest.$ac_ext <<EOF
21401 #line 21401 "configure"
21402 int testdata[3] = { 123, 456, 789 };
21403 EOF
21404 if { (eval echo "$as_me:21404: \"$ac_compile\"") >&5
21405 (eval $ac_compile) 2>&5
21406 ac_status=$?
21407 echo "$as_me:21407: \$? = $ac_status" >&5
21408 (exit "$ac_status"); } ; then
21409 mv conftest.$OBJEXT data.$OBJEXT && \
21410 ( $AR $ARFLAGS conftest.a data.$OBJEXT ) 2>&5 1>/dev/null
21411 fi
21412 rm -f conftest.$ac_ext data.$OBJEXT
21413 cat >conftest.$ac_ext <<EOF
21414 #line 21414 "configure"
21415 extern int testfunc(void);
21416 #if defined(NeXT)
21417 int testfunc(void)
21418 {
21419 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
21420 }
21421 #else
21422 extern int testdata[3];
21423 int testfunc(void)
21424 {
21425 return testdata[0] == 123
21426 && testdata[1] == 456
21427 && testdata[2] == 789;
21428 }
21429 #endif
21430 EOF
21431 if { (eval echo "$as_me:21431: \"$ac_compile\"") >&5
21432 (eval $ac_compile) 2>&5
21433 ac_status=$?
21434 echo "$as_me:21434: \$? = $ac_status" >&5
21435 (exit "$ac_status"); }; then
21436 mv conftest.$OBJEXT func.$OBJEXT && \
21437 ( $AR $ARFLAGS conftest.a func.$OBJEXT ) 2>&5 1>/dev/null
21438 fi
21439 rm -f conftest.$ac_ext func.$OBJEXT
21440 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21441 cf_saveLIBS="$LIBS"
21442 LIBS="conftest.a $LIBS"
21443 if test "$cross_compiling" = yes; then
21444 cf_cv_link_dataonly=unknown
21445 else
21446 cat >"conftest.$ac_ext" <<_ACEOF
21447 #line 21447 "configure"
21448 #include "confdefs.h"
21449
21450 extern int testfunc(void);
21451 int main(void)
21452 {
21453 ${cf_cv_main_return:-return} (!testfunc());
21454 }
21455
21456 _ACEOF
21457 rm -f "conftest$ac_exeext"
21458 if { (eval echo "$as_me:21458: \"$ac_link\"") >&5
21459 (eval $ac_link) 2>&5
21460 ac_status=$?
21461 echo "$as_me:21461: \$? = $ac_status" >&5
21462 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21463 { (eval echo "$as_me:21463: \"$ac_try\"") >&5
21464 (eval $ac_try) 2>&5
21465 ac_status=$?
21466 echo "$as_me:21466: \$? = $ac_status" >&5
21467 (exit "$ac_status"); }; }; then
21468 cf_cv_link_dataonly=yes
21469 else
21470 echo "$as_me: program exited with status $ac_status" >&5
21471 echo "$as_me: failed program was:" >&5
21472 cat "conftest.$ac_ext" >&5
21473 cf_cv_link_dataonly=no
21474 fi
21475 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21476 fi
21477 LIBS="$cf_saveLIBS"
21478
21479 fi
21480
21481 echo "$as_me:21481: result: $cf_cv_link_dataonly" >&5
21482 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21483
21484 if test "$cf_cv_link_dataonly" = no ; then
21485
21486 cat >>confdefs.h <<\EOF
21487 #define BROKEN_LINKER 1
21488 EOF
21489
21490 BROKEN_LINKER=1
21491 fi
21492
21493 ### Checks for library functions.
21494
21495 cf_save_libs="$LIBS"
21496 echo "$as_me:21496: checking for clock_gettime" >&5
21497 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21498 if test "${ac_cv_func_clock_gettime+set}" = set; then
21499 echo $ECHO_N "(cached) $ECHO_C" >&6
21500 else
21501 cat >"conftest.$ac_ext" <<_ACEOF
21502 #line 21502 "configure"
21503 #include "confdefs.h"
21504 #define clock_gettime autoconf_temporary
21505 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21506 #undef clock_gettime
21507
21508 #ifdef __cplusplus
21509 extern "C"
21510 #endif
21511
21512 /* We use char because int might match the return type of a gcc2
21513 builtin and then its argument prototype would still apply. */
21514 char clock_gettime (void);
21515
21516 int
21517 main (void)
21518 {
21519
21520 /* The GNU C library defines stubs for functions which it implements
21521 to always fail with ENOSYS. Some functions are actually named
21522 something starting with __ and the normal name is an alias. */
21523 #if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
21524 #error found stub for clock_gettime
21525 #endif
21526
21527 return clock_gettime ();
21528 ;
21529 return 0;
21530 }
21531 _ACEOF
21532 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21533 if { (eval echo "$as_me:21533: \"$ac_link\"") >&5
21534 (eval $ac_link) 2>&5
21535 ac_status=$?
21536 echo "$as_me:21536: \$? = $ac_status" >&5
21537 (exit "$ac_status"); } &&
21538 { ac_try='test -s "conftest$ac_exeext"'
21539 { (eval echo "$as_me:21539: \"$ac_try\"") >&5
21540 (eval $ac_try) 2>&5
21541 ac_status=$?
21542 echo "$as_me:21542: \$? = $ac_status" >&5
21543 (exit "$ac_status"); }; }; then
21544 ac_cv_func_clock_gettime=yes
21545 else
21546 echo "$as_me: failed program was:" >&5
21547 cat "conftest.$ac_ext" >&5
21548 ac_cv_func_clock_gettime=no
21549 fi
21550 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21551 fi
21552 echo "$as_me:21552: result: $ac_cv_func_clock_gettime" >&5
21553 echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6
21554 if test "$ac_cv_func_clock_gettime" = yes; then
21555 cf_cv_test_clock_gettime=yes
21556 else
21557 echo "$as_me:21557: checking for clock_gettime in -lrt" >&5
21558 echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
21559 if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
21560 echo $ECHO_N "(cached) $ECHO_C" >&6
21561 else
21562 ac_check_lib_save_LIBS=$LIBS
21563 LIBS="-lrt $LIBS"
21564 cat >"conftest.$ac_ext" <<_ACEOF
21565 #line 21565 "configure"
21566 #include "confdefs.h"
21567
21568 /* Override any gcc2 internal prototype to avoid an error. */
21569 #ifdef __cplusplus
21570 extern "C"
21571 #endif
21572 /* We use char because int might match the return type of a gcc2
21573 builtin and then its argument prototype would still apply. */
21574 char clock_gettime (void);
21575 int
21576 main (void)
21577 {
21578 clock_gettime ();
21579 ;
21580 return 0;
21581 }
21582 _ACEOF
21583 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21584 if { (eval echo "$as_me:21584: \"$ac_link\"") >&5
21585 (eval $ac_link) 2>&5
21586 ac_status=$?
21587 echo "$as_me:21587: \$? = $ac_status" >&5
21588 (exit "$ac_status"); } &&
21589 { ac_try='test -s "conftest$ac_exeext"'
21590 { (eval echo "$as_me:21590: \"$ac_try\"") >&5
21591 (eval $ac_try) 2>&5
21592 ac_status=$?
21593 echo "$as_me:21593: \$? = $ac_status" >&5
21594 (exit "$ac_status"); }; }; then
21595 ac_cv_lib_rt_clock_gettime=yes
21596 else
21597 echo "$as_me: failed program was:" >&5
21598 cat "conftest.$ac_ext" >&5
21599 ac_cv_lib_rt_clock_gettime=no
21600 fi
21601 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21602 LIBS=$ac_check_lib_save_LIBS
21603 fi
21604 echo "$as_me:21604: result: $ac_cv_lib_rt_clock_gettime" >&5
21605 echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
21606 if test "$ac_cv_lib_rt_clock_gettime" = yes; then
21607 LIBS="-lrt $LIBS"
21608 cf_cv_test_clock_gettime=yes
21609 else
21610 cf_cv_test_clock_gettime=no
21611 fi
21612
21613 fi
21614
21615 if test "$cf_cv_test_clock_gettime" = yes ; then
21616 echo "$as_me:21616: checking if clock_gettime links" >&5
21617 echo $ECHO_N "checking if clock_gettime links... $ECHO_C" >&6
21618 if test "${cf_cv_func_clock_gettime+set}" = set; then
21619 echo $ECHO_N "(cached) $ECHO_C" >&6
21620 else
21621
21622 cat >"conftest.$ac_ext" <<_ACEOF
21623 #line 21623 "configure"
21624 #include "confdefs.h"
21625
21626 $ac_includes_default
21627 #include <time.h>
21628
21629 int
21630 main (void)
21631 {
21632 struct timespec ts;
21633 int rc = clock_gettime(CLOCK_REALTIME, &ts)
21634 + clock_gettime(CLOCK_MONOTONIC, &ts);
21635 (void) rc; (void)ts
21636 ;
21637 return 0;
21638 }
21639 _ACEOF
21640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21641 if { (eval echo "$as_me:21641: \"$ac_link\"") >&5
21642 (eval $ac_link) 2>&5
21643 ac_status=$?
21644 echo "$as_me:21644: \$? = $ac_status" >&5
21645 (exit "$ac_status"); } &&
21646 { ac_try='test -s "conftest$ac_exeext"'
21647 { (eval echo "$as_me:21647: \"$ac_try\"") >&5
21648 (eval $ac_try) 2>&5
21649 ac_status=$?
21650 echo "$as_me:21650: \$? = $ac_status" >&5
21651 (exit "$ac_status"); }; }; then
21652 cf_cv_func_clock_gettime=yes
21653 else
21654 echo "$as_me: failed program was:" >&5
21655 cat "conftest.$ac_ext" >&5
21656 cf_cv_func_clock_gettime=no
21657 fi
21658 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21659
21660 fi
21661 echo "$as_me:21661: result: $cf_cv_func_clock_gettime" >&5
21662 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21663 else
21664 cf_cv_func_clock_gettime=no
21665 fi
21666
21667 if test "$cf_cv_func_clock_gettime" = yes
21668 then
21669
21670 cat >>confdefs.h <<\EOF
21671 #define HAVE_CLOCK_GETTIME 1
21672 EOF
21673
21674 else
21675 echo "$as_me:21675: checking for gettimeofday" >&5
21676 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21677 if test "${ac_cv_func_gettimeofday+set}" = set; then
21678 echo $ECHO_N "(cached) $ECHO_C" >&6
21679 else
21680 cat >"conftest.$ac_ext" <<_ACEOF
21681 #line 21681 "configure"
21682 #include "confdefs.h"
21683 #define gettimeofday autoconf_temporary
21684 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21685 #undef gettimeofday
21686
21687 #ifdef __cplusplus
21688 extern "C"
21689 #endif
21690
21691 /* We use char because int might match the return type of a gcc2
21692 builtin and then its argument prototype would still apply. */
21693 char gettimeofday (void);
21694
21695 int
21696 main (void)
21697 {
21698
21699 /* The GNU C library defines stubs for functions which it implements
21700 to always fail with ENOSYS. Some functions are actually named
21701 something starting with __ and the normal name is an alias. */
21702 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21703 #error found stub for gettimeofday
21704 #endif
21705
21706 return gettimeofday ();
21707 ;
21708 return 0;
21709 }
21710 _ACEOF
21711 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21712 if { (eval echo "$as_me:21712: \"$ac_link\"") >&5
21713 (eval $ac_link) 2>&5
21714 ac_status=$?
21715 echo "$as_me:21715: \$? = $ac_status" >&5
21716 (exit "$ac_status"); } &&
21717 { ac_try='test -s "conftest$ac_exeext"'
21718 { (eval echo "$as_me:21718: \"$ac_try\"") >&5
21719 (eval $ac_try) 2>&5
21720 ac_status=$?
21721 echo "$as_me:21721: \$? = $ac_status" >&5
21722 (exit "$ac_status"); }; }; then
21723 ac_cv_func_gettimeofday=yes
21724 else
21725 echo "$as_me: failed program was:" >&5
21726 cat "conftest.$ac_ext" >&5
21727 ac_cv_func_gettimeofday=no
21728 fi
21729 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21730 fi
21731 echo "$as_me:21731: result: $ac_cv_func_gettimeofday" >&5
21732 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21733 if test "$ac_cv_func_gettimeofday" = yes; then
21734
21735 cat >>confdefs.h <<\EOF
21736 #define HAVE_GETTIMEOFDAY 1
21737 EOF
21738
21739 else
21740
21741 echo "$as_me:21741: checking for gettimeofday in -lbsd" >&5
21742 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21743 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21744 echo $ECHO_N "(cached) $ECHO_C" >&6
21745 else
21746 ac_check_lib_save_LIBS=$LIBS
21747 LIBS="-lbsd $LIBS"
21748 cat >"conftest.$ac_ext" <<_ACEOF
21749 #line 21749 "configure"
21750 #include "confdefs.h"
21751
21752 /* Override any gcc2 internal prototype to avoid an error. */
21753 #ifdef __cplusplus
21754 extern "C"
21755 #endif
21756 /* We use char because int might match the return type of a gcc2
21757 builtin and then its argument prototype would still apply. */
21758 char gettimeofday (void);
21759 int
21760 main (void)
21761 {
21762 gettimeofday ();
21763 ;
21764 return 0;
21765 }
21766 _ACEOF
21767 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21768 if { (eval echo "$as_me:21768: \"$ac_link\"") >&5
21769 (eval $ac_link) 2>&5
21770 ac_status=$?
21771 echo "$as_me:21771: \$? = $ac_status" >&5
21772 (exit "$ac_status"); } &&
21773 { ac_try='test -s "conftest$ac_exeext"'
21774 { (eval echo "$as_me:21774: \"$ac_try\"") >&5
21775 (eval $ac_try) 2>&5
21776 ac_status=$?
21777 echo "$as_me:21777: \$? = $ac_status" >&5
21778 (exit "$ac_status"); }; }; then
21779 ac_cv_lib_bsd_gettimeofday=yes
21780 else
21781 echo "$as_me: failed program was:" >&5
21782 cat "conftest.$ac_ext" >&5
21783 ac_cv_lib_bsd_gettimeofday=no
21784 fi
21785 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21786 LIBS=$ac_check_lib_save_LIBS
21787 fi
21788 echo "$as_me:21788: result: $ac_cv_lib_bsd_gettimeofday" >&5
21789 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21790 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21791
21792 cat >>confdefs.h <<\EOF
21793 #define HAVE_GETTIMEOFDAY 1
21794 EOF
21795
21796 cf_add_libs="$LIBS"
21797 # reverse order
21798 cf_add_0lib=
21799 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21800 # filter duplicates
21801 for cf_add_1lib in $cf_add_0lib; do
21802 for cf_add_2lib in $cf_add_libs; do
21803 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21804 cf_add_1lib=
21805 break
21806 fi
21807 done
21808 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21809 done
21810 LIBS="$cf_add_libs"
21811
21812 fi
21813
21814 fi
21815 fi
21816
21817 for ac_func in \
21818 fpathconf \
21819 getcwd \
21820 getauxval \
21821 getegid \
21822 geteuid \
21823 getopt \
21824 getuid \
21825 issetugid \
21826 localeconv \
21827 poll \
21828 remove \
21829 select \
21830 setbuf \
21831 setbuffer \
21832 setfsuid \
21833 setvbuf \
21834 sigaction \
21835 sigvec \
21836 snprintf \
21837 strdup \
21838 strstr \
21839 sysconf \
21840 tcgetpgrp \
21841 times \
21842 tsearch \
21843 vsnprintf \
21844
21845 do
21846 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21847 echo "$as_me:21847: checking for $ac_func" >&5
21848 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21849 if eval "test \"\${$as_ac_var+set}\" = set"; then
21850 echo $ECHO_N "(cached) $ECHO_C" >&6
21851 else
21852 cat >"conftest.$ac_ext" <<_ACEOF
21853 #line 21853 "configure"
21854 #include "confdefs.h"
21855 #define $ac_func autoconf_temporary
21856 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21857 #undef $ac_func
21858
21859 #ifdef __cplusplus
21860 extern "C"
21861 #endif
21862
21863 /* We use char because int might match the return type of a gcc2
21864 builtin and then its argument prototype would still apply. */
21865 char $ac_func (void);
21866
21867 int
21868 main (void)
21869 {
21870
21871 /* The GNU C library defines stubs for functions which it implements
21872 to always fail with ENOSYS. Some functions are actually named
21873 something starting with __ and the normal name is an alias. */
21874 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21875 #error found stub for $ac_func
21876 #endif
21877
21878 return $ac_func ();
21879 ;
21880 return 0;
21881 }
21882 _ACEOF
21883 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21884 if { (eval echo "$as_me:21884: \"$ac_link\"") >&5
21885 (eval $ac_link) 2>&5
21886 ac_status=$?
21887 echo "$as_me:21887: \$? = $ac_status" >&5
21888 (exit "$ac_status"); } &&
21889 { ac_try='test -s "conftest$ac_exeext"'
21890 { (eval echo "$as_me:21890: \"$ac_try\"") >&5
21891 (eval $ac_try) 2>&5
21892 ac_status=$?
21893 echo "$as_me:21893: \$? = $ac_status" >&5
21894 (exit "$ac_status"); }; }; then
21895 eval "$as_ac_var=yes"
21896 else
21897 echo "$as_me: failed program was:" >&5
21898 cat "conftest.$ac_ext" >&5
21899 eval "$as_ac_var=no"
21900 fi
21901 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21902 fi
21903 echo "$as_me:21903: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21904 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21905 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21906 cat >>confdefs.h <<EOF
21907 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21908 EOF
21909
21910 fi
21911 done
21912
21913 echo "$as_me:21913: checking if _PATH_TTYS is defined in ttyent.h" >&5
21914 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21915 if test "${cf_cv_PATH_TTYS+set}" = set; then
21916 echo $ECHO_N "(cached) $ECHO_C" >&6
21917 else
21918
21919 cat >"conftest.$ac_ext" <<_ACEOF
21920 #line 21920 "configure"
21921 #include "confdefs.h"
21922
21923 #include <stdio.h>
21924 #include <ttyent.h>
21925 int
21926 main (void)
21927 {
21928
21929 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21930 ;
21931 return 0;
21932 }
21933 _ACEOF
21934 rm -f "conftest.$ac_objext"
21935 if { (eval echo "$as_me:21935: \"$ac_compile\"") >&5
21936 (eval $ac_compile) 2>&5
21937 ac_status=$?
21938 echo "$as_me:21938: \$? = $ac_status" >&5
21939 (exit "$ac_status"); } &&
21940 { ac_try='test -s "conftest.$ac_objext"'
21941 { (eval echo "$as_me:21941: \"$ac_try\"") >&5
21942 (eval $ac_try) 2>&5
21943 ac_status=$?
21944 echo "$as_me:21944: \$? = $ac_status" >&5
21945 (exit "$ac_status"); }; }; then
21946 cf_cv_PATH_TTYS=yes
21947 else
21948 echo "$as_me: failed program was:" >&5
21949 cat "conftest.$ac_ext" >&5
21950 cf_cv_PATH_TTYS=no
21951 fi
21952 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21953 fi
21954 echo "$as_me:21954: result: $cf_cv_PATH_TTYS" >&5
21955 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21956
21957 if test $cf_cv_PATH_TTYS = no
21958 then
21959 for cf_ttys in /etc/ttytype /etc/ttys
21960 do
21961 if test -f $cf_ttys
21962 then
21963 cf_cv_PATH_TTYS=maybe
21964
21965 cat >>confdefs.h <<\EOF
21966 #define _PATH_TTYS $cf_ttys
21967 EOF
21968
21969 break
21970 fi
21971 done
21972 fi
21973
21974 if test $cf_cv_PATH_TTYS != no
21975 then
21976 echo "$as_me:21976: checking if _PATH_TTYS file exists" >&5
21977 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21978 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21979 echo $ECHO_N "(cached) $ECHO_C" >&6
21980 else
21981
21982 if test "$cross_compiling" = yes; then
21983 cf_cv_have_PATH_TTYS=unknown
21984 else
21985 cat >"conftest.$ac_ext" <<_ACEOF
21986 #line 21986 "configure"
21987 #include "confdefs.h"
21988
21989 $ac_includes_default
21990 #include <ttyent.h>
21991
21992 int main(void) {
21993 FILE *fp = fopen(_PATH_TTYS, "r");
21994 ${cf_cv_main_return:-return} (fp == NULL);
21995 }
21996 _ACEOF
21997 rm -f "conftest$ac_exeext"
21998 if { (eval echo "$as_me:21998: \"$ac_link\"") >&5
21999 (eval $ac_link) 2>&5
22000 ac_status=$?
22001 echo "$as_me:22001: \$? = $ac_status" >&5
22002 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22003 { (eval echo "$as_me:22003: \"$ac_try\"") >&5
22004 (eval $ac_try) 2>&5
22005 ac_status=$?
22006 echo "$as_me:22006: \$? = $ac_status" >&5
22007 (exit "$ac_status"); }; }; then
22008 cf_cv_have_PATH_TTYS=yes
22009 else
22010 echo "$as_me: program exited with status $ac_status" >&5
22011 echo "$as_me: failed program was:" >&5
22012 cat "conftest.$ac_ext" >&5
22013 cf_cv_have_PATH_TTYS=no
22014 fi
22015 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22016 fi
22017 fi
22018 echo "$as_me:22018: result: $cf_cv_have_PATH_TTYS" >&5
22019 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
22020 test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
22021 fi
22022
22023 if test $cf_cv_PATH_TTYS != no
22024 then
22025
22026 cat >>confdefs.h <<\EOF
22027 #define HAVE_PATH_TTYS 1
22028 EOF
22029
22030 echo "$as_me:22030: checking for getttynam" >&5
22031 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
22032 if test "${cf_cv_func_getttynam+set}" = set; then
22033 echo $ECHO_N "(cached) $ECHO_C" >&6
22034 else
22035
22036 cat >"conftest.$ac_ext" <<_ACEOF
22037 #line 22037 "configure"
22038 #include "confdefs.h"
22039 #include <ttyent.h>
22040 int
22041 main (void)
22042 {
22043 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
22044 ;
22045 return 0;
22046 }
22047 _ACEOF
22048 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22049 if { (eval echo "$as_me:22049: \"$ac_link\"") >&5
22050 (eval $ac_link) 2>&5
22051 ac_status=$?
22052 echo "$as_me:22052: \$? = $ac_status" >&5
22053 (exit "$ac_status"); } &&
22054 { ac_try='test -s "conftest$ac_exeext"'
22055 { (eval echo "$as_me:22055: \"$ac_try\"") >&5
22056 (eval $ac_try) 2>&5
22057 ac_status=$?
22058 echo "$as_me:22058: \$? = $ac_status" >&5
22059 (exit "$ac_status"); }; }; then
22060 cf_cv_func_getttynam=yes
22061 else
22062 echo "$as_me: failed program was:" >&5
22063 cat "conftest.$ac_ext" >&5
22064 cf_cv_func_getttynam=no
22065 fi
22066 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22067 fi
22068 echo "$as_me:22068: result: $cf_cv_func_getttynam" >&5
22069 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
22070 test "$cf_cv_func_getttynam" = yes &&
22071 cat >>confdefs.h <<\EOF
22072 #define HAVE_GETTTYNAM 1
22073 EOF
22074
22075 fi
22076
22077 if test "x$ac_cv_func_getopt" = xno && \
22078 test "x$cf_with_progs$cf_with_tests" != xnono; then
22079 { { echo "$as_me:22079: error: getopt is required for building programs" >&5
22080 echo "$as_me: error: getopt is required for building programs" >&2;}
22081 { (exit 1); exit 1; }; }
22082 fi
22083
22084 if test "x$with_safe_sprintf" = xyes
22085 then
22086 if test "x$ac_cv_func_vsnprintf" = xyes
22087 then
22088 { echo "$as_me:22088: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
22089 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
22090 else
22091
22092 cat >>confdefs.h <<\EOF
22093 #define USE_SAFE_SPRINTF 1
22094 EOF
22095
22096 fi
22097 fi
22098
22099 if test "x$with_getcap" = "xyes" ; then
22100
22101 echo "$as_me:22101: checking for terminal-capability database functions" >&5
22102 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
22103 if test "${cf_cv_cgetent+set}" = set; then
22104 echo $ECHO_N "(cached) $ECHO_C" >&6
22105 else
22106
22107 cat >"conftest.$ac_ext" <<_ACEOF
22108 #line 22108 "configure"
22109 #include "confdefs.h"
22110
22111 $ac_includes_default
22112 int
22113 main (void)
22114 {
22115
22116 char temp[128];
22117 char *buf = temp;
22118 char *db_array = temp;
22119 cgetent(&buf, &db_array, "vt100");
22120 cgetcap(buf, "tc", '=');
22121 cgetmatch(buf, "tc");
22122
22123 ;
22124 return 0;
22125 }
22126 _ACEOF
22127 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22128 if { (eval echo "$as_me:22128: \"$ac_link\"") >&5
22129 (eval $ac_link) 2>&5
22130 ac_status=$?
22131 echo "$as_me:22131: \$? = $ac_status" >&5
22132 (exit "$ac_status"); } &&
22133 { ac_try='test -s "conftest$ac_exeext"'
22134 { (eval echo "$as_me:22134: \"$ac_try\"") >&5
22135 (eval $ac_try) 2>&5
22136 ac_status=$?
22137 echo "$as_me:22137: \$? = $ac_status" >&5
22138 (exit "$ac_status"); }; }; then
22139 cf_cv_cgetent=yes
22140 else
22141 echo "$as_me: failed program was:" >&5
22142 cat "conftest.$ac_ext" >&5
22143 cf_cv_cgetent=no
22144 fi
22145 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22146
22147 fi
22148 echo "$as_me:22148: result: $cf_cv_cgetent" >&5
22149 echo "${ECHO_T}$cf_cv_cgetent" >&6
22150
22151 if test "$cf_cv_cgetent" = yes
22152 then
22153
22154 cat >>confdefs.h <<\EOF
22155 #define HAVE_BSD_CGETENT 1
22156 EOF
22157
22158 echo "$as_me:22158: checking if cgetent uses const parameter" >&5
22159 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22160 if test "${cf_cv_cgetent_const+set}" = set; then
22161 echo $ECHO_N "(cached) $ECHO_C" >&6
22162 else
22163
22164 cat >"conftest.$ac_ext" <<_ACEOF
22165 #line 22165 "configure"
22166 #include "confdefs.h"
22167
22168 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22169 $ac_includes_default
22170 int
22171 main (void)
22172 {
22173
22174 char temp[128];
22175 char *buf = temp;
22176 #ifndef _NETBSD_SOURCE /* given, since April 2004 in stdlib.h */
22177 const char *db_array = temp;
22178 cgetent(&buf, &db_array, "vt100");
22179 #endif
22180 cgetcap(buf, "tc", '=');
22181 cgetmatch(buf, "tc");
22182
22183 ;
22184 return 0;
22185 }
22186 _ACEOF
22187 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22188 if { (eval echo "$as_me:22188: \"$ac_link\"") >&5
22189 (eval $ac_link) 2>&5
22190 ac_status=$?
22191 echo "$as_me:22191: \$? = $ac_status" >&5
22192 (exit "$ac_status"); } &&
22193 { ac_try='test -s "conftest$ac_exeext"'
22194 { (eval echo "$as_me:22194: \"$ac_try\"") >&5
22195 (eval $ac_try) 2>&5
22196 ac_status=$?
22197 echo "$as_me:22197: \$? = $ac_status" >&5
22198 (exit "$ac_status"); }; }; then
22199 cf_cv_cgetent_const=yes
22200 else
22201 echo "$as_me: failed program was:" >&5
22202 cat "conftest.$ac_ext" >&5
22203 cf_cv_cgetent_const=no
22204 fi
22205 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22206
22207 fi
22208 echo "$as_me:22208: result: $cf_cv_cgetent_const" >&5
22209 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22210 if test "$cf_cv_cgetent_const" = yes
22211 then
22212
22213 cat >>confdefs.h <<EOF
22214 #define CGETENT_CONST const
22215 EOF
22216
22217 fi
22218 fi
22219
22220 fi
22221
22222 echo "$as_me:22222: checking for isascii" >&5
22223 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22224 if test "${cf_cv_have_isascii+set}" = set; then
22225 echo $ECHO_N "(cached) $ECHO_C" >&6
22226 else
22227
22228 cat >"conftest.$ac_ext" <<_ACEOF
22229 #line 22229 "configure"
22230 #include "confdefs.h"
22231 #include <ctype.h>
22232 int
22233 main (void)
22234 {
22235 int x = isascii(' '); (void)x
22236 ;
22237 return 0;
22238 }
22239 _ACEOF
22240 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22241 if { (eval echo "$as_me:22241: \"$ac_link\"") >&5
22242 (eval $ac_link) 2>&5
22243 ac_status=$?
22244 echo "$as_me:22244: \$? = $ac_status" >&5
22245 (exit "$ac_status"); } &&
22246 { ac_try='test -s "conftest$ac_exeext"'
22247 { (eval echo "$as_me:22247: \"$ac_try\"") >&5
22248 (eval $ac_try) 2>&5
22249 ac_status=$?
22250 echo "$as_me:22250: \$? = $ac_status" >&5
22251 (exit "$ac_status"); }; }; then
22252 cf_cv_have_isascii=yes
22253 else
22254 echo "$as_me: failed program was:" >&5
22255 cat "conftest.$ac_ext" >&5
22256 cf_cv_have_isascii=no
22257 fi
22258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22259
22260 fi
22261 echo "$as_me:22261: result: $cf_cv_have_isascii" >&5
22262 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22263 test "$cf_cv_have_isascii" = yes &&
22264 cat >>confdefs.h <<\EOF
22265 #define HAVE_ISASCII 1
22266 EOF
22267
22268 if test "$ac_cv_func_sigaction" = yes; then
22269 echo "$as_me:22269: checking whether sigaction needs _POSIX_SOURCE" >&5
22270 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22271 cat >"conftest.$ac_ext" <<_ACEOF
22272 #line 22272 "configure"
22273 #include "confdefs.h"
22274
22275 #include <sys/types.h>
22276 #include <signal.h>
22277 int
22278 main (void)
22279 {
22280 struct sigaction act; (void)act
22281 ;
22282 return 0;
22283 }
22284 _ACEOF
22285 rm -f "conftest.$ac_objext"
22286 if { (eval echo "$as_me:22286: \"$ac_compile\"") >&5
22287 (eval $ac_compile) 2>&5
22288 ac_status=$?
22289 echo "$as_me:22289: \$? = $ac_status" >&5
22290 (exit "$ac_status"); } &&
22291 { ac_try='test -s "conftest.$ac_objext"'
22292 { (eval echo "$as_me:22292: \"$ac_try\"") >&5
22293 (eval $ac_try) 2>&5
22294 ac_status=$?
22295 echo "$as_me:22295: \$? = $ac_status" >&5
22296 (exit "$ac_status"); }; }; then
22297 sigact_bad=no
22298 else
22299 echo "$as_me: failed program was:" >&5
22300 cat "conftest.$ac_ext" >&5
22301
22302 cat >"conftest.$ac_ext" <<_ACEOF
22303 #line 22303 "configure"
22304 #include "confdefs.h"
22305
22306 #define _POSIX_SOURCE
22307 #include <sys/types.h>
22308 #include <signal.h>
22309 int
22310 main (void)
22311 {
22312 struct sigaction act; (void)act
22313 ;
22314 return 0;
22315 }
22316 _ACEOF
22317 rm -f "conftest.$ac_objext"
22318 if { (eval echo "$as_me:22318: \"$ac_compile\"") >&5
22319 (eval $ac_compile) 2>&5
22320 ac_status=$?
22321 echo "$as_me:22321: \$? = $ac_status" >&5
22322 (exit "$ac_status"); } &&
22323 { ac_try='test -s "conftest.$ac_objext"'
22324 { (eval echo "$as_me:22324: \"$ac_try\"") >&5
22325 (eval $ac_try) 2>&5
22326 ac_status=$?
22327 echo "$as_me:22327: \$? = $ac_status" >&5
22328 (exit "$ac_status"); }; }; then
22329 sigact_bad=yes
22330
22331 cat >>confdefs.h <<\EOF
22332 #define _POSIX_SOURCE 1
22333 EOF
22334
22335 else
22336 echo "$as_me: failed program was:" >&5
22337 cat "conftest.$ac_ext" >&5
22338 sigact_bad=unknown
22339 fi
22340 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22341 fi
22342 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22343 echo "$as_me:22343: result: $sigact_bad" >&5
22344 echo "${ECHO_T}$sigact_bad" >&6
22345 fi
22346
22347 echo "$as_me:22347: checking if nanosleep really works" >&5
22348 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22349 if test "${cf_cv_func_nanosleep+set}" = set; then
22350 echo $ECHO_N "(cached) $ECHO_C" >&6
22351 else
22352
22353 if test "$cross_compiling" = yes; then
22354 cf_cv_func_nanosleep=unknown
22355 else
22356 cat >"conftest.$ac_ext" <<_ACEOF
22357 #line 22357 "configure"
22358 #include "confdefs.h"
22359
22360 $ac_includes_default
22361
22362 #include <errno.h>
22363 #include <time.h>
22364
22365 #ifdef HAVE_SYS_TIME_H
22366 #include <sys/time.h>
22367 #endif
22368
22369 int main(void) {
22370 struct timespec ts1, ts2;
22371 int code;
22372 ts1.tv_sec = 0;
22373 ts1.tv_nsec = 750000000;
22374 ts2.tv_sec = 0;
22375 ts2.tv_nsec = 0;
22376 errno = 0;
22377 code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22378 ${cf_cv_main_return:-return}(code != 0);
22379 }
22380
22381 _ACEOF
22382 rm -f "conftest$ac_exeext"
22383 if { (eval echo "$as_me:22383: \"$ac_link\"") >&5
22384 (eval $ac_link) 2>&5
22385 ac_status=$?
22386 echo "$as_me:22386: \$? = $ac_status" >&5
22387 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22388 { (eval echo "$as_me:22388: \"$ac_try\"") >&5
22389 (eval $ac_try) 2>&5
22390 ac_status=$?
22391 echo "$as_me:22391: \$? = $ac_status" >&5
22392 (exit "$ac_status"); }; }; then
22393 cf_cv_func_nanosleep=yes
22394 else
22395 echo "$as_me: program exited with status $ac_status" >&5
22396 echo "$as_me: failed program was:" >&5
22397 cat "conftest.$ac_ext" >&5
22398 cf_cv_func_nanosleep=no
22399 fi
22400 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22401 fi
22402 fi
22403 echo "$as_me:22403: result: $cf_cv_func_nanosleep" >&5
22404 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22405
22406 test "$cf_cv_func_nanosleep" = "yes" &&
22407 cat >>confdefs.h <<\EOF
22408 #define HAVE_NANOSLEEP 1
22409 EOF
22410
22411 for ac_header in sgtty.h \
22412 termio.h \
22413 termios.h \
22414 unistd.h \
22415 sys/ioctl.h \
22416 sys/termio.h \
22417
22418 do
22419 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22420 echo "$as_me:22420: checking for $ac_header" >&5
22421 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22422 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22423 echo $ECHO_N "(cached) $ECHO_C" >&6
22424 else
22425 cat >"conftest.$ac_ext" <<_ACEOF
22426 #line 22426 "configure"
22427 #include "confdefs.h"
22428 #include <$ac_header>
22429 _ACEOF
22430 if { (eval echo "$as_me:22430: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22431 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22432 ac_status=$?
22433 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22434 rm -f conftest.er1
22435 cat conftest.err >&5
22436 echo "$as_me:22436: \$? = $ac_status" >&5
22437 (exit "$ac_status"); } >/dev/null; then
22438 if test -s conftest.err; then
22439 ac_cpp_err=$ac_c_preproc_warn_flag
22440 else
22441 ac_cpp_err=
22442 fi
22443 else
22444 ac_cpp_err=yes
22445 fi
22446 if test -z "$ac_cpp_err"; then
22447 eval "$as_ac_Header=yes"
22448 else
22449 echo "$as_me: failed program was:" >&5
22450 cat "conftest.$ac_ext" >&5
22451 eval "$as_ac_Header=no"
22452 fi
22453 rm -f conftest.err "conftest.$ac_ext"
22454 fi
22455 echo "$as_me:22455: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22456 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22457 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22458 cat >>confdefs.h <<EOF
22459 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22460 EOF
22461
22462 fi
22463 done
22464
22465 if test "$ac_cv_header_termios_h" = yes ; then
22466 case "$CFLAGS $CPPFLAGS" in
22467 (*-D_POSIX_SOURCE*)
22468 termios_bad=dunno ;;
22469 (*) termios_bad=maybe ;;
22470 esac
22471 if test "$termios_bad" = maybe ; then
22472 echo "$as_me:22472: checking whether termios.h needs _POSIX_SOURCE" >&5
22473 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22474 cat >"conftest.$ac_ext" <<_ACEOF
22475 #line 22475 "configure"
22476 #include "confdefs.h"
22477 #include <termios.h>
22478 int
22479 main (void)
22480 {
22481 struct termios foo; int x = (int)(foo.c_iflag = 1); (void)x
22482 ;
22483 return 0;
22484 }
22485 _ACEOF
22486 rm -f "conftest.$ac_objext"
22487 if { (eval echo "$as_me:22487: \"$ac_compile\"") >&5
22488 (eval $ac_compile) 2>&5
22489 ac_status=$?
22490 echo "$as_me:22490: \$? = $ac_status" >&5
22491 (exit "$ac_status"); } &&
22492 { ac_try='test -s "conftest.$ac_objext"'
22493 { (eval echo "$as_me:22493: \"$ac_try\"") >&5
22494 (eval $ac_try) 2>&5
22495 ac_status=$?
22496 echo "$as_me:22496: \$? = $ac_status" >&5
22497 (exit "$ac_status"); }; }; then
22498 termios_bad=no
22499 else
22500 echo "$as_me: failed program was:" >&5
22501 cat "conftest.$ac_ext" >&5
22502
22503 cat >"conftest.$ac_ext" <<_ACEOF
22504 #line 22504 "configure"
22505 #include "confdefs.h"
22506
22507 #define _POSIX_SOURCE
22508 #include <termios.h>
22509 int
22510 main (void)
22511 {
22512 struct termios foo; int x = (int)(foo.c_iflag = 2); (void)x
22513 ;
22514 return 0;
22515 }
22516 _ACEOF
22517 rm -f "conftest.$ac_objext"
22518 if { (eval echo "$as_me:22518: \"$ac_compile\"") >&5
22519 (eval $ac_compile) 2>&5
22520 ac_status=$?
22521 echo "$as_me:22521: \$? = $ac_status" >&5
22522 (exit "$ac_status"); } &&
22523 { ac_try='test -s "conftest.$ac_objext"'
22524 { (eval echo "$as_me:22524: \"$ac_try\"") >&5
22525 (eval $ac_try) 2>&5
22526 ac_status=$?
22527 echo "$as_me:22527: \$? = $ac_status" >&5
22528 (exit "$ac_status"); }; }; then
22529 termios_bad=unknown
22530 else
22531 echo "$as_me: failed program was:" >&5
22532 cat "conftest.$ac_ext" >&5
22533 termios_bad=yes
22534 cat >>confdefs.h <<\EOF
22535 #define _POSIX_SOURCE 1
22536 EOF
22537
22538 fi
22539 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22540
22541 fi
22542 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22543 echo "$as_me:22543: result: $termios_bad" >&5
22544 echo "${ECHO_T}$termios_bad" >&6
22545 fi
22546 fi
22547
22548 echo "$as_me:22548: checking for tcgetattr" >&5
22549 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22550 if test "${cf_cv_have_tcgetattr+set}" = set; then
22551 echo $ECHO_N "(cached) $ECHO_C" >&6
22552 else
22553
22554 cat >"conftest.$ac_ext" <<_ACEOF
22555 #line 22555 "configure"
22556 #include "confdefs.h"
22557
22558 #include <sys/types.h>
22559 #ifdef HAVE_UNISTD_H
22560 #include <unistd.h>
22561 #endif
22562 #ifdef HAVE_TERMIOS_H
22563 #include <termios.h>
22564 #define TTY struct termios
22565 #else
22566 #ifdef HAVE_TERMIO_H
22567 #include <termio.h>
22568 #define TTY struct termio
22569 #endif
22570 #endif
22571
22572 int
22573 main (void)
22574 {
22575
22576 TTY foo;
22577 tcgetattr(1, &foo);
22578 ;
22579 return 0;
22580 }
22581 _ACEOF
22582 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22583 if { (eval echo "$as_me:22583: \"$ac_link\"") >&5
22584 (eval $ac_link) 2>&5
22585 ac_status=$?
22586 echo "$as_me:22586: \$? = $ac_status" >&5
22587 (exit "$ac_status"); } &&
22588 { ac_try='test -s "conftest$ac_exeext"'
22589 { (eval echo "$as_me:22589: \"$ac_try\"") >&5
22590 (eval $ac_try) 2>&5
22591 ac_status=$?
22592 echo "$as_me:22592: \$? = $ac_status" >&5
22593 (exit "$ac_status"); }; }; then
22594 cf_cv_have_tcgetattr=yes
22595 else
22596 echo "$as_me: failed program was:" >&5
22597 cat "conftest.$ac_ext" >&5
22598 cf_cv_have_tcgetattr=no
22599 fi
22600 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22601 fi
22602 echo "$as_me:22602: result: $cf_cv_have_tcgetattr" >&5
22603 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22604 test "$cf_cv_have_tcgetattr" = yes &&
22605 cat >>confdefs.h <<\EOF
22606 #define HAVE_TCGETATTR 1
22607 EOF
22608
22609 echo "$as_me:22609: checking for vsscanf function or workaround" >&5
22610 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22611 if test "${cf_cv_func_vsscanf+set}" = set; then
22612 echo $ECHO_N "(cached) $ECHO_C" >&6
22613 else
22614
22615 cat >"conftest.$ac_ext" <<_ACEOF
22616 #line 22616 "configure"
22617 #include "confdefs.h"
22618
22619 #include <stdarg.h>
22620 #include <stdio.h>
22621
22622 static void
22623 myfunc(const char *str, const char *fmt, ...)
22624 {
22625 va_list ap;
22626 va_start(ap, fmt);
22627 vsscanf(str, fmt, ap);
22628 va_end(ap);
22629 }
22630
22631 int
22632 main (void)
22633 {
22634
22635 myfunc("55", "%d");
22636
22637 ;
22638 return 0;
22639 }
22640 _ACEOF
22641 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22642 if { (eval echo "$as_me:22642: \"$ac_link\"") >&5
22643 (eval $ac_link) 2>&5
22644 ac_status=$?
22645 echo "$as_me:22645: \$? = $ac_status" >&5
22646 (exit "$ac_status"); } &&
22647 { ac_try='test -s "conftest$ac_exeext"'
22648 { (eval echo "$as_me:22648: \"$ac_try\"") >&5
22649 (eval $ac_try) 2>&5
22650 ac_status=$?
22651 echo "$as_me:22651: \$? = $ac_status" >&5
22652 (exit "$ac_status"); }; }; then
22653 cf_cv_func_vsscanf=vsscanf
22654 else
22655 echo "$as_me: failed program was:" >&5
22656 cat "conftest.$ac_ext" >&5
22657
22658 cat >"conftest.$ac_ext" <<_ACEOF
22659 #line 22659 "configure"
22660 #include "confdefs.h"
22661
22662 #include <stdarg.h>
22663 #include <stdio.h>
22664 int
22665 main (void)
22666 {
22667
22668 FILE strbuf;
22669 char *str = "from";
22670
22671 strbuf._flag = _IOREAD;
22672 strbuf._ptr = strbuf._base = (unsigned char *) str;
22673 strbuf._cnt = strlen(str);
22674 strbuf._file = _NFILE;
22675 return (vfscanf(&strbuf, "%d", ap))
22676 ;
22677 return 0;
22678 }
22679 _ACEOF
22680 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22681 if { (eval echo "$as_me:22681: \"$ac_link\"") >&5
22682 (eval $ac_link) 2>&5
22683 ac_status=$?
22684 echo "$as_me:22684: \$? = $ac_status" >&5
22685 (exit "$ac_status"); } &&
22686 { ac_try='test -s "conftest$ac_exeext"'
22687 { (eval echo "$as_me:22687: \"$ac_try\"") >&5
22688 (eval $ac_try) 2>&5
22689 ac_status=$?
22690 echo "$as_me:22690: \$? = $ac_status" >&5
22691 (exit "$ac_status"); }; }; then
22692 cf_cv_func_vsscanf=vfscanf
22693 else
22694 echo "$as_me: failed program was:" >&5
22695 cat "conftest.$ac_ext" >&5
22696
22697 cat >"conftest.$ac_ext" <<_ACEOF
22698 #line 22698 "configure"
22699 #include "confdefs.h"
22700
22701 #include <stdarg.h>
22702 #include <stdio.h>
22703 int
22704 main (void)
22705 {
22706
22707 FILE strbuf;
22708 char *str = "from";
22709
22710 strbuf._flag = _IOREAD;
22711 strbuf._ptr = strbuf._base = (unsigned char *) str;
22712 strbuf._cnt = strlen(str);
22713 strbuf._file = _NFILE;
22714 return (_doscan(&strbuf, "%d", ap))
22715 ;
22716 return 0;
22717 }
22718 _ACEOF
22719 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22720 if { (eval echo "$as_me:22720: \"$ac_link\"") >&5
22721 (eval $ac_link) 2>&5
22722 ac_status=$?
22723 echo "$as_me:22723: \$? = $ac_status" >&5
22724 (exit "$ac_status"); } &&
22725 { ac_try='test -s "conftest$ac_exeext"'
22726 { (eval echo "$as_me:22726: \"$ac_try\"") >&5
22727 (eval $ac_try) 2>&5
22728 ac_status=$?
22729 echo "$as_me:22729: \$? = $ac_status" >&5
22730 (exit "$ac_status"); }; }; then
22731 cf_cv_func_vsscanf=_doscan
22732 else
22733 echo "$as_me: failed program was:" >&5
22734 cat "conftest.$ac_ext" >&5
22735
22736 cf_cv_func_vsscanf=no
22737 fi
22738 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22739 fi
22740 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22741 fi
22742 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22743 fi
22744 echo "$as_me:22744: result: $cf_cv_func_vsscanf" >&5
22745 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22746
22747 case "$cf_cv_func_vsscanf" in
22748 (vsscanf)
22749 cat >>confdefs.h <<\EOF
22750 #define HAVE_VSSCANF 1
22751 EOF
22752 ;;
22753 (vfscanf)
22754 cat >>confdefs.h <<\EOF
22755 #define HAVE_VFSCANF 1
22756 EOF
22757 ;;
22758 (_doscan)
22759 cat >>confdefs.h <<\EOF
22760 #define HAVE__DOSCAN 1
22761 EOF
22762 ;;
22763 esac
22764
22765 for ac_header in \
22766 unistd.h \
22767
22768 do
22769 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22770 echo "$as_me:22770: checking for $ac_header" >&5
22771 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22772 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22773 echo $ECHO_N "(cached) $ECHO_C" >&6
22774 else
22775 cat >"conftest.$ac_ext" <<_ACEOF
22776 #line 22776 "configure"
22777 #include "confdefs.h"
22778 #include <$ac_header>
22779 _ACEOF
22780 if { (eval echo "$as_me:22780: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22781 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22782 ac_status=$?
22783 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22784 rm -f conftest.er1
22785 cat conftest.err >&5
22786 echo "$as_me:22786: \$? = $ac_status" >&5
22787 (exit "$ac_status"); } >/dev/null; then
22788 if test -s conftest.err; then
22789 ac_cpp_err=$ac_c_preproc_warn_flag
22790 else
22791 ac_cpp_err=
22792 fi
22793 else
22794 ac_cpp_err=yes
22795 fi
22796 if test -z "$ac_cpp_err"; then
22797 eval "$as_ac_Header=yes"
22798 else
22799 echo "$as_me: failed program was:" >&5
22800 cat "conftest.$ac_ext" >&5
22801 eval "$as_ac_Header=no"
22802 fi
22803 rm -f conftest.err "conftest.$ac_ext"
22804 fi
22805 echo "$as_me:22805: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22806 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22807 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22808 cat >>confdefs.h <<EOF
22809 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22810 EOF
22811
22812 fi
22813 done
22814
22815 echo "$as_me:22815: checking for working mkstemp" >&5
22816 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22817 if test "${cf_cv_func_mkstemp+set}" = set; then
22818 echo $ECHO_N "(cached) $ECHO_C" >&6
22819 else
22820
22821 rm -rf ./conftest*
22822 if test "$cross_compiling" = yes; then
22823 cf_cv_func_mkstemp=maybe
22824 else
22825 cat >"conftest.$ac_ext" <<_ACEOF
22826 #line 22826 "configure"
22827 #include "confdefs.h"
22828
22829 $ac_includes_default
22830
22831 int main(void)
22832 {
22833 static char tmpl[] = "conftestXXXXXX";
22834 char name[2][80];
22835 int n;
22836 int result = 0;
22837 int fd;
22838 struct stat sb;
22839
22840 umask(077);
22841 for (n = 0; n < 2; ++n) {
22842 strcpy(name[n], tmpl);
22843 if ((fd = mkstemp(name[n])) >= 0) {
22844 if (!strcmp(name[n], tmpl)
22845 || stat(name[n], &sb) != 0
22846 || (sb.st_mode & S_IFMT) != S_IFREG
22847 || (sb.st_mode & 077) != 0) {
22848 result = 1;
22849 }
22850 close(fd);
22851 }
22852 }
22853 if (result == 0
22854 && !strcmp(name[0], name[1]))
22855 result = 1;
22856 ${cf_cv_main_return:-return}(result);
22857 }
22858
22859 _ACEOF
22860 rm -f "conftest$ac_exeext"
22861 if { (eval echo "$as_me:22861: \"$ac_link\"") >&5
22862 (eval $ac_link) 2>&5
22863 ac_status=$?
22864 echo "$as_me:22864: \$? = $ac_status" >&5
22865 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22866 { (eval echo "$as_me:22866: \"$ac_try\"") >&5
22867 (eval $ac_try) 2>&5
22868 ac_status=$?
22869 echo "$as_me:22869: \$? = $ac_status" >&5
22870 (exit "$ac_status"); }; }; then
22871 cf_cv_func_mkstemp=yes
22872
22873 else
22874 echo "$as_me: program exited with status $ac_status" >&5
22875 echo "$as_me: failed program was:" >&5
22876 cat "conftest.$ac_ext" >&5
22877 cf_cv_func_mkstemp=no
22878
22879 fi
22880 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22881 fi
22882
22883 fi
22884 echo "$as_me:22884: result: $cf_cv_func_mkstemp" >&5
22885 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22886 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22887 echo "$as_me:22887: checking for mkstemp" >&5
22888 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22889 if test "${ac_cv_func_mkstemp+set}" = set; then
22890 echo $ECHO_N "(cached) $ECHO_C" >&6
22891 else
22892 cat >"conftest.$ac_ext" <<_ACEOF
22893 #line 22893 "configure"
22894 #include "confdefs.h"
22895 #define mkstemp autoconf_temporary
22896 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22897 #undef mkstemp
22898
22899 #ifdef __cplusplus
22900 extern "C"
22901 #endif
22902
22903 /* We use char because int might match the return type of a gcc2
22904 builtin and then its argument prototype would still apply. */
22905 char mkstemp (void);
22906
22907 int
22908 main (void)
22909 {
22910
22911 /* The GNU C library defines stubs for functions which it implements
22912 to always fail with ENOSYS. Some functions are actually named
22913 something starting with __ and the normal name is an alias. */
22914 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22915 #error found stub for mkstemp
22916 #endif
22917
22918 return mkstemp ();
22919 ;
22920 return 0;
22921 }
22922 _ACEOF
22923 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22924 if { (eval echo "$as_me:22924: \"$ac_link\"") >&5
22925 (eval $ac_link) 2>&5
22926 ac_status=$?
22927 echo "$as_me:22927: \$? = $ac_status" >&5
22928 (exit "$ac_status"); } &&
22929 { ac_try='test -s "conftest$ac_exeext"'
22930 { (eval echo "$as_me:22930: \"$ac_try\"") >&5
22931 (eval $ac_try) 2>&5
22932 ac_status=$?
22933 echo "$as_me:22933: \$? = $ac_status" >&5
22934 (exit "$ac_status"); }; }; then
22935 ac_cv_func_mkstemp=yes
22936 else
22937 echo "$as_me: failed program was:" >&5
22938 cat "conftest.$ac_ext" >&5
22939 ac_cv_func_mkstemp=no
22940 fi
22941 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22942 fi
22943 echo "$as_me:22943: result: $ac_cv_func_mkstemp" >&5
22944 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22945
22946 fi
22947 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22948
22949 cat >>confdefs.h <<\EOF
22950 #define HAVE_MKSTEMP 1
22951 EOF
22952
22953 fi
22954
22955 # setup for prototype of fallback for vsscanf()
22956
22957 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22958 HAVE_VSSCANF=1
22959 else
22960 HAVE_VSSCANF=0
22961 fi
22962
22963 if test "x$cross_compiling" = xyes ; then
22964 { echo "$as_me:22964: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22965 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22966 else
22967 echo "$as_me:22967: checking whether setvbuf arguments are reversed" >&5
22968 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22969 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22970 echo $ECHO_N "(cached) $ECHO_C" >&6
22971 else
22972 if test "$cross_compiling" = yes; then
22973 { { echo "$as_me:22973: error: cannot run test program while cross compiling" >&5
22974 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22975 { (exit 1); exit 1; }; }
22976 else
22977 cat >"conftest.$ac_ext" <<_ACEOF
22978 #line 22978 "configure"
22979 #include "confdefs.h"
22980 #include <stdio.h>
22981 /* If setvbuf has the reversed format, exit 0. */
22982 int
22983 main (void)
22984 {
22985 /* This call has the arguments reversed.
22986 A reversed system may check and see that the address of main
22987 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
22988 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22989 $ac_main_return(1);
22990 putc('\r', stdout);
22991 $ac_main_return(0); /* Non-reversed systems segv here. */
22992 }
22993 _ACEOF
22994 rm -f "conftest$ac_exeext"
22995 if { (eval echo "$as_me:22995: \"$ac_link\"") >&5
22996 (eval $ac_link) 2>&5
22997 ac_status=$?
22998 echo "$as_me:22998: \$? = $ac_status" >&5
22999 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23000 { (eval echo "$as_me:23000: \"$ac_try\"") >&5
23001 (eval $ac_try) 2>&5
23002 ac_status=$?
23003 echo "$as_me:23003: \$? = $ac_status" >&5
23004 (exit "$ac_status"); }; }; then
23005 ac_cv_func_setvbuf_reversed=yes
23006 else
23007 echo "$as_me: program exited with status $ac_status" >&5
23008 echo "$as_me: failed program was:" >&5
23009 cat "conftest.$ac_ext" >&5
23010 ac_cv_func_setvbuf_reversed=no
23011 fi
23012 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23013 fi
23014 rm -f core ./core.* ./*.core
23015 fi
23016 echo "$as_me:23016: result: $ac_cv_func_setvbuf_reversed" >&5
23017 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
23018 if test $ac_cv_func_setvbuf_reversed = yes; then
23019
23020 cat >>confdefs.h <<\EOF
23021 #define SETVBUF_REVERSED 1
23022 EOF
23023
23024 fi
23025
23026 fi
23027 echo "$as_me:23027: checking for intptr_t" >&5
23028 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
23029 if test "${ac_cv_type_intptr_t+set}" = set; then
23030 echo $ECHO_N "(cached) $ECHO_C" >&6
23031 else
23032 cat >"conftest.$ac_ext" <<_ACEOF
23033 #line 23033 "configure"
23034 #include "confdefs.h"
23035 $ac_includes_default
23036 int
23037 main (void)
23038 {
23039 if ((intptr_t *) 0)
23040 return 0;
23041 if (sizeof (intptr_t))
23042 return 0;
23043 ;
23044 return 0;
23045 }
23046 _ACEOF
23047 rm -f "conftest.$ac_objext"
23048 if { (eval echo "$as_me:23048: \"$ac_compile\"") >&5
23049 (eval $ac_compile) 2>&5
23050 ac_status=$?
23051 echo "$as_me:23051: \$? = $ac_status" >&5
23052 (exit "$ac_status"); } &&
23053 { ac_try='test -s "conftest.$ac_objext"'
23054 { (eval echo "$as_me:23054: \"$ac_try\"") >&5
23055 (eval $ac_try) 2>&5
23056 ac_status=$?
23057 echo "$as_me:23057: \$? = $ac_status" >&5
23058 (exit "$ac_status"); }; }; then
23059 ac_cv_type_intptr_t=yes
23060 else
23061 echo "$as_me: failed program was:" >&5
23062 cat "conftest.$ac_ext" >&5
23063 ac_cv_type_intptr_t=no
23064 fi
23065 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23066 fi
23067 echo "$as_me:23067: result: $ac_cv_type_intptr_t" >&5
23068 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
23069 if test "$ac_cv_type_intptr_t" = yes; then
23070 :
23071 else
23072
23073 cat >>confdefs.h <<EOF
23074 #define intptr_t long
23075 EOF
23076
23077 fi
23078
23079 echo "$as_me:23079: checking for ssize_t" >&5
23080 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
23081 if test "${ac_cv_type_ssize_t+set}" = set; then
23082 echo $ECHO_N "(cached) $ECHO_C" >&6
23083 else
23084 cat >"conftest.$ac_ext" <<_ACEOF
23085 #line 23085 "configure"
23086 #include "confdefs.h"
23087 $ac_includes_default
23088 int
23089 main (void)
23090 {
23091 if ((ssize_t *) 0)
23092 return 0;
23093 if (sizeof (ssize_t))
23094 return 0;
23095 ;
23096 return 0;
23097 }
23098 _ACEOF
23099 rm -f "conftest.$ac_objext"
23100 if { (eval echo "$as_me:23100: \"$ac_compile\"") >&5
23101 (eval $ac_compile) 2>&5
23102 ac_status=$?
23103 echo "$as_me:23103: \$? = $ac_status" >&5
23104 (exit "$ac_status"); } &&
23105 { ac_try='test -s "conftest.$ac_objext"'
23106 { (eval echo "$as_me:23106: \"$ac_try\"") >&5
23107 (eval $ac_try) 2>&5
23108 ac_status=$?
23109 echo "$as_me:23109: \$? = $ac_status" >&5
23110 (exit "$ac_status"); }; }; then
23111 ac_cv_type_ssize_t=yes
23112 else
23113 echo "$as_me: failed program was:" >&5
23114 cat "conftest.$ac_ext" >&5
23115 ac_cv_type_ssize_t=no
23116 fi
23117 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23118 fi
23119 echo "$as_me:23119: result: $ac_cv_type_ssize_t" >&5
23120 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
23121 if test "$ac_cv_type_ssize_t" = yes; then
23122 :
23123 else
23124
23125 cat >>confdefs.h <<EOF
23126 #define ssize_t int
23127 EOF
23128
23129 fi
23130
23131 echo "$as_me:23131: checking for type sigaction_t" >&5
23132 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
23133 if test "${cf_cv_type_sigaction+set}" = set; then
23134 echo $ECHO_N "(cached) $ECHO_C" >&6
23135 else
23136
23137 cat >"conftest.$ac_ext" <<_ACEOF
23138 #line 23138 "configure"
23139 #include "confdefs.h"
23140
23141 #include <signal.h>
23142 int
23143 main (void)
23144 {
23145 sigaction_t x; (void)x
23146 ;
23147 return 0;
23148 }
23149 _ACEOF
23150 rm -f "conftest.$ac_objext"
23151 if { (eval echo "$as_me:23151: \"$ac_compile\"") >&5
23152 (eval $ac_compile) 2>&5
23153 ac_status=$?
23154 echo "$as_me:23154: \$? = $ac_status" >&5
23155 (exit "$ac_status"); } &&
23156 { ac_try='test -s "conftest.$ac_objext"'
23157 { (eval echo "$as_me:23157: \"$ac_try\"") >&5
23158 (eval $ac_try) 2>&5
23159 ac_status=$?
23160 echo "$as_me:23160: \$? = $ac_status" >&5
23161 (exit "$ac_status"); }; }; then
23162 cf_cv_type_sigaction=yes
23163 else
23164 echo "$as_me: failed program was:" >&5
23165 cat "conftest.$ac_ext" >&5
23166 cf_cv_type_sigaction=no
23167 fi
23168 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23169 fi
23170
23171 echo "$as_me:23171: result: $cf_cv_type_sigaction" >&5
23172 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23173 test "$cf_cv_type_sigaction" = yes &&
23174 cat >>confdefs.h <<\EOF
23175 #define HAVE_TYPE_SIGACTION 1
23176 EOF
23177
23178 echo "$as_me:23178: checking declaration of size-change" >&5
23179 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23180 if test "${cf_cv_sizechange+set}" = set; then
23181 echo $ECHO_N "(cached) $ECHO_C" >&6
23182 else
23183
23184 cf_cv_sizechange=unknown
23185 cf_save_CPPFLAGS="$CPPFLAGS"
23186
23187 for cf_opts in "" "NEED_PTEM_H"
23188 do
23189
23190 CPPFLAGS="$cf_save_CPPFLAGS"
23191 if test -n "$cf_opts"
23192 then
23193
23194 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23195 CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23196
23197 fi
23198 cat >"conftest.$ac_ext" <<_ACEOF
23199 #line 23199 "configure"
23200 #include "confdefs.h"
23201 #include <sys/types.h>
23202 #ifdef HAVE_TERMIOS_H
23203 #include <termios.h>
23204 #else
23205 #ifdef HAVE_TERMIO_H
23206 #include <termio.h>
23207 #endif
23208 #endif
23209
23210 #ifdef NEED_PTEM_H
23211 /* This is a workaround for SCO: they neglected to define struct winsize in
23212 * termios.h -- it is only in termio.h and ptem.h
23213 */
23214 #include <sys/stream.h>
23215 #include <sys/ptem.h>
23216 #endif
23217
23218 #ifdef HAVE_SYS_IOCTL_H
23219 #include <sys/ioctl.h>
23220 #endif
23221
23222 int
23223 main (void)
23224 {
23225
23226 #ifdef TIOCGSIZE
23227 struct ttysize win; /* SunOS 3.0... */
23228 int y = win.ts_lines = 2;
23229 int x = win.ts_cols = 1;
23230 (void)y;
23231 (void)x;
23232 #else
23233 #ifdef TIOCGWINSZ
23234 struct winsize win; /* everything else */
23235 int y = win.ws_row = 2;
23236 int x = win.ws_col = 1;
23237 (void)y;
23238 (void)x;
23239 #else
23240 no TIOCGSIZE or TIOCGWINSZ
23241 #endif /* TIOCGWINSZ */
23242 #endif /* TIOCGSIZE */
23243
23244 ;
23245 return 0;
23246 }
23247 _ACEOF
23248 rm -f "conftest.$ac_objext"
23249 if { (eval echo "$as_me:23249: \"$ac_compile\"") >&5
23250 (eval $ac_compile) 2>&5
23251 ac_status=$?
23252 echo "$as_me:23252: \$? = $ac_status" >&5
23253 (exit "$ac_status"); } &&
23254 { ac_try='test -s "conftest.$ac_objext"'
23255 { (eval echo "$as_me:23255: \"$ac_try\"") >&5
23256 (eval $ac_try) 2>&5
23257 ac_status=$?
23258 echo "$as_me:23258: \$? = $ac_status" >&5
23259 (exit "$ac_status"); }; }; then
23260 cf_cv_sizechange=yes
23261 else
23262 echo "$as_me: failed program was:" >&5
23263 cat "conftest.$ac_ext" >&5
23264 cf_cv_sizechange=no
23265 fi
23266 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23267
23268 CPPFLAGS="$cf_save_CPPFLAGS"
23269 if test "$cf_cv_sizechange" = yes ; then
23270 echo "size-change succeeded ($cf_opts)" >&5
23271 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23272 break
23273 fi
23274 done
23275
23276 fi
23277 echo "$as_me:23277: result: $cf_cv_sizechange" >&5
23278 echo "${ECHO_T}$cf_cv_sizechange" >&6
23279 if test "$cf_cv_sizechange" != no ; then
23280
23281 cat >>confdefs.h <<\EOF
23282 #define HAVE_SIZECHANGE 1
23283 EOF
23284
23285 case "$cf_cv_sizechange" in
23286 (NEED*)
23287 cat >>confdefs.h <<EOF
23288 #define $cf_cv_sizechange 1
23289 EOF
23290
23291 ;;
23292 esac
23293 fi
23294
23295 echo "$as_me:23295: checking for memmove" >&5
23296 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23297 if test "${ac_cv_func_memmove+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 memmove autoconf_temporary
23304 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
23305 #undef memmove
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 memmove (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_memmove) || defined (__stub___memmove)
23323 #error found stub for memmove
23324 #endif
23325
23326 return memmove ();
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 ac_cv_func_memmove=yes
23344 else
23345 echo "$as_me: failed program was:" >&5
23346 cat "conftest.$ac_ext" >&5
23347 ac_cv_func_memmove=no
23348 fi
23349 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23350 fi
23351 echo "$as_me:23351: result: $ac_cv_func_memmove" >&5
23352 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23353 if test "$ac_cv_func_memmove" = yes; then
23354 :
23355 else
23356
23357 echo "$as_me:23357: checking for bcopy" >&5
23358 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23359 if test "${ac_cv_func_bcopy+set}" = set; then
23360 echo $ECHO_N "(cached) $ECHO_C" >&6
23361 else
23362 cat >"conftest.$ac_ext" <<_ACEOF
23363 #line 23363 "configure"
23364 #include "confdefs.h"
23365 #define bcopy autoconf_temporary
23366 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
23367 #undef bcopy
23368
23369 #ifdef __cplusplus
23370 extern "C"
23371 #endif
23372
23373 /* We use char because int might match the return type of a gcc2
23374 builtin and then its argument prototype would still apply. */
23375 char bcopy (void);
23376
23377 int
23378 main (void)
23379 {
23380
23381 /* The GNU C library defines stubs for functions which it implements
23382 to always fail with ENOSYS. Some functions are actually named
23383 something starting with __ and the normal name is an alias. */
23384 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23385 #error found stub for bcopy
23386 #endif
23387
23388 return bcopy ();
23389 ;
23390 return 0;
23391 }
23392 _ACEOF
23393 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23394 if { (eval echo "$as_me:23394: \"$ac_link\"") >&5
23395 (eval $ac_link) 2>&5
23396 ac_status=$?
23397 echo "$as_me:23397: \$? = $ac_status" >&5
23398 (exit "$ac_status"); } &&
23399 { ac_try='test -s "conftest$ac_exeext"'
23400 { (eval echo "$as_me:23400: \"$ac_try\"") >&5
23401 (eval $ac_try) 2>&5
23402 ac_status=$?
23403 echo "$as_me:23403: \$? = $ac_status" >&5
23404 (exit "$ac_status"); }; }; then
23405 ac_cv_func_bcopy=yes
23406 else
23407 echo "$as_me: failed program was:" >&5
23408 cat "conftest.$ac_ext" >&5
23409 ac_cv_func_bcopy=no
23410 fi
23411 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23412 fi
23413 echo "$as_me:23413: result: $ac_cv_func_bcopy" >&5
23414 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23415 if test "$ac_cv_func_bcopy" = yes; then
23416
23417 echo "$as_me:23417: checking if bcopy does overlapping moves" >&5
23418 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23419 if test "${cf_cv_good_bcopy+set}" = set; then
23420 echo $ECHO_N "(cached) $ECHO_C" >&6
23421 else
23422
23423 if test "$cross_compiling" = yes; then
23424 cf_cv_good_bcopy=unknown
23425 else
23426 cat >"conftest.$ac_ext" <<_ACEOF
23427 #line 23427 "configure"
23428 #include "confdefs.h"
23429
23430 $ac_includes_default
23431
23432 int main(void) {
23433 static char data[] = "abcdefghijklmnopqrstuwwxyz";
23434 char temp[40];
23435 bcopy(data, temp, sizeof(data));
23436 bcopy(temp+10, temp, 15);
23437 bcopy(temp+5, temp+15, 10);
23438 ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23439 }
23440
23441 _ACEOF
23442 rm -f "conftest$ac_exeext"
23443 if { (eval echo "$as_me:23443: \"$ac_link\"") >&5
23444 (eval $ac_link) 2>&5
23445 ac_status=$?
23446 echo "$as_me:23446: \$? = $ac_status" >&5
23447 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23448 { (eval echo "$as_me:23448: \"$ac_try\"") >&5
23449 (eval $ac_try) 2>&5
23450 ac_status=$?
23451 echo "$as_me:23451: \$? = $ac_status" >&5
23452 (exit "$ac_status"); }; }; then
23453 cf_cv_good_bcopy=yes
23454 else
23455 echo "$as_me: program exited with status $ac_status" >&5
23456 echo "$as_me: failed program was:" >&5
23457 cat "conftest.$ac_ext" >&5
23458 cf_cv_good_bcopy=no
23459 fi
23460 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23461 fi
23462
23463 fi
23464 echo "$as_me:23464: result: $cf_cv_good_bcopy" >&5
23465 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23466
23467 else
23468 cf_cv_good_bcopy=no
23469 fi
23470
23471 if test "$cf_cv_good_bcopy" = yes ; then
23472
23473 cat >>confdefs.h <<\EOF
23474 #define USE_OK_BCOPY 1
23475 EOF
23476
23477 else
23478
23479 cat >>confdefs.h <<\EOF
23480 #define USE_MY_MEMMOVE 1
23481 EOF
23482
23483 fi
23484
23485 fi
23486
23487 tty >/dev/null 2>&1 || {
23488 for ac_func in posix_openpt
23489 do
23490 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23491 echo "$as_me:23491: checking for $ac_func" >&5
23492 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23493 if eval "test \"\${$as_ac_var+set}\" = set"; then
23494 echo $ECHO_N "(cached) $ECHO_C" >&6
23495 else
23496 cat >"conftest.$ac_ext" <<_ACEOF
23497 #line 23497 "configure"
23498 #include "confdefs.h"
23499 #define $ac_func autoconf_temporary
23500 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
23501 #undef $ac_func
23502
23503 #ifdef __cplusplus
23504 extern "C"
23505 #endif
23506
23507 /* We use char because int might match the return type of a gcc2
23508 builtin and then its argument prototype would still apply. */
23509 char $ac_func (void);
23510
23511 int
23512 main (void)
23513 {
23514
23515 /* The GNU C library defines stubs for functions which it implements
23516 to always fail with ENOSYS. Some functions are actually named
23517 something starting with __ and the normal name is an alias. */
23518 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23519 #error found stub for $ac_func
23520 #endif
23521
23522 return $ac_func ();
23523 ;
23524 return 0;
23525 }
23526 _ACEOF
23527 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23528 if { (eval echo "$as_me:23528: \"$ac_link\"") >&5
23529 (eval $ac_link) 2>&5
23530 ac_status=$?
23531 echo "$as_me:23531: \$? = $ac_status" >&5
23532 (exit "$ac_status"); } &&
23533 { ac_try='test -s "conftest$ac_exeext"'
23534 { (eval echo "$as_me:23534: \"$ac_try\"") >&5
23535 (eval $ac_try) 2>&5
23536 ac_status=$?
23537 echo "$as_me:23537: \$? = $ac_status" >&5
23538 (exit "$ac_status"); }; }; then
23539 eval "$as_ac_var=yes"
23540 else
23541 echo "$as_me: failed program was:" >&5
23542 cat "conftest.$ac_ext" >&5
23543 eval "$as_ac_var=no"
23544 fi
23545 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23546 fi
23547 echo "$as_me:23547: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23548 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23549 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23550 cat >>confdefs.h <<EOF
23551 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23552 EOF
23553
23554 fi
23555 done
23556 }
23557 echo "$as_me:23557: checking if poll really works" >&5
23558 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23559 if test "${cf_cv_working_poll+set}" = set; then
23560 echo $ECHO_N "(cached) $ECHO_C" >&6
23561 else
23562
23563 if test "$cross_compiling" = yes; then
23564 cf_cv_working_poll=unknown
23565 else
23566 cat >"conftest.$ac_ext" <<_ACEOF
23567 #line 23567 "configure"
23568 #include "confdefs.h"
23569
23570 $ac_includes_default
23571
23572 #include <fcntl.h>
23573
23574 #ifdef HAVE_POLL_H
23575 #include <poll.h>
23576 #else
23577 #include <sys/poll.h>
23578 #endif
23579
23580 int main(void) {
23581 struct pollfd myfds;
23582 int ret;
23583
23584 /* check for Darwin bug with respect to "devices" */
23585 myfds.fd = open("/dev/null", 1); /* O_WRONLY */
23586 if (myfds.fd < 0)
23587 myfds.fd = 0;
23588 myfds.events = POLLIN;
23589 myfds.revents = 0;
23590
23591 ret = poll(&myfds, 1, 100);
23592
23593 if (ret < 0 || (myfds.revents & POLLNVAL)) {
23594 ret = -1;
23595 } else {
23596 int fd = 0;
23597 if (!isatty(fd)) {
23598 fd = open("/dev/tty", 2); /* O_RDWR */
23599 }
23600 #ifdef HAVE_POSIX_OPENPT
23601 if (fd < 0) {
23602 fd = posix_openpt(O_RDWR);
23603 }
23604 #endif
23605
23606 if (fd >= 0) {
23607 /* also check with standard input */
23608 myfds.fd = fd;
23609 myfds.events = POLLIN;
23610 myfds.revents = 0;
23611 ret = poll(&myfds, 1, 100);
23612 } else {
23613 ret = -1;
23614 }
23615 }
23616 ${cf_cv_main_return:-return}(ret < 0);
23617 }
23618 _ACEOF
23619 rm -f "conftest$ac_exeext"
23620 if { (eval echo "$as_me:23620: \"$ac_link\"") >&5
23621 (eval $ac_link) 2>&5
23622 ac_status=$?
23623 echo "$as_me:23623: \$? = $ac_status" >&5
23624 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23625 { (eval echo "$as_me:23625: \"$ac_try\"") >&5
23626 (eval $ac_try) 2>&5
23627 ac_status=$?
23628 echo "$as_me:23628: \$? = $ac_status" >&5
23629 (exit "$ac_status"); }; }; then
23630 cf_cv_working_poll=yes
23631 else
23632 echo "$as_me: program exited with status $ac_status" >&5
23633 echo "$as_me: failed program was:" >&5
23634 cat "conftest.$ac_ext" >&5
23635 cf_cv_working_poll=no
23636 fi
23637 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23638 fi
23639 fi
23640 echo "$as_me:23640: result: $cf_cv_working_poll" >&5
23641 echo "${ECHO_T}$cf_cv_working_poll" >&6
23642 test "$cf_cv_working_poll" = "yes" &&
23643 cat >>confdefs.h <<\EOF
23644 #define HAVE_WORKING_POLL 1
23645 EOF
23646
23647 echo "$as_me:23647: checking if MB_LEN_MAX is usable" >&5
23648 echo $ECHO_N "checking if MB_LEN_MAX is usable... $ECHO_C" >&6
23649 if test "${cf_cv_mb_len_max+set}" = set; then
23650 echo $ECHO_N "(cached) $ECHO_C" >&6
23651 else
23652
23653 cat >"conftest.$ac_ext" <<_ACEOF
23654 #line 23654 "configure"
23655 #include "confdefs.h"
23656
23657 $ac_includes_default
23658 #include <limits.h>
23659 int
23660 main (void)
23661 {
23662
23663 #if defined(MB_LEN_MAX) && MB_LEN_MAX >= 6
23664 ${cf_cv_main_return:-return}(0);
23665 #else
23666 #error MB_LEN_MAX is not usable
23667 #endif
23668
23669 ;
23670 return 0;
23671 }
23672 _ACEOF
23673 rm -f "conftest.$ac_objext"
23674 if { (eval echo "$as_me:23674: \"$ac_compile\"") >&5
23675 (eval $ac_compile) 2>&5
23676 ac_status=$?
23677 echo "$as_me:23677: \$? = $ac_status" >&5
23678 (exit "$ac_status"); } &&
23679 { ac_try='test -s "conftest.$ac_objext"'
23680 { (eval echo "$as_me:23680: \"$ac_try\"") >&5
23681 (eval $ac_try) 2>&5
23682 ac_status=$?
23683 echo "$as_me:23683: \$? = $ac_status" >&5
23684 (exit "$ac_status"); }; }; then
23685 cf_cv_mb_len_max=yes
23686 else
23687 echo "$as_me: failed program was:" >&5
23688 cat "conftest.$ac_ext" >&5
23689 cf_cv_mb_len_max=no
23690 fi
23691 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23692 fi
23693 echo "$as_me:23693: result: $cf_cv_mb_len_max" >&5
23694 echo "${ECHO_T}$cf_cv_mb_len_max" >&6
23695 if test "$cf_cv_mb_len_max" = yes
23696 then
23697
23698 cat >>confdefs.h <<\EOF
23699 #define HAVE_CONSISTENT_MB_LEN_MAX 1
23700 EOF
23701
23702 else
23703 { echo "$as_me:23703: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&5
23704 echo "$as_me: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&2;}
23705 fi
23706
23707 echo "$as_me:23707: checking for va_copy" >&5
23708 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23709 if test "${cf_cv_have_va_copy+set}" = set; then
23710 echo $ECHO_N "(cached) $ECHO_C" >&6
23711 else
23712
23713 cat >"conftest.$ac_ext" <<_ACEOF
23714 #line 23714 "configure"
23715 #include "confdefs.h"
23716
23717 #include <stdarg.h>
23718
23719 int
23720 main (void)
23721 {
23722
23723 static va_list dst;
23724 static va_list src;
23725 va_copy(dst, src)
23726 ;
23727 return 0;
23728 }
23729 _ACEOF
23730 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23731 if { (eval echo "$as_me:23731: \"$ac_link\"") >&5
23732 (eval $ac_link) 2>&5
23733 ac_status=$?
23734 echo "$as_me:23734: \$? = $ac_status" >&5
23735 (exit "$ac_status"); } &&
23736 { ac_try='test -s "conftest$ac_exeext"'
23737 { (eval echo "$as_me:23737: \"$ac_try\"") >&5
23738 (eval $ac_try) 2>&5
23739 ac_status=$?
23740 echo "$as_me:23740: \$? = $ac_status" >&5
23741 (exit "$ac_status"); }; }; then
23742 cf_cv_have_va_copy=yes
23743 else
23744 echo "$as_me: failed program was:" >&5
23745 cat "conftest.$ac_ext" >&5
23746 cf_cv_have_va_copy=no
23747 fi
23748 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23749 fi
23750 echo "$as_me:23750: result: $cf_cv_have_va_copy" >&5
23751 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23752
23753 if test "$cf_cv_have_va_copy" = yes;
23754 then
23755
23756 cat >>confdefs.h <<\EOF
23757 #define HAVE_VA_COPY 1
23758 EOF
23759
23760 else # !cf_cv_have_va_copy
23761
23762 echo "$as_me:23762: checking for __va_copy" >&5
23763 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23764 if test "${cf_cv_have___va_copy+set}" = set; then
23765 echo $ECHO_N "(cached) $ECHO_C" >&6
23766 else
23767
23768 cat >"conftest.$ac_ext" <<_ACEOF
23769 #line 23769 "configure"
23770 #include "confdefs.h"
23771
23772 #include <stdarg.h>
23773
23774 int
23775 main (void)
23776 {
23777
23778 static va_list dst;
23779 static va_list src;
23780 __va_copy(dst, src)
23781 ;
23782 return 0;
23783 }
23784 _ACEOF
23785 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23786 if { (eval echo "$as_me:23786: \"$ac_link\"") >&5
23787 (eval $ac_link) 2>&5
23788 ac_status=$?
23789 echo "$as_me:23789: \$? = $ac_status" >&5
23790 (exit "$ac_status"); } &&
23791 { ac_try='test -s "conftest$ac_exeext"'
23792 { (eval echo "$as_me:23792: \"$ac_try\"") >&5
23793 (eval $ac_try) 2>&5
23794 ac_status=$?
23795 echo "$as_me:23795: \$? = $ac_status" >&5
23796 (exit "$ac_status"); }; }; then
23797 cf_cv_have___va_copy=yes
23798 else
23799 echo "$as_me: failed program was:" >&5
23800 cat "conftest.$ac_ext" >&5
23801 cf_cv_have___va_copy=no
23802 fi
23803 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23804 fi
23805 echo "$as_me:23805: result: $cf_cv_have___va_copy" >&5
23806 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23807
23808 if test "$cf_cv_have___va_copy" = yes
23809 then
23810
23811 cat >>confdefs.h <<\EOF
23812 #define HAVE___VA_COPY 1
23813 EOF
23814
23815 else # !cf_cv_have___va_copy
23816
23817 echo "$as_me:23817: checking for __builtin_va_copy" >&5
23818 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23819 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23820 echo $ECHO_N "(cached) $ECHO_C" >&6
23821 else
23822
23823 cat >"conftest.$ac_ext" <<_ACEOF
23824 #line 23824 "configure"
23825 #include "confdefs.h"
23826
23827 #include <stdarg.h>
23828
23829 int
23830 main (void)
23831 {
23832
23833 static va_list dst;
23834 static va_list src;
23835 __builtin_va_copy(dst, src)
23836 ;
23837 return 0;
23838 }
23839 _ACEOF
23840 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23841 if { (eval echo "$as_me:23841: \"$ac_link\"") >&5
23842 (eval $ac_link) 2>&5
23843 ac_status=$?
23844 echo "$as_me:23844: \$? = $ac_status" >&5
23845 (exit "$ac_status"); } &&
23846 { ac_try='test -s "conftest$ac_exeext"'
23847 { (eval echo "$as_me:23847: \"$ac_try\"") >&5
23848 (eval $ac_try) 2>&5
23849 ac_status=$?
23850 echo "$as_me:23850: \$? = $ac_status" >&5
23851 (exit "$ac_status"); }; }; then
23852 cf_cv_have___builtin_va_copy=yes
23853 else
23854 echo "$as_me: failed program was:" >&5
23855 cat "conftest.$ac_ext" >&5
23856 cf_cv_have___builtin_va_copy=no
23857 fi
23858 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23859 fi
23860 echo "$as_me:23860: result: $cf_cv_have___builtin_va_copy" >&5
23861 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23862
23863 test "$cf_cv_have___builtin_va_copy" = yes &&
23864
23865 cat >>confdefs.h <<\EOF
23866 #define HAVE___BUILTIN_VA_COPY 1
23867 EOF
23868
23869 fi # cf_cv_have___va_copy
23870
23871 fi # cf_cv_have_va_copy
23872
23873 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23874 (*yes*)
23875 ;;
23876
23877 (*)
23878 echo "$as_me:23878: checking if we can simply copy va_list" >&5
23879 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23880 if test "${cf_cv_pointer_va_list+set}" = set; then
23881 echo $ECHO_N "(cached) $ECHO_C" >&6
23882 else
23883
23884 cat >"conftest.$ac_ext" <<_ACEOF
23885 #line 23885 "configure"
23886 #include "confdefs.h"
23887
23888 #include <stdarg.h>
23889
23890 int
23891 main (void)
23892 {
23893
23894 va_list dst;
23895 va_list src;
23896 dst = src
23897 ;
23898 return 0;
23899 }
23900 _ACEOF
23901 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23902 if { (eval echo "$as_me:23902: \"$ac_link\"") >&5
23903 (eval $ac_link) 2>&5
23904 ac_status=$?
23905 echo "$as_me:23905: \$? = $ac_status" >&5
23906 (exit "$ac_status"); } &&
23907 { ac_try='test -s "conftest$ac_exeext"'
23908 { (eval echo "$as_me:23908: \"$ac_try\"") >&5
23909 (eval $ac_try) 2>&5
23910 ac_status=$?
23911 echo "$as_me:23911: \$? = $ac_status" >&5
23912 (exit "$ac_status"); }; }; then
23913 cf_cv_pointer_va_list=yes
23914 else
23915 echo "$as_me: failed program was:" >&5
23916 cat "conftest.$ac_ext" >&5
23917 cf_cv_pointer_va_list=no
23918 fi
23919 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23920 fi
23921 echo "$as_me:23921: result: $cf_cv_pointer_va_list" >&5
23922 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23923
23924 if test "$cf_cv_pointer_va_list" = no
23925 then
23926 echo "$as_me:23926: checking if we can copy va_list indirectly" >&5
23927 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23928 if test "${cf_cv_array_va_list+set}" = set; then
23929 echo $ECHO_N "(cached) $ECHO_C" >&6
23930 else
23931
23932 cat >"conftest.$ac_ext" <<_ACEOF
23933 #line 23933 "configure"
23934 #include "confdefs.h"
23935
23936 #include <stdarg.h>
23937
23938 int
23939 main (void)
23940 {
23941
23942 va_list dst;
23943 va_list src;
23944 *dst = *src
23945 ;
23946 return 0;
23947 }
23948 _ACEOF
23949 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23950 if { (eval echo "$as_me:23950: \"$ac_link\"") >&5
23951 (eval $ac_link) 2>&5
23952 ac_status=$?
23953 echo "$as_me:23953: \$? = $ac_status" >&5
23954 (exit "$ac_status"); } &&
23955 { ac_try='test -s "conftest$ac_exeext"'
23956 { (eval echo "$as_me:23956: \"$ac_try\"") >&5
23957 (eval $ac_try) 2>&5
23958 ac_status=$?
23959 echo "$as_me:23959: \$? = $ac_status" >&5
23960 (exit "$ac_status"); }; }; then
23961 cf_cv_array_va_list=yes
23962 else
23963 echo "$as_me: failed program was:" >&5
23964 cat "conftest.$ac_ext" >&5
23965 cf_cv_array_va_list=no
23966 fi
23967 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23968 fi
23969 echo "$as_me:23969: result: $cf_cv_array_va_list" >&5
23970 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23971 test "$cf_cv_array_va_list" = yes &&
23972 cat >>confdefs.h <<\EOF
23973 #define ARRAY_VA_LIST 1
23974 EOF
23975
23976 fi
23977 ;;
23978 esac
23979
23980 echo "$as_me:23980: checking for pid_t" >&5
23981 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23982 if test "${ac_cv_type_pid_t+set}" = set; then
23983 echo $ECHO_N "(cached) $ECHO_C" >&6
23984 else
23985 cat >"conftest.$ac_ext" <<_ACEOF
23986 #line 23986 "configure"
23987 #include "confdefs.h"
23988 $ac_includes_default
23989 int
23990 main (void)
23991 {
23992 if ((pid_t *) 0)
23993 return 0;
23994 if (sizeof (pid_t))
23995 return 0;
23996 ;
23997 return 0;
23998 }
23999 _ACEOF
24000 rm -f "conftest.$ac_objext"
24001 if { (eval echo "$as_me:24001: \"$ac_compile\"") >&5
24002 (eval $ac_compile) 2>&5
24003 ac_status=$?
24004 echo "$as_me:24004: \$? = $ac_status" >&5
24005 (exit "$ac_status"); } &&
24006 { ac_try='test -s "conftest.$ac_objext"'
24007 { (eval echo "$as_me:24007: \"$ac_try\"") >&5
24008 (eval $ac_try) 2>&5
24009 ac_status=$?
24010 echo "$as_me:24010: \$? = $ac_status" >&5
24011 (exit "$ac_status"); }; }; then
24012 ac_cv_type_pid_t=yes
24013 else
24014 echo "$as_me: failed program was:" >&5
24015 cat "conftest.$ac_ext" >&5
24016 ac_cv_type_pid_t=no
24017 fi
24018 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24019 fi
24020 echo "$as_me:24020: result: $ac_cv_type_pid_t" >&5
24021 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
24022 if test "$ac_cv_type_pid_t" = yes; then
24023 :
24024 else
24025
24026 cat >>confdefs.h <<EOF
24027 #define pid_t int
24028 EOF
24029
24030 fi
24031
24032 for ac_header in unistd.h vfork.h
24033 do
24034 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24035 echo "$as_me:24035: checking for $ac_header" >&5
24036 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24037 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24038 echo $ECHO_N "(cached) $ECHO_C" >&6
24039 else
24040 cat >"conftest.$ac_ext" <<_ACEOF
24041 #line 24041 "configure"
24042 #include "confdefs.h"
24043 #include <$ac_header>
24044 _ACEOF
24045 if { (eval echo "$as_me:24045: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24046 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24047 ac_status=$?
24048 $EGREP -v '^ *\+' conftest.er1 >conftest.err
24049 rm -f conftest.er1
24050 cat conftest.err >&5
24051 echo "$as_me:24051: \$? = $ac_status" >&5
24052 (exit "$ac_status"); } >/dev/null; then
24053 if test -s conftest.err; then
24054 ac_cpp_err=$ac_c_preproc_warn_flag
24055 else
24056 ac_cpp_err=
24057 fi
24058 else
24059 ac_cpp_err=yes
24060 fi
24061 if test -z "$ac_cpp_err"; then
24062 eval "$as_ac_Header=yes"
24063 else
24064 echo "$as_me: failed program was:" >&5
24065 cat "conftest.$ac_ext" >&5
24066 eval "$as_ac_Header=no"
24067 fi
24068 rm -f conftest.err "conftest.$ac_ext"
24069 fi
24070 echo "$as_me:24070: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24071 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24072 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24073 cat >>confdefs.h <<EOF
24074 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24075 EOF
24076
24077 fi
24078 done
24079
24080 for ac_func in fork vfork
24081 do
24082 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24083 echo "$as_me:24083: checking for $ac_func" >&5
24084 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24085 if eval "test \"\${$as_ac_var+set}\" = set"; then
24086 echo $ECHO_N "(cached) $ECHO_C" >&6
24087 else
24088 cat >"conftest.$ac_ext" <<_ACEOF
24089 #line 24089 "configure"
24090 #include "confdefs.h"
24091 #define $ac_func autoconf_temporary
24092 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
24093 #undef $ac_func
24094
24095 #ifdef __cplusplus
24096 extern "C"
24097 #endif
24098
24099 /* We use char because int might match the return type of a gcc2
24100 builtin and then its argument prototype would still apply. */
24101 char $ac_func (void);
24102
24103 int
24104 main (void)
24105 {
24106
24107 /* The GNU C library defines stubs for functions which it implements
24108 to always fail with ENOSYS. Some functions are actually named
24109 something starting with __ and the normal name is an alias. */
24110 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24111 #error found stub for $ac_func
24112 #endif
24113
24114 return $ac_func ();
24115 ;
24116 return 0;
24117 }
24118 _ACEOF
24119 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24120 if { (eval echo "$as_me:24120: \"$ac_link\"") >&5
24121 (eval $ac_link) 2>&5
24122 ac_status=$?
24123 echo "$as_me:24123: \$? = $ac_status" >&5
24124 (exit "$ac_status"); } &&
24125 { ac_try='test -s "conftest$ac_exeext"'
24126 { (eval echo "$as_me:24126: \"$ac_try\"") >&5
24127 (eval $ac_try) 2>&5
24128 ac_status=$?
24129 echo "$as_me:24129: \$? = $ac_status" >&5
24130 (exit "$ac_status"); }; }; then
24131 eval "$as_ac_var=yes"
24132 else
24133 echo "$as_me: failed program was:" >&5
24134 cat "conftest.$ac_ext" >&5
24135 eval "$as_ac_var=no"
24136 fi
24137 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24138 fi
24139 echo "$as_me:24139: result: `eval echo '${'"$as_ac_var"'}'`" >&5
24140 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
24141 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
24142 cat >>confdefs.h <<EOF
24143 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24144 EOF
24145
24146 fi
24147 done
24148
24149 ac_cv_func_fork_works=$ac_cv_func_fork
24150 if test "x$ac_cv_func_fork" = xyes; then
24151 echo "$as_me:24151: checking for working fork" >&5
24152 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
24153 if test "${ac_cv_func_fork_works+set}" = set; then
24154 echo $ECHO_N "(cached) $ECHO_C" >&6
24155 else
24156 if test "$cross_compiling" = yes; then
24157 ac_cv_func_fork_works=cross
24158 else
24159 cat >"conftest.$ac_ext" <<_ACEOF
24160 /* By Rüdiger Kuhlmann. */
24161 #include <sys/types.h>
24162 #if HAVE_UNISTD_H
24163 # include <unistd.h>
24164 #endif
24165 /* Some systems only have a dummy stub for fork() */
24166 int main (void)
24167 {
24168 if (fork() < 0)
24169 $ac_main_return (1);
24170 $ac_main_return (0);
24171 }
24172 _ACEOF
24173 rm -f "conftest$ac_exeext"
24174 if { (eval echo "$as_me:24174: \"$ac_link\"") >&5
24175 (eval $ac_link) 2>&5
24176 ac_status=$?
24177 echo "$as_me:24177: \$? = $ac_status" >&5
24178 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24179 { (eval echo "$as_me:24179: \"$ac_try\"") >&5
24180 (eval $ac_try) 2>&5
24181 ac_status=$?
24182 echo "$as_me:24182: \$? = $ac_status" >&5
24183 (exit "$ac_status"); }; }; then
24184 ac_cv_func_fork_works=yes
24185 else
24186 echo "$as_me: program exited with status $ac_status" >&5
24187 echo "$as_me: failed program was:" >&5
24188 cat "conftest.$ac_ext" >&5
24189 ac_cv_func_fork_works=no
24190 fi
24191 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24192 fi
24193 fi
24194 echo "$as_me:24194: result: $ac_cv_func_fork_works" >&5
24195 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
24196
24197 fi
24198 if test "x$ac_cv_func_fork_works" = xcross; then
24199 case $host in
24200 *-*-amigaos* | *-*-msdosdjgpp*)
24201 # Override, as these systems have only a dummy fork() stub
24202 ac_cv_func_fork_works=no
24203 ;;
24204 *)
24205 ac_cv_func_fork_works=yes
24206 ;;
24207 esac
24208 { echo "$as_me:24208: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
24209 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
24210 fi
24211 ac_cv_func_vfork_works=$ac_cv_func_vfork
24212 if test "x$ac_cv_func_vfork" = xyes; then
24213 echo "$as_me:24213: checking for working vfork" >&5
24214 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
24215 if test "${ac_cv_func_vfork_works+set}" = set; then
24216 echo $ECHO_N "(cached) $ECHO_C" >&6
24217 else
24218 if test "$cross_compiling" = yes; then
24219 ac_cv_func_vfork_works=cross
24220 else
24221 cat >"conftest.$ac_ext" <<_ACEOF
24222 #line 24222 "configure"
24223 #include "confdefs.h"
24224 /* Thanks to Paul Eggert for this test. */
24225 #include <stdio.h>
24226 #include <sys/types.h>
24227 #include <sys/stat.h>
24228 #if HAVE_UNISTD_H
24229 # include <unistd.h>
24230 #endif
24231 #if HAVE_VFORK_H
24232 # include <vfork.h>
24233 #endif
24234 /* On some sparc systems, changes by the child to local and incoming
24235 argument registers are propagated back to the parent. The compiler
24236 is told about this with #include <vfork.h>, but some compilers
24237 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
24238 static variable whose address is put into a register that is
24239 clobbered by the vfork. */
24240 static
24241 sparc_address_test (int arg)
24242 {
24243 static pid_t child;
24244 if (!child) {
24245 child = vfork ();
24246 if (child < 0) {
24247 perror ("vfork");
24248 _exit(2);
24249 }
24250 if (!child) {
24251 arg = getpid();
24252 write(-1, "", 0);
24253 _exit (arg);
24254 }
24255 }
24256 }
24257
24258 int
24259 main (void)
24260 {
24261 pid_t parent = getpid ();
24262 pid_t child;
24263
24264 sparc_address_test ();
24265
24266 child = vfork ();
24267
24268 if (child == 0) {
24269 /* Here is another test for sparc vfork register problems. This
24270 test uses lots of local variables, at least as many local
24271 variables as main has allocated so far including compiler
24272 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
24273 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
24274 reuse the register of parent for one of the local variables,
24275 since it will think that parent can't possibly be used any more
24276 in this routine. Assigning to the local variable will thus
24277 munge parent in the parent process. */
24278 pid_t
24279 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24280 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24281 /* Convince the compiler that p..p7 are live; otherwise, it might
24282 use the same hardware register for all 8 local variables. */
24283 if (p != p1 || p != p2 || p != p3 || p != p4
24284 || p != p5 || p != p6 || p != p7)
24285 _exit(1);
24286
24287 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24288 from child file descriptors. If the child closes a descriptor
24289 before it execs or exits, this munges the parent's descriptor
24290 as well. Test for this by closing stdout in the child. */
24291 _exit(close(fileno(stdout)) != 0);
24292 } else {
24293 int status;
24294 struct stat st;
24295
24296 while (wait(&status) != child)
24297 ;
24298 $ac_main_return(
24299 /* Was there some problem with vforking? */
24300 child < 0
24301
24302 /* Did the child fail? (This shouldn't happen.) */
24303 || status
24304
24305 /* Did the vfork/compiler bug occur? */
24306 || parent != getpid()
24307
24308 /* Did the file descriptor bug occur? */
24309 || fstat(fileno(stdout), &st) != 0
24310 );
24311 }
24312 }
24313 _ACEOF
24314 rm -f "conftest$ac_exeext"
24315 if { (eval echo "$as_me:24315: \"$ac_link\"") >&5
24316 (eval $ac_link) 2>&5
24317 ac_status=$?
24318 echo "$as_me:24318: \$? = $ac_status" >&5
24319 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24320 { (eval echo "$as_me:24320: \"$ac_try\"") >&5
24321 (eval $ac_try) 2>&5
24322 ac_status=$?
24323 echo "$as_me:24323: \$? = $ac_status" >&5
24324 (exit "$ac_status"); }; }; then
24325 ac_cv_func_vfork_works=yes
24326 else
24327 echo "$as_me: program exited with status $ac_status" >&5
24328 echo "$as_me: failed program was:" >&5
24329 cat "conftest.$ac_ext" >&5
24330 ac_cv_func_vfork_works=no
24331 fi
24332 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24333 fi
24334 fi
24335 echo "$as_me:24335: result: $ac_cv_func_vfork_works" >&5
24336 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24337
24338 fi;
24339 if test "x$ac_cv_func_fork_works" = xcross; then
24340 ac_cv_func_vfork_works=ac_cv_func_vfork
24341 { echo "$as_me:24341: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24342 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24343 fi
24344
24345 if test "x$ac_cv_func_vfork_works" = xyes; then
24346
24347 cat >>confdefs.h <<\EOF
24348 #define HAVE_WORKING_VFORK 1
24349 EOF
24350
24351 else
24352
24353 cat >>confdefs.h <<\EOF
24354 #define vfork fork
24355 EOF
24356
24357 fi
24358 if test "x$ac_cv_func_fork_works" = xyes; then
24359
24360 cat >>confdefs.h <<\EOF
24361 #define HAVE_WORKING_FORK 1
24362 EOF
24363
24364 fi
24365
24366 echo "$as_me:24366: checking if fopen accepts explicit binary mode" >&5
24367 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24368 if test "${cf_cv_fopen_bin_r+set}" = set; then
24369 echo $ECHO_N "(cached) $ECHO_C" >&6
24370 else
24371
24372 if test "$cross_compiling" = yes; then
24373 cf_cv_fopen_bin_r=unknown
24374 else
24375 cat >"conftest.$ac_ext" <<_ACEOF
24376 #line 24376 "configure"
24377 #include "confdefs.h"
24378
24379 $ac_includes_default
24380
24381 int main(void)
24382 {
24383 FILE *fp = fopen("conftest.tmp", "wb");
24384 int rc = 0;
24385 if (fp != NULL) {
24386 int p, q;
24387 for (p = 0; p < 256; ++p) {
24388 fputc(p, fp);
24389 }
24390 fclose(fp);
24391 fp = fopen("conftest.tmp", "rb");
24392 if (fp != NULL) {
24393 for (p = 0; p < 256; ++p) {
24394 q = fgetc(fp);
24395 if (q != p) {
24396 rc = 1;
24397 break;
24398 }
24399 }
24400 } else {
24401 rc = 1;
24402 }
24403 } else {
24404 rc = 1;
24405 }
24406 ${cf_cv_main_return:-return} (rc);
24407 }
24408
24409 _ACEOF
24410 rm -f "conftest$ac_exeext"
24411 if { (eval echo "$as_me:24411: \"$ac_link\"") >&5
24412 (eval $ac_link) 2>&5
24413 ac_status=$?
24414 echo "$as_me:24414: \$? = $ac_status" >&5
24415 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24416 { (eval echo "$as_me:24416: \"$ac_try\"") >&5
24417 (eval $ac_try) 2>&5
24418 ac_status=$?
24419 echo "$as_me:24419: \$? = $ac_status" >&5
24420 (exit "$ac_status"); }; }; then
24421 cf_cv_fopen_bin_r=yes
24422 else
24423 echo "$as_me: program exited with status $ac_status" >&5
24424 echo "$as_me: failed program was:" >&5
24425 cat "conftest.$ac_ext" >&5
24426 cf_cv_fopen_bin_r=no
24427 fi
24428 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24429 fi
24430
24431 fi
24432 echo "$as_me:24432: result: $cf_cv_fopen_bin_r" >&5
24433 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24434 test "x$cf_cv_fopen_bin_r" != xno &&
24435 cat >>confdefs.h <<\EOF
24436 #define USE_FOPEN_BIN_R 1
24437 EOF
24438
24439 echo "$as_me:24439: checking for cc_t" >&5
24440 echo $ECHO_N "checking for cc_t... $ECHO_C" >&6
24441 if test "${ac_cv_type_cc_t+set}" = set; then
24442 echo $ECHO_N "(cached) $ECHO_C" >&6
24443 else
24444 cat >"conftest.$ac_ext" <<_ACEOF
24445 #line 24445 "configure"
24446 #include "confdefs.h"
24447
24448 $ac_includes_default
24449 #include <termios.h>
24450
24451 int
24452 main (void)
24453 {
24454 if ((cc_t *) 0)
24455 return 0;
24456 if (sizeof (cc_t))
24457 return 0;
24458 ;
24459 return 0;
24460 }
24461 _ACEOF
24462 rm -f "conftest.$ac_objext"
24463 if { (eval echo "$as_me:24463: \"$ac_compile\"") >&5
24464 (eval $ac_compile) 2>&5
24465 ac_status=$?
24466 echo "$as_me:24466: \$? = $ac_status" >&5
24467 (exit "$ac_status"); } &&
24468 { ac_try='test -s "conftest.$ac_objext"'
24469 { (eval echo "$as_me:24469: \"$ac_try\"") >&5
24470 (eval $ac_try) 2>&5
24471 ac_status=$?
24472 echo "$as_me:24472: \$? = $ac_status" >&5
24473 (exit "$ac_status"); }; }; then
24474 ac_cv_type_cc_t=yes
24475 else
24476 echo "$as_me: failed program was:" >&5
24477 cat "conftest.$ac_ext" >&5
24478 ac_cv_type_cc_t=no
24479 fi
24480 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24481 fi
24482 echo "$as_me:24482: result: $ac_cv_type_cc_t" >&5
24483 echo "${ECHO_T}$ac_cv_type_cc_t" >&6
24484 if test "$ac_cv_type_cc_t" = yes; then
24485
24486 cat >>confdefs.h <<EOF
24487 #define HAVE_CC_T 1
24488 EOF
24489
24490 fi
24491
24492 echo "$as_me:24492: checking for speed_t" >&5
24493 echo $ECHO_N "checking for speed_t... $ECHO_C" >&6
24494 if test "${ac_cv_type_speed_t+set}" = set; then
24495 echo $ECHO_N "(cached) $ECHO_C" >&6
24496 else
24497 cat >"conftest.$ac_ext" <<_ACEOF
24498 #line 24498 "configure"
24499 #include "confdefs.h"
24500
24501 $ac_includes_default
24502 #include <termios.h>
24503
24504 int
24505 main (void)
24506 {
24507 if ((speed_t *) 0)
24508 return 0;
24509 if (sizeof (speed_t))
24510 return 0;
24511 ;
24512 return 0;
24513 }
24514 _ACEOF
24515 rm -f "conftest.$ac_objext"
24516 if { (eval echo "$as_me:24516: \"$ac_compile\"") >&5
24517 (eval $ac_compile) 2>&5
24518 ac_status=$?
24519 echo "$as_me:24519: \$? = $ac_status" >&5
24520 (exit "$ac_status"); } &&
24521 { ac_try='test -s "conftest.$ac_objext"'
24522 { (eval echo "$as_me:24522: \"$ac_try\"") >&5
24523 (eval $ac_try) 2>&5
24524 ac_status=$?
24525 echo "$as_me:24525: \$? = $ac_status" >&5
24526 (exit "$ac_status"); }; }; then
24527 ac_cv_type_speed_t=yes
24528 else
24529 echo "$as_me: failed program was:" >&5
24530 cat "conftest.$ac_ext" >&5
24531 ac_cv_type_speed_t=no
24532 fi
24533 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24534 fi
24535 echo "$as_me:24535: result: $ac_cv_type_speed_t" >&5
24536 echo "${ECHO_T}$ac_cv_type_speed_t" >&6
24537 if test "$ac_cv_type_speed_t" = yes; then
24538
24539 cat >>confdefs.h <<EOF
24540 #define HAVE_SPEED_T 1
24541 EOF
24542
24543 fi
24544
24545 echo "$as_me:24545: checking for tcflag_t" >&5
24546 echo $ECHO_N "checking for tcflag_t... $ECHO_C" >&6
24547 if test "${ac_cv_type_tcflag_t+set}" = set; then
24548 echo $ECHO_N "(cached) $ECHO_C" >&6
24549 else
24550 cat >"conftest.$ac_ext" <<_ACEOF
24551 #line 24551 "configure"
24552 #include "confdefs.h"
24553
24554 $ac_includes_default
24555 #include <termios.h>
24556
24557 int
24558 main (void)
24559 {
24560 if ((tcflag_t *) 0)
24561 return 0;
24562 if (sizeof (tcflag_t))
24563 return 0;
24564 ;
24565 return 0;
24566 }
24567 _ACEOF
24568 rm -f "conftest.$ac_objext"
24569 if { (eval echo "$as_me:24569: \"$ac_compile\"") >&5
24570 (eval $ac_compile) 2>&5
24571 ac_status=$?
24572 echo "$as_me:24572: \$? = $ac_status" >&5
24573 (exit "$ac_status"); } &&
24574 { ac_try='test -s "conftest.$ac_objext"'
24575 { (eval echo "$as_me:24575: \"$ac_try\"") >&5
24576 (eval $ac_try) 2>&5
24577 ac_status=$?
24578 echo "$as_me:24578: \$? = $ac_status" >&5
24579 (exit "$ac_status"); }; }; then
24580 ac_cv_type_tcflag_t=yes
24581 else
24582 echo "$as_me: failed program was:" >&5
24583 cat "conftest.$ac_ext" >&5
24584 ac_cv_type_tcflag_t=no
24585 fi
24586 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24587 fi
24588 echo "$as_me:24588: result: $ac_cv_type_tcflag_t" >&5
24589 echo "${ECHO_T}$ac_cv_type_tcflag_t" >&6
24590 if test "$ac_cv_type_tcflag_t" = yes; then
24591
24592 cat >>confdefs.h <<EOF
24593 #define HAVE_TCFLAG_T 1
24594 EOF
24595
24596 fi
24597
24598 echo "$as_me:24598: checking for sigset_t" >&5
24599 echo $ECHO_N "checking for sigset_t... $ECHO_C" >&6
24600 if test "${ac_cv_type_sigset_t+set}" = set; then
24601 echo $ECHO_N "(cached) $ECHO_C" >&6
24602 else
24603 cat >"conftest.$ac_ext" <<_ACEOF
24604 #line 24604 "configure"
24605 #include "confdefs.h"
24606
24607 $ac_includes_default
24608 #include <signal.h>
24609
24610 int
24611 main (void)
24612 {
24613 if ((sigset_t *) 0)
24614 return 0;
24615 if (sizeof (sigset_t))
24616 return 0;
24617 ;
24618 return 0;
24619 }
24620 _ACEOF
24621 rm -f "conftest.$ac_objext"
24622 if { (eval echo "$as_me:24622: \"$ac_compile\"") >&5
24623 (eval $ac_compile) 2>&5
24624 ac_status=$?
24625 echo "$as_me:24625: \$? = $ac_status" >&5
24626 (exit "$ac_status"); } &&
24627 { ac_try='test -s "conftest.$ac_objext"'
24628 { (eval echo "$as_me:24628: \"$ac_try\"") >&5
24629 (eval $ac_try) 2>&5
24630 ac_status=$?
24631 echo "$as_me:24631: \$? = $ac_status" >&5
24632 (exit "$ac_status"); }; }; then
24633 ac_cv_type_sigset_t=yes
24634 else
24635 echo "$as_me: failed program was:" >&5
24636 cat "conftest.$ac_ext" >&5
24637 ac_cv_type_sigset_t=no
24638 fi
24639 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24640 fi
24641 echo "$as_me:24641: result: $ac_cv_type_sigset_t" >&5
24642 echo "${ECHO_T}$ac_cv_type_sigset_t" >&6
24643 if test "$ac_cv_type_sigset_t" = yes; then
24644
24645 cat >>confdefs.h <<EOF
24646 #define HAVE_SIGSET_T 1
24647 EOF
24648
24649 fi
24650
24651 # special check for test/ditto.c
24652
24653 echo "$as_me:24653: checking for openpty in -lutil" >&5
24654 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24655 if test "${ac_cv_lib_util_openpty+set}" = set; then
24656 echo $ECHO_N "(cached) $ECHO_C" >&6
24657 else
24658 ac_check_lib_save_LIBS=$LIBS
24659 LIBS="-lutil $LIBS"
24660 cat >"conftest.$ac_ext" <<_ACEOF
24661 #line 24661 "configure"
24662 #include "confdefs.h"
24663
24664 /* Override any gcc2 internal prototype to avoid an error. */
24665 #ifdef __cplusplus
24666 extern "C"
24667 #endif
24668 /* We use char because int might match the return type of a gcc2
24669 builtin and then its argument prototype would still apply. */
24670 char openpty (void);
24671 int
24672 main (void)
24673 {
24674 openpty ();
24675 ;
24676 return 0;
24677 }
24678 _ACEOF
24679 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24680 if { (eval echo "$as_me:24680: \"$ac_link\"") >&5
24681 (eval $ac_link) 2>&5
24682 ac_status=$?
24683 echo "$as_me:24683: \$? = $ac_status" >&5
24684 (exit "$ac_status"); } &&
24685 { ac_try='test -s "conftest$ac_exeext"'
24686 { (eval echo "$as_me:24686: \"$ac_try\"") >&5
24687 (eval $ac_try) 2>&5
24688 ac_status=$?
24689 echo "$as_me:24689: \$? = $ac_status" >&5
24690 (exit "$ac_status"); }; }; then
24691 ac_cv_lib_util_openpty=yes
24692 else
24693 echo "$as_me: failed program was:" >&5
24694 cat "conftest.$ac_ext" >&5
24695 ac_cv_lib_util_openpty=no
24696 fi
24697 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24698 LIBS=$ac_check_lib_save_LIBS
24699 fi
24700 echo "$as_me:24700: result: $ac_cv_lib_util_openpty" >&5
24701 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24702 if test "$ac_cv_lib_util_openpty" = yes; then
24703 cf_cv_lib_util=yes
24704 else
24705 cf_cv_lib_util=no
24706 fi
24707
24708 echo "$as_me:24708: checking for openpty header" >&5
24709 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24710 if test "${cf_cv_func_openpty+set}" = set; then
24711 echo $ECHO_N "(cached) $ECHO_C" >&6
24712 else
24713
24714 cf_save_LIBS="$LIBS"
24715 test "$cf_cv_lib_util" = yes && {
24716 cf_add_libs="$LIBS"
24717 # reverse order
24718 cf_add_0lib=
24719 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24720 # filter duplicates
24721 for cf_add_1lib in $cf_add_0lib; do
24722 for cf_add_2lib in $cf_add_libs; do
24723 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24724 cf_add_1lib=
24725 break
24726 fi
24727 done
24728 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24729 done
24730 LIBS="$cf_add_libs"
24731 }
24732 for cf_header in pty.h libutil.h util.h
24733 do
24734 cat >"conftest.$ac_ext" <<_ACEOF
24735 #line 24735 "configure"
24736 #include "confdefs.h"
24737
24738 #include <$cf_header>
24739
24740 int
24741 main (void)
24742 {
24743
24744 int x = openpty((int *)0, (int *)0, (char *)0,
24745 (struct termios *)0, (struct winsize *)0);
24746 (void)x;
24747
24748 ;
24749 return 0;
24750 }
24751 _ACEOF
24752 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24753 if { (eval echo "$as_me:24753: \"$ac_link\"") >&5
24754 (eval $ac_link) 2>&5
24755 ac_status=$?
24756 echo "$as_me:24756: \$? = $ac_status" >&5
24757 (exit "$ac_status"); } &&
24758 { ac_try='test -s "conftest$ac_exeext"'
24759 { (eval echo "$as_me:24759: \"$ac_try\"") >&5
24760 (eval $ac_try) 2>&5
24761 ac_status=$?
24762 echo "$as_me:24762: \$? = $ac_status" >&5
24763 (exit "$ac_status"); }; }; then
24764
24765 cf_cv_func_openpty=$cf_header
24766 break
24767
24768 else
24769 echo "$as_me: failed program was:" >&5
24770 cat "conftest.$ac_ext" >&5
24771
24772 cf_cv_func_openpty=no
24773
24774 fi
24775 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24776 done
24777 LIBS="$cf_save_LIBS"
24778
24779 fi
24780 echo "$as_me:24780: result: $cf_cv_func_openpty" >&5
24781 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24782
24783 if test "$cf_cv_func_openpty" != no ; then
24784
24785 cat >>confdefs.h <<EOF
24786 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24787 EOF
24788
24789 cat >>confdefs.h <<\EOF
24790 #define USE_XTERM_PTY 1
24791 EOF
24792
24793 if test "x$cf_cv_lib_util" = xyes ; then
24794
24795 cf_add_libs="$TEST_LIBS"
24796 # reverse order
24797 cf_add_0lib=
24798 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24799 # filter duplicates
24800 for cf_add_1lib in $cf_add_0lib; do
24801 for cf_add_2lib in $cf_add_libs; do
24802 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24803 cf_add_1lib=
24804 break
24805 fi
24806 done
24807 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24808 done
24809 TEST_LIBS="$cf_add_libs"
24810
24811 fi
24812 fi
24813
24814 if test "$with_hashed_db" != no ; then
24815
24816 cat >>confdefs.h <<\EOF
24817 #define USE_HASHED_DB 1
24818 EOF
24819
24820 case $with_hashed_db in
24821 (yes|*able*)
24822 ;;
24823 (*)
24824 if test -d "$with_hashed_db" ; then
24825
24826 if test -n "$with_hashed_db/include" ; then
24827 for cf_add_incdir in $with_hashed_db/include
24828 do
24829 while test "$cf_add_incdir" != /usr/include
24830 do
24831 if test -d "$cf_add_incdir"
24832 then
24833 cf_have_incdir=no
24834 if test -n "$CFLAGS$CPPFLAGS" ; then
24835 # a loop is needed to ensure we can add subdirs of existing dirs
24836 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24837 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24838 cf_have_incdir=yes; break
24839 fi
24840 done
24841 fi
24842
24843 if test "$cf_have_incdir" = no ; then
24844 if test "$cf_add_incdir" = /usr/local/include ; then
24845 if test "$GCC" = yes
24846 then
24847 cf_save_CPPFLAGS=$CPPFLAGS
24848
24849 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24850 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24851
24852 cat >"conftest.$ac_ext" <<_ACEOF
24853 #line 24853 "configure"
24854 #include "confdefs.h"
24855 #include <stdio.h>
24856 int
24857 main (void)
24858 {
24859 printf("Hello")
24860 ;
24861 return 0;
24862 }
24863 _ACEOF
24864 rm -f "conftest.$ac_objext"
24865 if { (eval echo "$as_me:24865: \"$ac_compile\"") >&5
24866 (eval $ac_compile) 2>&5
24867 ac_status=$?
24868 echo "$as_me:24868: \$? = $ac_status" >&5
24869 (exit "$ac_status"); } &&
24870 { ac_try='test -s "conftest.$ac_objext"'
24871 { (eval echo "$as_me:24871: \"$ac_try\"") >&5
24872 (eval $ac_try) 2>&5
24873 ac_status=$?
24874 echo "$as_me:24874: \$? = $ac_status" >&5
24875 (exit "$ac_status"); }; }; then
24876 :
24877 else
24878 echo "$as_me: failed program was:" >&5
24879 cat "conftest.$ac_ext" >&5
24880 cf_have_incdir=yes
24881 fi
24882 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24883 CPPFLAGS=$cf_save_CPPFLAGS
24884 fi
24885 fi
24886 fi
24887
24888 if test "$cf_have_incdir" = no ; then
24889 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
24890
24891 echo "${as_me:-configure}:24891: testing adding $cf_add_incdir to include-path ..." 1>&5
24892
24893 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24894
24895 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24896 test "$cf_top_incdir" = "$cf_add_incdir" && break
24897 cf_add_incdir="$cf_top_incdir"
24898 else
24899 break
24900 fi
24901 else
24902 break
24903 fi
24904 done
24905 done
24906 fi
24907
24908 if test -n "$with_hashed_db/lib" ; then
24909 for cf_add_libdir in $with_hashed_db/lib
24910 do
24911 if test "$cf_add_libdir" = /usr/lib ; then
24912 :
24913 elif test -d "$cf_add_libdir"
24914 then
24915 cf_have_libdir=no
24916 if test -n "$LDFLAGS$LIBS" ; then
24917 # a loop is needed to ensure we can add subdirs of existing dirs
24918 for cf_test_libdir in $LDFLAGS $LIBS ; do
24919 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24920 cf_have_libdir=yes; break
24921 fi
24922 done
24923 fi
24924 if test "$cf_have_libdir" = no ; then
24925 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
24926
24927 echo "${as_me:-configure}:24927: testing adding $cf_add_libdir to library-path ..." 1>&5
24928
24929 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24930 fi
24931 fi
24932 done
24933 fi
24934
24935 else
24936 case "$with_hashed_db" in
24937 (./*|../*|/*)
24938 { echo "$as_me:24938: WARNING: no such directory $with_hashed_db" >&5
24939 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24940 ;;
24941 (*)
24942
24943 cf_search=
24944
24945 test "x$prefix" != "xNONE" && \
24946 test -d "$prefix" && \
24947 {
24948 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
24949 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
24950 test -d "$prefix/include/$with_hashed_db" && cf_search="$cf_search $prefix/include/$with_hashed_db"
24951 test -d "$prefix/include/$with_hashed_db/include" && cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24952 test -d "$prefix/$with_hashed_db/include" && cf_search="$cf_search $prefix/$with_hashed_db/include"
24953 test -d "$prefix/$with_hashed_db/include/$with_hashed_db" && cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24954 }
24955
24956 for cf_subdir_prefix in \
24957 /usr \
24958 /usr/local \
24959 /usr/pkg \
24960 /opt \
24961 /opt/local \
24962 $HOME
24963 do
24964
24965 test "x$cf_subdir_prefix" != "x$prefix" && \
24966 test -d "$cf_subdir_prefix" && \
24967 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24968 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
24969 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
24970 test -d "$cf_subdir_prefix/include/$with_hashed_db" && cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24971 test -d "$cf_subdir_prefix/include/$with_hashed_db/include" && cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24972 test -d "$cf_subdir_prefix/$with_hashed_db/include" && cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24973 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"
24974 }
24975
24976 done
24977
24978 for cf_item in $cf_search
24979 do
24980 case "$cf_item" in
24981 (*/$with_hashed_db)
24982
24983 if test -n "$cf_item" ; then
24984 for cf_add_incdir in $cf_item
24985 do
24986 while test "$cf_add_incdir" != /usr/include
24987 do
24988 if test -d "$cf_add_incdir"
24989 then
24990 cf_have_incdir=no
24991 if test -n "$CFLAGS$CPPFLAGS" ; then
24992 # a loop is needed to ensure we can add subdirs of existing dirs
24993 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24994 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24995 cf_have_incdir=yes; break
24996 fi
24997 done
24998 fi
24999
25000 if test "$cf_have_incdir" = no ; then
25001 if test "$cf_add_incdir" = /usr/local/include ; then
25002 if test "$GCC" = yes
25003 then
25004 cf_save_CPPFLAGS=$CPPFLAGS
25005
25006 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25007 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
25008
25009 cat >"conftest.$ac_ext" <<_ACEOF
25010 #line 25010 "configure"
25011 #include "confdefs.h"
25012 #include <stdio.h>
25013 int
25014 main (void)
25015 {
25016 printf("Hello")
25017 ;
25018 return 0;
25019 }
25020 _ACEOF
25021 rm -f "conftest.$ac_objext"
25022 if { (eval echo "$as_me:25022: \"$ac_compile\"") >&5
25023 (eval $ac_compile) 2>&5
25024 ac_status=$?
25025 echo "$as_me:25025: \$? = $ac_status" >&5
25026 (exit "$ac_status"); } &&
25027 { ac_try='test -s "conftest.$ac_objext"'
25028 { (eval echo "$as_me:25028: \"$ac_try\"") >&5
25029 (eval $ac_try) 2>&5
25030 ac_status=$?
25031 echo "$as_me:25031: \$? = $ac_status" >&5
25032 (exit "$ac_status"); }; }; then
25033 :
25034 else
25035 echo "$as_me: failed program was:" >&5
25036 cat "conftest.$ac_ext" >&5
25037 cf_have_incdir=yes
25038 fi
25039 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25040 CPPFLAGS=$cf_save_CPPFLAGS
25041 fi
25042 fi
25043 fi
25044
25045 if test "$cf_have_incdir" = no ; then
25046 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
25047
25048 echo "${as_me:-configure}:25048: testing adding $cf_add_incdir to include-path ..." 1>&5
25049
25050 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
25051
25052 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
25053 test "$cf_top_incdir" = "$cf_add_incdir" && break
25054 cf_add_incdir="$cf_top_incdir"
25055 else
25056 break
25057 fi
25058 else
25059 break
25060 fi
25061 done
25062 done
25063 fi
25064
25065 ;;
25066 esac
25067 done
25068
25069 cf_search=
25070
25071 test "x$prefix" != "xNONE" && \
25072 test -d "$prefix" && \
25073 {
25074 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
25075 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
25076 test -d "$prefix/lib/$with_hashed_db" && cf_search="$cf_search $prefix/lib/$with_hashed_db"
25077 test -d "$prefix/lib/$with_hashed_db/lib" && cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
25078 test -d "$prefix/$with_hashed_db/lib" && cf_search="$cf_search $prefix/$with_hashed_db/lib"
25079 test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" && cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
25080 }
25081
25082 for cf_subdir_prefix in \
25083 /usr \
25084 /usr/local \
25085 /usr/pkg \
25086 /opt \
25087 /opt/local \
25088 $HOME
25089 do
25090
25091 test "x$cf_subdir_prefix" != "x$prefix" && \
25092 test -d "$cf_subdir_prefix" && \
25093 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
25094 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
25095 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
25096 test -d "$cf_subdir_prefix/lib/$with_hashed_db" && cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
25097 test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
25098 test -d "$cf_subdir_prefix/$with_hashed_db/lib" && cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
25099 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"
25100 }
25101
25102 done
25103
25104 for cf_item in $cf_search
25105 do
25106 case "$cf_item" in
25107 (*/$with_hashed_db)
25108
25109 if test -n "$cf_item" ; then
25110 for cf_add_libdir in $cf_item
25111 do
25112 if test "$cf_add_libdir" = /usr/lib ; then
25113 :
25114 elif test -d "$cf_add_libdir"
25115 then
25116 cf_have_libdir=no
25117 if test -n "$LDFLAGS$LIBS" ; then
25118 # a loop is needed to ensure we can add subdirs of existing dirs
25119 for cf_test_libdir in $LDFLAGS $LIBS ; do
25120 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
25121 cf_have_libdir=yes; break
25122 fi
25123 done
25124 fi
25125 if test "$cf_have_libdir" = no ; then
25126 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
25127
25128 echo "${as_me:-configure}:25128: testing adding $cf_add_libdir to library-path ..." 1>&5
25129
25130 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
25131 fi
25132 fi
25133 done
25134 fi
25135
25136 ;;
25137 esac
25138 done
25139
25140 ;;
25141 esac
25142 fi
25143 esac
25144
25145 echo "$as_me:25145: checking for db.h" >&5
25146 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
25147 if test "${ac_cv_header_db_h+set}" = set; then
25148 echo $ECHO_N "(cached) $ECHO_C" >&6
25149 else
25150 cat >"conftest.$ac_ext" <<_ACEOF
25151 #line 25151 "configure"
25152 #include "confdefs.h"
25153 #include <db.h>
25154 _ACEOF
25155 if { (eval echo "$as_me:25155: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25156 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25157 ac_status=$?
25158 $EGREP -v '^ *\+' conftest.er1 >conftest.err
25159 rm -f conftest.er1
25160 cat conftest.err >&5
25161 echo "$as_me:25161: \$? = $ac_status" >&5
25162 (exit "$ac_status"); } >/dev/null; then
25163 if test -s conftest.err; then
25164 ac_cpp_err=$ac_c_preproc_warn_flag
25165 else
25166 ac_cpp_err=
25167 fi
25168 else
25169 ac_cpp_err=yes
25170 fi
25171 if test -z "$ac_cpp_err"; then
25172 ac_cv_header_db_h=yes
25173 else
25174 echo "$as_me: failed program was:" >&5
25175 cat "conftest.$ac_ext" >&5
25176 ac_cv_header_db_h=no
25177 fi
25178 rm -f conftest.err "conftest.$ac_ext"
25179 fi
25180 echo "$as_me:25180: result: $ac_cv_header_db_h" >&5
25181 echo "${ECHO_T}$ac_cv_header_db_h" >&6
25182 if test "$ac_cv_header_db_h" = yes; then
25183
25184 echo "$as_me:25184: checking for version of db" >&5
25185 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
25186 if test "${cf_cv_hashed_db_version+set}" = set; then
25187 echo $ECHO_N "(cached) $ECHO_C" >&6
25188 else
25189
25190 cf_cv_hashed_db_version=unknown
25191
25192 for cf_db_version in 1 2 3 4 5 6
25193 do
25194
25195 echo "${as_me:-configure}:25195: testing checking for db version $cf_db_version ..." 1>&5
25196
25197 cat >"conftest.$ac_ext" <<_ACEOF
25198 #line 25198 "configure"
25199 #include "confdefs.h"
25200
25201 $ac_includes_default
25202 #include <db.h>
25203
25204 #ifdef DB_VERSION_MAJOR
25205 /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
25206 #if $cf_db_version == DB_VERSION_MAJOR
25207 /* ok */
25208 #else
25209 #error $cf_db_version is not DB_VERSION_MAJOR
25210 #endif
25211 #else
25212 #if $cf_db_version == 1
25213 /* ok: assuming this is DB 1.8.5 */
25214 #else
25215 #error $cf_db_version is not 1
25216 #endif
25217 #endif
25218
25219 int
25220 main (void)
25221 {
25222 DBT *foo = 0
25223 ;
25224 return 0;
25225 }
25226 _ACEOF
25227 rm -f "conftest.$ac_objext"
25228 if { (eval echo "$as_me:25228: \"$ac_compile\"") >&5
25229 (eval $ac_compile) 2>&5
25230 ac_status=$?
25231 echo "$as_me:25231: \$? = $ac_status" >&5
25232 (exit "$ac_status"); } &&
25233 { ac_try='test -s "conftest.$ac_objext"'
25234 { (eval echo "$as_me:25234: \"$ac_try\"") >&5
25235 (eval $ac_try) 2>&5
25236 ac_status=$?
25237 echo "$as_me:25237: \$? = $ac_status" >&5
25238 (exit "$ac_status"); }; }; then
25239
25240 cf_cv_hashed_db_version=$cf_db_version
25241 break
25242
25243 else
25244 echo "$as_me: failed program was:" >&5
25245 cat "conftest.$ac_ext" >&5
25246 fi
25247 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25248 done
25249
25250 fi
25251 echo "$as_me:25251: result: $cf_cv_hashed_db_version" >&5
25252 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
25253
25254 if test "$cf_cv_hashed_db_version" = unknown ; then
25255 { { echo "$as_me:25255: error: Cannot determine version of db" >&5
25256 echo "$as_me: error: Cannot determine version of db" >&2;}
25257 { (exit 1); exit 1; }; }
25258 else
25259
25260 echo "$as_me:25260: checking for db libraries" >&5
25261 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
25262 if test "${cf_cv_hashed_db_libs+set}" = set; then
25263 echo $ECHO_N "(cached) $ECHO_C" >&6
25264 else
25265
25266 cf_cv_hashed_db_libs=unknown
25267 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
25268 do
25269 cf_save_libs="$LIBS"
25270 if test -n "$cf_db_libs"; then
25271
25272 cf_add_libs="$LIBS"
25273 # reverse order
25274 cf_add_0lib=
25275 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25276 # filter duplicates
25277 for cf_add_1lib in $cf_add_0lib; do
25278 for cf_add_2lib in $cf_add_libs; do
25279 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25280 cf_add_1lib=
25281 break
25282 fi
25283 done
25284 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25285 done
25286 LIBS="$cf_add_libs"
25287
25288 fi
25289
25290 echo "${as_me:-configure}:25290: testing checking for library $cf_db_libs ..." 1>&5
25291
25292 cat >"conftest.$ac_ext" <<_ACEOF
25293 #line 25293 "configure"
25294 #include "confdefs.h"
25295
25296 $ac_includes_default
25297 #include <db.h>
25298
25299 int
25300 main (void)
25301 {
25302
25303 char *path = "/tmp/foo";
25304 #ifdef DB_VERSION_MAJOR
25305 #if DB_VERSION_MAJOR >= 4
25306 DB *result = NULL;
25307 db_create(&result, NULL, 0);
25308 result->open(result,
25309 NULL,
25310 path,
25311 path,
25312 DB_HASH,
25313 DB_CREATE,
25314 0644);
25315 #elif DB_VERSION_MAJOR >= 3
25316 DB *result = NULL;
25317 db_create(&result, NULL, 0);
25318 result->open(result,
25319 path,
25320 path,
25321 DB_HASH,
25322 DB_CREATE,
25323 0644);
25324 #elif DB_VERSION_MAJOR >= 2
25325 DB *result = NULL;
25326 db_open(path,
25327 DB_HASH,
25328 DB_CREATE,
25329 0644,
25330 (DB_ENV *) 0,
25331 (DB_INFO *) 0,
25332 &result);
25333 #endif /* DB_VERSION_MAJOR */
25334 #else
25335 DB *result = dbopen(path,
25336 2,
25337 0644,
25338 DB_HASH,
25339 0);
25340 #endif
25341 ${cf_cv_main_return:-return}(result != NULL)
25342
25343 ;
25344 return 0;
25345 }
25346 _ACEOF
25347 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25348 if { (eval echo "$as_me:25348: \"$ac_link\"") >&5
25349 (eval $ac_link) 2>&5
25350 ac_status=$?
25351 echo "$as_me:25351: \$? = $ac_status" >&5
25352 (exit "$ac_status"); } &&
25353 { ac_try='test -s "conftest$ac_exeext"'
25354 { (eval echo "$as_me:25354: \"$ac_try\"") >&5
25355 (eval $ac_try) 2>&5
25356 ac_status=$?
25357 echo "$as_me:25357: \$? = $ac_status" >&5
25358 (exit "$ac_status"); }; }; then
25359
25360 if test -n "$cf_db_libs" ; then
25361 cf_cv_hashed_db_libs=$cf_db_libs
25362 else
25363 cf_cv_hashed_db_libs=default
25364 fi
25365 LIBS="$cf_save_libs"
25366 break
25367
25368 else
25369 echo "$as_me: failed program was:" >&5
25370 cat "conftest.$ac_ext" >&5
25371 fi
25372 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25373 LIBS="$cf_save_libs"
25374 done
25375
25376 fi
25377 echo "$as_me:25377: result: $cf_cv_hashed_db_libs" >&5
25378 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
25379
25380 if test "$cf_cv_hashed_db_libs" = unknown ; then
25381 { { echo "$as_me:25381: error: Cannot determine library for db" >&5
25382 echo "$as_me: error: Cannot determine library for db" >&2;}
25383 { (exit 1); exit 1; }; }
25384 elif test "$cf_cv_hashed_db_libs" != default ; then
25385
25386 cf_add_libs="$LIBS"
25387 # reverse order
25388 cf_add_0lib=
25389 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25390 # filter duplicates
25391 for cf_add_1lib in $cf_add_0lib; do
25392 for cf_add_2lib in $cf_add_libs; do
25393 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25394 cf_add_1lib=
25395 break
25396 fi
25397 done
25398 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25399 done
25400 LIBS="$cf_add_libs"
25401
25402 fi
25403 fi
25404
25405 else
25406
25407 { { echo "$as_me:25407: error: Cannot find db.h" >&5
25408 echo "$as_me: error: Cannot find db.h" >&2;}
25409 { (exit 1); exit 1; }; }
25410
25411 fi
25412
25413 fi
25414
25415 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
25416 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25417 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25418 fi
25419
25420 # Just in case, check if the C compiler has a bool type.
25421
25422 echo "$as_me:25422: checking if we can include stdbool.h" >&5
25423 echo $ECHO_N "checking if we can include stdbool.h... $ECHO_C" >&6
25424 if test "${cf_cv_header_stdbool_h+set}" = set; then
25425 echo $ECHO_N "(cached) $ECHO_C" >&6
25426 else
25427
25428 cat >"conftest.$ac_ext" <<_ACEOF
25429 #line 25429 "configure"
25430 #include "confdefs.h"
25431
25432 $ac_includes_default
25433 #include <stdbool.h>
25434
25435 int
25436 main (void)
25437 {
25438 bool foo = false; (void)foo
25439 ;
25440 return 0;
25441 }
25442 _ACEOF
25443 rm -f "conftest.$ac_objext"
25444 if { (eval echo "$as_me:25444: \"$ac_compile\"") >&5
25445 (eval $ac_compile) 2>&5
25446 ac_status=$?
25447 echo "$as_me:25447: \$? = $ac_status" >&5
25448 (exit "$ac_status"); } &&
25449 { ac_try='test -s "conftest.$ac_objext"'
25450 { (eval echo "$as_me:25450: \"$ac_try\"") >&5
25451 (eval $ac_try) 2>&5
25452 ac_status=$?
25453 echo "$as_me:25453: \$? = $ac_status" >&5
25454 (exit "$ac_status"); }; }; then
25455 cf_cv_header_stdbool_h=yes
25456 else
25457 echo "$as_me: failed program was:" >&5
25458 cat "conftest.$ac_ext" >&5
25459 cat >"conftest.$ac_ext" <<_ACEOF
25460 #line 25460 "configure"
25461 #include "confdefs.h"
25462
25463 int
25464 main (void)
25465 {
25466 bool foo = false; (void)foo
25467 ;
25468 return 0;
25469 }
25470 _ACEOF
25471 rm -f "conftest.$ac_objext"
25472 if { (eval echo "$as_me:25472: \"$ac_compile\"") >&5
25473 (eval $ac_compile) 2>&5
25474 ac_status=$?
25475 echo "$as_me:25475: \$? = $ac_status" >&5
25476 (exit "$ac_status"); } &&
25477 { ac_try='test -s "conftest.$ac_objext"'
25478 { (eval echo "$as_me:25478: \"$ac_try\"") >&5
25479 (eval $ac_try) 2>&5
25480 ac_status=$?
25481 echo "$as_me:25481: \$? = $ac_status" >&5
25482 (exit "$ac_status"); }; }; then
25483 cf_cv_header_stdbool_h=no
25484 else
25485 echo "$as_me: failed program was:" >&5
25486 cat "conftest.$ac_ext" >&5
25487 fi
25488 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25489 fi
25490 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25491 fi
25492 echo "$as_me:25492: result: $cf_cv_header_stdbool_h" >&5
25493 echo "${ECHO_T}$cf_cv_header_stdbool_h" >&6
25494
25495 if test "$cf_cv_header_stdbool_h" = yes
25496 then USE_STDBOOL_H=1
25497 else USE_STDBOOL_H=0
25498 fi
25499
25500 echo "$as_me:25500: checking for builtin bool type" >&5
25501 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25502 if test "${cf_cv_cc_bool_type+set}" = set; then
25503 echo $ECHO_N "(cached) $ECHO_C" >&6
25504 else
25505
25506 cat >"conftest.$ac_ext" <<_ACEOF
25507 #line 25507 "configure"
25508 #include "confdefs.h"
25509
25510 $ac_includes_default
25511
25512 int
25513 main (void)
25514 {
25515 bool x = false; (void)x
25516 ;
25517 return 0;
25518 }
25519 _ACEOF
25520 rm -f "conftest.$ac_objext"
25521 if { (eval echo "$as_me:25521: \"$ac_compile\"") >&5
25522 (eval $ac_compile) 2>&5
25523 ac_status=$?
25524 echo "$as_me:25524: \$? = $ac_status" >&5
25525 (exit "$ac_status"); } &&
25526 { ac_try='test -s "conftest.$ac_objext"'
25527 { (eval echo "$as_me:25527: \"$ac_try\"") >&5
25528 (eval $ac_try) 2>&5
25529 ac_status=$?
25530 echo "$as_me:25530: \$? = $ac_status" >&5
25531 (exit "$ac_status"); }; }; then
25532 cf_cv_cc_bool_type=yes
25533 else
25534 echo "$as_me: failed program was:" >&5
25535 cat "conftest.$ac_ext" >&5
25536 cf_cv_cc_bool_type=no
25537 fi
25538 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25539 fi
25540 echo "$as_me:25540: result: $cf_cv_cc_bool_type" >&5
25541 echo "${ECHO_T}$cf_cv_cc_bool_type" >&6
25542
25543 if test "$cf_cv_cc_bool_type" = yes; then
25544 USE_BUILTIN_BOOL=1
25545 else
25546 USE_BUILTIN_BOOL=0
25547 fi
25548
25549 test "$cf_cv_header_stdbool_h" = yes &&
25550 cat >>confdefs.h <<\EOF
25551 #define USE_STDBOOL_H 1
25552 EOF
25553
25554 # Check for C++ compiler characteristics (and ensure that it's there!)
25555 if test -n "$CXX" ; then
25556 ac_ext=cc
25557 ac_cpp='$CXXCPP $CPPFLAGS'
25558 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25559 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25560 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25561 ac_main_return="return"
25562
25563 if test -n "$GXX" ; then
25564
25565 cf_save="$LIBS"
25566 LIBS="$LIBS $CXXLIBS"
25567 echo "$as_me:25567: checking if we already have C++ library" >&5
25568 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25569 cat >"conftest.$ac_ext" <<_ACEOF
25570 #line 25570 "configure"
25571 #include "confdefs.h"
25572
25573 #include <iostream>
25574 int
25575 main (void)
25576 {
25577
25578 std::cout << "Hello World!" << std::endl;
25579 ;
25580 return 0;
25581 }
25582 _ACEOF
25583 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25584 if { (eval echo "$as_me:25584: \"$ac_link\"") >&5
25585 (eval $ac_link) 2>&5
25586 ac_status=$?
25587 echo "$as_me:25587: \$? = $ac_status" >&5
25588 (exit "$ac_status"); } &&
25589 { ac_try='test -s "conftest$ac_exeext"'
25590 { (eval echo "$as_me:25590: \"$ac_try\"") >&5
25591 (eval $ac_try) 2>&5
25592 ac_status=$?
25593 echo "$as_me:25593: \$? = $ac_status" >&5
25594 (exit "$ac_status"); }; }; then
25595 cf_have_libstdcpp=yes
25596 else
25597 echo "$as_me: failed program was:" >&5
25598 cat "conftest.$ac_ext" >&5
25599 cf_have_libstdcpp=no
25600 fi
25601 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25602 echo "$as_me:25602: result: $cf_have_libstdcpp" >&5
25603 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25604 LIBS="$cf_save"
25605
25606 if test "$cf_have_libstdcpp" != yes
25607 then
25608 case "$cf_cv_system_name" in
25609 (os2*)
25610 if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25611 cf_stdcpp_libname=stdcpp
25612 else
25613 cf_stdcpp_libname=stdc++
25614 fi
25615 ;;
25616 (*)
25617 cf_stdcpp_libname=stdc++
25618 ;;
25619 esac
25620
25621 echo "$as_me:25621: checking for library $cf_stdcpp_libname" >&5
25622 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25623 if test "${cf_cv_libstdcpp+set}" = set; then
25624 echo $ECHO_N "(cached) $ECHO_C" >&6
25625 else
25626
25627 cf_save="$LIBS"
25628 LIBS="$LIBS $CXXLIBS"
25629
25630 cf_add_libs="$LIBS"
25631 # reverse order
25632 cf_add_0lib=
25633 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25634 # filter duplicates
25635 for cf_add_1lib in $cf_add_0lib; do
25636 for cf_add_2lib in $cf_add_libs; do
25637 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25638 cf_add_1lib=
25639 break
25640 fi
25641 done
25642 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25643 done
25644 LIBS="$cf_add_libs"
25645
25646 cat >"conftest.$ac_ext" <<_ACEOF
25647 #line 25647 "configure"
25648 #include "confdefs.h"
25649
25650 #include <iostream>
25651 int
25652 main (void)
25653 {
25654
25655 std::cout << "Hello World!" << std::endl;
25656 ;
25657 return 0;
25658 }
25659 _ACEOF
25660 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25661 if { (eval echo "$as_me:25661: \"$ac_link\"") >&5
25662 (eval $ac_link) 2>&5
25663 ac_status=$?
25664 echo "$as_me:25664: \$? = $ac_status" >&5
25665 (exit "$ac_status"); } &&
25666 { ac_try='test -s "conftest$ac_exeext"'
25667 { (eval echo "$as_me:25667: \"$ac_try\"") >&5
25668 (eval $ac_try) 2>&5
25669 ac_status=$?
25670 echo "$as_me:25670: \$? = $ac_status" >&5
25671 (exit "$ac_status"); }; }; then
25672 cf_cv_libstdcpp=yes
25673 else
25674 echo "$as_me: failed program was:" >&5
25675 cat "conftest.$ac_ext" >&5
25676 cf_cv_libstdcpp=no
25677 fi
25678 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25679 LIBS="$cf_save"
25680
25681 fi
25682 echo "$as_me:25682: result: $cf_cv_libstdcpp" >&5
25683 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25684 test "$cf_cv_libstdcpp" = yes && {
25685 cf_add_libs="$CXXLIBS"
25686 # reverse order
25687 cf_add_0lib=
25688 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25689 # filter duplicates
25690 for cf_add_1lib in $cf_add_0lib; do
25691 for cf_add_2lib in $cf_add_libs; do
25692 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25693 cf_add_1lib=
25694 break
25695 fi
25696 done
25697 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25698 done
25699 CXXLIBS="$cf_add_libs"
25700 }
25701 fi
25702 fi
25703
25704 echo "$as_me:25704: checking whether $CXX understands -c and -o together" >&5
25705 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25706 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25707 echo $ECHO_N "(cached) $ECHO_C" >&6
25708 else
25709
25710 cat > conftest.$ac_ext <<CF_EOF
25711 int main(void)
25712 {
25713 ${cf_cv_main_return:-return}(0);
25714 }
25715 CF_EOF
25716 # We do the test twice because some compilers refuse to overwrite an
25717 # existing .o file with -o, though they will create one.
25718 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25719 if { (eval echo "$as_me:25719: \"$ac_try\"") >&5
25720 (eval $ac_try) 2>&5
25721 ac_status=$?
25722 echo "$as_me:25722: \$? = $ac_status" >&5
25723 (exit "$ac_status"); } &&
25724 test -f conftest2.$ac_objext && { (eval echo "$as_me:25724: \"$ac_try\"") >&5
25725 (eval $ac_try) 2>&5
25726 ac_status=$?
25727 echo "$as_me:25727: \$? = $ac_status" >&5
25728 (exit "$ac_status"); };
25729 then
25730 eval cf_cv_prog_CXX_c_o=yes
25731 else
25732 eval cf_cv_prog_CXX_c_o=no
25733 fi
25734 rm -rf ./conftest*
25735
25736 fi
25737 if test "$cf_cv_prog_CXX_c_o" = yes; then
25738 echo "$as_me:25738: result: yes" >&5
25739 echo "${ECHO_T}yes" >&6
25740 else
25741 echo "$as_me:25741: result: no" >&5
25742 echo "${ECHO_T}no" >&6
25743 fi
25744
25745 case "$GXX_VERSION" in
25746 (1.*|2.[0-6]*|[1-9][0-9].*)
25747 cf_cxx_library=yes
25748 ;;
25749 (*-2.7*|2.7*)
25750
25751 cf_cxx_library=unknown
25752 case "$cf_cv_system_name" in
25753 (os2*)
25754 cf_gpp_libname=gpp
25755 ;;
25756 (*)
25757 cf_gpp_libname=g++
25758 ;;
25759 esac
25760 if test "$GXX" = yes; then
25761 echo "$as_me:25761: checking for lib$cf_gpp_libname" >&5
25762 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25763 cf_save="$LIBS"
25764
25765 cf_add_libs="$LIBS"
25766 # reverse order
25767 cf_add_0lib=
25768 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25769 # filter duplicates
25770 for cf_add_1lib in $cf_add_0lib; do
25771 for cf_add_2lib in $cf_add_libs; do
25772 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25773 cf_add_1lib=
25774 break
25775 fi
25776 done
25777 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25778 done
25779 LIBS="$cf_add_libs"
25780
25781 cat >"conftest.$ac_ext" <<_ACEOF
25782 #line 25782 "configure"
25783 #include "confdefs.h"
25784
25785 #include <$cf_gpp_libname/builtin.h>
25786
25787 int
25788 main (void)
25789 {
25790 two_arg_error_handler_t foo2 = lib_error_handler
25791 ;
25792 return 0;
25793 }
25794 _ACEOF
25795 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25796 if { (eval echo "$as_me:25796: \"$ac_link\"") >&5
25797 (eval $ac_link) 2>&5
25798 ac_status=$?
25799 echo "$as_me:25799: \$? = $ac_status" >&5
25800 (exit "$ac_status"); } &&
25801 { ac_try='test -s "conftest$ac_exeext"'
25802 { (eval echo "$as_me:25802: \"$ac_try\"") >&5
25803 (eval $ac_try) 2>&5
25804 ac_status=$?
25805 echo "$as_me:25805: \$? = $ac_status" >&5
25806 (exit "$ac_status"); }; }; then
25807 cf_cxx_library=yes
25808
25809 cf_add_libs="$CXXLIBS"
25810 # reverse order
25811 cf_add_0lib=
25812 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25813 # filter duplicates
25814 for cf_add_1lib in $cf_add_0lib; do
25815 for cf_add_2lib in $cf_add_libs; do
25816 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25817 cf_add_1lib=
25818 break
25819 fi
25820 done
25821 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25822 done
25823 CXXLIBS="$cf_add_libs"
25824
25825 if test "$cf_gpp_libname" = cpp ; then
25826
25827 cat >>confdefs.h <<\EOF
25828 #define HAVE_GPP_BUILTIN_H 1
25829 EOF
25830
25831 else
25832
25833 cat >>confdefs.h <<\EOF
25834 #define HAVE_GXX_BUILTIN_H 1
25835 EOF
25836
25837 fi
25838 else
25839 echo "$as_me: failed program was:" >&5
25840 cat "conftest.$ac_ext" >&5
25841 cat >"conftest.$ac_ext" <<_ACEOF
25842 #line 25842 "configure"
25843 #include "confdefs.h"
25844
25845 #include <builtin.h>
25846
25847 int
25848 main (void)
25849 {
25850 two_arg_error_handler_t foo2 = lib_error_handler
25851 ;
25852 return 0;
25853 }
25854 _ACEOF
25855 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25856 if { (eval echo "$as_me:25856: \"$ac_link\"") >&5
25857 (eval $ac_link) 2>&5
25858 ac_status=$?
25859 echo "$as_me:25859: \$? = $ac_status" >&5
25860 (exit "$ac_status"); } &&
25861 { ac_try='test -s "conftest$ac_exeext"'
25862 { (eval echo "$as_me:25862: \"$ac_try\"") >&5
25863 (eval $ac_try) 2>&5
25864 ac_status=$?
25865 echo "$as_me:25865: \$? = $ac_status" >&5
25866 (exit "$ac_status"); }; }; then
25867 cf_cxx_library=yes
25868
25869 cf_add_libs="$CXXLIBS"
25870 # reverse order
25871 cf_add_0lib=
25872 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25873 # filter duplicates
25874 for cf_add_1lib in $cf_add_0lib; do
25875 for cf_add_2lib in $cf_add_libs; do
25876 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25877 cf_add_1lib=
25878 break
25879 fi
25880 done
25881 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25882 done
25883 CXXLIBS="$cf_add_libs"
25884
25885 cat >>confdefs.h <<\EOF
25886 #define HAVE_BUILTIN_H 1
25887 EOF
25888
25889 else
25890 echo "$as_me: failed program was:" >&5
25891 cat "conftest.$ac_ext" >&5
25892 cf_cxx_library=no
25893 fi
25894 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25895 fi
25896 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25897 LIBS="$cf_save"
25898 echo "$as_me:25898: result: $cf_cxx_library" >&5
25899 echo "${ECHO_T}$cf_cxx_library" >&6
25900 fi
25901
25902 ;;
25903 (*)
25904 cf_cxx_library=no
25905 ;;
25906 esac
25907
25908 ac_ext=cc
25909 ac_cpp='$CXXCPP $CPPFLAGS'
25910 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25911 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25912 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25913 ac_main_return="return"
25914 echo "$as_me:25914: checking how to run the C++ preprocessor" >&5
25915 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25916 if test -z "$CXXCPP"; then
25917 if test "${ac_cv_prog_CXXCPP+set}" = set; then
25918 echo $ECHO_N "(cached) $ECHO_C" >&6
25919 else
25920 # Double quotes because CXXCPP needs to be expanded
25921 for CXXCPP in "$CXX -E" "/lib/cpp"
25922 do
25923 ac_preproc_ok=false
25924 for ac_cxx_preproc_warn_flag in '' yes
25925 do
25926 # Use a header file that comes with gcc, so configuring glibc
25927 # with a fresh cross-compiler works.
25928 # On the NeXT, cc -E runs the code through the compiler's parser,
25929 # not just through cpp. "Syntax error" is here to catch this case.
25930 cat >"conftest.$ac_ext" <<_ACEOF
25931 #line 25931 "configure"
25932 #include "confdefs.h"
25933 #include <assert.h>
25934 Syntax error
25935 _ACEOF
25936 if { (eval echo "$as_me:25936: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25937 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25938 ac_status=$?
25939 $EGREP -v '^ *\+' conftest.er1 >conftest.err
25940 rm -f conftest.er1
25941 cat conftest.err >&5
25942 echo "$as_me:25942: \$? = $ac_status" >&5
25943 (exit "$ac_status"); } >/dev/null; then
25944 if test -s conftest.err; then
25945 ac_cpp_err=$ac_cxx_preproc_warn_flag
25946 else
25947 ac_cpp_err=
25948 fi
25949 else
25950 ac_cpp_err=yes
25951 fi
25952 if test -z "$ac_cpp_err"; then
25953 :
25954 else
25955 echo "$as_me: failed program was:" >&5
25956 cat "conftest.$ac_ext" >&5
25957 # Broken: fails on valid input.
25958 continue
25959 fi
25960 rm -f conftest.err "conftest.$ac_ext"
25961
25962 # OK, works on sane cases. Now check whether non-existent headers
25963 # can be detected and how.
25964 cat >"conftest.$ac_ext" <<_ACEOF
25965 #line 25965 "configure"
25966 #include "confdefs.h"
25967 #include <ac_nonexistent.h>
25968 _ACEOF
25969 if { (eval echo "$as_me:25969: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25970 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25971 ac_status=$?
25972 $EGREP -v '^ *\+' conftest.er1 >conftest.err
25973 rm -f conftest.er1
25974 cat conftest.err >&5
25975 echo "$as_me:25975: \$? = $ac_status" >&5
25976 (exit "$ac_status"); } >/dev/null; then
25977 if test -s conftest.err; then
25978 ac_cpp_err=$ac_cxx_preproc_warn_flag
25979 else
25980 ac_cpp_err=
25981 fi
25982 else
25983 ac_cpp_err=yes
25984 fi
25985 if test -z "$ac_cpp_err"; then
25986 # Broken: success on invalid input.
25987 continue
25988 else
25989 echo "$as_me: failed program was:" >&5
25990 cat "conftest.$ac_ext" >&5
25991 # Passes both tests.
25992 ac_preproc_ok=:
25993 break
25994 fi
25995 rm -f conftest.err "conftest.$ac_ext"
25996
25997 done
25998 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25999 rm -f conftest.err "conftest.$ac_ext"
26000 if $ac_preproc_ok; then
26001 break
26002 fi
26003
26004 done
26005 ac_cv_prog_CXXCPP=$CXXCPP
26006
26007 fi
26008 CXXCPP=$ac_cv_prog_CXXCPP
26009 else
26010 ac_cv_prog_CXXCPP=$CXXCPP
26011 fi
26012 echo "$as_me:26012: result: $CXXCPP" >&5
26013 echo "${ECHO_T}$CXXCPP" >&6
26014 ac_preproc_ok=false
26015 for ac_cxx_preproc_warn_flag in '' yes
26016 do
26017 # Use a header file that comes with gcc, so configuring glibc
26018 # with a fresh cross-compiler works.
26019 # On the NeXT, cc -E runs the code through the compiler's parser,
26020 # not just through cpp. "Syntax error" is here to catch this case.
26021 cat >"conftest.$ac_ext" <<_ACEOF
26022 #line 26022 "configure"
26023 #include "confdefs.h"
26024 #include <assert.h>
26025 Syntax error
26026 _ACEOF
26027 if { (eval echo "$as_me:26027: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26028 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26029 ac_status=$?
26030 $EGREP -v '^ *\+' conftest.er1 >conftest.err
26031 rm -f conftest.er1
26032 cat conftest.err >&5
26033 echo "$as_me:26033: \$? = $ac_status" >&5
26034 (exit "$ac_status"); } >/dev/null; then
26035 if test -s conftest.err; then
26036 ac_cpp_err=$ac_cxx_preproc_warn_flag
26037 else
26038 ac_cpp_err=
26039 fi
26040 else
26041 ac_cpp_err=yes
26042 fi
26043 if test -z "$ac_cpp_err"; then
26044 :
26045 else
26046 echo "$as_me: failed program was:" >&5
26047 cat "conftest.$ac_ext" >&5
26048 # Broken: fails on valid input.
26049 continue
26050 fi
26051 rm -f conftest.err "conftest.$ac_ext"
26052
26053 # OK, works on sane cases. Now check whether non-existent headers
26054 # can be detected and how.
26055 cat >"conftest.$ac_ext" <<_ACEOF
26056 #line 26056 "configure"
26057 #include "confdefs.h"
26058 #include <ac_nonexistent.h>
26059 _ACEOF
26060 if { (eval echo "$as_me:26060: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26061 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26062 ac_status=$?
26063 $EGREP -v '^ *\+' conftest.er1 >conftest.err
26064 rm -f conftest.er1
26065 cat conftest.err >&5
26066 echo "$as_me:26066: \$? = $ac_status" >&5
26067 (exit "$ac_status"); } >/dev/null; then
26068 if test -s conftest.err; then
26069 ac_cpp_err=$ac_cxx_preproc_warn_flag
26070 else
26071 ac_cpp_err=
26072 fi
26073 else
26074 ac_cpp_err=yes
26075 fi
26076 if test -z "$ac_cpp_err"; then
26077 # Broken: success on invalid input.
26078 continue
26079 else
26080 echo "$as_me: failed program was:" >&5
26081 cat "conftest.$ac_ext" >&5
26082 # Passes both tests.
26083 ac_preproc_ok=:
26084 break
26085 fi
26086 rm -f conftest.err "conftest.$ac_ext"
26087
26088 done
26089 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
26090 rm -f conftest.err "conftest.$ac_ext"
26091 if $ac_preproc_ok; then
26092 :
26093 else
26094 { { echo "$as_me:26094: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
26095 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
26096 { (exit 1); exit 1; }; }
26097 fi
26098
26099 ac_ext=cc
26100 ac_cpp='$CXXCPP $CPPFLAGS'
26101 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26102 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26103 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26104 ac_main_return="return"
26105
26106 for ac_header in new exception typeinfo
26107 do
26108 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26109 echo "$as_me:26109: checking for $ac_header" >&5
26110 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26111 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26112 echo $ECHO_N "(cached) $ECHO_C" >&6
26113 else
26114 cat >"conftest.$ac_ext" <<_ACEOF
26115 #line 26115 "configure"
26116 #include "confdefs.h"
26117 #include <$ac_header>
26118 _ACEOF
26119 if { (eval echo "$as_me:26119: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26120 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26121 ac_status=$?
26122 $EGREP -v '^ *\+' conftest.er1 >conftest.err
26123 rm -f conftest.er1
26124 cat conftest.err >&5
26125 echo "$as_me:26125: \$? = $ac_status" >&5
26126 (exit "$ac_status"); } >/dev/null; then
26127 if test -s conftest.err; then
26128 ac_cpp_err=$ac_cxx_preproc_warn_flag
26129 else
26130 ac_cpp_err=
26131 fi
26132 else
26133 ac_cpp_err=yes
26134 fi
26135 if test -z "$ac_cpp_err"; then
26136 eval "$as_ac_Header=yes"
26137 else
26138 echo "$as_me: failed program was:" >&5
26139 cat "conftest.$ac_ext" >&5
26140 eval "$as_ac_Header=no"
26141 fi
26142 rm -f conftest.err "conftest.$ac_ext"
26143 fi
26144 echo "$as_me:26144: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
26145 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
26146 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
26147 cat >>confdefs.h <<EOF
26148 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26149 EOF
26150
26151 fi
26152 done
26153
26154 for ac_header in iostream
26155 do
26156 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26157 echo "$as_me:26157: checking for $ac_header" >&5
26158 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26159 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26160 echo $ECHO_N "(cached) $ECHO_C" >&6
26161 else
26162 cat >"conftest.$ac_ext" <<_ACEOF
26163 #line 26163 "configure"
26164 #include "confdefs.h"
26165 #include <$ac_header>
26166 _ACEOF
26167 if { (eval echo "$as_me:26167: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26168 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26169 ac_status=$?
26170 $EGREP -v '^ *\+' conftest.er1 >conftest.err
26171 rm -f conftest.er1
26172 cat conftest.err >&5
26173 echo "$as_me:26173: \$? = $ac_status" >&5
26174 (exit "$ac_status"); } >/dev/null; then
26175 if test -s conftest.err; then
26176 ac_cpp_err=$ac_cxx_preproc_warn_flag
26177 else
26178 ac_cpp_err=
26179 fi
26180 else
26181 ac_cpp_err=yes
26182 fi
26183 if test -z "$ac_cpp_err"; then
26184 eval "$as_ac_Header=yes"
26185 else
26186 echo "$as_me: failed program was:" >&5
26187 cat "conftest.$ac_ext" >&5
26188 eval "$as_ac_Header=no"
26189 fi
26190 rm -f conftest.err "conftest.$ac_ext"
26191 fi
26192 echo "$as_me:26192: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
26193 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
26194 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
26195 cat >>confdefs.h <<EOF
26196 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26197 EOF
26198
26199 fi
26200 done
26201
26202 if test x"$ac_cv_header_iostream" = xyes ; then
26203 echo "$as_me:26203: checking if iostream uses std-namespace" >&5
26204 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
26205 cat >"conftest.$ac_ext" <<_ACEOF
26206 #line 26206 "configure"
26207 #include "confdefs.h"
26208
26209 #include <iostream>
26210 using std::endl;
26211 using std::cerr;
26212 int
26213 main (void)
26214 {
26215
26216 cerr << "testing" << endl;
26217
26218 ;
26219 return 0;
26220 }
26221 _ACEOF
26222 rm -f "conftest.$ac_objext"
26223 if { (eval echo "$as_me:26223: \"$ac_compile\"") >&5
26224 (eval $ac_compile) 2>&5
26225 ac_status=$?
26226 echo "$as_me:26226: \$? = $ac_status" >&5
26227 (exit "$ac_status"); } &&
26228 { ac_try='test -s "conftest.$ac_objext"'
26229 { (eval echo "$as_me:26229: \"$ac_try\"") >&5
26230 (eval $ac_try) 2>&5
26231 ac_status=$?
26232 echo "$as_me:26232: \$? = $ac_status" >&5
26233 (exit "$ac_status"); }; }; then
26234 cf_iostream_namespace=yes
26235 else
26236 echo "$as_me: failed program was:" >&5
26237 cat "conftest.$ac_ext" >&5
26238 cf_iostream_namespace=no
26239 fi
26240 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26241 echo "$as_me:26241: result: $cf_iostream_namespace" >&5
26242 echo "${ECHO_T}$cf_iostream_namespace" >&6
26243 if test "$cf_iostream_namespace" = yes ; then
26244
26245 cat >>confdefs.h <<\EOF
26246 #define IOSTREAM_NAMESPACE 1
26247 EOF
26248
26249 fi
26250 fi
26251
26252 echo "$as_me:26252: checking for builtin bool type" >&5
26253 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
26254 if test "${cf_cv_builtin_bool+set}" = set; then
26255 echo $ECHO_N "(cached) $ECHO_C" >&6
26256 else
26257
26258 cat >"conftest.$ac_ext" <<_ACEOF
26259 #line 26259 "configure"
26260 #include "confdefs.h"
26261
26262 $ac_includes_default
26263
26264 int
26265 main (void)
26266 {
26267 bool x = false; (void)x
26268 ;
26269 return 0;
26270 }
26271 _ACEOF
26272 rm -f "conftest.$ac_objext"
26273 if { (eval echo "$as_me:26273: \"$ac_compile\"") >&5
26274 (eval $ac_compile) 2>&5
26275 ac_status=$?
26276 echo "$as_me:26276: \$? = $ac_status" >&5
26277 (exit "$ac_status"); } &&
26278 { ac_try='test -s "conftest.$ac_objext"'
26279 { (eval echo "$as_me:26279: \"$ac_try\"") >&5
26280 (eval $ac_try) 2>&5
26281 ac_status=$?
26282 echo "$as_me:26282: \$? = $ac_status" >&5
26283 (exit "$ac_status"); }; }; then
26284 cf_cv_builtin_bool=yes
26285 else
26286 echo "$as_me: failed program was:" >&5
26287 cat "conftest.$ac_ext" >&5
26288 cf_cv_builtin_bool=no
26289 fi
26290 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26291 fi
26292 echo "$as_me:26292: result: $cf_cv_builtin_bool" >&5
26293 echo "${ECHO_T}$cf_cv_builtin_bool" >&6
26294
26295 echo "$as_me:26295: checking for bool" >&5
26296 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26297 if test "${ac_cv_type_bool+set}" = set; then
26298 echo $ECHO_N "(cached) $ECHO_C" >&6
26299 else
26300 cat >"conftest.$ac_ext" <<_ACEOF
26301 #line 26301 "configure"
26302 #include "confdefs.h"
26303
26304 $ac_includes_default
26305
26306 #if defined(__cplusplus)
26307
26308 #ifdef HAVE_GXX_BUILTIN_H
26309 #include <g++/builtin.h>
26310 #elif HAVE_GPP_BUILTIN_H
26311 #include <gpp/builtin.h>
26312 #elif HAVE_BUILTIN_H
26313 #include <builtin.h>
26314 #endif
26315
26316 #else
26317
26318 #if $USE_STDBOOL_H
26319 #include <stdbool.h>
26320 #endif
26321
26322 #endif
26323
26324 int
26325 main (void)
26326 {
26327 if ((bool *) 0)
26328 return 0;
26329 if (sizeof (bool))
26330 return 0;
26331 ;
26332 return 0;
26333 }
26334 _ACEOF
26335 rm -f "conftest.$ac_objext"
26336 if { (eval echo "$as_me:26336: \"$ac_compile\"") >&5
26337 (eval $ac_compile) 2>&5
26338 ac_status=$?
26339 echo "$as_me:26339: \$? = $ac_status" >&5
26340 (exit "$ac_status"); } &&
26341 { ac_try='test -s "conftest.$ac_objext"'
26342 { (eval echo "$as_me:26342: \"$ac_try\"") >&5
26343 (eval $ac_try) 2>&5
26344 ac_status=$?
26345 echo "$as_me:26345: \$? = $ac_status" >&5
26346 (exit "$ac_status"); }; }; then
26347 ac_cv_type_bool=yes
26348 else
26349 echo "$as_me: failed program was:" >&5
26350 cat "conftest.$ac_ext" >&5
26351 ac_cv_type_bool=no
26352 fi
26353 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26354 fi
26355 echo "$as_me:26355: result: $ac_cv_type_bool" >&5
26356 echo "${ECHO_T}$ac_cv_type_bool" >&6
26357
26358 echo "$as_me:26358: checking size of bool" >&5
26359 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26360 if test "${ac_cv_sizeof_bool+set}" = set; then
26361 echo $ECHO_N "(cached) $ECHO_C" >&6
26362 else
26363 if test "$ac_cv_type_bool" = yes; then
26364 if test "$cross_compiling" = yes; then
26365 # Depending upon the size, compute the lo and hi bounds.
26366 cat >"conftest.$ac_ext" <<_ACEOF
26367 #line 26367 "configure"
26368 #include "confdefs.h"
26369
26370 $ac_includes_default
26371
26372 #if defined(__cplusplus)
26373
26374 #ifdef HAVE_GXX_BUILTIN_H
26375 #include <g++/builtin.h>
26376 #elif HAVE_GPP_BUILTIN_H
26377 #include <gpp/builtin.h>
26378 #elif HAVE_BUILTIN_H
26379 #include <builtin.h>
26380 #endif
26381
26382 #else
26383
26384 #if $USE_STDBOOL_H
26385 #include <stdbool.h>
26386 #endif
26387
26388 #endif
26389
26390 int
26391 main (void)
26392 {
26393 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26394 ;
26395 return 0;
26396 }
26397 _ACEOF
26398 rm -f "conftest.$ac_objext"
26399 if { (eval echo "$as_me:26399: \"$ac_compile\"") >&5
26400 (eval $ac_compile) 2>&5
26401 ac_status=$?
26402 echo "$as_me:26402: \$? = $ac_status" >&5
26403 (exit "$ac_status"); } &&
26404 { ac_try='test -s "conftest.$ac_objext"'
26405 { (eval echo "$as_me:26405: \"$ac_try\"") >&5
26406 (eval $ac_try) 2>&5
26407 ac_status=$?
26408 echo "$as_me:26408: \$? = $ac_status" >&5
26409 (exit "$ac_status"); }; }; then
26410 ac_lo=0 ac_mid=0
26411 while :; do
26412 cat >"conftest.$ac_ext" <<_ACEOF
26413 #line 26413 "configure"
26414 #include "confdefs.h"
26415
26416 $ac_includes_default
26417
26418 #if defined(__cplusplus)
26419
26420 #ifdef HAVE_GXX_BUILTIN_H
26421 #include <g++/builtin.h>
26422 #elif HAVE_GPP_BUILTIN_H
26423 #include <gpp/builtin.h>
26424 #elif HAVE_BUILTIN_H
26425 #include <builtin.h>
26426 #endif
26427
26428 #else
26429
26430 #if $USE_STDBOOL_H
26431 #include <stdbool.h>
26432 #endif
26433
26434 #endif
26435
26436 int
26437 main (void)
26438 {
26439 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26440 ;
26441 return 0;
26442 }
26443 _ACEOF
26444 rm -f "conftest.$ac_objext"
26445 if { (eval echo "$as_me:26445: \"$ac_compile\"") >&5
26446 (eval $ac_compile) 2>&5
26447 ac_status=$?
26448 echo "$as_me:26448: \$? = $ac_status" >&5
26449 (exit "$ac_status"); } &&
26450 { ac_try='test -s "conftest.$ac_objext"'
26451 { (eval echo "$as_me:26451: \"$ac_try\"") >&5
26452 (eval $ac_try) 2>&5
26453 ac_status=$?
26454 echo "$as_me:26454: \$? = $ac_status" >&5
26455 (exit "$ac_status"); }; }; then
26456 ac_hi=$ac_mid; break
26457 else
26458 echo "$as_me: failed program was:" >&5
26459 cat "conftest.$ac_ext" >&5
26460 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26461 fi
26462 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26463 done
26464 else
26465 echo "$as_me: failed program was:" >&5
26466 cat "conftest.$ac_ext" >&5
26467 ac_hi=-1 ac_mid=-1
26468 while :; do
26469 cat >"conftest.$ac_ext" <<_ACEOF
26470 #line 26470 "configure"
26471 #include "confdefs.h"
26472
26473 $ac_includes_default
26474
26475 #if defined(__cplusplus)
26476
26477 #ifdef HAVE_GXX_BUILTIN_H
26478 #include <g++/builtin.h>
26479 #elif HAVE_GPP_BUILTIN_H
26480 #include <gpp/builtin.h>
26481 #elif HAVE_BUILTIN_H
26482 #include <builtin.h>
26483 #endif
26484
26485 #else
26486
26487 #if $USE_STDBOOL_H
26488 #include <stdbool.h>
26489 #endif
26490
26491 #endif
26492
26493 int
26494 main (void)
26495 {
26496 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26497 ;
26498 return 0;
26499 }
26500 _ACEOF
26501 rm -f "conftest.$ac_objext"
26502 if { (eval echo "$as_me:26502: \"$ac_compile\"") >&5
26503 (eval $ac_compile) 2>&5
26504 ac_status=$?
26505 echo "$as_me:26505: \$? = $ac_status" >&5
26506 (exit "$ac_status"); } &&
26507 { ac_try='test -s "conftest.$ac_objext"'
26508 { (eval echo "$as_me:26508: \"$ac_try\"") >&5
26509 (eval $ac_try) 2>&5
26510 ac_status=$?
26511 echo "$as_me:26511: \$? = $ac_status" >&5
26512 (exit "$ac_status"); }; }; then
26513 ac_lo=$ac_mid; break
26514 else
26515 echo "$as_me: failed program was:" >&5
26516 cat "conftest.$ac_ext" >&5
26517 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26518 fi
26519 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26520 done
26521 fi
26522 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26523 # Binary search between lo and hi bounds.
26524 while test "x$ac_lo" != "x$ac_hi"; do
26525 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26526 cat >"conftest.$ac_ext" <<_ACEOF
26527 #line 26527 "configure"
26528 #include "confdefs.h"
26529
26530 $ac_includes_default
26531
26532 #if defined(__cplusplus)
26533
26534 #ifdef HAVE_GXX_BUILTIN_H
26535 #include <g++/builtin.h>
26536 #elif HAVE_GPP_BUILTIN_H
26537 #include <gpp/builtin.h>
26538 #elif HAVE_BUILTIN_H
26539 #include <builtin.h>
26540 #endif
26541
26542 #else
26543
26544 #if $USE_STDBOOL_H
26545 #include <stdbool.h>
26546 #endif
26547
26548 #endif
26549
26550 int
26551 main (void)
26552 {
26553 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26554 ;
26555 return 0;
26556 }
26557 _ACEOF
26558 rm -f "conftest.$ac_objext"
26559 if { (eval echo "$as_me:26559: \"$ac_compile\"") >&5
26560 (eval $ac_compile) 2>&5
26561 ac_status=$?
26562 echo "$as_me:26562: \$? = $ac_status" >&5
26563 (exit "$ac_status"); } &&
26564 { ac_try='test -s "conftest.$ac_objext"'
26565 { (eval echo "$as_me:26565: \"$ac_try\"") >&5
26566 (eval $ac_try) 2>&5
26567 ac_status=$?
26568 echo "$as_me:26568: \$? = $ac_status" >&5
26569 (exit "$ac_status"); }; }; then
26570 ac_hi=$ac_mid
26571 else
26572 echo "$as_me: failed program was:" >&5
26573 cat "conftest.$ac_ext" >&5
26574 ac_lo=`expr "$ac_mid" + 1`
26575 fi
26576 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26577 done
26578 ac_cv_sizeof_bool=$ac_lo
26579 else
26580 if test "$cross_compiling" = yes; then
26581 { { echo "$as_me:26581: error: cannot run test program while cross compiling" >&5
26582 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26583 { (exit 1); exit 1; }; }
26584 else
26585 cat >"conftest.$ac_ext" <<_ACEOF
26586 #line 26586 "configure"
26587 #include "confdefs.h"
26588
26589 $ac_includes_default
26590
26591 #if defined(__cplusplus)
26592
26593 #ifdef HAVE_GXX_BUILTIN_H
26594 #include <g++/builtin.h>
26595 #elif HAVE_GPP_BUILTIN_H
26596 #include <gpp/builtin.h>
26597 #elif HAVE_BUILTIN_H
26598 #include <builtin.h>
26599 #endif
26600
26601 #else
26602
26603 #if $USE_STDBOOL_H
26604 #include <stdbool.h>
26605 #endif
26606
26607 #endif
26608
26609 int
26610 main (void)
26611 {
26612 FILE *f = fopen ("conftest.val", "w");
26613 if (!f)
26614 $ac_main_return (1);
26615 fprintf (f, "%ld", (long)(sizeof (bool)));
26616 fclose (f);
26617 ;
26618 return 0;
26619 }
26620 _ACEOF
26621 rm -f "conftest$ac_exeext"
26622 if { (eval echo "$as_me:26622: \"$ac_link\"") >&5
26623 (eval $ac_link) 2>&5
26624 ac_status=$?
26625 echo "$as_me:26625: \$? = $ac_status" >&5
26626 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26627 { (eval echo "$as_me:26627: \"$ac_try\"") >&5
26628 (eval $ac_try) 2>&5
26629 ac_status=$?
26630 echo "$as_me:26630: \$? = $ac_status" >&5
26631 (exit "$ac_status"); }; }; then
26632 ac_cv_sizeof_bool=`cat conftest.val`
26633 else
26634 echo "$as_me: program exited with status $ac_status" >&5
26635 echo "$as_me: failed program was:" >&5
26636 cat "conftest.$ac_ext" >&5
26637 fi
26638 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26639 fi
26640 fi
26641 rm -f conftest.val
26642 else
26643 ac_cv_sizeof_bool=0
26644 fi
26645 fi
26646 echo "$as_me:26646: result: $ac_cv_sizeof_bool" >&5
26647 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26648 cat >>confdefs.h <<EOF
26649 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26650 EOF
26651
26652 echo "$as_me:26652: checking for type of bool" >&5
26653 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26654 if test "${cf_cv_type_of_bool+set}" = set; then
26655 echo $ECHO_N "(cached) $ECHO_C" >&6
26656 else
26657
26658 rm -f cf_test.out
26659 if test "$cross_compiling" = yes; then
26660
26661 case x$ac_cv_sizeof_bool in
26662 (x1) cf_cv_type_of_bool="unsigned char";;
26663 (x2) cf_cv_type_of_bool="unsigned short";;
26664 (x4) cf_cv_type_of_bool="unsigned int";;
26665 (x8) cf_cv_type_of_bool="unsigned long";;
26666 (*) cf_cv_type_of_bool=unknown;;
26667 esac
26668
26669 else
26670 cat >"conftest.$ac_ext" <<_ACEOF
26671 #line 26671 "configure"
26672 #include "confdefs.h"
26673
26674 $ac_includes_default
26675
26676 #if defined(__cplusplus)
26677
26678 #ifdef HAVE_GXX_BUILTIN_H
26679 #include <g++/builtin.h>
26680 #elif HAVE_GPP_BUILTIN_H
26681 #include <gpp/builtin.h>
26682 #elif HAVE_BUILTIN_H
26683 #include <builtin.h>
26684 #endif
26685
26686 #else
26687
26688 #if $USE_STDBOOL_H
26689 #include <stdbool.h>
26690 #endif
26691
26692 #endif
26693
26694 int main(void)
26695 {
26696 FILE *fp = fopen("cf_test.out", "w");
26697 if (fp != NULL) {
26698 bool x = true;
26699 if ((bool)(-x) >= 0)
26700 fputs("unsigned ", fp);
26701 if (sizeof(x) == sizeof(int)) fputs("int", fp);
26702 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26703 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26704 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26705 fclose(fp);
26706 }
26707 ${cf_cv_main_return:-return}(0);
26708 }
26709
26710 _ACEOF
26711 rm -f "conftest$ac_exeext"
26712 if { (eval echo "$as_me:26712: \"$ac_link\"") >&5
26713 (eval $ac_link) 2>&5
26714 ac_status=$?
26715 echo "$as_me:26715: \$? = $ac_status" >&5
26716 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26717 { (eval echo "$as_me:26717: \"$ac_try\"") >&5
26718 (eval $ac_try) 2>&5
26719 ac_status=$?
26720 echo "$as_me:26720: \$? = $ac_status" >&5
26721 (exit "$ac_status"); }; }; then
26722 cf_cv_type_of_bool=`cat cf_test.out`
26723 if test -z "$cf_cv_type_of_bool"; then
26724 cf_cv_type_of_bool=unknown
26725 fi
26726 else
26727 echo "$as_me: program exited with status $ac_status" >&5
26728 echo "$as_me: failed program was:" >&5
26729 cat "conftest.$ac_ext" >&5
26730 cf_cv_type_of_bool=unknown
26731 fi
26732 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26733 fi
26734 rm -f cf_test.out
26735
26736 fi
26737 echo "$as_me:26737: result: $cf_cv_type_of_bool" >&5
26738 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26739
26740 if test "$cf_cv_type_of_bool" = unknown ; then
26741 case .$NCURSES_BOOL in
26742 (.auto|.) NCURSES_BOOL=unsigned;;
26743 esac
26744 { echo "$as_me:26744: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26745 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26746 cf_cv_type_of_bool=$NCURSES_BOOL
26747 fi
26748
26749 echo "$as_me:26749: checking for special defines needed for etip.h" >&5
26750 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26751 cf_save_CXXFLAGS="$CXXFLAGS"
26752 cf_result="none"
26753
26754 # etip.h includes ncurses.h which includes ncurses_dll.h
26755 # But ncurses_dll.h is generated - fix here.
26756 test -d include || mkdir include
26757 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
26758
26759 for cf_math in "" MATH_H
26760 do
26761 for cf_excp in "" MATH_EXCEPTION
26762 do
26763 CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26764 test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26765 test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26766 cat >"conftest.$ac_ext" <<_ACEOF
26767 #line 26767 "configure"
26768 #include "confdefs.h"
26769
26770 #include <etip.h.in>
26771
26772 int
26773 main (void)
26774 {
26775
26776 ;
26777 return 0;
26778 }
26779 _ACEOF
26780 rm -f "conftest.$ac_objext"
26781 if { (eval echo "$as_me:26781: \"$ac_compile\"") >&5
26782 (eval $ac_compile) 2>&5
26783 ac_status=$?
26784 echo "$as_me:26784: \$? = $ac_status" >&5
26785 (exit "$ac_status"); } &&
26786 { ac_try='test -s "conftest.$ac_objext"'
26787 { (eval echo "$as_me:26787: \"$ac_try\"") >&5
26788 (eval $ac_try) 2>&5
26789 ac_status=$?
26790 echo "$as_me:26790: \$? = $ac_status" >&5
26791 (exit "$ac_status"); }; }; then
26792
26793 test -n "$cf_math" && cat >>confdefs.h <<EOF
26794 #define ETIP_NEEDS_${cf_math} 1
26795 EOF
26796
26797 test -n "$cf_excp" && cat >>confdefs.h <<EOF
26798 #define ETIP_NEEDS_${cf_excp} 1
26799 EOF
26800
26801 cf_result="$cf_math $cf_excp"
26802 break 2
26803
26804 else
26805 echo "$as_me: failed program was:" >&5
26806 cat "conftest.$ac_ext" >&5
26807 fi
26808 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26809 done
26810 done
26811 echo "$as_me:26811: result: ${cf_result:-(none)}" >&5
26812 echo "${ECHO_T}${cf_result:-(none)}" >&6
26813 CXXFLAGS="$cf_save_CXXFLAGS"
26814
26815 if test -n "$CXX"; then
26816 echo "$as_me:26816: checking if $CXX accepts override keyword" >&5
26817 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26818 if test "${cf_cv_cpp_override+set}" = set; then
26819 echo $ECHO_N "(cached) $ECHO_C" >&6
26820 else
26821
26822 ac_ext=cc
26823 ac_cpp='$CXXCPP $CPPFLAGS'
26824 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26825 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26826 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26827 ac_main_return="return"
26828
26829 if test "$cross_compiling" = yes; then
26830 cf_cv_cpp_override=unknown
26831 else
26832 cat >"conftest.$ac_ext" <<_ACEOF
26833 #line 26833 "configure"
26834 #include "confdefs.h"
26835
26836 class base
26837 {
26838 public:
26839 virtual int foo(float x) = 0;
26840 };
26841
26842 class derived: public base
26843 {
26844 public:
26845 int foo(float x) override { return x != 0.0 ? 1 : 0; }
26846 };
26847
26848 int main(void) { }
26849
26850 _ACEOF
26851 rm -f "conftest$ac_exeext"
26852 if { (eval echo "$as_me:26852: \"$ac_link\"") >&5
26853 (eval $ac_link) 2>&5
26854 ac_status=$?
26855 echo "$as_me:26855: \$? = $ac_status" >&5
26856 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26857 { (eval echo "$as_me:26857: \"$ac_try\"") >&5
26858 (eval $ac_try) 2>&5
26859 ac_status=$?
26860 echo "$as_me:26860: \$? = $ac_status" >&5
26861 (exit "$ac_status"); }; }; then
26862 cf_cv_cpp_override=yes
26863 else
26864 echo "$as_me: program exited with status $ac_status" >&5
26865 echo "$as_me: failed program was:" >&5
26866 cat "conftest.$ac_ext" >&5
26867 cf_cv_cpp_override=no
26868 fi
26869 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26870 fi
26871 ac_ext=cc
26872 ac_cpp='$CXXCPP $CPPFLAGS'
26873 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26874 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26875 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26876 ac_main_return="return"
26877
26878 fi
26879 echo "$as_me:26879: result: $cf_cv_cpp_override" >&5
26880 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26881 fi
26882 test "$cf_cv_cpp_override" = yes &&
26883 cat >>confdefs.h <<\EOF
26884 #define CPP_HAS_OVERRIDE 1
26885 EOF
26886
26887 if test -n "$CXX"; then
26888 echo "$as_me:26888: checking if $CXX accepts parameter initialization" >&5
26889 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26890 if test "${cf_cv_cpp_param_init+set}" = set; then
26891 echo $ECHO_N "(cached) $ECHO_C" >&6
26892 else
26893
26894 ac_ext=cc
26895 ac_cpp='$CXXCPP $CPPFLAGS'
26896 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26897 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26898 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26899 ac_main_return="return"
26900
26901 if test "$cross_compiling" = yes; then
26902 cf_cv_cpp_param_init=unknown
26903 else
26904 cat >"conftest.$ac_ext" <<_ACEOF
26905 #line 26905 "configure"
26906 #include "confdefs.h"
26907
26908 class TEST {
26909 private:
26910 int value;
26911 public:
26912 TEST(int x = 1);
26913 ~TEST();
26914 };
26915
26916 TEST::TEST(int x = 1) // some compilers do not like second initializer
26917 {
26918 value = x;
26919 }
26920 int main(void) { }
26921
26922 _ACEOF
26923 rm -f "conftest$ac_exeext"
26924 if { (eval echo "$as_me:26924: \"$ac_link\"") >&5
26925 (eval $ac_link) 2>&5
26926 ac_status=$?
26927 echo "$as_me:26927: \$? = $ac_status" >&5
26928 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26929 { (eval echo "$as_me:26929: \"$ac_try\"") >&5
26930 (eval $ac_try) 2>&5
26931 ac_status=$?
26932 echo "$as_me:26932: \$? = $ac_status" >&5
26933 (exit "$ac_status"); }; }; then
26934 cf_cv_cpp_param_init=yes
26935 else
26936 echo "$as_me: program exited with status $ac_status" >&5
26937 echo "$as_me: failed program was:" >&5
26938 cat "conftest.$ac_ext" >&5
26939 cf_cv_cpp_param_init=no
26940 fi
26941 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26942 fi
26943 ac_ext=cc
26944 ac_cpp='$CXXCPP $CPPFLAGS'
26945 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26946 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26947 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26948 ac_main_return="return"
26949
26950 fi
26951 echo "$as_me:26951: result: $cf_cv_cpp_param_init" >&5
26952 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26953 fi
26954 test "$cf_cv_cpp_param_init" = yes &&
26955 cat >>confdefs.h <<\EOF
26956 #define CPP_HAS_PARAM_INIT 1
26957 EOF
26958
26959 if test -n "$CXX"; then
26960
26961 echo "$as_me:26961: checking if $CXX accepts static_cast" >&5
26962 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26963 if test "${cf_cv_cpp_static_cast+set}" = set; then
26964 echo $ECHO_N "(cached) $ECHO_C" >&6
26965 else
26966
26967 ac_ext=cc
26968 ac_cpp='$CXXCPP $CPPFLAGS'
26969 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26970 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26971 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26972 ac_main_return="return"
26973
26974 cat >"conftest.$ac_ext" <<_ACEOF
26975 #line 26975 "configure"
26976 #include "confdefs.h"
26977
26978 class NCursesPanel
26979 {
26980 public:
26981 NCursesPanel(int nlines,
26982 int ncols,
26983 int begin_y = 0,
26984 int begin_x = 0)
26985 {
26986 }
26987 NCursesPanel();
26988 ~NCursesPanel();
26989 };
26990
26991 template<class T> class NCursesUserPanel : public NCursesPanel
26992 {
26993 public:
26994 NCursesUserPanel (int nlines,
26995 int ncols,
26996 int begin_y = 0,
26997 int begin_x = 0,
26998 const T* p_UserData = static_cast<T*>(0))
26999 : NCursesPanel (nlines, ncols, begin_y, begin_x)
27000 {
27001 };
27002 NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
27003 {
27004 };
27005
27006 virtual ~NCursesUserPanel() {};
27007 };
27008
27009 int
27010 main (void)
27011 {
27012
27013 const char* p_UserData = static_cast<char*>(0)
27014 ;
27015 return 0;
27016 }
27017 _ACEOF
27018 rm -f "conftest.$ac_objext"
27019 if { (eval echo "$as_me:27019: \"$ac_compile\"") >&5
27020 (eval $ac_compile) 2>&5
27021 ac_status=$?
27022 echo "$as_me:27022: \$? = $ac_status" >&5
27023 (exit "$ac_status"); } &&
27024 { ac_try='test -s "conftest.$ac_objext"'
27025 { (eval echo "$as_me:27025: \"$ac_try\"") >&5
27026 (eval $ac_try) 2>&5
27027 ac_status=$?
27028 echo "$as_me:27028: \$? = $ac_status" >&5
27029 (exit "$ac_status"); }; }; then
27030 cf_cv_cpp_static_cast=yes
27031 else
27032 echo "$as_me: failed program was:" >&5
27033 cat "conftest.$ac_ext" >&5
27034 cf_cv_cpp_static_cast=no
27035 fi
27036 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27037
27038 ac_ext=cc
27039 ac_cpp='$CXXCPP $CPPFLAGS'
27040 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27041 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27042 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27043 ac_main_return="return"
27044
27045 fi
27046 echo "$as_me:27046: result: $cf_cv_cpp_static_cast" >&5
27047 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
27048
27049 fi
27050
27051 test "$cf_cv_cpp_static_cast" = yes &&
27052 cat >>confdefs.h <<\EOF
27053 #define CPP_HAS_STATIC_CAST 1
27054 EOF
27055
27056 CXX_AR='$(AR)'
27057 CXX_ARFLAGS='$(ARFLAGS)'
27058 case "$cf_cv_system_name" in
27059 (irix*)
27060 if test "$GXX" != yes ; then
27061 CXX_AR='$(CXX)'
27062 CXX_ARFLAGS='-ar -o'
27063 fi
27064 ;;
27065 (sco3.2v5*)
27066 CXXLDFLAGS="-u main"
27067 ;;
27068 (solaris2*)
27069 if test "$GXX" != yes ; then
27070 CXX_AR='$(CXX)'
27071 CXX_ARFLAGS='-xar -o'
27072 fi
27073 ;;
27074 esac
27075
27076 else
27077 cf_cxx_library=no
27078 cf_cv_builtin_bool=yes
27079
27080 # Just because we are not configuring against C++ right now does not
27081 # mean that a user will not want to use C++. Some distributors disable
27082 # the C++ portion of this configuration as a shortcut (or just to avoid
27083 # compiling the demo in the c++ directory). So we need a reasonable
27084 # default for the 'bool' type.
27085 #
27086 # Caveat: since the storage of the bool type is not standardized, it
27087 # may change.
27088
27089 if test "$NCURSES_BOOL" != auto ; then
27090 cf_cv_type_of_bool=$NCURSES_BOOL
27091 USE_STDBOOL_H=0
27092 else
27093
27094 echo "$as_me:27094: checking for bool" >&5
27095 echo $ECHO_N "checking for bool... $ECHO_C" >&6
27096 if test "${ac_cv_type_bool+set}" = set; then
27097 echo $ECHO_N "(cached) $ECHO_C" >&6
27098 else
27099 cat >"conftest.$ac_ext" <<_ACEOF
27100 #line 27100 "configure"
27101 #include "confdefs.h"
27102
27103 $ac_includes_default
27104
27105 #if defined(__cplusplus)
27106
27107 #ifdef HAVE_GXX_BUILTIN_H
27108 #include <g++/builtin.h>
27109 #elif HAVE_GPP_BUILTIN_H
27110 #include <gpp/builtin.h>
27111 #elif HAVE_BUILTIN_H
27112 #include <builtin.h>
27113 #endif
27114
27115 #else
27116
27117 #if $USE_STDBOOL_H
27118 #include <stdbool.h>
27119 #endif
27120
27121 #endif
27122
27123 int
27124 main (void)
27125 {
27126 if ((bool *) 0)
27127 return 0;
27128 if (sizeof (bool))
27129 return 0;
27130 ;
27131 return 0;
27132 }
27133 _ACEOF
27134 rm -f "conftest.$ac_objext"
27135 if { (eval echo "$as_me:27135: \"$ac_compile\"") >&5
27136 (eval $ac_compile) 2>&5
27137 ac_status=$?
27138 echo "$as_me:27138: \$? = $ac_status" >&5
27139 (exit "$ac_status"); } &&
27140 { ac_try='test -s "conftest.$ac_objext"'
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 ac_cv_type_bool=yes
27147 else
27148 echo "$as_me: failed program was:" >&5
27149 cat "conftest.$ac_ext" >&5
27150 ac_cv_type_bool=no
27151 fi
27152 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27153 fi
27154 echo "$as_me:27154: result: $ac_cv_type_bool" >&5
27155 echo "${ECHO_T}$ac_cv_type_bool" >&6
27156
27157 echo "$as_me:27157: checking size of bool" >&5
27158 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
27159 if test "${ac_cv_sizeof_bool+set}" = set; then
27160 echo $ECHO_N "(cached) $ECHO_C" >&6
27161 else
27162 if test "$ac_cv_type_bool" = yes; then
27163 if test "$cross_compiling" = yes; then
27164 # Depending upon the size, compute the lo and hi bounds.
27165 cat >"conftest.$ac_ext" <<_ACEOF
27166 #line 27166 "configure"
27167 #include "confdefs.h"
27168
27169 $ac_includes_default
27170
27171 #if defined(__cplusplus)
27172
27173 #ifdef HAVE_GXX_BUILTIN_H
27174 #include <g++/builtin.h>
27175 #elif HAVE_GPP_BUILTIN_H
27176 #include <gpp/builtin.h>
27177 #elif HAVE_BUILTIN_H
27178 #include <builtin.h>
27179 #endif
27180
27181 #else
27182
27183 #if $USE_STDBOOL_H
27184 #include <stdbool.h>
27185 #endif
27186
27187 #endif
27188
27189 int
27190 main (void)
27191 {
27192 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
27193 ;
27194 return 0;
27195 }
27196 _ACEOF
27197 rm -f "conftest.$ac_objext"
27198 if { (eval echo "$as_me:27198: \"$ac_compile\"") >&5
27199 (eval $ac_compile) 2>&5
27200 ac_status=$?
27201 echo "$as_me:27201: \$? = $ac_status" >&5
27202 (exit "$ac_status"); } &&
27203 { ac_try='test -s "conftest.$ac_objext"'
27204 { (eval echo "$as_me:27204: \"$ac_try\"") >&5
27205 (eval $ac_try) 2>&5
27206 ac_status=$?
27207 echo "$as_me:27207: \$? = $ac_status" >&5
27208 (exit "$ac_status"); }; }; then
27209 ac_lo=0 ac_mid=0
27210 while :; do
27211 cat >"conftest.$ac_ext" <<_ACEOF
27212 #line 27212 "configure"
27213 #include "confdefs.h"
27214
27215 $ac_includes_default
27216
27217 #if defined(__cplusplus)
27218
27219 #ifdef HAVE_GXX_BUILTIN_H
27220 #include <g++/builtin.h>
27221 #elif HAVE_GPP_BUILTIN_H
27222 #include <gpp/builtin.h>
27223 #elif HAVE_BUILTIN_H
27224 #include <builtin.h>
27225 #endif
27226
27227 #else
27228
27229 #if $USE_STDBOOL_H
27230 #include <stdbool.h>
27231 #endif
27232
27233 #endif
27234
27235 int
27236 main (void)
27237 {
27238 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27239 ;
27240 return 0;
27241 }
27242 _ACEOF
27243 rm -f "conftest.$ac_objext"
27244 if { (eval echo "$as_me:27244: \"$ac_compile\"") >&5
27245 (eval $ac_compile) 2>&5
27246 ac_status=$?
27247 echo "$as_me:27247: \$? = $ac_status" >&5
27248 (exit "$ac_status"); } &&
27249 { ac_try='test -s "conftest.$ac_objext"'
27250 { (eval echo "$as_me:27250: \"$ac_try\"") >&5
27251 (eval $ac_try) 2>&5
27252 ac_status=$?
27253 echo "$as_me:27253: \$? = $ac_status" >&5
27254 (exit "$ac_status"); }; }; then
27255 ac_hi=$ac_mid; break
27256 else
27257 echo "$as_me: failed program was:" >&5
27258 cat "conftest.$ac_ext" >&5
27259 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27260 fi
27261 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27262 done
27263 else
27264 echo "$as_me: failed program was:" >&5
27265 cat "conftest.$ac_ext" >&5
27266 ac_hi=-1 ac_mid=-1
27267 while :; do
27268 cat >"conftest.$ac_ext" <<_ACEOF
27269 #line 27269 "configure"
27270 #include "confdefs.h"
27271
27272 $ac_includes_default
27273
27274 #if defined(__cplusplus)
27275
27276 #ifdef HAVE_GXX_BUILTIN_H
27277 #include <g++/builtin.h>
27278 #elif HAVE_GPP_BUILTIN_H
27279 #include <gpp/builtin.h>
27280 #elif HAVE_BUILTIN_H
27281 #include <builtin.h>
27282 #endif
27283
27284 #else
27285
27286 #if $USE_STDBOOL_H
27287 #include <stdbool.h>
27288 #endif
27289
27290 #endif
27291
27292 int
27293 main (void)
27294 {
27295 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
27296 ;
27297 return 0;
27298 }
27299 _ACEOF
27300 rm -f "conftest.$ac_objext"
27301 if { (eval echo "$as_me:27301: \"$ac_compile\"") >&5
27302 (eval $ac_compile) 2>&5
27303 ac_status=$?
27304 echo "$as_me:27304: \$? = $ac_status" >&5
27305 (exit "$ac_status"); } &&
27306 { ac_try='test -s "conftest.$ac_objext"'
27307 { (eval echo "$as_me:27307: \"$ac_try\"") >&5
27308 (eval $ac_try) 2>&5
27309 ac_status=$?
27310 echo "$as_me:27310: \$? = $ac_status" >&5
27311 (exit "$ac_status"); }; }; then
27312 ac_lo=$ac_mid; break
27313 else
27314 echo "$as_me: failed program was:" >&5
27315 cat "conftest.$ac_ext" >&5
27316 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27317 fi
27318 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27319 done
27320 fi
27321 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27322 # Binary search between lo and hi bounds.
27323 while test "x$ac_lo" != "x$ac_hi"; do
27324 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27325 cat >"conftest.$ac_ext" <<_ACEOF
27326 #line 27326 "configure"
27327 #include "confdefs.h"
27328
27329 $ac_includes_default
27330
27331 #if defined(__cplusplus)
27332
27333 #ifdef HAVE_GXX_BUILTIN_H
27334 #include <g++/builtin.h>
27335 #elif HAVE_GPP_BUILTIN_H
27336 #include <gpp/builtin.h>
27337 #elif HAVE_BUILTIN_H
27338 #include <builtin.h>
27339 #endif
27340
27341 #else
27342
27343 #if $USE_STDBOOL_H
27344 #include <stdbool.h>
27345 #endif
27346
27347 #endif
27348
27349 int
27350 main (void)
27351 {
27352 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27353 ;
27354 return 0;
27355 }
27356 _ACEOF
27357 rm -f "conftest.$ac_objext"
27358 if { (eval echo "$as_me:27358: \"$ac_compile\"") >&5
27359 (eval $ac_compile) 2>&5
27360 ac_status=$?
27361 echo "$as_me:27361: \$? = $ac_status" >&5
27362 (exit "$ac_status"); } &&
27363 { ac_try='test -s "conftest.$ac_objext"'
27364 { (eval echo "$as_me:27364: \"$ac_try\"") >&5
27365 (eval $ac_try) 2>&5
27366 ac_status=$?
27367 echo "$as_me:27367: \$? = $ac_status" >&5
27368 (exit "$ac_status"); }; }; then
27369 ac_hi=$ac_mid
27370 else
27371 echo "$as_me: failed program was:" >&5
27372 cat "conftest.$ac_ext" >&5
27373 ac_lo=`expr "$ac_mid" + 1`
27374 fi
27375 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27376 done
27377 ac_cv_sizeof_bool=$ac_lo
27378 else
27379 if test "$cross_compiling" = yes; then
27380 { { echo "$as_me:27380: error: cannot run test program while cross compiling" >&5
27381 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27382 { (exit 1); exit 1; }; }
27383 else
27384 cat >"conftest.$ac_ext" <<_ACEOF
27385 #line 27385 "configure"
27386 #include "confdefs.h"
27387
27388 $ac_includes_default
27389
27390 #if defined(__cplusplus)
27391
27392 #ifdef HAVE_GXX_BUILTIN_H
27393 #include <g++/builtin.h>
27394 #elif HAVE_GPP_BUILTIN_H
27395 #include <gpp/builtin.h>
27396 #elif HAVE_BUILTIN_H
27397 #include <builtin.h>
27398 #endif
27399
27400 #else
27401
27402 #if $USE_STDBOOL_H
27403 #include <stdbool.h>
27404 #endif
27405
27406 #endif
27407
27408 int
27409 main (void)
27410 {
27411 FILE *f = fopen ("conftest.val", "w");
27412 if (!f)
27413 $ac_main_return (1);
27414 fprintf (f, "%ld", (long)(sizeof (bool)));
27415 fclose (f);
27416 ;
27417 return 0;
27418 }
27419 _ACEOF
27420 rm -f "conftest$ac_exeext"
27421 if { (eval echo "$as_me:27421: \"$ac_link\"") >&5
27422 (eval $ac_link) 2>&5
27423 ac_status=$?
27424 echo "$as_me:27424: \$? = $ac_status" >&5
27425 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27426 { (eval echo "$as_me:27426: \"$ac_try\"") >&5
27427 (eval $ac_try) 2>&5
27428 ac_status=$?
27429 echo "$as_me:27429: \$? = $ac_status" >&5
27430 (exit "$ac_status"); }; }; then
27431 ac_cv_sizeof_bool=`cat conftest.val`
27432 else
27433 echo "$as_me: program exited with status $ac_status" >&5
27434 echo "$as_me: failed program was:" >&5
27435 cat "conftest.$ac_ext" >&5
27436 fi
27437 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27438 fi
27439 fi
27440 rm -f conftest.val
27441 else
27442 ac_cv_sizeof_bool=0
27443 fi
27444 fi
27445 echo "$as_me:27445: result: $ac_cv_sizeof_bool" >&5
27446 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27447 cat >>confdefs.h <<EOF
27448 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27449 EOF
27450
27451 echo "$as_me:27451: checking for type of bool" >&5
27452 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27453 if test "${cf_cv_type_of_bool+set}" = set; then
27454 echo $ECHO_N "(cached) $ECHO_C" >&6
27455 else
27456
27457 rm -f cf_test.out
27458 if test "$cross_compiling" = yes; then
27459
27460 case x$ac_cv_sizeof_bool in
27461 (x1) cf_cv_type_of_bool="unsigned char";;
27462 (x2) cf_cv_type_of_bool="unsigned short";;
27463 (x4) cf_cv_type_of_bool="unsigned int";;
27464 (x8) cf_cv_type_of_bool="unsigned long";;
27465 (*) cf_cv_type_of_bool=unknown;;
27466 esac
27467
27468 else
27469 cat >"conftest.$ac_ext" <<_ACEOF
27470 #line 27470 "configure"
27471 #include "confdefs.h"
27472
27473 $ac_includes_default
27474
27475 #if defined(__cplusplus)
27476
27477 #ifdef HAVE_GXX_BUILTIN_H
27478 #include <g++/builtin.h>
27479 #elif HAVE_GPP_BUILTIN_H
27480 #include <gpp/builtin.h>
27481 #elif HAVE_BUILTIN_H
27482 #include <builtin.h>
27483 #endif
27484
27485 #else
27486
27487 #if $USE_STDBOOL_H
27488 #include <stdbool.h>
27489 #endif
27490
27491 #endif
27492
27493 int main(void)
27494 {
27495 FILE *fp = fopen("cf_test.out", "w");
27496 if (fp != NULL) {
27497 bool x = true;
27498 if ((bool)(-x) >= 0)
27499 fputs("unsigned ", fp);
27500 if (sizeof(x) == sizeof(int)) fputs("int", fp);
27501 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27502 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27503 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27504 fclose(fp);
27505 }
27506 ${cf_cv_main_return:-return}(0);
27507 }
27508
27509 _ACEOF
27510 rm -f "conftest$ac_exeext"
27511 if { (eval echo "$as_me:27511: \"$ac_link\"") >&5
27512 (eval $ac_link) 2>&5
27513 ac_status=$?
27514 echo "$as_me:27514: \$? = $ac_status" >&5
27515 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27516 { (eval echo "$as_me:27516: \"$ac_try\"") >&5
27517 (eval $ac_try) 2>&5
27518 ac_status=$?
27519 echo "$as_me:27519: \$? = $ac_status" >&5
27520 (exit "$ac_status"); }; }; then
27521 cf_cv_type_of_bool=`cat cf_test.out`
27522 if test -z "$cf_cv_type_of_bool"; then
27523 cf_cv_type_of_bool=unknown
27524 fi
27525 else
27526 echo "$as_me: program exited with status $ac_status" >&5
27527 echo "$as_me: failed program was:" >&5
27528 cat "conftest.$ac_ext" >&5
27529 cf_cv_type_of_bool=unknown
27530 fi
27531 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27532 fi
27533 rm -f cf_test.out
27534
27535 fi
27536 echo "$as_me:27536: result: $cf_cv_type_of_bool" >&5
27537 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27538
27539 if test "$cf_cv_type_of_bool" = unknown ; then
27540 case .$NCURSES_BOOL in
27541 (.auto|.) NCURSES_BOOL=unsigned;;
27542 esac
27543 { echo "$as_me:27543: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27544 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27545 cf_cv_type_of_bool=$NCURSES_BOOL
27546 fi
27547
27548 fi
27549 fi
27550
27551 # If the C compiler did not declare bool, and we did not determine that the C++
27552 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27553 # ncurses library use the same type as C++ bool. Note that this allows one to
27554 # specify the type of bool in a configure-script option and postpone
27555 # integration with the C++ compiler provided that the types are compatible.
27556 USE_CXX_BOOL=1
27557 if test "$USE_BUILTIN_BOOL" = 1
27558 then
27559 # oops: C has a bool. Unlikely, but C++ could differ.
27560 USE_CXX_BOOL=0
27561 elif test "$cf_cv_builtin_bool" = no
27562 then
27563 # C++ has no bool
27564 USE_CXX_BOOL=0
27565 else
27566 # this is the normal case
27567 USE_CXX_BOOL='defined(__cplusplus)'
27568 fi
27569
27570 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27571
27572 if test "$cf_with_ada" != "no" ; then
27573 if test "$with_libtool" != "no"; then
27574 { echo "$as_me:27574: WARNING: libtool does not support Ada - disabling feature" >&5
27575 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27576 cf_with_ada=no
27577 fi
27578 fi
27579
27580 if test "$cf_with_ada" != "no" ; then
27581 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27582
27583 ADAFLAGS="$ADAFLAGS -gnatpn"
27584
27585 echo "$as_me:27585: checking optimization options for ADAFLAGS" >&5
27586 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27587 case "$CFLAGS" in
27588 (*-g*)
27589
27590 ADAFLAGS="$ADAFLAGS -g"
27591
27592 ;;
27593 esac
27594 case "$CFLAGS" in
27595 (*-O*)
27596 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
27597
27598 ADAFLAGS="$ADAFLAGS $cf_O_flag"
27599
27600 ;;
27601 esac
27602 echo "$as_me:27602: result: $ADAFLAGS" >&5
27603 echo "${ECHO_T}$ADAFLAGS" >&6
27604
27605 echo "$as_me:27605: checking if GNATPREP supports -T option" >&5
27606 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27607 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27608 echo $ECHO_N "(cached) $ECHO_C" >&6
27609 else
27610
27611 cf_cv_gnatprep_opt_t=no
27612 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27613
27614 fi
27615 echo "$as_me:27615: result: $cf_cv_gnatprep_opt_t" >&5
27616 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27617 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27618
27619 echo "$as_me:27619: checking if GNAT supports generics" >&5
27620 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27621 case "$cf_cv_gnat_version" in
27622 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27623 cf_gnat_generics=yes
27624 ;;
27625 (*)
27626 cf_gnat_generics=no
27627 ;;
27628 esac
27629 echo "$as_me:27629: result: $cf_gnat_generics" >&5
27630 echo "${ECHO_T}$cf_gnat_generics" >&6
27631
27632 if test "$cf_gnat_generics" = yes
27633 then
27634 cf_compile_generics=generics
27635 cf_generic_objects="\${GENOBJS}"
27636 else
27637 cf_compile_generics=
27638 cf_generic_objects=
27639 fi
27640
27641 echo "$as_me:27641: checking if GNAT supports SIGINT" >&5
27642 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27643 if test "${cf_cv_gnat_sigint+set}" = set; then
27644 echo $ECHO_N "(cached) $ECHO_C" >&6
27645 else
27646
27647 rm -rf ./conftest* ./*~conftest*
27648 cat >>conftest.ads <<CF_EOF
27649 with Ada.Interrupts.Names;
27650
27651 package ConfTest is
27652
27653 pragma Warnings (Off); -- the next pragma exists since 3.11p
27654 pragma Unreserve_All_Interrupts;
27655 pragma Warnings (On);
27656
27657 protected Process is
27658 procedure Stop;
27659 function Continue return Boolean;
27660 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27661 private
27662 Done : Boolean := False;
27663 end Process;
27664
27665 end ConfTest;
27666 CF_EOF
27667 cat >>conftest.adb <<CF_EOF
27668 package body ConfTest is
27669 protected body Process is
27670 procedure Stop is
27671 begin
27672 Done := True;
27673 end Stop;
27674 function Continue return Boolean is
27675 begin
27676 return not Done;
27677 end Continue;
27678 end Process;
27679 end ConfTest;
27680 CF_EOF
27681 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27682 cf_cv_gnat_sigint=yes
27683 else
27684 cf_cv_gnat_sigint=no
27685 fi
27686 rm -rf ./conftest* ./*~conftest*
27687
27688 fi
27689 echo "$as_me:27689: result: $cf_cv_gnat_sigint" >&5
27690 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27691
27692 if test "$cf_cv_gnat_sigint" = yes ; then
27693 USE_GNAT_SIGINT=""
27694 else
27695 USE_GNAT_SIGINT="#"
27696 fi
27697
27698 cf_gnat_libraries=no
27699 cf_gnat_projects=no
27700
27701 if test "$enable_gnat_projects" != no ; then
27702 echo "$as_me:27702: checking if GNAT supports project files" >&5
27703 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27704 case "$cf_cv_gnat_version" in
27705 (3.[0-9]*)
27706 ;;
27707 (*)
27708 case "$cf_cv_system_name" in
27709 (cygwin*|msys*)
27710 ;;
27711 (*)
27712 rm -rf ./conftest* ./*~conftest*
27713 if mkdir conftest.src conftest.bin conftest.lib
27714 then
27715 cd conftest.src
27716 rm -rf ./conftest* ./*~conftest*
27717 cat >>library.gpr <<CF_EOF
27718 project Library is
27719 Kind := External ("LIB_KIND");
27720 for Library_Name use "ConfTest";
27721 for Object_Dir use ".";
27722 for Library_ALI_Dir use External("LIBRARY_DIR");
27723 for Library_Version use External ("SONAME");
27724 for Library_Kind use Kind;
27725 for Library_Dir use External("BUILD_DIR");
27726 Source_Dir := External ("SOURCE_DIR");
27727 for Source_Dirs use (Source_Dir);
27728 end Library;
27729 CF_EOF
27730 cat >>confpackage.ads <<CF_EOF
27731 package ConfPackage is
27732 procedure conftest;
27733 end ConfPackage;
27734 CF_EOF
27735 cat >>confpackage.adb <<CF_EOF
27736 with Text_IO;
27737 package body ConfPackage is
27738 procedure conftest is
27739 begin
27740 Text_IO.Put ("Hello World");
27741 Text_IO.New_Line;
27742 end conftest;
27743 end ConfPackage;
27744 CF_EOF
27745 if ( "$cf_ada_make" $ADAFLAGS \
27746 -Plibrary.gpr \
27747 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27748 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27749 -XSOURCE_DIR="`pwd`" \
27750 -XSONAME=libConfTest.so.1 \
27751 -XLIB_KIND=static 1>&5 2>&1 ) ; then
27752 cf_gnat_projects=yes
27753 fi
27754 cd ..
27755 fi
27756 if test -f conftest.lib/confpackage.ali
27757 then
27758 cf_gnat_libraries=yes
27759 fi
27760 rm -rf ./conftest* ./*~conftest*
27761 ;;
27762 esac
27763 ;;
27764 esac
27765 echo "$as_me:27765: result: $cf_gnat_projects" >&5
27766 echo "${ECHO_T}$cf_gnat_projects" >&6
27767 fi # enable_gnat_projects
27768
27769 if test "$cf_gnat_projects" = yes
27770 then
27771 echo "$as_me:27771: checking if GNAT supports libraries" >&5
27772 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27773 echo "$as_me:27773: result: $cf_gnat_libraries" >&5
27774 echo "${ECHO_T}$cf_gnat_libraries" >&6
27775 fi
27776
27777 USE_OLD_MAKERULES=""
27778 USE_GNAT_PROJECTS="#"
27779 USE_GNAT_MAKE_GPR="#"
27780 USE_GNAT_GPRBUILD="#"
27781
27782 if test "$cf_gnat_projects" = yes
27783 then
27784 USE_OLD_MAKERULES="#"
27785 USE_GNAT_PROJECTS=""
27786 if test "$cf_cv_VERSION_GPRBUILD" != no
27787 then
27788 USE_GNAT_GPRBUILD=""
27789 elif test "$cf_cv_VERSION_GNATMAKE" != no
27790 then
27791 USE_GNAT_MAKE_GPR=""
27792 else
27793 { echo "$as_me:27793: WARNING: use old makefile rules since tools are missing" >&5
27794 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27795 fi
27796 fi
27797
27798 if test "$cf_gnat_libraries" = yes
27799 then
27800 USE_GNAT_LIBRARIES=""
27801 else
27802 USE_GNAT_LIBRARIES="#"
27803 fi
27804
27805 echo "$as_me:27805: checking for Ada95 compiler" >&5
27806 echo $ECHO_N "checking for Ada95 compiler... $ECHO_C" >&6
27807
27808 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27809 if test "${with_ada_compiler+set}" = set; then
27810 withval="$with_ada_compiler"
27811 cf_ada_compiler=$withval
27812 else
27813 cf_ada_compiler=gnatmake
27814 fi;
27815
27816 echo "$as_me:27816: result: $cf_ada_compiler" >&5
27817 echo "${ECHO_T}$cf_ada_compiler" >&6
27818
27819 cf_ada_package=terminal_interface
27820
27821 echo "$as_me:27821: checking for Ada95 include directory" >&5
27822 echo $ECHO_N "checking for Ada95 include directory... $ECHO_C" >&6
27823
27824 # Check whether --with-ada-include or --without-ada-include was given.
27825 if test "${with_ada_include+set}" = set; then
27826 withval="$with_ada_include"
27827
27828 else
27829 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27830 fi; if test -n "$prefix/share/ada/adainclude" ; then
27831
27832 if test "x$prefix" != xNONE; then
27833 cf_path_syntax="$prefix"
27834 else
27835 cf_path_syntax="$ac_default_prefix"
27836 fi
27837
27838 case "x$withval" in
27839 (x\$\(*\)*|x\'*\'*)
27840 ;;
27841 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
27842 ;;
27843 (x\$\{*prefix\}*|x\$\{*dir\}*)
27844 eval withval="$withval"
27845 case "x$withval" in
27846 (xNONE/*)
27847 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27848 ;;
27849 esac
27850 ;;
27851 (xno|xNONE/*)
27852 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27853 ;;
27854 (*)
27855 { { echo "$as_me:27855: error: expected a pathname, not \"$withval\"" >&5
27856 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27857 { (exit 1); exit 1; }; }
27858 ;;
27859 esac
27860
27861 fi
27862 eval ADA_INCLUDE="$withval"
27863
27864 echo "$as_me:27864: result: $ADA_INCLUDE" >&5
27865 echo "${ECHO_T}$ADA_INCLUDE" >&6
27866
27867 echo "$as_me:27867: checking for Ada95 object directory" >&5
27868 echo $ECHO_N "checking for Ada95 object directory... $ECHO_C" >&6
27869
27870 # Check whether --with-ada-objects or --without-ada-objects was given.
27871 if test "${with_ada_objects+set}" = set; then
27872 withval="$with_ada_objects"
27873
27874 else
27875 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27876 fi; if test -n "$prefix/lib/ada/adalib" ; then
27877
27878 if test "x$prefix" != xNONE; then
27879 cf_path_syntax="$prefix"
27880 else
27881 cf_path_syntax="$ac_default_prefix"
27882 fi
27883
27884 case "x$withval" in
27885 (x\$\(*\)*|x\'*\'*)
27886 ;;
27887 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
27888 ;;
27889 (x\$\{*prefix\}*|x\$\{*dir\}*)
27890 eval withval="$withval"
27891 case "x$withval" in
27892 (xNONE/*)
27893 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27894 ;;
27895 esac
27896 ;;
27897 (xno|xNONE/*)
27898 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27899 ;;
27900 (*)
27901 { { echo "$as_me:27901: error: expected a pathname, not \"$withval\"" >&5
27902 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27903 { (exit 1); exit 1; }; }
27904 ;;
27905 esac
27906
27907 fi
27908 eval ADA_OBJECTS="$withval"
27909
27910 echo "$as_me:27910: result: $ADA_OBJECTS" >&5
27911 echo "${ECHO_T}$ADA_OBJECTS" >&6
27912
27913 echo "$as_me:27913: checking whether to build an Ada95 shared library" >&5
27914 echo $ECHO_N "checking whether to build an Ada95 shared library... $ECHO_C" >&6
27915
27916 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27917 if test "${with_ada_sharedlib+set}" = set; then
27918 withval="$with_ada_sharedlib"
27919 with_ada_sharedlib=$withval
27920 else
27921 with_ada_sharedlib=no
27922 fi;
27923 cf_ada_sharedlib_warn=no
27924
27925 if test "x$with_ada_sharedlib" != xno
27926 then
27927 if test "x$cf_gnat_projects" != xyes
27928 then
27929 with_ada_sharedlib=no
27930 cf_ada_sharedlib_warn=yes
27931 fi
27932 fi
27933
27934 echo "$as_me:27934: result: $with_ada_sharedlib" >&5
27935 echo "${ECHO_T}$with_ada_sharedlib" >&6
27936 if test "x$cf_ada_sharedlib_warn" != xno
27937 then
27938 { echo "$as_me:27938: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&5
27939 echo "$as_me: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&2;}
27940 fi
27941
27942 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27943 MAKE_ADA_SHAREDLIB="#"
27944
27945 if test "x$with_ada_sharedlib" != xno
27946 then
27947 MAKE_ADA_SHAREDLIB=
27948 if test "x$with_ada_sharedlib" != xyes
27949 then
27950 ADA_SHAREDLIB="$with_ada_sharedlib"
27951 fi
27952 fi
27953
27954 # allow the Ada binding to be renamed
27955
27956 echo "$as_me:27956: checking for Ada95 curses library name" >&5
27957 echo $ECHO_N "checking for Ada95 curses library name... $ECHO_C" >&6
27958
27959 # Check whether --with-ada-libname or --without-ada-libname was given.
27960 if test "${with_ada_libname+set}" = set; then
27961 withval="$with_ada_libname"
27962 ADA_LIBNAME=$withval
27963 else
27964 ADA_LIBNAME=AdaCurses
27965 fi;
27966 case "x$ADA_LIBNAME" in
27967 (x|xyes|xno)
27968 ADA_LIBNAME=AdaCurses
27969 ;;
27970 esac
27971
27972 echo "$as_me:27972: result: $ADA_LIBNAME" >&5
27973 echo "${ECHO_T}$ADA_LIBNAME" >&6
27974
27975 fi
27976 fi
27977 else
27978 cf_with_ada=no
27979 fi
27980
27981 # do this "late" to avoid conflict with header-checks
27982 if test "x$with_widec" = xyes ; then
27983 echo "$as_me:27983: checking for wchar_t" >&5
27984 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27985 if test "${ac_cv_type_wchar_t+set}" = set; then
27986 echo $ECHO_N "(cached) $ECHO_C" >&6
27987 else
27988 cat >"conftest.$ac_ext" <<_ACEOF
27989 #line 27989 "configure"
27990 #include "confdefs.h"
27991 $ac_includes_default
27992 int
27993 main (void)
27994 {
27995 if ((wchar_t *) 0)
27996 return 0;
27997 if (sizeof (wchar_t))
27998 return 0;
27999 ;
28000 return 0;
28001 }
28002 _ACEOF
28003 rm -f "conftest.$ac_objext"
28004 if { (eval echo "$as_me:28004: \"$ac_compile\"") >&5
28005 (eval $ac_compile) 2>&5
28006 ac_status=$?
28007 echo "$as_me:28007: \$? = $ac_status" >&5
28008 (exit "$ac_status"); } &&
28009 { ac_try='test -s "conftest.$ac_objext"'
28010 { (eval echo "$as_me:28010: \"$ac_try\"") >&5
28011 (eval $ac_try) 2>&5
28012 ac_status=$?
28013 echo "$as_me:28013: \$? = $ac_status" >&5
28014 (exit "$ac_status"); }; }; then
28015 ac_cv_type_wchar_t=yes
28016 else
28017 echo "$as_me: failed program was:" >&5
28018 cat "conftest.$ac_ext" >&5
28019 ac_cv_type_wchar_t=no
28020 fi
28021 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28022 fi
28023 echo "$as_me:28023: result: $ac_cv_type_wchar_t" >&5
28024 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
28025
28026 echo "$as_me:28026: checking size of wchar_t" >&5
28027 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
28028 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
28029 echo $ECHO_N "(cached) $ECHO_C" >&6
28030 else
28031 if test "$ac_cv_type_wchar_t" = yes; then
28032 if test "$cross_compiling" = yes; then
28033 # Depending upon the size, compute the lo and hi bounds.
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 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
28042 ;
28043 return 0;
28044 }
28045 _ACEOF
28046 rm -f "conftest.$ac_objext"
28047 if { (eval echo "$as_me:28047: \"$ac_compile\"") >&5
28048 (eval $ac_compile) 2>&5
28049 ac_status=$?
28050 echo "$as_me:28050: \$? = $ac_status" >&5
28051 (exit "$ac_status"); } &&
28052 { ac_try='test -s "conftest.$ac_objext"'
28053 { (eval echo "$as_me:28053: \"$ac_try\"") >&5
28054 (eval $ac_try) 2>&5
28055 ac_status=$?
28056 echo "$as_me:28056: \$? = $ac_status" >&5
28057 (exit "$ac_status"); }; }; then
28058 ac_lo=0 ac_mid=0
28059 while :; do
28060 cat >"conftest.$ac_ext" <<_ACEOF
28061 #line 28061 "configure"
28062 #include "confdefs.h"
28063 $ac_includes_default
28064 int
28065 main (void)
28066 {
28067 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28068 ;
28069 return 0;
28070 }
28071 _ACEOF
28072 rm -f "conftest.$ac_objext"
28073 if { (eval echo "$as_me:28073: \"$ac_compile\"") >&5
28074 (eval $ac_compile) 2>&5
28075 ac_status=$?
28076 echo "$as_me:28076: \$? = $ac_status" >&5
28077 (exit "$ac_status"); } &&
28078 { ac_try='test -s "conftest.$ac_objext"'
28079 { (eval echo "$as_me:28079: \"$ac_try\"") >&5
28080 (eval $ac_try) 2>&5
28081 ac_status=$?
28082 echo "$as_me:28082: \$? = $ac_status" >&5
28083 (exit "$ac_status"); }; }; then
28084 ac_hi=$ac_mid; break
28085 else
28086 echo "$as_me: failed program was:" >&5
28087 cat "conftest.$ac_ext" >&5
28088 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
28089 fi
28090 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28091 done
28092 else
28093 echo "$as_me: failed program was:" >&5
28094 cat "conftest.$ac_ext" >&5
28095 ac_hi=-1 ac_mid=-1
28096 while :; do
28097 cat >"conftest.$ac_ext" <<_ACEOF
28098 #line 28098 "configure"
28099 #include "confdefs.h"
28100 $ac_includes_default
28101 int
28102 main (void)
28103 {
28104 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28105 ;
28106 return 0;
28107 }
28108 _ACEOF
28109 rm -f "conftest.$ac_objext"
28110 if { (eval echo "$as_me:28110: \"$ac_compile\"") >&5
28111 (eval $ac_compile) 2>&5
28112 ac_status=$?
28113 echo "$as_me:28113: \$? = $ac_status" >&5
28114 (exit "$ac_status"); } &&
28115 { ac_try='test -s "conftest.$ac_objext"'
28116 { (eval echo "$as_me:28116: \"$ac_try\"") >&5
28117 (eval $ac_try) 2>&5
28118 ac_status=$?
28119 echo "$as_me:28119: \$? = $ac_status" >&5
28120 (exit "$ac_status"); }; }; then
28121 ac_lo=$ac_mid; break
28122 else
28123 echo "$as_me: failed program was:" >&5
28124 cat "conftest.$ac_ext" >&5
28125 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28126 fi
28127 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28128 done
28129 fi
28130 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28131 # Binary search between lo and hi bounds.
28132 while test "x$ac_lo" != "x$ac_hi"; do
28133 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28134 cat >"conftest.$ac_ext" <<_ACEOF
28135 #line 28135 "configure"
28136 #include "confdefs.h"
28137 $ac_includes_default
28138 int
28139 main (void)
28140 {
28141 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28142 ;
28143 return 0;
28144 }
28145 _ACEOF
28146 rm -f "conftest.$ac_objext"
28147 if { (eval echo "$as_me:28147: \"$ac_compile\"") >&5
28148 (eval $ac_compile) 2>&5
28149 ac_status=$?
28150 echo "$as_me:28150: \$? = $ac_status" >&5
28151 (exit "$ac_status"); } &&
28152 { ac_try='test -s "conftest.$ac_objext"'
28153 { (eval echo "$as_me:28153: \"$ac_try\"") >&5
28154 (eval $ac_try) 2>&5
28155 ac_status=$?
28156 echo "$as_me:28156: \$? = $ac_status" >&5
28157 (exit "$ac_status"); }; }; then
28158 ac_hi=$ac_mid
28159 else
28160 echo "$as_me: failed program was:" >&5
28161 cat "conftest.$ac_ext" >&5
28162 ac_lo=`expr "$ac_mid" + 1`
28163 fi
28164 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28165 done
28166 ac_cv_sizeof_wchar_t=$ac_lo
28167 else
28168 if test "$cross_compiling" = yes; then
28169 { { echo "$as_me:28169: error: cannot run test program while cross compiling" >&5
28170 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28171 { (exit 1); exit 1; }; }
28172 else
28173 cat >"conftest.$ac_ext" <<_ACEOF
28174 #line 28174 "configure"
28175 #include "confdefs.h"
28176 $ac_includes_default
28177 int
28178 main (void)
28179 {
28180 FILE *f = fopen ("conftest.val", "w");
28181 if (!f)
28182 $ac_main_return (1);
28183 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28184 fclose (f);
28185 ;
28186 return 0;
28187 }
28188 _ACEOF
28189 rm -f "conftest$ac_exeext"
28190 if { (eval echo "$as_me:28190: \"$ac_link\"") >&5
28191 (eval $ac_link) 2>&5
28192 ac_status=$?
28193 echo "$as_me:28193: \$? = $ac_status" >&5
28194 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28195 { (eval echo "$as_me:28195: \"$ac_try\"") >&5
28196 (eval $ac_try) 2>&5
28197 ac_status=$?
28198 echo "$as_me:28198: \$? = $ac_status" >&5
28199 (exit "$ac_status"); }; }; then
28200 ac_cv_sizeof_wchar_t=`cat conftest.val`
28201 else
28202 echo "$as_me: program exited with status $ac_status" >&5
28203 echo "$as_me: failed program was:" >&5
28204 cat "conftest.$ac_ext" >&5
28205 fi
28206 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28207 fi
28208 fi
28209 rm -f conftest.val
28210 else
28211 ac_cv_sizeof_wchar_t=0
28212 fi
28213 fi
28214 echo "$as_me:28214: result: $ac_cv_sizeof_wchar_t" >&5
28215 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28216 cat >>confdefs.h <<EOF
28217 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28218 EOF
28219
28220 # cross-compiling to mingw can run into the problem that attempting to
28221 # link with the regex library fails, causing the test to not set this to
28222 # a number. "recent" autoconf does not address this problem either -TD
28223 if test -z "$ac_cv_sizeof_wchar_t"
28224 then
28225 test -n "$verbose" && echo " test failed (assume 2)" 1>&6
28226
28227 echo "${as_me:-configure}:28227: testing test failed (assume 2) ..." 1>&5
28228
28229 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28230 mv confdefs.tmp confdefs.h
28231 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28232 fi
28233 fi
28234
28235 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28236 ### none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28237 ###
28238 ### ticlib modules may be a separate library, otherwise contained in termlib.
28239 ### termlib modules may be a separate library, otherwise contained in ncurses.
28240 ###
28241 ### The of "+" or " " between the tokens controls the way the script
28242 ### chooses to split module lists into libraries.
28243 ###
28244 ### (see CF_LIB_RULES).
28245 echo "$as_me:28245: checking for library subsets" >&5
28246 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28247 LIB_SUBSETS=
28248
28249 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28250 LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28251 if test "$with_ticlib" != no ; then
28252 LIB_SUBSETS="${LIB_SUBSETS} "
28253 else
28254 LIB_SUBSETS="${LIB_SUBSETS}+"
28255 fi
28256 fi
28257
28258 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28259 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28260
28261 if test "$with_termlib" != no ; then
28262 LIB_SUBSETS="${LIB_SUBSETS} "
28263 else
28264 LIB_SUBSETS="${LIB_SUBSETS}+"
28265 fi
28266
28267 LIB_SUBSETS="${LIB_SUBSETS}base"
28268
28269 # Most term-driver calls are to tinfo, but some like init_pair are to the
28270 # base library (so it resides in base).
28271 if test "$with_term_driver" != no ; then
28272 LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28273 case "$cf_cv_system_name" in
28274 (*mingw32*|*mingw64*)
28275 if test "x$with_named_pipes" = xyes ; then
28276 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28277 else
28278 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28279 fi
28280 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28281 ;;
28282 (*msys*|*cygwin*)
28283 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_msys2"
28284 ;;
28285 (*)
28286 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28287 ;;
28288 esac
28289 elif test "x$with_named_pipes" = xyes ; then
28290 case "$cf_cv_system_name" in
28291 (*mingw32*|*mingw64*)
28292 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28293 ;;
28294 (*)
28295 ;;
28296 esac
28297 fi
28298
28299 test "x$with_widec" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28300 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28301
28302 echo "$as_me:28302: result: $LIB_SUBSETS" >&5
28303 echo "${ECHO_T}$LIB_SUBSETS" >&6
28304
28305 ### Construct the list of include-directories to be generated
28306
28307 if test "$srcdir" != "."; then
28308 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28309 fi
28310 CPPFLAGS="-I../include $CPPFLAGS"
28311 if test "$srcdir" != "."; then
28312 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28313 fi
28314 CPPFLAGS="-I. $CPPFLAGS"
28315
28316 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28317 if test "$srcdir" != "."; then
28318 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28319 fi
28320 if test "$GCC" != yes; then
28321 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28322 elif test "$includedir" != "/usr/include"; then
28323 if test "$includedir" = '${prefix}/include' ; then
28324 if test x$prefix != x/usr ; then
28325 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28326 fi
28327 else
28328 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28329 fi
28330 fi
28331
28332 ### Build up pieces for makefile rules
28333 echo "$as_me:28333: checking default library suffix" >&5
28334 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28335
28336 case $DFT_LWR_MODEL in
28337 (libtool) DFT_ARG_SUFFIX='' ;;
28338 (normal) DFT_ARG_SUFFIX='' ;;
28339 (debug) DFT_ARG_SUFFIX='_g' ;;
28340 (profile) DFT_ARG_SUFFIX='_p' ;;
28341 (shared) DFT_ARG_SUFFIX='' ;;
28342 esac
28343 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28344 echo "$as_me:28344: result: $DFT_ARG_SUFFIX" >&5
28345 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28346
28347 echo "$as_me:28347: checking default library-dependency suffix" >&5
28348 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28349
28350 case X$DFT_LWR_MODEL in
28351 (Xlibtool)
28352 DFT_LIB_SUFFIX='.la'
28353 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28354 ;;
28355 (Xdebug)
28356 case "$cf_cv_system_name" in
28357 (*-msvc*)
28358 DFT_LIB_SUFFIX='_g.lib'
28359 ;;
28360 (*)
28361 DFT_LIB_SUFFIX='_g.a'
28362 ;;
28363 esac
28364 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28365 ;;
28366 (Xprofile)
28367 case "$cf_cv_system_name" in
28368 (*-msvc*)
28369 DFT_LIB_SUFFIX='_p.lib'
28370 ;;
28371 (*)
28372 DFT_LIB_SUFFIX='_p.a'
28373 ;;
28374 esac
28375 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28376 ;;
28377 (Xshared)
28378 case "$cf_cv_system_name" in
28379 (aix[5-7]*)
28380 DFT_LIB_SUFFIX='.so'
28381 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28382 ;;
28383 (*-msvc*)
28384 DFT_LIB_SUFFIX='.dll'
28385 DFT_DEP_SUFFIX='.dll.lib'
28386 ;;
28387 (cygwin*|msys*|mingw*)
28388 DFT_LIB_SUFFIX='.dll'
28389 DFT_DEP_SUFFIX='.dll.a'
28390 ;;
28391 (darwin*)
28392 DFT_LIB_SUFFIX='.dylib'
28393 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28394 ;;
28395 (hpux*)
28396 case "$target" in
28397 (ia64*)
28398 DFT_LIB_SUFFIX='.so'
28399 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28400 ;;
28401 (*)
28402 DFT_LIB_SUFFIX='.sl'
28403 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28404 ;;
28405 esac
28406 ;;
28407 (*)
28408 DFT_LIB_SUFFIX='.so'
28409 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28410 ;;
28411 esac
28412 ;;
28413 (*)
28414 case "$target" in
28415 (*-msvc*)
28416 DFT_LIB_SUFFIX='.lib'
28417 ;;
28418 (*)
28419 DFT_LIB_SUFFIX='.a'
28420 ;;
28421 esac
28422 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28423 ;;
28424 esac
28425 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28426 then
28427 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28428 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28429 fi
28430 echo "$as_me:28430: result: $DFT_DEP_SUFFIX" >&5
28431 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28432
28433 echo "$as_me:28433: checking default object directory" >&5
28434 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28435
28436 case $DFT_LWR_MODEL in
28437 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
28438 (normal) DFT_OBJ_SUBDIR='objects' ;;
28439 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
28440 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28441 (shared)
28442 case "$cf_cv_system_name" in
28443 (cygwin|msys)
28444 DFT_OBJ_SUBDIR='objects' ;;
28445 (*)
28446 DFT_OBJ_SUBDIR='obj_s' ;;
28447 esac
28448 esac
28449 echo "$as_me:28449: result: $DFT_OBJ_SUBDIR" >&5
28450 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28451
28452 if test "x$cf_with_cxx" = xyes ; then
28453 echo "$as_me:28453: checking c++ library-dependency suffix" >&5
28454 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28455 if test "$with_libtool" != "no"; then
28456 # libtool thinks it can make c++ shared libraries (perhaps only g++)
28457 CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28458 elif test "$with_shared_cxx" != "no"; then
28459 # also for g++ users...
28460 CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28461 else
28462 # we normally make a static library because C/C++ library rules differ
28463
28464 case Xnormal in
28465 (Xlibtool)
28466 CXX_LIB_SUFFIX='.la'
28467 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28468 ;;
28469 (Xdebug)
28470 case "$cf_cv_system_name" in
28471 (*-msvc*)
28472 CXX_LIB_SUFFIX='_g.lib'
28473 ;;
28474 (*)
28475 CXX_LIB_SUFFIX='_g.a'
28476 ;;
28477 esac
28478 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28479 ;;
28480 (Xprofile)
28481 case "$cf_cv_system_name" in
28482 (*-msvc*)
28483 CXX_LIB_SUFFIX='_p.lib'
28484 ;;
28485 (*)
28486 CXX_LIB_SUFFIX='_p.a'
28487 ;;
28488 esac
28489 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28490 ;;
28491 (Xshared)
28492 case "$cf_cv_system_name" in
28493 (aix[5-7]*)
28494 CXX_LIB_SUFFIX='.so'
28495 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28496 ;;
28497 (*-msvc*)
28498 CXX_LIB_SUFFIX='.dll'
28499 CXX_DEP_SUFFIX='.dll.lib'
28500 ;;
28501 (cygwin*|msys*|mingw*)
28502 CXX_LIB_SUFFIX='.dll'
28503 CXX_DEP_SUFFIX='.dll.a'
28504 ;;
28505 (darwin*)
28506 CXX_LIB_SUFFIX='.dylib'
28507 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28508 ;;
28509 (hpux*)
28510 case "$target" in
28511 (ia64*)
28512 CXX_LIB_SUFFIX='.so'
28513 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28514 ;;
28515 (*)
28516 CXX_LIB_SUFFIX='.sl'
28517 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28518 ;;
28519 esac
28520 ;;
28521 (*)
28522 CXX_LIB_SUFFIX='.so'
28523 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28524 ;;
28525 esac
28526 ;;
28527 (*)
28528 case "$target" in
28529 (*-msvc*)
28530 CXX_LIB_SUFFIX='.lib'
28531 ;;
28532 (*)
28533 CXX_LIB_SUFFIX='.a'
28534 ;;
28535 esac
28536 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28537 ;;
28538 esac
28539 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28540 then
28541 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28542 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28543 fi
28544
28545 fi
28546 echo "$as_me:28546: result: $CXX_LIB_SUFFIX" >&5
28547 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28548
28549 fi
28550
28551 # do not want -ldl in build except as needed for -lncurses dependency
28552 if test "x$with_dlsym" = xyes ; then
28553 if test "$DFT_LWR_MODEL" = shared || \
28554 test "$DFT_LWR_MODEL" = libtool ; then
28555
28556 # remove dl library from $LIBS
28557 LIBS=`echo "$LIBS" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'`
28558
28559 fi
28560 fi
28561 ### Set up low-level terminfo dependencies for makefiles.
28562
28563 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28564 # do not need libdl
28565 TICS_LIST=
28566 if test "x$with_dlsym" = xyes ; then
28567
28568 # remove dl library from $SHLIB_LIST
28569 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'`
28570
28571 fi
28572
28573 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28574 ABI_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28575 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28576 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28577 then
28578 USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28579 fi
28580
28581 if test "$with_ticlib" != no ; then
28582
28583 if test "x$with_ticlib" != xyes ; then
28584 TICS_NAME=$with_ticlib
28585 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${ABI_SUFFIX}//"`"
28586 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28587 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28588 TICS_LIB_SUFFIX="${with_ticlib}"
28589 else
28590 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28591 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28592 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28593 TICS_LIB_SUFFIX="${TICS_NAME}${ABI_SUFFIX}"
28594 fi
28595 TICS_LDFLAGS="-L${LIB_DIR}"
28596 TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28597 else
28598 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28599 TICS_LDFLAGS="-L${LIB_DIR}"
28600 TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28601 fi
28602
28603 if test "$with_termlib" != no ; then
28604
28605 if test "x$with_termlib" != xyes ; then
28606 TINFO_NAME=$with_termlib
28607 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${ABI_SUFFIX}//"`"
28608 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28609 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28610 TINFO_LIB_SUFFIX="${with_termlib}"
28611 else
28612 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28613 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28614 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28615 TINFO_LIB_SUFFIX="${TINFO_NAME}${ABI_SUFFIX}"
28616 fi
28617
28618 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28619 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28620 if test "$DFT_LWR_MODEL" = "libtool"; then
28621 TEST_ARGS="${TEST_DEPS}"
28622 TEST_ARG2="${TEST_DEP2}"
28623 TINFO_LDFLAGS="-L${LIB_DIR}"
28624 TINFO_LIBS="$TEST_ARGS"
28625 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28626 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28627 else
28628 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28629 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28630 if test "x$with_term_driver" != xno ; then
28631 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28632 TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28633 TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28634 else
28635 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28636 TINFO_LIBS="$TEST_ARGS"
28637 fi
28638 TINFO_LDFLAGS="-L${LIB_DIR}"
28639 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28640 fi
28641 else
28642 # the next lines are needed for linking libtic over libncurses
28643 TINFO_NAME=${LIB_NAME}
28644 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28645 TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28646 if test "x$with_tic_depends" = xyes ; then
28647 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28648 else
28649 TICS_LIST="$SHLIB_LIST"
28650 fi
28651
28652 TINFO_LDFLAGS="-L${LIB_DIR}"
28653 TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28654 fi
28655
28656 if test "$DFT_LWR_MODEL" = shared ; then
28657 case "$cf_cv_system_name" in
28658 (cygwin*|msys*)
28659 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28660 TINFO_SUFFIX=.dll
28661 ;;
28662 esac
28663 fi
28664
28665 if test "x$with_dlsym" = xyes ; then
28666
28667 # remove dl library from $TICS_LIST
28668 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'`
28669
28670 fi
28671
28672 if test "$DFT_LWR_MODEL" = "libtool"; then
28673 OBJEXT=lo
28674 fi
28675
28676 # needed for Ada95
28677 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28678
28679 case "$DFT_LWR_MODEL" in
28680 (normal|debug|profile)
28681
28682 if test "$GCC" = yes ; then
28683 case "$cf_cv_system_name" in
28684 (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28685 LDFLAGS_STATIC=
28686 LDFLAGS_SHARED=
28687 ;;
28688 (*) # normally, except when broken
28689 LDFLAGS_STATIC=-static
28690 LDFLAGS_SHARED=-dynamic
28691 ;;
28692 esac
28693 else
28694 case "$cf_cv_system_name" in
28695 (aix[4-7]*) # from ld man page
28696 LDFLAGS_STATIC=-bstatic
28697 LDFLAGS_SHARED=-bdynamic
28698 ;;
28699 (hpux*) # from ld man page for hpux10.20, hpux11.11
28700 # We could also use just "archive" and "shared".
28701 LDFLAGS_STATIC=-Wl,-a,archive_shared
28702 LDFLAGS_SHARED=-Wl,-a,shared_archive
28703 ;;
28704 (irix*) # from ld man page IRIX64
28705 LDFLAGS_STATIC=-Bstatic
28706 LDFLAGS_SHARED=-Bdynamic
28707 ;;
28708 (osf[45]*) # from ld man page osf4.0d, osf5.1
28709 # alternative "-oldstyle_liblookup" (not in cc man page)
28710 LDFLAGS_STATIC=-noso
28711 LDFLAGS_SHARED=-so_archive
28712 ;;
28713 (solaris2*)
28714 LDFLAGS_STATIC=-Bstatic
28715 LDFLAGS_SHARED=-Bdynamic
28716 ;;
28717 esac
28718 fi
28719
28720 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28721 then
28722 echo "$as_me:28722: checking if linker supports switching between static/dynamic" >&5
28723 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28724
28725 rm -f libconftest.a
28726 cat >conftest.$ac_ext <<EOF
28727 #line 28727 "configure"
28728 #include <stdio.h>
28729 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28730 EOF
28731 if { (eval echo "$as_me:28731: \"$ac_compile\"") >&5
28732 (eval $ac_compile) 2>&5
28733 ac_status=$?
28734 echo "$as_me:28734: \$? = $ac_status" >&5
28735 (exit "$ac_status"); } ; then
28736 ( $AR $ARFLAGS libconftest.a conftest.$OBJEXT ) 2>&5 1>/dev/null
28737 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28738 fi
28739 rm -f conftest.*
28740
28741 cf_save_LIBS="$LIBS"
28742
28743 LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28744 cat >"conftest.$ac_ext" <<_ACEOF
28745 #line 28745 "configure"
28746 #include "confdefs.h"
28747
28748 #line 28748 "configure"
28749 #include <stdio.h>
28750 int cf_ldflags_static(FILE *fp);
28751
28752 int
28753 main (void)
28754 {
28755
28756 return cf_ldflags_static(stdin);
28757
28758 ;
28759 return 0;
28760 }
28761 _ACEOF
28762 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28763 if { (eval echo "$as_me:28763: \"$ac_link\"") >&5
28764 (eval $ac_link) 2>&5
28765 ac_status=$?
28766 echo "$as_me:28766: \$? = $ac_status" >&5
28767 (exit "$ac_status"); } &&
28768 { ac_try='test -s "conftest$ac_exeext"'
28769 { (eval echo "$as_me:28769: \"$ac_try\"") >&5
28770 (eval $ac_try) 2>&5
28771 ac_status=$?
28772 echo "$as_me:28772: \$? = $ac_status" >&5
28773 (exit "$ac_status"); }; }; then
28774
28775 # some linkers simply ignore the -dynamic
28776 case x`file "conftest$ac_exeext" 2>/dev/null` in
28777 (*static*)
28778 cf_ldflags_static=no
28779 ;;
28780 (*)
28781 cf_ldflags_static=yes
28782 ;;
28783 esac
28784
28785 else
28786 echo "$as_me: failed program was:" >&5
28787 cat "conftest.$ac_ext" >&5
28788 cf_ldflags_static=no
28789 fi
28790 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28791
28792 rm -f libconftest.*
28793 LIBS="$cf_save_LIBS"
28794
28795 echo "$as_me:28795: result: $cf_ldflags_static" >&5
28796 echo "${ECHO_T}$cf_ldflags_static" >&6
28797
28798 if test "$cf_ldflags_static" != yes
28799 then
28800 LDFLAGS_STATIC=
28801 LDFLAGS_SHARED=
28802 fi
28803 else
28804 LDFLAGS_STATIC=
28805 LDFLAGS_SHARED=
28806 fi
28807
28808 ;;
28809 esac
28810
28811 echo "$as_me:28811: checking where we will install curses.h" >&5
28812 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28813
28814 includesubdir=
28815 if test "$with_overwrite" = no && \
28816 { test "x$includedir" = 'x${prefix}/include' || \
28817 test "x$includedir" = "x${prefix}/include"; }
28818 then
28819 includesubdir="/ncurses${ABI_SUFFIX}"
28820 fi
28821 echo "$as_me:28821: result: ${includedir}${includesubdir}" >&5
28822 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28823
28824 ### Resolve a conflict between normal and wide-curses by forcing applications
28825 ### that will need libutf8 to add it to their configure script.
28826 if test "$with_overwrite" != no ; then
28827 if test "$NCURSES_LIBUTF8" = 1 ; then
28828 NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28829 { echo "$as_me:28829: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28830 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28831 fi
28832 fi
28833 WITH_OVERWRITE=$with_overwrite
28834
28835 ### At least on MinGW a shared library build without libtool
28836 ### requires adding the additional libs to the link list.
28837 case "$cf_cv_system_name" in
28838 (*mingw32*|*mingw64*)
28839 if test "$DFT_LWR_MODEL" != "libtool"; then
28840 SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28841 fi
28842 ;;
28843 *) ;;
28844 esac
28845
28846 ### predefined stuff for the test programs
28847
28848 cat >>confdefs.h <<\EOF
28849 #define HAVE_SLK_COLOR 1
28850 EOF
28851
28852 # pkgsrc uses these
28853
28854 echo "$as_me:28854: checking for desired basename for form library" >&5
28855 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28856
28857 # Check whether --with-form-libname or --without-form-libname was given.
28858 if test "${with_form_libname+set}" = set; then
28859 withval="$with_form_libname"
28860 with_lib_basename=$withval
28861 else
28862 with_lib_basename=form
28863 fi;
28864 FORM_NAME="$with_lib_basename"
28865
28866 case "x$FORM_NAME" in
28867 (x|xno|xnone|xyes)
28868 FORM_NAME=form
28869 ;;
28870 (*)
28871 ;;
28872 esac
28873
28874 echo "$as_me:28874: result: $FORM_NAME" >&5
28875 echo "${ECHO_T}$FORM_NAME" >&6
28876
28877 echo "$as_me:28877: checking for desired basename for menu library" >&5
28878 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28879
28880 # Check whether --with-menu-libname or --without-menu-libname was given.
28881 if test "${with_menu_libname+set}" = set; then
28882 withval="$with_menu_libname"
28883 with_lib_basename=$withval
28884 else
28885 with_lib_basename=menu
28886 fi;
28887 MENU_NAME="$with_lib_basename"
28888
28889 case "x$MENU_NAME" in
28890 (x|xno|xnone|xyes)
28891 MENU_NAME=menu
28892 ;;
28893 (*)
28894 ;;
28895 esac
28896
28897 echo "$as_me:28897: result: $MENU_NAME" >&5
28898 echo "${ECHO_T}$MENU_NAME" >&6
28899
28900 echo "$as_me:28900: checking for desired basename for panel library" >&5
28901 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28902
28903 # Check whether --with-panel-libname or --without-panel-libname was given.
28904 if test "${with_panel_libname+set}" = set; then
28905 withval="$with_panel_libname"
28906 with_lib_basename=$withval
28907 else
28908 with_lib_basename=panel
28909 fi;
28910 PANEL_NAME="$with_lib_basename"
28911
28912 case "x$PANEL_NAME" in
28913 (x|xno|xnone|xyes)
28914 PANEL_NAME=panel
28915 ;;
28916 (*)
28917 ;;
28918 esac
28919
28920 echo "$as_me:28920: result: $PANEL_NAME" >&5
28921 echo "${ECHO_T}$PANEL_NAME" >&6
28922
28923 echo "$as_me:28923: checking for desired basename for cxx library" >&5
28924 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28925
28926 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28927 if test "${with_cxx_libname+set}" = set; then
28928 withval="$with_cxx_libname"
28929 with_lib_basename=$withval
28930 else
28931 with_lib_basename=ncurses++
28932 fi;
28933 CXX_NAME="$with_lib_basename"
28934
28935 case "x$CXX_NAME" in
28936 (x|xno|xnone|xyes)
28937 CXX_NAME=ncurses++
28938 ;;
28939 (*)
28940 ;;
28941 esac
28942
28943 echo "$as_me:28943: result: $CXX_NAME" >&5
28944 echo "${ECHO_T}$CXX_NAME" >&6
28945
28946 ### Construct the list of subdirectories for which we'll customize makefiles
28947 ### with the appropriate compile-rules.
28948
28949 echo "$as_me:28949: checking for src modules" >&5
28950 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28951
28952 # dependencies and linker-arguments for test-programs
28953 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28954 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28955 if test "$DFT_LWR_MODEL" = "libtool"; then
28956 TEST_ARGS="${TEST_DEPS}"
28957 TEST_ARG2="${TEST_DEP2}"
28958 else
28959 TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28960 TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28961 fi
28962
28963 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28964 cf_cv_src_modules=
28965 for cf_dir in $modules_to_build
28966 do
28967 if test -f "$srcdir/$cf_dir/modules" ; then
28968
28969 if test -z "$cf_cv_src_modules"; then
28970 cf_cv_src_modules=$cf_dir
28971 else
28972 cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28973 fi
28974
28975 # Make the ncurses_cfg.h file record the library interface files as
28976 # well. These are header files that are the same name as their
28977 # directory. Ncurses is the only library that does not follow
28978 # that pattern.
28979 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28980
28981 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28982
28983 cat >>confdefs.h <<EOF
28984 #define HAVE_${cf_have_include}_H 1
28985 EOF
28986
28987 cat >>confdefs.h <<EOF
28988 #define HAVE_LIB${cf_have_include} 1
28989 EOF
28990
28991 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28992
28993 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28994
28995 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28996 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28997 if test "$DFT_LWR_MODEL" = "libtool"; then
28998 TEST_ARGS="${TEST_DEPS}"
28999 TEST_ARG2="${TEST_DEP2}"
29000 else
29001 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
29002 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
29003 fi
29004 PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
29005 fi
29006 fi
29007 done
29008 echo "$as_me:29008: result: $cf_cv_src_modules" >&5
29009 echo "${ECHO_T}$cf_cv_src_modules" >&6
29010
29011 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
29012 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
29013
29014 SRC_SUBDIRS=
29015 if test "x$cf_with_manpages" != xno ; then
29016 SRC_SUBDIRS="$SRC_SUBDIRS man"
29017 fi
29018 SRC_SUBDIRS="$SRC_SUBDIRS include"
29019 for cf_dir in $cf_cv_src_modules
29020 do
29021 SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
29022 done
29023 if test "x$cf_with_tests" != "xno" ; then
29024 SRC_SUBDIRS="$SRC_SUBDIRS test"
29025 fi
29026 # always make this, to install the ncurses-config script
29027 SRC_SUBDIRS="$SRC_SUBDIRS misc"
29028 if test "$cf_with_cxx_binding" != no; then
29029 PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
29030 SRC_SUBDIRS="$SRC_SUBDIRS c++"
29031 fi
29032
29033 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
29034 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
29035
29036 ADA_SUBDIRS=
29037 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
29038 SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
29039 ADA_SUBDIRS="gen src"
29040 if test "x$cf_with_tests" != "xno" ; then
29041 ADA_SUBDIRS="$ADA_SUBDIRS samples"
29042 fi
29043 fi
29044
29045 SUB_MAKEFILES=
29046 for cf_dir in $SRC_SUBDIRS
29047 do
29048 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
29049 done
29050
29051 if test -n "$ADA_SUBDIRS"; then
29052 for cf_dir in $ADA_SUBDIRS
29053 do
29054 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
29055 done
29056
29057 fi
29058
29059 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
29060 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
29061 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
29062 SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
29063 fi
29064
29065 DIRS_TO_MAKE="lib"
29066 for cf_item in $cf_list_models
29067 do
29068
29069 case $cf_item in
29070 (libtool) cf_subdir='obj_lo' ;;
29071 (normal) cf_subdir='objects' ;;
29072 (debug) cf_subdir='obj_g' ;;
29073 (profile) cf_subdir='obj_p' ;;
29074 (shared)
29075 case "$cf_cv_system_name" in
29076 (cygwin|msys)
29077 cf_subdir='objects' ;;
29078 (*)
29079 cf_subdir='obj_s' ;;
29080 esac
29081 esac
29082
29083 for cf_item2 in $DIRS_TO_MAKE
29084 do
29085 test "$cf_item2" = "$cf_subdir" && break
29086 done
29087 test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29088 done
29089 for cf_dir in $DIRS_TO_MAKE
29090 do
29091 test ! -d "$cf_dir" && mkdir "$cf_dir"
29092 done
29093
29094 # symbols that differ when compiling Ada95 by itself.
29095 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29096
29097 # values to use as strings
29098
29099 cat >>confdefs.h <<EOF
29100 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29101 EOF
29102
29103 cat >>confdefs.h <<EOF
29104 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29105 EOF
29106
29107 ### Define substitutions for header files to avoid name-pollution
29108
29109 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29110 HAVE_TCGETATTR=1
29111 else
29112 HAVE_TCGETATTR=0
29113 fi
29114
29115 if test "x$ac_cv_header_stdint_h" = xyes ; then
29116 HAVE_STDINT_H=1
29117 else
29118 HAVE_STDINT_H=0
29119 fi
29120
29121 if test "x$ac_cv_header_sgtty_h" = xyes ; then
29122 HAVE_SGTTY_H=1
29123 else
29124 HAVE_SGTTY_H=0
29125 fi
29126
29127 if test "x$ac_cv_header_termio_h" = xyes ; then
29128 HAVE_TERMIO_H=1
29129 else
29130 HAVE_TERMIO_H=0
29131 fi
29132
29133 if test "x$ac_cv_header_termios_h" = xyes ; then
29134 HAVE_TERMIOS_H=1
29135 else
29136 HAVE_TERMIOS_H=0
29137 fi
29138
29139 case "x${ac_cv_header_termios_h}${ac_cv_header_termio_h}${ac_cv_header_sgtty_h}${cf_cv_have_tcgetattr}" in
29140 (*yes*)
29141 ;;
29142 (*)
29143 case "$cf_cv_system_name" in
29144 (*mingw32*|*mingw64*|*-msvc*)
29145 ;;
29146 (*)
29147 { { echo "$as_me:29147: error: No termio/termios/sgtty found" >&5
29148 echo "$as_me: error: No termio/termios/sgtty found" >&2;}
29149 { (exit 1); exit 1; }; }
29150 ;;
29151 esac
29152 ;;
29153 esac
29154
29155 ###############################################################################
29156
29157 # Extract the first word of "tbl", so it can be a program name with args.
29158 set dummy tbl; ac_word=$2
29159 echo "$as_me:29159: checking for $ac_word" >&5
29160 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
29161 if test "${ac_cv_path_NROFF_TBL+set}" = set; then
29162 echo $ECHO_N "(cached) $ECHO_C" >&6
29163 else
29164 case $NROFF_TBL in
29165 [\\/]* | ?:[\\/]*)
29166 ac_cv_path_NROFF_TBL="$NROFF_TBL" # Let the user override the test with a path.
29167 ;;
29168 *)
29169 ac_save_IFS=$IFS; IFS=$ac_path_separator
29170 ac_dummy="$PATH"
29171 for ac_dir in $ac_dummy; do
29172 IFS=$ac_save_IFS
29173 test -z "$ac_dir" && ac_dir=.
29174 if $as_executable_p "$ac_dir/$ac_word"; then
29175 ac_cv_path_NROFF_TBL="$ac_dir/$ac_word"
29176 echo "$as_me:29176: found $ac_dir/$ac_word" >&5
29177 break
29178 fi
29179 done
29180
29181 ;;
29182 esac
29183 fi
29184 NROFF_TBL=$ac_cv_path_NROFF_TBL
29185
29186 if test -n "$NROFF_TBL"; then
29187 echo "$as_me:29187: result: $NROFF_TBL" >&5
29188 echo "${ECHO_T}$NROFF_TBL" >&6
29189 else
29190 echo "$as_me:29190: result: no" >&5
29191 echo "${ECHO_T}no" >&6
29192 fi
29193
29194 echo "$as_me:29194: checking if $NROFF_TBL supports 'x' column modifier" >&5
29195 echo $ECHO_N "checking if $NROFF_TBL supports 'x' column modifier... $ECHO_C" >&6
29196 if test "${cf_cv_tbl_x_option_okay+set}" = set; then
29197 echo $ECHO_N "(cached) $ECHO_C" >&6
29198 else
29199
29200 if test "$cross_compiling" = yes ; then
29201 cf_cv_tbl_x_option_okay=unknown
29202 else
29203 cf_cv_tbl_x_option_okay=no
29204 cat > conftest <<-CF_EOF
29205 .TS
29206 L.
29207 table cell
29208 .TE
29209 CF_EOF
29210 if $NROFF_TBL < conftest > /dev/null 2>&1
29211 then
29212 cat > conftest <<-CF_EOF
29213 .TS
29214 Lx.
29215 table cell
29216 .TE
29217 CF_EOF
29218 if $NROFF_TBL < conftest > /dev/null 2>&1
29219 then
29220 cf_cv_tbl_x_option_okay=yes
29221 fi
29222 else
29223 { { echo "$as_me:29223: error: $NROFF_TBL not available." >&5
29224 echo "$as_me: error: $NROFF_TBL not available." >&2;}
29225 { (exit 1); exit 1; }; }
29226 fi
29227 rm -f conftest
29228 fi
29229
29230 fi
29231 echo "$as_me:29231: result: $cf_cv_tbl_x_option_okay" >&5
29232 echo "${ECHO_T}$cf_cv_tbl_x_option_okay" >&6
29233
29234 TBL_X_OPTION=$cf_cv_tbl_x_option_okay
29235
29236 echo "$as_me:29236: checking format of man pages" >&5
29237 echo $ECHO_N "checking format of man pages... $ECHO_C" >&6
29238
29239 # Check whether --with-manpage-format or --without-manpage-format was given.
29240 if test "${with_manpage_format+set}" = set; then
29241 withval="$with_manpage_format"
29242 MANPAGE_FORMAT=$withval
29243 else
29244 MANPAGE_FORMAT=unknown
29245 fi;
29246
29247 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
29248 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
29249
29250 cf_unknown=
29251
29252 case "$MANPAGE_FORMAT" in
29253 (unknown)
29254 if test -z "$MANPATH" ; then
29255 MANPATH="/usr/man:/usr/share/man"
29256 fi
29257
29258 # look for the 'date' man page (it is most likely to be installed!)
29259 MANPAGE_FORMAT=
29260 cf_preform="no"
29261 cf_catonly="yes"
29262 cf_example="date"
29263
29264 IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
29265 for cf_dir in $MANPATH; do
29266 test -z "$cf_dir" && cf_dir=/usr/man
29267 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
29268 do
29269 cf_test=`echo "$cf_name" | sed -e 's/*//'`
29270 if test "x$cf_test" = "x$cf_name" ; then
29271
29272 case "$cf_name" in
29273 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
29274 (*.xz) MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
29275 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
29276 (*.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
29277 (*.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
29278 (*) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
29279 esac
29280
29281 case "$cf_name" in
29282 ($cf_dir/man*)
29283 cf_catonly=no
29284 ;;
29285 ($cf_dir/cat*)
29286 cf_preform=yes
29287 ;;
29288 esac
29289 break
29290 fi
29291
29292 # if we found a match in either man* or cat*, stop looking
29293 if test -n "$MANPAGE_FORMAT" ; then
29294 cf_found=no
29295 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
29296 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
29297 case "$cf_name" in
29298 ($cf_dir/cat*)
29299 cf_found=yes
29300 ;;
29301 esac
29302 test "$cf_found" = yes && break
29303 fi
29304 done
29305 # only check the first directory in $MANPATH where we find man pages
29306 if test -n "$MANPAGE_FORMAT" ; then
29307 break
29308 fi
29309 done
29310 # if we did not find the example, just assume it is normal
29311 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
29312 IFS="$ac_save_ifs"
29313 ;;
29314 (*)
29315 for cf_option in $MANPAGE_FORMAT; do
29316 case "$cf_option" in
29317 (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
29318 ;;
29319 (*)
29320 cf_unknown="$cf_unknown $cf_option"
29321 ;;
29322 esac
29323 done
29324 ;;
29325 esac
29326
29327 echo "$as_me:29327: result: $MANPAGE_FORMAT" >&5
29328 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
29329 if test -n "$cf_unknown" ; then
29330 { echo "$as_me:29330: WARNING: Unexpected man page format $cf_unknown" >&5
29331 echo "$as_me: WARNING: Unexpected man page format $cf_unknown" >&2;}
29332 fi
29333
29334 cf_manpage_format=no
29335 cf_manpage_inboth=no
29336 cf_manpage_so_strip=
29337 cf_manpage_compress=
29338 cf_manpage_coptions=
29339
29340 for cf_item in $MANPAGE_FORMAT
29341 do
29342 case "$cf_item" in
29343 (catonly)
29344 cf_manpage_format=yes
29345 cf_manpage_inboth=no
29346 ;;
29347 (formatted)
29348 cf_manpage_format=yes
29349 cf_manpage_inboth=yes
29350 ;;
29351 (compress)
29352 cf_manpage_so_strip="Z"
29353 cf_manpage_compress=compress
29354 ;;
29355 (gzip)
29356 cf_manpage_so_strip="gz"
29357 cf_manpage_compress=gzip
29358 cf_manpage_coptions=-n
29359 ;;
29360 (bzip2)
29361 cf_manpage_so_strip="bz2"
29362 cf_manpage_compress=bzip2
29363 ;;
29364 (xz)
29365 cf_manpage_so_strip="xz"
29366 cf_manpage_compress=xz
29367 ;;
29368 esac
29369 done
29370
29371 echo "$as_me:29371: checking for man page renaming" >&5
29372 echo $ECHO_N "checking for man page renaming... $ECHO_C" >&6
29373
29374 # Check whether --with-manpage-renames or --without-manpage-renames was given.
29375 if test "${with_manpage_renames+set}" = set; then
29376 withval="$with_manpage_renames"
29377 MANPAGE_RENAMES=$withval
29378 else
29379 MANPAGE_RENAMES=yes
29380 fi;
29381
29382 case ".$MANPAGE_RENAMES" in
29383 (.no)
29384 ;;
29385 (.|.yes)
29386 # Debian 'man' program?
29387 if test -f /etc/debian_version ; then
29388 MANPAGE_RENAMES=man/man_db.renames
29389 else
29390 MANPAGE_RENAMES=no
29391 fi
29392 ;;
29393 esac
29394
29395 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
29396 MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
29397 elif test "$MANPAGE_RENAMES" = no ; then
29398 :
29399 elif test ! -f "$MANPAGE_RENAMES" ; then
29400 { { echo "$as_me:29400: error: not a filename: $MANPAGE_RENAMES" >&5
29401 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
29402 { (exit 1); exit 1; }; }
29403 fi
29404
29405 echo "$as_me:29405: result: $MANPAGE_RENAMES" >&5
29406 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
29407
29408 echo "$as_me:29408: checking if man page aliases will be installed" >&5
29409 echo $ECHO_N "checking if man page aliases will be installed... $ECHO_C" >&6
29410
29411 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
29412 if test "${with_manpage_aliases+set}" = set; then
29413 withval="$with_manpage_aliases"
29414 MANPAGE_ALIASES=$withval
29415 else
29416 MANPAGE_ALIASES=yes
29417 fi;
29418
29419 echo "$as_me:29419: result: $MANPAGE_ALIASES" >&5
29420 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
29421
29422 case "x$LN_S" in
29423 (xln*)
29424 cf_use_symlinks=yes
29425 ;;
29426 (*)
29427 cf_use_symlinks=no
29428 ;;
29429 esac
29430
29431 MANPAGE_SYMLINKS=no
29432 if test "$MANPAGE_ALIASES" = yes ; then
29433 echo "$as_me:29433: checking if man page symlinks should be used" >&5
29434 echo $ECHO_N "checking if man page symlinks should be used... $ECHO_C" >&6
29435
29436 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
29437 if test "${with_manpage_symlinks+set}" = set; then
29438 withval="$with_manpage_symlinks"
29439 MANPAGE_SYMLINKS=$withval
29440 else
29441 MANPAGE_SYMLINKS=$cf_use_symlinks
29442 fi;
29443
29444 if test "$cf_use_symlinks" = no; then
29445 if test "$MANPAGE_SYMLINKS" = yes ; then
29446 { echo "$as_me:29446: WARNING: cannot make symlinks" >&5
29447 echo "$as_me: WARNING: cannot make symlinks" >&2;}
29448 MANPAGE_SYMLINKS=no
29449 fi
29450 fi
29451
29452 echo "$as_me:29452: result: $MANPAGE_SYMLINKS" >&5
29453 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
29454 fi
29455
29456 echo "$as_me:29456: checking for man page tbl" >&5
29457 echo $ECHO_N "checking for man page tbl... $ECHO_C" >&6
29458
29459 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
29460 if test "${with_manpage_tbl+set}" = set; then
29461 withval="$with_manpage_tbl"
29462 MANPAGE_TBL=$withval
29463 else
29464 MANPAGE_TBL=no
29465 fi;
29466
29467 echo "$as_me:29467: result: $MANPAGE_TBL" >&5
29468 echo "${ECHO_T}$MANPAGE_TBL" >&6
29469
29470 if test "$prefix" = "NONE" ; then
29471 cf_prefix="$ac_default_prefix"
29472 else
29473 cf_prefix="$prefix"
29474 fi
29475
29476 test ! -d man && mkdir man
29477
29478 cf_edit_man=./edit_man.sh
29479 cf_man_alias=`pwd`/man_alias.sed
29480
29481 cat >$cf_edit_man <<CF_EOF
29482 #!$SHELL
29483 # generated by "configure" from the CF_MAN_PAGES macro in "aclocal.m4"
29484
29485 prefix="$cf_prefix"
29486 datarootdir="$datarootdir"
29487 datadir="$datadir"
29488
29489 NCURSES_MAJOR="$NCURSES_MAJOR"
29490 NCURSES_MINOR="$NCURSES_MINOR"
29491 NCURSES_PATCH="$NCURSES_PATCH"
29492
29493 NCURSES_OSPEED="$NCURSES_OSPEED"
29494 TERMINFO="$TERMINFO"
29495 TERMINFO_DIRS="$TERMINFO_DIRS"
29496
29497 INSTALL="$INSTALL"
29498 INSTALL_DATA="$INSTALL_DATA"
29499
29500 transform="$program_transform_name"
29501
29502 TMP=\${TMPDIR:=/tmp}/man\$\$
29503 trap "rm -f \$TMP; exit 1" 1 2 3 15
29504 trap "rm -f \$TMP" 0
29505
29506 form=\$1
29507 shift || exit 1
29508
29509 verb=\$1
29510 shift || exit 1
29511
29512 mandir=\$1
29513 shift || exit 1
29514
29515 srcdir=\$1
29516 top_srcdir=\$srcdir/..
29517 shift || exit 1
29518
29519 if test "\$form" = normal ; then
29520 if test "$cf_manpage_format" = yes ; then
29521 if test "$cf_manpage_inboth" = no ; then
29522 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
29523 exit $?
29524 fi
29525 fi
29526 cf_subdir=\$mandir/man
29527 cf_tables=$MANPAGE_TBL
29528 else
29529 cf_subdir=\$mandir/cat
29530 cf_tables=yes
29531 fi
29532
29533 # process the list of source-files
29534 for i in "\$@" ; do
29535 case \$i in
29536 (*.orig|*.rej) ;;
29537 (*.[0-9]*)
29538 section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
29539 if test "\$verb" = installing ; then
29540 if test ! -d "\$cf_subdir\${section}" ; then
29541 mkdir -p "\$cf_subdir\$section"
29542 fi
29543 fi
29544
29545 # replace variables in man page
29546 if test ! -f "$cf_man_alias" ; then
29547 cat >>$cf_man_alias <<-CF_EOF2
29548 s,@DATADIR@,\$datadir,g
29549 s,@TERMINFO@,\${TERMINFO:="no default value"},g
29550 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
29551 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
29552 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
29553 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
29554 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
29555 CF_EOF
29556
29557 for cf_name in captoinfo clear infocmp infotocap reset tabs tic toe tput tset
29558 do
29559 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29560 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
29561 cat >>$cf_edit_man <<-CF_EOF
29562 s,@$cf_NAME@,$cf_name,g
29563 CF_EOF
29564 done
29565
29566 cat >>$cf_edit_man <<CF_EOF
29567 CF_EOF2
29568 echo "...made $cf_man_alias"
29569 fi
29570
29571 aliases=
29572 cf_source=\`basename "\$i"\`
29573 cf_full_alias=\$cf_source
29574 test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
29575 if test ! -f "\$cf_full_alias" ; then
29576 echo ".. skipped \$cf_source"
29577 continue
29578 fi
29579 CF_EOF
29580
29581 if test "$MANPAGE_ALIASES" != no ; then
29582 cat >>$cf_edit_man <<CF_EOF
29583 nCurses=ignore.3x
29584 cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
29585 test "$with_curses_h" = yes && nCurses=ncurses.3x
29586 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\`
29587 CF_EOF
29588 fi
29589
29590 if test "$MANPAGE_RENAMES" = no ; then
29591 cat >>$cf_edit_man <<CF_EOF
29592 # perform program transformations for section 1 man pages
29593 if test \$section = 1 ; then
29594 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
29595 else
29596 cf_target=\$cf_subdir\${section}/\$cf_source
29597 fi
29598 CF_EOF
29599 else
29600 cat >>$cf_edit_man <<CF_EOF
29601 cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
29602 if test -z "\$cf_target" ; then
29603 echo "? missing rename for \$cf_source"
29604 cf_target="\$cf_source"
29605 fi
29606 cf_target="\$cf_subdir\${section}/\${cf_target}"
29607
29608 CF_EOF
29609 fi
29610
29611 cat >>$cf_edit_man <<CF_EOF
29612 sed -f "$cf_man_alias" \\
29613 CF_EOF
29614
29615 if test "$MANPAGE_RENAMES" != no ; then
29616 cat >>$cf_edit_man <<CF_EOF
29617 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
29618 CF_EOF
29619 else
29620 cat >>$cf_edit_man <<CF_EOF
29621 < "\$i" >\$TMP
29622 CF_EOF
29623 fi
29624
29625 cat >>$cf_edit_man <<CF_EOF
29626 if test $cf_cv_tbl_x_option_okay != yes ; then
29627 # Remove column modifier 'x' from table descriptions if the
29628 # system's tbl(1) doesn't support it.
29629 sed -e '/^\.TS/,/\.$/s@x[.]@.@' \$TMP >\$TMP.unx
29630 mv \$TMP.unx \$TMP
29631 fi
29632 CF_EOF
29633
29634 cat >>$cf_edit_man <<CF_EOF
29635 if test \$cf_tables = yes ; then
29636 tbl \$TMP >\$TMP.out
29637 mv \$TMP.out \$TMP
29638 fi
29639 CF_EOF
29640
29641 if test "$with_overwrite" != yes ; then
29642 cat >>$cf_edit_man <<CF_EOF
29643 sed -e "/\\#[ ]*include/s,<curses.h,<ncurses$ABI_SUFFIX/curses.h," \
29644 -e "/\\#[ ]*include/s,<term.h,<ncurses$ABI_SUFFIX/term.h," \
29645 -e "/\\#[ ]*include/s,<form.h,<ncurses$ABI_SUFFIX/form.h," \
29646 -e "/\\#[ ]*include/s,<menu.h,<ncurses$ABI_SUFFIX/menu.h," \
29647 -e "/\\#[ ]*include/s,<panel.h,<ncurses$ABI_SUFFIX/panel.h," \
29648 -e "/\\#[ ]*include/s,<unctrl.h,<ncurses$ABI_SUFFIX/unctrl.h," \
29649 < \$TMP >\$TMP.out
29650 mv \$TMP.out \$TMP
29651 CF_EOF
29652 fi
29653
29654 if test "$with_curses_h" != yes ; then
29655 cat >>$cf_edit_man <<CF_EOF
29656 sed -e "/\\#[ ]*include/s,curses.h,ncurses.h," \
29657 < \$TMP >\$TMP.out
29658 mv \$TMP.out \$TMP
29659 CF_EOF
29660 fi
29661
29662 cat >>$cf_edit_man <<CF_EOF
29663 if test "\$form" = format ; then
29664 nroff -man \$TMP >\$TMP.out
29665 mv \$TMP.out \$TMP
29666 fi
29667 CF_EOF
29668
29669 if test -n "$cf_manpage_compress" ; then
29670 cat >>$cf_edit_man <<CF_EOF
29671 if test "\$verb" = installing ; then
29672 if ( "$cf_manpage_compress" $cf_manpage_coptions -f \$TMP )
29673 then
29674 mv \$TMP.$cf_manpage_so_strip \$TMP
29675 fi
29676 fi
29677 cf_target="\$cf_target.$cf_manpage_so_strip"
29678 CF_EOF
29679 fi
29680
29681 case "$MANPAGE_FORMAT" in
29682 (*BSDI*)
29683 cat >>$cf_edit_man <<CF_EOF
29684 if test "\$form" = format ; then
29685 # BSDI installs only .0 suffixes in the cat directories
29686 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
29687 fi
29688 CF_EOF
29689 ;;
29690 esac
29691
29692 cat >>$cf_edit_man <<CF_EOF
29693 suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
29694 extra_suffix=
29695 if test -n "$EXTRA_SUFFIX" ; then
29696 case \$cf_target in
29697 (*${EXTRA_SUFFIX}\$suffix)
29698 extra_suffix="$EXTRA_SUFFIX"
29699 ;;
29700 esac
29701 fi
29702 if test "\$verb" = installing ; then
29703 echo "\$verb \$cf_target"
29704 \$INSTALL_DATA \$TMP "\$cf_target"
29705 test -d "\$cf_subdir\${section}" &&
29706 test -n "\$aliases" && (
29707 cd "\$cf_subdir\${section}" && (
29708 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
29709 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
29710 cf_target=\`basename "\$cf_target"\`
29711 for cf_alias in \$aliases
29712 do
29713 if test "\$section" = 1 ; then
29714 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
29715 fi
29716 cf_alias="\${cf_alias}\${extra_suffix}"
29717
29718 if test "$MANPAGE_SYMLINKS" = yes ; then
29719 if test -f "\$cf_alias\${suffix}" ; then
29720 if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
29721 then
29722 continue
29723 fi
29724 fi
29725 echo ".. \$verb alias \$cf_alias\${suffix}"
29726 CF_EOF
29727 case "x$LN_S" in
29728 (*-f)
29729 cat >>$cf_edit_man <<CF_EOF
29730 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
29731 CF_EOF
29732 ;;
29733 (*)
29734 cat >>$cf_edit_man <<CF_EOF
29735 rm -f "\$cf_alias\${suffix}"
29736 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
29737 CF_EOF
29738 ;;
29739 esac
29740 cat >>$cf_edit_man <<CF_EOF
29741 elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
29742 echo ".so \$cf_source" >\$TMP
29743 CF_EOF
29744 if test -n "$cf_manpage_compress" ; then
29745 cat >>$cf_edit_man <<CF_EOF
29746 if test -n "$cf_manpage_so_strip" ; then
29747 "$cf_manpage_compress" $cf_manpage_coptions -f \$TMP
29748 mv \$TMP.$cf_manpage_so_strip \$TMP
29749 fi
29750 CF_EOF
29751 fi
29752 cat >>$cf_edit_man <<CF_EOF
29753 echo ".. \$verb alias \$cf_alias\${suffix}"
29754 rm -f "\$cf_alias\${suffix}"
29755 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
29756 fi
29757 done
29758 )
29759 )
29760 elif test "\$verb" = removing ; then
29761 test -f "\$cf_target" && (
29762 echo "\$verb \$cf_target"
29763 rm -f "\$cf_target"
29764 )
29765 test -d "\$cf_subdir\${section}" &&
29766 test -n "\$aliases" && (
29767 cd "\$cf_subdir\${section}" && (
29768 for cf_alias in \$aliases
29769 do
29770 if test "\$section" = 1 ; then
29771 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
29772 fi
29773 cf_alias="\${cf_alias}\${extra_suffix}"
29774
29775 echo ".. \$verb alias \$cf_alias\${suffix}"
29776 rm -f "\$cf_alias\${suffix}"
29777 done
29778 )
29779 )
29780 else
29781 # echo ".hy 0"
29782 cat \$TMP
29783 fi
29784 ;;
29785 esac
29786 done
29787
29788 if test "$cf_manpage_inboth" = yes ; then
29789 if test "\$form" != format ; then
29790 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
29791 fi
29792 fi
29793
29794 exit 0
29795 CF_EOF
29796 chmod 755 "$cf_edit_man"
29797
29798 ################################################################################
29799 test "x$use_database" = xyes && \
29800 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29801
29802 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29803 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29804
29805 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29806 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29807 fi
29808
29809 if test "x$cf_with_tests" != xno ; then
29810 MAKE_TESTS=
29811 else
29812 MAKE_TESTS="#"
29813 fi
29814
29815 ADAHTML_DIR=../../doc/html/ada
29816
29817 # workaround for OS/2 (20151017)
29818 case "$cf_cv_system_name" in
29819 (os2*)
29820 LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29821 ;;
29822 (*)
29823 LIBTOOL_OPTS_CXX=
29824 ;;
29825 esac
29826
29827 # workaround for g++ versus Solaris (20131116)
29828 case "$cf_cv_system_name" in
29829 (solaris2*)
29830 case "x$CPPFLAGS" in
29831 (*-D_XOPEN_SOURCE_EXTENDED*)
29832 test -n "$verbose" && echo " moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29833
29834 echo "${as_me:-configure}:29834: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29835
29836 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29837 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29838 ;;
29839 esac
29840 ;;
29841 esac
29842
29843 # Help to automatically enable the extended curses features when using either
29844 # the *-config or the ".pc" files by adding defines.
29845 echo "$as_me:29845: checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script" >&5
29846 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script... $ECHO_C" >&6
29847 PKG_CFLAGS=
29848 for cf_loop1 in $CPPFLAGS_after_XOPEN
29849 do
29850 cf_found=no
29851 for cf_loop2 in $CPPFLAGS_before_XOPEN
29852 do
29853 if test "x$cf_loop1" = "x$cf_loop2"
29854 then
29855 cf_found=yes
29856 break
29857 fi
29858 done
29859 test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29860 done
29861 echo "$as_me:29861: result: $PKG_CFLAGS" >&5
29862 echo "${ECHO_T}$PKG_CFLAGS" >&6
29863
29864 case "$cf_cv_system_name" in
29865 (cygwin*|msys*|mingw32*|mingw64|os2*)
29866 GLOB_FULLPATH_POSIX='/*'
29867 GLOB_FULLPATH_OTHER='[a-zA-Z]:[\\/]*'
29868 ;;
29869 (*)
29870 GLOB_FULLPATH_POSIX='/*'
29871 GLOB_FULLPATH_OTHER=$GLOB_FULLPATH_POSIX
29872 ;;
29873 esac
29874
29875 # AC_CHECK_SIZEOF demands a literal parameter, no variables. So we do this.
29876 case "x$NCURSES_OSPEED" in
29877 (*short*)
29878 cf_compatible=1
29879 ;;
29880 (*)
29881 cf_compatible=0
29882 ;;
29883 esac
29884
29885 cat >>confdefs.h <<EOF
29886 #define NCURSES_OSPEED_COMPAT $cf_compatible
29887 EOF
29888
29889 case "x$cf_cv_typeof_chtype" in
29890 (xshort|xint|xlong)
29891 cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29892 ;;
29893 esac
29894
29895 case "x$cf_cv_typeof_mmask_t" in
29896 (xshort|xint|xlong)
29897 cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29898 ;;
29899 esac
29900
29901 # substitute into misc/Makefile to suppress
29902 # (un)install.data from the
29903 # (un)install rules.
29904 if test "x$cf_with_db_install" = "xno"; then
29905 MISC_INSTALL_DATA=
29906 MISC_UNINSTALL_DATA=
29907 else
29908 MISC_INSTALL_DATA=install.data
29909 MISC_UNINSTALL_DATA=uninstall.data
29910 fi
29911
29912 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29913 MAKE_DATABASE="#"
29914 else
29915 MAKE_DATABASE="$MAKE_TERMINFO"
29916 fi
29917
29918 if test -n "$PACKAGE"
29919 then
29920 PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29921 export PACKAGE
29922 echo "package: $PACKAGE"
29923 fi
29924
29925 UNALTERED_SYMS=
29926 cf_filter_syms=no
29927
29928 if test -n "$RESULTING_SYMS"
29929 then
29930 cf_filter_syms=$cf_dft_filter_syms
29931 test -n "$verbose" && echo " will map symbols to ABI=$cf_cv_abi_default" 1>&6
29932
29933 echo "${as_me:-configure}:29933: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29934
29935 fi
29936
29937 if test "x$WILDCARD_SYMS" = xno
29938 then
29939 cf_filter_syms=yes
29940 fi
29941
29942 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29943
29944 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29945 if test "$cf_filter_syms" = yes
29946 then
29947 RESULTING_SYMS=resulting.map
29948 fi
29949
29950 if test "x$cross_compiling" = xyes ; then
29951 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29952 CHECK_BUILD="#"
29953 else
29954 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29955 CHECK_BUILD=
29956 fi
29957
29958 # This is used for the *-config script and *.pc data files.
29959
29960 echo "$as_me:29960: checking for linker search path" >&5
29961 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29962 if test "${cf_cv_ld_searchpath+set}" = set; then
29963 echo $ECHO_N "(cached) $ECHO_C" >&6
29964 else
29965
29966 if test "$cross_compiling" != yes ; then
29967
29968 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29969 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29970
29971 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29972 # update the cache, which makes it run faster.
29973 test -z "$cf_pathlist" && \
29974 cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[ ]/d' -e 's/:$//' | sort -u`
29975
29976 test -z "$cf_pathlist" &&
29977 cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[ ]/d' -e 's/:$//p' | sort -u`
29978
29979 # This works with OpenBSD 6.5, which lists only filenames
29980 test -z "$cf_pathlist" &&
29981 cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29982
29983 if test -z "$cf_pathlist"
29984 then
29985 # dyld default path with MacOS
29986 if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29987 then
29988 # do this to bypass check
29989 cf_cv_ld_searchpath='$HOME/lib'
29990 cf_pathlist="/usr/local/lib /lib /usr/lib"
29991 fi
29992 fi
29993
29994 if test -z "$cf_pathlist"
29995 then
29996 # Solaris is "SunOS"
29997 if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29998 then
29999 case x`(isainfo -b)` in
30000 (x64)
30001 cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
30002 ;;
30003 (x32)
30004 test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
30005 cf_pathlist="$cf_pathlist /lib /usr/lib"
30006 ;;
30007 (*)
30008 { echo "$as_me:30008: WARNING: problem with Solaris architecture" >&5
30009 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
30010 ;;
30011 esac
30012 fi
30013 fi
30014
30015 if test -z "$cf_pathlist"
30016 then
30017 # HP-UX
30018 if test x"`uname -s`" = xHP-UX
30019 then
30020 case x`getconf LONG_BIT` in
30021 (x64)
30022 cf_pathlist="/usr/lib/hpux64"
30023 ;;
30024 (x*)
30025 cf_pathlist="/usr/lib/hpux32"
30026 ;;
30027 esac
30028 fi
30029 fi
30030
30031 fi
30032
30033 # If nothing else, assume it is conventional
30034 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
30035
30036 # Finally, check that this is only directories
30037 for cf_path in $0 $cf_pathlist
30038 do
30039 if test -d "$cf_path"; then
30040 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
30041 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
30042 fi
30043 done
30044
30045 # Ensure that it is nonempty
30046 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
30047
30048 fi
30049 echo "$as_me:30049: result: $cf_cv_ld_searchpath" >&5
30050 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
30051
30052 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
30053
30054 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/nc_win32.h include/termcap.h include/unctrl.h man/MKterminfo.tmp:man/MKterminfo.sh man/man_db.renames $SUB_MAKEFILES Makefile"
30055
30056 ac_config_commands="$ac_config_commands default"
30057
30058 DEFS=-DHAVE_CONFIG_H
30059
30060 cat >confcache <<\_ACEOF
30061 # This file is a shell script that caches the results of configure
30062 # tests run on this system so they can be shared between configure
30063 # scripts and configure runs, see configure's option --config-cache.
30064 # It is not useful on other systems. If it contains results you don't
30065 # want to keep, you may remove or edit it.
30066 #
30067 # config.status only pays attention to the cache file if you give it
30068 # the --recheck option to rerun configure.
30069 #
30070 # `ac_cv_env_foo' variables (set or unset) will be overridden when
30071 # loading this file, other *unset* `ac_cv_foo' will be assigned the
30072 # following values.
30073
30074 _ACEOF
30075
30076 # The following way of writing the cache mishandles newlines in values,
30077 # but we know of no workaround that is simple, portable, and efficient.
30078 # So, don't put newlines in cache variables' values.
30079 # Ultrix sh set writes to stderr and can't be redirected directly,
30080 # and sets the high bit in the cache file unless we assign to the vars.
30081 {
30082 (set) 2>&1 |
30083 case `(ac_space=' '; set | grep ac_space) 2>&1` in
30084 *ac_space=\ *)
30085 # `set' does not quote correctly, so add quotes (double-quote
30086 # substitution turns \\\\ into \\, and sed turns \\ into \).
30087 sed -n \
30088 "s/'/'\\\\''/g;
30089 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30090 ;;
30091 *)
30092 # `set' quotes correctly as required by POSIX, so do not add quotes.
30093 sed -n \
30094 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
30095 ;;
30096 esac;
30097 } |
30098 sed '
30099 t clear
30100 : clear
30101 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
30102 t end
30103 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30104 : end' >>confcache
30105 if cmp -s $cache_file confcache; then :; else
30106 if test -w $cache_file; then
30107 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
30108 cat confcache >$cache_file
30109 else
30110 echo "not updating unwritable cache $cache_file"
30111 fi
30112 fi
30113 rm -f confcache
30114
30115 test "x$prefix" = xNONE && prefix=$ac_default_prefix
30116 # Let make expand exec_prefix.
30117 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30118
30119 # VPATH may cause trouble with some makes, so we remove $(srcdir),
30120 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
30121 # trailing colons and then remove the whole line if VPATH becomes empty
30122 # (actually we leave an empty line to preserve line numbers).
30123 if test "x$srcdir" = x.; then
30124 ac_vpsub='/^[ ]*VPATH[ ]*=/{
30125 s/:*\$(srcdir):*/:/;
30126 s/:*\${srcdir}:*/:/;
30127 s/:*@srcdir@:*/:/;
30128 s/^\([^=]*=[ ]*\):*/\1/;
30129 s/:*$//;
30130 s/^[^=]*=[ ]*$//;
30131 }'
30132 fi
30133
30134 DEFS=-DHAVE_CONFIG_H
30135
30136 : "${CONFIG_STATUS=./config.status}"
30137 ac_clean_files_save=$ac_clean_files
30138 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30139 { echo "$as_me:30139: creating $CONFIG_STATUS" >&5
30140 echo "$as_me: creating $CONFIG_STATUS" >&6;}
30141 cat >"$CONFIG_STATUS" <<_ACEOF
30142 #! $SHELL
30143 # Generated automatically by configure.
30144 # Run this file to recreate the current configuration.
30145 # Compiler output produced by configure, useful for debugging
30146 # configure, is in config.log if it exists.
30147
30148 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
30149
30150 debug=false
30151 SHELL=\${CONFIG_SHELL-$SHELL}
30152 ac_cs_invocation="\$0 \$@"
30153
30154 CLICOLOR_FORCE= GREP_OPTIONS=
30155 unset CLICOLOR_FORCE GREP_OPTIONS
30156 _ACEOF
30157
30158 cat >>"$CONFIG_STATUS" <<\_ACEOF
30159 # Be Bourne compatible
30160 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
30161 emulate sh
30162 NULLCMD=:
30163 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30164 set -o posix
30165 fi
30166
30167 # Name of the executable.
30168 as_me=`echo "$0" |sed 's,.*[\\/],,'`
30169
30170 if expr a : '\(a\)' >/dev/null 2>&1; then
30171 as_expr="expr"
30172 else
30173 as_expr="false"
30174 fi
30175
30176 rm -f conf$$ conf$$.exe conf$$.file
30177 echo >conf$$.file
30178 if ln -s conf$$.file conf$$ 2>/dev/null; then
30179 # We could just check for DJGPP; but this test a) works b) is more generic
30180 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
30181 if test -f conf$$.exe; then
30182 # Don't use ln at all; we don't have any links
30183 as_ln_s='cp -p'
30184 else
30185 as_ln_s='ln -s'
30186 fi
30187 elif ln conf$$.file conf$$ 2>/dev/null; then
30188 as_ln_s='ln'
30189 else
30190 as_ln_s='cp -p'
30191 fi
30192 rm -f conf$$ conf$$.exe conf$$.file
30193
30194 as_executable_p="test -f"
30195
30196 # Support unset when possible.
30197 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
30198 as_unset="unset"
30199 else
30200 as_unset="false"
30201 fi
30202
30203 # NLS nuisances.
30204 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
30205 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
30206 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
30207 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
30208 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
30209 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
30210 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
30211 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
30212
30213 # IFS
30214 # We need space, tab and new line, in precisely that order.
30215 as_nl='
30216 '
30217 IFS=" $as_nl"
30218
30219 # CDPATH.
30220 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
30221
30222 exec 6>&1
30223
30224 _ACEOF
30225
30226 # Files that config.status was made for.
30227 if test -n "$ac_config_files"; then
30228 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
30229 fi
30230
30231 if test -n "$ac_config_headers"; then
30232 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
30233 fi
30234
30235 if test -n "$ac_config_links"; then
30236 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
30237 fi
30238
30239 if test -n "$ac_config_commands"; then
30240 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
30241 fi
30242
30243 cat >>"$CONFIG_STATUS" <<\EOF
30244
30245 ac_cs_usage="\
30246 \`$as_me' instantiates files from templates according to the
30247 current configuration.
30248
30249 Usage: $0 [OPTIONS] [FILE]...
30250
30251 -h, --help print this help, then exit
30252 -V, --version print version number, then exit
30253 -d, --debug don't remove temporary files
30254 --recheck update $as_me by reconfiguring in the same conditions
30255 --file=FILE[:TEMPLATE]
30256 instantiate the configuration file FILE
30257 --header=FILE[:TEMPLATE]
30258 instantiate the configuration header FILE
30259
30260 Configuration files:
30261 $config_files
30262
30263 Configuration headers:
30264 $config_headers
30265
30266 Configuration commands:
30267 $config_commands
30268
30269 Report bugs to <[email protected]>."
30270 EOF
30271
30272 cat >>"$CONFIG_STATUS" <<EOF
30273 ac_cs_version="\\
30274 config.status
30275 configured by $0, generated by GNU Autoconf 2.52.20250126,
30276 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
30277
30278 Copyright 2003-2022,2023 Thomas E. Dickey
30279 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
30280 Free Software Foundation, Inc.
30281 This config.status script is free software; the Free Software Foundation
30282 gives unlimited permission to copy, distribute and modify it."
30283 srcdir="$srcdir"
30284 INSTALL="$INSTALL"
30285 EOF
30286
30287 cat >>"$CONFIG_STATUS" <<\EOF
30288 # If no file are specified by the user, then we need to provide default
30289 # value. By we need to know if files were specified by the user.
30290 ac_need_defaults=:
30291 while test $# != 0
30292 do
30293 case $1 in
30294 --*=*)
30295 ac_option=`expr "x$1" : 'x\([^=]*\)='`
30296 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
30297 shift
30298 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
30299 shift
30300 ;;
30301 -*);;
30302 *) # This is not an option, so the user has probably given explicit
30303 # arguments.
30304 ac_need_defaults=false;;
30305 esac
30306
30307 case $1 in
30308 # Handling of the options.
30309 EOF
30310 cat >>"$CONFIG_STATUS" <<EOF
30311 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
30312 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
30313 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
30314 EOF
30315 cat >>"$CONFIG_STATUS" <<\EOF
30316 --version | --vers* | -V )
30317 echo "$ac_cs_version"; exit 0 ;;
30318 --he | --h)
30319 # Conflict between --help and --header
30320 { { echo "$as_me:30320: error: ambiguous option: $1
30321 Try \`$0 --help' for more information." >&5
30322 echo "$as_me: error: ambiguous option: $1
30323 Try \`$0 --help' for more information." >&2;}
30324 { (exit 1); exit 1; }; };;
30325 --help | --hel | -h )
30326 echo "$ac_cs_usage"; exit 0 ;;
30327 --debug | --d* | -d )
30328 debug=: ;;
30329 --file | --fil | --fi | --f )
30330 shift
30331 CONFIG_FILES="$CONFIG_FILES $1"
30332 ac_need_defaults=false;;
30333 --header | --heade | --head | --hea )
30334 shift
30335 CONFIG_HEADERS="$CONFIG_HEADERS $1"
30336 ac_need_defaults=false;;
30337
30338 # This is an error.
30339 -*) { { echo "$as_me:30339: error: unrecognized option: $1
30340 Try \`$0 --help' for more information." >&5
30341 echo "$as_me: error: unrecognized option: $1
30342 Try \`$0 --help' for more information." >&2;}
30343 { (exit 1); exit 1; }; } ;;
30344
30345 *) ac_config_targets="$ac_config_targets $1" ;;
30346
30347 esac
30348 shift
30349 done
30350
30351 exec 5>>config.log
30352 cat >&5 << _ACEOF
30353
30354 ## ----------------------- ##
30355 ## Running config.status. ##
30356 ## ----------------------- ##
30357
30358 This file was extended by $as_me 2.52.20250126, executed with
30359 CONFIG_FILES = $CONFIG_FILES
30360 CONFIG_HEADERS = $CONFIG_HEADERS
30361 CONFIG_LINKS = $CONFIG_LINKS
30362 CONFIG_COMMANDS = $CONFIG_COMMANDS
30363 > "$ac_cs_invocation"
30364 on `(hostname || uname -n) 2>/dev/null | sed 1q`
30365
30366 _ACEOF
30367 EOF
30368
30369 cat >>"$CONFIG_STATUS" <<EOF
30370 #
30371 # INIT-COMMANDS section.
30372 #
30373
30374 ### Special initialization commands, used to pass information from the
30375 ### configuration-run into config.status
30376
30377 ALTERNATE_SYMS="$ALTERNATE_SYMS"
30378 AWK="$AWK"
30379 CXX_NAME="$CXX_NAME"
30380 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
30381 DFT_LWR_MODEL="$DFT_LWR_MODEL"
30382 ECHO_LD="$ECHO_LD"
30383 EXTRA_SUFFIX="$EXTRA_SUFFIX"
30384 FORM_NAME="$FORM_NAME"
30385 GLOB_FULLPATH_OTHER="$GLOB_FULLPATH_OTHER"
30386 GLOB_FULLPATH_POSIX="$GLOB_FULLPATH_POSIX"
30387 LDCONFIG="$LDCONFIG"
30388 LIBTOOL_VERSION="$LIBTOOL_VERSION"
30389 LIB_NAME="$LIB_NAME"
30390 LIB_PREFIX="$LIB_PREFIX"
30391 LIB_SUBSETS="$LIB_SUBSETS"
30392 LIB_SUFFIX="$LIB_SUFFIX"
30393 LIB_TRACING="$LIB_TRACING"
30394 LN_S="$LN_S"
30395 MAKE_TERMINFO="$MAKE_TERMINFO"
30396 MANPAGE_RENAMES="$MANPAGE_RENAMES"
30397 MENU_NAME="$MENU_NAME"
30398 NCURSES_MAJOR="$NCURSES_MAJOR"
30399 NCURSES_MINOR="$NCURSES_MINOR"
30400 NCURSES_OSPEED="$NCURSES_OSPEED"
30401 NCURSES_PATCH="$NCURSES_PATCH"
30402 PANEL_NAME="$PANEL_NAME"
30403 SRC_SUBDIRS="$SRC_SUBDIRS"
30404 TERMINFO="$TERMINFO"
30405 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
30406 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
30407 TICS_NAME="$TICS_NAME"
30408 TICS_SUFFIX="$TICS_SUFFIX"
30409 TIC_PATH="$TIC_PATH"
30410 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
30411 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
30412 TINFO_NAME="$TINFO_NAME"
30413 TINFO_SUFFIX="$TINFO_SUFFIX"
30414 UNALTERED_SYMS="$UNALTERED_SYMS"
30415 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
30416 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
30417 ABI_SUFFIX="$ABI_SUFFIX"
30418 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
30419 WILDCARD_SYMS="$WILDCARD_SYMS"
30420 WITH_CURSES_H="$with_curses_h"
30421 WITH_ECHO="${enable_echo:=yes}"
30422 WITH_OVERWRITE="$with_overwrite"
30423 cf_LIST_MODELS="$cf_list_models"
30424 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
30425 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
30426 cf_cv_abi_default="$cf_cv_abi_default"
30427 cf_cv_abi_version="$cf_cv_abi_version"
30428 cf_cv_do_relink="$cf_cv_do_relink"
30429 cf_cv_do_reranlib="$cf_cv_do_reranlib"
30430 cf_cv_do_symlinks="$cf_cv_do_symlinks"
30431 cf_cv_enable_lp64="$cf_cv_enable_lp64"
30432 cf_cv_enable_opaque="$cf_cv_enable_opaque"
30433 cf_cv_make_PHONY="$cf_cv_make_PHONY"
30434 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
30435 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
30436 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
30437 cf_cv_rel_version="$cf_cv_rel_version"
30438 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
30439 cf_cv_shared_soname='$cf_cv_shared_soname'
30440 cf_cv_shlib_version="$cf_cv_shlib_version"
30441 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
30442 cf_cv_system_name="$cf_cv_system_name"
30443 cf_cv_term_driver="$with_term_driver"
30444 cf_with_ada="$cf_with_ada"
30445 cf_with_cxx_binding="$cf_with_cxx_binding"
30446 cf_with_db_install="$cf_with_db_install"
30447 cf_with_manpages="$cf_with_manpages"
30448 cf_with_tests="$cf_with_tests"
30449 host="$host"
30450 target="$target"
30451 verbose="$verbose"
30452 with_shared_cxx="$with_shared_cxx"
30453
30454 EOF
30455
30456 cat >>"$CONFIG_STATUS" <<\EOF
30457 for ac_config_target in $ac_config_targets
30458 do
30459 case "$ac_config_target" in
30460 # Handling of arguments.
30461 "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
30462 "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
30463 "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
30464 "include/nc_win32.h" ) CONFIG_FILES="$CONFIG_FILES include/nc_win32.h" ;;
30465 "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
30466 "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
30467 "man/MKterminfo.tmp" ) CONFIG_FILES="$CONFIG_FILES man/MKterminfo.tmp:man/MKterminfo.sh" ;;
30468 "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
30469 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
30470 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
30471 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
30472 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
30473 *) { { echo "$as_me:30473: error: invalid argument: $ac_config_target" >&5
30474 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
30475 { (exit 1); exit 1; }; };;
30476 esac
30477 done
30478
30479 # If the user did not use the arguments to specify the items to instantiate,
30480 # then the envvar interface is used. Set only those that are not.
30481 # We use the long form for the default assignment because of an extremely
30482 # bizarre bug on SunOS 4.1.3.
30483 if "$ac_need_defaults"; then
30484 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
30485 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
30486 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
30487 fi
30488
30489 # Create a temporary directory, and hook for its removal unless debugging.
30490 $debug ||
30491 {
30492 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
30493 trap '{ (exit 1); exit 1; }' 1 2 13 15
30494 }
30495
30496 # Create a (secure) tmp directory for tmp files.
30497 : "${TMPDIR=/tmp}"
30498 {
30499 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
30500 test -n "$tmp" && test -d "$tmp"
30501 } ||
30502 {
30503 tmp=$TMPDIR/cs$$-$RANDOM
30504 (umask 077 && mkdir "$tmp")
30505 } ||
30506 {
30507 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
30508 { (exit 1); exit 1; }
30509 }
30510
30511 EOF
30512
30513 cat >>"$CONFIG_STATUS" <<EOF
30514
30515 #
30516 # CONFIG_FILES section.
30517 #
30518
30519 # No need to generate the scripts if there are no CONFIG_FILES.
30520 # This happens for instance when ./config.status config.h
30521 if test -n "\$CONFIG_FILES"; then
30522 # Protect against being on the right side of a sed subst in config.status.
30523 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
30524 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
30525 s,@SHELL@,$SHELL,;t t
30526 s,@exec_prefix@,$exec_prefix,;t t
30527 s,@prefix@,$prefix,;t t
30528 s,@program_transform_name@,$program_transform_name,;t t
30529 s,@bindir@,$bindir,;t t
30530 s,@sbindir@,$sbindir,;t t
30531 s,@libexecdir@,$libexecdir,;t t
30532 s,@datarootdir@,$datarootdir,;t t
30533 s,@datadir@,$datadir,;t t
30534 s,@sysconfdir@,$sysconfdir,;t t
30535 s,@sharedstatedir@,$sharedstatedir,;t t
30536 s,@localstatedir@,$localstatedir,;t t
30537 s,@runstatedir@,$runstatedir,;t t
30538 s,@libdir@,$libdir,;t t
30539 s,@includedir@,$includedir,;t t
30540 s,@oldincludedir@,$oldincludedir,;t t
30541 s,@infodir@,$infodir,;t t
30542 s,@mandir@,$mandir,;t t
30543 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
30544 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
30545 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
30546 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
30547 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
30548 s,@build_alias@,$build_alias,;t t
30549 s,@host_alias@,$host_alias,;t t
30550 s,@target_alias@,$target_alias,;t t
30551 s,@ECHO_C@,$ECHO_C,;t t
30552 s,@ECHO_N@,$ECHO_N,;t t
30553 s,@ECHO_T@,$ECHO_T,;t t
30554 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
30555 s,@DEFS@,$DEFS,;t t
30556 s,@LIBS@,$LIBS,;t t
30557 s,@top_builddir@,$top_builddir,;t t
30558 s,@GREP@,$GREP,;t t
30559 s,@EGREP@,$EGREP,;t t
30560 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
30561 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
30562 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
30563 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
30564 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
30565 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
30566 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
30567 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
30568 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
30569 s,@VERSION@,$VERSION,;t t
30570 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
30571 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
30572 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
30573 s,@PROGRAM@,$PROGRAM,;t t
30574 s,@PACKAGE@,$PACKAGE,;t t
30575 s,@build@,$build,;t t
30576 s,@build_cpu@,$build_cpu,;t t
30577 s,@build_vendor@,$build_vendor,;t t
30578 s,@build_os@,$build_os,;t t
30579 s,@host@,$host,;t t
30580 s,@host_cpu@,$host_cpu,;t t
30581 s,@host_vendor@,$host_vendor,;t t
30582 s,@host_os@,$host_os,;t t
30583 s,@target@,$target,;t t
30584 s,@target_cpu@,$target_cpu,;t t
30585 s,@target_vendor@,$target_vendor,;t t
30586 s,@target_os@,$target_os,;t t
30587 s,@FGREP@,$FGREP,;t t
30588 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30589 s,@M4_exists@,$M4_exists,;t t
30590 s,@cf_ada_make@,$cf_ada_make,;t t
30591 s,@cf_ada_config@,$cf_ada_config,;t t
30592 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30593 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30594 s,@cf_cv_path_gnatgcc@,$cf_cv_path_gnatgcc,;t t
30595 s,@CC@,$CC,;t t
30596 s,@CFLAGS@,$CFLAGS,;t t
30597 s,@LDFLAGS@,$LDFLAGS,;t t
30598 s,@CPPFLAGS@,$CPPFLAGS,;t t
30599 s,@ac_ct_CC@,$ac_ct_CC,;t t
30600 s,@EXEEXT@,$EXEEXT,;t t
30601 s,@OBJEXT@,$OBJEXT,;t t
30602 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
30603 s,@CPP@,$CPP,;t t
30604 s,@LDCONFIG@,$LDCONFIG,;t t
30605 s,@CXX@,$CXX,;t t
30606 s,@CXXFLAGS@,$CXXFLAGS,;t t
30607 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
30608 s,@AWK@,$AWK,;t t
30609 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
30610 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
30611 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
30612 s,@GLOB_FULLPATH_POSIX@,$GLOB_FULLPATH_POSIX,;t t
30613 s,@GLOB_FULLPATH_OTHER@,$GLOB_FULLPATH_OTHER,;t t
30614 s,@LINT@,$LINT,;t t
30615 s,@LINT_OPTS@,$LINT_OPTS,;t t
30616 s,@LINT_LIBS@,$LINT_LIBS,;t t
30617 s,@LN_S@,$LN_S,;t t
30618 s,@cf_config_suffix@,$cf_config_suffix,;t t
30619 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
30620 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
30621 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
30622 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
30623 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
30624 s,@SET_MAKE@,$SET_MAKE,;t t
30625 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
30626 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
30627 s,@CTAGS@,$CTAGS,;t t
30628 s,@ETAGS@,$ETAGS,;t t
30629 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
30630 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
30631 s,@RANLIB@,$RANLIB,;t t
30632 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
30633 s,@LD@,$LD,;t t
30634 s,@ac_ct_LD@,$ac_ct_LD,;t t
30635 s,@AR@,$AR,;t t
30636 s,@ac_ct_AR@,$ac_ct_AR,;t t
30637 s,@NM@,$NM,;t t
30638 s,@ac_ct_NM@,$ac_ct_NM,;t t
30639 s,@ARFLAGS@,$ARFLAGS,;t t
30640 s,@DESTDIR@,$DESTDIR,;t t
30641 s,@SET_DESTDIR@,$SET_DESTDIR,;t t
30642 s,@MERGE_PREFIX@,$MERGE_PREFIX,;t t
30643 s,@BUILD_CC@,$BUILD_CC,;t t
30644 s,@BUILD_CPP@,$BUILD_CPP,;t t
30645 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
30646 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
30647 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
30648 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
30649 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
30650 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
30651 s,@cf_list_models@,$cf_list_models,;t t
30652 s,@ABI_VERSION@,$ABI_VERSION,;t t
30653 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
30654 s,@LIBTOOL@,$LIBTOOL,;t t
30655 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
30656 s,@LT_UNDEF@,$LT_UNDEF,;t t
30657 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
30658 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
30659 s,@LIB_CREATE@,$LIB_CREATE,;t t
30660 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
30661 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
30662 s,@LIB_PREP@,$LIB_PREP,;t t
30663 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
30664 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
30665 s,@LIB_LINK@,$LIB_LINK,;t t
30666 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
30667 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
30668 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
30669 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
30670 s,@TICS_NAME@,$TICS_NAME,;t t
30671 s,@TINFO_NAME@,$TINFO_NAME,;t t
30672 s,@LIB_NAME@,$LIB_NAME,;t t
30673 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
30674 s,@CC_G_OPT@,$CC_G_OPT,;t t
30675 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
30676 s,@LD_MODEL@,$LD_MODEL,;t t
30677 s,@shlibdir@,$shlibdir,;t t
30678 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
30679 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
30680 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
30681 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
30682 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
30683 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
30684 s,@LINK_PROGS@,$LINK_PROGS,;t t
30685 s,@LINK_TESTS@,$LINK_TESTS,;t t
30686 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
30687 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
30688 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
30689 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
30690 s,@RPATH_LIST@,$RPATH_LIST,;t t
30691 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
30692 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
30693 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
30694 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
30695 s,@REQUIRE_PKG@,$REQUIRE_PKG,;t t
30696 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
30697 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
30698 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
30699 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
30700 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
30701 s,@TIC@,$TIC,;t t
30702 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
30703 s,@INFOCMP@,$INFOCMP,;t t
30704 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
30705 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
30706 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
30707 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
30708 s,@XTERM_KBS@,$XTERM_KBS,;t t
30709 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
30710 s,@TERMINFO@,$TERMINFO,;t t
30711 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
30712 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
30713 s,@TERMPATH@,$TERMPATH,;t t
30714 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
30715 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
30716 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
30717 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
30718 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
30719 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
30720 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
30721 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
30722 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
30723 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
30724 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
30725 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
30726 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
30727 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
30728 s,@RGB_PATH@,$RGB_PATH,;t t
30729 s,@no_x11_rgb@,$no_x11_rgb,;t t
30730 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
30731 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
30732 s,@NCURSES_CHTYPE@,$NCURSES_CHTYPE,;t t
30733 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
30734 s,@NCURSES_MMASK_T@,$NCURSES_MMASK_T,;t t
30735 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
30736 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
30737 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
30738 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
30739 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
30740 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
30741 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
30742 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
30743 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
30744 s,@NCURSES_RGB_COLORS@,$NCURSES_RGB_COLORS,;t t
30745 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
30746 s,@cf_cv_enable_sigwinch@,$cf_cv_enable_sigwinch,;t t
30747 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
30748 s,@USE_NAMED_PIPES@,$USE_NAMED_PIPES,;t t
30749 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
30750 s,@PTHREAD@,$PTHREAD,;t t
30751 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
30752 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
30753 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
30754 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
30755 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
30756 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
30757 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
30758 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
30759 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
30760 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
30761 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
30762 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
30763 s,@ECHO_LT@,$ECHO_LT,;t t
30764 s,@ECHO_LD@,$ECHO_LD,;t t
30765 s,@RULE_CC@,$RULE_CC,;t t
30766 s,@SHOW_CC@,$SHOW_CC,;t t
30767 s,@ECHO_CC@,$ECHO_CC,;t t
30768 s,@ECHO_LINK@,$ECHO_LINK,;t t
30769 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
30770 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
30771 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
30772 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
30773 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
30774 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
30775 s,@ADAFLAGS@,$ADAFLAGS,;t t
30776 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
30777 s,@ADA_TRACE@,$ADA_TRACE,;t t
30778 s,@MATH_LIB@,$MATH_LIB,;t t
30779 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
30780 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
30781 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
30782 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
30783 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30784 s,@TEST_LIBS@,$TEST_LIBS,;t t
30785 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
30786 s,@USE_STDBOOL_H@,$USE_STDBOOL_H,;t t
30787 s,@USE_BUILTIN_BOOL@,$USE_BUILTIN_BOOL,;t t
30788 s,@CXXCPP@,$CXXCPP,;t t
30789 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30790 s,@CXX_AR@,$CXX_AR,;t t
30791 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
30792 s,@CXXLIBS@,$CXXLIBS,;t t
30793 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
30794 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30795 s,@cf_compile_generics@,$cf_compile_generics,;t t
30796 s,@cf_generic_objects@,$cf_generic_objects,;t t
30797 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30798 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30799 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30800 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30801 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30802 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30803 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30804 s,@cf_ada_package@,$cf_ada_package,;t t
30805 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30806 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30807 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30808 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30809 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30810 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30811 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30812 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30813 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30814 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30815 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30816 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30817 s,@ABI_SUFFIX@,$ABI_SUFFIX,;t t
30818 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30819 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30820 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30821 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30822 s,@TICS_LIBS@,$TICS_LIBS,;t t
30823 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30824 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30825 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30826 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30827 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30828 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30829 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30830 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30831 s,@includesubdir@,$includesubdir,;t t
30832 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30833 s,@TICS_LIST@,$TICS_LIST,;t t
30834 s,@TINFO_LIST@,$TINFO_LIST,;t t
30835 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30836 s,@FORM_NAME@,$FORM_NAME,;t t
30837 s,@MENU_NAME@,$MENU_NAME,;t t
30838 s,@PANEL_NAME@,$PANEL_NAME,;t t
30839 s,@CXX_NAME@,$CXX_NAME,;t t
30840 s,@TEST_ARGS@,$TEST_ARGS,;t t
30841 s,@TEST_DEPS@,$TEST_DEPS,;t t
30842 s,@TEST_ARG2@,$TEST_ARG2,;t t
30843 s,@TEST_DEP2@,$TEST_DEP2,;t t
30844 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30845 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30846 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30847 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30848 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30849 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30850 s,@HAVE_SGTTY_H@,$HAVE_SGTTY_H,;t t
30851 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30852 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30853 s,@NROFF_TBL@,$NROFF_TBL,;t t
30854 s,@TBL_X_OPTION@,$TBL_X_OPTION,;t t
30855 s,@cf_manpage_format@,$cf_manpage_format,;t t
30856 s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t
30857 s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t
30858 s,@cf_manpage_compress@,$cf_manpage_compress,;t t
30859 s,@cf_manpage_coptions@,$cf_manpage_coptions,;t t
30860 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
30861 s,@cross_compiling@,$cross_compiling,;t t
30862 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30863 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30864 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30865 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30866 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30867 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30868 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30869 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30870 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30871 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30872 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30873 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30874 CEOF
30875
30876 EOF
30877
30878 cat >>"$CONFIG_STATUS" <<\EOF
30879 # Split the substitutions into bite-sized pieces for seds with
30880 # small command number limits, like on Digital OSF/1 and HP-UX.
30881 ac_max_sed_lines=48
30882 ac_sed_frag=1 # Number of current file.
30883 ac_beg=1 # First line for current file.
30884 ac_end=$ac_max_sed_lines # Line after last line for current file.
30885 ac_more_lines=:
30886 ac_sed_cmds=
30887 while "$ac_more_lines"; do
30888 if test "$ac_beg" -gt 1; then
30889 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30890 else
30891 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30892 fi
30893 if test ! -s "$tmp"/subs.frag; then
30894 ac_more_lines=false
30895 else
30896 # The purpose of the label and of the branching condition is to
30897 # speed up the sed processing (if there are no `@' at all, there
30898 # is no need to browse any of the substitutions).
30899 # These are the two extra sed commands mentioned above.
30900 (echo ':t
30901 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && sed -e 's/\\\\*$//g' -e 's/$/\\/' -e 's/;t t\\/;t t/' -e 't' -e '3,'$ac_max_sed_lines's/$/\\/' "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30902 # It is possible to make a multiline substitution using escaped newlines.
30903 # Ensure that we do not split the substitution between script fragments.
30904 ac_BEG=$ac_end
30905 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30906 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30907 if test -s "$tmp"/subs.next; then
30908 grep '^s,@[^@,][^@,]*@,.*$' "$tmp"/subs.next | grep -v '^s,@.*;t t$' >"$tmp"/subs.edit
30909 if test ! -s "$tmp"/subs.edit; then
30910 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30911 if test ! -s "$tmp"/subs.edit; then
30912 if test "$ac_beg" -gt 1; then
30913 ac_end=`expr "$ac_end" - 1`
30914 continue
30915 fi
30916 fi
30917 fi
30918 fi
30919
30920 if test -z "$ac_sed_cmds"; then
30921 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30922 else
30923 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30924 fi
30925 ac_sed_frag=`expr "$ac_sed_frag" + 1`
30926 ac_beg=$ac_end
30927 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30928 fi
30929 done
30930 if test -z "$ac_sed_cmds"; then
30931 ac_sed_cmds="cat"
30932 fi
30933 fi # test -n "$CONFIG_FILES"
30934
30935 EOF
30936 cat >>"$CONFIG_STATUS" <<\EOF
30937 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30938 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30939 case "$ac_file" in
30940 - | *:- | *:-:* ) # input from stdin
30941 cat >"$tmp"/stdin
30942 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30943 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30944 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30945 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30946 * ) ac_file_in=$ac_file.in ;;
30947 esac
30948
30949 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30950 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30951 X"$ac_file" : 'X\(//\)[^/]' \| \
30952 X"$ac_file" : 'X\(//\)$' \| \
30953 X"$ac_file" : 'X\(/\)' \| \
30954 . : '\(.\)' 2>/dev/null ||
30955 echo X"$ac_file" |
30956 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30957 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30958 /^X\(\/\/\)$/{ s//\1/; q; }
30959 /^X\(\/\).*/{ s//\1/; q; }
30960 s/.*/./; q'`
30961 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30962 { case "$ac_dir" in
30963 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30964 *) as_incr_dir=.;;
30965 esac
30966 as_dummy="$ac_dir"
30967 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30968 case $as_mkdir_dir in
30969 # Skip DOS drivespec
30970 ?:) as_incr_dir=$as_mkdir_dir ;;
30971 *)
30972 as_incr_dir=$as_incr_dir/$as_mkdir_dir
30973 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30974 ;;
30975 esac
30976 done; }
30977
30978 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30979 # A "../" for each directory in $ac_dir_suffix.
30980 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30981 else
30982 ac_dir_suffix= ac_dots=
30983 fi
30984
30985 case "$srcdir" in
30986 .) ac_srcdir=.
30987 if test -z "$ac_dots"; then
30988 ac_top_srcdir=.
30989 else
30990 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30991 fi ;;
30992 [\\/]* | ?:[\\/]* )
30993 ac_srcdir="$srcdir$ac_dir_suffix";
30994 ac_top_srcdir="$srcdir" ;;
30995 *) # Relative path.
30996 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30997 ac_top_srcdir="$ac_dots$srcdir" ;;
30998 esac
30999
31000 case $INSTALL in
31001 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
31002 *) ac_INSTALL=$ac_dots$INSTALL ;;
31003 esac
31004
31005 if test x"$ac_file" != x-; then
31006 { echo "$as_me:31006: creating $ac_file" >&5
31007 echo "$as_me: creating $ac_file" >&6;}
31008 rm -f "$ac_file"
31009 fi
31010 # Let's still pretend it is `configure' which instantiates (i.e., don't
31011 # use $as_me), people would be surprised to read:
31012 # /* config.h. Generated automatically by config.status. */
31013 configure_input="Generated automatically from `echo $ac_file_in |
31014 sed 's,.*/,,'` by configure."
31015
31016 # First look for the input files in the build tree, otherwise in the
31017 # src tree.
31018 ac_file_inputs=`IFS=:
31019 for f in $ac_file_in; do
31020 case $f in
31021 -) echo "$tmp"/stdin ;;
31022 [\\/$]*)
31023 # Absolute (can't be DOS-style, as IFS=:)
31024 test -f "$f" || { { echo "$as_me:31024: error: cannot find input file: $f" >&5
31025 echo "$as_me: error: cannot find input file: $f" >&2;}
31026 { (exit 1); exit 1; }; }
31027 echo "$f";;
31028 *) # Relative
31029 if test -f "$f"; then
31030 # Build tree
31031 echo "$f"
31032 elif test -f "$srcdir/$f"; then
31033 # Source tree
31034 echo "$srcdir/$f"
31035 else
31036 # /dev/null tree
31037 { { echo "$as_me:31037: error: cannot find input file: $f" >&5
31038 echo "$as_me: error: cannot find input file: $f" >&2;}
31039 { (exit 1); exit 1; }; }
31040 fi;;
31041 esac
31042 done` || { (exit 1); exit 1; }
31043 EOF
31044 cat >>"$CONFIG_STATUS" <<\EOF
31045 ac_warn_datarootdir=no
31046 if test x"$ac_file" != x-; then
31047 for ac_item in $ac_file_inputs
31048 do
31049 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
31050 if test -n "$ac_seen"; then
31051 ac_used=`grep '@datarootdir@' "$ac_item"`
31052 if test -z "$ac_used"; then
31053 { echo "$as_me:31053: WARNING: datarootdir was used implicitly but not set:
31054 $ac_seen" >&5
31055 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
31056 $ac_seen" >&2;}
31057 ac_warn_datarootdir=yes
31058 fi
31059 fi
31060 ac_seen=`grep '${datarootdir}' "$ac_item"`
31061 if test -n "$ac_seen"; then
31062 { echo "$as_me:31062: WARNING: datarootdir was used explicitly but not set:
31063 $ac_seen" >&5
31064 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
31065 $ac_seen" >&2;}
31066 ac_warn_datarootdir=yes
31067 fi
31068 done
31069 fi
31070
31071 if test "x$ac_warn_datarootdir" = xyes; then
31072 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
31073 fi
31074
31075 EOF
31076 cat >>"$CONFIG_STATUS" <<EOF
31077 sed "$ac_vpsub
31078 $extrasub
31079 EOF
31080 cat >>"$CONFIG_STATUS" <<\EOF
31081 :t
31082 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
31083 s,@configure_input@,$configure_input,;t t
31084 s,@srcdir@,$ac_srcdir,;t t
31085 s,@top_srcdir@,$ac_top_srcdir,;t t
31086 s,@INSTALL@,$ac_INSTALL,;t t
31087 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
31088 rm -f "$tmp"/stdin
31089 EOF
31090 test -n "${FGREP}" || FGREP="grep -F"
31091 test -n "${EGREP}" || EGREP="grep -E"
31092 cat >>"$CONFIG_STATUS" <<EOF
31093 test -n "\${FGREP}" || FGREP="$FGREP"
31094 test -n "\${EGREP}" || EGREP="$EGREP"
31095 EOF
31096 cat >>"$CONFIG_STATUS" <<\EOF
31097 if test x"$ac_file" != x-; then
31098 cp "$tmp/out" "$ac_file"
31099
31100 for ac_name in prefix exec_prefix datarootdir
31101 do
31102 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
31103 if test -n "$ac_seen"; then
31104 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
31105 if test -z "$ac_init"; then
31106 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
31107 { echo "$as_me:31107: WARNING: Variable $ac_name is used but was not set:
31108 $ac_seen" >&5
31109 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
31110 $ac_seen" >&2;}
31111 fi
31112 fi
31113 done
31114 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
31115 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
31116 if test -s "$tmp"/out; then
31117 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
31118 { echo "$as_me:31118: WARNING: Some variables may not be substituted:
31119 $ac_seen" >&5
31120 echo "$as_me: WARNING: Some variables may not be substituted:
31121 $ac_seen" >&2;}
31122 fi
31123 else
31124 cat "$tmp"/out
31125 fi
31126 rm -f "$tmp"/out
31127
31128 done
31129 EOF
31130 cat >>"$CONFIG_STATUS" <<\EOF
31131
31132 #
31133 # CONFIG_HEADER section.
31134 #
31135
31136 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
31137 # NAME is the cpp macro being defined and VALUE is the value it is being given.
31138 #
31139 # ac_d sets the value in "#define NAME VALUE" lines.
31140 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
31141 ac_dB='[ ].*$,\1#\2'
31142 ac_dC=' '
31143 ac_dD=',;t'
31144 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
31145 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
31146 ac_iB='\([ ]\),\1#\2define\3'
31147 ac_iC=' '
31148 ac_iD='\4,;t'
31149 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
31150 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
31151 ac_uB='$,\1#\2define\3'
31152 ac_uC=' '
31153 ac_uD=',;t'
31154
31155 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
31156 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
31157 case "$ac_file" in
31158 - | *:- | *:-:* ) # input from stdin
31159 cat >"$tmp"/stdin
31160 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
31161 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
31162 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
31163 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
31164 * ) ac_file_in=$ac_file.in ;;
31165 esac
31166
31167 test x"$ac_file" != x- && { echo "$as_me:31167: creating $ac_file" >&5
31168 echo "$as_me: creating $ac_file" >&6;}
31169
31170 # First look for the input files in the build tree, otherwise in the
31171 # src tree.
31172 ac_file_inputs=`IFS=:
31173 for f in $ac_file_in; do
31174 case $f in
31175 -) echo "$tmp"/stdin ;;
31176 [\\/$]*)
31177 # Absolute (can't be DOS-style, as IFS=:)
31178 test -f "$f" || { { echo "$as_me:31178: error: cannot find input file: $f" >&5
31179 echo "$as_me: error: cannot find input file: $f" >&2;}
31180 { (exit 1); exit 1; }; }
31181 echo $f;;
31182 *) # Relative
31183 if test -f "$f"; then
31184 # Build tree
31185 echo $f
31186 elif test -f "$srcdir/$f"; then
31187 # Source tree
31188 echo "$srcdir/$f"
31189 else
31190 # /dev/null tree
31191 { { echo "$as_me:31191: error: cannot find input file: $f" >&5
31192 echo "$as_me: error: cannot find input file: $f" >&2;}
31193 { (exit 1); exit 1; }; }
31194 fi;;
31195 esac
31196 done` || { (exit 1); exit 1; }
31197 # Remove the trailing spaces.
31198 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
31199
31200 EOF
31201
31202 # Transform confdefs.h into a list of #define's. We won't use it as a sed
31203 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
31204 # be either 'cat' or 'sort'.
31205 cat confdefs.h | uniq >conftest.vals
31206
31207 # Break up conftest.vals because some shells have a limit on
31208 # the size of here documents, and old seds have small limits too.
31209
31210 rm -f conftest.tail
31211 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
31212 while grep . conftest.vals >/dev/null
31213 do
31214 # Write chunks of a limited-size here document to conftest.frag.
31215 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
31216 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
31217 echo 'CEOF' >> "$CONFIG_STATUS"
31218 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
31219 rm -f conftest.vals
31220 mv conftest.tail conftest.vals
31221 done
31222 rm -f conftest.vals
31223
31224 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
31225 # marker @DEFS@.
31226 echo ' cat >> conftest.edit <<CEOF
31227 /@DEFS@/r conftest.frag
31228 /@DEFS@/d
31229 CEOF
31230 sed -f conftest.edit "$tmp"/in > "$tmp"/out
31231 rm -f "$tmp"/in
31232 mv "$tmp"/out "$tmp"/in
31233 rm -f conftest.edit conftest.frag
31234 ' >> "$CONFIG_STATUS"
31235
31236 cat >>"$CONFIG_STATUS" <<\EOF
31237 # Let's still pretend it is `configure' which instantiates (i.e., don't
31238 # use $as_me), people would be surprised to read:
31239 # /* config.h. Generated automatically by config.status. */
31240 if test x"$ac_file" = x-; then
31241 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
31242 else
31243 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
31244 fi
31245 cat "$tmp"/in >>"$tmp"/config.h
31246 rm -f "$tmp"/in
31247 if test x"$ac_file" != x-; then
31248 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
31249 { echo "$as_me:31249: $ac_file is unchanged" >&5
31250 echo "$as_me: $ac_file is unchanged" >&6;}
31251 else
31252 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31253 X"$ac_file" : 'X\(//\)[^/]' \| \
31254 X"$ac_file" : 'X\(//\)$' \| \
31255 X"$ac_file" : 'X\(/\)' \| \
31256 . : '\(.\)' 2>/dev/null ||
31257 echo X"$ac_file" |
31258 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
31259 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
31260 /^X\(\/\/\)$/{ s//\1/; q; }
31261 /^X\(\/\).*/{ s//\1/; q; }
31262 s/.*/./; q'`
31263 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
31264 { case "$ac_dir" in
31265 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
31266 *) as_incr_dir=.;;
31267 esac
31268 as_dummy="$ac_dir"
31269 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
31270 case $as_mkdir_dir in
31271 # Skip DOS drivespec
31272 ?:) as_incr_dir=$as_mkdir_dir ;;
31273 *)
31274 as_incr_dir=$as_incr_dir/$as_mkdir_dir
31275 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
31276 ;;
31277 esac
31278 done; }
31279
31280 fi
31281 rm -f "$ac_file"
31282 mv "$tmp/config.h" "$ac_file"
31283 fi
31284 else
31285 cat "$tmp"/config.h
31286 rm -f "$tmp"/config.h
31287 fi
31288 done
31289 EOF
31290 cat >>"$CONFIG_STATUS" <<\EOF
31291 #
31292 # CONFIG_COMMANDS section.
31293 #
31294 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
31295 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
31296 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
31297
31298 case "$ac_dest" in
31299 default )
31300 if test "x$cf_with_tests" != xno ; then
31301
31302 for cf_dir in test
31303 do
31304 if test ! -d "$srcdir/$cf_dir" ; then
31305 continue
31306 elif test -f "$srcdir/$cf_dir/programs" ; then
31307 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
31308 fi
31309 done
31310
31311 fi
31312
31313 cf_prefix=$LIB_PREFIX
31314
31315 case "$cf_cv_shlib_version" in
31316 (cygdll|msysdll|mingw|msvcdll)
31317 TINFO_NAME=$TINFO_ARG_SUFFIX
31318 TINFO_SUFFIX=.dll
31319 ;;
31320 esac
31321
31322 if test -n "$TINFO_SUFFIX" ; then
31323 case "$TINFO_SUFFIX" in
31324 (tw*)
31325 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
31326 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31327 ;;
31328 (t*)
31329 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
31330 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
31331 ;;
31332 (w*)
31333 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
31334 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
31335 ;;
31336 esac
31337 fi
31338
31339 for cf_dir in $SRC_SUBDIRS
31340 do
31341 if test ! -d "$srcdir/$cf_dir" ; then
31342 continue
31343 elif test -f "$srcdir/$cf_dir/modules" ; then
31344
31345 SHARED_LIB=
31346 Libs_To_Make=
31347 cf_awk_program=
31348 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
31349 then
31350 cf_awk_program="$cf_awk_program\
31351 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
31352 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
31353 "
31354 fi
31355
31356 if test "x$WILDCARD_SYMS" = xno
31357 then
31358 cf_awk_program="$cf_awk_program\
31359 /[ ]_\\*;/ { skip=1; next; }\
31360 "
31361 fi
31362
31363 if test "x$cf_awk_program" != "x"
31364 then
31365 cat >>$cf_dir/Makefile <<CF_EOF
31366
31367 # Generated by CF_LIB_RULES
31368 resulting.map: $UNALTERED_SYMS
31369 $AWK 'BEGIN { skip = 1; last=""; } \
31370 $cf_awk_program \
31371 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
31372 skip = 0; last = \$\$0; } \
31373 END { print last; }' < "$UNALTERED_SYMS" >\$@
31374
31375 distclean::
31376 rm -f resulting.map
31377 CF_EOF
31378 fi
31379
31380 for cf_item in $cf_LIST_MODELS
31381 do
31382
31383 case X$cf_item in
31384 (Xlibtool)
31385 cf_suffix='.la'
31386 cf_depsuf=$cf_suffix
31387 ;;
31388 (Xdebug)
31389 case "$cf_cv_system_name" in
31390 (*-msvc*)
31391 cf_suffix='_g.lib'
31392 ;;
31393 (*)
31394 cf_suffix='_g.a'
31395 ;;
31396 esac
31397 cf_depsuf=$cf_suffix
31398 ;;
31399 (Xprofile)
31400 case "$cf_cv_system_name" in
31401 (*-msvc*)
31402 cf_suffix='_p.lib'
31403 ;;
31404 (*)
31405 cf_suffix='_p.a'
31406 ;;
31407 esac
31408 cf_depsuf=$cf_suffix
31409 ;;
31410 (Xshared)
31411 case "$cf_cv_system_name" in
31412 (aix[5-7]*)
31413 cf_suffix='.so'
31414 cf_depsuf=$cf_suffix
31415 ;;
31416 (*-msvc*)
31417 cf_suffix='.dll'
31418 cf_depsuf='.dll.lib'
31419 ;;
31420 (cygwin*|msys*|mingw*)
31421 cf_suffix='.dll'
31422 cf_depsuf='.dll.a'
31423 ;;
31424 (darwin*)
31425 cf_suffix='.dylib'
31426 cf_depsuf=$cf_suffix
31427 ;;
31428 (hpux*)
31429 case "$target" in
31430 (ia64*)
31431 cf_suffix='.so'
31432 cf_depsuf=$cf_suffix
31433 ;;
31434 (*)
31435 cf_suffix='.sl'
31436 cf_depsuf=$cf_suffix
31437 ;;
31438 esac
31439 ;;
31440 (*)
31441 cf_suffix='.so'
31442 cf_depsuf=$cf_suffix
31443 ;;
31444 esac
31445 ;;
31446 (*)
31447 case "$target" in
31448 (*-msvc*)
31449 cf_suffix='.lib'
31450 ;;
31451 (*)
31452 cf_suffix='.a'
31453 ;;
31454 esac
31455 cf_depsuf=$cf_suffix
31456 ;;
31457 esac
31458 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
31459 then
31460 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
31461 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
31462 fi
31463
31464 if test "$cf_dir" = "c++"
31465 then
31466
31467 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31468
31469 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31470
31471 else
31472
31473 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31474
31475 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31476
31477 fi
31478 test -z "$cf_libname" && cf_libname="$cf_dir"
31479 if test "$cf_item" = shared ; then
31480 if test -n "${LIB_SUFFIX}"
31481 then
31482 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${ABI_SUFFIX}"'//'`
31483 else
31484 cf_shared_suffix="$cf_suffix"
31485 fi
31486 if test "$cf_cv_do_symlinks" = yes ; then
31487 cf_version_name=
31488
31489 case "$cf_cv_shlib_version" in
31490 (rel)
31491 cf_version_name=REL_VERSION
31492 ;;
31493 (abi)
31494 cf_version_name=ABI_VERSION
31495 ;;
31496 esac
31497
31498 if test -n "$cf_version_name"
31499 then
31500 case "$cf_cv_system_name" in
31501 (darwin*)
31502 # "w", etc?
31503 cf_suffix="${ABI_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
31504 ;;
31505 (*)
31506 cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
31507 ;;
31508 esac
31509 fi
31510 if test -n "${ABI_SUFFIX}"
31511 then
31512 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${ABI_SUFFIX}"'//'`
31513 else
31514 cf_shared_suffix="$cf_suffix"
31515 fi
31516 fi
31517 # cygwin needs import library, and has unique naming convention
31518 # use autodetected ${cf_prefix} for import lib and static lib, but
31519 # use 'cyg' prefix for shared lib.
31520 case "$cf_cv_shlib_version" in
31521 (cygdll)
31522 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31523 cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
31524 ;;
31525 (msysdll)
31526 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31527 cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
31528 ;;
31529 (mingw)
31530 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31531 cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
31532 ;;
31533 (msvcdll)
31534 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31535 cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
31536 ;;
31537 (*)
31538 cf_add_lib=
31539 ;;
31540 esac
31541 if test -n "$cf_add_lib"
31542 then
31543 Libs_To_Make="$Libs_To_Make $cf_add_lib"
31544 continue
31545 fi
31546 fi
31547 cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
31548 Libs_To_Make="$Libs_To_Make $cf_add_lib"
31549 done
31550
31551 if test "$cf_dir" = ncurses ; then
31552 cf_subsets="$LIB_SUBSETS"
31553 cf_r_parts="$cf_subsets"
31554 cf_liblist="$Libs_To_Make"
31555
31556 while test -n "$cf_r_parts"
31557 do
31558 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
31559 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
31560 if test "$cf_l_parts" != "$cf_r_parts" ; then
31561 cf_add_lib=
31562 case "$cf_l_parts" in
31563 (*termlib*)
31564 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${ABI_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
31565 ;;
31566 (*ticlib*)
31567 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${ABI_SUFFIX}%${TICS_LIB_SUFFIX}%g`
31568 ;;
31569 (*)
31570 break
31571 ;;
31572 esac
31573 if test -n "$cf_add_lib"; then
31574 Libs_To_Make="$cf_add_lib $Libs_To_Make"
31575 fi
31576 else
31577 break
31578 fi
31579 done
31580 else
31581 cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
31582 fi
31583
31584 if test "$cf_dir" = c++; then
31585 if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
31586 cf_list=
31587 for cf_item in $Libs_To_Make
31588 do
31589 case "$cf_item" in
31590 (*.a)
31591 ;;
31592 (*)
31593 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
31594 ;;
31595 esac
31596 for cf_test in $cf_list
31597 do
31598 if test "$cf_test" = "$cf_item"
31599 then
31600 cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
31601 cf_item=
31602 break
31603 fi
31604 done
31605 test -n "$cf_item" && cf_list="$cf_list $cf_item"
31606 done
31607 Libs_To_Make="$cf_list"
31608 fi
31609 fi
31610
31611 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
31612 -e "s%@SHARED_LIB@%$SHARED_LIB%" \
31613 "$cf_dir/Makefile" >$cf_dir/Makefile.out
31614 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
31615
31616 $AWK -f "$srcdir/mk-0th.awk" \
31617 libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
31618 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31619
31620 for cf_subset in $cf_subsets
31621 do
31622 cf_subdirs=
31623 for cf_item in $cf_LIST_MODELS
31624 do
31625
31626 echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
31627
31628 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31629
31630 CXX_MODEL=$cf_ITEM
31631 if test "$CXX_MODEL" = SHARED; then
31632 case "$cf_cv_shlib_version" in
31633 (cygdll|msysdll|mingw|msvcdll)
31634 test "x$with_shared_cxx" = xno && test -n "$verbose" && echo " overriding CXX_MODEL to SHARED" 1>&6
31635
31636 echo "${as_me:-configure}:31636: testing overriding CXX_MODEL to SHARED ..." 1>&5
31637
31638 with_shared_cxx=yes
31639 ;;
31640 (*)
31641 test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
31642 ;;
31643 esac
31644 fi
31645
31646 case X$cf_item in
31647 (Xlibtool)
31648 cf_suffix='.la'
31649 cf_depsuf=$cf_suffix
31650 ;;
31651 (Xdebug)
31652 case "$cf_cv_system_name" in
31653 (*-msvc*)
31654 cf_suffix='_g.lib'
31655 ;;
31656 (*)
31657 cf_suffix='_g.a'
31658 ;;
31659 esac
31660 cf_depsuf=$cf_suffix
31661 ;;
31662 (Xprofile)
31663 case "$cf_cv_system_name" in
31664 (*-msvc*)
31665 cf_suffix='_p.lib'
31666 ;;
31667 (*)
31668 cf_suffix='_p.a'
31669 ;;
31670 esac
31671 cf_depsuf=$cf_suffix
31672 ;;
31673 (Xshared)
31674 case "$cf_cv_system_name" in
31675 (aix[5-7]*)
31676 cf_suffix='.so'
31677 cf_depsuf=$cf_suffix
31678 ;;
31679 (*-msvc*)
31680 cf_suffix='.dll'
31681 cf_depsuf='.dll.lib'
31682 ;;
31683 (cygwin*|msys*|mingw*)
31684 cf_suffix='.dll'
31685 cf_depsuf='.dll.a'
31686 ;;
31687 (darwin*)
31688 cf_suffix='.dylib'
31689 cf_depsuf=$cf_suffix
31690 ;;
31691 (hpux*)
31692 case "$target" in
31693 (ia64*)
31694 cf_suffix='.so'
31695 cf_depsuf=$cf_suffix
31696 ;;
31697 (*)
31698 cf_suffix='.sl'
31699 cf_depsuf=$cf_suffix
31700 ;;
31701 esac
31702 ;;
31703 (*)
31704 cf_suffix='.so'
31705 cf_depsuf=$cf_suffix
31706 ;;
31707 esac
31708 ;;
31709 (*)
31710 case "$target" in
31711 (*-msvc*)
31712 cf_suffix='.lib'
31713 ;;
31714 (*)
31715 cf_suffix='.a'
31716 ;;
31717 esac
31718 cf_depsuf=$cf_suffix
31719 ;;
31720 esac
31721 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
31722 then
31723 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
31724 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
31725 fi
31726
31727 case $cf_item in
31728 (libtool) cf_subdir='obj_lo' ;;
31729 (normal) cf_subdir='objects' ;;
31730 (debug) cf_subdir='obj_g' ;;
31731 (profile) cf_subdir='obj_p' ;;
31732 (shared)
31733 case "$cf_cv_system_name" in
31734 (cygwin|msys)
31735 cf_subdir='objects' ;;
31736 (*)
31737 cf_subdir='obj_s' ;;
31738 esac
31739 esac
31740
31741 # Test for case where we build libtinfo with a different name.
31742 cf_libname=$cf_dir
31743 if test "$cf_dir" = ncurses ; then
31744 case "$cf_subset" in
31745 (*base*)
31746 cf_libname=${cf_libname}$ABI_SUFFIX
31747 ;;
31748 (*termlib*)
31749 cf_libname=$TINFO_LIB_SUFFIX
31750 ;;
31751 (ticlib*)
31752 cf_libname=$TICS_LIB_SUFFIX
31753 ;;
31754 esac
31755 elif test "$cf_dir" = c++ ; then
31756
31757 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31758
31759 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31760
31761 cf_libname=${cf_libname}$ABI_SUFFIX
31762 else
31763
31764 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31765
31766 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31767
31768 cf_libname=${cf_libname}$ABI_SUFFIX
31769 fi
31770 if test -n "${USE_ARG_SUFFIX}" ; then
31771 # undo $ABI_SUFFIX add-on in CF_LIB_SUFFIX
31772 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${ABI_SUFFIX}%%"`
31773 fi
31774
31775 # These dependencies really are for development, not
31776 # builds, but they are useful in porting, too.
31777 cf_depend="../include/ncurses_cfg.h"
31778 if test "$srcdir" = "."; then
31779 cf_reldir="."
31780 else
31781 cf_reldir="\${srcdir}"
31782 fi
31783
31784 if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
31785 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
31786 elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
31787 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31788 fi
31789
31790 cf_dir_suffix=
31791 old_cf_suffix="$cf_suffix"
31792 if test "$cf_cv_shlib_version_infix" = yes ; then
31793 if test -n "$ABI_SUFFIX" ; then
31794 case "$ABI_SUFFIX" in
31795 (tw*)
31796 cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31797 cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31798 cf_dir_suffix=tw$EXTRA_SUFFIX
31799 ;;
31800 (t*)
31801 cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31802 cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
31803 cf_dir_suffix=t$EXTRA_SUFFIX
31804 ;;
31805 (w*)
31806 cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31807 cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31808 cf_dir_suffix=w$EXTRA_SUFFIX
31809 ;;
31810 (*)
31811 cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31812 cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31813 cf_dir_suffix=$EXTRA_SUFFIX
31814 ;;
31815 esac
31816 fi
31817 fi
31818
31819 $AWK -f "$srcdir/mk-1st.awk" \
31820 name=${cf_libname}${cf_dir_suffix} \
31821 traces=$LIB_TRACING \
31822 MODEL=$cf_ITEM \
31823 CXX_MODEL=$CXX_MODEL \
31824 ABI_SUFFIX=$ABI_SUFFIX \
31825 LIB_SUFFIX=$LIB_SUFFIX \
31826 make_phony="${cf_cv_make_PHONY:-no}" \
31827 model=$cf_subdir \
31828 prefix=$cf_prefix \
31829 suffix=$cf_suffix \
31830 subset=$cf_subset \
31831 driver=$cf_cv_term_driver \
31832 SymLink="$LN_S" \
31833 TermlibRoot=$TINFO_NAME \
31834 TermlibSuffix=$TINFO_SUFFIX \
31835 ShlibVer=$cf_cv_shlib_version \
31836 ShlibVerInfix=$cf_cv_shlib_version_infix \
31837 ReLink=${cf_cv_do_relink:-no} \
31838 ReRanlib=${cf_cv_do_reranlib:-yes} \
31839 DoLinks=$cf_cv_do_symlinks \
31840 rmSoLocs=$cf_cv_rm_so_locs \
31841 ldconfig="$LDCONFIG" \
31842 overwrite=$WITH_OVERWRITE \
31843 depend="$cf_depend" \
31844 host="$host" \
31845 libtool_version="$LIBTOOL_VERSION" \
31846 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31847
31848 cf_suffix="$old_cf_suffix"
31849
31850 for cf_subdir2 in $cf_subdirs lib
31851 do
31852 test "$cf_subdir" = "$cf_subdir2" && break
31853 done
31854 test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31855 $AWK -f "$srcdir/mk-2nd.awk" \
31856 name=$cf_dir \
31857 traces=$LIB_TRACING \
31858 MODEL=$cf_ITEM \
31859 model=$cf_subdir \
31860 subset=$cf_subset \
31861 srcdir=$srcdir \
31862 echo=$WITH_ECHO \
31863 crenames=$cf_cv_prog_CC_c_o \
31864 cxxrenames=$cf_cv_prog_CXX_c_o \
31865 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31866 cf_subdirs="$cf_subdirs $cf_subdir"
31867 done
31868 done
31869 fi
31870
31871 echo ' ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31872 done
31873
31874 echo >> Makefile
31875 echo '# generated by CF_LIB_RULES' >> Makefile
31876
31877 if test "x$cf_cv_make_PHONY" = xyes ; then
31878 cat >> Makefile <<-CF_EOF
31879
31880 .PHONY : libs
31881 .PHONY : lintlib
31882 .PHONY : install.includes
31883 .PHONY : uninstall.includes
31884 .PHONY : install.libs
31885 .PHONY : uninstall.libs
31886 CF_EOF
31887 fi
31888
31889 for cf_dir in $SRC_SUBDIRS
31890 do
31891 if test ! -d "$srcdir/$cf_dir" ; then
31892 continue
31893 fi
31894
31895 if test -f "$cf_dir/Makefile" ; then
31896 case "$cf_dir" in
31897 (Ada95)
31898 echo 'libs \' >> Makefile
31899 echo 'install.libs \' >> Makefile
31900 echo 'uninstall.libs ::' >> Makefile
31901 echo ' ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31902 ;;
31903 esac
31904 fi
31905
31906 if test -f "$srcdir/$cf_dir/modules" ; then
31907
31908 if test "x$cf_cv_make_PHONY" = xyes ; then
31909 cat >> Makefile <<-CF_EOF
31910
31911 .PHONY : install.$cf_dir
31912 .PHONY : uninstall.$cf_dir
31913 CF_EOF
31914 fi
31915
31916 echo >> Makefile
31917 if test -f "$srcdir/$cf_dir/headers" ; then
31918 cat >> Makefile <<CF_EOF
31919 install.includes \\
31920 uninstall.includes \\
31921 CF_EOF
31922 fi
31923
31924 cat >> Makefile <<CF_EOF
31925 lint \\
31926 libs \\
31927 lintlib \\
31928 install.libs \\
31929 uninstall.libs \\
31930 install.$cf_dir \\
31931 uninstall.$cf_dir ::
31932 ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31933 CF_EOF
31934 elif test -f "$srcdir/$cf_dir/headers" ; then
31935 cat >> Makefile <<CF_EOF
31936
31937 libs \\
31938 install.libs \\
31939 uninstall.libs \\
31940 install.includes \\
31941 uninstall.includes ::
31942 ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31943 CF_EOF
31944 fi
31945 done
31946
31947 if test "x$cf_cv_make_PHONY" = xyes ; then
31948 cat >> Makefile <<-CF_EOF
31949
31950 .PHONY : install.data
31951 .PHONY : uninstall.data
31952 CF_EOF
31953 fi
31954
31955 if test "x$cf_with_db_install" = xyes; then
31956 cat >> Makefile <<CF_EOF
31957
31958 install.libs uninstall.libs \\
31959 install.data uninstall.data ::
31960 $MAKE_TERMINFO ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31961 CF_EOF
31962 else
31963 cat >> Makefile <<CF_EOF
31964
31965 install.libs uninstall.libs ::
31966 ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31967 CF_EOF
31968 fi
31969
31970 if test "x$cf_with_manpages" = xyes; then
31971
31972 if test "x$cf_cv_make_PHONY" = xyes ; then
31973 cat >> Makefile <<-CF_EOF
31974
31975 .PHONY : install.man
31976 .PHONY : uninstall.man
31977 CF_EOF
31978 fi
31979
31980 cat >> Makefile <<CF_EOF
31981
31982 install.man \\
31983 uninstall.man ::
31984 ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31985 CF_EOF
31986 fi
31987
31988 cat >> Makefile <<CF_EOF
31989
31990 distclean ::
31991 rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31992 rm -f headers.sh headers.sed mk_shared_lib.sh
31993 rm -f edit_man.* man_alias.* *.tmp
31994 rm -rf \${DIRS_TO_MAKE}
31995 CF_EOF
31996
31997 rm -f headers.sed headers.sh
31998
31999 echo creating headers.sh
32000 cat >headers.sh <<CF_EOF
32001 #! $SHELL
32002 # This shell script is generated by the 'configure' script. It is invoked in a
32003 # subdirectory of the build tree. It generates a sed script in the parent
32004 # directory that is used to adjust includes for header files that reside in a
32005 # subdirectory of /usr/include, etc.
32006 PRG=""
32007 while test \$# != 3
32008 do
32009 PRG="\$PRG \$1"; shift
32010 done
32011 DST=\$1
32012 REF=\$2
32013 SRC=\$3
32014 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
32015 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
32016 echo installing \$SRC in \$DST
32017 CF_EOF
32018
32019 if test "$WITH_CURSES_H" = yes; then
32020 cat >>headers.sh <<CF_EOF
32021 case \$DST in
32022 ($GLOB_FULLPATH_POSIX/include/*)
32023 END=\`basename \$DST\`
32024 for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
32025 do
32026 NAME=\`basename \$i\`
32027 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
32028 done
32029 ;;
32030 (*)
32031 echo "" >> \$TMPSED
32032 ;;
32033 esac
32034 CF_EOF
32035
32036 else
32037 cat >>headers.sh <<CF_EOF
32038 case \$DST in
32039 ($GLOB_FULLPATH_POSIX/include/*)
32040 END=\`basename \$DST\`
32041 for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
32042 do
32043 NAME=\`basename \$i\`
32044 if test "\$NAME" = "curses.h"
32045 then
32046 echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
32047 NAME=ncurses.h
32048 fi
32049 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
32050 done
32051 ;;
32052 (*)
32053 echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
32054 ;;
32055 esac
32056 CF_EOF
32057 fi
32058 cat >>headers.sh <<CF_EOF
32059 rm -f \$TMPSRC
32060 sed -f \$TMPSED \$SRC > \$TMPSRC
32061 NAME=\`basename \$SRC\`
32062 CF_EOF
32063 if test "$WITH_CURSES_H" != yes; then
32064 cat >>headers.sh <<CF_EOF
32065 test "\$NAME" = "curses.h" && NAME=ncurses.h
32066 CF_EOF
32067 fi
32068 cat >>headers.sh <<CF_EOF
32069 # Just in case someone gzip'd man pages, remove the conflicting copy.
32070 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
32071
32072 eval \$PRG \$TMPSRC \$DST/\$NAME
32073 rm -f \$TMPSRC \$TMPSED
32074 CF_EOF
32075
32076 chmod 0755 headers.sh
32077
32078 for cf_dir in $SRC_SUBDIRS
32079 do
32080 if test ! -d "$srcdir/$cf_dir" ; then
32081 continue
32082 fi
32083
32084 if test -f "$srcdir/$cf_dir/headers" ; then
32085 $AWK -f "$srcdir/mk-hdr.awk" \
32086 subset="$LIB_SUBSETS" \
32087 compat="$WITH_CURSES_H" \
32088 "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
32089 fi
32090
32091 if test -f "$srcdir/$cf_dir/modules" ; then
32092 if test "$cf_dir" != "c++" ; then
32093 if test "x$cf_cv_make_PHONY" = xyes ; then
32094 cat >> $cf_dir/Makefile <<-CF_EOF
32095
32096 .PHONY : depend
32097 CF_EOF
32098 fi
32099
32100 cat >>$cf_dir/Makefile <<"CF_EOF"
32101 depend : ${AUTO_SRC}
32102 makedepend -- ${CPPFLAGS} -- ${C_SRC}
32103
32104 # DO NOT DELETE THIS LINE -- make depend depends on it.
32105 CF_EOF
32106 fi
32107 fi
32108 done
32109
32110 if test "$MANPAGE_RENAMES" != no ; then
32111 # Construct a sed script to perform renaming within man pages
32112 test -n "$verbose" && echo "creating edit_man.sed"
32113 test ! -d man && mkdir man
32114 FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
32115 fi
32116
32117 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
32118 if test -z "$USE_OLD_MAKERULES" ; then
32119 $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
32120 fi
32121 fi
32122 ;;
32123 esac
32124 done
32125 EOF
32126
32127 cat >>"$CONFIG_STATUS" <<\EOF
32128
32129 { (exit 0); exit 0; }
32130 EOF
32131 chmod +x "$CONFIG_STATUS"
32132 ac_clean_files=$ac_clean_files_save
32133
32134 # configure is writing to config.log, and then calls config.status.
32135 # config.status does its own redirection, appending to config.log.
32136 # Unfortunately, on DOS this fails, as config.log is still kept open
32137 # by configure, so config.status won't be able to write to it; its
32138 # output is simply discarded. So we exec the FD to /dev/null,
32139 # effectively closing config.log, so it can be properly (re)opened and
32140 # appended to by config.status. When coming back to configure, we
32141 # need to make the FD available again.
32142 if test "$no_create" != yes; then
32143 ac_cs_success=:
32144 exec 5>/dev/null
32145 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
32146 exec 5>>config.log
32147 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32148 # would make configure fail if this is the last instruction.
32149 "$ac_cs_success" || { (exit 1); exit 1; }
32150 fi
32151
32152 ${MAKE:-make} preinstall