libncurses: updated to 6.0
[tomato.git] / release / src / router / libncurses / configure
blob25e351be57a35ab1455f31b8e15f5c49b283f478
1 #! /bin/sh
2 # From configure.in Revision: 1.618 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20141204.
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26 emulate sh
27 NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29 set -o posix
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36 as_expr=expr
37 else
38 as_expr=false
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44 # We could just check for DJGPP; but this test a) works b) is more generic
45 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46 if test -f conf$$.exe; then
47 # Don't use ln at all; we don't have any links
48 as_ln_s='cp -p'
49 else
50 as_ln_s='ln -s'
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53 as_ln_s=ln
54 else
55 as_ln_s='cp -p'
57 rm -f conf$$ conf$$.exe conf$$.file
59 as_executable_p="test -f"
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63 as_unset=unset
64 else
65 as_unset=false
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
82 IFS=" $as_nl"
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92 exec 6>&1
95 # Initializations.
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete. It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 # include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 # include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 # include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
192 ac_prev=
193 for ac_option
195 # If the previous option needs an argument, assign it.
196 if test -n "$ac_prev"; then
197 eval "$ac_prev=\$ac_option"
198 ac_prev=
199 continue
202 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204 # Accept the important Cygnus configure options, so we can diagnose typos.
206 case $ac_option in
208 -bindir | --bindir | --bindi | --bind | --bin | --bi)
209 ac_prev=bindir ;;
210 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211 bindir=$ac_optarg ;;
213 -build | --build | --buil | --bui | --bu)
214 ac_prev=build_alias ;;
215 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216 build_alias=$ac_optarg ;;
218 -cache-file | --cache-file | --cache-fil | --cache-fi \
219 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220 ac_prev=cache_file ;;
221 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223 cache_file=$ac_optarg ;;
225 --config-cache | -C)
226 cache_file=config.cache ;;
228 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229 ac_prev=datadir ;;
230 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231 | --da=*)
232 datadir=$ac_optarg ;;
234 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235 | --dataroo | --dataro | --datar)
236 ac_prev=datarootdir ;;
237 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239 datarootdir=$ac_optarg ;;
241 -disable-* | --disable-*)
242 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243 # Reject names that are not valid shell variable names.
244 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246 { (exit 1); exit 1; }; }
247 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248 eval "enable_$ac_feature=no" ;;
250 -enable-* | --enable-*)
251 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252 # Reject names that are not valid shell variable names.
253 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255 { (exit 1); exit 1; }; }
256 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257 case $ac_option in
258 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259 *) ac_optarg=yes ;;
260 esac
261 eval "enable_$ac_feature='$ac_optarg'" ;;
263 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265 | --exec | --exe | --ex)
266 ac_prev=exec_prefix ;;
267 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269 | --exec=* | --exe=* | --ex=*)
270 exec_prefix=$ac_optarg ;;
272 -gas | --gas | --ga | --g)
273 # Obsolete; use --with-gas.
274 with_gas=yes ;;
276 -help | --help | --hel | --he | -h)
277 ac_init_help=long ;;
278 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279 ac_init_help=recursive ;;
280 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281 ac_init_help=short ;;
283 -host | --host | --hos | --ho)
284 ac_prev=host_alias ;;
285 -host=* | --host=* | --hos=* | --ho=*)
286 host_alias=$ac_optarg ;;
288 -includedir | --includedir | --includedi | --included | --include \
289 | --includ | --inclu | --incl | --inc)
290 ac_prev=includedir ;;
291 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292 | --includ=* | --inclu=* | --incl=* | --inc=*)
293 includedir=$ac_optarg ;;
295 -infodir | --infodir | --infodi | --infod | --info | --inf)
296 ac_prev=infodir ;;
297 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298 infodir=$ac_optarg ;;
300 -libdir | --libdir | --libdi | --libd)
301 ac_prev=libdir ;;
302 -libdir=* | --libdir=* | --libdi=* | --libd=*)
303 libdir=$ac_optarg ;;
305 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306 | --libexe | --libex | --libe)
307 ac_prev=libexecdir ;;
308 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309 | --libexe=* | --libex=* | --libe=*)
310 libexecdir=$ac_optarg ;;
312 -localstatedir | --localstatedir | --localstatedi | --localstated \
313 | --localstate | --localstat | --localsta | --localst \
314 | --locals | --local | --loca | --loc | --lo)
315 ac_prev=localstatedir ;;
316 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319 localstatedir=$ac_optarg ;;
321 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322 ac_prev=mandir ;;
323 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324 mandir=$ac_optarg ;;
326 -nfp | --nfp | --nf)
327 # Obsolete; use --without-fp.
328 with_fp=no ;;
330 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331 | --no-cr | --no-c)
332 no_create=yes ;;
334 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336 no_recursion=yes ;;
338 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340 | --oldin | --oldi | --old | --ol | --o)
341 ac_prev=oldincludedir ;;
342 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345 oldincludedir=$ac_optarg ;;
347 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348 ac_prev=prefix ;;
349 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350 prefix=$ac_optarg ;;
352 -program-prefix | --program-prefix | --program-prefi | --program-pref \
353 | --program-pre | --program-pr | --program-p)
354 ac_prev=program_prefix ;;
355 -program-prefix=* | --program-prefix=* | --program-prefi=* \
356 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357 program_prefix=$ac_optarg ;;
359 -program-suffix | --program-suffix | --program-suffi | --program-suff \
360 | --program-suf | --program-su | --program-s)
361 ac_prev=program_suffix ;;
362 -program-suffix=* | --program-suffix=* | --program-suffi=* \
363 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364 program_suffix=$ac_optarg ;;
366 -program-transform-name | --program-transform-name \
367 | --program-transform-nam | --program-transform-na \
368 | --program-transform-n | --program-transform- \
369 | --program-transform | --program-transfor \
370 | --program-transfo | --program-transf \
371 | --program-trans | --program-tran \
372 | --progr-tra | --program-tr | --program-t)
373 ac_prev=program_transform_name ;;
374 -program-transform-name=* | --program-transform-name=* \
375 | --program-transform-nam=* | --program-transform-na=* \
376 | --program-transform-n=* | --program-transform-=* \
377 | --program-transform=* | --program-transfor=* \
378 | --program-transfo=* | --program-transf=* \
379 | --program-trans=* | --program-tran=* \
380 | --progr-tra=* | --program-tr=* | --program-t=*)
381 program_transform_name=$ac_optarg ;;
383 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384 | -silent | --silent | --silen | --sile | --sil)
385 silent=yes ;;
387 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388 ac_prev=sbindir ;;
389 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390 | --sbi=* | --sb=*)
391 sbindir=$ac_optarg ;;
393 -sharedstatedir | --sharedstatedir | --sharedstatedi \
394 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395 | --sharedst | --shareds | --shared | --share | --shar \
396 | --sha | --sh)
397 ac_prev=sharedstatedir ;;
398 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401 | --sha=* | --sh=*)
402 sharedstatedir=$ac_optarg ;;
404 -site | --site | --sit)
405 ac_prev=site ;;
406 -site=* | --site=* | --sit=*)
407 site=$ac_optarg ;;
409 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410 ac_prev=srcdir ;;
411 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412 srcdir=$ac_optarg ;;
414 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415 | --syscon | --sysco | --sysc | --sys | --sy)
416 ac_prev=sysconfdir ;;
417 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419 sysconfdir=$ac_optarg ;;
421 -target | --target | --targe | --targ | --tar | --ta | --t)
422 ac_prev=target_alias ;;
423 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424 target_alias=$ac_optarg ;;
426 -v | -verbose | --verbose | --verbos | --verbo | --verb)
427 verbose=yes ;;
429 -version | --version | --versio | --versi | --vers | -V)
430 ac_init_version=: ;;
432 -with-* | --with-*)
433 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434 # Reject names that are not valid shell variable names.
435 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436 { echo "$as_me: error: invalid package name: $ac_package" >&2
437 { (exit 1); exit 1; }; }
438 ac_package=`echo $ac_package| sed 's/-/_/g'`
439 case $ac_option in
440 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441 *) ac_optarg=yes ;;
442 esac
443 eval "with_$ac_package='$ac_optarg'" ;;
445 -without-* | --without-*)
446 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447 # Reject names that are not valid shell variable names.
448 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449 { echo "$as_me: error: invalid package name: $ac_package" >&2
450 { (exit 1); exit 1; }; }
451 ac_package=`echo $ac_package | sed 's/-/_/g'`
452 eval "with_$ac_package=no" ;;
454 --x)
455 # Obsolete; use --with-x.
456 with_x=yes ;;
458 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459 | --x-incl | --x-inc | --x-in | --x-i)
460 ac_prev=x_includes ;;
461 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463 x_includes=$ac_optarg ;;
465 -x-libraries | --x-libraries | --x-librarie | --x-librari \
466 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467 ac_prev=x_libraries ;;
468 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470 x_libraries=$ac_optarg ;;
472 -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474 { (exit 1); exit 1; }; }
477 *=*)
478 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479 # Reject names that are not valid shell variable names.
480 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482 { (exit 1); exit 1; }; }
483 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484 eval "$ac_envvar='$ac_optarg'"
485 export $ac_envvar ;;
488 # FIXME: should be removed in autoconf 3.0.
489 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
495 esac
496 done
498 if test -n "$ac_prev"; then
499 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500 { echo "$as_me: error: missing argument to $ac_option" >&2
501 { (exit 1); exit 1; }; }
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
507 eval ac_val=$`echo $ac_var`
508 case $ac_val in
509 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511 { (exit 1); exit 1; }; };;
512 esac
513 done
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517 localstatedir libdir includedir oldincludedir infodir mandir
519 eval ac_val=$`echo $ac_var`
520 case $ac_val in
521 [\\/$]* | ?:[\\/]* ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
524 esac
525 done
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535 if test "x$build_alias" = x; then
536 cross_compiling=maybe
537 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538 If a cross compiler is detected then cross compile mode will be used." >&2
539 elif test "x$build_alias" != "x$host_alias"; then
540 cross_compiling=yes
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
547 test "$silent" = yes && exec 6>/dev/null
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551 ac_srcdir_defaulted=yes
552 # Try the directory containing this script, then its parent.
553 ac_prog=$0
554 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556 srcdir=$ac_confdir
557 if test ! -r $srcdir/$ac_unique_file; then
558 srcdir=..
560 else
561 ac_srcdir_defaulted=no
563 if test ! -r $srcdir/$ac_unique_file; then
564 if test "$ac_srcdir_defaulted" = yes; then
565 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566 { (exit 1); exit 1; }; }
567 else
568 { echo "$as_me: error: cannot find sources in $srcdir" >&2
569 { (exit 1); exit 1; }; }
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
619 # Report the --help message.
621 if test "$ac_init_help" = "long"; then
622 # Omit some internal or obsolete options to make the list less imposing.
623 # This message is too long to be a string in the A/UX 3.1 sh.
624 cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
627 Usage: $0 [OPTION]... [VAR=VALUE]...
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE. See below for descriptions of some of the useful variables.
632 Defaults for the options are specified in brackets.
634 Configuration:
635 -h, --help display this help and exit
636 --help=short display options specific to this package
637 --help=recursive display the short help of all the included packages
638 -V, --version display version information and exit
639 -q, --quiet, --silent do not print \`checking...' messages
640 --cache-file=FILE cache test results in FILE [disabled]
641 -C, --config-cache alias for \`--cache-file=config.cache'
642 -n, --no-create do not create output files
643 --srcdir=DIR find the sources in DIR [configure dir or \`..']
647 cat <<EOF
648 Installation directories:
649 --prefix=PREFIX install architecture-independent files in PREFIX
650 [$ac_default_prefix]
651 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
652 [PREFIX]
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
659 For better control, use the options below.
661 Fine tuning of the installation directories:
662 --bindir=DIR user executables [EPREFIX/bin]
663 --sbindir=DIR system admin executables [EPREFIX/sbin]
664 --libexecdir=DIR program executables [EPREFIX/libexec]
665 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
666 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
667 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
668 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
669 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
670 --libdir=DIR object code libraries [EPREFIX/lib]
671 --includedir=DIR C header files [PREFIX/include]
672 --oldincludedir=DIR C header files for non-gcc [/usr/include]
673 --infodir=DIR info documentation [DATAROOTDIR/info]
674 --mandir=DIR man documentation [DATAROOTDIR/man]
677 cat <<\EOF
679 Program names:
680 --program-prefix=PREFIX prepend PREFIX to installed program names
681 --program-suffix=SUFFIX append SUFFIX to installed program names
682 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
684 System types:
685 --build=BUILD configure for building on BUILD [guessed]
686 --host=HOST build programs to run on HOST [BUILD]
687 --target=TARGET configure for building compilers for TARGET [HOST]
691 if test -n "$ac_init_help"; then
693 cat <<\EOF
695 Optional Packages:
696 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
697 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
699 Optional Features:
700 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
701 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
703 --with-rel-version=XXX override derived release version
704 --with-abi-version=XXX override derived ABI version
705 --with-system-type=XXX test: override derived host system-type
706 --without-ada suppress check for Ada95, don't build demo
707 --without-cxx do not adjust ncurses bool to match C++
708 --without-cxx-binding do not build C++ binding and demo
709 --disable-db-install suppress install of terminal database
710 --without-manpages suppress install of manpages
711 --without-progs suppress build/install with programs (e.g., tic)
712 --without-tests suppress build/install with test-programs
713 --without-curses-h install curses.h as ncurses.h only
714 --with-pkg-config{=path} enable/disable use of pkg-config
715 --with-pkg-config-libdir=XXX use given directory for installing pc-files
716 --enable-pc-files generate and install .pc files for pkg-config
717 --with-pc-suffix suffixes pc-files
718 --enable-mixed-case tic should assume mixed-case filenames
719 --with-install-prefix prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721 --with-build-cc=XXX the build C compiler ($BUILD_CC)
722 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
723 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728 --disable-libtool-version enable to use libtool's incompatible naming scheme
729 --with-libtool generate libraries with libtool
730 --with-shared generate shared-libraries
731 --with-normal generate normal-libraries (default)
732 --with-debug generate debug-libraries (default)
733 --with-profile generate profile-libraries
734 --with-cxx-shared generate C++ shared-libraries
735 --with-lib-prefix override library-prefix
736 --with-termlib generate separate terminfo library
737 --with-ticlib generate separate tic library
738 --with-gpm use Alessandro Rubini's GPM library
739 --without-dlsym do not use dlsym() to load GPM dynamically
740 --with-sysmouse use sysmouse (FreeBSD console)
741 --enable-rpath use rpath option when generating shared libraries
742 --disable-relink relink shared libraries during install
743 --with-shlib-version=X Specify rel or abi version for shared libs
744 --with-libtool-opts=XXX specify additional libtool options
745 --with-export-syms=XXX limit exported symbols using libtool
746 --with-versioned-syms=X markup versioned symbols using ld
747 --disable-lib-suffixes disable library suffixes
748 --disable-rpath-hack don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750 --with-extra-suffix=X append extra suffix to header/library paths
751 --disable-overwrite put headers in subdir, omit link to -lcurses
752 --disable-database do not use terminfo, only fallbacks/termcap
753 --with-database=XXX specify terminfo source to install
754 --with-hashed-db specify hashed-database library
755 --with-fallbacks=XXX specify list of fallback terminal descriptions
756 --without-xterm-new specify if xterm terminfo should be old version
757 --with-xterm-kbs=XXX specify if xterm backspace sends BS or DEL
758 --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
759 --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
760 --disable-big-core assume machine has little memory
761 --disable-big-strings assume compiler has only standard-size strings
762 --enable-termcap compile in termcap fallback support
763 --with-termpath=XXX specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
764 --enable-getcap fast termcap load, no xrefs to terminfo
765 --enable-getcap-cache cache translated termcaps in ~/.terminfo
766 --disable-home-terminfo drop ~/.terminfo from terminfo search-path
767 --disable-root-environ restrict environment when running as root
768 --enable-symlinks make tic use symbolic links not hard links
769 --enable-broken_linker compile with broken-linker support code
770 --enable-bsdpad recognize BSD-style prefix padding
771 --enable-widec compile with wide-char/UTF-8 code
772 --disable-lp64 allow chtype to be long (ignore _LP64)
773 --disable-largefile omit support for large files
774 --disable-tparm-varargs compile tparm() without varargs interface
775 --disable-tic-depends link tic library without explicit dependency on ncurses library
776 --with-bool=TYPE override fallback type of bool variable
777 --with-caps=alt compile with alternate Caps file
778 --with-chtype=TYPE override type of chtype
779 --with-ospeed=TYPE override type of ospeed variable
780 --with-mmask-t=TYPE override type of mmask_t
781 --with-ccharw-max=XXX override size CCHARW_MAX
782 --with-tparm-arg=TYPE override parameter type of tparm
783 --with-rcs-ids compile-in RCS identifiers
784 Options to Specify How Manpages are Installed:
785 --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and
786 optionally formatted/catonly, e.g., gzip,formatted
787 --with-manpage-renames specify manpage-renaming
788 --with-manpage-aliases specify manpage-aliases using .so
789 --with-manpage-symlinks specify manpage-aliases using symlinks
790 --with-manpage-tbl specify manpage processing with tbl
791 Extensions:
792 --disable-ext-funcs disable function-extensions
793 --enable-sp-funcs enable SCREEN-extensions
794 --enable-term-driver enable terminal-driver
795 --enable-const compile with extra/non-standard const
796 --enable-ext-colors compile for 256-color support
797 --enable-ext-mouse compile for extended mouse-encoding
798 --enable-ext-putwin compile with extended putwin/screendump
799 --enable-no-padding compile with $NCURSES_NO_PADDING code
800 --enable-signed-char compile using signed Boolean's in term.h
801 --enable-sigwinch compile with SIGWINCH handler
802 --enable-tcap-names compile with user-definable terminal capabilities
803 Development Code:
804 --without-develop disable development options
805 --enable-hard-tabs compile with hard-tabs code
806 --enable-xmc-glitch compile with support for xmc (magic-cookie)
807 Experimental Code:
808 --disable-assumed-color do not assume anything about default-colors
809 --disable-hashmap compile without hashmap scrolling-optimization
810 --enable-colorfgbg compile-in experimental $COLORFGBG code
811 --enable-interop compile-in interop bindings
812 --with-pthread use POSIX thread library
813 --enable-pthreads-eintr enable EINTR in wgetch with pthreads
814 --enable-weak-symbols enable weak-symbols for pthreads
815 --enable-reentrant compile with reentrant code
816 --with-wrap-prefix=XXX override prefix used for public variables
817 --enable-safe-sprintf compile with experimental safe-sprintf code
818 --disable-scroll-hints compile without scroll-hints code
819 --enable-wgetch-events compile with wgetch-events code
820 Testing/development Options:
821 --disable-echo do not display "compiling" commands
822 --enable-warnings build: turn on GCC compiler warnings
823 --enable-string-hacks work around bogus compiler/loader warnings
824 --enable-assertions test: turn on generation of assertion code
825 --with-dmalloc test: use Gray Watson's dmalloc library
826 --with-dbmalloc test: use Conor Cahill's dbmalloc library
827 --with-valgrind test: use valgrind
828 --disable-leaks test: free permanent memory, analyze leaks
829 --enable-expanded test: generate functions for certain macros
830 --disable-macros test: use functions rather than macros
831 --with-trace test: add trace() function to all models of ncurses
832 --disable-gnat-projects test: disable GNAT projects even if usable
833 Ada95 Binding Options:
834 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
835 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
836 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
837 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
839 Some influential environment variables:
840 CC C compiler command
841 CFLAGS C compiler flags
842 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
843 nonstandard directory <lib dir>
844 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
845 headers in a nonstandard directory <include dir>
846 CPP C preprocessor
847 CXX C++ compiler command
848 CXXFLAGS C++ compiler flags
849 CXXCPP C++ preprocessor
851 Use these variables to override the choices made by `configure' or to help
852 it to find libraries and programs with nonstandard names/locations.
857 if test "$ac_init_help" = "recursive"; then
858 # If there are subdirs, report their specific --help.
859 ac_popdir=`pwd`
860 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
861 cd $ac_subdir
862 # A "../" for each directory in /$ac_subdir.
863 ac_dots=`echo $ac_subdir |
864 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
866 case $srcdir in
867 .) # No --srcdir option. We are building in place.
868 ac_sub_srcdir=$srcdir ;;
869 [\\/]* | ?:[\\/]* ) # Absolute path.
870 ac_sub_srcdir=$srcdir/$ac_subdir ;;
871 *) # Relative path.
872 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
873 esac
875 # Check for guested configure; otherwise get Cygnus style configure.
876 if test -f $ac_sub_srcdir/configure.gnu; then
877 echo
878 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
879 elif test -f $ac_sub_srcdir/configure; then
880 echo
881 $SHELL $ac_sub_srcdir/configure --help=recursive
882 elif test -f $ac_sub_srcdir/configure.ac ||
883 test -f $ac_sub_srcdir/configure.in; then
884 echo
885 $ac_configure --help
886 else
887 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
889 cd $ac_popdir
890 done
893 test -n "$ac_init_help" && exit 0
894 if $ac_init_version; then
895 cat <<\EOF
897 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
898 Free Software Foundation, Inc.
899 This configure script is free software; the Free Software Foundation
900 gives unlimited permission to copy, distribute and modify it.
902 exit 0
904 exec 5>config.log
905 cat >&5 <<EOF
906 This file contains any messages produced by compilers while
907 running configure, to aid debugging if configure makes a mistake.
909 It was created by $as_me, which was
910 generated by GNU Autoconf 2.52.20141204. Invocation command line was
912 $ $0 $@
916 cat <<_ASUNAME
917 ## ---------- ##
918 ## Platform. ##
919 ## ---------- ##
921 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
922 uname -m = `(uname -m) 2>/dev/null || echo unknown`
923 uname -r = `(uname -r) 2>/dev/null || echo unknown`
924 uname -s = `(uname -s) 2>/dev/null || echo unknown`
925 uname -v = `(uname -v) 2>/dev/null || echo unknown`
927 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
928 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
930 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
931 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
932 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
933 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
934 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
935 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
936 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
938 PATH = $PATH
940 _ASUNAME
941 } >&5
943 cat >&5 <<EOF
944 ## ------------ ##
945 ## Core tests. ##
946 ## ------------ ##
950 # Keep a trace of the command line.
951 # Strip out --no-create and --no-recursion so they do not pile up.
952 # Also quote any args containing shell meta-characters.
953 ac_configure_args=
954 ac_sep=
955 for ac_arg
957 case $ac_arg in
958 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
959 | --no-cr | --no-c) ;;
960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
962 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
963 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
964 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
965 ac_sep=" " ;;
966 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
967 ac_sep=" " ;;
968 esac
969 # Get rid of the leading space.
970 done
972 # When interrupted or exit'd, cleanup temporary files, and complete
973 # config.log. We remove comments because anyway the quotes in there
974 # would cause problems or look ugly.
975 trap 'exit_status=$?
976 # Save into config.log some information that might help in debugging.
977 echo >&5
978 echo "## ----------------- ##" >&5
979 echo "## Cache variables. ##" >&5
980 echo "## ----------------- ##" >&5
981 echo >&5
982 # The following way of writing the cache mishandles newlines in values,
984 (set) 2>&1 |
985 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
986 *ac_space=\ *)
987 sed -n \
988 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
989 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
992 sed -n \
993 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
995 esac;
996 } >&5
997 sed "/^$/d" confdefs.h >conftest.log
998 if test -s conftest.log; then
999 echo >&5
1000 echo "## ------------ ##" >&5
1001 echo "## confdefs.h. ##" >&5
1002 echo "## ------------ ##" >&5
1003 echo >&5
1004 cat conftest.log >&5
1006 (echo; echo) >&5
1007 test "$ac_signal" != 0 &&
1008 echo "$as_me: caught signal $ac_signal" >&5
1009 echo "$as_me: exit $exit_status" >&5
1010 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1011 exit $exit_status
1013 for ac_signal in 1 2 13 15; do
1014 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1015 done
1016 ac_signal=0
1018 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1019 rm -rf conftest* confdefs.h
1020 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1021 echo >confdefs.h
1023 # Let the site file select an alternate cache file if it wants to.
1024 # Prefer explicitly selected file to automatically selected ones.
1025 if test -z "$CONFIG_SITE"; then
1026 if test "x$prefix" != xNONE; then
1027 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1028 else
1029 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1032 for ac_site_file in $CONFIG_SITE; do
1033 if test -r "$ac_site_file"; then
1034 { echo "$as_me:1034: loading site script $ac_site_file" >&5
1035 echo "$as_me: loading site script $ac_site_file" >&6;}
1036 cat "$ac_site_file" >&5
1037 . "$ac_site_file"
1039 done
1041 if test -r "$cache_file"; then
1042 # Some versions of bash will fail to source /dev/null (special
1043 # files actually), so we avoid doing that.
1044 if test -f "$cache_file"; then
1045 { echo "$as_me:1045: loading cache $cache_file" >&5
1046 echo "$as_me: loading cache $cache_file" >&6;}
1047 case $cache_file in
1048 [\\/]* | ?:[\\/]* ) . $cache_file;;
1049 *) . ./$cache_file;;
1050 esac
1052 else
1053 { echo "$as_me:1053: creating cache $cache_file" >&5
1054 echo "$as_me: creating cache $cache_file" >&6;}
1055 >$cache_file
1058 # Check that the precious variables saved in the cache have kept the same
1059 # value.
1060 ac_cache_corrupted=false
1061 for ac_var in `(set) 2>&1 |
1062 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1063 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1064 eval ac_new_set=\$ac_env_${ac_var}_set
1065 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1066 eval ac_new_val="\$ac_env_${ac_var}_value"
1067 case $ac_old_set,$ac_new_set in
1068 set,)
1069 { echo "$as_me:1069: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1070 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1071 ac_cache_corrupted=: ;;
1072 ,set)
1073 { echo "$as_me:1073: error: \`$ac_var' was not set in the previous run" >&5
1074 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1075 ac_cache_corrupted=: ;;
1076 ,);;
1078 if test "x$ac_old_val" != "x$ac_new_val"; then
1079 { echo "$as_me:1079: error: \`$ac_var' has changed since the previous run:" >&5
1080 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1081 { echo "$as_me:1081: former value: $ac_old_val" >&5
1082 echo "$as_me: former value: $ac_old_val" >&2;}
1083 { echo "$as_me:1083: current value: $ac_new_val" >&5
1084 echo "$as_me: current value: $ac_new_val" >&2;}
1085 ac_cache_corrupted=:
1086 fi;;
1087 esac
1088 # Pass precious variables to config.status. It doesn't matter if
1089 # we pass some twice (in addition to the command line arguments).
1090 if test "$ac_new_set" = set; then
1091 case $ac_new_val in
1092 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1093 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1094 ac_configure_args="$ac_configure_args '$ac_arg'"
1096 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1098 esac
1100 done
1101 if $ac_cache_corrupted; then
1102 { echo "$as_me:1102: error: changes in the environment can compromise the build" >&5
1103 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1104 { { echo "$as_me:1104: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1105 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1106 { (exit 1); exit 1; }; }
1109 ac_ext=c
1110 ac_cpp='$CPP $CPPFLAGS'
1111 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1112 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1113 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1114 ac_main_return=return
1116 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1117 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1118 ECHO_T=' ' ;;
1119 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1120 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
1121 esac
1122 echo "#! $SHELL" >conftest.sh
1123 echo "exit 0" >>conftest.sh
1124 chmod +x conftest.sh
1125 if { (echo "$as_me:1125: PATH=\".;.\"; conftest.sh") >&5
1126 (PATH=".;."; conftest.sh) 2>&5
1127 ac_status=$?
1128 echo "$as_me:1128: \$? = $ac_status" >&5
1129 (exit $ac_status); }; then
1130 ac_path_separator=';'
1131 else
1132 ac_path_separator=:
1134 PATH_SEPARATOR="$ac_path_separator"
1135 rm -f conftest.sh
1137 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1139 top_builddir=`pwd`
1141 echo "$as_me:1141: checking for egrep" >&5
1142 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1143 if test "${ac_cv_prog_egrep+set}" = set; then
1144 echo $ECHO_N "(cached) $ECHO_C" >&6
1145 else
1146 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1147 then ac_cv_prog_egrep='grep -E'
1148 else ac_cv_prog_egrep='egrep'
1151 echo "$as_me:1151: result: $ac_cv_prog_egrep" >&5
1152 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1153 EGREP=$ac_cv_prog_egrep
1155 test -z "$EGREP" && { { echo "$as_me:1155: error: No egrep program found" >&5
1156 echo "$as_me: error: No egrep program found" >&2;}
1157 { (exit 1); exit 1; }; }
1159 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1161 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1162 cf_cv_abi_version=${NCURSES_MAJOR}
1163 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1164 cf_cv_timestamp=`date`
1165 echo "$as_me:1165: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1166 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1168 if test -f $srcdir/VERSION ; then
1169 echo "$as_me:1169: checking for package version" >&5
1170 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1172 # if there are not enough fields, cut returns the last one...
1173 cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1174 cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1175 cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1177 # this is how CF_BUNDLED_INTL uses $VERSION:
1178 VERSION="$cf_field1"
1180 VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1181 test -z "$VERSION_MAJOR" && { { echo "$as_me:1181: error: missing major-version" >&5
1182 echo "$as_me: error: missing major-version" >&2;}
1183 { (exit 1); exit 1; }; }
1185 VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1186 test -z "$VERSION_MINOR" && { { echo "$as_me:1186: error: missing minor-version" >&5
1187 echo "$as_me: error: missing minor-version" >&2;}
1188 { (exit 1); exit 1; }; }
1190 echo "$as_me:1190: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1191 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1193 echo "$as_me:1193: checking for package patch date" >&5
1194 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1195 VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1196 case .$VERSION_PATCH in
1198 { { echo "$as_me:1198: error: missing patch-date $VERSION_PATCH" >&5
1199 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1200 { (exit 1); exit 1; }; }
1202 (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1205 { { echo "$as_me:1205: error: illegal patch-date $VERSION_PATCH" >&5
1206 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1207 { (exit 1); exit 1; }; }
1209 esac
1210 echo "$as_me:1210: result: $VERSION_PATCH" >&5
1211 echo "${ECHO_T}$VERSION_PATCH" >&6
1212 else
1213 { { echo "$as_me:1213: error: did not find $srcdir/VERSION" >&5
1214 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1215 { (exit 1); exit 1; }; }
1218 # show the actual data that we have for versions:
1219 test -n "$verbose" && echo " ABI VERSION $VERSION" 1>&6
1221 echo "${as_me:-configure}:1221: testing ABI VERSION $VERSION ..." 1>&5
1223 test -n "$verbose" && echo " VERSION_MAJOR $VERSION_MAJOR" 1>&6
1225 echo "${as_me:-configure}:1225: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1227 test -n "$verbose" && echo " VERSION_MINOR $VERSION_MINOR" 1>&6
1229 echo "${as_me:-configure}:1229: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1231 test -n "$verbose" && echo " VERSION_PATCH $VERSION_PATCH" 1>&6
1233 echo "${as_me:-configure}:1233: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1235 cf_PACKAGE=NCURSES
1236 PACKAGE=ncurses
1238 cat >>confdefs.h <<EOF
1239 #define PACKAGE "$PACKAGE"
1242 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1244 cat >>confdefs.h <<EOF
1245 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1248 cat >>confdefs.h <<EOF
1249 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1252 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1254 # Check whether --with-rel-version or --without-rel-version was given.
1255 if test "${with_rel_version+set}" = set; then
1256 withval="$with_rel_version"
1257 { echo "$as_me:1257: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1258 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1259 cf_cv_rel_version=$withval
1262 NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1263 NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1265 if test -n "$NCURSES_MAJOR" ; then
1266 case $NCURSES_MAJOR in
1267 ([0-9]*)
1270 { { echo "$as_me:1270: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1271 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1272 { (exit 1); exit 1; }; }
1274 esac
1275 else
1276 { { echo "$as_me:1276: error: Release major-version value is empty" >&5
1277 echo "$as_me: error: Release major-version value is empty" >&2;}
1278 { (exit 1); exit 1; }; }
1281 if test -n "$NCURSES_MINOR" ; then
1282 case $NCURSES_MINOR in
1283 ([0-9]*)
1286 { { echo "$as_me:1286: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1287 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1288 { (exit 1); exit 1; }; }
1290 esac
1291 else
1292 { { echo "$as_me:1292: error: Release minor-version value is empty" >&5
1293 echo "$as_me: error: Release minor-version value is empty" >&2;}
1294 { (exit 1); exit 1; }; }
1297 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1299 # Check whether --with-abi-version or --without-abi-version was given.
1300 if test "${with_abi_version+set}" = set; then
1301 withval="$with_abi_version"
1303 if test "x$cf_cv_abi_version" != "x$withval"
1304 then
1305 { echo "$as_me:1305: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1306 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1307 case $cf_cv_rel_version in
1308 (5.*)
1309 cf_cv_rel_version=$withval.0
1311 (6.*)
1312 cf_cv_rel_version=$withval.9 # FIXME: should be 10 as of 6.0 release
1314 esac
1316 cf_cv_abi_version=$withval
1319 if test -n "$cf_cv_abi_version" ; then
1320 case $cf_cv_abi_version in
1321 ([0-9]*)
1324 { { echo "$as_me:1324: error: ABI version is not a number: $cf_cv_abi_version" >&5
1325 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1326 { (exit 1); exit 1; }; }
1328 esac
1329 else
1330 { { echo "$as_me:1330: error: ABI version value is empty" >&5
1331 echo "$as_me: error: ABI version value is empty" >&2;}
1332 { (exit 1); exit 1; }; }
1335 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1336 then
1337 case $cf_cv_rel_version in
1338 (5.*)
1339 cf_cv_rel_version=$with_abi_version.0
1341 esac
1344 ac_aux_dir=
1345 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1346 if test -f $ac_dir/install-sh; then
1347 ac_aux_dir=$ac_dir
1348 ac_install_sh="$ac_aux_dir/install-sh -c"
1349 break
1350 elif test -f $ac_dir/install.sh; then
1351 ac_aux_dir=$ac_dir
1352 ac_install_sh="$ac_aux_dir/install.sh -c"
1353 break
1354 elif test -f $ac_dir/shtool; then
1355 ac_aux_dir=$ac_dir
1356 ac_install_sh="$ac_aux_dir/shtool install -c"
1357 break
1359 done
1360 if test -z "$ac_aux_dir"; then
1361 { { echo "$as_me:1361: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1362 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1363 { (exit 1); exit 1; }; }
1365 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1366 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1367 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1369 # Make sure we can run config.sub.
1370 $ac_config_sub sun4 >/dev/null 2>&1 ||
1371 { { echo "$as_me:1371: error: cannot run $ac_config_sub" >&5
1372 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1373 { (exit 1); exit 1; }; }
1375 echo "$as_me:1375: checking build system type" >&5
1376 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1377 if test "${ac_cv_build+set}" = set; then
1378 echo $ECHO_N "(cached) $ECHO_C" >&6
1379 else
1380 ac_cv_build_alias=$build_alias
1381 test -z "$ac_cv_build_alias" &&
1382 ac_cv_build_alias=`$ac_config_guess`
1383 test -z "$ac_cv_build_alias" &&
1384 { { echo "$as_me:1384: error: cannot guess build type; you must specify one" >&5
1385 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1386 { (exit 1); exit 1; }; }
1387 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1388 { { echo "$as_me:1388: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1389 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1390 { (exit 1); exit 1; }; }
1393 echo "$as_me:1393: result: $ac_cv_build" >&5
1394 echo "${ECHO_T}$ac_cv_build" >&6
1395 build=$ac_cv_build
1396 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1397 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1398 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1400 echo "$as_me:1400: checking host system type" >&5
1401 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1402 if test "${ac_cv_host+set}" = set; then
1403 echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405 ac_cv_host_alias=$host_alias
1406 test -z "$ac_cv_host_alias" &&
1407 ac_cv_host_alias=$ac_cv_build_alias
1408 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1409 { { echo "$as_me:1409: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1410 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1411 { (exit 1); exit 1; }; }
1414 echo "$as_me:1414: result: $ac_cv_host" >&5
1415 echo "${ECHO_T}$ac_cv_host" >&6
1416 host=$ac_cv_host
1417 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1418 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1419 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1421 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1422 echo "$as_me:1422: checking target system type" >&5
1423 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1424 if test "${ac_cv_target+set}" = set; then
1425 echo $ECHO_N "(cached) $ECHO_C" >&6
1426 else
1427 ac_cv_target_alias=$target_alias
1428 test "x$ac_cv_target_alias" = "x" &&
1429 ac_cv_target_alias=$ac_cv_host_alias
1430 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1431 { { echo "$as_me:1431: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1432 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1433 { (exit 1); exit 1; }; }
1436 echo "$as_me:1436: result: $ac_cv_target" >&5
1437 echo "${ECHO_T}$ac_cv_target" >&6
1438 target=$ac_cv_target
1439 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1440 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1441 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1443 # The aliases save the names the user supplied, while $host etc.
1444 # will get canonicalized.
1445 test -n "$target_alias" &&
1446 test "$program_prefix$program_suffix$program_transform_name" = \
1447 NONENONEs,x,x, &&
1448 program_prefix=${target_alias}-
1449 system_name="$host_os"
1450 else
1451 system_name="`(uname -s -r) 2>/dev/null`"
1452 if test -z "$system_name" ; then
1453 system_name="`(hostname) 2>/dev/null`"
1456 test -n "$system_name" &&
1457 cat >>confdefs.h <<EOF
1458 #define SYSTEM_NAME "$system_name"
1461 if test "${cf_cv_system_name+set}" = set; then
1462 echo $ECHO_N "(cached) $ECHO_C" >&6
1463 else
1464 cf_cv_system_name="$system_name"
1467 test -z "$system_name" && system_name="$cf_cv_system_name"
1468 test -n "$cf_cv_system_name" && echo "$as_me:1468: result: Configuring for $cf_cv_system_name" >&5
1469 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1471 if test ".$system_name" != ".$cf_cv_system_name" ; then
1472 echo "$as_me:1472: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1473 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1474 { { echo "$as_me:1474: error: \"Please remove config.cache and try again.\"" >&5
1475 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1476 { (exit 1); exit 1; }; }
1479 # Check whether --with-system-type or --without-system-type was given.
1480 if test "${with_system_type+set}" = set; then
1481 withval="$with_system_type"
1482 { echo "$as_me:1482: WARNING: overriding system type to $withval" >&5
1483 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1484 cf_cv_system_name=$withval
1485 host_os=$withval
1489 ### Save the given $CFLAGS to allow user-override.
1490 cf_user_CFLAGS="$CFLAGS"
1492 ### Default install-location
1494 echo "$as_me:1494: checking for prefix" >&5
1495 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1496 if test "x$prefix" = "xNONE" ; then
1497 case "$cf_cv_system_name" in
1498 # non-vendor systems don't have a conflict
1499 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1500 prefix=/usr
1502 (*) prefix=$ac_default_prefix
1504 esac
1506 echo "$as_me:1506: result: $prefix" >&5
1507 echo "${ECHO_T}$prefix" >&6
1509 if test "x$prefix" = "xNONE" ; then
1510 echo "$as_me:1510: checking for default include-directory" >&5
1511 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1512 test -n "$verbose" && echo 1>&6
1513 for cf_symbol in \
1514 $includedir \
1515 $includedir/ncurses \
1516 $prefix/include \
1517 $prefix/include/ncurses \
1518 /usr/local/include \
1519 /usr/local/include/ncurses \
1520 /usr/include \
1521 /usr/include/ncurses
1523 cf_dir=`eval echo $cf_symbol`
1524 if test -f $cf_dir/curses.h ; then
1525 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1526 includedir="$cf_symbol"
1527 test -n "$verbose" && echo $ac_n " found " 1>&6
1528 break
1531 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1532 done
1533 echo "$as_me:1533: result: $includedir" >&5
1534 echo "${ECHO_T}$includedir" >&6
1537 ### Defaults for ncurses ABI
1539 case x$cf_cv_abi_version in
1540 (x[6789])
1541 cf_dft_ext_colors=yes
1542 cf_dft_ext_const=yes
1543 cf_dft_ext_mouse=yes
1544 cf_dft_ext_putwin=yes
1545 cf_dft_ext_spfuncs=yes
1546 cf_dft_filter_syms=yes
1547 cf_dft_chtype=uint32_t
1548 cf_dft_mmask_t=uint32_t
1549 cf_dft_interop=yes
1550 cf_dft_tparm_arg=intptr_t
1551 cf_dft_with_lp64=yes
1554 cf_dft_ext_colors=no
1555 cf_dft_ext_const=no
1556 cf_dft_ext_mouse=no
1557 cf_dft_ext_putwin=no
1558 cf_dft_ext_spfuncs=no
1559 cf_dft_filter_syms=no
1560 cf_dft_chtype=auto
1561 cf_dft_mmask_t=auto
1562 cf_dft_interop=no
1563 cf_dft_tparm_arg=long
1564 cf_dft_with_lp64=no
1566 esac
1568 ### Checks for programs.
1570 # Check whether --with-ada or --without-ada was given.
1571 if test "${with_ada+set}" = set; then
1572 withval="$with_ada"
1573 cf_with_ada=$withval
1574 else
1575 cf_with_ada=yes
1577 if test "x$cf_with_ada" = xyes
1578 then
1579 cf_PROG_CC="gnatgcc gcc cc"
1580 else
1581 cf_PROG_CC="gcc cc"
1584 ac_ext=c
1585 ac_cpp='$CPP $CPPFLAGS'
1586 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1587 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1588 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1589 ac_main_return=return
1590 if test -n "$ac_tool_prefix"; then
1591 for ac_prog in $cf_PROG_CC
1593 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1594 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1595 echo "$as_me:1595: checking for $ac_word" >&5
1596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1597 if test "${ac_cv_prog_CC+set}" = set; then
1598 echo $ECHO_N "(cached) $ECHO_C" >&6
1599 else
1600 if test -n "$CC"; then
1601 ac_cv_prog_CC="$CC" # Let the user override the test.
1602 else
1603 ac_save_IFS=$IFS; IFS=$ac_path_separator
1604 ac_dummy="$PATH"
1605 for ac_dir in $ac_dummy; do
1606 IFS=$ac_save_IFS
1607 test -z "$ac_dir" && ac_dir=.
1608 $as_executable_p "$ac_dir/$ac_word" || continue
1609 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1610 echo "$as_me:1610: found $ac_dir/$ac_word" >&5
1611 break
1612 done
1616 CC=$ac_cv_prog_CC
1617 if test -n "$CC"; then
1618 echo "$as_me:1618: result: $CC" >&5
1619 echo "${ECHO_T}$CC" >&6
1620 else
1621 echo "$as_me:1621: result: no" >&5
1622 echo "${ECHO_T}no" >&6
1625 test -n "$CC" && break
1626 done
1628 if test -z "$CC"; then
1629 ac_ct_CC=$CC
1630 for ac_prog in $cf_PROG_CC
1632 # Extract the first word of "$ac_prog", so it can be a program name with args.
1633 set dummy $ac_prog; ac_word=$2
1634 echo "$as_me:1634: checking for $ac_word" >&5
1635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1636 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1637 echo $ECHO_N "(cached) $ECHO_C" >&6
1638 else
1639 if test -n "$ac_ct_CC"; then
1640 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1641 else
1642 ac_save_IFS=$IFS; IFS=$ac_path_separator
1643 ac_dummy="$PATH"
1644 for ac_dir in $ac_dummy; do
1645 IFS=$ac_save_IFS
1646 test -z "$ac_dir" && ac_dir=.
1647 $as_executable_p "$ac_dir/$ac_word" || continue
1648 ac_cv_prog_ac_ct_CC="$ac_prog"
1649 echo "$as_me:1649: found $ac_dir/$ac_word" >&5
1650 break
1651 done
1655 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1656 if test -n "$ac_ct_CC"; then
1657 echo "$as_me:1657: result: $ac_ct_CC" >&5
1658 echo "${ECHO_T}$ac_ct_CC" >&6
1659 else
1660 echo "$as_me:1660: result: no" >&5
1661 echo "${ECHO_T}no" >&6
1664 test -n "$ac_ct_CC" && break
1665 done
1667 CC=$ac_ct_CC
1670 test -z "$CC" && { { echo "$as_me:1670: error: no acceptable cc found in \$PATH" >&5
1671 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1672 { (exit 1); exit 1; }; }
1674 # Provide some information about the compiler.
1675 echo "$as_me:1675:" \
1676 "checking for C compiler version" >&5
1677 ac_compiler=`set X $ac_compile; echo $2`
1678 { (eval echo "$as_me:1678: \"$ac_compiler --version </dev/null >&5\"") >&5
1679 (eval $ac_compiler --version </dev/null >&5) 2>&5
1680 ac_status=$?
1681 echo "$as_me:1681: \$? = $ac_status" >&5
1682 (exit $ac_status); }
1683 { (eval echo "$as_me:1683: \"$ac_compiler -v </dev/null >&5\"") >&5
1684 (eval $ac_compiler -v </dev/null >&5) 2>&5
1685 ac_status=$?
1686 echo "$as_me:1686: \$? = $ac_status" >&5
1687 (exit $ac_status); }
1688 { (eval echo "$as_me:1688: \"$ac_compiler -V </dev/null >&5\"") >&5
1689 (eval $ac_compiler -V </dev/null >&5) 2>&5
1690 ac_status=$?
1691 echo "$as_me:1691: \$? = $ac_status" >&5
1692 (exit $ac_status); }
1694 cat >conftest.$ac_ext <<_ACEOF
1695 #line 1695 "configure"
1696 #include "confdefs.h"
1699 main ()
1703 return 0;
1705 _ACEOF
1706 ac_clean_files_save=$ac_clean_files
1707 ac_clean_files="$ac_clean_files a.out a.exe"
1708 # Try to create an executable without -o first, disregard a.out.
1709 # It will help us diagnose broken compilers, and finding out an intuition
1710 # of exeext.
1711 echo "$as_me:1711: checking for C compiler default output" >&5
1712 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1713 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1714 if { (eval echo "$as_me:1714: \"$ac_link_default\"") >&5
1715 (eval $ac_link_default) 2>&5
1716 ac_status=$?
1717 echo "$as_me:1717: \$? = $ac_status" >&5
1718 (exit $ac_status); }; then
1719 # Find the output, starting from the most likely. This scheme is
1720 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1721 # resort.
1722 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1723 ls a.out conftest 2>/dev/null;
1724 ls a.* conftest.* 2>/dev/null`; do
1725 case $ac_file in
1726 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1727 a.out ) # We found the default executable, but exeext='' is most
1728 # certainly right.
1729 break;;
1730 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1731 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1732 export ac_cv_exeext
1733 break;;
1734 * ) break;;
1735 esac
1736 done
1737 else
1738 echo "$as_me: failed program was:" >&5
1739 cat conftest.$ac_ext >&5
1740 { { echo "$as_me:1740: error: C compiler cannot create executables" >&5
1741 echo "$as_me: error: C compiler cannot create executables" >&2;}
1742 { (exit 77); exit 77; }; }
1745 ac_exeext=$ac_cv_exeext
1746 echo "$as_me:1746: result: $ac_file" >&5
1747 echo "${ECHO_T}$ac_file" >&6
1749 # Check the compiler produces executables we can run. If not, either
1750 # the compiler is broken, or we cross compile.
1751 echo "$as_me:1751: checking whether the C compiler works" >&5
1752 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1753 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1754 # If not cross compiling, check that we can run a simple program.
1755 if test "$cross_compiling" != yes; then
1756 if { ac_try='./$ac_file'
1757 { (eval echo "$as_me:1757: \"$ac_try\"") >&5
1758 (eval $ac_try) 2>&5
1759 ac_status=$?
1760 echo "$as_me:1760: \$? = $ac_status" >&5
1761 (exit $ac_status); }; }; then
1762 cross_compiling=no
1763 else
1764 if test "$cross_compiling" = maybe; then
1765 cross_compiling=yes
1766 else
1767 { { echo "$as_me:1767: error: cannot run C compiled programs.
1768 If you meant to cross compile, use \`--host'." >&5
1769 echo "$as_me: error: cannot run C compiled programs.
1770 If you meant to cross compile, use \`--host'." >&2;}
1771 { (exit 1); exit 1; }; }
1775 echo "$as_me:1775: result: yes" >&5
1776 echo "${ECHO_T}yes" >&6
1778 rm -f a.out a.exe conftest$ac_cv_exeext
1779 ac_clean_files=$ac_clean_files_save
1780 # Check the compiler produces executables we can run. If not, either
1781 # the compiler is broken, or we cross compile.
1782 echo "$as_me:1782: checking whether we are cross compiling" >&5
1783 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1784 echo "$as_me:1784: result: $cross_compiling" >&5
1785 echo "${ECHO_T}$cross_compiling" >&6
1787 echo "$as_me:1787: checking for executable suffix" >&5
1788 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1789 if { (eval echo "$as_me:1789: \"$ac_link\"") >&5
1790 (eval $ac_link) 2>&5
1791 ac_status=$?
1792 echo "$as_me:1792: \$? = $ac_status" >&5
1793 (exit $ac_status); }; then
1794 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1795 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1796 # work properly (i.e., refer to `conftest.exe'), while it won't with
1797 # `rm'.
1798 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1799 case $ac_file in
1800 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1801 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1802 export ac_cv_exeext
1803 break;;
1804 * ) break;;
1805 esac
1806 done
1807 else
1808 { { echo "$as_me:1808: error: cannot compute EXEEXT: cannot compile and link" >&5
1809 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1810 { (exit 1); exit 1; }; }
1813 rm -f conftest$ac_cv_exeext
1814 echo "$as_me:1814: result: $ac_cv_exeext" >&5
1815 echo "${ECHO_T}$ac_cv_exeext" >&6
1817 rm -f conftest.$ac_ext
1818 EXEEXT=$ac_cv_exeext
1819 ac_exeext=$EXEEXT
1820 echo "$as_me:1820: checking for object suffix" >&5
1821 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1822 if test "${ac_cv_objext+set}" = set; then
1823 echo $ECHO_N "(cached) $ECHO_C" >&6
1824 else
1825 cat >conftest.$ac_ext <<_ACEOF
1826 #line 1826 "configure"
1827 #include "confdefs.h"
1830 main ()
1834 return 0;
1836 _ACEOF
1837 rm -f conftest.o conftest.obj
1838 if { (eval echo "$as_me:1838: \"$ac_compile\"") >&5
1839 (eval $ac_compile) 2>&5
1840 ac_status=$?
1841 echo "$as_me:1841: \$? = $ac_status" >&5
1842 (exit $ac_status); }; then
1843 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1844 case $ac_file in
1845 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1846 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1847 break;;
1848 esac
1849 done
1850 else
1851 echo "$as_me: failed program was:" >&5
1852 cat conftest.$ac_ext >&5
1853 { { echo "$as_me:1853: error: cannot compute OBJEXT: cannot compile" >&5
1854 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1855 { (exit 1); exit 1; }; }
1858 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1860 echo "$as_me:1860: result: $ac_cv_objext" >&5
1861 echo "${ECHO_T}$ac_cv_objext" >&6
1862 OBJEXT=$ac_cv_objext
1863 ac_objext=$OBJEXT
1864 echo "$as_me:1864: checking whether we are using the GNU C compiler" >&5
1865 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1866 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1867 echo $ECHO_N "(cached) $ECHO_C" >&6
1868 else
1869 cat >conftest.$ac_ext <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1874 main ()
1876 #ifndef __GNUC__
1877 choke me
1878 #endif
1881 return 0;
1883 _ACEOF
1884 rm -f conftest.$ac_objext
1885 if { (eval echo "$as_me:1885: \"$ac_compile\"") >&5
1886 (eval $ac_compile) 2>&5
1887 ac_status=$?
1888 echo "$as_me:1888: \$? = $ac_status" >&5
1889 (exit $ac_status); } &&
1890 { ac_try='test -s conftest.$ac_objext'
1891 { (eval echo "$as_me:1891: \"$ac_try\"") >&5
1892 (eval $ac_try) 2>&5
1893 ac_status=$?
1894 echo "$as_me:1894: \$? = $ac_status" >&5
1895 (exit $ac_status); }; }; then
1896 ac_compiler_gnu=yes
1897 else
1898 echo "$as_me: failed program was:" >&5
1899 cat conftest.$ac_ext >&5
1900 ac_compiler_gnu=no
1902 rm -f conftest.$ac_objext conftest.$ac_ext
1903 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1906 echo "$as_me:1906: result: $ac_cv_c_compiler_gnu" >&5
1907 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1908 GCC=`test $ac_compiler_gnu = yes && echo yes`
1909 ac_test_CFLAGS=${CFLAGS+set}
1910 ac_save_CFLAGS=$CFLAGS
1911 CFLAGS="-g"
1912 echo "$as_me:1912: checking whether $CC accepts -g" >&5
1913 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1914 if test "${ac_cv_prog_cc_g+set}" = set; then
1915 echo $ECHO_N "(cached) $ECHO_C" >&6
1916 else
1917 cat >conftest.$ac_ext <<_ACEOF
1918 #line 1918 "configure"
1919 #include "confdefs.h"
1922 main ()
1926 return 0;
1928 _ACEOF
1929 rm -f conftest.$ac_objext
1930 if { (eval echo "$as_me:1930: \"$ac_compile\"") >&5
1931 (eval $ac_compile) 2>&5
1932 ac_status=$?
1933 echo "$as_me:1933: \$? = $ac_status" >&5
1934 (exit $ac_status); } &&
1935 { ac_try='test -s conftest.$ac_objext'
1936 { (eval echo "$as_me:1936: \"$ac_try\"") >&5
1937 (eval $ac_try) 2>&5
1938 ac_status=$?
1939 echo "$as_me:1939: \$? = $ac_status" >&5
1940 (exit $ac_status); }; }; then
1941 ac_cv_prog_cc_g=yes
1942 else
1943 echo "$as_me: failed program was:" >&5
1944 cat conftest.$ac_ext >&5
1945 ac_cv_prog_cc_g=no
1947 rm -f conftest.$ac_objext conftest.$ac_ext
1949 echo "$as_me:1949: result: $ac_cv_prog_cc_g" >&5
1950 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1951 if test "$ac_test_CFLAGS" = set; then
1952 CFLAGS=$ac_save_CFLAGS
1953 elif test $ac_cv_prog_cc_g = yes; then
1954 if test "$GCC" = yes; then
1955 CFLAGS="-g -O2"
1956 else
1957 CFLAGS="-g"
1959 else
1960 if test "$GCC" = yes; then
1961 CFLAGS="-O2"
1962 else
1963 CFLAGS=
1966 # Some people use a C++ compiler to compile C. Since we use `exit',
1967 # in C++ we need to declare it. In case someone uses the same compiler
1968 # for both compiling C and C++ we need to have the C++ compiler decide
1969 # the declaration of exit, since it's the most demanding environment.
1970 cat >conftest.$ac_ext <<_ACEOF
1971 #ifndef __cplusplus
1972 choke me
1973 #endif
1974 _ACEOF
1975 rm -f conftest.$ac_objext
1976 if { (eval echo "$as_me:1976: \"$ac_compile\"") >&5
1977 (eval $ac_compile) 2>&5
1978 ac_status=$?
1979 echo "$as_me:1979: \$? = $ac_status" >&5
1980 (exit $ac_status); } &&
1981 { ac_try='test -s conftest.$ac_objext'
1982 { (eval echo "$as_me:1982: \"$ac_try\"") >&5
1983 (eval $ac_try) 2>&5
1984 ac_status=$?
1985 echo "$as_me:1985: \$? = $ac_status" >&5
1986 (exit $ac_status); }; }; then
1987 for ac_declaration in \
1989 '#include <stdlib.h>' \
1990 'extern "C" void std::exit (int) throw (); using std::exit;' \
1991 'extern "C" void std::exit (int); using std::exit;' \
1992 'extern "C" void exit (int) throw ();' \
1993 'extern "C" void exit (int);' \
1994 'void exit (int);'
1996 cat >conftest.$ac_ext <<_ACEOF
1997 #line 1997 "configure"
1998 #include "confdefs.h"
1999 #include <stdlib.h>
2000 $ac_declaration
2002 main ()
2004 exit (42);
2006 return 0;
2008 _ACEOF
2009 rm -f conftest.$ac_objext
2010 if { (eval echo "$as_me:2010: \"$ac_compile\"") >&5
2011 (eval $ac_compile) 2>&5
2012 ac_status=$?
2013 echo "$as_me:2013: \$? = $ac_status" >&5
2014 (exit $ac_status); } &&
2015 { ac_try='test -s conftest.$ac_objext'
2016 { (eval echo "$as_me:2016: \"$ac_try\"") >&5
2017 (eval $ac_try) 2>&5
2018 ac_status=$?
2019 echo "$as_me:2019: \$? = $ac_status" >&5
2020 (exit $ac_status); }; }; then
2022 else
2023 echo "$as_me: failed program was:" >&5
2024 cat conftest.$ac_ext >&5
2025 continue
2027 rm -f conftest.$ac_objext conftest.$ac_ext
2028 cat >conftest.$ac_ext <<_ACEOF
2029 #line 2029 "configure"
2030 #include "confdefs.h"
2031 $ac_declaration
2033 main ()
2035 exit (42);
2037 return 0;
2039 _ACEOF
2040 rm -f conftest.$ac_objext
2041 if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5
2042 (eval $ac_compile) 2>&5
2043 ac_status=$?
2044 echo "$as_me:2044: \$? = $ac_status" >&5
2045 (exit $ac_status); } &&
2046 { ac_try='test -s conftest.$ac_objext'
2047 { (eval echo "$as_me:2047: \"$ac_try\"") >&5
2048 (eval $ac_try) 2>&5
2049 ac_status=$?
2050 echo "$as_me:2050: \$? = $ac_status" >&5
2051 (exit $ac_status); }; }; then
2052 break
2053 else
2054 echo "$as_me: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2057 rm -f conftest.$ac_objext conftest.$ac_ext
2058 done
2059 rm -rf conftest*
2060 if test -n "$ac_declaration"; then
2061 echo '#ifdef __cplusplus' >>confdefs.h
2062 echo $ac_declaration >>confdefs.h
2063 echo '#endif' >>confdefs.h
2066 else
2067 echo "$as_me: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
2070 rm -f conftest.$ac_objext conftest.$ac_ext
2071 ac_ext=c
2072 ac_cpp='$CPP $CPPFLAGS'
2073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2076 ac_main_return=return
2078 GCC_VERSION=none
2079 if test "$GCC" = yes ; then
2080 echo "$as_me:2080: checking version of $CC" >&5
2081 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2082 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2083 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2084 echo "$as_me:2084: result: $GCC_VERSION" >&5
2085 echo "${ECHO_T}$GCC_VERSION" >&6
2088 echo "$as_me:2088: checking for $CC option to accept ANSI C" >&5
2089 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2090 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2091 echo $ECHO_N "(cached) $ECHO_C" >&6
2092 else
2093 ac_cv_prog_cc_stdc=no
2094 ac_save_CC=$CC
2095 cat >conftest.$ac_ext <<_ACEOF
2096 #line 2096 "configure"
2097 #include "confdefs.h"
2098 #include <stdarg.h>
2099 #include <stdio.h>
2100 #include <sys/types.h>
2101 #include <sys/stat.h>
2102 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2103 struct buf { int x; };
2104 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2105 static char *e (p, i)
2106 char **p;
2107 int i;
2109 return p[i];
2111 static char *f (char * (*g) (char **, int), char **p, ...)
2113 char *s;
2114 va_list v;
2115 va_start (v,p);
2116 s = g (p, va_arg (v,int));
2117 va_end (v);
2118 return s;
2120 int test (int i, double x);
2121 struct s1 {int (*f) (int a);};
2122 struct s2 {int (*f) (double a);};
2123 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2124 int argc;
2125 char **argv;
2127 main ()
2129 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2131 return 0;
2133 _ACEOF
2134 # Don't try gcc -ansi; that turns off useful extensions and
2135 # breaks some systems' header files.
2136 # AIX -qlanglvl=ansi
2137 # Ultrix and OSF/1 -std1
2138 # HP-UX 10.20 and later -Ae
2139 # HP-UX older versions -Aa -D_HPUX_SOURCE
2140 # SVR4 -Xc -D__EXTENSIONS__
2141 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2143 CC="$ac_save_CC $ac_arg"
2144 rm -f conftest.$ac_objext
2145 if { (eval echo "$as_me:2145: \"$ac_compile\"") >&5
2146 (eval $ac_compile) 2>&5
2147 ac_status=$?
2148 echo "$as_me:2148: \$? = $ac_status" >&5
2149 (exit $ac_status); } &&
2150 { ac_try='test -s conftest.$ac_objext'
2151 { (eval echo "$as_me:2151: \"$ac_try\"") >&5
2152 (eval $ac_try) 2>&5
2153 ac_status=$?
2154 echo "$as_me:2154: \$? = $ac_status" >&5
2155 (exit $ac_status); }; }; then
2156 ac_cv_prog_cc_stdc=$ac_arg
2157 break
2158 else
2159 echo "$as_me: failed program was:" >&5
2160 cat conftest.$ac_ext >&5
2162 rm -f conftest.$ac_objext
2163 done
2164 rm -f conftest.$ac_ext conftest.$ac_objext
2165 CC=$ac_save_CC
2169 case "x$ac_cv_prog_cc_stdc" in
2170 x|xno)
2171 echo "$as_me:2171: result: none needed" >&5
2172 echo "${ECHO_T}none needed" >&6 ;;
2174 echo "$as_me:2174: result: $ac_cv_prog_cc_stdc" >&5
2175 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2176 CC="$CC $ac_cv_prog_cc_stdc" ;;
2177 esac
2179 # This should have been defined by AC_PROG_CC
2180 : ${CC:=cc}
2182 echo "$as_me:2182: checking \$CC variable" >&5
2183 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2184 case "$CC" in
2185 (*[\ \ ]-[IUD]*)
2186 echo "$as_me:2186: result: broken" >&5
2187 echo "${ECHO_T}broken" >&6
2188 { echo "$as_me:2188: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2189 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2190 # humor him...
2191 cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'`
2192 CC=`echo "$CC" | sed -e 's/[ ].*//'`
2194 cf_fix_cppflags=no
2195 cf_new_cflags=
2196 cf_new_cppflags=
2197 cf_new_extra_cppflags=
2199 for cf_add_cflags in $cf_flags
2201 case $cf_fix_cppflags in
2202 (no)
2203 case $cf_add_cflags in
2204 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2205 case $cf_add_cflags in
2206 (-D*)
2207 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2209 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2210 && test -z "${cf_tst_cflags}" \
2211 && cf_fix_cppflags=yes
2213 if test $cf_fix_cppflags = yes ; then
2214 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2215 continue
2216 elif test "${cf_tst_cflags}" = "\"'" ; then
2217 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2218 continue
2221 esac
2222 case "$CPPFLAGS" in
2223 (*$cf_add_cflags)
2226 case $cf_add_cflags in
2227 (-D*)
2228 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2230 CPPFLAGS=`echo "$CPPFLAGS" | \
2231 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2232 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2235 esac
2236 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2238 esac
2241 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2243 esac
2245 (yes)
2246 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2248 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2250 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2251 && test -z "${cf_tst_cflags}" \
2252 && cf_fix_cppflags=no
2254 esac
2255 done
2257 if test -n "$cf_new_cflags" ; then
2259 CFLAGS="$CFLAGS $cf_new_cflags"
2262 if test -n "$cf_new_cppflags" ; then
2264 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2267 if test -n "$cf_new_extra_cppflags" ; then
2269 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2274 echo "$as_me:2274: result: ok" >&5
2275 echo "${ECHO_T}ok" >&6
2277 esac
2279 ac_ext=c
2280 ac_cpp='$CPP $CPPFLAGS'
2281 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2282 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2283 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2284 ac_main_return=return
2285 echo "$as_me:2285: checking how to run the C preprocessor" >&5
2286 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2287 # On Suns, sometimes $CPP names a directory.
2288 if test -n "$CPP" && test -d "$CPP"; then
2289 CPP=
2291 if test -z "$CPP"; then
2292 if test "${ac_cv_prog_CPP+set}" = set; then
2293 echo $ECHO_N "(cached) $ECHO_C" >&6
2294 else
2295 # Double quotes because CPP needs to be expanded
2296 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2298 ac_preproc_ok=false
2299 for ac_c_preproc_warn_flag in '' yes
2301 # Use a header file that comes with gcc, so configuring glibc
2302 # with a fresh cross-compiler works.
2303 # On the NeXT, cc -E runs the code through the compiler's parser,
2304 # not just through cpp. "Syntax error" is here to catch this case.
2305 cat >conftest.$ac_ext <<_ACEOF
2306 #line 2306 "configure"
2307 #include "confdefs.h"
2308 #include <assert.h>
2309 Syntax error
2310 _ACEOF
2311 if { (eval echo "$as_me:2311: \"$ac_cpp conftest.$ac_ext\"") >&5
2312 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2313 ac_status=$?
2314 egrep -v '^ *\+' conftest.er1 >conftest.err
2315 rm -f conftest.er1
2316 cat conftest.err >&5
2317 echo "$as_me:2317: \$? = $ac_status" >&5
2318 (exit $ac_status); } >/dev/null; then
2319 if test -s conftest.err; then
2320 ac_cpp_err=$ac_c_preproc_warn_flag
2321 else
2322 ac_cpp_err=
2324 else
2325 ac_cpp_err=yes
2327 if test -z "$ac_cpp_err"; then
2329 else
2330 echo "$as_me: failed program was:" >&5
2331 cat conftest.$ac_ext >&5
2332 # Broken: fails on valid input.
2333 continue
2335 rm -f conftest.err conftest.$ac_ext
2337 # OK, works on sane cases. Now check whether non-existent headers
2338 # can be detected and how.
2339 cat >conftest.$ac_ext <<_ACEOF
2340 #line 2340 "configure"
2341 #include "confdefs.h"
2342 #include <ac_nonexistent.h>
2343 _ACEOF
2344 if { (eval echo "$as_me:2344: \"$ac_cpp conftest.$ac_ext\"") >&5
2345 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2346 ac_status=$?
2347 egrep -v '^ *\+' conftest.er1 >conftest.err
2348 rm -f conftest.er1
2349 cat conftest.err >&5
2350 echo "$as_me:2350: \$? = $ac_status" >&5
2351 (exit $ac_status); } >/dev/null; then
2352 if test -s conftest.err; then
2353 ac_cpp_err=$ac_c_preproc_warn_flag
2354 else
2355 ac_cpp_err=
2357 else
2358 ac_cpp_err=yes
2360 if test -z "$ac_cpp_err"; then
2361 # Broken: success on invalid input.
2362 continue
2363 else
2364 echo "$as_me: failed program was:" >&5
2365 cat conftest.$ac_ext >&5
2366 # Passes both tests.
2367 ac_preproc_ok=:
2368 break
2370 rm -f conftest.err conftest.$ac_ext
2372 done
2373 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2374 rm -f conftest.err conftest.$ac_ext
2375 if $ac_preproc_ok; then
2376 break
2379 done
2380 ac_cv_prog_CPP=$CPP
2383 CPP=$ac_cv_prog_CPP
2384 else
2385 ac_cv_prog_CPP=$CPP
2387 echo "$as_me:2387: result: $CPP" >&5
2388 echo "${ECHO_T}$CPP" >&6
2389 ac_preproc_ok=false
2390 for ac_c_preproc_warn_flag in '' yes
2392 # Use a header file that comes with gcc, so configuring glibc
2393 # with a fresh cross-compiler works.
2394 # On the NeXT, cc -E runs the code through the compiler's parser,
2395 # not just through cpp. "Syntax error" is here to catch this case.
2396 cat >conftest.$ac_ext <<_ACEOF
2397 #line 2397 "configure"
2398 #include "confdefs.h"
2399 #include <assert.h>
2400 Syntax error
2401 _ACEOF
2402 if { (eval echo "$as_me:2402: \"$ac_cpp conftest.$ac_ext\"") >&5
2403 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2404 ac_status=$?
2405 egrep -v '^ *\+' conftest.er1 >conftest.err
2406 rm -f conftest.er1
2407 cat conftest.err >&5
2408 echo "$as_me:2408: \$? = $ac_status" >&5
2409 (exit $ac_status); } >/dev/null; then
2410 if test -s conftest.err; then
2411 ac_cpp_err=$ac_c_preproc_warn_flag
2412 else
2413 ac_cpp_err=
2415 else
2416 ac_cpp_err=yes
2418 if test -z "$ac_cpp_err"; then
2420 else
2421 echo "$as_me: failed program was:" >&5
2422 cat conftest.$ac_ext >&5
2423 # Broken: fails on valid input.
2424 continue
2426 rm -f conftest.err conftest.$ac_ext
2428 # OK, works on sane cases. Now check whether non-existent headers
2429 # can be detected and how.
2430 cat >conftest.$ac_ext <<_ACEOF
2431 #line 2431 "configure"
2432 #include "confdefs.h"
2433 #include <ac_nonexistent.h>
2434 _ACEOF
2435 if { (eval echo "$as_me:2435: \"$ac_cpp conftest.$ac_ext\"") >&5
2436 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2437 ac_status=$?
2438 egrep -v '^ *\+' conftest.er1 >conftest.err
2439 rm -f conftest.er1
2440 cat conftest.err >&5
2441 echo "$as_me:2441: \$? = $ac_status" >&5
2442 (exit $ac_status); } >/dev/null; then
2443 if test -s conftest.err; then
2444 ac_cpp_err=$ac_c_preproc_warn_flag
2445 else
2446 ac_cpp_err=
2448 else
2449 ac_cpp_err=yes
2451 if test -z "$ac_cpp_err"; then
2452 # Broken: success on invalid input.
2453 continue
2454 else
2455 echo "$as_me: failed program was:" >&5
2456 cat conftest.$ac_ext >&5
2457 # Passes both tests.
2458 ac_preproc_ok=:
2459 break
2461 rm -f conftest.err conftest.$ac_ext
2463 done
2464 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2465 rm -f conftest.err conftest.$ac_ext
2466 if $ac_preproc_ok; then
2468 else
2469 { { echo "$as_me:2469: error: C preprocessor \"$CPP\" fails sanity check" >&5
2470 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2471 { (exit 1); exit 1; }; }
2474 ac_ext=c
2475 ac_cpp='$CPP $CPPFLAGS'
2476 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2477 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2478 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2479 ac_main_return=return
2481 if test $ac_cv_c_compiler_gnu = yes; then
2482 echo "$as_me:2482: checking whether $CC needs -traditional" >&5
2483 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2484 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2485 echo $ECHO_N "(cached) $ECHO_C" >&6
2486 else
2487 ac_pattern="Autoconf.*'x'"
2488 cat >conftest.$ac_ext <<_ACEOF
2489 #line 2489 "configure"
2490 #include "confdefs.h"
2491 #include <sgtty.h>
2492 int Autoconf = TIOCGETP;
2493 _ACEOF
2494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2495 egrep "$ac_pattern" >/dev/null 2>&1; then
2496 ac_cv_prog_gcc_traditional=yes
2497 else
2498 ac_cv_prog_gcc_traditional=no
2500 rm -rf conftest*
2502 if test $ac_cv_prog_gcc_traditional = no; then
2503 cat >conftest.$ac_ext <<_ACEOF
2504 #line 2504 "configure"
2505 #include "confdefs.h"
2506 #include <termio.h>
2507 int Autoconf = TCGETA;
2508 _ACEOF
2509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2510 egrep "$ac_pattern" >/dev/null 2>&1; then
2511 ac_cv_prog_gcc_traditional=yes
2513 rm -rf conftest*
2517 echo "$as_me:2517: result: $ac_cv_prog_gcc_traditional" >&5
2518 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2519 if test $ac_cv_prog_gcc_traditional = yes; then
2520 CC="$CC -traditional"
2524 echo "$as_me:2524: checking whether $CC understands -c and -o together" >&5
2525 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2526 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2527 echo $ECHO_N "(cached) $ECHO_C" >&6
2528 else
2530 cat > conftest.$ac_ext <<CF_EOF
2531 #include <stdio.h>
2532 int main()
2534 ${cf_cv_main_return:-return}(0);
2536 CF_EOF
2537 # We do the test twice because some compilers refuse to overwrite an
2538 # existing .o file with -o, though they will create one.
2539 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2540 if { (eval echo "$as_me:2540: \"$ac_try\"") >&5
2541 (eval $ac_try) 2>&5
2542 ac_status=$?
2543 echo "$as_me:2543: \$? = $ac_status" >&5
2544 (exit $ac_status); } &&
2545 test -f conftest2.$ac_objext && { (eval echo "$as_me:2545: \"$ac_try\"") >&5
2546 (eval $ac_try) 2>&5
2547 ac_status=$?
2548 echo "$as_me:2548: \$? = $ac_status" >&5
2549 (exit $ac_status); };
2550 then
2551 eval cf_cv_prog_CC_c_o=yes
2552 else
2553 eval cf_cv_prog_CC_c_o=no
2555 rm -rf conftest*
2558 if test $cf_cv_prog_CC_c_o = yes; then
2559 echo "$as_me:2559: result: yes" >&5
2560 echo "${ECHO_T}yes" >&6
2561 else
2562 echo "$as_me:2562: result: no" >&5
2563 echo "${ECHO_T}no" >&6
2566 if test "$cross_compiling" = yes ; then
2567 LDCONFIG=:
2568 else
2569 case "$cf_cv_system_name" in
2570 (dragonfly*|mirbsd*|freebsd*)
2571 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2573 (*) LDPATH=$PATH:/sbin:/usr/sbin
2574 # Extract the first word of "ldconfig", so it can be a program name with args.
2575 set dummy ldconfig; ac_word=$2
2576 echo "$as_me:2576: checking for $ac_word" >&5
2577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2578 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2579 echo $ECHO_N "(cached) $ECHO_C" >&6
2580 else
2581 case $LDCONFIG in
2582 [\\/]* | ?:[\\/]*)
2583 ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2586 ac_save_IFS=$IFS; IFS=$ac_path_separator
2587 ac_dummy="$LDPATH"
2588 for ac_dir in $ac_dummy; do
2589 IFS=$ac_save_IFS
2590 test -z "$ac_dir" && ac_dir=.
2591 if $as_executable_p "$ac_dir/$ac_word"; then
2592 ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2593 echo "$as_me:2593: found $ac_dir/$ac_word" >&5
2594 break
2596 done
2599 esac
2601 LDCONFIG=$ac_cv_path_LDCONFIG
2603 if test -n "$LDCONFIG"; then
2604 echo "$as_me:2604: result: $LDCONFIG" >&5
2605 echo "${ECHO_T}$LDCONFIG" >&6
2606 else
2607 echo "$as_me:2607: result: no" >&5
2608 echo "${ECHO_T}no" >&6
2612 esac
2615 echo "$as_me:2615: checking if you want to ensure bool is consistent with C++" >&5
2616 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2618 # Check whether --with-cxx or --without-cxx was given.
2619 if test "${with_cxx+set}" = set; then
2620 withval="$with_cxx"
2621 cf_with_cxx=$withval
2622 else
2623 cf_with_cxx=yes
2625 echo "$as_me:2625: result: $cf_with_cxx" >&5
2626 echo "${ECHO_T}$cf_with_cxx" >&6
2627 if test "X$cf_with_cxx" = Xno ; then
2628 CXX=""
2629 GXX=""
2630 else
2631 # with autoconf 2.13, we can change the error to a warning:
2632 ac_ext=cc
2633 ac_cpp='$CXXCPP $CPPFLAGS'
2634 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2635 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2636 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2637 ac_main_return=return
2638 if test -n "$ac_tool_prefix"; then
2639 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2641 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2642 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2643 echo "$as_me:2643: checking for $ac_word" >&5
2644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2645 if test "${ac_cv_prog_CXX+set}" = set; then
2646 echo $ECHO_N "(cached) $ECHO_C" >&6
2647 else
2648 if test -n "$CXX"; then
2649 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2650 else
2651 ac_save_IFS=$IFS; IFS=$ac_path_separator
2652 ac_dummy="$PATH"
2653 for ac_dir in $ac_dummy; do
2654 IFS=$ac_save_IFS
2655 test -z "$ac_dir" && ac_dir=.
2656 $as_executable_p "$ac_dir/$ac_word" || continue
2657 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2658 echo "$as_me:2658: found $ac_dir/$ac_word" >&5
2659 break
2660 done
2664 CXX=$ac_cv_prog_CXX
2665 if test -n "$CXX"; then
2666 echo "$as_me:2666: result: $CXX" >&5
2667 echo "${ECHO_T}$CXX" >&6
2668 else
2669 echo "$as_me:2669: result: no" >&5
2670 echo "${ECHO_T}no" >&6
2673 test -n "$CXX" && break
2674 done
2676 if test -z "$CXX"; then
2677 ac_ct_CXX=$CXX
2678 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2680 # Extract the first word of "$ac_prog", so it can be a program name with args.
2681 set dummy $ac_prog; ac_word=$2
2682 echo "$as_me:2682: checking for $ac_word" >&5
2683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2684 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2685 echo $ECHO_N "(cached) $ECHO_C" >&6
2686 else
2687 if test -n "$ac_ct_CXX"; then
2688 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2689 else
2690 ac_save_IFS=$IFS; IFS=$ac_path_separator
2691 ac_dummy="$PATH"
2692 for ac_dir in $ac_dummy; do
2693 IFS=$ac_save_IFS
2694 test -z "$ac_dir" && ac_dir=.
2695 $as_executable_p "$ac_dir/$ac_word" || continue
2696 ac_cv_prog_ac_ct_CXX="$ac_prog"
2697 echo "$as_me:2697: found $ac_dir/$ac_word" >&5
2698 break
2699 done
2703 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2704 if test -n "$ac_ct_CXX"; then
2705 echo "$as_me:2705: result: $ac_ct_CXX" >&5
2706 echo "${ECHO_T}$ac_ct_CXX" >&6
2707 else
2708 echo "$as_me:2708: result: no" >&5
2709 echo "${ECHO_T}no" >&6
2712 test -n "$ac_ct_CXX" && break
2713 done
2714 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2716 CXX=$ac_ct_CXX
2719 # Provide some information about the compiler.
2720 echo "$as_me:2720:" \
2721 "checking for C++ compiler version" >&5
2722 ac_compiler=`set X $ac_compile; echo $2`
2723 { (eval echo "$as_me:2723: \"$ac_compiler --version </dev/null >&5\"") >&5
2724 (eval $ac_compiler --version </dev/null >&5) 2>&5
2725 ac_status=$?
2726 echo "$as_me:2726: \$? = $ac_status" >&5
2727 (exit $ac_status); }
2728 { (eval echo "$as_me:2728: \"$ac_compiler -v </dev/null >&5\"") >&5
2729 (eval $ac_compiler -v </dev/null >&5) 2>&5
2730 ac_status=$?
2731 echo "$as_me:2731: \$? = $ac_status" >&5
2732 (exit $ac_status); }
2733 { (eval echo "$as_me:2733: \"$ac_compiler -V </dev/null >&5\"") >&5
2734 (eval $ac_compiler -V </dev/null >&5) 2>&5
2735 ac_status=$?
2736 echo "$as_me:2736: \$? = $ac_status" >&5
2737 (exit $ac_status); }
2739 echo "$as_me:2739: checking whether we are using the GNU C++ compiler" >&5
2740 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2741 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2742 echo $ECHO_N "(cached) $ECHO_C" >&6
2743 else
2744 cat >conftest.$ac_ext <<_ACEOF
2745 #line 2745 "configure"
2746 #include "confdefs.h"
2749 main ()
2751 #ifndef __GNUC__
2752 choke me
2753 #endif
2756 return 0;
2758 _ACEOF
2759 rm -f conftest.$ac_objext
2760 if { (eval echo "$as_me:2760: \"$ac_compile\"") >&5
2761 (eval $ac_compile) 2>&5
2762 ac_status=$?
2763 echo "$as_me:2763: \$? = $ac_status" >&5
2764 (exit $ac_status); } &&
2765 { ac_try='test -s conftest.$ac_objext'
2766 { (eval echo "$as_me:2766: \"$ac_try\"") >&5
2767 (eval $ac_try) 2>&5
2768 ac_status=$?
2769 echo "$as_me:2769: \$? = $ac_status" >&5
2770 (exit $ac_status); }; }; then
2771 ac_compiler_gnu=yes
2772 else
2773 echo "$as_me: failed program was:" >&5
2774 cat conftest.$ac_ext >&5
2775 ac_compiler_gnu=no
2777 rm -f conftest.$ac_objext conftest.$ac_ext
2778 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2781 echo "$as_me:2781: result: $ac_cv_cxx_compiler_gnu" >&5
2782 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2783 GXX=`test $ac_compiler_gnu = yes && echo yes`
2784 ac_test_CXXFLAGS=${CXXFLAGS+set}
2785 ac_save_CXXFLAGS=$CXXFLAGS
2786 CXXFLAGS="-g"
2787 echo "$as_me:2787: checking whether $CXX accepts -g" >&5
2788 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2789 if test "${ac_cv_prog_cxx_g+set}" = set; then
2790 echo $ECHO_N "(cached) $ECHO_C" >&6
2791 else
2792 cat >conftest.$ac_ext <<_ACEOF
2793 #line 2793 "configure"
2794 #include "confdefs.h"
2797 main ()
2801 return 0;
2803 _ACEOF
2804 rm -f conftest.$ac_objext
2805 if { (eval echo "$as_me:2805: \"$ac_compile\"") >&5
2806 (eval $ac_compile) 2>&5
2807 ac_status=$?
2808 echo "$as_me:2808: \$? = $ac_status" >&5
2809 (exit $ac_status); } &&
2810 { ac_try='test -s conftest.$ac_objext'
2811 { (eval echo "$as_me:2811: \"$ac_try\"") >&5
2812 (eval $ac_try) 2>&5
2813 ac_status=$?
2814 echo "$as_me:2814: \$? = $ac_status" >&5
2815 (exit $ac_status); }; }; then
2816 ac_cv_prog_cxx_g=yes
2817 else
2818 echo "$as_me: failed program was:" >&5
2819 cat conftest.$ac_ext >&5
2820 ac_cv_prog_cxx_g=no
2822 rm -f conftest.$ac_objext conftest.$ac_ext
2824 echo "$as_me:2824: result: $ac_cv_prog_cxx_g" >&5
2825 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2826 if test "$ac_test_CXXFLAGS" = set; then
2827 CXXFLAGS=$ac_save_CXXFLAGS
2828 elif test $ac_cv_prog_cxx_g = yes; then
2829 if test "$GXX" = yes; then
2830 CXXFLAGS="-g -O2"
2831 else
2832 CXXFLAGS="-g"
2834 else
2835 if test "$GXX" = yes; then
2836 CXXFLAGS="-O2"
2837 else
2838 CXXFLAGS=
2841 for ac_declaration in \
2843 '#include <stdlib.h>' \
2844 'extern "C" void std::exit (int) throw (); using std::exit;' \
2845 'extern "C" void std::exit (int); using std::exit;' \
2846 'extern "C" void exit (int) throw ();' \
2847 'extern "C" void exit (int);' \
2848 'void exit (int);'
2850 cat >conftest.$ac_ext <<_ACEOF
2851 #line 2851 "configure"
2852 #include "confdefs.h"
2853 #include <stdlib.h>
2854 $ac_declaration
2856 main ()
2858 exit (42);
2860 return 0;
2862 _ACEOF
2863 rm -f conftest.$ac_objext
2864 if { (eval echo "$as_me:2864: \"$ac_compile\"") >&5
2865 (eval $ac_compile) 2>&5
2866 ac_status=$?
2867 echo "$as_me:2867: \$? = $ac_status" >&5
2868 (exit $ac_status); } &&
2869 { ac_try='test -s conftest.$ac_objext'
2870 { (eval echo "$as_me:2870: \"$ac_try\"") >&5
2871 (eval $ac_try) 2>&5
2872 ac_status=$?
2873 echo "$as_me:2873: \$? = $ac_status" >&5
2874 (exit $ac_status); }; }; then
2876 else
2877 echo "$as_me: failed program was:" >&5
2878 cat conftest.$ac_ext >&5
2879 continue
2881 rm -f conftest.$ac_objext conftest.$ac_ext
2882 cat >conftest.$ac_ext <<_ACEOF
2883 #line 2883 "configure"
2884 #include "confdefs.h"
2885 $ac_declaration
2887 main ()
2889 exit (42);
2891 return 0;
2893 _ACEOF
2894 rm -f conftest.$ac_objext
2895 if { (eval echo "$as_me:2895: \"$ac_compile\"") >&5
2896 (eval $ac_compile) 2>&5
2897 ac_status=$?
2898 echo "$as_me:2898: \$? = $ac_status" >&5
2899 (exit $ac_status); } &&
2900 { ac_try='test -s conftest.$ac_objext'
2901 { (eval echo "$as_me:2901: \"$ac_try\"") >&5
2902 (eval $ac_try) 2>&5
2903 ac_status=$?
2904 echo "$as_me:2904: \$? = $ac_status" >&5
2905 (exit $ac_status); }; }; then
2906 break
2907 else
2908 echo "$as_me: failed program was:" >&5
2909 cat conftest.$ac_ext >&5
2911 rm -f conftest.$ac_objext conftest.$ac_ext
2912 done
2913 rm -rf conftest*
2914 if test -n "$ac_declaration"; then
2915 echo '#ifdef __cplusplus' >>confdefs.h
2916 echo $ac_declaration >>confdefs.h
2917 echo '#endif' >>confdefs.h
2920 ac_ext=c
2921 ac_cpp='$CPP $CPPFLAGS'
2922 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2923 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2924 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2925 ac_main_return=return
2927 ac_ext=cc
2928 ac_cpp='$CXXCPP $CPPFLAGS'
2929 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2930 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2931 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2932 ac_main_return=return
2934 if test "x$cf_with_cxx" != xno
2935 then
2936 # Several of the C++ configurations do not work, particularly when
2937 # cross-compiling (20140913 -TD)
2938 echo "$as_me:2938: checking if $CXX works" >&5
2939 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2941 save_CPPFLAGS="$CPPFLAGS"
2942 eval cf_includedir=${includedir}
2943 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2945 cat >conftest.$ac_ext <<_ACEOF
2946 #line 2946 "configure"
2947 #include "confdefs.h"
2949 #include <stdlib.h>
2950 #include <stdio.h>
2953 main ()
2956 printf("Hello world!\n")
2959 return 0;
2961 _ACEOF
2962 rm -f conftest.$ac_objext
2963 if { (eval echo "$as_me:2963: \"$ac_compile\"") >&5
2964 (eval $ac_compile) 2>&5
2965 ac_status=$?
2966 echo "$as_me:2966: \$? = $ac_status" >&5
2967 (exit $ac_status); } &&
2968 { ac_try='test -s conftest.$ac_objext'
2969 { (eval echo "$as_me:2969: \"$ac_try\"") >&5
2970 (eval $ac_try) 2>&5
2971 ac_status=$?
2972 echo "$as_me:2972: \$? = $ac_status" >&5
2973 (exit $ac_status); }; }; then
2974 cf_cxx_works=yes
2975 else
2976 echo "$as_me: failed program was:" >&5
2977 cat conftest.$ac_ext >&5
2978 cf_cxx_works=no
2980 rm -f conftest.$ac_objext conftest.$ac_ext
2981 CPPFLAGS="$save_CPPFLAGS"
2983 echo "$as_me:2983: result: $cf_cxx_works" >&5
2984 echo "${ECHO_T}$cf_cxx_works" >&6
2985 if test "x$cf_cxx_works" = xno
2986 then
2987 { echo "$as_me:2987: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2988 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2989 cf_with_cxx=no; CXX=""; GXX="";
2992 ac_ext=c
2993 ac_cpp='$CPP $CPPFLAGS'
2994 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2995 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2996 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2997 ac_main_return=return
2999 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3000 if test "$CXX" = "g++" ; then
3001 # Extract the first word of "g++", so it can be a program name with args.
3002 set dummy g++; ac_word=$2
3003 echo "$as_me:3003: checking for $ac_word" >&5
3004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3005 if test "${ac_cv_path_CXX+set}" = set; then
3006 echo $ECHO_N "(cached) $ECHO_C" >&6
3007 else
3008 case $CXX in
3009 [\\/]* | ?:[\\/]*)
3010 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3013 ac_save_IFS=$IFS; IFS=$ac_path_separator
3014 ac_dummy="$PATH"
3015 for ac_dir in $ac_dummy; do
3016 IFS=$ac_save_IFS
3017 test -z "$ac_dir" && ac_dir=.
3018 if $as_executable_p "$ac_dir/$ac_word"; then
3019 ac_cv_path_CXX="$ac_dir/$ac_word"
3020 echo "$as_me:3020: found $ac_dir/$ac_word" >&5
3021 break
3023 done
3026 esac
3028 CXX=$ac_cv_path_CXX
3030 if test -n "$CXX"; then
3031 echo "$as_me:3031: result: $CXX" >&5
3032 echo "${ECHO_T}$CXX" >&6
3033 else
3034 echo "$as_me:3034: result: no" >&5
3035 echo "${ECHO_T}no" >&6
3039 case "x$CXX" in
3040 (x|xg++)
3041 { echo "$as_me:3041: WARNING: You don't have any C++ compiler, too bad" >&5
3042 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3043 cf_with_cxx=no; CXX=""; GXX="";
3045 esac
3048 GXX_VERSION=none
3049 if test "$GXX" = yes; then
3050 echo "$as_me:3050: checking version of ${CXX:-g++}" >&5
3051 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3052 GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3053 test -z "$GXX_VERSION" && GXX_VERSION=unknown
3054 echo "$as_me:3054: result: $GXX_VERSION" >&5
3055 echo "${ECHO_T}$GXX_VERSION" >&6
3058 case $GXX_VERSION in
3059 (1*|2.[0-6]*)
3060 # GXX=""; CXX=""; ac_cv_prog_gxx=no
3061 # cf_cxx_library=no
3062 { echo "$as_me:3062: WARNING: templates do not work" >&5
3063 echo "$as_me: WARNING: templates do not work" >&2;}
3065 esac
3067 echo "$as_me:3067: checking if you want to build C++ binding and demo" >&5
3068 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3070 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3071 if test "${with_cxx_binding+set}" = set; then
3072 withval="$with_cxx_binding"
3073 cf_with_cxx_binding=$withval
3074 else
3075 cf_with_cxx_binding=$cf_with_cxx
3077 echo "$as_me:3077: result: $cf_with_cxx_binding" >&5
3078 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3080 echo "$as_me:3080: checking if you want to build with Ada95" >&5
3081 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3082 echo "$as_me:3082: result: $cf_with_ada" >&5
3083 echo "${ECHO_T}$cf_with_ada" >&6
3085 echo "$as_me:3085: checking if you want to install terminal database" >&5
3086 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3088 # Check whether --enable-db-install or --disable-db-install was given.
3089 if test "${enable_db_install+set}" = set; then
3090 enableval="$enable_db_install"
3091 cf_with_db_install=$enableval
3092 else
3093 cf_with_db_install=yes
3095 echo "$as_me:3095: result: $cf_with_db_install" >&5
3096 echo "${ECHO_T}$cf_with_db_install" >&6
3098 echo "$as_me:3098: checking if you want to install manpages" >&5
3099 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3101 # Check whether --with-manpages or --without-manpages was given.
3102 if test "${with_manpages+set}" = set; then
3103 withval="$with_manpages"
3104 cf_with_manpages=$withval
3105 else
3106 cf_with_manpages=yes
3108 echo "$as_me:3108: result: $cf_with_manpages" >&5
3109 echo "${ECHO_T}$cf_with_manpages" >&6
3111 echo "$as_me:3111: checking if you want to build programs such as tic" >&5
3112 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3114 # Check whether --with-progs or --without-progs was given.
3115 if test "${with_progs+set}" = set; then
3116 withval="$with_progs"
3117 cf_with_progs=$withval
3118 else
3119 cf_with_progs=yes
3121 echo "$as_me:3121: result: $cf_with_progs" >&5
3122 echo "${ECHO_T}$cf_with_progs" >&6
3124 echo "$as_me:3124: checking if you want to build test-programs" >&5
3125 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3127 # Check whether --with-tests or --without-tests was given.
3128 if test "${with_tests+set}" = set; then
3129 withval="$with_tests"
3130 cf_with_tests=$withval
3131 else
3132 cf_with_tests=yes
3134 echo "$as_me:3134: result: $cf_with_tests" >&5
3135 echo "${ECHO_T}$cf_with_tests" >&6
3137 echo "$as_me:3137: checking if you wish to install curses.h" >&5
3138 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3140 # Check whether --with-curses-h or --without-curses-h was given.
3141 if test "${with_curses_h+set}" = set; then
3142 withval="$with_curses_h"
3143 with_curses_h=$withval
3144 else
3145 with_curses_h=yes
3147 echo "$as_me:3147: result: $with_curses_h" >&5
3148 echo "${ECHO_T}$with_curses_h" >&6
3150 modules_to_build="ncurses"
3151 if test "X$cf_with_progs" != Xno ; then
3152 modules_to_build="$modules_to_build progs tack"
3154 modules_to_build="$modules_to_build panel menu form"
3156 test "$program_prefix" != NONE &&
3157 program_transform_name="s,^,$program_prefix,;$program_transform_name"
3158 # Use a double $ so make ignores it.
3159 test "$program_suffix" != NONE &&
3160 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3161 # Double any \ or $. echo might interpret backslashes.
3162 # By default was `s,x,x', remove it if useless.
3163 cat <<\_ACEOF >conftest.sed
3164 s/[\\$]/&&/g;s/;s,x,x,$//
3165 _ACEOF
3166 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3167 rm conftest.sed
3169 for ac_prog in mawk gawk nawk awk
3171 # Extract the first word of "$ac_prog", so it can be a program name with args.
3172 set dummy $ac_prog; ac_word=$2
3173 echo "$as_me:3173: checking for $ac_word" >&5
3174 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3175 if test "${ac_cv_prog_AWK+set}" = set; then
3176 echo $ECHO_N "(cached) $ECHO_C" >&6
3177 else
3178 if test -n "$AWK"; then
3179 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3180 else
3181 ac_save_IFS=$IFS; IFS=$ac_path_separator
3182 ac_dummy="$PATH"
3183 for ac_dir in $ac_dummy; do
3184 IFS=$ac_save_IFS
3185 test -z "$ac_dir" && ac_dir=.
3186 $as_executable_p "$ac_dir/$ac_word" || continue
3187 ac_cv_prog_AWK="$ac_prog"
3188 echo "$as_me:3188: found $ac_dir/$ac_word" >&5
3189 break
3190 done
3194 AWK=$ac_cv_prog_AWK
3195 if test -n "$AWK"; then
3196 echo "$as_me:3196: result: $AWK" >&5
3197 echo "${ECHO_T}$AWK" >&6
3198 else
3199 echo "$as_me:3199: result: no" >&5
3200 echo "${ECHO_T}no" >&6
3203 test -n "$AWK" && break
3204 done
3206 test -z "$AWK" && { { echo "$as_me:3206: error: No awk program found" >&5
3207 echo "$as_me: error: No awk program found" >&2;}
3208 { (exit 1); exit 1; }; }
3210 echo "$as_me:3210: checking for egrep" >&5
3211 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3212 if test "${ac_cv_prog_egrep+set}" = set; then
3213 echo $ECHO_N "(cached) $ECHO_C" >&6
3214 else
3215 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3216 then ac_cv_prog_egrep='grep -E'
3217 else ac_cv_prog_egrep='egrep'
3220 echo "$as_me:3220: result: $ac_cv_prog_egrep" >&5
3221 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3222 EGREP=$ac_cv_prog_egrep
3224 test -z "$EGREP" && { { echo "$as_me:3224: error: No egrep program found" >&5
3225 echo "$as_me: error: No egrep program found" >&2;}
3226 { (exit 1); exit 1; }; }
3228 # Find a good install program. We prefer a C program (faster),
3229 # so one script is as good as another. But avoid the broken or
3230 # incompatible versions:
3231 # SysV /etc/install, /usr/sbin/install
3232 # SunOS /usr/etc/install
3233 # IRIX /sbin/install
3234 # AIX /bin/install
3235 # AmigaOS /C/install, which installs bootblocks on floppy discs
3236 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3237 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3238 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3239 # ./install, which can be erroneously created by make from ./install.sh.
3240 echo "$as_me:3240: checking for a BSD compatible install" >&5
3241 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3242 if test -z "$INSTALL"; then
3243 if test "${ac_cv_path_install+set}" = set; then
3244 echo $ECHO_N "(cached) $ECHO_C" >&6
3245 else
3246 ac_save_IFS=$IFS; IFS=$ac_path_separator
3247 for ac_dir in $PATH; do
3248 IFS=$ac_save_IFS
3249 # Account for people who put trailing slashes in PATH elements.
3250 case $ac_dir/ in
3251 / | ./ | .// | /cC/* \
3252 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3253 | /usr/ucb/* ) ;;
3255 # OSF1 and SCO ODT 3.0 have their own names for install.
3256 # Don't use installbsd from OSF since it installs stuff as root
3257 # by default.
3258 for ac_prog in ginstall scoinst install; do
3259 if $as_executable_p "$ac_dir/$ac_prog"; then
3260 if test $ac_prog = install &&
3261 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3262 # AIX install. It has an incompatible calling convention.
3264 elif test $ac_prog = install &&
3265 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3266 # program-specific install script used by HP pwplus--don't use.
3268 else
3269 ac_cv_path_install="$ac_dir/$ac_prog -c"
3270 break 2
3273 done
3275 esac
3276 done
3279 if test "${ac_cv_path_install+set}" = set; then
3280 INSTALL=$ac_cv_path_install
3281 else
3282 # As a last resort, use the slow shell script. We don't cache a
3283 # path for INSTALL within a source directory, because that will
3284 # break other packages using the cache if that directory is
3285 # removed, or if the path is relative.
3286 INSTALL=$ac_install_sh
3289 echo "$as_me:3289: result: $INSTALL" >&5
3290 echo "${ECHO_T}$INSTALL" >&6
3292 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3293 # It thinks the first close brace ends the variable substitution.
3294 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3296 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3298 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3300 case $INSTALL in
3301 (/*)
3304 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3305 test -z "$cf_dir" && cf_dir=.
3306 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3308 esac
3310 for ac_prog in tdlint lint alint splint lclint
3312 # Extract the first word of "$ac_prog", so it can be a program name with args.
3313 set dummy $ac_prog; ac_word=$2
3314 echo "$as_me:3314: checking for $ac_word" >&5
3315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3316 if test "${ac_cv_prog_LINT+set}" = set; then
3317 echo $ECHO_N "(cached) $ECHO_C" >&6
3318 else
3319 if test -n "$LINT"; then
3320 ac_cv_prog_LINT="$LINT" # Let the user override the test.
3321 else
3322 ac_save_IFS=$IFS; IFS=$ac_path_separator
3323 ac_dummy="$PATH"
3324 for ac_dir in $ac_dummy; do
3325 IFS=$ac_save_IFS
3326 test -z "$ac_dir" && ac_dir=.
3327 $as_executable_p "$ac_dir/$ac_word" || continue
3328 ac_cv_prog_LINT="$ac_prog"
3329 echo "$as_me:3329: found $ac_dir/$ac_word" >&5
3330 break
3331 done
3335 LINT=$ac_cv_prog_LINT
3336 if test -n "$LINT"; then
3337 echo "$as_me:3337: result: $LINT" >&5
3338 echo "${ECHO_T}$LINT" >&6
3339 else
3340 echo "$as_me:3340: result: no" >&5
3341 echo "${ECHO_T}no" >&6
3344 test -n "$LINT" && break
3345 done
3347 echo "$as_me:3347: checking whether ln -s works" >&5
3348 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3349 LN_S=$as_ln_s
3350 if test "$LN_S" = "ln -s"; then
3351 echo "$as_me:3351: result: yes" >&5
3352 echo "${ECHO_T}yes" >&6
3353 else
3354 echo "$as_me:3354: result: no, using $LN_S" >&5
3355 echo "${ECHO_T}no, using $LN_S" >&6
3358 echo "$as_me:3358: checking if $LN_S -f options work" >&5
3359 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3361 rm -f conf$$.src conf$$dst
3362 echo >conf$$.dst
3363 echo first >conf$$.src
3364 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3365 cf_prog_ln_sf=yes
3366 else
3367 cf_prog_ln_sf=no
3369 rm -f conf$$.dst conf$$src
3370 echo "$as_me:3370: result: $cf_prog_ln_sf" >&5
3371 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3373 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3375 echo "$as_me:3375: checking for long file names" >&5
3376 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3377 if test "${ac_cv_sys_long_file_names+set}" = set; then
3378 echo $ECHO_N "(cached) $ECHO_C" >&6
3379 else
3380 ac_cv_sys_long_file_names=yes
3381 # Test for long file names in all the places we know might matter:
3382 # . the current directory, where building will happen
3383 # $prefix/lib where we will be installing things
3384 # $exec_prefix/lib likewise
3385 # eval it to expand exec_prefix.
3386 # $TMPDIR if set, where it might want to write temporary files
3387 # if $TMPDIR is not set:
3388 # /tmp where it might want to write temporary files
3389 # /var/tmp likewise
3390 # /usr/tmp likewise
3391 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3392 ac_tmpdirs=$TMPDIR
3393 else
3394 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3396 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3397 test -d $ac_dir || continue
3398 test -w $ac_dir || continue # It is less confusing to not echo anything here.
3399 ac_xdir=$ac_dir/cf$$
3400 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3401 ac_tf1=$ac_xdir/conftest9012345
3402 ac_tf2=$ac_xdir/conftest9012346
3403 (echo 1 >$ac_tf1) 2>/dev/null
3404 (echo 2 >$ac_tf2) 2>/dev/null
3405 ac_val=`cat $ac_tf1 2>/dev/null`
3406 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3407 ac_cv_sys_long_file_names=no
3408 rm -rf $ac_xdir 2>/dev/null
3409 break
3411 rm -rf $ac_xdir 2>/dev/null
3412 done
3414 echo "$as_me:3414: result: $ac_cv_sys_long_file_names" >&5
3415 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3416 if test $ac_cv_sys_long_file_names = yes; then
3418 cat >>confdefs.h <<\EOF
3419 #define HAVE_LONG_FILE_NAMES 1
3424 # if we find pkg-config, check if we should install the ".pc" files.
3426 echo "$as_me:3426: checking if you want to use pkg-config" >&5
3427 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3429 # Check whether --with-pkg-config or --without-pkg-config was given.
3430 if test "${with_pkg_config+set}" = set; then
3431 withval="$with_pkg_config"
3432 cf_pkg_config=$withval
3433 else
3434 cf_pkg_config=yes
3436 echo "$as_me:3436: result: $cf_pkg_config" >&5
3437 echo "${ECHO_T}$cf_pkg_config" >&6
3439 case $cf_pkg_config in
3440 (no)
3441 PKG_CONFIG=none
3443 (yes)
3445 if test -n "$ac_tool_prefix"; then
3446 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3447 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3448 echo "$as_me:3448: checking for $ac_word" >&5
3449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3450 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3451 echo $ECHO_N "(cached) $ECHO_C" >&6
3452 else
3453 case $PKG_CONFIG in
3454 [\\/]* | ?:[\\/]*)
3455 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3458 ac_save_IFS=$IFS; IFS=$ac_path_separator
3459 ac_dummy="$PATH"
3460 for ac_dir in $ac_dummy; do
3461 IFS=$ac_save_IFS
3462 test -z "$ac_dir" && ac_dir=.
3463 if $as_executable_p "$ac_dir/$ac_word"; then
3464 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3465 echo "$as_me:3465: found $ac_dir/$ac_word" >&5
3466 break
3468 done
3471 esac
3473 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3475 if test -n "$PKG_CONFIG"; then
3476 echo "$as_me:3476: result: $PKG_CONFIG" >&5
3477 echo "${ECHO_T}$PKG_CONFIG" >&6
3478 else
3479 echo "$as_me:3479: result: no" >&5
3480 echo "${ECHO_T}no" >&6
3484 if test -z "$ac_cv_path_PKG_CONFIG"; then
3485 ac_pt_PKG_CONFIG=$PKG_CONFIG
3486 # Extract the first word of "pkg-config", so it can be a program name with args.
3487 set dummy pkg-config; ac_word=$2
3488 echo "$as_me:3488: checking for $ac_word" >&5
3489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3490 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3491 echo $ECHO_N "(cached) $ECHO_C" >&6
3492 else
3493 case $ac_pt_PKG_CONFIG in
3494 [\\/]* | ?:[\\/]*)
3495 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3498 ac_save_IFS=$IFS; IFS=$ac_path_separator
3499 ac_dummy="$PATH"
3500 for ac_dir in $ac_dummy; do
3501 IFS=$ac_save_IFS
3502 test -z "$ac_dir" && ac_dir=.
3503 if $as_executable_p "$ac_dir/$ac_word"; then
3504 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3505 echo "$as_me:3505: found $ac_dir/$ac_word" >&5
3506 break
3508 done
3510 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3512 esac
3514 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3516 if test -n "$ac_pt_PKG_CONFIG"; then
3517 echo "$as_me:3517: result: $ac_pt_PKG_CONFIG" >&5
3518 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3519 else
3520 echo "$as_me:3520: result: no" >&5
3521 echo "${ECHO_T}no" >&6
3524 PKG_CONFIG=$ac_pt_PKG_CONFIG
3525 else
3526 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3531 PKG_CONFIG=$withval
3533 esac
3535 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3536 if test "$PKG_CONFIG" != none ; then
3538 if test "x$prefix" != xNONE; then
3539 cf_path_syntax="$prefix"
3540 else
3541 cf_path_syntax="$ac_default_prefix"
3544 case ".$PKG_CONFIG" in
3545 (.\$\(*\)*|.\'*\'*)
3547 (..|./*|.\\*)
3549 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3551 (.\${*prefix}*|.\${*dir}*)
3552 eval PKG_CONFIG="$PKG_CONFIG"
3553 case ".$PKG_CONFIG" in
3554 (.NONE/*)
3555 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3557 esac
3559 (.no|.NONE/*)
3560 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3563 { { echo "$as_me:3563: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3564 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3565 { (exit 1); exit 1; }; }
3567 esac
3569 elif test "x$cf_pkg_config" != xno ; then
3570 { echo "$as_me:3570: WARNING: pkg-config is not installed" >&5
3571 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3574 if test "x$PKG_CONFIG" = xnone ; then
3575 PKG_CONFIG_LIBDIR=no
3576 else
3577 echo "$as_me:3577: checking for $PKG_CONFIG library directory" >&5
3578 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3580 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3581 if test "${with_pkg_config_libdir+set}" = set; then
3582 withval="$with_pkg_config_libdir"
3583 PKG_CONFIG_LIBDIR=$withval
3584 else
3585 PKG_CONFIG_LIBDIR=yes
3589 case x$PKG_CONFIG_LIBDIR in
3590 (x/*)
3592 (xyes)
3593 # Look for the library directory using the same prefix as the executable
3594 if test "x$PKG_CONFIG" = xnone
3595 then
3596 cf_path=$prefix
3597 else
3598 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3601 # If you don't like using the default architecture, you have to specify the
3602 # intended library directory and corresponding compiler/linker options.
3604 # This case allows for Debian's 2014-flavor of multiarch, along with the
3605 # most common variations before that point. Some other variants spell the
3606 # directory differently, e.g., "pkg-config", and put it in unusual places.
3607 # pkg-config has always been poorly standardized, which is ironic...
3608 case x`(arch) 2>/dev/null` in
3609 (*64)
3610 cf_search_path="\
3611 $cf_path/lib/*64-linux-gnu \
3612 $cf_path/share \
3613 $cf_path/lib64 \
3614 $cf_path/lib32 \
3615 $cf_path/lib"
3618 cf_search_path="\
3619 $cf_path/lib/*-linux-gnu \
3620 $cf_path/share \
3621 $cf_path/lib32 \
3622 $cf_path/lib \
3623 $cf_path/libdata"
3625 esac
3627 test -n "$verbose" && echo " list..." 1>&6
3629 echo "${as_me:-configure}:3629: testing list... ..." 1>&5
3631 for cf_config in $cf_search_path
3633 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
3635 echo "${as_me:-configure}:3635: testing checking $cf_config/pkgconfig ..." 1>&5
3637 if test -d $cf_config/pkgconfig
3638 then
3639 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3640 echo "$as_me:3640: checking done" >&5
3641 echo $ECHO_N "checking done... $ECHO_C" >&6
3642 break
3644 done
3648 esac
3650 if test "x$PKG_CONFIG" != xnone ; then
3651 echo "$as_me:3651: result: $PKG_CONFIG_LIBDIR" >&5
3652 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3655 if test "x$PKG_CONFIG" != xnone
3656 then
3657 echo "$as_me:3657: checking if we should install .pc files for $PKG_CONFIG" >&5
3658 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3659 else
3660 echo "$as_me:3660: checking if we should install .pc files" >&5
3661 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3664 # Check whether --enable-pc-files or --disable-pc-files was given.
3665 if test "${enable_pc_files+set}" = set; then
3666 enableval="$enable_pc_files"
3667 enable_pc_files=$enableval
3668 else
3669 enable_pc_files=no
3671 echo "$as_me:3671: result: $enable_pc_files" >&5
3672 echo "${ECHO_T}$enable_pc_files" >&6
3674 if test "x$enable_pc_files" != xno
3675 then
3676 case "x$PKG_CONFIG_LIBDIR" in
3677 (xno|xyes)
3678 { echo "$as_me:3678: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3679 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3680 MAKE_PC_FILES="#"
3684 if test "x$prefix" != xNONE; then
3685 cf_path_syntax="$prefix"
3686 else
3687 cf_path_syntax="$ac_default_prefix"
3690 case ".$PKG_CONFIG_LIBDIR" in
3691 (.\$\(*\)*|.\'*\'*)
3693 (..|./*|.\\*)
3695 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3697 (.\${*prefix}*|.\${*dir}*)
3698 eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3699 case ".$PKG_CONFIG_LIBDIR" in
3700 (.NONE/*)
3701 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3703 esac
3705 (.no|.NONE/*)
3706 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3709 { { echo "$as_me:3709: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3710 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3711 { (exit 1); exit 1; }; }
3713 esac
3715 MAKE_PC_FILES=
3717 esac
3718 else
3719 MAKE_PC_FILES="#"
3722 if test -z "$MAKE_PC_FILES"
3723 then
3724 echo "$as_me:3724: checking for suffix to add to pc-files" >&5
3725 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3727 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3728 if test "${with_pc_suffix+set}" = set; then
3729 withval="$with_pc_suffix"
3730 case "x$withval" in
3731 (xyes|xno)
3732 PC_MODULE_SUFFIX=
3734 (*) PC_MODULE_SUFFIX="$withval"
3736 esac
3738 test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3739 echo "$as_me:3739: result: $PC_MODULE_SUFFIX" >&5
3740 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3741 test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3745 echo "$as_me:3745: checking if we should assume mixed-case filenames" >&5
3746 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3748 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3749 if test "${enable_mixed_case+set}" = set; then
3750 enableval="$enable_mixed_case"
3751 enable_mixedcase=$enableval
3752 else
3753 enable_mixedcase=auto
3755 echo "$as_me:3755: result: $enable_mixedcase" >&5
3756 echo "${ECHO_T}$enable_mixedcase" >&6
3757 if test "$enable_mixedcase" = "auto" ; then
3759 echo "$as_me:3759: checking if filesystem supports mixed-case filenames" >&5
3760 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3761 if test "${cf_cv_mixedcase+set}" = set; then
3762 echo $ECHO_N "(cached) $ECHO_C" >&6
3763 else
3765 if test "$cross_compiling" = yes ; then
3766 case $target_alias in
3767 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3768 cf_cv_mixedcase=no
3771 cf_cv_mixedcase=yes
3773 esac
3774 else
3775 rm -f conftest CONFTEST
3776 echo test >conftest
3777 if test -f CONFTEST ; then
3778 cf_cv_mixedcase=no
3779 else
3780 cf_cv_mixedcase=yes
3782 rm -f conftest CONFTEST
3786 echo "$as_me:3786: result: $cf_cv_mixedcase" >&5
3787 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3788 test "$cf_cv_mixedcase" = yes &&
3789 cat >>confdefs.h <<\EOF
3790 #define MIXEDCASE_FILENAMES 1
3793 else
3794 cf_cv_mixedcase=$enable_mixedcase
3795 if test "x$enable_mixedcase" = "xyes" ; then
3797 cat >>confdefs.h <<\EOF
3798 #define MIXEDCASE_FILENAMES 1
3804 # do this after mixed-case option (tags/TAGS is not as important as tic).
3805 echo "$as_me:3805: checking whether ${MAKE-make} sets \${MAKE}" >&5
3806 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3807 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3808 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3809 echo $ECHO_N "(cached) $ECHO_C" >&6
3810 else
3811 cat >conftest.make <<\EOF
3812 all:
3813 @echo 'ac_maketemp="${MAKE}"'
3815 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3816 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3817 if test -n "$ac_maketemp"; then
3818 eval ac_cv_prog_make_${ac_make}_set=yes
3819 else
3820 eval ac_cv_prog_make_${ac_make}_set=no
3822 rm -f conftest.make
3824 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3825 echo "$as_me:3825: result: yes" >&5
3826 echo "${ECHO_T}yes" >&6
3827 SET_MAKE=
3828 else
3829 echo "$as_me:3829: result: no" >&5
3830 echo "${ECHO_T}no" >&6
3831 SET_MAKE="MAKE=${MAKE-make}"
3834 for ac_prog in exctags ctags
3836 # Extract the first word of "$ac_prog", so it can be a program name with args.
3837 set dummy $ac_prog; ac_word=$2
3838 echo "$as_me:3838: checking for $ac_word" >&5
3839 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3840 if test "${ac_cv_prog_CTAGS+set}" = set; then
3841 echo $ECHO_N "(cached) $ECHO_C" >&6
3842 else
3843 if test -n "$CTAGS"; then
3844 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3845 else
3846 ac_save_IFS=$IFS; IFS=$ac_path_separator
3847 ac_dummy="$PATH"
3848 for ac_dir in $ac_dummy; do
3849 IFS=$ac_save_IFS
3850 test -z "$ac_dir" && ac_dir=.
3851 $as_executable_p "$ac_dir/$ac_word" || continue
3852 ac_cv_prog_CTAGS="$ac_prog"
3853 echo "$as_me:3853: found $ac_dir/$ac_word" >&5
3854 break
3855 done
3859 CTAGS=$ac_cv_prog_CTAGS
3860 if test -n "$CTAGS"; then
3861 echo "$as_me:3861: result: $CTAGS" >&5
3862 echo "${ECHO_T}$CTAGS" >&6
3863 else
3864 echo "$as_me:3864: result: no" >&5
3865 echo "${ECHO_T}no" >&6
3868 test -n "$CTAGS" && break
3869 done
3871 for ac_prog in exetags etags
3873 # Extract the first word of "$ac_prog", so it can be a program name with args.
3874 set dummy $ac_prog; ac_word=$2
3875 echo "$as_me:3875: checking for $ac_word" >&5
3876 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3877 if test "${ac_cv_prog_ETAGS+set}" = set; then
3878 echo $ECHO_N "(cached) $ECHO_C" >&6
3879 else
3880 if test -n "$ETAGS"; then
3881 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3882 else
3883 ac_save_IFS=$IFS; IFS=$ac_path_separator
3884 ac_dummy="$PATH"
3885 for ac_dir in $ac_dummy; do
3886 IFS=$ac_save_IFS
3887 test -z "$ac_dir" && ac_dir=.
3888 $as_executable_p "$ac_dir/$ac_word" || continue
3889 ac_cv_prog_ETAGS="$ac_prog"
3890 echo "$as_me:3890: found $ac_dir/$ac_word" >&5
3891 break
3892 done
3896 ETAGS=$ac_cv_prog_ETAGS
3897 if test -n "$ETAGS"; then
3898 echo "$as_me:3898: result: $ETAGS" >&5
3899 echo "${ECHO_T}$ETAGS" >&6
3900 else
3901 echo "$as_me:3901: result: no" >&5
3902 echo "${ECHO_T}no" >&6
3905 test -n "$ETAGS" && break
3906 done
3908 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3909 set dummy ${CTAGS:-ctags}; ac_word=$2
3910 echo "$as_me:3910: checking for $ac_word" >&5
3911 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3912 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3913 echo $ECHO_N "(cached) $ECHO_C" >&6
3914 else
3915 if test -n "$MAKE_LOWER_TAGS"; then
3916 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3917 else
3918 ac_save_IFS=$IFS; IFS=$ac_path_separator
3919 ac_dummy="$PATH"
3920 for ac_dir in $ac_dummy; do
3921 IFS=$ac_save_IFS
3922 test -z "$ac_dir" && ac_dir=.
3923 $as_executable_p "$ac_dir/$ac_word" || continue
3924 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3925 echo "$as_me:3925: found $ac_dir/$ac_word" >&5
3926 break
3927 done
3929 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3932 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3933 if test -n "$MAKE_LOWER_TAGS"; then
3934 echo "$as_me:3934: result: $MAKE_LOWER_TAGS" >&5
3935 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3936 else
3937 echo "$as_me:3937: result: no" >&5
3938 echo "${ECHO_T}no" >&6
3941 if test "$cf_cv_mixedcase" = yes ; then
3942 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3943 set dummy ${ETAGS:-etags}; ac_word=$2
3944 echo "$as_me:3944: checking for $ac_word" >&5
3945 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3946 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3947 echo $ECHO_N "(cached) $ECHO_C" >&6
3948 else
3949 if test -n "$MAKE_UPPER_TAGS"; then
3950 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3951 else
3952 ac_save_IFS=$IFS; IFS=$ac_path_separator
3953 ac_dummy="$PATH"
3954 for ac_dir in $ac_dummy; do
3955 IFS=$ac_save_IFS
3956 test -z "$ac_dir" && ac_dir=.
3957 $as_executable_p "$ac_dir/$ac_word" || continue
3958 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3959 echo "$as_me:3959: found $ac_dir/$ac_word" >&5
3960 break
3961 done
3963 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3966 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3967 if test -n "$MAKE_UPPER_TAGS"; then
3968 echo "$as_me:3968: result: $MAKE_UPPER_TAGS" >&5
3969 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3970 else
3971 echo "$as_me:3971: result: no" >&5
3972 echo "${ECHO_T}no" >&6
3975 else
3976 MAKE_UPPER_TAGS=no
3979 if test "$MAKE_UPPER_TAGS" = yes ; then
3980 MAKE_UPPER_TAGS=
3981 else
3982 MAKE_UPPER_TAGS="#"
3985 if test "$MAKE_LOWER_TAGS" = yes ; then
3986 MAKE_LOWER_TAGS=
3987 else
3988 MAKE_LOWER_TAGS="#"
3991 echo "$as_me:3991: checking for makeflags variable" >&5
3992 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3993 if test "${cf_cv_makeflags+set}" = set; then
3994 echo $ECHO_N "(cached) $ECHO_C" >&6
3995 else
3997 cf_cv_makeflags=''
3998 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4000 cat >cf_makeflags.tmp <<CF_EOF
4001 SHELL = $SHELL
4002 all :
4003 @ echo '.$cf_option'
4004 CF_EOF
4005 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
4006 case "$cf_result" in
4007 (.*k|.*kw)
4008 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4009 case "$cf_result" in
4010 (.*CC=*) cf_cv_makeflags=
4012 (*) cf_cv_makeflags=$cf_option
4014 esac
4015 break
4017 (.-) ;;
4018 (*) echo "given option \"$cf_option\", no match \"$cf_result\""
4020 esac
4021 done
4022 rm -f cf_makeflags.tmp
4025 echo "$as_me:4025: result: $cf_cv_makeflags" >&5
4026 echo "${ECHO_T}$cf_cv_makeflags" >&6
4028 if test -n "$ac_tool_prefix"; then
4029 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4030 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4031 echo "$as_me:4031: checking for $ac_word" >&5
4032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4033 if test "${ac_cv_prog_RANLIB+set}" = set; then
4034 echo $ECHO_N "(cached) $ECHO_C" >&6
4035 else
4036 if test -n "$RANLIB"; then
4037 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4038 else
4039 ac_save_IFS=$IFS; IFS=$ac_path_separator
4040 ac_dummy="$PATH"
4041 for ac_dir in $ac_dummy; do
4042 IFS=$ac_save_IFS
4043 test -z "$ac_dir" && ac_dir=.
4044 $as_executable_p "$ac_dir/$ac_word" || continue
4045 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4046 echo "$as_me:4046: found $ac_dir/$ac_word" >&5
4047 break
4048 done
4052 RANLIB=$ac_cv_prog_RANLIB
4053 if test -n "$RANLIB"; then
4054 echo "$as_me:4054: result: $RANLIB" >&5
4055 echo "${ECHO_T}$RANLIB" >&6
4056 else
4057 echo "$as_me:4057: result: no" >&5
4058 echo "${ECHO_T}no" >&6
4062 if test -z "$ac_cv_prog_RANLIB"; then
4063 ac_ct_RANLIB=$RANLIB
4064 # Extract the first word of "ranlib", so it can be a program name with args.
4065 set dummy ranlib; ac_word=$2
4066 echo "$as_me:4066: checking for $ac_word" >&5
4067 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4068 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4069 echo $ECHO_N "(cached) $ECHO_C" >&6
4070 else
4071 if test -n "$ac_ct_RANLIB"; then
4072 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4073 else
4074 ac_save_IFS=$IFS; IFS=$ac_path_separator
4075 ac_dummy="$PATH"
4076 for ac_dir in $ac_dummy; do
4077 IFS=$ac_save_IFS
4078 test -z "$ac_dir" && ac_dir=.
4079 $as_executable_p "$ac_dir/$ac_word" || continue
4080 ac_cv_prog_ac_ct_RANLIB="ranlib"
4081 echo "$as_me:4081: found $ac_dir/$ac_word" >&5
4082 break
4083 done
4085 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4088 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4089 if test -n "$ac_ct_RANLIB"; then
4090 echo "$as_me:4090: result: $ac_ct_RANLIB" >&5
4091 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4092 else
4093 echo "$as_me:4093: result: no" >&5
4094 echo "${ECHO_T}no" >&6
4097 RANLIB=$ac_ct_RANLIB
4098 else
4099 RANLIB="$ac_cv_prog_RANLIB"
4102 if test -n "$ac_tool_prefix"; then
4103 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4104 set dummy ${ac_tool_prefix}ld; ac_word=$2
4105 echo "$as_me:4105: checking for $ac_word" >&5
4106 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4107 if test "${ac_cv_prog_LD+set}" = set; then
4108 echo $ECHO_N "(cached) $ECHO_C" >&6
4109 else
4110 if test -n "$LD"; then
4111 ac_cv_prog_LD="$LD" # Let the user override the test.
4112 else
4113 ac_save_IFS=$IFS; IFS=$ac_path_separator
4114 ac_dummy="$PATH"
4115 for ac_dir in $ac_dummy; do
4116 IFS=$ac_save_IFS
4117 test -z "$ac_dir" && ac_dir=.
4118 $as_executable_p "$ac_dir/$ac_word" || continue
4119 ac_cv_prog_LD="${ac_tool_prefix}ld"
4120 echo "$as_me:4120: found $ac_dir/$ac_word" >&5
4121 break
4122 done
4126 LD=$ac_cv_prog_LD
4127 if test -n "$LD"; then
4128 echo "$as_me:4128: result: $LD" >&5
4129 echo "${ECHO_T}$LD" >&6
4130 else
4131 echo "$as_me:4131: result: no" >&5
4132 echo "${ECHO_T}no" >&6
4136 if test -z "$ac_cv_prog_LD"; then
4137 ac_ct_LD=$LD
4138 # Extract the first word of "ld", so it can be a program name with args.
4139 set dummy ld; ac_word=$2
4140 echo "$as_me:4140: checking for $ac_word" >&5
4141 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4142 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4143 echo $ECHO_N "(cached) $ECHO_C" >&6
4144 else
4145 if test -n "$ac_ct_LD"; then
4146 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4147 else
4148 ac_save_IFS=$IFS; IFS=$ac_path_separator
4149 ac_dummy="$PATH"
4150 for ac_dir in $ac_dummy; do
4151 IFS=$ac_save_IFS
4152 test -z "$ac_dir" && ac_dir=.
4153 $as_executable_p "$ac_dir/$ac_word" || continue
4154 ac_cv_prog_ac_ct_LD="ld"
4155 echo "$as_me:4155: found $ac_dir/$ac_word" >&5
4156 break
4157 done
4159 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4162 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4163 if test -n "$ac_ct_LD"; then
4164 echo "$as_me:4164: result: $ac_ct_LD" >&5
4165 echo "${ECHO_T}$ac_ct_LD" >&6
4166 else
4167 echo "$as_me:4167: result: no" >&5
4168 echo "${ECHO_T}no" >&6
4171 LD=$ac_ct_LD
4172 else
4173 LD="$ac_cv_prog_LD"
4176 if test -n "$ac_tool_prefix"; then
4177 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4178 set dummy ${ac_tool_prefix}ar; ac_word=$2
4179 echo "$as_me:4179: checking for $ac_word" >&5
4180 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4181 if test "${ac_cv_prog_AR+set}" = set; then
4182 echo $ECHO_N "(cached) $ECHO_C" >&6
4183 else
4184 if test -n "$AR"; then
4185 ac_cv_prog_AR="$AR" # Let the user override the test.
4186 else
4187 ac_save_IFS=$IFS; IFS=$ac_path_separator
4188 ac_dummy="$PATH"
4189 for ac_dir in $ac_dummy; do
4190 IFS=$ac_save_IFS
4191 test -z "$ac_dir" && ac_dir=.
4192 $as_executable_p "$ac_dir/$ac_word" || continue
4193 ac_cv_prog_AR="${ac_tool_prefix}ar"
4194 echo "$as_me:4194: found $ac_dir/$ac_word" >&5
4195 break
4196 done
4200 AR=$ac_cv_prog_AR
4201 if test -n "$AR"; then
4202 echo "$as_me:4202: result: $AR" >&5
4203 echo "${ECHO_T}$AR" >&6
4204 else
4205 echo "$as_me:4205: result: no" >&5
4206 echo "${ECHO_T}no" >&6
4210 if test -z "$ac_cv_prog_AR"; then
4211 ac_ct_AR=$AR
4212 # Extract the first word of "ar", so it can be a program name with args.
4213 set dummy ar; ac_word=$2
4214 echo "$as_me:4214: checking for $ac_word" >&5
4215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4216 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4217 echo $ECHO_N "(cached) $ECHO_C" >&6
4218 else
4219 if test -n "$ac_ct_AR"; then
4220 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4221 else
4222 ac_save_IFS=$IFS; IFS=$ac_path_separator
4223 ac_dummy="$PATH"
4224 for ac_dir in $ac_dummy; do
4225 IFS=$ac_save_IFS
4226 test -z "$ac_dir" && ac_dir=.
4227 $as_executable_p "$ac_dir/$ac_word" || continue
4228 ac_cv_prog_ac_ct_AR="ar"
4229 echo "$as_me:4229: found $ac_dir/$ac_word" >&5
4230 break
4231 done
4233 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4236 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4237 if test -n "$ac_ct_AR"; then
4238 echo "$as_me:4238: result: $ac_ct_AR" >&5
4239 echo "${ECHO_T}$ac_ct_AR" >&6
4240 else
4241 echo "$as_me:4241: result: no" >&5
4242 echo "${ECHO_T}no" >&6
4245 AR=$ac_ct_AR
4246 else
4247 AR="$ac_cv_prog_AR"
4250 if test -n "$ac_tool_prefix"; then
4251 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4252 set dummy ${ac_tool_prefix}nm; ac_word=$2
4253 echo "$as_me:4253: checking for $ac_word" >&5
4254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4255 if test "${ac_cv_prog_NM+set}" = set; then
4256 echo $ECHO_N "(cached) $ECHO_C" >&6
4257 else
4258 if test -n "$NM"; then
4259 ac_cv_prog_NM="$NM" # Let the user override the test.
4260 else
4261 ac_save_IFS=$IFS; IFS=$ac_path_separator
4262 ac_dummy="$PATH"
4263 for ac_dir in $ac_dummy; do
4264 IFS=$ac_save_IFS
4265 test -z "$ac_dir" && ac_dir=.
4266 $as_executable_p "$ac_dir/$ac_word" || continue
4267 ac_cv_prog_NM="${ac_tool_prefix}nm"
4268 echo "$as_me:4268: found $ac_dir/$ac_word" >&5
4269 break
4270 done
4274 NM=$ac_cv_prog_NM
4275 if test -n "$NM"; then
4276 echo "$as_me:4276: result: $NM" >&5
4277 echo "${ECHO_T}$NM" >&6
4278 else
4279 echo "$as_me:4279: result: no" >&5
4280 echo "${ECHO_T}no" >&6
4284 if test -z "$ac_cv_prog_NM"; then
4285 ac_ct_NM=$NM
4286 # Extract the first word of "nm", so it can be a program name with args.
4287 set dummy nm; ac_word=$2
4288 echo "$as_me:4288: checking for $ac_word" >&5
4289 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4290 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4291 echo $ECHO_N "(cached) $ECHO_C" >&6
4292 else
4293 if test -n "$ac_ct_NM"; then
4294 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4295 else
4296 ac_save_IFS=$IFS; IFS=$ac_path_separator
4297 ac_dummy="$PATH"
4298 for ac_dir in $ac_dummy; do
4299 IFS=$ac_save_IFS
4300 test -z "$ac_dir" && ac_dir=.
4301 $as_executable_p "$ac_dir/$ac_word" || continue
4302 ac_cv_prog_ac_ct_NM="nm"
4303 echo "$as_me:4303: found $ac_dir/$ac_word" >&5
4304 break
4305 done
4307 test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4310 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4311 if test -n "$ac_ct_NM"; then
4312 echo "$as_me:4312: result: $ac_ct_NM" >&5
4313 echo "${ECHO_T}$ac_ct_NM" >&6
4314 else
4315 echo "$as_me:4315: result: no" >&5
4316 echo "${ECHO_T}no" >&6
4319 NM=$ac_ct_NM
4320 else
4321 NM="$ac_cv_prog_NM"
4324 if test -n "$ac_tool_prefix"; then
4325 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4326 set dummy ${ac_tool_prefix}ar; ac_word=$2
4327 echo "$as_me:4327: checking for $ac_word" >&5
4328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4329 if test "${ac_cv_prog_AR+set}" = set; then
4330 echo $ECHO_N "(cached) $ECHO_C" >&6
4331 else
4332 if test -n "$AR"; then
4333 ac_cv_prog_AR="$AR" # Let the user override the test.
4334 else
4335 ac_save_IFS=$IFS; IFS=$ac_path_separator
4336 ac_dummy="$PATH"
4337 for ac_dir in $ac_dummy; do
4338 IFS=$ac_save_IFS
4339 test -z "$ac_dir" && ac_dir=.
4340 $as_executable_p "$ac_dir/$ac_word" || continue
4341 ac_cv_prog_AR="${ac_tool_prefix}ar"
4342 echo "$as_me:4342: found $ac_dir/$ac_word" >&5
4343 break
4344 done
4348 AR=$ac_cv_prog_AR
4349 if test -n "$AR"; then
4350 echo "$as_me:4350: result: $AR" >&5
4351 echo "${ECHO_T}$AR" >&6
4352 else
4353 echo "$as_me:4353: result: no" >&5
4354 echo "${ECHO_T}no" >&6
4358 if test -z "$ac_cv_prog_AR"; then
4359 ac_ct_AR=$AR
4360 # Extract the first word of "ar", so it can be a program name with args.
4361 set dummy ar; ac_word=$2
4362 echo "$as_me:4362: checking for $ac_word" >&5
4363 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4364 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4365 echo $ECHO_N "(cached) $ECHO_C" >&6
4366 else
4367 if test -n "$ac_ct_AR"; then
4368 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4369 else
4370 ac_save_IFS=$IFS; IFS=$ac_path_separator
4371 ac_dummy="$PATH"
4372 for ac_dir in $ac_dummy; do
4373 IFS=$ac_save_IFS
4374 test -z "$ac_dir" && ac_dir=.
4375 $as_executable_p "$ac_dir/$ac_word" || continue
4376 ac_cv_prog_ac_ct_AR="ar"
4377 echo "$as_me:4377: found $ac_dir/$ac_word" >&5
4378 break
4379 done
4381 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4384 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4385 if test -n "$ac_ct_AR"; then
4386 echo "$as_me:4386: result: $ac_ct_AR" >&5
4387 echo "${ECHO_T}$ac_ct_AR" >&6
4388 else
4389 echo "$as_me:4389: result: no" >&5
4390 echo "${ECHO_T}no" >&6
4393 AR=$ac_ct_AR
4394 else
4395 AR="$ac_cv_prog_AR"
4398 echo "$as_me:4398: checking for options to update archives" >&5
4399 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4400 if test "${cf_cv_ar_flags+set}" = set; then
4401 echo $ECHO_N "(cached) $ECHO_C" >&6
4402 else
4404 cf_cv_ar_flags=unknown
4405 for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4408 # check if $ARFLAGS already contains this choice
4409 if test "x$ARFLAGS" != "x" ; then
4410 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4411 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4412 cf_cv_ar_flags=
4413 break
4417 rm -f conftest.$ac_cv_objext
4418 rm -f conftest.a
4420 cat >conftest.$ac_ext <<EOF
4421 #line 4421 "configure"
4422 int testdata[3] = { 123, 456, 789 };
4424 if { (eval echo "$as_me:4424: \"$ac_compile\"") >&5
4425 (eval $ac_compile) 2>&5
4426 ac_status=$?
4427 echo "$as_me:4427: \$? = $ac_status" >&5
4428 (exit $ac_status); } ; then
4429 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4430 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4431 if test -f conftest.a ; then
4432 cf_cv_ar_flags=$cf_ar_flags
4433 break
4435 else
4436 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4438 echo "${as_me:-configure}:4438: testing cannot compile test-program ..." 1>&5
4440 break
4442 done
4443 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4446 echo "$as_me:4446: result: $cf_cv_ar_flags" >&5
4447 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4449 if test -n "$ARFLAGS" ; then
4450 if test -n "$cf_cv_ar_flags" ; then
4451 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4453 else
4454 ARFLAGS=$cf_cv_ar_flags
4457 echo "$as_me:4457: checking if you have specified an install-prefix" >&5
4458 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4460 # Check whether --with-install-prefix or --without-install-prefix was given.
4461 if test "${with_install_prefix+set}" = set; then
4462 withval="$with_install_prefix"
4463 case "x$withval" in
4464 (xyes|xno)
4466 (*) DESTDIR="$withval"
4468 esac
4470 echo "$as_me:4470: result: $DESTDIR" >&5
4471 echo "${ECHO_T}$DESTDIR" >&6
4473 ###############################################################################
4475 # If we're cross-compiling, allow the user to override the tools and their
4476 # options. The configure script is oriented toward identifying the host
4477 # compiler, etc., but we need a build compiler to generate parts of the source.
4479 if test "$cross_compiling" = yes ; then
4481 # defaults that we might want to override
4482 : ${BUILD_CFLAGS:=''}
4483 : ${BUILD_CPPFLAGS:=''}
4484 : ${BUILD_LDFLAGS:=''}
4485 : ${BUILD_LIBS:=''}
4486 : ${BUILD_EXEEXT:='$x'}
4487 : ${BUILD_OBJEXT:='o'}
4489 # Check whether --with-build-cc or --without-build-cc was given.
4490 if test "${with_build_cc+set}" = set; then
4491 withval="$with_build_cc"
4492 BUILD_CC="$withval"
4493 else
4494 for ac_prog in gcc cc cl
4496 # Extract the first word of "$ac_prog", so it can be a program name with args.
4497 set dummy $ac_prog; ac_word=$2
4498 echo "$as_me:4498: checking for $ac_word" >&5
4499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4500 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4501 echo $ECHO_N "(cached) $ECHO_C" >&6
4502 else
4503 if test -n "$BUILD_CC"; then
4504 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4505 else
4506 ac_save_IFS=$IFS; IFS=$ac_path_separator
4507 ac_dummy="$PATH"
4508 for ac_dir in $ac_dummy; do
4509 IFS=$ac_save_IFS
4510 test -z "$ac_dir" && ac_dir=.
4511 $as_executable_p "$ac_dir/$ac_word" || continue
4512 ac_cv_prog_BUILD_CC="$ac_prog"
4513 echo "$as_me:4513: found $ac_dir/$ac_word" >&5
4514 break
4515 done
4519 BUILD_CC=$ac_cv_prog_BUILD_CC
4520 if test -n "$BUILD_CC"; then
4521 echo "$as_me:4521: result: $BUILD_CC" >&5
4522 echo "${ECHO_T}$BUILD_CC" >&6
4523 else
4524 echo "$as_me:4524: result: no" >&5
4525 echo "${ECHO_T}no" >&6
4528 test -n "$BUILD_CC" && break
4529 done
4532 echo "$as_me:4532: checking for native build C compiler" >&5
4533 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4534 echo "$as_me:4534: result: $BUILD_CC" >&5
4535 echo "${ECHO_T}$BUILD_CC" >&6
4537 echo "$as_me:4537: checking for native build C preprocessor" >&5
4538 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4540 # Check whether --with-build-cpp or --without-build-cpp was given.
4541 if test "${with_build_cpp+set}" = set; then
4542 withval="$with_build_cpp"
4543 BUILD_CPP="$withval"
4544 else
4545 BUILD_CPP='${BUILD_CC} -E'
4547 echo "$as_me:4547: result: $BUILD_CPP" >&5
4548 echo "${ECHO_T}$BUILD_CPP" >&6
4550 echo "$as_me:4550: checking for native build C flags" >&5
4551 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4553 # Check whether --with-build-cflags or --without-build-cflags was given.
4554 if test "${with_build_cflags+set}" = set; then
4555 withval="$with_build_cflags"
4556 BUILD_CFLAGS="$withval"
4558 echo "$as_me:4558: result: $BUILD_CFLAGS" >&5
4559 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4561 echo "$as_me:4561: checking for native build C preprocessor-flags" >&5
4562 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4564 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4565 if test "${with_build_cppflags+set}" = set; then
4566 withval="$with_build_cppflags"
4567 BUILD_CPPFLAGS="$withval"
4569 echo "$as_me:4569: result: $BUILD_CPPFLAGS" >&5
4570 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4572 echo "$as_me:4572: checking for native build linker-flags" >&5
4573 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4575 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4576 if test "${with_build_ldflags+set}" = set; then
4577 withval="$with_build_ldflags"
4578 BUILD_LDFLAGS="$withval"
4580 echo "$as_me:4580: result: $BUILD_LDFLAGS" >&5
4581 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4583 echo "$as_me:4583: checking for native build linker-libraries" >&5
4584 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4586 # Check whether --with-build-libs or --without-build-libs was given.
4587 if test "${with_build_libs+set}" = set; then
4588 withval="$with_build_libs"
4589 BUILD_LIBS="$withval"
4591 echo "$as_me:4591: result: $BUILD_LIBS" >&5
4592 echo "${ECHO_T}$BUILD_LIBS" >&6
4594 # this assumes we're on Unix.
4595 BUILD_EXEEXT=
4596 BUILD_OBJEXT=o
4598 : ${BUILD_CC:='${CC}'}
4600 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4601 { { echo "$as_me:4601: error: Cross-build requires two compilers.
4602 Use --with-build-cc to specify the native compiler." >&5
4603 echo "$as_me: error: Cross-build requires two compilers.
4604 Use --with-build-cc to specify the native compiler." >&2;}
4605 { (exit 1); exit 1; }; }
4608 else
4609 : ${BUILD_CC:='${CC}'}
4610 : ${BUILD_CPP:='${CPP}'}
4611 : ${BUILD_CFLAGS:='${CFLAGS}'}
4612 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4613 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4614 : ${BUILD_LIBS:='${LIBS}'}
4615 : ${BUILD_EXEEXT:='$x'}
4616 : ${BUILD_OBJEXT:='o'}
4619 ###############################################################################
4621 ### Options to allow the user to specify the set of libraries which are used.
4622 ### Use "--without-normal --with-shared" to allow the default model to be
4623 ### shared, for example.
4624 cf_list_models=""
4626 echo "$as_me:4626: checking if libtool -version-number should be used" >&5
4627 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4629 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4630 if test "${enable_libtool_version+set}" = set; then
4631 enableval="$enable_libtool_version"
4632 test "$enableval" != no && enableval=yes
4633 if test "$enableval" != "yes" ; then
4634 cf_libtool_version=no
4635 else
4636 cf_libtool_version=yes
4638 else
4639 enableval=yes
4640 cf_libtool_version=yes
4643 echo "$as_me:4643: result: $cf_libtool_version" >&5
4644 echo "${ECHO_T}$cf_libtool_version" >&6
4646 if test "$cf_libtool_version" = yes ; then
4647 LIBTOOL_VERSION="-version-number"
4648 else
4649 LIBTOOL_VERSION="-version-info"
4650 case "x$VERSION" in
4652 { echo "$as_me:4652: WARNING: VERSION was not set" >&5
4653 echo "$as_me: WARNING: VERSION was not set" >&2;}
4655 (x*.*.*)
4656 ABI_VERSION="$VERSION"
4657 test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6
4659 echo "${as_me:-configure}:4659: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4662 (x*:*:*)
4663 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4664 test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6
4666 echo "${as_me:-configure}:4666: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4670 { echo "$as_me:4670: WARNING: unexpected VERSION value: $VERSION" >&5
4671 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4673 esac
4676 LIBTOOL=
4678 # common library maintenance symbols that are convenient for libtool scripts:
4679 LIB_CREATE='${AR} -cr'
4680 LIB_OBJECT='${OBJECTS}'
4681 LIB_SUFFIX=.a
4682 LIB_PREP="$RANLIB"
4684 # symbols used to prop libtool up to enable it to determine what it should be
4685 # doing:
4686 LIB_CLEAN=
4687 LIB_COMPILE=
4688 LIB_LINK='${CC}'
4689 LIB_INSTALL=
4690 LIB_UNINSTALL=
4692 echo "$as_me:4692: checking if you want to build libraries with libtool" >&5
4693 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4695 # Check whether --with-libtool or --without-libtool was given.
4696 if test "${with_libtool+set}" = set; then
4697 withval="$with_libtool"
4698 with_libtool=$withval
4699 else
4700 with_libtool=no
4702 echo "$as_me:4702: result: $with_libtool" >&5
4703 echo "${ECHO_T}$with_libtool" >&6
4704 if test "$with_libtool" != "no"; then
4706 if test "$with_libtool" != "yes" ; then
4708 if test "x$prefix" != xNONE; then
4709 cf_path_syntax="$prefix"
4710 else
4711 cf_path_syntax="$ac_default_prefix"
4714 case ".$with_libtool" in
4715 (.\$\(*\)*|.\'*\'*)
4717 (..|./*|.\\*)
4719 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4721 (.\${*prefix}*|.\${*dir}*)
4722 eval with_libtool="$with_libtool"
4723 case ".$with_libtool" in
4724 (.NONE/*)
4725 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4727 esac
4729 (.no|.NONE/*)
4730 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4733 { { echo "$as_me:4733: error: expected a pathname, not \"$with_libtool\"" >&5
4734 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4735 { (exit 1); exit 1; }; }
4737 esac
4739 LIBTOOL=$with_libtool
4740 else
4741 if test -n "$ac_tool_prefix"; then
4742 for ac_prog in libtool glibtool
4744 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4745 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4746 echo "$as_me:4746: checking for $ac_word" >&5
4747 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4748 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4749 echo $ECHO_N "(cached) $ECHO_C" >&6
4750 else
4751 if test -n "$LIBTOOL"; then
4752 ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4753 else
4754 ac_save_IFS=$IFS; IFS=$ac_path_separator
4755 ac_dummy="$PATH"
4756 for ac_dir in $ac_dummy; do
4757 IFS=$ac_save_IFS
4758 test -z "$ac_dir" && ac_dir=.
4759 $as_executable_p "$ac_dir/$ac_word" || continue
4760 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4761 echo "$as_me:4761: found $ac_dir/$ac_word" >&5
4762 break
4763 done
4767 LIBTOOL=$ac_cv_prog_LIBTOOL
4768 if test -n "$LIBTOOL"; then
4769 echo "$as_me:4769: result: $LIBTOOL" >&5
4770 echo "${ECHO_T}$LIBTOOL" >&6
4771 else
4772 echo "$as_me:4772: result: no" >&5
4773 echo "${ECHO_T}no" >&6
4776 test -n "$LIBTOOL" && break
4777 done
4779 if test -z "$LIBTOOL"; then
4780 ac_ct_LIBTOOL=$LIBTOOL
4781 for ac_prog in libtool glibtool
4783 # Extract the first word of "$ac_prog", so it can be a program name with args.
4784 set dummy $ac_prog; ac_word=$2
4785 echo "$as_me:4785: checking for $ac_word" >&5
4786 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4787 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4788 echo $ECHO_N "(cached) $ECHO_C" >&6
4789 else
4790 if test -n "$ac_ct_LIBTOOL"; then
4791 ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4792 else
4793 ac_save_IFS=$IFS; IFS=$ac_path_separator
4794 ac_dummy="$PATH"
4795 for ac_dir in $ac_dummy; do
4796 IFS=$ac_save_IFS
4797 test -z "$ac_dir" && ac_dir=.
4798 $as_executable_p "$ac_dir/$ac_word" || continue
4799 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4800 echo "$as_me:4800: found $ac_dir/$ac_word" >&5
4801 break
4802 done
4806 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4807 if test -n "$ac_ct_LIBTOOL"; then
4808 echo "$as_me:4808: result: $ac_ct_LIBTOOL" >&5
4809 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4810 else
4811 echo "$as_me:4811: result: no" >&5
4812 echo "${ECHO_T}no" >&6
4815 test -n "$ac_ct_LIBTOOL" && break
4816 done
4817 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4819 LIBTOOL=$ac_ct_LIBTOOL
4822 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4823 then
4824 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.].*//'`
4825 else
4826 cf_cv_libtool_version=
4828 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4830 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4831 then
4833 unset ac_cv_prog_ac_ct_LIBTOOL
4834 unset ac_ct_LIBTOOL
4835 unset LIBTOOL
4837 if test -n "$ac_tool_prefix"; then
4838 for ac_prog in glibtool
4840 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4841 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4842 echo "$as_me:4842: checking for $ac_word" >&5
4843 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4844 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4845 echo $ECHO_N "(cached) $ECHO_C" >&6
4846 else
4847 if test -n "$LIBTOOL"; then
4848 ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4849 else
4850 ac_save_IFS=$IFS; IFS=$ac_path_separator
4851 ac_dummy="$PATH"
4852 for ac_dir in $ac_dummy; do
4853 IFS=$ac_save_IFS
4854 test -z "$ac_dir" && ac_dir=.
4855 $as_executable_p "$ac_dir/$ac_word" || continue
4856 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4857 echo "$as_me:4857: found $ac_dir/$ac_word" >&5
4858 break
4859 done
4863 LIBTOOL=$ac_cv_prog_LIBTOOL
4864 if test -n "$LIBTOOL"; then
4865 echo "$as_me:4865: result: $LIBTOOL" >&5
4866 echo "${ECHO_T}$LIBTOOL" >&6
4867 else
4868 echo "$as_me:4868: result: no" >&5
4869 echo "${ECHO_T}no" >&6
4872 test -n "$LIBTOOL" && break
4873 done
4875 if test -z "$LIBTOOL"; then
4876 ac_ct_LIBTOOL=$LIBTOOL
4877 for ac_prog in glibtool
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_ac_ct_LIBTOOL+set}" = set; then
4884 echo $ECHO_N "(cached) $ECHO_C" >&6
4885 else
4886 if test -n "$ac_ct_LIBTOOL"; then
4887 ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # 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_ac_ct_LIBTOOL="$ac_prog"
4896 echo "$as_me:4896: found $ac_dir/$ac_word" >&5
4897 break
4898 done
4902 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4903 if test -n "$ac_ct_LIBTOOL"; then
4904 echo "$as_me:4904: result: $ac_ct_LIBTOOL" >&5
4905 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4906 else
4907 echo "$as_me:4907: result: no" >&5
4908 echo "${ECHO_T}no" >&6
4911 test -n "$ac_ct_LIBTOOL" && break
4912 done
4913 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4915 LIBTOOL=$ac_ct_LIBTOOL
4918 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4919 then
4920 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.].*//'`
4921 else
4922 cf_cv_libtool_version=
4924 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4928 if test -z "$LIBTOOL" ; then
4929 { { echo "$as_me:4929: error: Cannot find libtool" >&5
4930 echo "$as_me: error: Cannot find libtool" >&2;}
4931 { (exit 1); exit 1; }; }
4933 LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4934 LIB_OBJECT='${OBJECTS:.o=.lo}'
4935 LIB_SUFFIX=.la
4936 LIB_CLEAN='${LIBTOOL} --mode=clean'
4937 LIB_COMPILE='${LIBTOOL} --mode=compile'
4938 LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4939 LIB_INSTALL='${LIBTOOL} --mode=install'
4940 LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4941 LIB_PREP=:
4943 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4944 then
4945 echo "$as_me:4945: checking version of $LIBTOOL" >&5
4946 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4948 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4949 then
4950 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.].*//'`
4951 else
4952 cf_cv_libtool_version=
4954 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4956 echo "$as_me:4956: result: $cf_cv_libtool_version" >&5
4957 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4958 if test -z "$cf_cv_libtool_version" ; then
4959 { { echo "$as_me:4959: error: This is not GNU libtool" >&5
4960 echo "$as_me: error: This is not GNU libtool" >&2;}
4961 { (exit 1); exit 1; }; }
4963 else
4964 { { echo "$as_me:4964: error: GNU libtool has not been found" >&5
4965 echo "$as_me: error: GNU libtool has not been found" >&2;}
4966 { (exit 1); exit 1; }; }
4969 # special hack to add -no-undefined (which libtool should do for itself)
4970 LT_UNDEF=
4971 case "$cf_cv_system_name" in
4972 (cygwin*|msys*|mingw32*|uwin*|aix[4-7])
4973 LT_UNDEF=-no-undefined
4975 esac
4977 # special hack to add --tag option for C++ compiler
4978 case $cf_cv_libtool_version in
4979 (1.[5-9]*|[2-9].[0-9.a-z]*)
4980 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4981 LIBTOOL="$LIBTOOL --tag=CC"
4984 LIBTOOL_CXX="$LIBTOOL"
4986 esac
4987 else
4988 LIBTOOL=""
4989 LIBTOOL_CXX=""
4992 test -z "$LIBTOOL" && ECHO_LT=
4994 if test "$with_libtool" != "no" ; then
4996 cf_list_models="$cf_list_models libtool"
4998 else
5000 echo "$as_me:5000: checking if you want to build shared libraries" >&5
5001 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5003 # Check whether --with-shared or --without-shared was given.
5004 if test "${with_shared+set}" = set; then
5005 withval="$with_shared"
5006 with_shared=$withval
5007 else
5008 with_shared=no
5010 echo "$as_me:5010: result: $with_shared" >&5
5011 echo "${ECHO_T}$with_shared" >&6
5012 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5014 echo "$as_me:5014: checking if you want to build static libraries" >&5
5015 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5017 # Check whether --with-normal or --without-normal was given.
5018 if test "${with_normal+set}" = set; then
5019 withval="$with_normal"
5020 with_normal=$withval
5021 else
5022 with_normal=yes
5024 echo "$as_me:5024: result: $with_normal" >&5
5025 echo "${ECHO_T}$with_normal" >&6
5026 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5028 echo "$as_me:5028: checking if you want to build debug libraries" >&5
5029 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5031 # Check whether --with-debug or --without-debug was given.
5032 if test "${with_debug+set}" = set; then
5033 withval="$with_debug"
5034 with_debug=$withval
5035 else
5036 with_debug=yes
5038 echo "$as_me:5038: result: $with_debug" >&5
5039 echo "${ECHO_T}$with_debug" >&6
5040 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5042 echo "$as_me:5042: checking if you want to build profiling libraries" >&5
5043 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5045 # Check whether --with-profile or --without-profile was given.
5046 if test "${with_profile+set}" = set; then
5047 withval="$with_profile"
5048 with_profile=$withval
5049 else
5050 with_profile=no
5052 echo "$as_me:5052: result: $with_profile" >&5
5053 echo "${ECHO_T}$with_profile" >&6
5054 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5058 if test "X$cf_with_cxx_binding" != Xno; then
5059 if test "x$with_shared" = "xyes"; then
5060 echo "$as_me:5060: checking if you want to build C++ shared libraries" >&5
5061 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5063 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5064 if test "${with_cxx_shared+set}" = set; then
5065 withval="$with_cxx_shared"
5066 with_shared_cxx=$withval
5067 else
5068 with_shared_cxx=no
5070 echo "$as_me:5070: result: $with_shared_cxx" >&5
5071 echo "${ECHO_T}$with_shared_cxx" >&6
5075 ###############################################################################
5077 echo "$as_me:5077: checking for specified models" >&5
5078 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5079 test -z "$cf_list_models" && cf_list_models=normal
5080 test "$with_libtool" != "no" && cf_list_models=libtool
5081 echo "$as_me:5081: result: $cf_list_models" >&5
5082 echo "${ECHO_T}$cf_list_models" >&6
5084 ### Use the first model as the default, and save its suffix for use in building
5085 ### up test-applications.
5086 echo "$as_me:5086: checking for default model" >&5
5087 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5088 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5089 echo "$as_me:5089: result: $DFT_LWR_MODEL" >&5
5090 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5092 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5094 TICS_NAME=tic
5096 TINFO_NAME=tinfo
5098 LIB_NAME=ncurses
5100 LIB_DIR=../lib
5101 LIB_2ND=../../lib
5103 echo "$as_me:5103: checking if you want to have a library-prefix" >&5
5104 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5106 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5107 if test "${with_lib_prefix+set}" = set; then
5108 withval="$with_lib_prefix"
5109 with_lib_prefix=$withval
5110 else
5111 with_lib_prefix=auto
5113 echo "$as_me:5113: result: $with_lib_prefix" >&5
5114 echo "${ECHO_T}$with_lib_prefix" >&6
5116 if test $with_lib_prefix = auto
5117 then
5119 case $cf_cv_system_name in
5120 (OS/2*|os2*)
5121 LIB_PREFIX=''
5123 (*) LIB_PREFIX='lib'
5125 esac
5126 cf_prefix=$LIB_PREFIX
5128 elif test $with_lib_prefix = no
5129 then
5130 LIB_PREFIX=
5131 else
5132 LIB_PREFIX=$with_lib_prefix
5135 LIB_SUFFIX=
5137 echo "$as_me:5137: checking for PATH separator" >&5
5138 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5139 case $cf_cv_system_name in
5140 (os2*) PATH_SEPARATOR=';' ;;
5141 (*) ${PATH_SEPARATOR:=':'} ;;
5142 esac
5144 echo "$as_me:5144: result: $PATH_SEPARATOR" >&5
5145 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5147 ###############################################################################
5149 echo "$as_me:5149: checking if you want to build a separate terminfo library" >&5
5150 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5152 # Check whether --with-termlib or --without-termlib was given.
5153 if test "${with_termlib+set}" = set; then
5154 withval="$with_termlib"
5155 with_termlib=$withval
5156 else
5157 with_termlib=no
5159 echo "$as_me:5159: result: $with_termlib" >&5
5160 echo "${ECHO_T}$with_termlib" >&6
5162 echo "$as_me:5162: checking if you want to build a separate tic library" >&5
5163 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5165 # Check whether --with-ticlib or --without-ticlib was given.
5166 if test "${with_ticlib+set}" = set; then
5167 withval="$with_ticlib"
5168 with_ticlib=$withval
5169 else
5170 with_ticlib=no
5172 echo "$as_me:5172: result: $with_ticlib" >&5
5173 echo "${ECHO_T}$with_ticlib" >&6
5175 ### Checks for special libraries, must be done up-front.
5176 SHLIB_LIST=""
5178 echo "$as_me:5178: checking if you want to link with the GPM mouse library" >&5
5179 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5181 # Check whether --with-gpm or --without-gpm was given.
5182 if test "${with_gpm+set}" = set; then
5183 withval="$with_gpm"
5184 with_gpm=$withval
5185 else
5186 with_gpm=maybe
5188 echo "$as_me:5188: result: $with_gpm" >&5
5189 echo "${ECHO_T}$with_gpm" >&6
5191 if test "$with_gpm" != no ; then
5192 echo "$as_me:5192: checking for gpm.h" >&5
5193 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5194 if test "${ac_cv_header_gpm_h+set}" = set; then
5195 echo $ECHO_N "(cached) $ECHO_C" >&6
5196 else
5197 cat >conftest.$ac_ext <<_ACEOF
5198 #line 5198 "configure"
5199 #include "confdefs.h"
5200 #include <gpm.h>
5201 _ACEOF
5202 if { (eval echo "$as_me:5202: \"$ac_cpp conftest.$ac_ext\"") >&5
5203 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5204 ac_status=$?
5205 egrep -v '^ *\+' conftest.er1 >conftest.err
5206 rm -f conftest.er1
5207 cat conftest.err >&5
5208 echo "$as_me:5208: \$? = $ac_status" >&5
5209 (exit $ac_status); } >/dev/null; then
5210 if test -s conftest.err; then
5211 ac_cpp_err=$ac_c_preproc_warn_flag
5212 else
5213 ac_cpp_err=
5215 else
5216 ac_cpp_err=yes
5218 if test -z "$ac_cpp_err"; then
5219 ac_cv_header_gpm_h=yes
5220 else
5221 echo "$as_me: failed program was:" >&5
5222 cat conftest.$ac_ext >&5
5223 ac_cv_header_gpm_h=no
5225 rm -f conftest.err conftest.$ac_ext
5227 echo "$as_me:5227: result: $ac_cv_header_gpm_h" >&5
5228 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5229 if test $ac_cv_header_gpm_h = yes; then
5231 cat >>confdefs.h <<\EOF
5232 #define HAVE_GPM_H 1
5235 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5236 test -n "$verbose" && echo " assuming we really have GPM library" 1>&6
5238 echo "${as_me:-configure}:5238: testing assuming we really have GPM library ..." 1>&5
5240 cat >>confdefs.h <<\EOF
5241 #define HAVE_LIBGPM 1
5244 else
5245 echo "$as_me:5245: checking for Gpm_Open in -lgpm" >&5
5246 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5247 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5248 echo $ECHO_N "(cached) $ECHO_C" >&6
5249 else
5250 ac_check_lib_save_LIBS=$LIBS
5251 LIBS="-lgpm $LIBS"
5252 cat >conftest.$ac_ext <<_ACEOF
5253 #line 5253 "configure"
5254 #include "confdefs.h"
5256 /* Override any gcc2 internal prototype to avoid an error. */
5257 #ifdef __cplusplus
5258 extern "C"
5259 #endif
5260 /* We use char because int might match the return type of a gcc2
5261 builtin and then its argument prototype would still apply. */
5262 char Gpm_Open ();
5264 main ()
5266 Gpm_Open ();
5268 return 0;
5270 _ACEOF
5271 rm -f conftest.$ac_objext conftest$ac_exeext
5272 if { (eval echo "$as_me:5272: \"$ac_link\"") >&5
5273 (eval $ac_link) 2>&5
5274 ac_status=$?
5275 echo "$as_me:5275: \$? = $ac_status" >&5
5276 (exit $ac_status); } &&
5277 { ac_try='test -s conftest$ac_exeext'
5278 { (eval echo "$as_me:5278: \"$ac_try\"") >&5
5279 (eval $ac_try) 2>&5
5280 ac_status=$?
5281 echo "$as_me:5281: \$? = $ac_status" >&5
5282 (exit $ac_status); }; }; then
5283 ac_cv_lib_gpm_Gpm_Open=yes
5284 else
5285 echo "$as_me: failed program was:" >&5
5286 cat conftest.$ac_ext >&5
5287 ac_cv_lib_gpm_Gpm_Open=no
5289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5290 LIBS=$ac_check_lib_save_LIBS
5292 echo "$as_me:5292: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5293 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5294 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5296 else
5298 { { echo "$as_me:5298: error: Cannot link with GPM library" >&5
5299 echo "$as_me: error: Cannot link with GPM library" >&2;}
5300 { (exit 1); exit 1; }; }
5302 with_gpm=yes
5306 else
5308 test "$with_gpm" != maybe && { echo "$as_me:5308: WARNING: Cannot find GPM header" >&5
5309 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5310 with_gpm=no
5316 if test "$with_gpm" != no ; then
5317 echo "$as_me:5317: checking if you want to load GPM dynamically" >&5
5318 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5320 # Check whether --with-dlsym or --without-dlsym was given.
5321 if test "${with_dlsym+set}" = set; then
5322 withval="$with_dlsym"
5323 with_dlsym=$withval
5324 else
5325 with_dlsym=yes
5327 echo "$as_me:5327: result: $with_dlsym" >&5
5328 echo "${ECHO_T}$with_dlsym" >&6
5329 if test "x$with_dlsym" = xyes ; then
5331 cf_have_dlsym=no
5332 echo "$as_me:5332: checking for dlsym" >&5
5333 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5334 if test "${ac_cv_func_dlsym+set}" = set; then
5335 echo $ECHO_N "(cached) $ECHO_C" >&6
5336 else
5337 cat >conftest.$ac_ext <<_ACEOF
5338 #line 5338 "configure"
5339 #include "confdefs.h"
5340 /* System header to define __stub macros and hopefully few prototypes,
5341 which can conflict with char dlsym (); below. */
5342 #include <assert.h>
5343 /* Override any gcc2 internal prototype to avoid an error. */
5344 #ifdef __cplusplus
5345 extern "C"
5346 #endif
5347 /* We use char because int might match the return type of a gcc2
5348 builtin and then its argument prototype would still apply. */
5349 char dlsym ();
5350 char (*f) ();
5353 main ()
5355 /* The GNU C library defines this for functions which it implements
5356 to always fail with ENOSYS. Some functions are actually named
5357 something starting with __ and the normal name is an alias. */
5358 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5359 choke me
5360 #else
5361 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5362 #endif
5365 return 0;
5367 _ACEOF
5368 rm -f conftest.$ac_objext conftest$ac_exeext
5369 if { (eval echo "$as_me:5369: \"$ac_link\"") >&5
5370 (eval $ac_link) 2>&5
5371 ac_status=$?
5372 echo "$as_me:5372: \$? = $ac_status" >&5
5373 (exit $ac_status); } &&
5374 { ac_try='test -s conftest$ac_exeext'
5375 { (eval echo "$as_me:5375: \"$ac_try\"") >&5
5376 (eval $ac_try) 2>&5
5377 ac_status=$?
5378 echo "$as_me:5378: \$? = $ac_status" >&5
5379 (exit $ac_status); }; }; then
5380 ac_cv_func_dlsym=yes
5381 else
5382 echo "$as_me: failed program was:" >&5
5383 cat conftest.$ac_ext >&5
5384 ac_cv_func_dlsym=no
5386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5388 echo "$as_me:5388: result: $ac_cv_func_dlsym" >&5
5389 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5390 if test $ac_cv_func_dlsym = yes; then
5391 cf_have_dlsym=yes
5392 else
5394 cf_have_libdl=no
5395 echo "$as_me:5395: checking for dlsym in -ldl" >&5
5396 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5397 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5398 echo $ECHO_N "(cached) $ECHO_C" >&6
5399 else
5400 ac_check_lib_save_LIBS=$LIBS
5401 LIBS="-ldl $LIBS"
5402 cat >conftest.$ac_ext <<_ACEOF
5403 #line 5403 "configure"
5404 #include "confdefs.h"
5406 /* Override any gcc2 internal prototype to avoid an error. */
5407 #ifdef __cplusplus
5408 extern "C"
5409 #endif
5410 /* We use char because int might match the return type of a gcc2
5411 builtin and then its argument prototype would still apply. */
5412 char dlsym ();
5414 main ()
5416 dlsym ();
5418 return 0;
5420 _ACEOF
5421 rm -f conftest.$ac_objext conftest$ac_exeext
5422 if { (eval echo "$as_me:5422: \"$ac_link\"") >&5
5423 (eval $ac_link) 2>&5
5424 ac_status=$?
5425 echo "$as_me:5425: \$? = $ac_status" >&5
5426 (exit $ac_status); } &&
5427 { ac_try='test -s conftest$ac_exeext'
5428 { (eval echo "$as_me:5428: \"$ac_try\"") >&5
5429 (eval $ac_try) 2>&5
5430 ac_status=$?
5431 echo "$as_me:5431: \$? = $ac_status" >&5
5432 (exit $ac_status); }; }; then
5433 ac_cv_lib_dl_dlsym=yes
5434 else
5435 echo "$as_me: failed program was:" >&5
5436 cat conftest.$ac_ext >&5
5437 ac_cv_lib_dl_dlsym=no
5439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5440 LIBS=$ac_check_lib_save_LIBS
5442 echo "$as_me:5442: result: $ac_cv_lib_dl_dlsym" >&5
5443 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5444 if test $ac_cv_lib_dl_dlsym = yes; then
5446 cf_have_dlsym=yes
5447 cf_have_libdl=yes
5452 if test "$cf_have_dlsym" = yes ; then
5453 test "$cf_have_libdl" = yes &&
5454 cf_add_libs="-ldl"
5455 # Filter out duplicates - this happens with badly-designed ".pc" files...
5456 for cf_add_1lib in $LIBS
5458 for cf_add_2lib in $cf_add_libs
5460 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5461 then
5462 cf_add_1lib=
5463 break
5465 done
5466 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5467 done
5468 LIBS="$cf_add_libs"
5470 echo "$as_me:5470: checking whether able to link to dl*() functions" >&5
5471 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5472 cat >conftest.$ac_ext <<_ACEOF
5473 #line 5473 "configure"
5474 #include "confdefs.h"
5475 #include <dlfcn.h>
5477 main ()
5480 void *obj;
5481 if ((obj = dlopen("filename", 0)) != 0) {
5482 if (dlsym(obj, "symbolname") == 0) {
5483 dlclose(obj);
5487 return 0;
5489 _ACEOF
5490 rm -f conftest.$ac_objext conftest$ac_exeext
5491 if { (eval echo "$as_me:5491: \"$ac_link\"") >&5
5492 (eval $ac_link) 2>&5
5493 ac_status=$?
5494 echo "$as_me:5494: \$? = $ac_status" >&5
5495 (exit $ac_status); } &&
5496 { ac_try='test -s conftest$ac_exeext'
5497 { (eval echo "$as_me:5497: \"$ac_try\"") >&5
5498 (eval $ac_try) 2>&5
5499 ac_status=$?
5500 echo "$as_me:5500: \$? = $ac_status" >&5
5501 (exit $ac_status); }; }; then
5503 cat >>confdefs.h <<\EOF
5504 #define HAVE_LIBDL 1
5507 else
5508 echo "$as_me: failed program was:" >&5
5509 cat conftest.$ac_ext >&5
5511 { { echo "$as_me:5511: error: Cannot link test program for libdl" >&5
5512 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5513 { (exit 1); exit 1; }; }
5515 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5516 echo "$as_me:5516: result: ok" >&5
5517 echo "${ECHO_T}ok" >&6
5518 else
5519 { { echo "$as_me:5519: error: Cannot find dlsym function" >&5
5520 echo "$as_me: error: Cannot find dlsym function" >&2;}
5521 { (exit 1); exit 1; }; }
5524 if test "x$with_gpm" != xyes ; then
5525 test -n "$verbose" && echo " assuming soname for gpm is $with_gpm" 1>&6
5527 echo "${as_me:-configure}:5527: testing assuming soname for gpm is $with_gpm ..." 1>&5
5529 cf_cv_gpm_soname="$with_gpm"
5530 else
5532 echo "$as_me:5532: checking for soname of gpm library" >&5
5533 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5534 if test "${cf_cv_gpm_soname+set}" = set; then
5535 echo $ECHO_N "(cached) $ECHO_C" >&6
5536 else
5538 cf_cv_gpm_soname=unknown
5539 if test "$cross_compiling" != yes ; then
5540 cat >conftest.$ac_ext <<CF_EOF
5541 #include <gpm.h>
5542 int main()
5544 if (Gpm_Open(0,0)) Gpm_Close();
5545 ${cf_cv_main_return:-return}(0);
5547 CF_EOF
5548 cf_save_LIBS="$LIBS"
5550 cf_add_libs="-lgpm"
5551 # Filter out duplicates - this happens with badly-designed ".pc" files...
5552 for cf_add_1lib in $LIBS
5554 for cf_add_2lib in $cf_add_libs
5556 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5557 then
5558 cf_add_1lib=
5559 break
5561 done
5562 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5563 done
5564 LIBS="$cf_add_libs"
5566 if { (eval echo "$as_me:5566: \"$ac_compile\"") >&5
5567 (eval $ac_compile) 2>&5
5568 ac_status=$?
5569 echo "$as_me:5569: \$? = $ac_status" >&5
5570 (exit $ac_status); } ; then
5571 if { (eval echo "$as_me:5571: \"$ac_link\"") >&5
5572 (eval $ac_link) 2>&5
5573 ac_status=$?
5574 echo "$as_me:5574: \$? = $ac_status" >&5
5575 (exit $ac_status); } ; then
5576 cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5577 test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5580 rm -rf conftest*
5581 LIBS="$cf_save_LIBS"
5585 echo "$as_me:5585: result: $cf_cv_gpm_soname" >&5
5586 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5589 test "$cf_cv_gpm_soname" != "unknown" &&
5590 cat >>confdefs.h <<EOF
5591 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5594 SHLIB_LIST="-ldl $SHLIB_LIST"
5595 else
5596 SHLIB_LIST="-lgpm $SHLIB_LIST"
5598 cf_add_libs="-lgpm"
5599 # Filter out duplicates - this happens with badly-designed ".pc" files...
5600 for cf_add_1lib in $TEST_LIBS
5602 for cf_add_2lib in $cf_add_libs
5604 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5605 then
5606 cf_add_1lib=
5607 break
5609 done
5610 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5611 done
5612 TEST_LIBS="$cf_add_libs"
5616 cat >>confdefs.h <<\EOF
5617 #define HAVE_LIBGPM 1
5620 echo "$as_me:5620: checking for Gpm_Wgetch in -lgpm" >&5
5621 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5622 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5623 echo $ECHO_N "(cached) $ECHO_C" >&6
5624 else
5625 ac_check_lib_save_LIBS=$LIBS
5626 LIBS="-lgpm $LIBS"
5627 cat >conftest.$ac_ext <<_ACEOF
5628 #line 5628 "configure"
5629 #include "confdefs.h"
5631 /* Override any gcc2 internal prototype to avoid an error. */
5632 #ifdef __cplusplus
5633 extern "C"
5634 #endif
5635 /* We use char because int might match the return type of a gcc2
5636 builtin and then its argument prototype would still apply. */
5637 char Gpm_Wgetch ();
5639 main ()
5641 Gpm_Wgetch ();
5643 return 0;
5645 _ACEOF
5646 rm -f conftest.$ac_objext conftest$ac_exeext
5647 if { (eval echo "$as_me:5647: \"$ac_link\"") >&5
5648 (eval $ac_link) 2>&5
5649 ac_status=$?
5650 echo "$as_me:5650: \$? = $ac_status" >&5
5651 (exit $ac_status); } &&
5652 { ac_try='test -s conftest$ac_exeext'
5653 { (eval echo "$as_me:5653: \"$ac_try\"") >&5
5654 (eval $ac_try) 2>&5
5655 ac_status=$?
5656 echo "$as_me:5656: \$? = $ac_status" >&5
5657 (exit $ac_status); }; }; then
5658 ac_cv_lib_gpm_Gpm_Wgetch=yes
5659 else
5660 echo "$as_me: failed program was:" >&5
5661 cat conftest.$ac_ext >&5
5662 ac_cv_lib_gpm_Gpm_Wgetch=no
5664 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5665 LIBS=$ac_check_lib_save_LIBS
5667 echo "$as_me:5667: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5668 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5669 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5671 echo "$as_me:5671: checking if GPM is weakly bound to curses library" >&5
5672 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5673 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5674 echo $ECHO_N "(cached) $ECHO_C" >&6
5675 else
5677 cf_cv_check_gpm_wgetch=unknown
5678 if test "$cross_compiling" != yes ; then
5680 cat >conftest.$ac_ext <<CF_EOF
5681 #include <gpm.h>
5682 int main()
5684 Gpm_Wgetch();
5685 ${cf_cv_main_return:-return}(0);
5687 CF_EOF
5689 cf_save_LIBS="$LIBS"
5690 # This only works if we can look at the symbol table. If a shared
5691 # library is stripped for install, we cannot use that. So we're forced
5692 # to rely on the static library, noting that some packagers may not
5693 # include it.
5694 LIBS="-static -lgpm -dynamic $LIBS"
5695 if { (eval echo "$as_me:5695: \"$ac_compile\"") >&5
5696 (eval $ac_compile) 2>&5
5697 ac_status=$?
5698 echo "$as_me:5698: \$? = $ac_status" >&5
5699 (exit $ac_status); } ; then
5700 if { (eval echo "$as_me:5700: \"$ac_link\"") >&5
5701 (eval $ac_link) 2>&5
5702 ac_status=$?
5703 echo "$as_me:5703: \$? = $ac_status" >&5
5704 (exit $ac_status); } ; then
5705 cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5706 test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5707 test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5710 rm -rf conftest*
5711 LIBS="$cf_save_LIBS"
5715 echo "$as_me:5715: result: $cf_cv_check_gpm_wgetch" >&5
5716 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5718 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5719 { echo "$as_me:5719: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5720 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5727 # not everyone has "test -c"
5728 if test -c /dev/sysmouse 2>/dev/null ; then
5729 echo "$as_me:5729: checking if you want to use sysmouse" >&5
5730 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5732 # Check whether --with-sysmouse or --without-sysmouse was given.
5733 if test "${with_sysmouse+set}" = set; then
5734 withval="$with_sysmouse"
5735 cf_with_sysmouse=$withval
5736 else
5737 cf_with_sysmouse=maybe
5739 if test "$cf_with_sysmouse" != no ; then
5740 cat >conftest.$ac_ext <<_ACEOF
5741 #line 5741 "configure"
5742 #include "confdefs.h"
5744 #include <osreldate.h>
5745 #if (__FreeBSD_version >= 400017)
5746 #include <sys/consio.h>
5747 #include <sys/fbio.h>
5748 #else
5749 #include <machine/console.h>
5750 #endif
5753 main ()
5756 struct mouse_info the_mouse;
5757 ioctl(0, CONS_MOUSECTL, &the_mouse);
5760 return 0;
5762 _ACEOF
5763 rm -f conftest.$ac_objext
5764 if { (eval echo "$as_me:5764: \"$ac_compile\"") >&5
5765 (eval $ac_compile) 2>&5
5766 ac_status=$?
5767 echo "$as_me:5767: \$? = $ac_status" >&5
5768 (exit $ac_status); } &&
5769 { ac_try='test -s conftest.$ac_objext'
5770 { (eval echo "$as_me:5770: \"$ac_try\"") >&5
5771 (eval $ac_try) 2>&5
5772 ac_status=$?
5773 echo "$as_me:5773: \$? = $ac_status" >&5
5774 (exit $ac_status); }; }; then
5775 cf_with_sysmouse=yes
5776 else
5777 echo "$as_me: failed program was:" >&5
5778 cat conftest.$ac_ext >&5
5779 cf_with_sysmouse=no
5781 rm -f conftest.$ac_objext conftest.$ac_ext
5783 echo "$as_me:5783: result: $cf_with_sysmouse" >&5
5784 echo "${ECHO_T}$cf_with_sysmouse" >&6
5785 test "$cf_with_sysmouse" = yes &&
5786 cat >>confdefs.h <<\EOF
5787 #define USE_SYSMOUSE 1
5792 if test X"$CC_G_OPT" = X"" ; then
5793 CC_G_OPT='-g'
5794 test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5797 if test X"$CXX_G_OPT" = X"" ; then
5798 CXX_G_OPT='-g'
5799 test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5802 echo "$as_me:5802: checking for default loader flags" >&5
5803 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5804 case $DFT_LWR_MODEL in
5805 (libtool) LD_MODEL='' ;;
5806 (normal) LD_MODEL='' ;;
5807 (debug) LD_MODEL=$CC_G_OPT ;;
5808 (profile) LD_MODEL='-pg';;
5809 (shared) LD_MODEL='' ;;
5810 esac
5811 echo "$as_me:5811: result: $LD_MODEL" >&5
5812 echo "${ECHO_T}$LD_MODEL" >&6
5814 case $DFT_LWR_MODEL in
5815 (shared)
5817 echo "$as_me:5817: checking if rpath option should be used" >&5
5818 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5820 # Check whether --enable-rpath or --disable-rpath was given.
5821 if test "${enable_rpath+set}" = set; then
5822 enableval="$enable_rpath"
5823 cf_cv_enable_rpath=$enableval
5824 else
5825 cf_cv_enable_rpath=no
5827 echo "$as_me:5827: result: $cf_cv_enable_rpath" >&5
5828 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5830 echo "$as_me:5830: checking if shared libraries should be relinked during install" >&5
5831 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5833 # Check whether --enable-relink or --disable-relink was given.
5834 if test "${enable_relink+set}" = set; then
5835 enableval="$enable_relink"
5836 cf_cv_do_relink=$enableval
5837 else
5838 cf_cv_do_relink=yes
5840 echo "$as_me:5840: result: $cf_cv_do_relink" >&5
5841 echo "${ECHO_T}$cf_cv_do_relink" >&6
5843 esac
5845 # we will build libraries one-level down.
5846 rel_builddir=..
5848 LD_RPATH_OPT=
5849 echo "$as_me:5849: checking for an rpath option" >&5
5850 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5851 case $cf_cv_system_name in
5852 (irix*)
5853 if test "$GCC" = yes; then
5854 LD_RPATH_OPT="-Wl,-rpath,"
5855 else
5856 LD_RPATH_OPT="-rpath "
5859 (linux*|gnu*|k*bsd*-gnu)
5860 LD_RPATH_OPT="-Wl,-rpath,"
5862 (openbsd[2-9].*|mirbsd*)
5863 LD_RPATH_OPT="-Wl,-rpath,"
5865 (dragonfly*|freebsd*)
5866 LD_RPATH_OPT="-rpath "
5868 (netbsd*)
5869 LD_RPATH_OPT="-Wl,-rpath,"
5871 (osf*|mls+*)
5872 LD_RPATH_OPT="-rpath "
5874 (solaris2*)
5875 LD_RPATH_OPT="-R"
5879 esac
5880 echo "$as_me:5880: result: $LD_RPATH_OPT" >&5
5881 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5883 case "x$LD_RPATH_OPT" in
5884 (x-R*)
5885 echo "$as_me:5885: checking if we need a space after rpath option" >&5
5886 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5887 cf_save_LIBS="$LIBS"
5889 cf_add_libs="${LD_RPATH_OPT}$libdir"
5890 # Filter out duplicates - this happens with badly-designed ".pc" files...
5891 for cf_add_1lib in $LIBS
5893 for cf_add_2lib in $cf_add_libs
5895 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5896 then
5897 cf_add_1lib=
5898 break
5900 done
5901 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5902 done
5903 LIBS="$cf_add_libs"
5905 cat >conftest.$ac_ext <<_ACEOF
5906 #line 5906 "configure"
5907 #include "confdefs.h"
5910 main ()
5914 return 0;
5916 _ACEOF
5917 rm -f conftest.$ac_objext conftest$ac_exeext
5918 if { (eval echo "$as_me:5918: \"$ac_link\"") >&5
5919 (eval $ac_link) 2>&5
5920 ac_status=$?
5921 echo "$as_me:5921: \$? = $ac_status" >&5
5922 (exit $ac_status); } &&
5923 { ac_try='test -s conftest$ac_exeext'
5924 { (eval echo "$as_me:5924: \"$ac_try\"") >&5
5925 (eval $ac_try) 2>&5
5926 ac_status=$?
5927 echo "$as_me:5927: \$? = $ac_status" >&5
5928 (exit $ac_status); }; }; then
5929 cf_rpath_space=no
5930 else
5931 echo "$as_me: failed program was:" >&5
5932 cat conftest.$ac_ext >&5
5933 cf_rpath_space=yes
5935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5936 LIBS="$cf_save_LIBS"
5937 echo "$as_me:5937: result: $cf_rpath_space" >&5
5938 echo "${ECHO_T}$cf_rpath_space" >&6
5939 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5941 esac
5943 RM_SHARED_OPTS=
5944 LOCAL_LDFLAGS=
5945 LOCAL_LDFLAGS2=
5946 LD_SHARED_OPTS=
5947 INSTALL_LIB="-m 644"
5948 : ${rel_builddir:=.}
5950 shlibdir=$libdir
5952 MAKE_DLLS="#"
5954 cf_cv_do_symlinks=no
5955 cf_ld_rpath_opt=
5956 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5958 echo "$as_me:5958: checking if release/abi version should be used for shared libs" >&5
5959 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5961 # Check whether --with-shlib-version or --without-shlib-version was given.
5962 if test "${with_shlib_version+set}" = set; then
5963 withval="$with_shlib_version"
5964 test -z "$withval" && withval=auto
5965 case $withval in
5966 (yes)
5967 cf_cv_shlib_version=auto
5969 (rel|abi|auto|no)
5970 cf_cv_shlib_version=$withval
5973 { { echo "$as_me:5973: error: option value must be one of: rel, abi, auto or no" >&5
5974 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5975 { (exit 1); exit 1; }; }
5977 esac
5979 else
5980 cf_cv_shlib_version=auto
5982 echo "$as_me:5982: result: $cf_cv_shlib_version" >&5
5983 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5985 cf_cv_rm_so_locs=no
5986 cf_try_cflags=
5988 # Some less-capable ports of gcc support only -fpic
5989 CC_SHARED_OPTS=
5990 if test "$GCC" = yes
5991 then
5992 echo "$as_me:5992: checking which $CC option to use" >&5
5993 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5994 cf_save_CFLAGS="$CFLAGS"
5995 for CC_SHARED_OPTS in -fPIC -fpic ''
5997 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5998 cat >conftest.$ac_ext <<_ACEOF
5999 #line 5999 "configure"
6000 #include "confdefs.h"
6001 #include <stdio.h>
6003 main ()
6005 int x = 1
6007 return 0;
6009 _ACEOF
6010 rm -f conftest.$ac_objext
6011 if { (eval echo "$as_me:6011: \"$ac_compile\"") >&5
6012 (eval $ac_compile) 2>&5
6013 ac_status=$?
6014 echo "$as_me:6014: \$? = $ac_status" >&5
6015 (exit $ac_status); } &&
6016 { ac_try='test -s conftest.$ac_objext'
6017 { (eval echo "$as_me:6017: \"$ac_try\"") >&5
6018 (eval $ac_try) 2>&5
6019 ac_status=$?
6020 echo "$as_me:6020: \$? = $ac_status" >&5
6021 (exit $ac_status); }; }; then
6022 break
6023 else
6024 echo "$as_me: failed program was:" >&5
6025 cat conftest.$ac_ext >&5
6027 rm -f conftest.$ac_objext conftest.$ac_ext
6028 done
6029 echo "$as_me:6029: result: $CC_SHARED_OPTS" >&5
6030 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6031 CFLAGS="$cf_save_CFLAGS"
6034 cf_cv_shlib_version_infix=no
6036 case $cf_cv_system_name in
6037 (aix4.3-9*|aix[5-7]*)
6038 if test "$GCC" = yes; then
6039 CC_SHARED_OPTS='-Wl,-brtl'
6040 MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6041 else
6042 CC_SHARED_OPTS='-brtl'
6043 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6044 MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6047 (beos*)
6048 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6050 (cygwin*)
6051 CC_SHARED_OPTS=
6052 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6053 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6054 cf_cv_shlib_version=cygdll
6055 cf_cv_shlib_version_infix=cygdll
6056 shlibdir=$bindir
6057 MAKE_DLLS=
6058 cat >mk_shared_lib.sh <<-CF_EOF
6059 #!$SHELL
6060 SHARED_LIB=\$1
6061 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6062 shift
6063 cat <<-EOF
6064 Linking shared library
6065 ** SHARED_LIB \$SHARED_LIB
6066 ** IMPORT_LIB \$IMPORT_LIB
6068 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6069 CF_EOF
6070 chmod +x mk_shared_lib.sh
6072 (msys*)
6073 CC_SHARED_OPTS=
6074 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6075 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6076 cf_cv_shlib_version=msysdll
6077 cf_cv_shlib_version_infix=msysdll
6078 shlibdir=$bindir
6079 MAKE_DLLS=
6080 cat >mk_shared_lib.sh <<-CF_EOF
6081 #!$SHELL
6082 SHARED_LIB=\$1
6083 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6084 shift
6085 cat <<-EOF
6086 Linking shared library
6087 ** SHARED_LIB \$SHARED_LIB
6088 ** IMPORT_LIB \$IMPORT_LIB
6090 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6091 CF_EOF
6092 chmod +x mk_shared_lib.sh
6094 (darwin*)
6095 cf_try_cflags="no-cpp-precomp"
6096 CC_SHARED_OPTS="-dynamic"
6097 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6098 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6099 cf_cv_shlib_version_infix=yes
6100 echo "$as_me:6100: checking if ld -search_paths_first works" >&5
6101 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6102 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6103 echo $ECHO_N "(cached) $ECHO_C" >&6
6104 else
6106 cf_save_LDFLAGS=$LDFLAGS
6107 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6108 cat >conftest.$ac_ext <<_ACEOF
6109 #line 6109 "configure"
6110 #include "confdefs.h"
6113 main ()
6115 int i;
6117 return 0;
6119 _ACEOF
6120 rm -f conftest.$ac_objext conftest$ac_exeext
6121 if { (eval echo "$as_me:6121: \"$ac_link\"") >&5
6122 (eval $ac_link) 2>&5
6123 ac_status=$?
6124 echo "$as_me:6124: \$? = $ac_status" >&5
6125 (exit $ac_status); } &&
6126 { ac_try='test -s conftest$ac_exeext'
6127 { (eval echo "$as_me:6127: \"$ac_try\"") >&5
6128 (eval $ac_try) 2>&5
6129 ac_status=$?
6130 echo "$as_me:6130: \$? = $ac_status" >&5
6131 (exit $ac_status); }; }; then
6132 cf_cv_ldflags_search_paths_first=yes
6133 else
6134 echo "$as_me: failed program was:" >&5
6135 cat conftest.$ac_ext >&5
6136 cf_cv_ldflags_search_paths_first=no
6138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6139 LDFLAGS=$cf_save_LDFLAGS
6141 echo "$as_me:6141: result: $cf_cv_ldflags_search_paths_first" >&5
6142 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6143 if test $cf_cv_ldflags_search_paths_first = yes; then
6144 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6147 (hpux[7-8]*)
6148 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6149 if test "$GCC" != yes; then
6150 CC_SHARED_OPTS='+Z'
6152 MK_SHARED_LIB='${LD} -b -o $@'
6153 INSTALL_LIB="-m 555"
6155 (hpux*)
6156 # (tested with gcc 2.7.2 -- I don't have c89)
6157 if test "$GCC" = yes; then
6158 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6159 else
6160 CC_SHARED_OPTS='+Z'
6161 LD_SHARED_OPTS='-Wl,+b,${libdir}'
6163 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6164 # HP-UX shared libraries must be executable, and should be
6165 # readonly to exploit a quirk in the memory manager.
6166 INSTALL_LIB="-m 555"
6168 (interix*)
6169 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6170 if test "$cf_cv_shlib_version" = rel; then
6171 cf_shared_soname='`basename .${REL_VERSION}`.${ABI_VERSION}'
6172 else
6173 cf_shared_soname='`basename `'
6175 CC_SHARED_OPTS=
6176 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6178 (irix*)
6179 if test "$cf_cv_enable_rpath" = yes ; then
6180 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6182 # tested with IRIX 5.2 and 'cc'.
6183 if test "$GCC" != yes; then
6184 CC_SHARED_OPTS='-KPIC'
6185 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6186 else
6187 MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6189 cf_cv_rm_so_locs=yes
6191 (linux*|gnu*|k*bsd*-gnu)
6192 if test "$DFT_LWR_MODEL" = "shared" ; then
6193 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6194 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6196 if test "$cf_cv_enable_rpath" = yes ; then
6197 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6200 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6201 if test "$cf_cv_shlib_version" = rel; then
6202 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6203 else
6204 cf_cv_shared_soname='`basename $@`'
6207 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6209 (mingw*)
6210 cf_cv_shlib_version=mingw
6211 cf_cv_shlib_version_infix=mingw
6212 shlibdir=$bindir
6213 MAKE_DLLS=
6214 if test "$DFT_LWR_MODEL" = "shared" ; then
6215 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6216 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6217 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6219 CC_SHARED_OPTS=
6220 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6221 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6222 cat >mk_shared_lib.sh <<-CF_EOF
6223 #!$SHELL
6224 SHARED_LIB=\$1
6225 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6226 shift
6227 cat <<-EOF
6228 Linking shared library
6229 ** SHARED_LIB \$SHARED_LIB
6230 ** IMPORT_LIB \$IMPORT_LIB
6232 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6233 CF_EOF
6234 chmod +x mk_shared_lib.sh
6236 (openbsd[2-9].*|mirbsd*)
6237 if test "$DFT_LWR_MODEL" = "shared" ; then
6238 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6239 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6241 if test "$cf_cv_enable_rpath" = yes ; then
6242 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6244 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6246 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6247 if test "$cf_cv_shlib_version" = rel; then
6248 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6249 else
6250 cf_cv_shared_soname='`basename $@`'
6253 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6255 (nto-qnx*|openbsd*|freebsd[12].*)
6256 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6257 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6258 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6260 (dragonfly*|freebsd*)
6261 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6262 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6263 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6264 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6265 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6268 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6269 if test "$cf_cv_shlib_version" = rel; then
6270 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6271 else
6272 cf_cv_shared_soname='`basename $@`'
6275 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6277 (netbsd*)
6278 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6279 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6280 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6281 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6282 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6283 if test "$cf_cv_shlib_version" = auto; then
6284 if test -f /usr/libexec/ld.elf_so; then
6285 cf_cv_shlib_version=abi
6286 else
6287 cf_cv_shlib_version=rel
6291 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6292 if test "$cf_cv_shlib_version" = rel; then
6293 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6294 else
6295 cf_cv_shared_soname='`basename $@`'
6298 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6299 else
6300 MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6303 (osf*|mls+*)
6304 # tested with OSF/1 V3.2 and 'cc'
6305 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6306 # link with shared libs).
6307 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6308 case $host_os in
6309 (osf4*)
6310 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6312 esac
6313 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6314 if test "$DFT_LWR_MODEL" = "shared" ; then
6315 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6316 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6318 cf_cv_rm_so_locs=yes
6320 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
6321 # tested with osr5.0.5
6322 if test "$GCC" != yes; then
6323 CC_SHARED_OPTS='-belf -KPIC'
6325 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6326 if test "$cf_cv_enable_rpath" = yes ; then
6327 # only way is to set LD_RUN_PATH but no switch for it
6328 RUN_PATH=$libdir
6330 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6331 LINK_PROGS='LD_RUN_PATH=${libdir}'
6332 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6334 (sunos4*)
6335 # tested with SunOS 4.1.1 and gcc 2.7.0
6336 if test "$GCC" != yes; then
6337 CC_SHARED_OPTS='-KPIC'
6339 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6340 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6342 (solaris2*)
6343 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6344 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6345 if test "$DFT_LWR_MODEL" = "shared" ; then
6346 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6347 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6349 if test "$cf_cv_enable_rpath" = yes ; then
6350 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6353 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6354 if test "$cf_cv_shlib_version" = rel; then
6355 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6356 else
6357 cf_cv_shared_soname='`basename $@`'
6360 if test "$GCC" != yes; then
6361 cf_save_CFLAGS="$CFLAGS"
6362 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6364 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6365 cat >conftest.$ac_ext <<_ACEOF
6366 #line 6366 "configure"
6367 #include "confdefs.h"
6368 #include <stdio.h>
6370 main ()
6372 printf("Hello\n");
6374 return 0;
6376 _ACEOF
6377 rm -f conftest.$ac_objext
6378 if { (eval echo "$as_me:6378: \"$ac_compile\"") >&5
6379 (eval $ac_compile) 2>&5
6380 ac_status=$?
6381 echo "$as_me:6381: \$? = $ac_status" >&5
6382 (exit $ac_status); } &&
6383 { ac_try='test -s conftest.$ac_objext'
6384 { (eval echo "$as_me:6384: \"$ac_try\"") >&5
6385 (eval $ac_try) 2>&5
6386 ac_status=$?
6387 echo "$as_me:6387: \$? = $ac_status" >&5
6388 (exit $ac_status); }; }; then
6389 break
6390 else
6391 echo "$as_me: failed program was:" >&5
6392 cat conftest.$ac_ext >&5
6394 rm -f conftest.$ac_objext conftest.$ac_ext
6395 done
6396 CFLAGS="$cf_save_CFLAGS"
6397 CC_SHARED_OPTS=$cf_shared_opts
6398 MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6399 else
6400 MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6403 (sysv5uw7*|unix_sv*)
6404 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6405 if test "$GCC" != yes; then
6406 CC_SHARED_OPTS='-KPIC'
6408 MK_SHARED_LIB='${LD} -d y -G -o $@'
6411 CC_SHARED_OPTS='unknown'
6412 MK_SHARED_LIB='echo unknown'
6414 esac
6416 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6417 case "$cf_cv_shlib_version" in
6418 (rel|abi)
6419 case "$MK_SHARED_LIB" in
6420 (*'-o $@')
6421 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6424 { echo "$as_me:6424: WARNING: ignored --with-shlib-version" >&5
6425 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6427 esac
6429 esac
6431 if test -n "$cf_try_cflags"
6432 then
6433 cat > conftest.$ac_ext <<EOF
6434 #line 6434 "${as_me:-configure}"
6435 #include <stdio.h>
6436 int main(int argc, char *argv[])
6438 printf("hello\n");
6439 return (argv[argc-1] == 0) ;
6442 cf_save_CFLAGS="$CFLAGS"
6443 for cf_opt in $cf_try_cflags
6445 CFLAGS="$cf_save_CFLAGS -$cf_opt"
6446 echo "$as_me:6446: checking if CFLAGS option -$cf_opt works" >&5
6447 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6448 if { (eval echo "$as_me:6448: \"$ac_compile\"") >&5
6449 (eval $ac_compile) 2>&5
6450 ac_status=$?
6451 echo "$as_me:6451: \$? = $ac_status" >&5
6452 (exit $ac_status); }; then
6453 echo "$as_me:6453: result: yes" >&5
6454 echo "${ECHO_T}yes" >&6
6455 cf_save_CFLAGS="$CFLAGS"
6456 else
6457 echo "$as_me:6457: result: no" >&5
6458 echo "${ECHO_T}no" >&6
6460 done
6461 CFLAGS="$cf_save_CFLAGS"
6464 # RPATH_LIST is a colon-separated list of directories
6465 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6466 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6468 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6470 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6472 echo "${as_me:-configure}:6472: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6474 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
6476 echo "${as_me:-configure}:6476: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
6478 for model in $cf_list_models; do
6479 case $model in
6480 (libtool)
6482 echo "$as_me:6482: checking for additional libtool options" >&5
6483 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6485 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6486 if test "${with_libtool_opts+set}" = set; then
6487 withval="$with_libtool_opts"
6488 with_libtool_opts=$withval
6489 else
6490 with_libtool_opts=no
6492 echo "$as_me:6492: result: $with_libtool_opts" >&5
6493 echo "${ECHO_T}$with_libtool_opts" >&6
6495 case .$with_libtool_opts in
6496 (.yes|.no|.)
6499 LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6501 esac
6503 echo "$as_me:6503: checking if exported-symbols file should be used" >&5
6504 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6506 # Check whether --with-export-syms or --without-export-syms was given.
6507 if test "${with_export_syms+set}" = set; then
6508 withval="$with_export_syms"
6509 with_export_syms=$withval
6510 else
6511 with_export_syms=no
6513 if test "x$with_export_syms" = xyes
6514 then
6515 with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6518 echo "$as_me:6518: result: $with_export_syms" >&5
6519 echo "${ECHO_T}$with_export_syms" >&6
6520 if test "x$with_export_syms" != xno
6521 then
6522 EXPORT_SYMS="-export-symbols $with_export_syms"
6527 (shared)
6528 if test "$CC_SHARED_OPTS" = "unknown"; then
6529 { { echo "$as_me:6529: error: Shared libraries are not supported in this version" >&5
6530 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6531 { (exit 1); exit 1; }; }
6534 echo "$as_me:6534: checking if versioned-symbols file should be used" >&5
6535 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6537 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6538 if test "${with_versioned_syms+set}" = set; then
6539 withval="$with_versioned_syms"
6540 with_versioned_syms=$withval
6541 else
6542 with_versioned_syms=no
6544 if test "x$with_versioned_syms" = xyes
6545 then
6546 with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6549 echo "$as_me:6549: result: $with_versioned_syms" >&5
6550 echo "${ECHO_T}$with_versioned_syms" >&6
6552 RESULTING_SYMS=
6553 VERSIONED_SYMS=
6554 WILDCARD_SYMS=
6556 if test "x$with_versioned_syms" != xno
6557 then
6558 RESULTING_SYMS=$with_versioned_syms
6559 case "x$MK_SHARED_LIB" in
6560 (*-Wl,*)
6561 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6562 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6563 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
6565 echo "${as_me:-configure}:6565: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
6568 (*-dy\ *)
6569 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6570 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6571 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
6573 echo "${as_me:-configure}:6573: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
6577 { echo "$as_me:6577: WARNING: this system does not support versioned-symbols" >&5
6578 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6580 esac
6582 # Linux ld can selectively override scope, e.g., of symbols beginning with
6583 # "_" by first declaring some as global, and then using a wildcard to
6584 # declare the others as local. Some other loaders cannot do this. Check
6585 # by constructing a (very) simple shared library and inspecting its
6586 # symbols.
6587 if test "x$VERSIONED_SYMS" != "x"
6588 then
6589 echo "$as_me:6589: checking if wildcards can be used to selectively omit symbols" >&5
6590 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6591 WILDCARD_SYMS=no
6593 # make sources
6594 rm -f conftest.*
6596 cat >conftest.ver <<EOF
6597 module_1.0 {
6598 global:
6599 globalf1;
6600 local:
6601 localf1;
6603 module_2.0 {
6604 global:
6605 globalf2;
6606 local:
6607 localf2;
6609 } module_1.0;
6610 submodule_1.0 {
6611 global:
6612 subglobalf1;
6613 _ismissing;
6614 local:
6615 sublocalf1;
6617 submodule_2.0 {
6618 global:
6619 subglobalf2;
6620 local:
6621 sublocalf2;
6623 } submodule_1.0;
6625 cat >conftest.$ac_ext <<EOF
6626 #line 6626 "configure"
6627 int _ismissing(void) { return 1; }
6628 int _localf1(void) { return 1; }
6629 int _localf2(void) { return 2; }
6630 int globalf1(void) { return 1; }
6631 int globalf2(void) { return 2; }
6632 int _sublocalf1(void) { return 1; }
6633 int _sublocalf2(void) { return 2; }
6634 int subglobalf1(void) { return 1; }
6635 int subglobalf2(void) { return 2; }
6637 cat >conftest.mk <<EOF
6638 CC=${CC}
6639 CFLAGS=${CFLAGS}
6640 CPPFLAGS=${CPPFLAGS}
6641 LDFLAGS=${LDFLAGS}
6642 LIBS=${LIBS}
6643 VERSIONED_SYMS=${VERSIONED_SYMS}
6644 RESULTING_SYMS=conftest.ver
6645 MK_SHARED_LIB=${MK_SHARED_LIB}
6646 conftest.so: conftest.$ac_cv_objext
6647 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6650 # compile source, make library
6651 if make -f conftest.mk 2>&5 >/dev/null
6652 then
6653 # test for missing symbol
6654 cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[ ]T[ ]'`
6655 test -n "$cf_missing" && WILDCARD_SYMS=yes
6657 echo "$as_me:6657: result: $WILDCARD_SYMS" >&5
6658 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6659 rm -f conftest.*
6664 esac
6665 done
6667 # pretend that ncurses==ncursesw==ncursest
6668 echo "$as_me:6668: checking if you want to disable library suffixes" >&5
6669 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6671 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6672 if test "${enable_lib_suffixes+set}" = set; then
6673 enableval="$enable_lib_suffixes"
6674 test "$enableval" != no && enableval=yes
6675 if test "$enableval" != "yes" ; then
6676 disable_lib_suffixes=yes
6677 else
6678 disable_lib_suffixes=no
6680 else
6681 enableval=yes
6682 disable_lib_suffixes=no
6685 echo "$as_me:6685: result: $disable_lib_suffixes" >&5
6686 echo "${ECHO_T}$disable_lib_suffixes" >&6
6688 ### If we're building with rpath, try to link non-standard libs that way too.
6689 if test "$DFT_LWR_MODEL" = "shared"; then
6691 echo "$as_me:6691: checking if rpath-hack should be disabled" >&5
6692 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6694 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6695 if test "${enable_rpath_hack+set}" = set; then
6696 enableval="$enable_rpath_hack"
6697 test "$enableval" != no && enableval=yes
6698 if test "$enableval" != "yes" ; then
6699 cf_disable_rpath_hack=yes
6700 else
6701 cf_disable_rpath_hack=no
6703 else
6704 enableval=yes
6705 cf_disable_rpath_hack=no
6708 echo "$as_me:6708: result: $cf_disable_rpath_hack" >&5
6709 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6710 if test "$cf_disable_rpath_hack" = no ; then
6712 echo "$as_me:6712: checking for updated LDFLAGS" >&5
6713 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6714 if test -n "$LD_RPATH_OPT" ; then
6715 echo "$as_me:6715: result: maybe" >&5
6716 echo "${ECHO_T}maybe" >&6
6718 for ac_prog in ldd
6720 # Extract the first word of "$ac_prog", so it can be a program name with args.
6721 set dummy $ac_prog; ac_word=$2
6722 echo "$as_me:6722: checking for $ac_word" >&5
6723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6724 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6725 echo $ECHO_N "(cached) $ECHO_C" >&6
6726 else
6727 if test -n "$cf_ldd_prog"; then
6728 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6729 else
6730 ac_save_IFS=$IFS; IFS=$ac_path_separator
6731 ac_dummy="$PATH"
6732 for ac_dir in $ac_dummy; do
6733 IFS=$ac_save_IFS
6734 test -z "$ac_dir" && ac_dir=.
6735 $as_executable_p "$ac_dir/$ac_word" || continue
6736 ac_cv_prog_cf_ldd_prog="$ac_prog"
6737 echo "$as_me:6737: found $ac_dir/$ac_word" >&5
6738 break
6739 done
6743 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6744 if test -n "$cf_ldd_prog"; then
6745 echo "$as_me:6745: result: $cf_ldd_prog" >&5
6746 echo "${ECHO_T}$cf_ldd_prog" >&6
6747 else
6748 echo "$as_me:6748: result: no" >&5
6749 echo "${ECHO_T}no" >&6
6752 test -n "$cf_ldd_prog" && break
6753 done
6754 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6756 cf_rpath_list="/usr/lib /lib"
6757 if test "$cf_ldd_prog" != no
6758 then
6759 cf_rpath_oops=
6761 cat >conftest.$ac_ext <<_ACEOF
6762 #line 6762 "configure"
6763 #include "confdefs.h"
6764 #include <stdio.h>
6766 main ()
6768 printf("Hello");
6770 return 0;
6772 _ACEOF
6773 rm -f conftest.$ac_objext conftest$ac_exeext
6774 if { (eval echo "$as_me:6774: \"$ac_link\"") >&5
6775 (eval $ac_link) 2>&5
6776 ac_status=$?
6777 echo "$as_me:6777: \$? = $ac_status" >&5
6778 (exit $ac_status); } &&
6779 { ac_try='test -s conftest$ac_exeext'
6780 { (eval echo "$as_me:6780: \"$ac_try\"") >&5
6781 (eval $ac_try) 2>&5
6782 ac_status=$?
6783 echo "$as_me:6783: \$? = $ac_status" >&5
6784 (exit $ac_status); }; }; then
6785 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6786 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6787 else
6788 echo "$as_me: failed program was:" >&5
6789 cat conftest.$ac_ext >&5
6791 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6793 # If we passed the link-test, but get a "not found" on a given library,
6794 # this could be due to inept reconfiguration of gcc to make it only
6795 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
6796 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6797 # /usr/local libraries.
6798 if test -n "$cf_rpath_oops"
6799 then
6800 for cf_rpath_src in $cf_rpath_oops
6802 for cf_rpath_dir in \
6803 /usr/local \
6804 /usr/pkg \
6805 /opt/sfw
6807 if test -f $cf_rpath_dir/lib/$cf_rpath_src
6808 then
6809 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6811 echo "${as_me:-configure}:6811: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6813 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6814 break
6816 done
6817 done
6821 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6823 echo "${as_me:-configure}:6823: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6825 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
6827 echo "${as_me:-configure}:6827: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6829 cf_rpath_dst=
6830 for cf_rpath_src in $LDFLAGS
6832 case $cf_rpath_src in
6833 (-L*)
6835 # check if this refers to a directory which we will ignore
6836 cf_rpath_skip=no
6837 if test -n "$cf_rpath_list"
6838 then
6839 for cf_rpath_item in $cf_rpath_list
6841 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6842 then
6843 cf_rpath_skip=yes
6844 break
6846 done
6849 if test "$cf_rpath_skip" = no
6850 then
6851 # transform the option
6852 if test "$LD_RPATH_OPT" = "-R " ; then
6853 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6854 else
6855 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6858 # if we have not already added this, add it now
6859 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6860 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6861 then
6862 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6864 echo "${as_me:-configure}:6864: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6866 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6870 esac
6871 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6872 done
6873 LDFLAGS=$cf_rpath_dst
6875 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
6877 echo "${as_me:-configure}:6877: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6879 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
6881 echo "${as_me:-configure}:6881: testing ...checking LIBS $LIBS ..." 1>&5
6883 cf_rpath_dst=
6884 for cf_rpath_src in $LIBS
6886 case $cf_rpath_src in
6887 (-L*)
6889 # check if this refers to a directory which we will ignore
6890 cf_rpath_skip=no
6891 if test -n "$cf_rpath_list"
6892 then
6893 for cf_rpath_item in $cf_rpath_list
6895 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6896 then
6897 cf_rpath_skip=yes
6898 break
6900 done
6903 if test "$cf_rpath_skip" = no
6904 then
6905 # transform the option
6906 if test "$LD_RPATH_OPT" = "-R " ; then
6907 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6908 else
6909 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6912 # if we have not already added this, add it now
6913 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6914 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6915 then
6916 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6918 echo "${as_me:-configure}:6918: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6920 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6924 esac
6925 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6926 done
6927 LIBS=$cf_rpath_dst
6929 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
6931 echo "${as_me:-configure}:6931: testing ...checked LIBS $LIBS ..." 1>&5
6933 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6935 echo "${as_me:-configure}:6935: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6937 else
6938 echo "$as_me:6938: result: no" >&5
6939 echo "${ECHO_T}no" >&6
6946 ###############################################################################
6948 ### use option --with-extra-suffix to append suffix to headers and libraries
6949 echo "$as_me:6949: checking if you wish to append extra suffix to header/library paths" >&5
6950 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
6951 EXTRA_SUFFIX=
6953 # Check whether --with-extra-suffix or --without-extra-suffix was given.
6954 if test "${with_extra_suffix+set}" = set; then
6955 withval="$with_extra_suffix"
6956 case x$withval in
6957 (no)
6959 (xyes|x)
6960 EXTRA_SUFFIX=$cf_cv_abi_version
6963 EXTRA_SUFFIX=$withval
6965 esac
6968 echo "$as_me:6968: result: $EXTRA_SUFFIX" >&5
6969 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
6971 ### use option --disable-overwrite to leave out the link to -lcurses
6972 echo "$as_me:6972: checking if you wish to install ncurses overwriting curses" >&5
6973 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6975 # Check whether --enable-overwrite or --disable-overwrite was given.
6976 if test "${enable_overwrite+set}" = set; then
6977 enableval="$enable_overwrite"
6978 with_overwrite=$enableval
6979 else
6980 if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6982 echo "$as_me:6982: result: $with_overwrite" >&5
6983 echo "${ECHO_T}$with_overwrite" >&6
6985 echo "$as_me:6985: checking if external terminfo-database is used" >&5
6986 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6988 # Check whether --enable-database or --disable-database was given.
6989 if test "${enable_database+set}" = set; then
6990 enableval="$enable_database"
6991 use_database=$enableval
6992 else
6993 use_database=yes
6995 echo "$as_me:6995: result: $use_database" >&5
6996 echo "${ECHO_T}$use_database" >&6
6998 case $host_os in
6999 (os2*)
7000 TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7003 TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7005 esac
7007 NCURSES_USE_DATABASE=0
7008 if test "$use_database" != no ; then
7009 NCURSES_USE_DATABASE=1
7011 echo "$as_me:7011: checking which terminfo source-file will be installed" >&5
7012 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7014 # Check whether --with-database or --without-database was given.
7015 if test "${with_database+set}" = set; then
7016 withval="$with_database"
7017 TERMINFO_SRC=$withval
7019 echo "$as_me:7019: result: $TERMINFO_SRC" >&5
7020 echo "${ECHO_T}$TERMINFO_SRC" >&6
7022 echo "$as_me:7022: checking whether to use hashed database instead of directory/tree" >&5
7023 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7025 # Check whether --with-hashed-db or --without-hashed-db was given.
7026 if test "${with_hashed_db+set}" = set; then
7027 withval="$with_hashed_db"
7029 else
7030 with_hashed_db=no
7032 echo "$as_me:7032: result: $with_hashed_db" >&5
7033 echo "${ECHO_T}$with_hashed_db" >&6
7034 else
7035 with_hashed_db=no
7038 echo "$as_me:7038: checking for list of fallback descriptions" >&5
7039 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7041 # Check whether --with-fallbacks or --without-fallbacks was given.
7042 if test "${with_fallbacks+set}" = set; then
7043 withval="$with_fallbacks"
7044 with_fallback=$withval
7045 else
7046 with_fallback=
7048 echo "$as_me:7048: result: $with_fallback" >&5
7049 echo "${ECHO_T}$with_fallback" >&6
7050 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
7052 echo "$as_me:7052: checking if you want modern xterm or antique" >&5
7053 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7055 # Check whether --with-xterm-new or --without-xterm-new was given.
7056 if test "${with_xterm_new+set}" = set; then
7057 withval="$with_xterm_new"
7058 with_xterm_new=$withval
7059 else
7060 with_xterm_new=yes
7062 case $with_xterm_new in
7063 (no) with_xterm_new=xterm-old;;
7064 (*) with_xterm_new=xterm-new;;
7065 esac
7066 echo "$as_me:7066: result: $with_xterm_new" >&5
7067 echo "${ECHO_T}$with_xterm_new" >&6
7068 WHICH_XTERM=$with_xterm_new
7070 echo "$as_me:7070: checking if xterm backspace sends BS or DEL" >&5
7071 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7073 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7074 if test "${with_xterm_kbs+set}" = set; then
7075 withval="$with_xterm_kbs"
7076 with_xterm_kbs=$withval
7077 else
7078 with_xterm_kbs=BS
7080 case x$with_xterm_kbs in
7081 (xyes|xno|xBS|xbs|x8)
7082 with_xterm_kbs=BS
7084 (xDEL|xdel|x127)
7085 with_xterm_kbs=DEL
7088 with_xterm_kbs=$withval
7090 esac
7091 echo "$as_me:7091: result: $with_xterm_kbs" >&5
7092 echo "${ECHO_T}$with_xterm_kbs" >&6
7093 XTERM_KBS=$with_xterm_kbs
7095 MAKE_TERMINFO=
7096 if test "$use_database" = no ; then
7097 TERMINFO="${datadir}/terminfo"
7098 MAKE_TERMINFO="#"
7099 else
7101 echo "$as_me:7101: checking for list of terminfo directories" >&5
7102 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7104 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7105 if test "${with_terminfo_dirs+set}" = set; then
7106 withval="$with_terminfo_dirs"
7108 else
7109 withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7111 IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7112 cf_dst_path=
7113 for cf_src_path in $withval
7116 if test "x$prefix" != xNONE; then
7117 cf_path_syntax="$prefix"
7118 else
7119 cf_path_syntax="$ac_default_prefix"
7122 case ".$cf_src_path" in
7123 (.\$\(*\)*|.\'*\'*)
7125 (..|./*|.\\*)
7127 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7129 (.\${*prefix}*|.\${*dir}*)
7130 eval cf_src_path="$cf_src_path"
7131 case ".$cf_src_path" in
7132 (.NONE/*)
7133 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7135 esac
7137 (.no|.NONE/*)
7138 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7141 { { echo "$as_me:7141: error: expected a pathname, not \"$cf_src_path\"" >&5
7142 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7143 { (exit 1); exit 1; }; }
7145 esac
7147 test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7148 cf_dst_path="${cf_dst_path}${cf_src_path}"
7149 done
7150 IFS="$ac_save_ifs"
7152 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7153 # so we have to check/work around. We do prefer the result of "eval"...
7154 eval cf_dst_eval="$cf_dst_path"
7155 case "x$cf_dst_eval" in
7156 (xNONE*)
7157 TERMINFO_DIRS=$cf_dst_path
7160 TERMINFO_DIRS="$cf_dst_eval"
7162 esac
7164 echo "$as_me:7164: result: $TERMINFO_DIRS" >&5
7165 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7166 test -n "$TERMINFO_DIRS" &&
7167 cat >>confdefs.h <<EOF
7168 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7171 echo "$as_me:7171: checking for default terminfo directory" >&5
7172 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7174 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7175 if test "${with_default_terminfo_dir+set}" = set; then
7176 withval="$with_default_terminfo_dir"
7178 else
7179 withval="${TERMINFO:-${datadir}/terminfo}"
7180 fi; if test -n "${datadir}/terminfo" ; then
7182 if test "x$prefix" != xNONE; then
7183 cf_path_syntax="$prefix"
7184 else
7185 cf_path_syntax="$ac_default_prefix"
7188 case ".$withval" in
7189 (.\$\(*\)*|.\'*\'*)
7191 (..|./*|.\\*)
7193 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7195 (.\${*prefix}*|.\${*dir}*)
7196 eval withval="$withval"
7197 case ".$withval" in
7198 (.NONE/*)
7199 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7201 esac
7203 (.no|.NONE/*)
7204 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7207 { { echo "$as_me:7207: error: expected a pathname, not \"$withval\"" >&5
7208 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7209 { (exit 1); exit 1; }; }
7211 esac
7214 eval TERMINFO="$withval"
7216 echo "$as_me:7216: result: $TERMINFO" >&5
7217 echo "${ECHO_T}$TERMINFO" >&6
7219 cat >>confdefs.h <<EOF
7220 #define TERMINFO "$TERMINFO"
7225 ### use option --disable-big-core to make tic run on small machines
7226 ### We need 4Mb, check if we can allocate 50% more than that.
7227 echo "$as_me:7227: checking if big-core option selected" >&5
7228 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7230 # Check whether --enable-big-core or --disable-big-core was given.
7231 if test "${enable_big_core+set}" = set; then
7232 enableval="$enable_big_core"
7233 with_big_core=$enableval
7234 else
7235 if test "$cross_compiling" = yes; then
7236 with_big_core=no
7237 else
7238 cat >conftest.$ac_ext <<_ACEOF
7239 #line 7239 "configure"
7240 #include "confdefs.h"
7242 #include <stdlib.h>
7243 #include <string.h>
7244 int main() {
7245 unsigned long n = 6000000L;
7246 char *s = malloc(n);
7247 if (s != 0)
7248 s[0] = s[n-1] = 0;
7249 ${cf_cv_main_return:-return}(s == 0);
7251 _ACEOF
7252 rm -f conftest$ac_exeext
7253 if { (eval echo "$as_me:7253: \"$ac_link\"") >&5
7254 (eval $ac_link) 2>&5
7255 ac_status=$?
7256 echo "$as_me:7256: \$? = $ac_status" >&5
7257 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7258 { (eval echo "$as_me:7258: \"$ac_try\"") >&5
7259 (eval $ac_try) 2>&5
7260 ac_status=$?
7261 echo "$as_me:7261: \$? = $ac_status" >&5
7262 (exit $ac_status); }; }; then
7263 with_big_core=yes
7264 else
7265 echo "$as_me: program exited with status $ac_status" >&5
7266 echo "$as_me: failed program was:" >&5
7267 cat conftest.$ac_ext >&5
7268 with_big_core=no
7270 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7273 echo "$as_me:7273: result: $with_big_core" >&5
7274 echo "${ECHO_T}$with_big_core" >&6
7275 test "x$with_big_core" = "xyes" &&
7276 cat >>confdefs.h <<\EOF
7277 #define HAVE_BIG_CORE 1
7280 ### ISO C only guarantees 512-char strings, we have tables which load faster
7281 ### when constructed using "big" strings. More than the C compiler, the awk
7282 ### program is a limit on most vendor UNIX systems. Check that we can build.
7283 echo "$as_me:7283: checking if big-strings option selected" >&5
7284 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7286 # Check whether --enable-big-strings or --disable-big-strings was given.
7287 if test "${enable_big_strings+set}" = set; then
7288 enableval="$enable_big_strings"
7289 with_big_strings=$enableval
7290 else
7292 case x$AWK in
7294 eval with_big_strings=no
7297 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7298 | $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
7299 eval with_big_strings=yes
7300 else
7301 eval with_big_strings=no
7304 esac
7307 echo "$as_me:7307: result: $with_big_strings" >&5
7308 echo "${ECHO_T}$with_big_strings" >&6
7310 USE_BIG_STRINGS=0
7311 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7313 ### use option --enable-termcap to compile in the termcap fallback support
7314 echo "$as_me:7314: checking if you want termcap-fallback support" >&5
7315 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7317 # Check whether --enable-termcap or --disable-termcap was given.
7318 if test "${enable_termcap+set}" = set; then
7319 enableval="$enable_termcap"
7320 with_termcap=$enableval
7321 else
7322 with_termcap=no
7324 echo "$as_me:7324: result: $with_termcap" >&5
7325 echo "${ECHO_T}$with_termcap" >&6
7327 NCURSES_USE_TERMCAP=0
7328 if test "x$with_termcap" != "xyes" ; then
7329 if test "$use_database" = no ; then
7330 if test -z "$with_fallback" ; then
7331 { { echo "$as_me:7331: error: You have disabled the database w/o specifying fallbacks" >&5
7332 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7333 { (exit 1); exit 1; }; }
7337 cat >>confdefs.h <<\EOF
7338 #define PURE_TERMINFO 1
7341 else
7343 if test "$with_ticlib" != no ; then
7344 { { echo "$as_me:7344: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7345 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7346 { (exit 1); exit 1; }; }
7349 NCURSES_USE_TERMCAP=1
7350 echo "$as_me:7350: checking for list of termcap files" >&5
7351 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7353 # Check whether --with-termpath or --without-termpath was given.
7354 if test "${with_termpath+set}" = set; then
7355 withval="$with_termpath"
7357 else
7358 withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7360 IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7361 cf_dst_path=
7362 for cf_src_path in $withval
7365 if test "x$prefix" != xNONE; then
7366 cf_path_syntax="$prefix"
7367 else
7368 cf_path_syntax="$ac_default_prefix"
7371 case ".$cf_src_path" in
7372 (.\$\(*\)*|.\'*\'*)
7374 (..|./*|.\\*)
7376 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7378 (.\${*prefix}*|.\${*dir}*)
7379 eval cf_src_path="$cf_src_path"
7380 case ".$cf_src_path" in
7381 (.NONE/*)
7382 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7384 esac
7386 (.no|.NONE/*)
7387 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7390 { { echo "$as_me:7390: error: expected a pathname, not \"$cf_src_path\"" >&5
7391 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7392 { (exit 1); exit 1; }; }
7394 esac
7396 test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7397 cf_dst_path="${cf_dst_path}${cf_src_path}"
7398 done
7399 IFS="$ac_save_ifs"
7401 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7402 # so we have to check/work around. We do prefer the result of "eval"...
7403 eval cf_dst_eval="$cf_dst_path"
7404 case "x$cf_dst_eval" in
7405 (xNONE*)
7406 TERMPATH=$cf_dst_path
7409 TERMPATH="$cf_dst_eval"
7411 esac
7413 echo "$as_me:7413: result: $TERMPATH" >&5
7414 echo "${ECHO_T}$TERMPATH" >&6
7415 test -n "$TERMPATH" &&
7416 cat >>confdefs.h <<EOF
7417 #define TERMPATH "$TERMPATH"
7420 ### use option --enable-getcap to use a hacked getcap for reading termcaps
7421 echo "$as_me:7421: checking if fast termcap-loader is needed" >&5
7422 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7424 # Check whether --enable-getcap or --disable-getcap was given.
7425 if test "${enable_getcap+set}" = set; then
7426 enableval="$enable_getcap"
7427 with_getcap=$enableval
7428 else
7429 with_getcap=no
7431 echo "$as_me:7431: result: $with_getcap" >&5
7432 echo "${ECHO_T}$with_getcap" >&6
7433 test "x$with_getcap" = "xyes" &&
7434 cat >>confdefs.h <<\EOF
7435 #define USE_GETCAP 1
7438 echo "$as_me:7438: checking if translated termcaps will be cached in ~/.terminfo" >&5
7439 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7441 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7442 if test "${enable_getcap_cache+set}" = set; then
7443 enableval="$enable_getcap_cache"
7444 with_getcap_cache=$enableval
7445 else
7446 with_getcap_cache=no
7448 echo "$as_me:7448: result: $with_getcap_cache" >&5
7449 echo "${ECHO_T}$with_getcap_cache" >&6
7450 test "x$with_getcap_cache" = "xyes" &&
7451 cat >>confdefs.h <<\EOF
7452 #define USE_GETCAP_CACHE 1
7457 ### Use option --disable-home-terminfo to completely remove ~/.terminfo
7458 echo "$as_me:7458: checking if ~/.terminfo is wanted" >&5
7459 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7461 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7462 if test "${enable_home_terminfo+set}" = set; then
7463 enableval="$enable_home_terminfo"
7464 with_home_terminfo=$enableval
7465 else
7466 with_home_terminfo=yes
7468 echo "$as_me:7468: result: $with_home_terminfo" >&5
7469 echo "${ECHO_T}$with_home_terminfo" >&6
7470 test "x$with_home_terminfo" = "xyes" &&
7471 cat >>confdefs.h <<\EOF
7472 #define USE_HOME_TERMINFO 1
7475 echo "$as_me:7475: checking if you want to use restricted environment when running as root" >&5
7476 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7478 # Check whether --enable-root-environ or --disable-root-environ was given.
7479 if test "${enable_root_environ+set}" = set; then
7480 enableval="$enable_root_environ"
7481 with_root_environ=$enableval
7482 else
7483 with_root_environ=yes
7485 echo "$as_me:7485: result: $with_root_environ" >&5
7486 echo "${ECHO_T}$with_root_environ" >&6
7487 test "x$with_root_environ" = xyes &&
7488 cat >>confdefs.h <<\EOF
7489 #define USE_ROOT_ENVIRON 1
7492 ### Use option --enable-symlinks to make tic use symlinks, not hard links
7493 ### to reduce storage requirements for the terminfo database.
7495 for ac_func in \
7496 remove \
7497 unlink
7499 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7500 echo "$as_me:7500: checking for $ac_func" >&5
7501 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7502 if eval "test \"\${$as_ac_var+set}\" = set"; then
7503 echo $ECHO_N "(cached) $ECHO_C" >&6
7504 else
7505 cat >conftest.$ac_ext <<_ACEOF
7506 #line 7506 "configure"
7507 #include "confdefs.h"
7508 /* System header to define __stub macros and hopefully few prototypes,
7509 which can conflict with char $ac_func (); below. */
7510 #include <assert.h>
7511 /* Override any gcc2 internal prototype to avoid an error. */
7512 #ifdef __cplusplus
7513 extern "C"
7514 #endif
7515 /* We use char because int might match the return type of a gcc2
7516 builtin and then its argument prototype would still apply. */
7517 char $ac_func ();
7518 char (*f) ();
7521 main ()
7523 /* The GNU C library defines this for functions which it implements
7524 to always fail with ENOSYS. Some functions are actually named
7525 something starting with __ and the normal name is an alias. */
7526 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7527 choke me
7528 #else
7529 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7530 #endif
7533 return 0;
7535 _ACEOF
7536 rm -f conftest.$ac_objext conftest$ac_exeext
7537 if { (eval echo "$as_me:7537: \"$ac_link\"") >&5
7538 (eval $ac_link) 2>&5
7539 ac_status=$?
7540 echo "$as_me:7540: \$? = $ac_status" >&5
7541 (exit $ac_status); } &&
7542 { ac_try='test -s conftest$ac_exeext'
7543 { (eval echo "$as_me:7543: \"$ac_try\"") >&5
7544 (eval $ac_try) 2>&5
7545 ac_status=$?
7546 echo "$as_me:7546: \$? = $ac_status" >&5
7547 (exit $ac_status); }; }; then
7548 eval "$as_ac_var=yes"
7549 else
7550 echo "$as_me: failed program was:" >&5
7551 cat conftest.$ac_ext >&5
7552 eval "$as_ac_var=no"
7554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7556 echo "$as_me:7556: result: `eval echo '${'$as_ac_var'}'`" >&5
7557 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7558 if test `eval echo '${'$as_ac_var'}'` = yes; then
7559 cat >>confdefs.h <<EOF
7560 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7564 done
7566 if test "$cross_compiling" = yes ; then
7568 for ac_func in \
7569 link \
7570 symlink
7572 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7573 echo "$as_me:7573: checking for $ac_func" >&5
7574 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7575 if eval "test \"\${$as_ac_var+set}\" = set"; then
7576 echo $ECHO_N "(cached) $ECHO_C" >&6
7577 else
7578 cat >conftest.$ac_ext <<_ACEOF
7579 #line 7579 "configure"
7580 #include "confdefs.h"
7581 /* System header to define __stub macros and hopefully few prototypes,
7582 which can conflict with char $ac_func (); below. */
7583 #include <assert.h>
7584 /* Override any gcc2 internal prototype to avoid an error. */
7585 #ifdef __cplusplus
7586 extern "C"
7587 #endif
7588 /* We use char because int might match the return type of a gcc2
7589 builtin and then its argument prototype would still apply. */
7590 char $ac_func ();
7591 char (*f) ();
7594 main ()
7596 /* The GNU C library defines this for functions which it implements
7597 to always fail with ENOSYS. Some functions are actually named
7598 something starting with __ and the normal name is an alias. */
7599 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7600 choke me
7601 #else
7602 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7603 #endif
7606 return 0;
7608 _ACEOF
7609 rm -f conftest.$ac_objext conftest$ac_exeext
7610 if { (eval echo "$as_me:7610: \"$ac_link\"") >&5
7611 (eval $ac_link) 2>&5
7612 ac_status=$?
7613 echo "$as_me:7613: \$? = $ac_status" >&5
7614 (exit $ac_status); } &&
7615 { ac_try='test -s conftest$ac_exeext'
7616 { (eval echo "$as_me:7616: \"$ac_try\"") >&5
7617 (eval $ac_try) 2>&5
7618 ac_status=$?
7619 echo "$as_me:7619: \$? = $ac_status" >&5
7620 (exit $ac_status); }; }; then
7621 eval "$as_ac_var=yes"
7622 else
7623 echo "$as_me: failed program was:" >&5
7624 cat conftest.$ac_ext >&5
7625 eval "$as_ac_var=no"
7627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7629 echo "$as_me:7629: result: `eval echo '${'$as_ac_var'}'`" >&5
7630 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7631 if test `eval echo '${'$as_ac_var'}'` = yes; then
7632 cat >>confdefs.h <<EOF
7633 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7637 done
7639 else
7640 echo "$as_me:7640: checking if link/symlink functions work" >&5
7641 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7642 if test "${cf_cv_link_funcs+set}" = set; then
7643 echo $ECHO_N "(cached) $ECHO_C" >&6
7644 else
7646 cf_cv_link_funcs=
7647 for cf_func in link symlink ; do
7648 if test "$cross_compiling" = yes; then
7650 eval 'ac_cv_func_'$cf_func'=error'
7651 else
7652 cat >conftest.$ac_ext <<_ACEOF
7653 #line 7653 "configure"
7654 #include "confdefs.h"
7656 #include <sys/types.h>
7657 #include <sys/stat.h>
7658 #ifdef HAVE_UNISTD_H
7659 #include <unistd.h>
7660 #endif
7661 int main()
7663 int fail = 0;
7664 char *src = "config.log";
7665 char *dst = "conftest.chk";
7666 struct stat src_sb;
7667 struct stat dst_sb;
7669 stat(src, &src_sb);
7670 fail = ($cf_func("config.log", "conftest.chk") < 0)
7671 || (stat(dst, &dst_sb) < 0)
7672 || (dst_sb.st_mtime != src_sb.st_mtime);
7673 #ifdef HAVE_UNLINK
7674 unlink(dst);
7675 #else
7676 remove(dst);
7677 #endif
7678 ${cf_cv_main_return:-return} (fail);
7681 _ACEOF
7682 rm -f conftest$ac_exeext
7683 if { (eval echo "$as_me:7683: \"$ac_link\"") >&5
7684 (eval $ac_link) 2>&5
7685 ac_status=$?
7686 echo "$as_me:7686: \$? = $ac_status" >&5
7687 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7688 { (eval echo "$as_me:7688: \"$ac_try\"") >&5
7689 (eval $ac_try) 2>&5
7690 ac_status=$?
7691 echo "$as_me:7691: \$? = $ac_status" >&5
7692 (exit $ac_status); }; }; then
7694 cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7695 eval 'ac_cv_func_'$cf_func'=yes'
7696 else
7697 echo "$as_me: program exited with status $ac_status" >&5
7698 echo "$as_me: failed program was:" >&5
7699 cat conftest.$ac_ext >&5
7701 eval 'ac_cv_func_'$cf_func'=no'
7703 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7705 done
7706 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7709 echo "$as_me:7709: result: $cf_cv_link_funcs" >&5
7710 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7711 test "$ac_cv_func_link" = yes &&
7712 cat >>confdefs.h <<\EOF
7713 #define HAVE_LINK 1
7716 test "$ac_cv_func_symlink" = yes &&
7717 cat >>confdefs.h <<\EOF
7718 #define HAVE_SYMLINK 1
7723 with_links=no
7724 with_symlinks=no
7726 # soft links (symbolic links) are useful for some systems where hard links do
7727 # not work, or to make it simpler to copy terminfo trees around.
7728 if test "x$ac_cv_func_symlink" = xyes ; then
7729 echo "$as_me:7729: checking if tic should use symbolic links" >&5
7730 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7732 # Check whether --enable-symlinks or --disable-symlinks was given.
7733 if test "${enable_symlinks+set}" = set; then
7734 enableval="$enable_symlinks"
7735 with_symlinks=$enableval
7736 else
7737 with_symlinks=no
7739 echo "$as_me:7739: result: $with_symlinks" >&5
7740 echo "${ECHO_T}$with_symlinks" >&6
7743 # If we have hard links and did not choose to use soft links instead, there is
7744 # no reason to make this choice optional - use the hard links.
7745 if test "$with_symlinks" = no ; then
7746 echo "$as_me:7746: checking if tic should use hard links" >&5
7747 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7748 if test "x$ac_cv_func_link" = xyes ; then
7749 with_links=yes
7750 else
7751 with_links=no
7753 echo "$as_me:7753: result: $with_links" >&5
7754 echo "${ECHO_T}$with_links" >&6
7757 test "x$with_links" = xyes &&
7758 cat >>confdefs.h <<\EOF
7759 #define USE_LINKS 1
7762 test "x$with_symlinks" = xyes &&
7763 cat >>confdefs.h <<\EOF
7764 #define USE_SYMLINKS 1
7767 ### use option --enable-broken-linker to force on use of broken-linker support
7768 echo "$as_me:7768: checking if you want broken-linker support code" >&5
7769 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7771 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7772 if test "${enable_broken_linker+set}" = set; then
7773 enableval="$enable_broken_linker"
7774 with_broken_linker=$enableval
7775 else
7776 with_broken_linker=${BROKEN_LINKER:-no}
7778 echo "$as_me:7778: result: $with_broken_linker" >&5
7779 echo "${ECHO_T}$with_broken_linker" >&6
7781 BROKEN_LINKER=0
7782 if test "x$with_broken_linker" = xyes ; then
7784 cat >>confdefs.h <<\EOF
7785 #define BROKEN_LINKER 1
7788 BROKEN_LINKER=1
7789 elif test "$DFT_LWR_MODEL" = shared ; then
7790 case $cf_cv_system_name in
7791 (cygwin*)
7793 cat >>confdefs.h <<\EOF
7794 #define BROKEN_LINKER 1
7797 BROKEN_LINKER=1
7798 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
7800 echo "${as_me:-configure}:7800: testing cygwin linker is broken anyway ..." 1>&5
7803 esac
7806 ### use option --enable-bsdpad to have tputs process BSD-style prefix padding
7807 echo "$as_me:7807: checking if tputs should process BSD-style prefix padding" >&5
7808 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7810 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7811 if test "${enable_bsdpad+set}" = set; then
7812 enableval="$enable_bsdpad"
7813 with_bsdpad=$enableval
7814 else
7815 with_bsdpad=no
7817 echo "$as_me:7817: result: $with_bsdpad" >&5
7818 echo "${ECHO_T}$with_bsdpad" >&6
7819 test "x$with_bsdpad" = xyes &&
7820 cat >>confdefs.h <<\EOF
7821 #define BSD_TPUTS 1
7824 ### use option --enable-widec to turn on use of wide-character support
7825 NCURSES_CH_T=chtype
7826 NCURSES_LIBUTF8=0
7828 NEED_WCHAR_H=0
7829 NCURSES_MBSTATE_T=0
7830 NCURSES_WCHAR_T=0
7831 NCURSES_WINT_T=0
7833 # Check to define _XOPEN_SOURCE "automatically"
7834 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7836 cf_XOPEN_SOURCE=500
7837 cf_POSIX_C_SOURCE=199506L
7838 cf_xopen_source=
7840 case $host_os in
7841 (aix[4-7]*)
7842 cf_xopen_source="-D_ALL_SOURCE"
7844 (cygwin|msys)
7845 cf_XOPEN_SOURCE=600
7847 (darwin[0-8].*)
7848 cf_xopen_source="-D_APPLE_C_SOURCE"
7850 (darwin*)
7851 cf_xopen_source="-D_DARWIN_C_SOURCE"
7852 cf_XOPEN_SOURCE=
7854 (freebsd*|dragonfly*)
7855 # 5.x headers associate
7856 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7857 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7858 cf_POSIX_C_SOURCE=200112L
7859 cf_XOPEN_SOURCE=600
7860 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7862 (hpux11*)
7863 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7865 (hpux*)
7866 cf_xopen_source="-D_HPUX_SOURCE"
7868 (irix[56].*)
7869 cf_xopen_source="-D_SGI_SOURCE"
7870 cf_XOPEN_SOURCE=
7872 (linux*|gnu*|mint*|k*bsd*-gnu)
7874 echo "$as_me:7874: checking if we must define _GNU_SOURCE" >&5
7875 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7876 if test "${cf_cv_gnu_source+set}" = set; then
7877 echo $ECHO_N "(cached) $ECHO_C" >&6
7878 else
7880 cat >conftest.$ac_ext <<_ACEOF
7881 #line 7881 "configure"
7882 #include "confdefs.h"
7883 #include <sys/types.h>
7885 main ()
7888 #ifndef _XOPEN_SOURCE
7889 make an error
7890 #endif
7892 return 0;
7894 _ACEOF
7895 rm -f conftest.$ac_objext
7896 if { (eval echo "$as_me:7896: \"$ac_compile\"") >&5
7897 (eval $ac_compile) 2>&5
7898 ac_status=$?
7899 echo "$as_me:7899: \$? = $ac_status" >&5
7900 (exit $ac_status); } &&
7901 { ac_try='test -s conftest.$ac_objext'
7902 { (eval echo "$as_me:7902: \"$ac_try\"") >&5
7903 (eval $ac_try) 2>&5
7904 ac_status=$?
7905 echo "$as_me:7905: \$? = $ac_status" >&5
7906 (exit $ac_status); }; }; then
7907 cf_cv_gnu_source=no
7908 else
7909 echo "$as_me: failed program was:" >&5
7910 cat conftest.$ac_ext >&5
7911 cf_save="$CPPFLAGS"
7912 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7913 cat >conftest.$ac_ext <<_ACEOF
7914 #line 7914 "configure"
7915 #include "confdefs.h"
7916 #include <sys/types.h>
7918 main ()
7921 #ifdef _XOPEN_SOURCE
7922 make an error
7923 #endif
7925 return 0;
7927 _ACEOF
7928 rm -f conftest.$ac_objext
7929 if { (eval echo "$as_me:7929: \"$ac_compile\"") >&5
7930 (eval $ac_compile) 2>&5
7931 ac_status=$?
7932 echo "$as_me:7932: \$? = $ac_status" >&5
7933 (exit $ac_status); } &&
7934 { ac_try='test -s conftest.$ac_objext'
7935 { (eval echo "$as_me:7935: \"$ac_try\"") >&5
7936 (eval $ac_try) 2>&5
7937 ac_status=$?
7938 echo "$as_me:7938: \$? = $ac_status" >&5
7939 (exit $ac_status); }; }; then
7940 cf_cv_gnu_source=no
7941 else
7942 echo "$as_me: failed program was:" >&5
7943 cat conftest.$ac_ext >&5
7944 cf_cv_gnu_source=yes
7946 rm -f conftest.$ac_objext conftest.$ac_ext
7947 CPPFLAGS="$cf_save"
7950 rm -f conftest.$ac_objext conftest.$ac_ext
7953 echo "$as_me:7953: result: $cf_cv_gnu_source" >&5
7954 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7955 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7958 (minix*)
7959 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7961 (mirbsd*)
7962 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7963 cf_XOPEN_SOURCE=
7965 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7967 cf_save_CFLAGS="$CFLAGS"
7968 cf_save_CPPFLAGS="$CPPFLAGS"
7970 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7971 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
7972 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
7974 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7975 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
7976 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
7978 echo "$as_me:7978: checking if we should define _POSIX_C_SOURCE" >&5
7979 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7980 if test "${cf_cv_posix_c_source+set}" = set; then
7981 echo $ECHO_N "(cached) $ECHO_C" >&6
7982 else
7984 echo "${as_me:-configure}:7984: testing if the symbol is already defined go no further ..." 1>&5
7986 cat >conftest.$ac_ext <<_ACEOF
7987 #line 7987 "configure"
7988 #include "confdefs.h"
7989 #include <sys/types.h>
7991 main ()
7994 #ifndef _POSIX_C_SOURCE
7995 make an error
7996 #endif
7998 return 0;
8000 _ACEOF
8001 rm -f conftest.$ac_objext
8002 if { (eval echo "$as_me:8002: \"$ac_compile\"") >&5
8003 (eval $ac_compile) 2>&5
8004 ac_status=$?
8005 echo "$as_me:8005: \$? = $ac_status" >&5
8006 (exit $ac_status); } &&
8007 { ac_try='test -s conftest.$ac_objext'
8008 { (eval echo "$as_me:8008: \"$ac_try\"") >&5
8009 (eval $ac_try) 2>&5
8010 ac_status=$?
8011 echo "$as_me:8011: \$? = $ac_status" >&5
8012 (exit $ac_status); }; }; then
8013 cf_cv_posix_c_source=no
8014 else
8015 echo "$as_me: failed program was:" >&5
8016 cat conftest.$ac_ext >&5
8017 cf_want_posix_source=no
8018 case .$cf_POSIX_C_SOURCE in
8019 (.[12]??*)
8020 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8022 (.2)
8023 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8024 cf_want_posix_source=yes
8026 (.*)
8027 cf_want_posix_source=yes
8029 esac
8030 if test "$cf_want_posix_source" = yes ; then
8031 cat >conftest.$ac_ext <<_ACEOF
8032 #line 8032 "configure"
8033 #include "confdefs.h"
8034 #include <sys/types.h>
8036 main ()
8039 #ifdef _POSIX_SOURCE
8040 make an error
8041 #endif
8043 return 0;
8045 _ACEOF
8046 rm -f conftest.$ac_objext
8047 if { (eval echo "$as_me:8047: \"$ac_compile\"") >&5
8048 (eval $ac_compile) 2>&5
8049 ac_status=$?
8050 echo "$as_me:8050: \$? = $ac_status" >&5
8051 (exit $ac_status); } &&
8052 { ac_try='test -s conftest.$ac_objext'
8053 { (eval echo "$as_me:8053: \"$ac_try\"") >&5
8054 (eval $ac_try) 2>&5
8055 ac_status=$?
8056 echo "$as_me:8056: \$? = $ac_status" >&5
8057 (exit $ac_status); }; }; then
8059 else
8060 echo "$as_me: failed program was:" >&5
8061 cat conftest.$ac_ext >&5
8062 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8064 rm -f conftest.$ac_objext conftest.$ac_ext
8067 echo "${as_me:-configure}:8067: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8069 CFLAGS="$cf_trim_CFLAGS"
8070 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8072 echo "${as_me:-configure}:8072: testing if the second compile does not leave our definition intact error ..." 1>&5
8074 cat >conftest.$ac_ext <<_ACEOF
8075 #line 8075 "configure"
8076 #include "confdefs.h"
8077 #include <sys/types.h>
8079 main ()
8082 #ifndef _POSIX_C_SOURCE
8083 make an error
8084 #endif
8086 return 0;
8088 _ACEOF
8089 rm -f conftest.$ac_objext
8090 if { (eval echo "$as_me:8090: \"$ac_compile\"") >&5
8091 (eval $ac_compile) 2>&5
8092 ac_status=$?
8093 echo "$as_me:8093: \$? = $ac_status" >&5
8094 (exit $ac_status); } &&
8095 { ac_try='test -s conftest.$ac_objext'
8096 { (eval echo "$as_me:8096: \"$ac_try\"") >&5
8097 (eval $ac_try) 2>&5
8098 ac_status=$?
8099 echo "$as_me:8099: \$? = $ac_status" >&5
8100 (exit $ac_status); }; }; then
8102 else
8103 echo "$as_me: failed program was:" >&5
8104 cat conftest.$ac_ext >&5
8105 cf_cv_posix_c_source=no
8107 rm -f conftest.$ac_objext conftest.$ac_ext
8108 CFLAGS="$cf_save_CFLAGS"
8109 CPPFLAGS="$cf_save_CPPFLAGS"
8112 rm -f conftest.$ac_objext conftest.$ac_ext
8115 echo "$as_me:8115: result: $cf_cv_posix_c_source" >&5
8116 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8118 if test "$cf_cv_posix_c_source" != no ; then
8119 CFLAGS="$cf_trim_CFLAGS"
8120 CPPFLAGS="$cf_trim_CPPFLAGS"
8122 cf_fix_cppflags=no
8123 cf_new_cflags=
8124 cf_new_cppflags=
8125 cf_new_extra_cppflags=
8127 for cf_add_cflags in $cf_cv_posix_c_source
8129 case $cf_fix_cppflags in
8130 (no)
8131 case $cf_add_cflags in
8132 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8133 case $cf_add_cflags in
8134 (-D*)
8135 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8137 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8138 && test -z "${cf_tst_cflags}" \
8139 && cf_fix_cppflags=yes
8141 if test $cf_fix_cppflags = yes ; then
8142 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8143 continue
8144 elif test "${cf_tst_cflags}" = "\"'" ; then
8145 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8146 continue
8149 esac
8150 case "$CPPFLAGS" in
8151 (*$cf_add_cflags)
8154 case $cf_add_cflags in
8155 (-D*)
8156 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8158 CPPFLAGS=`echo "$CPPFLAGS" | \
8159 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8160 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8163 esac
8164 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8166 esac
8169 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8171 esac
8173 (yes)
8174 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8176 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8178 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8179 && test -z "${cf_tst_cflags}" \
8180 && cf_fix_cppflags=no
8182 esac
8183 done
8185 if test -n "$cf_new_cflags" ; then
8187 CFLAGS="$CFLAGS $cf_new_cflags"
8190 if test -n "$cf_new_cppflags" ; then
8192 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8195 if test -n "$cf_new_extra_cppflags" ; then
8197 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8203 (netbsd*)
8204 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8206 (openbsd[4-9]*)
8207 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8208 cf_xopen_source="-D_BSD_SOURCE"
8209 cf_XOPEN_SOURCE=600
8211 (openbsd*)
8212 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8214 (osf[45]*)
8215 cf_xopen_source="-D_OSF_SOURCE"
8217 (nto-qnx*)
8218 cf_xopen_source="-D_QNX_SOURCE"
8220 (sco*)
8221 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8223 (solaris2.*)
8224 cf_xopen_source="-D__EXTENSIONS__"
8225 cf_cv_xopen_source=broken
8227 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8228 cf_XOPEN_SOURCE=
8229 cf_POSIX_C_SOURCE=
8233 echo "$as_me:8233: checking if we should define _XOPEN_SOURCE" >&5
8234 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8235 if test "${cf_cv_xopen_source+set}" = set; then
8236 echo $ECHO_N "(cached) $ECHO_C" >&6
8237 else
8239 cat >conftest.$ac_ext <<_ACEOF
8240 #line 8240 "configure"
8241 #include "confdefs.h"
8243 #include <stdlib.h>
8244 #include <string.h>
8245 #include <sys/types.h>
8248 main ()
8251 #ifndef _XOPEN_SOURCE
8252 make an error
8253 #endif
8255 return 0;
8257 _ACEOF
8258 rm -f conftest.$ac_objext
8259 if { (eval echo "$as_me:8259: \"$ac_compile\"") >&5
8260 (eval $ac_compile) 2>&5
8261 ac_status=$?
8262 echo "$as_me:8262: \$? = $ac_status" >&5
8263 (exit $ac_status); } &&
8264 { ac_try='test -s conftest.$ac_objext'
8265 { (eval echo "$as_me:8265: \"$ac_try\"") >&5
8266 (eval $ac_try) 2>&5
8267 ac_status=$?
8268 echo "$as_me:8268: \$? = $ac_status" >&5
8269 (exit $ac_status); }; }; then
8270 cf_cv_xopen_source=no
8271 else
8272 echo "$as_me: failed program was:" >&5
8273 cat conftest.$ac_ext >&5
8274 cf_save="$CPPFLAGS"
8275 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8276 cat >conftest.$ac_ext <<_ACEOF
8277 #line 8277 "configure"
8278 #include "confdefs.h"
8280 #include <stdlib.h>
8281 #include <string.h>
8282 #include <sys/types.h>
8285 main ()
8288 #ifdef _XOPEN_SOURCE
8289 make an error
8290 #endif
8292 return 0;
8294 _ACEOF
8295 rm -f conftest.$ac_objext
8296 if { (eval echo "$as_me:8296: \"$ac_compile\"") >&5
8297 (eval $ac_compile) 2>&5
8298 ac_status=$?
8299 echo "$as_me:8299: \$? = $ac_status" >&5
8300 (exit $ac_status); } &&
8301 { ac_try='test -s conftest.$ac_objext'
8302 { (eval echo "$as_me:8302: \"$ac_try\"") >&5
8303 (eval $ac_try) 2>&5
8304 ac_status=$?
8305 echo "$as_me:8305: \$? = $ac_status" >&5
8306 (exit $ac_status); }; }; then
8307 cf_cv_xopen_source=no
8308 else
8309 echo "$as_me: failed program was:" >&5
8310 cat conftest.$ac_ext >&5
8311 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8313 rm -f conftest.$ac_objext conftest.$ac_ext
8314 CPPFLAGS="$cf_save"
8317 rm -f conftest.$ac_objext conftest.$ac_ext
8320 echo "$as_me:8320: result: $cf_cv_xopen_source" >&5
8321 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8323 if test "$cf_cv_xopen_source" != no ; then
8325 CFLAGS=`echo "$CFLAGS" | \
8326 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8327 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
8329 CPPFLAGS=`echo "$CPPFLAGS" | \
8330 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8331 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
8333 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8335 cf_fix_cppflags=no
8336 cf_new_cflags=
8337 cf_new_cppflags=
8338 cf_new_extra_cppflags=
8340 for cf_add_cflags in $cf_temp_xopen_source
8342 case $cf_fix_cppflags in
8343 (no)
8344 case $cf_add_cflags in
8345 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8346 case $cf_add_cflags in
8347 (-D*)
8348 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8350 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8351 && test -z "${cf_tst_cflags}" \
8352 && cf_fix_cppflags=yes
8354 if test $cf_fix_cppflags = yes ; then
8355 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8356 continue
8357 elif test "${cf_tst_cflags}" = "\"'" ; then
8358 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8359 continue
8362 esac
8363 case "$CPPFLAGS" in
8364 (*$cf_add_cflags)
8367 case $cf_add_cflags in
8368 (-D*)
8369 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8371 CPPFLAGS=`echo "$CPPFLAGS" | \
8372 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8373 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8376 esac
8377 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8379 esac
8382 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8384 esac
8386 (yes)
8387 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8389 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8391 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8392 && test -z "${cf_tst_cflags}" \
8393 && cf_fix_cppflags=no
8395 esac
8396 done
8398 if test -n "$cf_new_cflags" ; then
8400 CFLAGS="$CFLAGS $cf_new_cflags"
8403 if test -n "$cf_new_cppflags" ; then
8405 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8408 if test -n "$cf_new_extra_cppflags" ; then
8410 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8415 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8417 cf_save_CFLAGS="$CFLAGS"
8418 cf_save_CPPFLAGS="$CPPFLAGS"
8420 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8421 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8422 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
8424 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8425 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8426 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
8428 echo "$as_me:8428: checking if we should define _POSIX_C_SOURCE" >&5
8429 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8430 if test "${cf_cv_posix_c_source+set}" = set; then
8431 echo $ECHO_N "(cached) $ECHO_C" >&6
8432 else
8434 echo "${as_me:-configure}:8434: testing if the symbol is already defined go no further ..." 1>&5
8436 cat >conftest.$ac_ext <<_ACEOF
8437 #line 8437 "configure"
8438 #include "confdefs.h"
8439 #include <sys/types.h>
8441 main ()
8444 #ifndef _POSIX_C_SOURCE
8445 make an error
8446 #endif
8448 return 0;
8450 _ACEOF
8451 rm -f conftest.$ac_objext
8452 if { (eval echo "$as_me:8452: \"$ac_compile\"") >&5
8453 (eval $ac_compile) 2>&5
8454 ac_status=$?
8455 echo "$as_me:8455: \$? = $ac_status" >&5
8456 (exit $ac_status); } &&
8457 { ac_try='test -s conftest.$ac_objext'
8458 { (eval echo "$as_me:8458: \"$ac_try\"") >&5
8459 (eval $ac_try) 2>&5
8460 ac_status=$?
8461 echo "$as_me:8461: \$? = $ac_status" >&5
8462 (exit $ac_status); }; }; then
8463 cf_cv_posix_c_source=no
8464 else
8465 echo "$as_me: failed program was:" >&5
8466 cat conftest.$ac_ext >&5
8467 cf_want_posix_source=no
8468 case .$cf_POSIX_C_SOURCE in
8469 (.[12]??*)
8470 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8472 (.2)
8473 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8474 cf_want_posix_source=yes
8476 (.*)
8477 cf_want_posix_source=yes
8479 esac
8480 if test "$cf_want_posix_source" = yes ; then
8481 cat >conftest.$ac_ext <<_ACEOF
8482 #line 8482 "configure"
8483 #include "confdefs.h"
8484 #include <sys/types.h>
8486 main ()
8489 #ifdef _POSIX_SOURCE
8490 make an error
8491 #endif
8493 return 0;
8495 _ACEOF
8496 rm -f conftest.$ac_objext
8497 if { (eval echo "$as_me:8497: \"$ac_compile\"") >&5
8498 (eval $ac_compile) 2>&5
8499 ac_status=$?
8500 echo "$as_me:8500: \$? = $ac_status" >&5
8501 (exit $ac_status); } &&
8502 { ac_try='test -s conftest.$ac_objext'
8503 { (eval echo "$as_me:8503: \"$ac_try\"") >&5
8504 (eval $ac_try) 2>&5
8505 ac_status=$?
8506 echo "$as_me:8506: \$? = $ac_status" >&5
8507 (exit $ac_status); }; }; then
8509 else
8510 echo "$as_me: failed program was:" >&5
8511 cat conftest.$ac_ext >&5
8512 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8514 rm -f conftest.$ac_objext conftest.$ac_ext
8517 echo "${as_me:-configure}:8517: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8519 CFLAGS="$cf_trim_CFLAGS"
8520 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8522 echo "${as_me:-configure}:8522: testing if the second compile does not leave our definition intact error ..." 1>&5
8524 cat >conftest.$ac_ext <<_ACEOF
8525 #line 8525 "configure"
8526 #include "confdefs.h"
8527 #include <sys/types.h>
8529 main ()
8532 #ifndef _POSIX_C_SOURCE
8533 make an error
8534 #endif
8536 return 0;
8538 _ACEOF
8539 rm -f conftest.$ac_objext
8540 if { (eval echo "$as_me:8540: \"$ac_compile\"") >&5
8541 (eval $ac_compile) 2>&5
8542 ac_status=$?
8543 echo "$as_me:8543: \$? = $ac_status" >&5
8544 (exit $ac_status); } &&
8545 { ac_try='test -s conftest.$ac_objext'
8546 { (eval echo "$as_me:8546: \"$ac_try\"") >&5
8547 (eval $ac_try) 2>&5
8548 ac_status=$?
8549 echo "$as_me:8549: \$? = $ac_status" >&5
8550 (exit $ac_status); }; }; then
8552 else
8553 echo "$as_me: failed program was:" >&5
8554 cat conftest.$ac_ext >&5
8555 cf_cv_posix_c_source=no
8557 rm -f conftest.$ac_objext conftest.$ac_ext
8558 CFLAGS="$cf_save_CFLAGS"
8559 CPPFLAGS="$cf_save_CPPFLAGS"
8562 rm -f conftest.$ac_objext conftest.$ac_ext
8565 echo "$as_me:8565: result: $cf_cv_posix_c_source" >&5
8566 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8568 if test "$cf_cv_posix_c_source" != no ; then
8569 CFLAGS="$cf_trim_CFLAGS"
8570 CPPFLAGS="$cf_trim_CPPFLAGS"
8572 cf_fix_cppflags=no
8573 cf_new_cflags=
8574 cf_new_cppflags=
8575 cf_new_extra_cppflags=
8577 for cf_add_cflags in $cf_cv_posix_c_source
8579 case $cf_fix_cppflags in
8580 (no)
8581 case $cf_add_cflags in
8582 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8583 case $cf_add_cflags in
8584 (-D*)
8585 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8587 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8588 && test -z "${cf_tst_cflags}" \
8589 && cf_fix_cppflags=yes
8591 if test $cf_fix_cppflags = yes ; then
8592 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8593 continue
8594 elif test "${cf_tst_cflags}" = "\"'" ; then
8595 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8596 continue
8599 esac
8600 case "$CPPFLAGS" in
8601 (*$cf_add_cflags)
8604 case $cf_add_cflags in
8605 (-D*)
8606 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8608 CPPFLAGS=`echo "$CPPFLAGS" | \
8609 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8610 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8613 esac
8614 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8616 esac
8619 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8621 esac
8623 (yes)
8624 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8626 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8628 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8629 && test -z "${cf_tst_cflags}" \
8630 && cf_fix_cppflags=no
8632 esac
8633 done
8635 if test -n "$cf_new_cflags" ; then
8637 CFLAGS="$CFLAGS $cf_new_cflags"
8640 if test -n "$cf_new_cppflags" ; then
8642 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8645 if test -n "$cf_new_extra_cppflags" ; then
8647 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8653 esac
8655 if test -n "$cf_xopen_source" ; then
8657 cf_fix_cppflags=no
8658 cf_new_cflags=
8659 cf_new_cppflags=
8660 cf_new_extra_cppflags=
8662 for cf_add_cflags in $cf_xopen_source
8664 case $cf_fix_cppflags in
8665 (no)
8666 case $cf_add_cflags in
8667 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8668 case $cf_add_cflags in
8669 (-D*)
8670 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8672 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8673 && test -z "${cf_tst_cflags}" \
8674 && cf_fix_cppflags=yes
8676 if test $cf_fix_cppflags = yes ; then
8677 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8678 continue
8679 elif test "${cf_tst_cflags}" = "\"'" ; then
8680 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8681 continue
8684 esac
8685 case "$CPPFLAGS" in
8686 (*$cf_add_cflags)
8689 case $cf_add_cflags in
8690 (-D*)
8691 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8693 CPPFLAGS=`echo "$CPPFLAGS" | \
8694 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8695 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8698 esac
8699 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8701 esac
8704 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8706 esac
8708 (yes)
8709 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8711 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8713 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8714 && test -z "${cf_tst_cflags}" \
8715 && cf_fix_cppflags=no
8717 esac
8718 done
8720 if test -n "$cf_new_cflags" ; then
8721 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
8723 echo "${as_me:-configure}:8723: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8725 CFLAGS="$CFLAGS $cf_new_cflags"
8728 if test -n "$cf_new_cppflags" ; then
8729 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8731 echo "${as_me:-configure}:8731: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8733 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8736 if test -n "$cf_new_extra_cppflags" ; then
8737 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8739 echo "${as_me:-configure}:8739: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8741 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8746 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8747 echo "$as_me:8747: checking if _XOPEN_SOURCE really is set" >&5
8748 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8749 cat >conftest.$ac_ext <<_ACEOF
8750 #line 8750 "configure"
8751 #include "confdefs.h"
8752 #include <stdlib.h>
8754 main ()
8757 #ifndef _XOPEN_SOURCE
8758 make an error
8759 #endif
8761 return 0;
8763 _ACEOF
8764 rm -f conftest.$ac_objext
8765 if { (eval echo "$as_me:8765: \"$ac_compile\"") >&5
8766 (eval $ac_compile) 2>&5
8767 ac_status=$?
8768 echo "$as_me:8768: \$? = $ac_status" >&5
8769 (exit $ac_status); } &&
8770 { ac_try='test -s conftest.$ac_objext'
8771 { (eval echo "$as_me:8771: \"$ac_try\"") >&5
8772 (eval $ac_try) 2>&5
8773 ac_status=$?
8774 echo "$as_me:8774: \$? = $ac_status" >&5
8775 (exit $ac_status); }; }; then
8776 cf_XOPEN_SOURCE_set=yes
8777 else
8778 echo "$as_me: failed program was:" >&5
8779 cat conftest.$ac_ext >&5
8780 cf_XOPEN_SOURCE_set=no
8782 rm -f conftest.$ac_objext conftest.$ac_ext
8783 echo "$as_me:8783: result: $cf_XOPEN_SOURCE_set" >&5
8784 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8785 if test $cf_XOPEN_SOURCE_set = yes
8786 then
8787 cat >conftest.$ac_ext <<_ACEOF
8788 #line 8788 "configure"
8789 #include "confdefs.h"
8790 #include <stdlib.h>
8792 main ()
8795 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8796 make an error
8797 #endif
8799 return 0;
8801 _ACEOF
8802 rm -f conftest.$ac_objext
8803 if { (eval echo "$as_me:8803: \"$ac_compile\"") >&5
8804 (eval $ac_compile) 2>&5
8805 ac_status=$?
8806 echo "$as_me:8806: \$? = $ac_status" >&5
8807 (exit $ac_status); } &&
8808 { ac_try='test -s conftest.$ac_objext'
8809 { (eval echo "$as_me:8809: \"$ac_try\"") >&5
8810 (eval $ac_try) 2>&5
8811 ac_status=$?
8812 echo "$as_me:8812: \$? = $ac_status" >&5
8813 (exit $ac_status); }; }; then
8814 cf_XOPEN_SOURCE_set_ok=yes
8815 else
8816 echo "$as_me: failed program was:" >&5
8817 cat conftest.$ac_ext >&5
8818 cf_XOPEN_SOURCE_set_ok=no
8820 rm -f conftest.$ac_objext conftest.$ac_ext
8821 if test $cf_XOPEN_SOURCE_set_ok = no
8822 then
8823 { echo "$as_me:8823: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8824 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8826 else
8828 echo "$as_me:8828: checking if we should define _XOPEN_SOURCE" >&5
8829 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8830 if test "${cf_cv_xopen_source+set}" = set; then
8831 echo $ECHO_N "(cached) $ECHO_C" >&6
8832 else
8834 cat >conftest.$ac_ext <<_ACEOF
8835 #line 8835 "configure"
8836 #include "confdefs.h"
8838 #include <stdlib.h>
8839 #include <string.h>
8840 #include <sys/types.h>
8843 main ()
8846 #ifndef _XOPEN_SOURCE
8847 make an error
8848 #endif
8850 return 0;
8852 _ACEOF
8853 rm -f conftest.$ac_objext
8854 if { (eval echo "$as_me:8854: \"$ac_compile\"") >&5
8855 (eval $ac_compile) 2>&5
8856 ac_status=$?
8857 echo "$as_me:8857: \$? = $ac_status" >&5
8858 (exit $ac_status); } &&
8859 { ac_try='test -s conftest.$ac_objext'
8860 { (eval echo "$as_me:8860: \"$ac_try\"") >&5
8861 (eval $ac_try) 2>&5
8862 ac_status=$?
8863 echo "$as_me:8863: \$? = $ac_status" >&5
8864 (exit $ac_status); }; }; then
8865 cf_cv_xopen_source=no
8866 else
8867 echo "$as_me: failed program was:" >&5
8868 cat conftest.$ac_ext >&5
8869 cf_save="$CPPFLAGS"
8870 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8871 cat >conftest.$ac_ext <<_ACEOF
8872 #line 8872 "configure"
8873 #include "confdefs.h"
8875 #include <stdlib.h>
8876 #include <string.h>
8877 #include <sys/types.h>
8880 main ()
8883 #ifdef _XOPEN_SOURCE
8884 make an error
8885 #endif
8887 return 0;
8889 _ACEOF
8890 rm -f conftest.$ac_objext
8891 if { (eval echo "$as_me:8891: \"$ac_compile\"") >&5
8892 (eval $ac_compile) 2>&5
8893 ac_status=$?
8894 echo "$as_me:8894: \$? = $ac_status" >&5
8895 (exit $ac_status); } &&
8896 { ac_try='test -s conftest.$ac_objext'
8897 { (eval echo "$as_me:8897: \"$ac_try\"") >&5
8898 (eval $ac_try) 2>&5
8899 ac_status=$?
8900 echo "$as_me:8900: \$? = $ac_status" >&5
8901 (exit $ac_status); }; }; then
8902 cf_cv_xopen_source=no
8903 else
8904 echo "$as_me: failed program was:" >&5
8905 cat conftest.$ac_ext >&5
8906 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8908 rm -f conftest.$ac_objext conftest.$ac_ext
8909 CPPFLAGS="$cf_save"
8912 rm -f conftest.$ac_objext conftest.$ac_ext
8915 echo "$as_me:8915: result: $cf_cv_xopen_source" >&5
8916 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8918 if test "$cf_cv_xopen_source" != no ; then
8920 CFLAGS=`echo "$CFLAGS" | \
8921 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8922 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
8924 CPPFLAGS=`echo "$CPPFLAGS" | \
8925 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8926 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
8928 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8930 cf_fix_cppflags=no
8931 cf_new_cflags=
8932 cf_new_cppflags=
8933 cf_new_extra_cppflags=
8935 for cf_add_cflags in $cf_temp_xopen_source
8937 case $cf_fix_cppflags in
8938 (no)
8939 case $cf_add_cflags in
8940 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8941 case $cf_add_cflags in
8942 (-D*)
8943 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8946 && test -z "${cf_tst_cflags}" \
8947 && cf_fix_cppflags=yes
8949 if test $cf_fix_cppflags = yes ; then
8950 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8951 continue
8952 elif test "${cf_tst_cflags}" = "\"'" ; then
8953 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8954 continue
8957 esac
8958 case "$CPPFLAGS" in
8959 (*$cf_add_cflags)
8962 case $cf_add_cflags in
8963 (-D*)
8964 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8966 CPPFLAGS=`echo "$CPPFLAGS" | \
8967 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8968 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8971 esac
8972 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8974 esac
8977 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8979 esac
8981 (yes)
8982 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8984 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8986 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8987 && test -z "${cf_tst_cflags}" \
8988 && cf_fix_cppflags=no
8990 esac
8991 done
8993 if test -n "$cf_new_cflags" ; then
8995 CFLAGS="$CFLAGS $cf_new_cflags"
8998 if test -n "$cf_new_cppflags" ; then
9000 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9003 if test -n "$cf_new_extra_cppflags" ; then
9005 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9013 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9015 # Work around breakage on OS X
9017 echo "$as_me:9017: checking if SIGWINCH is defined" >&5
9018 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9019 if test "${cf_cv_define_sigwinch+set}" = set; then
9020 echo $ECHO_N "(cached) $ECHO_C" >&6
9021 else
9023 cat >conftest.$ac_ext <<_ACEOF
9024 #line 9024 "configure"
9025 #include "confdefs.h"
9027 #include <sys/types.h>
9028 #include <sys/signal.h>
9031 main ()
9033 int x = SIGWINCH
9035 return 0;
9037 _ACEOF
9038 rm -f conftest.$ac_objext
9039 if { (eval echo "$as_me:9039: \"$ac_compile\"") >&5
9040 (eval $ac_compile) 2>&5
9041 ac_status=$?
9042 echo "$as_me:9042: \$? = $ac_status" >&5
9043 (exit $ac_status); } &&
9044 { ac_try='test -s conftest.$ac_objext'
9045 { (eval echo "$as_me:9045: \"$ac_try\"") >&5
9046 (eval $ac_try) 2>&5
9047 ac_status=$?
9048 echo "$as_me:9048: \$? = $ac_status" >&5
9049 (exit $ac_status); }; }; then
9050 cf_cv_define_sigwinch=yes
9051 else
9052 echo "$as_me: failed program was:" >&5
9053 cat conftest.$ac_ext >&5
9054 cat >conftest.$ac_ext <<_ACEOF
9055 #line 9055 "configure"
9056 #include "confdefs.h"
9058 #undef _XOPEN_SOURCE
9059 #undef _POSIX_SOURCE
9060 #undef _POSIX_C_SOURCE
9061 #include <sys/types.h>
9062 #include <sys/signal.h>
9065 main ()
9067 int x = SIGWINCH
9069 return 0;
9071 _ACEOF
9072 rm -f conftest.$ac_objext
9073 if { (eval echo "$as_me:9073: \"$ac_compile\"") >&5
9074 (eval $ac_compile) 2>&5
9075 ac_status=$?
9076 echo "$as_me:9076: \$? = $ac_status" >&5
9077 (exit $ac_status); } &&
9078 { ac_try='test -s conftest.$ac_objext'
9079 { (eval echo "$as_me:9079: \"$ac_try\"") >&5
9080 (eval $ac_try) 2>&5
9081 ac_status=$?
9082 echo "$as_me:9082: \$? = $ac_status" >&5
9083 (exit $ac_status); }; }; then
9084 cf_cv_define_sigwinch=maybe
9085 else
9086 echo "$as_me: failed program was:" >&5
9087 cat conftest.$ac_ext >&5
9088 cf_cv_define_sigwinch=no
9090 rm -f conftest.$ac_objext conftest.$ac_ext
9093 rm -f conftest.$ac_objext conftest.$ac_ext
9096 echo "$as_me:9096: result: $cf_cv_define_sigwinch" >&5
9097 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9099 if test "$cf_cv_define_sigwinch" = maybe ; then
9100 echo "$as_me:9100: checking for actual SIGWINCH definition" >&5
9101 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9102 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9103 echo $ECHO_N "(cached) $ECHO_C" >&6
9104 else
9106 cf_cv_fixup_sigwinch=unknown
9107 cf_sigwinch=32
9108 while test $cf_sigwinch != 1
9110 cat >conftest.$ac_ext <<_ACEOF
9111 #line 9111 "configure"
9112 #include "confdefs.h"
9114 #undef _XOPEN_SOURCE
9115 #undef _POSIX_SOURCE
9116 #undef _POSIX_C_SOURCE
9117 #include <sys/types.h>
9118 #include <sys/signal.h>
9121 main ()
9124 #if SIGWINCH != $cf_sigwinch
9125 make an error
9126 #endif
9127 int x = SIGWINCH
9129 return 0;
9131 _ACEOF
9132 rm -f conftest.$ac_objext
9133 if { (eval echo "$as_me:9133: \"$ac_compile\"") >&5
9134 (eval $ac_compile) 2>&5
9135 ac_status=$?
9136 echo "$as_me:9136: \$? = $ac_status" >&5
9137 (exit $ac_status); } &&
9138 { ac_try='test -s conftest.$ac_objext'
9139 { (eval echo "$as_me:9139: \"$ac_try\"") >&5
9140 (eval $ac_try) 2>&5
9141 ac_status=$?
9142 echo "$as_me:9142: \$? = $ac_status" >&5
9143 (exit $ac_status); }; }; then
9144 cf_cv_fixup_sigwinch=$cf_sigwinch
9145 break
9146 else
9147 echo "$as_me: failed program was:" >&5
9148 cat conftest.$ac_ext >&5
9150 rm -f conftest.$ac_objext conftest.$ac_ext
9152 cf_sigwinch=`expr $cf_sigwinch - 1`
9153 done
9156 echo "$as_me:9156: result: $cf_cv_fixup_sigwinch" >&5
9157 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9159 if test "$cf_cv_fixup_sigwinch" != unknown ; then
9160 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9164 # Checks for CODESET support.
9166 echo "$as_me:9166: checking for nl_langinfo and CODESET" >&5
9167 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9168 if test "${am_cv_langinfo_codeset+set}" = set; then
9169 echo $ECHO_N "(cached) $ECHO_C" >&6
9170 else
9171 cat >conftest.$ac_ext <<_ACEOF
9172 #line 9172 "configure"
9173 #include "confdefs.h"
9174 #include <langinfo.h>
9176 main ()
9178 char* cs = nl_langinfo(CODESET);
9180 return 0;
9182 _ACEOF
9183 rm -f conftest.$ac_objext conftest$ac_exeext
9184 if { (eval echo "$as_me:9184: \"$ac_link\"") >&5
9185 (eval $ac_link) 2>&5
9186 ac_status=$?
9187 echo "$as_me:9187: \$? = $ac_status" >&5
9188 (exit $ac_status); } &&
9189 { ac_try='test -s conftest$ac_exeext'
9190 { (eval echo "$as_me:9190: \"$ac_try\"") >&5
9191 (eval $ac_try) 2>&5
9192 ac_status=$?
9193 echo "$as_me:9193: \$? = $ac_status" >&5
9194 (exit $ac_status); }; }; then
9195 am_cv_langinfo_codeset=yes
9196 else
9197 echo "$as_me: failed program was:" >&5
9198 cat conftest.$ac_ext >&5
9199 am_cv_langinfo_codeset=no
9201 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9204 echo "$as_me:9204: result: $am_cv_langinfo_codeset" >&5
9205 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9206 if test $am_cv_langinfo_codeset = yes; then
9208 cat >>confdefs.h <<\EOF
9209 #define HAVE_LANGINFO_CODESET 1
9214 # use these variables to work around a defect in gcc's fixincludes.
9215 NCURSES_OK_WCHAR_T=
9216 NCURSES_OK_WINT_T=
9218 echo "$as_me:9218: checking if you want wide-character code" >&5
9219 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9221 # Check whether --enable-widec or --disable-widec was given.
9222 if test "${enable_widec+set}" = set; then
9223 enableval="$enable_widec"
9224 with_widec=$enableval
9225 else
9226 with_widec=no
9228 echo "$as_me:9228: result: $with_widec" >&5
9229 echo "${ECHO_T}$with_widec" >&6
9230 if test "x$with_widec" = xyes ; then
9231 if test "x$disable_lib_suffixes" = xno ; then
9232 LIB_SUFFIX="w${LIB_SUFFIX}"
9235 cat >>confdefs.h <<\EOF
9236 #define USE_WIDEC_SUPPORT 1
9239 cat >>confdefs.h <<\EOF
9240 #define NCURSES_WIDECHAR 1
9243 echo "$as_me:9243: checking if wchar.h can be used as is" >&5
9244 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9245 if test "${cf_cv_wchar_h_okay+set}" = set; then
9246 echo $ECHO_N "(cached) $ECHO_C" >&6
9247 else
9249 cat >conftest.$ac_ext <<_ACEOF
9250 #line 9250 "configure"
9251 #include "confdefs.h"
9253 #include <stdlib.h>
9254 #include <wchar.h>
9257 main ()
9260 wint_t foo = 0;
9261 int bar = iswpunct(foo)
9263 return 0;
9265 _ACEOF
9266 rm -f conftest.$ac_objext
9267 if { (eval echo "$as_me:9267: \"$ac_compile\"") >&5
9268 (eval $ac_compile) 2>&5
9269 ac_status=$?
9270 echo "$as_me:9270: \$? = $ac_status" >&5
9271 (exit $ac_status); } &&
9272 { ac_try='test -s conftest.$ac_objext'
9273 { (eval echo "$as_me:9273: \"$ac_try\"") >&5
9274 (eval $ac_try) 2>&5
9275 ac_status=$?
9276 echo "$as_me:9276: \$? = $ac_status" >&5
9277 (exit $ac_status); }; }; then
9278 cf_cv_wchar_h_okay=yes
9279 else
9280 echo "$as_me: failed program was:" >&5
9281 cat conftest.$ac_ext >&5
9282 cf_cv_wchar_h_okay=no
9284 rm -f conftest.$ac_objext conftest.$ac_ext
9286 echo "$as_me:9286: result: $cf_cv_wchar_h_okay" >&5
9287 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9289 if test $cf_cv_wchar_h_okay = no
9290 then
9292 echo "$as_me:9292: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9293 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9294 cat >conftest.$ac_ext <<_ACEOF
9295 #line 9295 "configure"
9296 #include "confdefs.h"
9297 #include <sys/types.h>
9300 main ()
9303 #ifndef _XOPEN_SOURCE_EXTENDED
9304 make an error
9305 #endif
9307 return 0;
9309 _ACEOF
9310 rm -f conftest.$ac_objext
9311 if { (eval echo "$as_me:9311: \"$ac_compile\"") >&5
9312 (eval $ac_compile) 2>&5
9313 ac_status=$?
9314 echo "$as_me:9314: \$? = $ac_status" >&5
9315 (exit $ac_status); } &&
9316 { ac_try='test -s conftest.$ac_objext'
9317 { (eval echo "$as_me:9317: \"$ac_try\"") >&5
9318 (eval $ac_try) 2>&5
9319 ac_status=$?
9320 echo "$as_me:9320: \$? = $ac_status" >&5
9321 (exit $ac_status); }; }; then
9322 cf_result=no
9323 else
9324 echo "$as_me: failed program was:" >&5
9325 cat conftest.$ac_ext >&5
9326 cf_result=yes
9328 rm -f conftest.$ac_objext conftest.$ac_ext
9329 echo "$as_me:9329: result: $cf_result" >&5
9330 echo "${ECHO_T}$cf_result" >&6
9332 if test "$cf_result" = yes ; then
9333 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9334 elif test "x" != "x" ; then
9335 echo "$as_me:9335: checking checking for compatible value versus " >&5
9336 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9337 cat >conftest.$ac_ext <<_ACEOF
9338 #line 9338 "configure"
9339 #include "confdefs.h"
9340 #include <sys/types.h>
9343 main ()
9346 #if _XOPEN_SOURCE_EXTENDED- < 0
9347 make an error
9348 #endif
9350 return 0;
9352 _ACEOF
9353 rm -f conftest.$ac_objext
9354 if { (eval echo "$as_me:9354: \"$ac_compile\"") >&5
9355 (eval $ac_compile) 2>&5
9356 ac_status=$?
9357 echo "$as_me:9357: \$? = $ac_status" >&5
9358 (exit $ac_status); } &&
9359 { ac_try='test -s conftest.$ac_objext'
9360 { (eval echo "$as_me:9360: \"$ac_try\"") >&5
9361 (eval $ac_try) 2>&5
9362 ac_status=$?
9363 echo "$as_me:9363: \$? = $ac_status" >&5
9364 (exit $ac_status); }; }; then
9365 cf_result=yes
9366 else
9367 echo "$as_me: failed program was:" >&5
9368 cat conftest.$ac_ext >&5
9369 cf_result=no
9371 rm -f conftest.$ac_objext conftest.$ac_ext
9372 echo "$as_me:9372: result: $cf_result" >&5
9373 echo "${ECHO_T}$cf_result" >&6
9374 if test "$cf_result" = no ; then
9375 # perhaps we can override it - try...
9376 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9382 # with_overwrite=no
9383 NCURSES_CH_T=cchar_t
9385 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9387 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9388 echo "$as_me:9388: checking for $ac_func" >&5
9389 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9390 if eval "test \"\${$as_ac_var+set}\" = set"; then
9391 echo $ECHO_N "(cached) $ECHO_C" >&6
9392 else
9393 cat >conftest.$ac_ext <<_ACEOF
9394 #line 9394 "configure"
9395 #include "confdefs.h"
9396 /* System header to define __stub macros and hopefully few prototypes,
9397 which can conflict with char $ac_func (); below. */
9398 #include <assert.h>
9399 /* Override any gcc2 internal prototype to avoid an error. */
9400 #ifdef __cplusplus
9401 extern "C"
9402 #endif
9403 /* We use char because int might match the return type of a gcc2
9404 builtin and then its argument prototype would still apply. */
9405 char $ac_func ();
9406 char (*f) ();
9409 main ()
9411 /* The GNU C library defines this for functions which it implements
9412 to always fail with ENOSYS. Some functions are actually named
9413 something starting with __ and the normal name is an alias. */
9414 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9415 choke me
9416 #else
9417 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9418 #endif
9421 return 0;
9423 _ACEOF
9424 rm -f conftest.$ac_objext conftest$ac_exeext
9425 if { (eval echo "$as_me:9425: \"$ac_link\"") >&5
9426 (eval $ac_link) 2>&5
9427 ac_status=$?
9428 echo "$as_me:9428: \$? = $ac_status" >&5
9429 (exit $ac_status); } &&
9430 { ac_try='test -s conftest$ac_exeext'
9431 { (eval echo "$as_me:9431: \"$ac_try\"") >&5
9432 (eval $ac_try) 2>&5
9433 ac_status=$?
9434 echo "$as_me:9434: \$? = $ac_status" >&5
9435 (exit $ac_status); }; }; then
9436 eval "$as_ac_var=yes"
9437 else
9438 echo "$as_me: failed program was:" >&5
9439 cat conftest.$ac_ext >&5
9440 eval "$as_ac_var=no"
9442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9444 echo "$as_me:9444: result: `eval echo '${'$as_ac_var'}'`" >&5
9445 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9446 if test `eval echo '${'$as_ac_var'}'` = yes; then
9447 cat >>confdefs.h <<EOF
9448 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9452 done
9454 if test "x$ac_cv_func_putwc" != xyes ; then
9456 echo "$as_me:9456: checking for multibyte character support" >&5
9457 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9458 if test "${cf_cv_utf8_lib+set}" = set; then
9459 echo $ECHO_N "(cached) $ECHO_C" >&6
9460 else
9462 cf_save_LIBS="$LIBS"
9463 cat >conftest.$ac_ext <<_ACEOF
9464 #line 9464 "configure"
9465 #include "confdefs.h"
9467 #include <stdlib.h>
9469 main ()
9471 putwc(0,0);
9473 return 0;
9475 _ACEOF
9476 rm -f conftest.$ac_objext conftest$ac_exeext
9477 if { (eval echo "$as_me:9477: \"$ac_link\"") >&5
9478 (eval $ac_link) 2>&5
9479 ac_status=$?
9480 echo "$as_me:9480: \$? = $ac_status" >&5
9481 (exit $ac_status); } &&
9482 { ac_try='test -s conftest$ac_exeext'
9483 { (eval echo "$as_me:9483: \"$ac_try\"") >&5
9484 (eval $ac_try) 2>&5
9485 ac_status=$?
9486 echo "$as_me:9486: \$? = $ac_status" >&5
9487 (exit $ac_status); }; }; then
9488 cf_cv_utf8_lib=yes
9489 else
9490 echo "$as_me: failed program was:" >&5
9491 cat conftest.$ac_ext >&5
9493 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9494 # will be set on completion of the AC_TRY_LINK below.
9495 cf_cv_header_path_utf8=
9496 cf_cv_library_path_utf8=
9498 echo "${as_me:-configure}:9498: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9500 cf_save_LIBS="$LIBS"
9502 cat >conftest.$ac_ext <<_ACEOF
9503 #line 9503 "configure"
9504 #include "confdefs.h"
9506 #include <libutf8.h>
9508 main ()
9510 putwc(0,0);
9512 return 0;
9514 _ACEOF
9515 rm -f conftest.$ac_objext conftest$ac_exeext
9516 if { (eval echo "$as_me:9516: \"$ac_link\"") >&5
9517 (eval $ac_link) 2>&5
9518 ac_status=$?
9519 echo "$as_me:9519: \$? = $ac_status" >&5
9520 (exit $ac_status); } &&
9521 { ac_try='test -s conftest$ac_exeext'
9522 { (eval echo "$as_me:9522: \"$ac_try\"") >&5
9523 (eval $ac_try) 2>&5
9524 ac_status=$?
9525 echo "$as_me:9525: \$? = $ac_status" >&5
9526 (exit $ac_status); }; }; then
9528 cf_cv_find_linkage_utf8=yes
9529 cf_cv_header_path_utf8=/usr/include
9530 cf_cv_library_path_utf8=/usr/lib
9532 else
9533 echo "$as_me: failed program was:" >&5
9534 cat conftest.$ac_ext >&5
9536 LIBS="-lutf8 $cf_save_LIBS"
9538 cat >conftest.$ac_ext <<_ACEOF
9539 #line 9539 "configure"
9540 #include "confdefs.h"
9542 #include <libutf8.h>
9544 main ()
9546 putwc(0,0);
9548 return 0;
9550 _ACEOF
9551 rm -f conftest.$ac_objext conftest$ac_exeext
9552 if { (eval echo "$as_me:9552: \"$ac_link\"") >&5
9553 (eval $ac_link) 2>&5
9554 ac_status=$?
9555 echo "$as_me:9555: \$? = $ac_status" >&5
9556 (exit $ac_status); } &&
9557 { ac_try='test -s conftest$ac_exeext'
9558 { (eval echo "$as_me:9558: \"$ac_try\"") >&5
9559 (eval $ac_try) 2>&5
9560 ac_status=$?
9561 echo "$as_me:9561: \$? = $ac_status" >&5
9562 (exit $ac_status); }; }; then
9564 cf_cv_find_linkage_utf8=yes
9565 cf_cv_header_path_utf8=/usr/include
9566 cf_cv_library_path_utf8=/usr/lib
9567 cf_cv_library_file_utf8="-lutf8"
9569 else
9570 echo "$as_me: failed program was:" >&5
9571 cat conftest.$ac_ext >&5
9573 cf_cv_find_linkage_utf8=no
9574 LIBS="$cf_save_LIBS"
9576 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
9578 echo "${as_me:-configure}:9578: testing find linkage for utf8 library ..." 1>&5
9580 echo "${as_me:-configure}:9580: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9582 cf_save_CPPFLAGS="$CPPFLAGS"
9583 cf_test_CPPFLAGS="$CPPFLAGS"
9585 cf_search=
9587 # collect the current set of include-directories from compiler flags
9588 cf_header_path_list=""
9589 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9590 for cf_header_path in $CPPFLAGS $CFLAGS
9592 case $cf_header_path in
9593 (-I*)
9594 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9596 test "x$cf_header_path" != "xNONE" && \
9597 test -d "$cf_header_path" && \
9599 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9600 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
9601 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
9602 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
9603 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
9604 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9607 cf_header_path_list="$cf_header_path_list $cf_search"
9609 esac
9610 done
9613 # add the variations for the package we are looking for
9615 cf_search=
9617 test "x$prefix" != "xNONE" && \
9618 test -d "$prefix" && \
9620 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9621 test -d $prefix/include && cf_search="$cf_search $prefix/include"
9622 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
9623 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
9624 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
9625 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
9628 for cf_subdir_prefix in \
9629 /usr \
9630 /usr/local \
9631 /usr/pkg \
9632 /opt \
9633 /opt/local \
9634 $HOME
9637 test "x$cf_subdir_prefix" != "x$prefix" && \
9638 test -d "$cf_subdir_prefix" && \
9639 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9640 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9641 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
9642 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9643 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9644 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9645 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9648 done
9650 test "$includedir" != NONE && \
9651 test "$includedir" != "/usr/include" && \
9652 test -d "$includedir" && {
9653 test -d $includedir && cf_search="$cf_search $includedir"
9654 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9657 test "$oldincludedir" != NONE && \
9658 test "$oldincludedir" != "/usr/include" && \
9659 test -d "$oldincludedir" && {
9660 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
9661 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9664 cf_search="$cf_search $cf_header_path_list"
9666 for cf_cv_header_path_utf8 in $cf_search
9668 if test -d $cf_cv_header_path_utf8 ; then
9669 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
9671 echo "${as_me:-configure}:9671: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9673 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9674 cat >conftest.$ac_ext <<_ACEOF
9675 #line 9675 "configure"
9676 #include "confdefs.h"
9678 #include <libutf8.h>
9680 main ()
9682 putwc(0,0);
9684 return 0;
9686 _ACEOF
9687 rm -f conftest.$ac_objext
9688 if { (eval echo "$as_me:9688: \"$ac_compile\"") >&5
9689 (eval $ac_compile) 2>&5
9690 ac_status=$?
9691 echo "$as_me:9691: \$? = $ac_status" >&5
9692 (exit $ac_status); } &&
9693 { ac_try='test -s conftest.$ac_objext'
9694 { (eval echo "$as_me:9694: \"$ac_try\"") >&5
9695 (eval $ac_try) 2>&5
9696 ac_status=$?
9697 echo "$as_me:9697: \$? = $ac_status" >&5
9698 (exit $ac_status); }; }; then
9700 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9702 echo "${as_me:-configure}:9702: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9704 cf_cv_find_linkage_utf8=maybe
9705 cf_test_CPPFLAGS="$CPPFLAGS"
9706 break
9707 else
9708 echo "$as_me: failed program was:" >&5
9709 cat conftest.$ac_ext >&5
9711 CPPFLAGS="$cf_save_CPPFLAGS"
9714 rm -f conftest.$ac_objext conftest.$ac_ext
9716 done
9718 if test "$cf_cv_find_linkage_utf8" = maybe ; then
9720 echo "${as_me:-configure}:9720: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9722 cf_save_LIBS="$LIBS"
9723 cf_save_LDFLAGS="$LDFLAGS"
9725 if test "$cf_cv_find_linkage_utf8" != yes ; then
9727 cf_search=
9728 cf_library_path_list=""
9729 if test -n "${LDFLAGS}${LIBS}" ; then
9730 for cf_library_path in $LDFLAGS $LIBS
9732 case $cf_library_path in
9733 (-L*)
9734 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9736 test "x$cf_library_path" != "xNONE" && \
9737 test -d "$cf_library_path" && \
9739 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9740 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9741 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
9742 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9743 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
9744 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9747 cf_library_path_list="$cf_library_path_list $cf_search"
9749 esac
9750 done
9753 cf_search=
9755 test "x$prefix" != "xNONE" && \
9756 test -d "$prefix" && \
9758 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9759 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9760 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
9761 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
9762 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
9763 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
9766 for cf_subdir_prefix in \
9767 /usr \
9768 /usr/local \
9769 /usr/pkg \
9770 /opt \
9771 /opt/local \
9772 $HOME
9775 test "x$cf_subdir_prefix" != "x$prefix" && \
9776 test -d "$cf_subdir_prefix" && \
9777 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9778 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9779 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9780 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9781 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9782 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9783 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9786 done
9788 cf_search="$cf_library_path_list $cf_search"
9790 for cf_cv_library_path_utf8 in $cf_search
9792 if test -d $cf_cv_library_path_utf8 ; then
9793 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
9795 echo "${as_me:-configure}:9795: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9797 CPPFLAGS="$cf_test_CPPFLAGS"
9798 LIBS="-lutf8 $cf_save_LIBS"
9799 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9800 cat >conftest.$ac_ext <<_ACEOF
9801 #line 9801 "configure"
9802 #include "confdefs.h"
9804 #include <libutf8.h>
9806 main ()
9808 putwc(0,0);
9810 return 0;
9812 _ACEOF
9813 rm -f conftest.$ac_objext conftest$ac_exeext
9814 if { (eval echo "$as_me:9814: \"$ac_link\"") >&5
9815 (eval $ac_link) 2>&5
9816 ac_status=$?
9817 echo "$as_me:9817: \$? = $ac_status" >&5
9818 (exit $ac_status); } &&
9819 { ac_try='test -s conftest$ac_exeext'
9820 { (eval echo "$as_me:9820: \"$ac_try\"") >&5
9821 (eval $ac_try) 2>&5
9822 ac_status=$?
9823 echo "$as_me:9823: \$? = $ac_status" >&5
9824 (exit $ac_status); }; }; then
9826 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9828 echo "${as_me:-configure}:9828: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9830 cf_cv_find_linkage_utf8=yes
9831 cf_cv_library_file_utf8="-lutf8"
9832 break
9833 else
9834 echo "$as_me: failed program was:" >&5
9835 cat conftest.$ac_ext >&5
9837 CPPFLAGS="$cf_save_CPPFLAGS"
9838 LIBS="$cf_save_LIBS"
9839 LDFLAGS="$cf_save_LDFLAGS"
9842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9844 done
9845 CPPFLAGS="$cf_save_CPPFLAGS"
9846 LDFLAGS="$cf_save_LDFLAGS"
9849 else
9850 cf_cv_find_linkage_utf8=no
9854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9859 LIBS="$cf_save_LIBS"
9861 if test "$cf_cv_find_linkage_utf8" = yes ; then
9862 cf_cv_utf8_lib=add-on
9863 else
9864 cf_cv_utf8_lib=no
9868 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9870 echo "$as_me:9870: result: $cf_cv_utf8_lib" >&5
9871 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9873 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9874 # ncurses/ncursesw:
9875 if test "$cf_cv_utf8_lib" = "add-on" ; then
9877 cat >>confdefs.h <<\EOF
9878 #define HAVE_LIBUTF8_H 1
9881 if test -n "$cf_cv_header_path_utf8" ; then
9882 for cf_add_incdir in $cf_cv_header_path_utf8
9884 while test $cf_add_incdir != /usr/include
9886 if test -d $cf_add_incdir
9887 then
9888 cf_have_incdir=no
9889 if test -n "$CFLAGS$CPPFLAGS" ; then
9890 # a loop is needed to ensure we can add subdirs of existing dirs
9891 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9892 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9893 cf_have_incdir=yes; break
9895 done
9898 if test "$cf_have_incdir" = no ; then
9899 if test "$cf_add_incdir" = /usr/local/include ; then
9900 if test "$GCC" = yes
9901 then
9902 cf_save_CPPFLAGS=$CPPFLAGS
9903 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9904 cat >conftest.$ac_ext <<_ACEOF
9905 #line 9905 "configure"
9906 #include "confdefs.h"
9907 #include <stdio.h>
9909 main ()
9911 printf("Hello")
9913 return 0;
9915 _ACEOF
9916 rm -f conftest.$ac_objext
9917 if { (eval echo "$as_me:9917: \"$ac_compile\"") >&5
9918 (eval $ac_compile) 2>&5
9919 ac_status=$?
9920 echo "$as_me:9920: \$? = $ac_status" >&5
9921 (exit $ac_status); } &&
9922 { ac_try='test -s conftest.$ac_objext'
9923 { (eval echo "$as_me:9923: \"$ac_try\"") >&5
9924 (eval $ac_try) 2>&5
9925 ac_status=$?
9926 echo "$as_me:9926: \$? = $ac_status" >&5
9927 (exit $ac_status); }; }; then
9929 else
9930 echo "$as_me: failed program was:" >&5
9931 cat conftest.$ac_ext >&5
9932 cf_have_incdir=yes
9934 rm -f conftest.$ac_objext conftest.$ac_ext
9935 CPPFLAGS=$cf_save_CPPFLAGS
9940 if test "$cf_have_incdir" = no ; then
9941 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9943 echo "${as_me:-configure}:9943: testing adding $cf_add_incdir to include-path ..." 1>&5
9945 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9947 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9948 test "$cf_top_incdir" = "$cf_add_incdir" && break
9949 cf_add_incdir="$cf_top_incdir"
9950 else
9951 break
9953 else
9954 break
9956 done
9957 done
9960 if test -n "$cf_cv_library_path_utf8" ; then
9961 for cf_add_libdir in $cf_cv_library_path_utf8
9963 if test $cf_add_libdir = /usr/lib ; then
9965 elif test -d $cf_add_libdir
9966 then
9967 cf_have_libdir=no
9968 if test -n "$LDFLAGS$LIBS" ; then
9969 # a loop is needed to ensure we can add subdirs of existing dirs
9970 for cf_test_libdir in $LDFLAGS $LIBS ; do
9971 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9972 cf_have_libdir=yes; break
9974 done
9976 if test "$cf_have_libdir" = no ; then
9977 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
9979 echo "${as_me:-configure}:9979: testing adding $cf_add_libdir to library-path ..." 1>&5
9981 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9984 done
9987 cf_add_libs="$cf_cv_library_file_utf8"
9988 # Filter out duplicates - this happens with badly-designed ".pc" files...
9989 for cf_add_1lib in $LIBS
9991 for cf_add_2lib in $cf_add_libs
9993 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9994 then
9995 cf_add_1lib=
9996 break
9998 done
9999 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10000 done
10001 LIBS="$cf_add_libs"
10005 if test "$cf_cv_utf8_lib" != no ; then
10006 NCURSES_LIBUTF8=1
10010 # This is needed on Tru64 5.0 to declare mbstate_t
10011 echo "$as_me:10011: checking if we must include wchar.h to declare mbstate_t" >&5
10012 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10013 if test "${cf_cv_mbstate_t+set}" = set; then
10014 echo $ECHO_N "(cached) $ECHO_C" >&6
10015 else
10017 cat >conftest.$ac_ext <<_ACEOF
10018 #line 10018 "configure"
10019 #include "confdefs.h"
10021 #include <stdlib.h>
10022 #include <stdarg.h>
10023 #include <stdio.h>
10024 #ifdef HAVE_LIBUTF8_H
10025 #include <libutf8.h>
10026 #endif
10028 main ()
10030 mbstate_t state
10032 return 0;
10034 _ACEOF
10035 rm -f conftest.$ac_objext
10036 if { (eval echo "$as_me:10036: \"$ac_compile\"") >&5
10037 (eval $ac_compile) 2>&5
10038 ac_status=$?
10039 echo "$as_me:10039: \$? = $ac_status" >&5
10040 (exit $ac_status); } &&
10041 { ac_try='test -s conftest.$ac_objext'
10042 { (eval echo "$as_me:10042: \"$ac_try\"") >&5
10043 (eval $ac_try) 2>&5
10044 ac_status=$?
10045 echo "$as_me:10045: \$? = $ac_status" >&5
10046 (exit $ac_status); }; }; then
10047 cf_cv_mbstate_t=no
10048 else
10049 echo "$as_me: failed program was:" >&5
10050 cat conftest.$ac_ext >&5
10051 cat >conftest.$ac_ext <<_ACEOF
10052 #line 10052 "configure"
10053 #include "confdefs.h"
10055 #include <stdlib.h>
10056 #include <stdarg.h>
10057 #include <stdio.h>
10058 #include <wchar.h>
10059 #ifdef HAVE_LIBUTF8_H
10060 #include <libutf8.h>
10061 #endif
10063 main ()
10065 mbstate_t value
10067 return 0;
10069 _ACEOF
10070 rm -f conftest.$ac_objext
10071 if { (eval echo "$as_me:10071: \"$ac_compile\"") >&5
10072 (eval $ac_compile) 2>&5
10073 ac_status=$?
10074 echo "$as_me:10074: \$? = $ac_status" >&5
10075 (exit $ac_status); } &&
10076 { ac_try='test -s conftest.$ac_objext'
10077 { (eval echo "$as_me:10077: \"$ac_try\"") >&5
10078 (eval $ac_try) 2>&5
10079 ac_status=$?
10080 echo "$as_me:10080: \$? = $ac_status" >&5
10081 (exit $ac_status); }; }; then
10082 cf_cv_mbstate_t=yes
10083 else
10084 echo "$as_me: failed program was:" >&5
10085 cat conftest.$ac_ext >&5
10086 cf_cv_mbstate_t=unknown
10088 rm -f conftest.$ac_objext conftest.$ac_ext
10090 rm -f conftest.$ac_objext conftest.$ac_ext
10092 echo "$as_me:10092: result: $cf_cv_mbstate_t" >&5
10093 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10095 if test "$cf_cv_mbstate_t" = yes ; then
10097 cat >>confdefs.h <<\EOF
10098 #define NEED_WCHAR_H 1
10101 NEED_WCHAR_H=1
10104 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10105 if test "$cf_cv_mbstate_t" = unknown ; then
10106 NCURSES_MBSTATE_T=1
10109 # This is needed on Tru64 5.0 to declare wchar_t
10110 echo "$as_me:10110: checking if we must include wchar.h to declare wchar_t" >&5
10111 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10112 if test "${cf_cv_wchar_t+set}" = set; then
10113 echo $ECHO_N "(cached) $ECHO_C" >&6
10114 else
10116 cat >conftest.$ac_ext <<_ACEOF
10117 #line 10117 "configure"
10118 #include "confdefs.h"
10120 #include <stdlib.h>
10121 #include <stdarg.h>
10122 #include <stdio.h>
10123 #ifdef HAVE_LIBUTF8_H
10124 #include <libutf8.h>
10125 #endif
10127 main ()
10129 wchar_t state
10131 return 0;
10133 _ACEOF
10134 rm -f conftest.$ac_objext
10135 if { (eval echo "$as_me:10135: \"$ac_compile\"") >&5
10136 (eval $ac_compile) 2>&5
10137 ac_status=$?
10138 echo "$as_me:10138: \$? = $ac_status" >&5
10139 (exit $ac_status); } &&
10140 { ac_try='test -s conftest.$ac_objext'
10141 { (eval echo "$as_me:10141: \"$ac_try\"") >&5
10142 (eval $ac_try) 2>&5
10143 ac_status=$?
10144 echo "$as_me:10144: \$? = $ac_status" >&5
10145 (exit $ac_status); }; }; then
10146 cf_cv_wchar_t=no
10147 else
10148 echo "$as_me: failed program was:" >&5
10149 cat conftest.$ac_ext >&5
10150 cat >conftest.$ac_ext <<_ACEOF
10151 #line 10151 "configure"
10152 #include "confdefs.h"
10154 #include <stdlib.h>
10155 #include <stdarg.h>
10156 #include <stdio.h>
10157 #include <wchar.h>
10158 #ifdef HAVE_LIBUTF8_H
10159 #include <libutf8.h>
10160 #endif
10162 main ()
10164 wchar_t value
10166 return 0;
10168 _ACEOF
10169 rm -f conftest.$ac_objext
10170 if { (eval echo "$as_me:10170: \"$ac_compile\"") >&5
10171 (eval $ac_compile) 2>&5
10172 ac_status=$?
10173 echo "$as_me:10173: \$? = $ac_status" >&5
10174 (exit $ac_status); } &&
10175 { ac_try='test -s conftest.$ac_objext'
10176 { (eval echo "$as_me:10176: \"$ac_try\"") >&5
10177 (eval $ac_try) 2>&5
10178 ac_status=$?
10179 echo "$as_me:10179: \$? = $ac_status" >&5
10180 (exit $ac_status); }; }; then
10181 cf_cv_wchar_t=yes
10182 else
10183 echo "$as_me: failed program was:" >&5
10184 cat conftest.$ac_ext >&5
10185 cf_cv_wchar_t=unknown
10187 rm -f conftest.$ac_objext conftest.$ac_ext
10189 rm -f conftest.$ac_objext conftest.$ac_ext
10191 echo "$as_me:10191: result: $cf_cv_wchar_t" >&5
10192 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10194 if test "$cf_cv_wchar_t" = yes ; then
10196 cat >>confdefs.h <<\EOF
10197 #define NEED_WCHAR_H 1
10200 NEED_WCHAR_H=1
10203 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10204 if test "$cf_cv_wchar_t" = unknown ; then
10205 NCURSES_WCHAR_T=1
10208 # if we find wchar_t in either place, use substitution to provide a fallback.
10209 if test "$cf_cv_wchar_t" != unknown ; then
10210 NCURSES_OK_WCHAR_T=1
10213 # This is needed on Tru64 5.0 to declare wint_t
10214 echo "$as_me:10214: checking if we must include wchar.h to declare wint_t" >&5
10215 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10216 if test "${cf_cv_wint_t+set}" = set; then
10217 echo $ECHO_N "(cached) $ECHO_C" >&6
10218 else
10220 cat >conftest.$ac_ext <<_ACEOF
10221 #line 10221 "configure"
10222 #include "confdefs.h"
10224 #include <stdlib.h>
10225 #include <stdarg.h>
10226 #include <stdio.h>
10227 #ifdef HAVE_LIBUTF8_H
10228 #include <libutf8.h>
10229 #endif
10231 main ()
10233 wint_t state
10235 return 0;
10237 _ACEOF
10238 rm -f conftest.$ac_objext
10239 if { (eval echo "$as_me:10239: \"$ac_compile\"") >&5
10240 (eval $ac_compile) 2>&5
10241 ac_status=$?
10242 echo "$as_me:10242: \$? = $ac_status" >&5
10243 (exit $ac_status); } &&
10244 { ac_try='test -s conftest.$ac_objext'
10245 { (eval echo "$as_me:10245: \"$ac_try\"") >&5
10246 (eval $ac_try) 2>&5
10247 ac_status=$?
10248 echo "$as_me:10248: \$? = $ac_status" >&5
10249 (exit $ac_status); }; }; then
10250 cf_cv_wint_t=no
10251 else
10252 echo "$as_me: failed program was:" >&5
10253 cat conftest.$ac_ext >&5
10254 cat >conftest.$ac_ext <<_ACEOF
10255 #line 10255 "configure"
10256 #include "confdefs.h"
10258 #include <stdlib.h>
10259 #include <stdarg.h>
10260 #include <stdio.h>
10261 #include <wchar.h>
10262 #ifdef HAVE_LIBUTF8_H
10263 #include <libutf8.h>
10264 #endif
10266 main ()
10268 wint_t value
10270 return 0;
10272 _ACEOF
10273 rm -f conftest.$ac_objext
10274 if { (eval echo "$as_me:10274: \"$ac_compile\"") >&5
10275 (eval $ac_compile) 2>&5
10276 ac_status=$?
10277 echo "$as_me:10277: \$? = $ac_status" >&5
10278 (exit $ac_status); } &&
10279 { ac_try='test -s conftest.$ac_objext'
10280 { (eval echo "$as_me:10280: \"$ac_try\"") >&5
10281 (eval $ac_try) 2>&5
10282 ac_status=$?
10283 echo "$as_me:10283: \$? = $ac_status" >&5
10284 (exit $ac_status); }; }; then
10285 cf_cv_wint_t=yes
10286 else
10287 echo "$as_me: failed program was:" >&5
10288 cat conftest.$ac_ext >&5
10289 cf_cv_wint_t=unknown
10291 rm -f conftest.$ac_objext conftest.$ac_ext
10293 rm -f conftest.$ac_objext conftest.$ac_ext
10295 echo "$as_me:10295: result: $cf_cv_wint_t" >&5
10296 echo "${ECHO_T}$cf_cv_wint_t" >&6
10298 if test "$cf_cv_wint_t" = yes ; then
10300 cat >>confdefs.h <<\EOF
10301 #define NEED_WCHAR_H 1
10304 NEED_WCHAR_H=1
10307 # if we do not find wint_t in either place, use substitution to provide a fallback.
10308 if test "$cf_cv_wint_t" = unknown ; then
10309 NCURSES_WINT_T=1
10312 # if we find wint_t in either place, use substitution to provide a fallback.
10313 if test "$cf_cv_wint_t" != unknown ; then
10314 NCURSES_OK_WINT_T=1
10317 if test "$NCURSES_MBSTATE_T" != 0; then
10319 cat >>confdefs.h <<\EOF
10320 #define NEED_MBSTATE_T_DEF 1
10326 ### use option --disable-lp64 to allow long chtype
10327 echo "$as_me:10327: checking whether to enable _LP64 definition in curses.h" >&5
10328 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10330 # Check whether --enable-lp64 or --disable-lp64 was given.
10331 if test "${enable_lp64+set}" = set; then
10332 enableval="$enable_lp64"
10333 with_lp64=$enableval
10334 else
10335 with_lp64=$cf_dft_with_lp64
10337 echo "$as_me:10337: result: $with_lp64" >&5
10338 echo "${ECHO_T}$with_lp64" >&6
10340 if test "x$with_lp64" = xyes ; then
10341 cf_cv_enable_lp64=1
10342 else
10343 cf_cv_enable_lp64=0
10346 # Check whether --enable-largefile or --disable-largefile was given.
10347 if test "${enable_largefile+set}" = set; then
10348 enableval="$enable_largefile"
10351 if test "$enable_largefile" != no; then
10353 echo "$as_me:10353: checking for special C compiler options needed for large files" >&5
10354 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10355 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10356 echo $ECHO_N "(cached) $ECHO_C" >&6
10357 else
10358 ac_cv_sys_largefile_CC=no
10359 if test "$GCC" != yes; then
10360 ac_save_CC=$CC
10361 while :; do
10362 # IRIX 6.2 and later do not support large files by default,
10363 # so use the C compiler's -n32 option if that helps.
10364 cat >conftest.$ac_ext <<_ACEOF
10365 #line 10365 "configure"
10366 #include "confdefs.h"
10367 #include <sys/types.h>
10368 /* Check that off_t can represent 2**63 - 1 correctly.
10369 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10370 since some C++ compilers masquerading as C compilers
10371 incorrectly reject 9223372036854775807. */
10372 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10373 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10374 && LARGE_OFF_T % 2147483647 == 1)
10375 ? 1 : -1];
10377 main ()
10381 return 0;
10383 _ACEOF
10384 rm -f conftest.$ac_objext
10385 if { (eval echo "$as_me:10385: \"$ac_compile\"") >&5
10386 (eval $ac_compile) 2>&5
10387 ac_status=$?
10388 echo "$as_me:10388: \$? = $ac_status" >&5
10389 (exit $ac_status); } &&
10390 { ac_try='test -s conftest.$ac_objext'
10391 { (eval echo "$as_me:10391: \"$ac_try\"") >&5
10392 (eval $ac_try) 2>&5
10393 ac_status=$?
10394 echo "$as_me:10394: \$? = $ac_status" >&5
10395 (exit $ac_status); }; }; then
10396 break
10397 else
10398 echo "$as_me: failed program was:" >&5
10399 cat conftest.$ac_ext >&5
10401 rm -f conftest.$ac_objext
10402 CC="$CC -n32"
10403 rm -f conftest.$ac_objext
10404 if { (eval echo "$as_me:10404: \"$ac_compile\"") >&5
10405 (eval $ac_compile) 2>&5
10406 ac_status=$?
10407 echo "$as_me:10407: \$? = $ac_status" >&5
10408 (exit $ac_status); } &&
10409 { ac_try='test -s conftest.$ac_objext'
10410 { (eval echo "$as_me:10410: \"$ac_try\"") >&5
10411 (eval $ac_try) 2>&5
10412 ac_status=$?
10413 echo "$as_me:10413: \$? = $ac_status" >&5
10414 (exit $ac_status); }; }; then
10415 ac_cv_sys_largefile_CC=' -n32'; break
10416 else
10417 echo "$as_me: failed program was:" >&5
10418 cat conftest.$ac_ext >&5
10420 rm -f conftest.$ac_objext
10421 break
10422 done
10423 CC=$ac_save_CC
10424 rm -f conftest.$ac_ext
10427 echo "$as_me:10427: result: $ac_cv_sys_largefile_CC" >&5
10428 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10429 if test "$ac_cv_sys_largefile_CC" != no; then
10430 CC=$CC$ac_cv_sys_largefile_CC
10433 echo "$as_me:10433: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10434 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10435 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10436 echo $ECHO_N "(cached) $ECHO_C" >&6
10437 else
10438 while :; do
10439 ac_cv_sys_file_offset_bits=no
10440 cat >conftest.$ac_ext <<_ACEOF
10441 #line 10441 "configure"
10442 #include "confdefs.h"
10443 #include <sys/types.h>
10444 /* Check that off_t can represent 2**63 - 1 correctly.
10445 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10446 since some C++ compilers masquerading as C compilers
10447 incorrectly reject 9223372036854775807. */
10448 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10449 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10450 && LARGE_OFF_T % 2147483647 == 1)
10451 ? 1 : -1];
10453 main ()
10457 return 0;
10459 _ACEOF
10460 rm -f conftest.$ac_objext
10461 if { (eval echo "$as_me:10461: \"$ac_compile\"") >&5
10462 (eval $ac_compile) 2>&5
10463 ac_status=$?
10464 echo "$as_me:10464: \$? = $ac_status" >&5
10465 (exit $ac_status); } &&
10466 { ac_try='test -s conftest.$ac_objext'
10467 { (eval echo "$as_me:10467: \"$ac_try\"") >&5
10468 (eval $ac_try) 2>&5
10469 ac_status=$?
10470 echo "$as_me:10470: \$? = $ac_status" >&5
10471 (exit $ac_status); }; }; then
10472 break
10473 else
10474 echo "$as_me: failed program was:" >&5
10475 cat conftest.$ac_ext >&5
10477 rm -f conftest.$ac_objext conftest.$ac_ext
10478 cat >conftest.$ac_ext <<_ACEOF
10479 #line 10479 "configure"
10480 #include "confdefs.h"
10481 #define _FILE_OFFSET_BITS 64
10482 #include <sys/types.h>
10483 /* Check that off_t can represent 2**63 - 1 correctly.
10484 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10485 since some C++ compilers masquerading as C compilers
10486 incorrectly reject 9223372036854775807. */
10487 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10488 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10489 && LARGE_OFF_T % 2147483647 == 1)
10490 ? 1 : -1];
10492 main ()
10496 return 0;
10498 _ACEOF
10499 rm -f conftest.$ac_objext
10500 if { (eval echo "$as_me:10500: \"$ac_compile\"") >&5
10501 (eval $ac_compile) 2>&5
10502 ac_status=$?
10503 echo "$as_me:10503: \$? = $ac_status" >&5
10504 (exit $ac_status); } &&
10505 { ac_try='test -s conftest.$ac_objext'
10506 { (eval echo "$as_me:10506: \"$ac_try\"") >&5
10507 (eval $ac_try) 2>&5
10508 ac_status=$?
10509 echo "$as_me:10509: \$? = $ac_status" >&5
10510 (exit $ac_status); }; }; then
10511 ac_cv_sys_file_offset_bits=64; break
10512 else
10513 echo "$as_me: failed program was:" >&5
10514 cat conftest.$ac_ext >&5
10516 rm -f conftest.$ac_objext conftest.$ac_ext
10517 break
10518 done
10520 echo "$as_me:10520: result: $ac_cv_sys_file_offset_bits" >&5
10521 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10522 if test "$ac_cv_sys_file_offset_bits" != no; then
10524 cat >>confdefs.h <<EOF
10525 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10529 rm -rf conftest*
10530 echo "$as_me:10530: checking for _LARGE_FILES value needed for large files" >&5
10531 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10532 if test "${ac_cv_sys_large_files+set}" = set; then
10533 echo $ECHO_N "(cached) $ECHO_C" >&6
10534 else
10535 while :; do
10536 ac_cv_sys_large_files=no
10537 cat >conftest.$ac_ext <<_ACEOF
10538 #line 10538 "configure"
10539 #include "confdefs.h"
10540 #include <sys/types.h>
10541 /* Check that off_t can represent 2**63 - 1 correctly.
10542 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10543 since some C++ compilers masquerading as C compilers
10544 incorrectly reject 9223372036854775807. */
10545 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10546 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10547 && LARGE_OFF_T % 2147483647 == 1)
10548 ? 1 : -1];
10550 main ()
10554 return 0;
10556 _ACEOF
10557 rm -f conftest.$ac_objext
10558 if { (eval echo "$as_me:10558: \"$ac_compile\"") >&5
10559 (eval $ac_compile) 2>&5
10560 ac_status=$?
10561 echo "$as_me:10561: \$? = $ac_status" >&5
10562 (exit $ac_status); } &&
10563 { ac_try='test -s conftest.$ac_objext'
10564 { (eval echo "$as_me:10564: \"$ac_try\"") >&5
10565 (eval $ac_try) 2>&5
10566 ac_status=$?
10567 echo "$as_me:10567: \$? = $ac_status" >&5
10568 (exit $ac_status); }; }; then
10569 break
10570 else
10571 echo "$as_me: failed program was:" >&5
10572 cat conftest.$ac_ext >&5
10574 rm -f conftest.$ac_objext conftest.$ac_ext
10575 cat >conftest.$ac_ext <<_ACEOF
10576 #line 10576 "configure"
10577 #include "confdefs.h"
10578 #define _LARGE_FILES 1
10579 #include <sys/types.h>
10580 /* Check that off_t can represent 2**63 - 1 correctly.
10581 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10582 since some C++ compilers masquerading as C compilers
10583 incorrectly reject 9223372036854775807. */
10584 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10585 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10586 && LARGE_OFF_T % 2147483647 == 1)
10587 ? 1 : -1];
10589 main ()
10593 return 0;
10595 _ACEOF
10596 rm -f conftest.$ac_objext
10597 if { (eval echo "$as_me:10597: \"$ac_compile\"") >&5
10598 (eval $ac_compile) 2>&5
10599 ac_status=$?
10600 echo "$as_me:10600: \$? = $ac_status" >&5
10601 (exit $ac_status); } &&
10602 { ac_try='test -s conftest.$ac_objext'
10603 { (eval echo "$as_me:10603: \"$ac_try\"") >&5
10604 (eval $ac_try) 2>&5
10605 ac_status=$?
10606 echo "$as_me:10606: \$? = $ac_status" >&5
10607 (exit $ac_status); }; }; then
10608 ac_cv_sys_large_files=1; break
10609 else
10610 echo "$as_me: failed program was:" >&5
10611 cat conftest.$ac_ext >&5
10613 rm -f conftest.$ac_objext conftest.$ac_ext
10614 break
10615 done
10617 echo "$as_me:10617: result: $ac_cv_sys_large_files" >&5
10618 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10619 if test "$ac_cv_sys_large_files" != no; then
10621 cat >>confdefs.h <<EOF
10622 #define _LARGE_FILES $ac_cv_sys_large_files
10626 rm -rf conftest*
10629 if test "$enable_largefile" != no ; then
10630 echo "$as_me:10630: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10631 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10632 if test "${ac_cv_sys_largefile_source+set}" = set; then
10633 echo $ECHO_N "(cached) $ECHO_C" >&6
10634 else
10635 while :; do
10636 ac_cv_sys_largefile_source=no
10637 cat >conftest.$ac_ext <<_ACEOF
10638 #line 10638 "configure"
10639 #include "confdefs.h"
10640 #include <stdio.h>
10642 main ()
10644 return !fseeko;
10646 return 0;
10648 _ACEOF
10649 rm -f conftest.$ac_objext
10650 if { (eval echo "$as_me:10650: \"$ac_compile\"") >&5
10651 (eval $ac_compile) 2>&5
10652 ac_status=$?
10653 echo "$as_me:10653: \$? = $ac_status" >&5
10654 (exit $ac_status); } &&
10655 { ac_try='test -s conftest.$ac_objext'
10656 { (eval echo "$as_me:10656: \"$ac_try\"") >&5
10657 (eval $ac_try) 2>&5
10658 ac_status=$?
10659 echo "$as_me:10659: \$? = $ac_status" >&5
10660 (exit $ac_status); }; }; then
10661 break
10662 else
10663 echo "$as_me: failed program was:" >&5
10664 cat conftest.$ac_ext >&5
10666 rm -f conftest.$ac_objext conftest.$ac_ext
10667 cat >conftest.$ac_ext <<_ACEOF
10668 #line 10668 "configure"
10669 #include "confdefs.h"
10670 #define _LARGEFILE_SOURCE 1
10671 #include <stdio.h>
10673 main ()
10675 return !fseeko;
10677 return 0;
10679 _ACEOF
10680 rm -f conftest.$ac_objext
10681 if { (eval echo "$as_me:10681: \"$ac_compile\"") >&5
10682 (eval $ac_compile) 2>&5
10683 ac_status=$?
10684 echo "$as_me:10684: \$? = $ac_status" >&5
10685 (exit $ac_status); } &&
10686 { ac_try='test -s conftest.$ac_objext'
10687 { (eval echo "$as_me:10687: \"$ac_try\"") >&5
10688 (eval $ac_try) 2>&5
10689 ac_status=$?
10690 echo "$as_me:10690: \$? = $ac_status" >&5
10691 (exit $ac_status); }; }; then
10692 ac_cv_sys_largefile_source=1; break
10693 else
10694 echo "$as_me: failed program was:" >&5
10695 cat conftest.$ac_ext >&5
10697 rm -f conftest.$ac_objext conftest.$ac_ext
10698 break
10699 done
10701 echo "$as_me:10701: result: $ac_cv_sys_largefile_source" >&5
10702 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10703 if test "$ac_cv_sys_largefile_source" != no; then
10705 cat >>confdefs.h <<EOF
10706 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10710 rm -rf conftest*
10712 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10713 # in glibc 2.1.3, but that breaks too many other things.
10714 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10715 echo "$as_me:10715: checking for fseeko" >&5
10716 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10717 if test "${ac_cv_func_fseeko+set}" = set; then
10718 echo $ECHO_N "(cached) $ECHO_C" >&6
10719 else
10720 cat >conftest.$ac_ext <<_ACEOF
10721 #line 10721 "configure"
10722 #include "confdefs.h"
10723 #include <stdio.h>
10725 main ()
10727 return fseeko && fseeko (stdin, 0, 0);
10729 return 0;
10731 _ACEOF
10732 rm -f conftest.$ac_objext conftest$ac_exeext
10733 if { (eval echo "$as_me:10733: \"$ac_link\"") >&5
10734 (eval $ac_link) 2>&5
10735 ac_status=$?
10736 echo "$as_me:10736: \$? = $ac_status" >&5
10737 (exit $ac_status); } &&
10738 { ac_try='test -s conftest$ac_exeext'
10739 { (eval echo "$as_me:10739: \"$ac_try\"") >&5
10740 (eval $ac_try) 2>&5
10741 ac_status=$?
10742 echo "$as_me:10742: \$? = $ac_status" >&5
10743 (exit $ac_status); }; }; then
10744 ac_cv_func_fseeko=yes
10745 else
10746 echo "$as_me: failed program was:" >&5
10747 cat conftest.$ac_ext >&5
10748 ac_cv_func_fseeko=no
10750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10752 echo "$as_me:10752: result: $ac_cv_func_fseeko" >&5
10753 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10754 if test $ac_cv_func_fseeko = yes; then
10756 cat >>confdefs.h <<\EOF
10757 #define HAVE_FSEEKO 1
10762 # Normally we would collect these definitions in the config.h,
10763 # but (like _XOPEN_SOURCE), some environments rely on having these
10764 # defined before any of the system headers are included. Another
10765 # case comes up with C++, e.g., on AIX the compiler compiles the
10766 # header files by themselves before looking at the body files it is
10767 # told to compile. For ncurses, those header files do not include
10768 # the config.h
10769 test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10770 test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10771 test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10773 echo "$as_me:10773: checking whether to use struct dirent64" >&5
10774 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10775 if test "${cf_cv_struct_dirent64+set}" = set; then
10776 echo $ECHO_N "(cached) $ECHO_C" >&6
10777 else
10779 cat >conftest.$ac_ext <<_ACEOF
10780 #line 10780 "configure"
10781 #include "confdefs.h"
10783 #include <sys/types.h>
10784 #include <dirent.h>
10787 main ()
10790 /* if transitional largefile support is setup, this is true */
10791 extern struct dirent64 * readdir(DIR *);
10792 struct dirent64 *x = readdir((DIR *)0);
10793 struct dirent *y = readdir((DIR *)0);
10794 int z = x - y;
10797 return 0;
10799 _ACEOF
10800 rm -f conftest.$ac_objext
10801 if { (eval echo "$as_me:10801: \"$ac_compile\"") >&5
10802 (eval $ac_compile) 2>&5
10803 ac_status=$?
10804 echo "$as_me:10804: \$? = $ac_status" >&5
10805 (exit $ac_status); } &&
10806 { ac_try='test -s conftest.$ac_objext'
10807 { (eval echo "$as_me:10807: \"$ac_try\"") >&5
10808 (eval $ac_try) 2>&5
10809 ac_status=$?
10810 echo "$as_me:10810: \$? = $ac_status" >&5
10811 (exit $ac_status); }; }; then
10812 cf_cv_struct_dirent64=yes
10813 else
10814 echo "$as_me: failed program was:" >&5
10815 cat conftest.$ac_ext >&5
10816 cf_cv_struct_dirent64=no
10818 rm -f conftest.$ac_objext conftest.$ac_ext
10821 echo "$as_me:10821: result: $cf_cv_struct_dirent64" >&5
10822 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10823 test "$cf_cv_struct_dirent64" = yes &&
10824 cat >>confdefs.h <<\EOF
10825 #define HAVE_STRUCT_DIRENT64 1
10830 ### use option --disable-tparm-varargs to make tparm() conform to X/Open
10831 echo "$as_me:10831: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10832 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10834 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10835 if test "${enable_tparm_varargs+set}" = set; then
10836 enableval="$enable_tparm_varargs"
10837 with_tparm_varargs=$enableval
10838 else
10839 with_tparm_varargs=yes
10841 echo "$as_me:10841: result: $with_tparm_varargs" >&5
10842 echo "${ECHO_T}$with_tparm_varargs" >&6
10843 NCURSES_TPARM_VARARGS=0
10844 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10846 ### use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10847 if test "$with_ticlib" != no ; then
10848 echo "$as_me:10848: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10849 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10851 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10852 if test "${enable_tic_depends+set}" = set; then
10853 enableval="$enable_tic_depends"
10854 with_tic_depends=$enableval
10855 else
10856 with_tic_depends=yes
10858 echo "$as_me:10858: result: $with_tic_depends" >&5
10859 echo "${ECHO_T}$with_tic_depends" >&6
10860 else
10861 with_tic_depends=no
10864 ### use option --with-bool to override bool's type
10865 echo "$as_me:10865: checking for type of bool" >&5
10866 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10868 # Check whether --with-bool or --without-bool was given.
10869 if test "${with_bool+set}" = set; then
10870 withval="$with_bool"
10871 NCURSES_BOOL="$withval"
10872 else
10873 NCURSES_BOOL=auto
10875 echo "$as_me:10875: result: $NCURSES_BOOL" >&5
10876 echo "${ECHO_T}$NCURSES_BOOL" >&6
10878 echo "$as_me:10878: checking for alternate terminal capabilities file" >&5
10879 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10881 # Check whether --with-caps or --without-caps was given.
10882 if test "${with_caps+set}" = set; then
10883 withval="$with_caps"
10884 TERMINFO_CAPS=Caps.$withval
10885 else
10886 TERMINFO_CAPS=Caps
10888 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10889 echo "$as_me:10889: result: $TERMINFO_CAPS" >&5
10890 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10892 ### use option --with-chtype to override chtype's type
10893 echo "$as_me:10893: checking for type of chtype" >&5
10894 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10896 # Check whether --with-chtype or --without-chtype was given.
10897 if test "${with_chtype+set}" = set; then
10898 withval="$with_chtype"
10899 NCURSES_CHTYPE="$withval"
10900 else
10901 NCURSES_CHTYPE=$cf_dft_chtype
10903 echo "$as_me:10903: result: $NCURSES_CHTYPE" >&5
10904 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10906 ### use option --with-ospeed to override ospeed's type
10907 echo "$as_me:10907: checking for type of ospeed" >&5
10908 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10910 # Check whether --with-ospeed or --without-ospeed was given.
10911 if test "${with_ospeed+set}" = set; then
10912 withval="$with_ospeed"
10913 NCURSES_OSPEED="$withval"
10914 else
10915 NCURSES_OSPEED=short
10917 echo "$as_me:10917: result: $NCURSES_OSPEED" >&5
10918 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10920 ### use option --with-mmask-t to override mmask_t's type
10921 echo "$as_me:10921: checking for type of mmask_t" >&5
10922 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10924 # Check whether --with-mmask-t or --without-mmask-t was given.
10925 if test "${with_mmask_t+set}" = set; then
10926 withval="$with_mmask_t"
10927 NCURSES_MMASK_T="$withval"
10928 else
10929 NCURSES_MMASK_T=$cf_dft_mmask_t
10931 echo "$as_me:10931: result: $NCURSES_MMASK_T" >&5
10932 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10934 ### use option --with-ccharw-max to override CCHARW_MAX size
10935 echo "$as_me:10935: checking for size CCHARW_MAX" >&5
10936 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10938 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10939 if test "${with_ccharw_max+set}" = set; then
10940 withval="$with_ccharw_max"
10941 NCURSES_CCHARW_MAX="$withval"
10942 else
10943 NCURSES_CCHARW_MAX=5
10945 echo "$as_me:10945: result: $NCURSES_CCHARW_MAX" >&5
10946 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10948 ### use option --with-tparm-arg to override tparm's argument type
10949 echo "$as_me:10949: checking for type of tparm args" >&5
10950 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10952 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10953 if test "${with_tparm_arg+set}" = set; then
10954 withval="$with_tparm_arg"
10955 NCURSES_TPARM_ARG="$withval"
10956 else
10957 NCURSES_TPARM_ARG=$cf_dft_tparm_arg
10959 echo "$as_me:10959: result: $NCURSES_TPARM_ARG" >&5
10960 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10962 ### Enable compiling-in rcs id's
10963 echo "$as_me:10963: checking if RCS identifiers should be compiled-in" >&5
10964 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10966 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10967 if test "${with_rcs_ids+set}" = set; then
10968 withval="$with_rcs_ids"
10969 with_rcs_ids=$withval
10970 else
10971 with_rcs_ids=no
10973 echo "$as_me:10973: result: $with_rcs_ids" >&5
10974 echo "${ECHO_T}$with_rcs_ids" >&6
10975 test "x$with_rcs_ids" = xyes &&
10976 cat >>confdefs.h <<\EOF
10977 #define USE_RCS_IDS 1
10980 ###############################################################################
10982 echo "$as_me:10982: checking format of man-pages" >&5
10983 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10985 # Check whether --with-manpage-format or --without-manpage-format was given.
10986 if test "${with_manpage_format+set}" = set; then
10987 withval="$with_manpage_format"
10988 MANPAGE_FORMAT=$withval
10989 else
10990 MANPAGE_FORMAT=unknown
10993 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10994 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10996 cf_unknown=
10998 case $MANPAGE_FORMAT in
10999 (unknown)
11000 if test -z "$MANPATH" ; then
11001 MANPATH="/usr/man:/usr/share/man"
11004 # look for the 'date' man-page (it's most likely to be installed!)
11005 MANPAGE_FORMAT=
11006 cf_preform=no
11007 cf_catonly=yes
11008 cf_example=date
11010 IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11011 for cf_dir in $MANPATH; do
11012 test -z "$cf_dir" && cf_dir=/usr/man
11013 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
11015 cf_test=`echo $cf_name | sed -e 's/*//'`
11016 if test "x$cf_test" = "x$cf_name" ; then
11018 case "$cf_name" in
11019 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11020 (*.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11021 (*.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11022 (*) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11023 esac
11025 case "$cf_name" in
11026 ($cf_dir/man*)
11027 cf_catonly=no
11029 ($cf_dir/cat*)
11030 cf_preform=yes
11032 esac
11033 break
11036 # if we found a match in either man* or cat*, stop looking
11037 if test -n "$MANPAGE_FORMAT" ; then
11038 cf_found=no
11039 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11040 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11041 case "$cf_name" in
11042 ($cf_dir/cat*)
11043 cf_found=yes
11045 esac
11046 test $cf_found=yes && break
11048 done
11049 # only check the first directory in $MANPATH where we find manpages
11050 if test -n "$MANPAGE_FORMAT" ; then
11051 break
11053 done
11054 # if we did not find the example, just assume it is normal
11055 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11056 IFS="$ac_save_ifs"
11059 for cf_option in $MANPAGE_FORMAT; do
11060 case $cf_option in
11061 (gzip|compress|BSDI|normal|formatted|catonly)
11064 cf_unknown="$cf_unknown $cf_option"
11066 esac
11067 done
11069 esac
11071 echo "$as_me:11071: result: $MANPAGE_FORMAT" >&5
11072 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11073 if test -n "$cf_unknown" ; then
11074 { echo "$as_me:11074: WARNING: Unexpected manpage-format $cf_unknown" >&5
11075 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11078 echo "$as_me:11078: checking for manpage renaming" >&5
11079 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11081 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11082 if test "${with_manpage_renames+set}" = set; then
11083 withval="$with_manpage_renames"
11084 MANPAGE_RENAMES=$withval
11085 else
11086 MANPAGE_RENAMES=yes
11089 case ".$MANPAGE_RENAMES" in
11090 (.no)
11092 (.|.yes)
11093 # Debian 'man' program?
11094 if test -f /etc/debian_version ; then
11095 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11096 else
11097 MANPAGE_RENAMES=no
11100 esac
11102 if test "$MANPAGE_RENAMES" != no ; then
11103 if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11104 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11105 elif test ! -f $MANPAGE_RENAMES ; then
11106 { { echo "$as_me:11106: error: not a filename: $MANPAGE_RENAMES" >&5
11107 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11108 { (exit 1); exit 1; }; }
11111 test ! -d man && mkdir man
11113 # Construct a sed-script to perform renaming within man-pages
11114 if test -n "$MANPAGE_RENAMES" ; then
11115 test ! -d man && mkdir man
11116 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11120 echo "$as_me:11120: result: $MANPAGE_RENAMES" >&5
11121 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11123 echo "$as_me:11123: checking if manpage aliases will be installed" >&5
11124 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11126 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11127 if test "${with_manpage_aliases+set}" = set; then
11128 withval="$with_manpage_aliases"
11129 MANPAGE_ALIASES=$withval
11130 else
11131 MANPAGE_ALIASES=yes
11134 echo "$as_me:11134: result: $MANPAGE_ALIASES" >&5
11135 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11137 case "x$LN_S" in
11138 (xln*)
11139 cf_use_symlinks=yes
11142 cf_use_symlinks=no
11144 esac
11146 MANPAGE_SYMLINKS=no
11147 if test "$MANPAGE_ALIASES" = yes ; then
11148 echo "$as_me:11148: checking if manpage symlinks should be used" >&5
11149 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11151 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11152 if test "${with_manpage_symlinks+set}" = set; then
11153 withval="$with_manpage_symlinks"
11154 MANPAGE_SYMLINKS=$withval
11155 else
11156 MANPAGE_SYMLINKS=$cf_use_symlinks
11159 if test "$$cf_use_symlinks" = no; then
11160 if test "$MANPAGE_SYMLINKS" = yes ; then
11161 { echo "$as_me:11161: WARNING: cannot make symlinks" >&5
11162 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11163 MANPAGE_SYMLINKS=no
11167 echo "$as_me:11167: result: $MANPAGE_SYMLINKS" >&5
11168 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11171 echo "$as_me:11171: checking for manpage tbl" >&5
11172 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11174 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11175 if test "${with_manpage_tbl+set}" = set; then
11176 withval="$with_manpage_tbl"
11177 MANPAGE_TBL=$withval
11178 else
11179 MANPAGE_TBL=no
11182 echo "$as_me:11182: result: $MANPAGE_TBL" >&5
11183 echo "${ECHO_T}$MANPAGE_TBL" >&6
11185 if test "$prefix" = "NONE" ; then
11186 cf_prefix="$ac_default_prefix"
11187 else
11188 cf_prefix="$prefix"
11191 case "$MANPAGE_FORMAT" in
11192 (*catonly*)
11193 cf_format=yes
11194 cf_inboth=no
11196 (*formatted*)
11197 cf_format=yes
11198 cf_inboth=yes
11201 cf_format=no
11202 cf_inboth=no
11204 esac
11206 test ! -d man && mkdir man
11208 cf_so_strip=
11209 cf_compress=
11210 case "$MANPAGE_FORMAT" in
11211 (*compress*)
11212 cf_so_strip="Z"
11213 cf_compress=compress
11215 (*gzip*)
11216 cf_so_strip="gz"
11217 cf_compress=gzip
11219 esac
11221 cf_edit_man=./edit_man.sh
11222 cf_man_alias=`pwd`/man_alias.sed
11224 cat >$cf_edit_man <<CF_EOF
11225 #! $SHELL
11226 # this script is generated by the configure-script CF_MAN_PAGES macro.
11228 prefix="$cf_prefix"
11229 datarootdir="$datarootdir"
11230 datadir="$datadir"
11232 NCURSES_MAJOR="$NCURSES_MAJOR"
11233 NCURSES_MINOR="$NCURSES_MINOR"
11234 NCURSES_PATCH="$NCURSES_PATCH"
11236 NCURSES_OSPEED="$NCURSES_OSPEED"
11237 TERMINFO="$TERMINFO"
11239 INSTALL="$INSTALL"
11240 INSTALL_DATA="$INSTALL_DATA"
11242 transform="$program_transform_name"
11244 TMP=\${TMPDIR:=/tmp}/man\$\$
11245 trap "rm -f \$TMP" 0 1 2 5 15
11247 form=\$1
11248 shift || exit 1
11250 verb=\$1
11251 shift || exit 1
11253 mandir=\$1
11254 shift || exit 1
11256 srcdir=\$1
11257 top_srcdir=\$srcdir/..
11258 shift || exit 1
11260 if test "\$form" = normal ; then
11261 if test "$cf_format" = yes ; then
11262 if test "$cf_inboth" = no ; then
11263 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11264 exit $?
11267 cf_subdir=\$mandir/man
11268 cf_tables=$MANPAGE_TBL
11269 else
11270 cf_subdir=\$mandir/cat
11271 cf_tables=yes
11274 # process the list of source-files
11275 for i in \$* ; do
11276 case \$i in
11277 (*.orig|*.rej) ;;
11278 (*.[0-9]*)
11279 section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11280 if test \$verb = installing ; then
11281 if test ! -d \$cf_subdir\${section} ; then
11282 mkdir -p \$cf_subdir\$section
11286 # replace variables in man page
11287 if test ! -f $cf_man_alias ; then
11288 cat >>$cf_man_alias <<-CF_EOF2
11289 s,@DATADIR@,\$datadir,g
11290 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11291 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11292 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11293 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11294 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11295 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11296 CF_EOF
11298 for cf_name in captoinfo clear infocmp infotocap tabs tic toe tput tset
11300 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11301 cf_name=`echo $cf_name|sed "$program_transform_name"`
11302 cat >>$cf_edit_man <<-CF_EOF
11303 s,@$cf_NAME@,$cf_name,g
11304 CF_EOF
11305 done
11307 cat >>$cf_edit_man <<CF_EOF
11308 CF_EOF2
11309 echo "...made $cf_man_alias"
11312 aliases=
11313 cf_source=\`basename \$i\`
11314 inalias=\$cf_source
11315 test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11316 if test ! -f \$inalias ; then
11317 echo .. skipped \$cf_source
11318 continue
11320 CF_EOF
11322 if test "$MANPAGE_ALIASES" != no ; then
11323 cat >>$cf_edit_man <<CF_EOF
11324 nCurses=ignore.3x
11325 test $with_curses_h = yes && nCurses=ncurses.3x
11326 aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11327 CF_EOF
11330 if test "$MANPAGE_RENAMES" = no ; then
11331 cat >>$cf_edit_man <<CF_EOF
11332 # perform program transformations for section 1 man pages
11333 if test \$section = 1 ; then
11334 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11335 else
11336 cf_target=\$cf_subdir\${section}/\$cf_source
11338 CF_EOF
11339 else
11340 cat >>$cf_edit_man <<CF_EOF
11341 cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11342 if test -z "\$cf_target" ; then
11343 echo '? missing rename for '\$cf_source
11344 cf_target="\$cf_source"
11346 cf_target="\$cf_subdir\${section}/\${cf_target}"
11348 CF_EOF
11351 cat >>$cf_edit_man <<CF_EOF
11352 sed -f $cf_man_alias \\
11353 CF_EOF
11355 if test -f $MANPAGE_RENAMES ; then
11356 cat >>$cf_edit_man <<CF_EOF
11357 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11358 CF_EOF
11359 else
11360 cat >>$cf_edit_man <<CF_EOF
11361 < \$i >\$TMP
11362 CF_EOF
11365 cat >>$cf_edit_man <<CF_EOF
11366 if test \$cf_tables = yes ; then
11367 tbl \$TMP >\$TMP.out
11368 mv \$TMP.out \$TMP
11370 CF_EOF
11372 if test $with_overwrite != yes ; then
11373 cat >>$cf_edit_man <<CF_EOF
11374 sed -e "/\#[ ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11375 mv \$TMP.out \$TMP
11376 CF_EOF
11379 if test $with_curses_h != yes ; then
11380 cat >>$cf_edit_man <<CF_EOF
11381 sed -e "/\#[ ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11382 mv \$TMP.out \$TMP
11383 CF_EOF
11386 cat >>$cf_edit_man <<CF_EOF
11387 if test \$form = format ; then
11388 nroff -man \$TMP >\$TMP.out
11389 mv \$TMP.out \$TMP
11391 CF_EOF
11393 if test -n "$cf_compress" ; then
11394 cat >>$cf_edit_man <<CF_EOF
11395 if test \$verb = installing ; then
11396 if ( $cf_compress -f \$TMP )
11397 then
11398 mv \$TMP.$cf_so_strip \$TMP
11401 cf_target="\$cf_target.$cf_so_strip"
11402 CF_EOF
11405 case "$MANPAGE_FORMAT" in
11406 (*BSDI*)
11407 cat >>$cf_edit_man <<CF_EOF
11408 if test \$form = format ; then
11409 # BSDI installs only .0 suffixes in the cat directories
11410 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11412 CF_EOF
11414 esac
11416 cat >>$cf_edit_man <<CF_EOF
11417 suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11418 if test \$verb = installing ; then
11419 echo \$verb \$cf_target
11420 \$INSTALL_DATA \$TMP \$cf_target
11421 test -d \$cf_subdir\${section} &&
11422 test -n "\$aliases" && (
11423 cd \$cf_subdir\${section} && (
11424 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11425 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11426 cf_target=\`basename \$cf_target\`
11427 for cf_alias in \$aliases
11429 if test \$section = 1 ; then
11430 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11433 if test "$MANPAGE_SYMLINKS" = yes ; then
11434 if test -f \$cf_alias\${suffix} ; then
11435 if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11436 then
11437 continue
11440 echo .. \$verb alias \$cf_alias\${suffix}
11441 CF_EOF
11442 case "x$LN_S" in
11443 (*-f)
11444 cat >>$cf_edit_man <<CF_EOF
11445 $LN_S \$cf_target \$cf_alias\${suffix}
11446 CF_EOF
11449 cat >>$cf_edit_man <<CF_EOF
11450 rm -f \$cf_alias\${suffix}
11451 $LN_S \$cf_target \$cf_alias\${suffix}
11452 CF_EOF
11454 esac
11455 cat >>$cf_edit_man <<CF_EOF
11456 elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11457 echo ".so \$cf_source" >\$TMP
11458 CF_EOF
11459 if test -n "$cf_compress" ; then
11460 cat >>$cf_edit_man <<CF_EOF
11461 if test -n "$cf_so_strip" ; then
11462 $cf_compress -f \$TMP
11463 mv \$TMP.$cf_so_strip \$TMP
11465 CF_EOF
11467 cat >>$cf_edit_man <<CF_EOF
11468 echo .. \$verb alias \$cf_alias\${suffix}
11469 rm -f \$cf_alias\${suffix}
11470 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11472 done
11475 elif test \$verb = removing ; then
11476 test -f \$cf_target && (
11477 echo \$verb \$cf_target
11478 rm -f \$cf_target
11480 test -d \$cf_subdir\${section} &&
11481 test -n "\$aliases" && (
11482 cd \$cf_subdir\${section} && (
11483 for cf_alias in \$aliases
11485 if test \$section = 1 ; then
11486 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11489 echo .. \$verb alias \$cf_alias\${suffix}
11490 rm -f \$cf_alias\${suffix}
11491 done
11494 else
11495 # echo ".hy 0"
11496 cat \$TMP
11499 esac
11500 done
11502 if test $cf_inboth = yes ; then
11503 if test \$form != format ; then
11504 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11508 exit 0
11509 CF_EOF
11510 chmod 755 $cf_edit_man
11512 ###############################################################################
11514 ### Note that some functions (such as const) are normally disabled anyway.
11515 echo "$as_me:11515: checking if you want to build with function extensions" >&5
11516 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11518 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11519 if test "${enable_ext_funcs+set}" = set; then
11520 enableval="$enable_ext_funcs"
11521 with_ext_funcs=$enableval
11522 else
11523 with_ext_funcs=yes
11525 echo "$as_me:11525: result: $with_ext_funcs" >&5
11526 echo "${ECHO_T}$with_ext_funcs" >&6
11527 if test "x$with_ext_funcs" = xyes ; then
11528 NCURSES_EXT_FUNCS=1
11530 cat >>confdefs.h <<\EOF
11531 #define HAVE_ASSUME_DEFAULT_COLORS 1
11534 cat >>confdefs.h <<\EOF
11535 #define HAVE_CURSES_VERSION 1
11538 cat >>confdefs.h <<\EOF
11539 #define HAVE_HAS_KEY 1
11542 cat >>confdefs.h <<\EOF
11543 #define HAVE_RESIZETERM 1
11546 cat >>confdefs.h <<\EOF
11547 #define HAVE_RESIZE_TERM 1
11550 cat >>confdefs.h <<\EOF
11551 #define HAVE_TERM_ENTRY_H 1
11554 cat >>confdefs.h <<\EOF
11555 #define HAVE_USE_DEFAULT_COLORS 1
11558 cat >>confdefs.h <<\EOF
11559 #define HAVE_USE_SCREEN 1
11562 cat >>confdefs.h <<\EOF
11563 #define HAVE_USE_WINDOW 1
11566 cat >>confdefs.h <<\EOF
11567 #define HAVE_WRESIZE 1
11570 cat >>confdefs.h <<\EOF
11571 #define NCURSES_EXT_FUNCS 1
11574 GENERATED_EXT_FUNCS=generated
11575 else
11576 NCURSES_EXT_FUNCS=0
11577 GENERATED_EXT_FUNCS=
11580 echo "$as_me:11580: checking if you want to build with SCREEN extensions" >&5
11581 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11583 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11584 if test "${enable_sp_funcs+set}" = set; then
11585 enableval="$enable_sp_funcs"
11586 with_sp_funcs=$enableval
11587 else
11588 with_sp_funcs=$cf_dft_ext_spfuncs
11590 echo "$as_me:11590: result: $with_sp_funcs" >&5
11591 echo "${ECHO_T}$with_sp_funcs" >&6
11592 if test "x$with_sp_funcs" = xyes ; then
11593 NCURSES_SP_FUNCS=1
11595 cat >>confdefs.h <<\EOF
11596 #define NCURSES_SP_FUNCS 1
11599 GENERATED_SP_FUNCS=generated
11600 else
11601 NCURSES_SP_FUNCS=0
11602 GENERATED_SP_FUNCS=
11605 echo "$as_me:11605: checking if you want to build with terminal-driver" >&5
11606 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11608 # Check whether --enable-term-driver or --disable-term-driver was given.
11609 if test "${enable_term_driver+set}" = set; then
11610 enableval="$enable_term_driver"
11611 with_term_driver=$enableval
11612 else
11613 with_term_driver=no
11615 echo "$as_me:11615: result: $with_term_driver" >&5
11616 echo "${ECHO_T}$with_term_driver" >&6
11617 if test "x$with_term_driver" = xyes ; then
11619 cat >>confdefs.h <<\EOF
11620 #define USE_TERM_DRIVER 1
11623 if test "x$with_termlib" != xno ; then
11624 { { echo "$as_me:11624: error: The term-driver option conflicts with the termlib option" >&5
11625 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11626 { (exit 1); exit 1; }; }
11628 if test "x$with_sp_funcs" != xyes ; then
11629 { { echo "$as_me:11629: error: The term-driver option relies upon sp-funcs" >&5
11630 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11631 { (exit 1); exit 1; }; }
11635 ### use option --enable-const to turn on use of const beyond that in XSI.
11636 echo "$as_me:11636: checking for extended use of const keyword" >&5
11637 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11639 # Check whether --enable-const or --disable-const was given.
11640 if test "${enable_const+set}" = set; then
11641 enableval="$enable_const"
11642 with_ext_const=$enableval
11643 else
11644 with_ext_const=$cf_dft_ext_const
11646 echo "$as_me:11646: result: $with_ext_const" >&5
11647 echo "${ECHO_T}$with_ext_const" >&6
11648 NCURSES_CONST='/*nothing*/'
11649 if test "x$with_ext_const" = xyes ; then
11650 NCURSES_CONST=const
11653 ### use option --enable-ext-colors to turn on use of colors beyond 16.
11654 echo "$as_me:11654: checking if you want to use extended colors" >&5
11655 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11657 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11658 if test "${enable_ext_colors+set}" = set; then
11659 enableval="$enable_ext_colors"
11660 with_ext_colors=$enableval
11661 else
11662 with_ext_colors=$cf_dft_ext_colors
11664 echo "$as_me:11664: result: $with_ext_colors" >&5
11665 echo "${ECHO_T}$with_ext_colors" >&6
11666 NCURSES_EXT_COLORS=0
11667 if test "x$with_ext_colors" = xyes ; then
11668 if test "x$with_widec" != xyes ; then
11669 { echo "$as_me:11669: WARNING: This option applies only to wide-character library" >&5
11670 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11671 else
11672 # cannot be ABI 5 since it changes sizeof(cchar_t)
11674 if test "${with_abi_version+set}" != set; then
11675 case $cf_cv_rel_version in
11676 (5.*)
11677 cf_cv_rel_version=6.0
11678 cf_cv_abi_version=6
11679 { echo "$as_me:11679: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11680 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11682 esac
11685 NCURSES_EXT_COLORS=1
11687 cat >>confdefs.h <<\EOF
11688 #define NCURSES_EXT_COLORS 1
11694 ### use option --enable-ext-mouse to modify coding to support 5-button mice
11695 echo "$as_me:11695: checking if you want to use extended mouse encoding" >&5
11696 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11698 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11699 if test "${enable_ext_mouse+set}" = set; then
11700 enableval="$enable_ext_mouse"
11701 with_ext_mouse=$enableval
11702 else
11703 with_ext_mouse=$cf_dft_ext_mouse
11705 echo "$as_me:11705: result: $with_ext_mouse" >&5
11706 echo "${ECHO_T}$with_ext_mouse" >&6
11707 NCURSES_MOUSE_VERSION=1
11708 if test "x$with_ext_mouse" = xyes ; then
11709 NCURSES_MOUSE_VERSION=2
11711 if test "${with_abi_version+set}" != set; then
11712 case $cf_cv_rel_version in
11713 (5.*)
11714 cf_cv_rel_version=6.0
11715 cf_cv_abi_version=6
11716 { echo "$as_me:11716: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11717 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11719 esac
11724 ### use option --enable-ext-putwin to turn on extended screendumps
11725 echo "$as_me:11725: checking if you want to use extended putwin/screendump" >&5
11726 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11728 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11729 if test "${enable_ext_putwin+set}" = set; then
11730 enableval="$enable_ext_putwin"
11731 with_ext_putwin=$enableval
11732 else
11733 with_ext_putwin=$cf_dft_ext_putwin
11735 echo "$as_me:11735: result: $with_ext_putwin" >&5
11736 echo "${ECHO_T}$with_ext_putwin" >&6
11737 if test "x$with_ext_putwin" = xyes ; then
11739 cat >>confdefs.h <<\EOF
11740 #define NCURSES_EXT_PUTWIN 1
11745 echo "$as_me:11745: checking if you want \$NCURSES_NO_PADDING code" >&5
11746 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11748 # Check whether --enable-no-padding or --disable-no-padding was given.
11749 if test "${enable_no_padding+set}" = set; then
11750 enableval="$enable_no_padding"
11751 with_no_padding=$enableval
11752 else
11753 with_no_padding=$with_ext_funcs
11755 echo "$as_me:11755: result: $with_no_padding" >&5
11756 echo "${ECHO_T}$with_no_padding" >&6
11757 test "x$with_no_padding" = xyes &&
11758 cat >>confdefs.h <<\EOF
11759 #define NCURSES_NO_PADDING 1
11762 echo "$as_me:11762: checking for ANSI C header files" >&5
11763 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11764 if test "${ac_cv_header_stdc+set}" = set; then
11765 echo $ECHO_N "(cached) $ECHO_C" >&6
11766 else
11767 cat >conftest.$ac_ext <<_ACEOF
11768 #line 11768 "configure"
11769 #include "confdefs.h"
11770 #include <stdlib.h>
11771 #include <stdarg.h>
11772 #include <string.h>
11773 #include <float.h>
11775 _ACEOF
11776 if { (eval echo "$as_me:11776: \"$ac_cpp conftest.$ac_ext\"") >&5
11777 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11778 ac_status=$?
11779 egrep -v '^ *\+' conftest.er1 >conftest.err
11780 rm -f conftest.er1
11781 cat conftest.err >&5
11782 echo "$as_me:11782: \$? = $ac_status" >&5
11783 (exit $ac_status); } >/dev/null; then
11784 if test -s conftest.err; then
11785 ac_cpp_err=$ac_c_preproc_warn_flag
11786 else
11787 ac_cpp_err=
11789 else
11790 ac_cpp_err=yes
11792 if test -z "$ac_cpp_err"; then
11793 ac_cv_header_stdc=yes
11794 else
11795 echo "$as_me: failed program was:" >&5
11796 cat conftest.$ac_ext >&5
11797 ac_cv_header_stdc=no
11799 rm -f conftest.err conftest.$ac_ext
11801 if test $ac_cv_header_stdc = yes; then
11802 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11803 cat >conftest.$ac_ext <<_ACEOF
11804 #line 11804 "configure"
11805 #include "confdefs.h"
11806 #include <string.h>
11808 _ACEOF
11809 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11810 egrep "memchr" >/dev/null 2>&1; then
11812 else
11813 ac_cv_header_stdc=no
11815 rm -rf conftest*
11819 if test $ac_cv_header_stdc = yes; then
11820 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11821 cat >conftest.$ac_ext <<_ACEOF
11822 #line 11822 "configure"
11823 #include "confdefs.h"
11824 #include <stdlib.h>
11826 _ACEOF
11827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11828 egrep "free" >/dev/null 2>&1; then
11830 else
11831 ac_cv_header_stdc=no
11833 rm -rf conftest*
11837 if test $ac_cv_header_stdc = yes; then
11838 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11839 if test "$cross_compiling" = yes; then
11841 else
11842 cat >conftest.$ac_ext <<_ACEOF
11843 #line 11843 "configure"
11844 #include "confdefs.h"
11845 #include <ctype.h>
11846 #if ((' ' & 0x0FF) == 0x020)
11847 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11848 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11849 #else
11850 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11851 || ('j' <= (c) && (c) <= 'r') \
11852 || ('s' <= (c) && (c) <= 'z'))
11853 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11854 #endif
11856 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11858 main ()
11860 int i;
11861 for (i = 0; i < 256; i++)
11862 if (XOR (islower (i), ISLOWER (i))
11863 || toupper (i) != TOUPPER (i))
11864 $ac_main_return(2);
11865 $ac_main_return (0);
11867 _ACEOF
11868 rm -f conftest$ac_exeext
11869 if { (eval echo "$as_me:11869: \"$ac_link\"") >&5
11870 (eval $ac_link) 2>&5
11871 ac_status=$?
11872 echo "$as_me:11872: \$? = $ac_status" >&5
11873 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11874 { (eval echo "$as_me:11874: \"$ac_try\"") >&5
11875 (eval $ac_try) 2>&5
11876 ac_status=$?
11877 echo "$as_me:11877: \$? = $ac_status" >&5
11878 (exit $ac_status); }; }; then
11880 else
11881 echo "$as_me: program exited with status $ac_status" >&5
11882 echo "$as_me: failed program was:" >&5
11883 cat conftest.$ac_ext >&5
11884 ac_cv_header_stdc=no
11886 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11890 echo "$as_me:11890: result: $ac_cv_header_stdc" >&5
11891 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11892 if test $ac_cv_header_stdc = yes; then
11894 cat >>confdefs.h <<\EOF
11895 #define STDC_HEADERS 1
11900 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11902 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11903 inttypes.h stdint.h unistd.h
11905 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11906 echo "$as_me:11906: checking for $ac_header" >&5
11907 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11908 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11909 echo $ECHO_N "(cached) $ECHO_C" >&6
11910 else
11911 cat >conftest.$ac_ext <<_ACEOF
11912 #line 11912 "configure"
11913 #include "confdefs.h"
11914 $ac_includes_default
11915 #include <$ac_header>
11916 _ACEOF
11917 rm -f conftest.$ac_objext
11918 if { (eval echo "$as_me:11918: \"$ac_compile\"") >&5
11919 (eval $ac_compile) 2>&5
11920 ac_status=$?
11921 echo "$as_me:11921: \$? = $ac_status" >&5
11922 (exit $ac_status); } &&
11923 { ac_try='test -s conftest.$ac_objext'
11924 { (eval echo "$as_me:11924: \"$ac_try\"") >&5
11925 (eval $ac_try) 2>&5
11926 ac_status=$?
11927 echo "$as_me:11927: \$? = $ac_status" >&5
11928 (exit $ac_status); }; }; then
11929 eval "$as_ac_Header=yes"
11930 else
11931 echo "$as_me: failed program was:" >&5
11932 cat conftest.$ac_ext >&5
11933 eval "$as_ac_Header=no"
11935 rm -f conftest.$ac_objext conftest.$ac_ext
11937 echo "$as_me:11937: result: `eval echo '${'$as_ac_Header'}'`" >&5
11938 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11939 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11940 cat >>confdefs.h <<EOF
11941 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11945 done
11947 echo "$as_me:11947: checking for signed char" >&5
11948 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11949 if test "${ac_cv_type_signed_char+set}" = set; then
11950 echo $ECHO_N "(cached) $ECHO_C" >&6
11951 else
11952 cat >conftest.$ac_ext <<_ACEOF
11953 #line 11953 "configure"
11954 #include "confdefs.h"
11955 $ac_includes_default
11957 main ()
11959 if ((signed char *) 0)
11960 return 0;
11961 if (sizeof (signed char))
11962 return 0;
11964 return 0;
11966 _ACEOF
11967 rm -f conftest.$ac_objext
11968 if { (eval echo "$as_me:11968: \"$ac_compile\"") >&5
11969 (eval $ac_compile) 2>&5
11970 ac_status=$?
11971 echo "$as_me:11971: \$? = $ac_status" >&5
11972 (exit $ac_status); } &&
11973 { ac_try='test -s conftest.$ac_objext'
11974 { (eval echo "$as_me:11974: \"$ac_try\"") >&5
11975 (eval $ac_try) 2>&5
11976 ac_status=$?
11977 echo "$as_me:11977: \$? = $ac_status" >&5
11978 (exit $ac_status); }; }; then
11979 ac_cv_type_signed_char=yes
11980 else
11981 echo "$as_me: failed program was:" >&5
11982 cat conftest.$ac_ext >&5
11983 ac_cv_type_signed_char=no
11985 rm -f conftest.$ac_objext conftest.$ac_ext
11987 echo "$as_me:11987: result: $ac_cv_type_signed_char" >&5
11988 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11990 echo "$as_me:11990: checking size of signed char" >&5
11991 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11992 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11993 echo $ECHO_N "(cached) $ECHO_C" >&6
11994 else
11995 if test "$ac_cv_type_signed_char" = yes; then
11996 if test "$cross_compiling" = yes; then
11997 # Depending upon the size, compute the lo and hi bounds.
11998 cat >conftest.$ac_ext <<_ACEOF
11999 #line 11999 "configure"
12000 #include "confdefs.h"
12001 $ac_includes_default
12003 main ()
12005 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12007 return 0;
12009 _ACEOF
12010 rm -f conftest.$ac_objext
12011 if { (eval echo "$as_me:12011: \"$ac_compile\"") >&5
12012 (eval $ac_compile) 2>&5
12013 ac_status=$?
12014 echo "$as_me:12014: \$? = $ac_status" >&5
12015 (exit $ac_status); } &&
12016 { ac_try='test -s conftest.$ac_objext'
12017 { (eval echo "$as_me:12017: \"$ac_try\"") >&5
12018 (eval $ac_try) 2>&5
12019 ac_status=$?
12020 echo "$as_me:12020: \$? = $ac_status" >&5
12021 (exit $ac_status); }; }; then
12022 ac_lo=0 ac_mid=0
12023 while :; do
12024 cat >conftest.$ac_ext <<_ACEOF
12025 #line 12025 "configure"
12026 #include "confdefs.h"
12027 $ac_includes_default
12029 main ()
12031 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12033 return 0;
12035 _ACEOF
12036 rm -f conftest.$ac_objext
12037 if { (eval echo "$as_me:12037: \"$ac_compile\"") >&5
12038 (eval $ac_compile) 2>&5
12039 ac_status=$?
12040 echo "$as_me:12040: \$? = $ac_status" >&5
12041 (exit $ac_status); } &&
12042 { ac_try='test -s conftest.$ac_objext'
12043 { (eval echo "$as_me:12043: \"$ac_try\"") >&5
12044 (eval $ac_try) 2>&5
12045 ac_status=$?
12046 echo "$as_me:12046: \$? = $ac_status" >&5
12047 (exit $ac_status); }; }; then
12048 ac_hi=$ac_mid; break
12049 else
12050 echo "$as_me: failed program was:" >&5
12051 cat conftest.$ac_ext >&5
12052 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12054 rm -f conftest.$ac_objext conftest.$ac_ext
12055 done
12056 else
12057 echo "$as_me: failed program was:" >&5
12058 cat conftest.$ac_ext >&5
12059 ac_hi=-1 ac_mid=-1
12060 while :; do
12061 cat >conftest.$ac_ext <<_ACEOF
12062 #line 12062 "configure"
12063 #include "confdefs.h"
12064 $ac_includes_default
12066 main ()
12068 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12070 return 0;
12072 _ACEOF
12073 rm -f conftest.$ac_objext
12074 if { (eval echo "$as_me:12074: \"$ac_compile\"") >&5
12075 (eval $ac_compile) 2>&5
12076 ac_status=$?
12077 echo "$as_me:12077: \$? = $ac_status" >&5
12078 (exit $ac_status); } &&
12079 { ac_try='test -s conftest.$ac_objext'
12080 { (eval echo "$as_me:12080: \"$ac_try\"") >&5
12081 (eval $ac_try) 2>&5
12082 ac_status=$?
12083 echo "$as_me:12083: \$? = $ac_status" >&5
12084 (exit $ac_status); }; }; then
12085 ac_lo=$ac_mid; break
12086 else
12087 echo "$as_me: failed program was:" >&5
12088 cat conftest.$ac_ext >&5
12089 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12091 rm -f conftest.$ac_objext conftest.$ac_ext
12092 done
12094 rm -f conftest.$ac_objext conftest.$ac_ext
12095 # Binary search between lo and hi bounds.
12096 while test "x$ac_lo" != "x$ac_hi"; do
12097 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12098 cat >conftest.$ac_ext <<_ACEOF
12099 #line 12099 "configure"
12100 #include "confdefs.h"
12101 $ac_includes_default
12103 main ()
12105 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12107 return 0;
12109 _ACEOF
12110 rm -f conftest.$ac_objext
12111 if { (eval echo "$as_me:12111: \"$ac_compile\"") >&5
12112 (eval $ac_compile) 2>&5
12113 ac_status=$?
12114 echo "$as_me:12114: \$? = $ac_status" >&5
12115 (exit $ac_status); } &&
12116 { ac_try='test -s conftest.$ac_objext'
12117 { (eval echo "$as_me:12117: \"$ac_try\"") >&5
12118 (eval $ac_try) 2>&5
12119 ac_status=$?
12120 echo "$as_me:12120: \$? = $ac_status" >&5
12121 (exit $ac_status); }; }; then
12122 ac_hi=$ac_mid
12123 else
12124 echo "$as_me: failed program was:" >&5
12125 cat conftest.$ac_ext >&5
12126 ac_lo=`expr $ac_mid + 1`
12128 rm -f conftest.$ac_objext conftest.$ac_ext
12129 done
12130 ac_cv_sizeof_signed_char=$ac_lo
12131 else
12132 if test "$cross_compiling" = yes; then
12133 { { echo "$as_me:12133: error: cannot run test program while cross compiling" >&5
12134 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12135 { (exit 1); exit 1; }; }
12136 else
12137 cat >conftest.$ac_ext <<_ACEOF
12138 #line 12138 "configure"
12139 #include "confdefs.h"
12140 $ac_includes_default
12142 main ()
12144 FILE *f = fopen ("conftest.val", "w");
12145 if (!f)
12146 $ac_main_return (1);
12147 fprintf (f, "%d", (sizeof (signed char)));
12148 fclose (f);
12150 return 0;
12152 _ACEOF
12153 rm -f conftest$ac_exeext
12154 if { (eval echo "$as_me:12154: \"$ac_link\"") >&5
12155 (eval $ac_link) 2>&5
12156 ac_status=$?
12157 echo "$as_me:12157: \$? = $ac_status" >&5
12158 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12159 { (eval echo "$as_me:12159: \"$ac_try\"") >&5
12160 (eval $ac_try) 2>&5
12161 ac_status=$?
12162 echo "$as_me:12162: \$? = $ac_status" >&5
12163 (exit $ac_status); }; }; then
12164 ac_cv_sizeof_signed_char=`cat conftest.val`
12165 else
12166 echo "$as_me: program exited with status $ac_status" >&5
12167 echo "$as_me: failed program was:" >&5
12168 cat conftest.$ac_ext >&5
12170 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12173 rm -f conftest.val
12174 else
12175 ac_cv_sizeof_signed_char=0
12178 echo "$as_me:12178: result: $ac_cv_sizeof_signed_char" >&5
12179 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12180 cat >>confdefs.h <<EOF
12181 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12184 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12185 NCURSES_SBOOL="signed char"
12186 else
12187 NCURSES_SBOOL="char"
12189 echo "$as_me:12189: checking if you want to use signed Boolean array in term.h" >&5
12190 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12192 # Check whether --enable-signed-char or --disable-signed-char was given.
12193 if test "${enable_signed_char+set}" = set; then
12194 enableval="$enable_signed_char"
12195 with_signed_char=$enableval
12196 else
12197 with_signed_char=no
12199 echo "$as_me:12199: result: $with_signed_char" >&5
12200 echo "${ECHO_T}$with_signed_char" >&6
12201 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12203 ### use option --enable-sigwinch to turn on use of SIGWINCH logic
12204 echo "$as_me:12204: checking if you want SIGWINCH handler" >&5
12205 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12207 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12208 if test "${enable_sigwinch+set}" = set; then
12209 enableval="$enable_sigwinch"
12210 with_sigwinch=$enableval
12211 else
12212 with_sigwinch=$with_ext_funcs
12214 echo "$as_me:12214: result: $with_sigwinch" >&5
12215 echo "${ECHO_T}$with_sigwinch" >&6
12216 test "x$with_sigwinch" = xyes &&
12217 cat >>confdefs.h <<\EOF
12218 #define USE_SIGWINCH 1
12221 ### use option --enable-tcap-names to allow user to define new capabilities
12222 echo "$as_me:12222: checking if you want user-definable terminal capabilities like termcap" >&5
12223 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12225 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12226 if test "${enable_tcap_names+set}" = set; then
12227 enableval="$enable_tcap_names"
12228 with_tcap_names=$enableval
12229 else
12230 with_tcap_names=$with_ext_funcs
12232 echo "$as_me:12232: result: $with_tcap_names" >&5
12233 echo "${ECHO_T}$with_tcap_names" >&6
12234 NCURSES_XNAMES=0
12235 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12237 ###############################################################################
12238 # These options are relatively safe to experiment with.
12240 echo "$as_me:12240: checking if you want all development code" >&5
12241 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12243 # Check whether --with-develop or --without-develop was given.
12244 if test "${with_develop+set}" = set; then
12245 withval="$with_develop"
12246 with_develop=$withval
12247 else
12248 with_develop=no
12250 echo "$as_me:12250: result: $with_develop" >&5
12251 echo "${ECHO_T}$with_develop" >&6
12253 ### use option --enable-hard-tabs to turn on use of hard-tabs optimize
12254 echo "$as_me:12254: checking if you want hard-tabs code" >&5
12255 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12257 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12258 if test "${enable_hard_tabs+set}" = set; then
12259 enableval="$enable_hard_tabs"
12261 else
12262 enable_hard_tabs=$with_develop
12264 echo "$as_me:12264: result: $enable_hard_tabs" >&5
12265 echo "${ECHO_T}$enable_hard_tabs" >&6
12266 test "x$enable_hard_tabs" = xyes &&
12267 cat >>confdefs.h <<\EOF
12268 #define USE_HARD_TABS 1
12271 ### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12272 echo "$as_me:12272: checking if you want limited support for xmc" >&5
12273 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12275 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12276 if test "${enable_xmc_glitch+set}" = set; then
12277 enableval="$enable_xmc_glitch"
12279 else
12280 enable_xmc_glitch=$with_develop
12282 echo "$as_me:12282: result: $enable_xmc_glitch" >&5
12283 echo "${ECHO_T}$enable_xmc_glitch" >&6
12284 test "x$enable_xmc_glitch" = xyes &&
12285 cat >>confdefs.h <<\EOF
12286 #define USE_XMC_SUPPORT 1
12289 ###############################################################################
12290 # These are just experimental, probably should not be in a package:
12292 echo "$as_me:12292: checking if you do not want to assume colors are white-on-black" >&5
12293 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12295 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12296 if test "${enable_assumed_color+set}" = set; then
12297 enableval="$enable_assumed_color"
12298 with_assumed_color=$enableval
12299 else
12300 with_assumed_color=yes
12302 echo "$as_me:12302: result: $with_assumed_color" >&5
12303 echo "${ECHO_T}$with_assumed_color" >&6
12304 test "x$with_assumed_color" = xyes &&
12305 cat >>confdefs.h <<\EOF
12306 #define USE_ASSUMED_COLOR 1
12309 ### use option --enable-hashmap to turn on use of hashmap scrolling logic
12310 echo "$as_me:12310: checking if you want hashmap scrolling-optimization code" >&5
12311 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12313 # Check whether --enable-hashmap or --disable-hashmap was given.
12314 if test "${enable_hashmap+set}" = set; then
12315 enableval="$enable_hashmap"
12316 with_hashmap=$enableval
12317 else
12318 with_hashmap=yes
12320 echo "$as_me:12320: result: $with_hashmap" >&5
12321 echo "${ECHO_T}$with_hashmap" >&6
12322 test "x$with_hashmap" = xyes &&
12323 cat >>confdefs.h <<\EOF
12324 #define USE_HASHMAP 1
12327 ### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12328 echo "$as_me:12328: checking if you want colorfgbg code" >&5
12329 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12331 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12332 if test "${enable_colorfgbg+set}" = set; then
12333 enableval="$enable_colorfgbg"
12334 with_colorfgbg=$enableval
12335 else
12336 with_colorfgbg=no
12338 echo "$as_me:12338: result: $with_colorfgbg" >&5
12339 echo "${ECHO_T}$with_colorfgbg" >&6
12340 test "x$with_colorfgbg" = xyes &&
12341 cat >>confdefs.h <<\EOF
12342 #define USE_COLORFGBG 1
12345 ### use option --enable-interop to turn on use of bindings used for interop
12346 echo "$as_me:12346: checking if you want interop bindings" >&5
12347 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12349 # Check whether --enable-interop or --disable-interop was given.
12350 if test "${enable_interop+set}" = set; then
12351 enableval="$enable_interop"
12352 with_exp_interop=$enableval
12353 else
12354 with_exp_interop=$cf_dft_interop
12356 echo "$as_me:12356: result: $with_exp_interop" >&5
12357 echo "${ECHO_T}$with_exp_interop" >&6
12359 NCURSES_INTEROP_FUNCS=0
12360 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12362 # This is still experimental (20080329), but should ultimately be moved to
12363 # the script-block --with-normal, etc.
12365 echo "$as_me:12365: checking if you want to link with the pthread library" >&5
12366 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12368 # Check whether --with-pthread or --without-pthread was given.
12369 if test "${with_pthread+set}" = set; then
12370 withval="$with_pthread"
12371 with_pthread=$withval
12372 else
12373 with_pthread=no
12375 echo "$as_me:12375: result: $with_pthread" >&5
12376 echo "${ECHO_T}$with_pthread" >&6
12378 if test "$with_pthread" != no ; then
12379 echo "$as_me:12379: checking for pthread.h" >&5
12380 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12381 if test "${ac_cv_header_pthread_h+set}" = set; then
12382 echo $ECHO_N "(cached) $ECHO_C" >&6
12383 else
12384 cat >conftest.$ac_ext <<_ACEOF
12385 #line 12385 "configure"
12386 #include "confdefs.h"
12387 #include <pthread.h>
12388 _ACEOF
12389 if { (eval echo "$as_me:12389: \"$ac_cpp conftest.$ac_ext\"") >&5
12390 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12391 ac_status=$?
12392 egrep -v '^ *\+' conftest.er1 >conftest.err
12393 rm -f conftest.er1
12394 cat conftest.err >&5
12395 echo "$as_me:12395: \$? = $ac_status" >&5
12396 (exit $ac_status); } >/dev/null; then
12397 if test -s conftest.err; then
12398 ac_cpp_err=$ac_c_preproc_warn_flag
12399 else
12400 ac_cpp_err=
12402 else
12403 ac_cpp_err=yes
12405 if test -z "$ac_cpp_err"; then
12406 ac_cv_header_pthread_h=yes
12407 else
12408 echo "$as_me: failed program was:" >&5
12409 cat conftest.$ac_ext >&5
12410 ac_cv_header_pthread_h=no
12412 rm -f conftest.err conftest.$ac_ext
12414 echo "$as_me:12414: result: $ac_cv_header_pthread_h" >&5
12415 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12416 if test $ac_cv_header_pthread_h = yes; then
12418 cat >>confdefs.h <<\EOF
12419 #define HAVE_PTHREADS_H 1
12422 for cf_lib_pthread in pthread c_r
12424 echo "$as_me:12424: checking if we can link with the $cf_lib_pthread library" >&5
12425 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12426 cf_save_LIBS="$LIBS"
12428 cf_add_libs="-l$cf_lib_pthread"
12429 # Filter out duplicates - this happens with badly-designed ".pc" files...
12430 for cf_add_1lib in $LIBS
12432 for cf_add_2lib in $cf_add_libs
12434 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12435 then
12436 cf_add_1lib=
12437 break
12439 done
12440 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12441 done
12442 LIBS="$cf_add_libs"
12444 cat >conftest.$ac_ext <<_ACEOF
12445 #line 12445 "configure"
12446 #include "confdefs.h"
12448 #include <pthread.h>
12451 main ()
12454 int rc = pthread_create(0,0,0,0);
12455 int r2 = pthread_mutexattr_settype(0, 0);
12458 return 0;
12460 _ACEOF
12461 rm -f conftest.$ac_objext conftest$ac_exeext
12462 if { (eval echo "$as_me:12462: \"$ac_link\"") >&5
12463 (eval $ac_link) 2>&5
12464 ac_status=$?
12465 echo "$as_me:12465: \$? = $ac_status" >&5
12466 (exit $ac_status); } &&
12467 { ac_try='test -s conftest$ac_exeext'
12468 { (eval echo "$as_me:12468: \"$ac_try\"") >&5
12469 (eval $ac_try) 2>&5
12470 ac_status=$?
12471 echo "$as_me:12471: \$? = $ac_status" >&5
12472 (exit $ac_status); }; }; then
12473 with_pthread=yes
12474 else
12475 echo "$as_me: failed program was:" >&5
12476 cat conftest.$ac_ext >&5
12477 with_pthread=no
12479 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12480 LIBS="$cf_save_LIBS"
12481 echo "$as_me:12481: result: $with_pthread" >&5
12482 echo "${ECHO_T}$with_pthread" >&6
12483 test "$with_pthread" = yes && break
12484 done
12486 if test "$with_pthread" = yes ; then
12488 cf_add_libs="-l$cf_lib_pthread"
12489 # Filter out duplicates - this happens with badly-designed ".pc" files...
12490 for cf_add_1lib in $LIBS
12492 for cf_add_2lib in $cf_add_libs
12494 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12495 then
12496 cf_add_1lib=
12497 break
12499 done
12500 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12501 done
12502 LIBS="$cf_add_libs"
12504 cat >>confdefs.h <<\EOF
12505 #define HAVE_LIBPTHREADS 1
12508 else
12509 { { echo "$as_me:12509: error: Cannot link with pthread library" >&5
12510 echo "$as_me: error: Cannot link with pthread library" >&2;}
12511 { (exit 1); exit 1; }; }
12518 if test "x$with_pthread" != xno; then
12519 echo "$as_me:12519: checking for pthread_kill" >&5
12520 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12521 if test "${ac_cv_func_pthread_kill+set}" = set; then
12522 echo $ECHO_N "(cached) $ECHO_C" >&6
12523 else
12524 cat >conftest.$ac_ext <<_ACEOF
12525 #line 12525 "configure"
12526 #include "confdefs.h"
12527 /* System header to define __stub macros and hopefully few prototypes,
12528 which can conflict with char pthread_kill (); below. */
12529 #include <assert.h>
12530 /* Override any gcc2 internal prototype to avoid an error. */
12531 #ifdef __cplusplus
12532 extern "C"
12533 #endif
12534 /* We use char because int might match the return type of a gcc2
12535 builtin and then its argument prototype would still apply. */
12536 char pthread_kill ();
12537 char (*f) ();
12540 main ()
12542 /* The GNU C library defines this for functions which it implements
12543 to always fail with ENOSYS. Some functions are actually named
12544 something starting with __ and the normal name is an alias. */
12545 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12546 choke me
12547 #else
12548 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12549 #endif
12552 return 0;
12554 _ACEOF
12555 rm -f conftest.$ac_objext conftest$ac_exeext
12556 if { (eval echo "$as_me:12556: \"$ac_link\"") >&5
12557 (eval $ac_link) 2>&5
12558 ac_status=$?
12559 echo "$as_me:12559: \$? = $ac_status" >&5
12560 (exit $ac_status); } &&
12561 { ac_try='test -s conftest$ac_exeext'
12562 { (eval echo "$as_me:12562: \"$ac_try\"") >&5
12563 (eval $ac_try) 2>&5
12564 ac_status=$?
12565 echo "$as_me:12565: \$? = $ac_status" >&5
12566 (exit $ac_status); }; }; then
12567 ac_cv_func_pthread_kill=yes
12568 else
12569 echo "$as_me: failed program was:" >&5
12570 cat conftest.$ac_ext >&5
12571 ac_cv_func_pthread_kill=no
12573 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12575 echo "$as_me:12575: result: $ac_cv_func_pthread_kill" >&5
12576 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12577 if test $ac_cv_func_pthread_kill = yes; then
12579 echo "$as_me:12579: checking if you want to allow EINTR in wgetch with pthreads" >&5
12580 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12582 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12583 if test "${enable_pthreads_eintr+set}" = set; then
12584 enableval="$enable_pthreads_eintr"
12585 use_pthreads_eintr=$enableval
12586 else
12587 use_pthreads_eintr=no
12589 echo "$as_me:12589: result: $use_pthreads_eintr" >&5
12590 echo "${ECHO_T}$use_pthreads_eintr" >&6
12591 if test "x$use_pthreads_eintr" = xyes ; then
12593 cat >>confdefs.h <<\EOF
12594 #define USE_PTHREADS_EINTR 1
12600 echo "$as_me:12600: checking if you want to use weak-symbols for pthreads" >&5
12601 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12603 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12604 if test "${enable_weak_symbols+set}" = set; then
12605 enableval="$enable_weak_symbols"
12606 use_weak_symbols=$enableval
12607 else
12608 use_weak_symbols=no
12610 echo "$as_me:12610: result: $use_weak_symbols" >&5
12611 echo "${ECHO_T}$use_weak_symbols" >&6
12612 if test "x$use_weak_symbols" = xyes ; then
12614 echo "$as_me:12614: checking if $CC supports weak symbols" >&5
12615 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12616 if test "${cf_cv_weak_symbols+set}" = set; then
12617 echo $ECHO_N "(cached) $ECHO_C" >&6
12618 else
12620 cat >conftest.$ac_ext <<_ACEOF
12621 #line 12621 "configure"
12622 #include "confdefs.h"
12624 #include <stdio.h>
12626 main ()
12629 #if defined(__GNUC__)
12630 # if defined __USE_ISOC99
12631 # define _cat_pragma(exp) _Pragma(#exp)
12632 # define _weak_pragma(exp) _cat_pragma(weak name)
12633 # else
12634 # define _weak_pragma(exp)
12635 # endif
12636 # define _declare(name) __extension__ extern __typeof__(name) name
12637 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
12638 #endif
12640 weak_symbol(fopen);
12643 return 0;
12645 _ACEOF
12646 rm -f conftest.$ac_objext
12647 if { (eval echo "$as_me:12647: \"$ac_compile\"") >&5
12648 (eval $ac_compile) 2>&5
12649 ac_status=$?
12650 echo "$as_me:12650: \$? = $ac_status" >&5
12651 (exit $ac_status); } &&
12652 { ac_try='test -s conftest.$ac_objext'
12653 { (eval echo "$as_me:12653: \"$ac_try\"") >&5
12654 (eval $ac_try) 2>&5
12655 ac_status=$?
12656 echo "$as_me:12656: \$? = $ac_status" >&5
12657 (exit $ac_status); }; }; then
12658 cf_cv_weak_symbols=yes
12659 else
12660 echo "$as_me: failed program was:" >&5
12661 cat conftest.$ac_ext >&5
12662 cf_cv_weak_symbols=no
12664 rm -f conftest.$ac_objext conftest.$ac_ext
12667 echo "$as_me:12667: result: $cf_cv_weak_symbols" >&5
12668 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12670 else
12671 cf_cv_weak_symbols=no
12674 if test "x$cf_cv_weak_symbols" = xyes ; then
12676 cat >>confdefs.h <<\EOF
12677 #define USE_WEAK_SYMBOLS 1
12683 PTHREAD=
12684 if test "x$with_pthread" = "xyes" ; then
12686 cat >>confdefs.h <<\EOF
12687 #define USE_PTHREADS 1
12690 enable_reentrant=yes
12691 if test "x$cf_cv_weak_symbols" = xyes ; then
12692 PTHREAD=-lpthread
12696 # Reentrant code has to be opaque; there's little advantage to making ncurses
12697 # opaque outside of that, so there is no --enable-opaque option. We can use
12698 # this option without --with-pthreads, but this will be always set for
12699 # pthreads.
12700 echo "$as_me:12700: checking if you want reentrant code" >&5
12701 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12703 # Check whether --enable-reentrant or --disable-reentrant was given.
12704 if test "${enable_reentrant+set}" = set; then
12705 enableval="$enable_reentrant"
12706 with_reentrant=$enableval
12707 else
12708 with_reentrant=no
12710 echo "$as_me:12710: result: $with_reentrant" >&5
12711 echo "${ECHO_T}$with_reentrant" >&6
12712 if test "x$with_reentrant" = xyes ; then
12713 cf_cv_enable_reentrant=1
12714 cf_cv_enable_opaque="NCURSES_INTERNALS"
12715 NCURSES_OPAQUE=1
12716 NCURSES_SIZE_T=int
12717 if test "x$cf_cv_weak_symbols" = xyes ; then
12719 # remove pthread library from $LIBS
12720 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
12722 cf_add_libs="-lpthread"
12723 # Filter out duplicates - this happens with badly-designed ".pc" files...
12724 for cf_add_1lib in $TEST_LIBS
12726 for cf_add_2lib in $cf_add_libs
12728 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12729 then
12730 cf_add_1lib=
12731 break
12733 done
12734 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12735 done
12736 TEST_LIBS="$cf_add_libs"
12738 cf_add_libs="-lpthread"
12739 # Filter out duplicates - this happens with badly-designed ".pc" files...
12740 for cf_add_1lib in $TEST_LIBS2
12742 for cf_add_2lib in $cf_add_libs
12744 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12745 then
12746 cf_add_1lib=
12747 break
12749 done
12750 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12751 done
12752 TEST_LIBS2="$cf_add_libs"
12754 else
12755 # when not using weak symbols but with_reentrant,
12756 # add 't' to the library suffix on all platforms
12757 # except cygwin, where we only do that if ALSO
12758 # compiling with full thread support.
12759 case "$host" in
12760 (*cygwin* | *msys*)
12761 if test "$with_pthread" = "yes" ; then
12762 if test "x$disable_lib_suffixes" = "xno" ; then
12763 LIB_SUFFIX="t${LIB_SUFFIX}"
12765 fi ;;
12767 if test "x$disable_lib_suffixes" = "xno" ; then
12768 LIB_SUFFIX="t${LIB_SUFFIX}"
12771 esac
12774 cat >>confdefs.h <<\EOF
12775 #define USE_REENTRANT 1
12778 if test "${with_abi_version+set}" != set; then
12779 case $cf_cv_rel_version in
12780 (5.*)
12781 cf_cv_rel_version=6.0
12782 cf_cv_abi_version=6
12783 { echo "$as_me:12783: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12784 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12786 esac
12789 else
12790 cf_cv_enable_reentrant=0
12791 cf_cv_enable_opaque="NCURSES_OPAQUE"
12792 NCURSES_OPAQUE=0
12793 NCURSES_SIZE_T=short
12796 ### Allow using a different wrap-prefix
12797 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12798 echo "$as_me:12798: checking for prefix used to wrap public variables" >&5
12799 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12801 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12802 if test "${with_wrap_prefix+set}" = set; then
12803 withval="$with_wrap_prefix"
12804 NCURSES_WRAP_PREFIX=$withval
12805 else
12806 NCURSES_WRAP_PREFIX=_nc_
12808 echo "$as_me:12808: result: $NCURSES_WRAP_PREFIX" >&5
12809 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12810 else
12811 NCURSES_WRAP_PREFIX=_nc_
12814 cat >>confdefs.h <<EOF
12815 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12818 echo "$as_me:12818: checking if you want experimental safe-sprintf code" >&5
12819 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12821 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12822 if test "${enable_safe_sprintf+set}" = set; then
12823 enableval="$enable_safe_sprintf"
12824 with_safe_sprintf=$enableval
12825 else
12826 with_safe_sprintf=no
12828 echo "$as_me:12828: result: $with_safe_sprintf" >&5
12829 echo "${ECHO_T}$with_safe_sprintf" >&6
12830 test "x$with_safe_sprintf" = xyes &&
12831 cat >>confdefs.h <<\EOF
12832 #define USE_SAFE_SPRINTF 1
12835 ### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12836 # when hashmap is used scroll hints are useless
12837 if test "$with_hashmap" = no ; then
12838 echo "$as_me:12838: checking if you want to experiment without scrolling-hints code" >&5
12839 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12841 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12842 if test "${enable_scroll_hints+set}" = set; then
12843 enableval="$enable_scroll_hints"
12844 with_scroll_hints=$enableval
12845 else
12846 with_scroll_hints=yes
12848 echo "$as_me:12848: result: $with_scroll_hints" >&5
12849 echo "${ECHO_T}$with_scroll_hints" >&6
12850 test "x$with_scroll_hints" = xyes &&
12851 cat >>confdefs.h <<\EOF
12852 #define USE_SCROLL_HINTS 1
12857 echo "$as_me:12857: checking if you want wgetch-events code" >&5
12858 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
12860 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12861 if test "${enable_wgetch_events+set}" = set; then
12862 enableval="$enable_wgetch_events"
12863 with_wgetch_events=$enableval
12864 else
12865 with_wgetch_events=no
12867 echo "$as_me:12867: result: $with_wgetch_events" >&5
12868 echo "${ECHO_T}$with_wgetch_events" >&6
12869 test "x$with_wgetch_events" = xyes &&
12870 cat >>confdefs.h <<\EOF
12871 #define NCURSES_WGETCH_EVENTS 1
12874 ###############################################################################
12876 ### use option --disable-echo to suppress full display compiling commands
12878 echo "$as_me:12878: checking if you want to see long compiling messages" >&5
12879 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12881 # Check whether --enable-echo or --disable-echo was given.
12882 if test "${enable_echo+set}" = set; then
12883 enableval="$enable_echo"
12884 test "$enableval" != no && enableval=yes
12885 if test "$enableval" != "yes" ; then
12887 ECHO_LT='--silent'
12888 ECHO_LD='@echo linking $@;'
12889 RULE_CC='@echo compiling $<'
12890 SHOW_CC='@echo compiling $@'
12891 ECHO_CC='@'
12893 else
12895 ECHO_LT=''
12896 ECHO_LD=''
12897 RULE_CC=''
12898 SHOW_CC=''
12899 ECHO_CC=''
12902 else
12903 enableval=yes
12905 ECHO_LT=''
12906 ECHO_LD=''
12907 RULE_CC=''
12908 SHOW_CC=''
12909 ECHO_CC=''
12912 echo "$as_me:12912: result: $enableval" >&5
12913 echo "${ECHO_T}$enableval" >&6
12915 if test "x$enable_echo" = xyes; then
12916 ECHO_LINK=
12917 else
12918 ECHO_LINK='@ echo linking $@ ... ;'
12919 test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12920 test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12923 ### use option --enable-warnings to turn on all gcc warnings
12924 echo "$as_me:12924: checking if you want to see compiler warnings" >&5
12925 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12927 # Check whether --enable-warnings or --disable-warnings was given.
12928 if test "${enable_warnings+set}" = set; then
12929 enableval="$enable_warnings"
12930 with_warnings=$enableval
12932 echo "$as_me:12932: result: $with_warnings" >&5
12933 echo "${ECHO_T}$with_warnings" >&6
12935 if test "x$with_warnings" = "xyes"; then
12937 ADAFLAGS="$ADAFLAGS -gnatg"
12939 INTEL_COMPILER=no
12941 if test "$GCC" = yes ; then
12942 case $host_os in
12943 (linux*|gnu*)
12944 echo "$as_me:12944: checking if this is really Intel C compiler" >&5
12945 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12946 cf_save_CFLAGS="$CFLAGS"
12947 CFLAGS="$CFLAGS -no-gcc"
12948 cat >conftest.$ac_ext <<_ACEOF
12949 #line 12949 "configure"
12950 #include "confdefs.h"
12953 main ()
12956 #ifdef __INTEL_COMPILER
12957 #else
12958 make an error
12959 #endif
12962 return 0;
12964 _ACEOF
12965 rm -f conftest.$ac_objext
12966 if { (eval echo "$as_me:12966: \"$ac_compile\"") >&5
12967 (eval $ac_compile) 2>&5
12968 ac_status=$?
12969 echo "$as_me:12969: \$? = $ac_status" >&5
12970 (exit $ac_status); } &&
12971 { ac_try='test -s conftest.$ac_objext'
12972 { (eval echo "$as_me:12972: \"$ac_try\"") >&5
12973 (eval $ac_try) 2>&5
12974 ac_status=$?
12975 echo "$as_me:12975: \$? = $ac_status" >&5
12976 (exit $ac_status); }; }; then
12977 INTEL_COMPILER=yes
12978 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12980 else
12981 echo "$as_me: failed program was:" >&5
12982 cat conftest.$ac_ext >&5
12984 rm -f conftest.$ac_objext conftest.$ac_ext
12985 CFLAGS="$cf_save_CFLAGS"
12986 echo "$as_me:12986: result: $INTEL_COMPILER" >&5
12987 echo "${ECHO_T}$INTEL_COMPILER" >&6
12989 esac
12992 CLANG_COMPILER=no
12994 if test "$GCC" = yes ; then
12995 echo "$as_me:12995: checking if this is really Clang C compiler" >&5
12996 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12997 cf_save_CFLAGS="$CFLAGS"
12998 CFLAGS="$CFLAGS -Qunused-arguments"
12999 cat >conftest.$ac_ext <<_ACEOF
13000 #line 13000 "configure"
13001 #include "confdefs.h"
13004 main ()
13007 #ifdef __clang__
13008 #else
13009 make an error
13010 #endif
13013 return 0;
13015 _ACEOF
13016 rm -f conftest.$ac_objext
13017 if { (eval echo "$as_me:13017: \"$ac_compile\"") >&5
13018 (eval $ac_compile) 2>&5
13019 ac_status=$?
13020 echo "$as_me:13020: \$? = $ac_status" >&5
13021 (exit $ac_status); } &&
13022 { ac_try='test -s conftest.$ac_objext'
13023 { (eval echo "$as_me:13023: \"$ac_try\"") >&5
13024 (eval $ac_try) 2>&5
13025 ac_status=$?
13026 echo "$as_me:13026: \$? = $ac_status" >&5
13027 (exit $ac_status); }; }; then
13028 CLANG_COMPILER=yes
13029 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13031 else
13032 echo "$as_me: failed program was:" >&5
13033 cat conftest.$ac_ext >&5
13035 rm -f conftest.$ac_objext conftest.$ac_ext
13036 CFLAGS="$cf_save_CFLAGS"
13037 echo "$as_me:13037: result: $CLANG_COMPILER" >&5
13038 echo "${ECHO_T}$CLANG_COMPILER" >&6
13041 cat > conftest.$ac_ext <<EOF
13042 #line 13042 "${as_me:-configure}"
13043 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13046 if test "$INTEL_COMPILER" = yes
13047 then
13048 # The "-wdXXX" options suppress warnings:
13049 # remark #1419: external declaration in primary source file
13050 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13051 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13052 # remark #193: zero used for undefined preprocessing identifier
13053 # remark #593: variable "curs_sb_left_arrow" was set but never used
13054 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13055 # remark #869: parameter "tw" was never referenced
13056 # remark #981: operands are evaluated in unspecified order
13057 # warning #279: controlling expression is constant
13059 { echo "$as_me:13059: checking for $CC warning options..." >&5
13060 echo "$as_me: checking for $CC warning options..." >&6;}
13061 cf_save_CFLAGS="$CFLAGS"
13062 EXTRA_CFLAGS="-Wall"
13063 for cf_opt in \
13064 wd1419 \
13065 wd1683 \
13066 wd1684 \
13067 wd193 \
13068 wd593 \
13069 wd279 \
13070 wd810 \
13071 wd869 \
13072 wd981
13074 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13075 if { (eval echo "$as_me:13075: \"$ac_compile\"") >&5
13076 (eval $ac_compile) 2>&5
13077 ac_status=$?
13078 echo "$as_me:13078: \$? = $ac_status" >&5
13079 (exit $ac_status); }; then
13080 test -n "$verbose" && echo "$as_me:13080: result: ... -$cf_opt" >&5
13081 echo "${ECHO_T}... -$cf_opt" >&6
13082 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13084 done
13085 CFLAGS="$cf_save_CFLAGS"
13087 elif test "$GCC" = yes
13088 then
13089 { echo "$as_me:13089: checking for $CC warning options..." >&5
13090 echo "$as_me: checking for $CC warning options..." >&6;}
13091 cf_save_CFLAGS="$CFLAGS"
13092 EXTRA_CFLAGS=
13093 cf_warn_CONST=""
13094 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13095 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13096 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13097 for cf_opt in W Wall \
13098 Wbad-function-cast \
13099 Wcast-align \
13100 Wcast-qual \
13101 Wdeclaration-after-statement \
13102 Wextra \
13103 Winline \
13104 Wmissing-declarations \
13105 Wmissing-prototypes \
13106 Wnested-externs \
13107 Wpointer-arith \
13108 Wshadow \
13109 Wstrict-prototypes \
13110 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13112 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13113 if { (eval echo "$as_me:13113: \"$ac_compile\"") >&5
13114 (eval $ac_compile) 2>&5
13115 ac_status=$?
13116 echo "$as_me:13116: \$? = $ac_status" >&5
13117 (exit $ac_status); }; then
13118 test -n "$verbose" && echo "$as_me:13118: result: ... -$cf_opt" >&5
13119 echo "${ECHO_T}... -$cf_opt" >&6
13120 case $cf_opt in
13121 (Wcast-qual)
13122 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13124 (Winline)
13125 case $GCC_VERSION in
13126 ([34].*)
13127 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13129 echo "${as_me:-configure}:13129: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13131 continue;;
13132 esac
13134 (Wpointer-arith)
13135 case $GCC_VERSION in
13136 ([12].*)
13137 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13139 echo "${as_me:-configure}:13139: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13141 continue;;
13142 esac
13144 esac
13145 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13147 done
13148 CFLAGS="$cf_save_CFLAGS"
13150 rm -rf conftest*
13152 if test "x$cf_with_cxx" = xyes ; then
13154 INTEL_CPLUSPLUS=no
13156 if test "$GCC" = yes ; then
13157 case $host_os in
13158 (linux*|gnu*)
13159 echo "$as_me:13159: checking if this is really Intel C++ compiler" >&5
13160 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13161 cf_save_CFLAGS="$CXXFLAGS"
13162 CXXFLAGS="$CXXFLAGS -no-gcc"
13163 cat >conftest.$ac_ext <<_ACEOF
13164 #line 13164 "configure"
13165 #include "confdefs.h"
13168 main ()
13171 #ifdef __INTEL_COMPILER
13172 #else
13173 make an error
13174 #endif
13177 return 0;
13179 _ACEOF
13180 rm -f conftest.$ac_objext
13181 if { (eval echo "$as_me:13181: \"$ac_compile\"") >&5
13182 (eval $ac_compile) 2>&5
13183 ac_status=$?
13184 echo "$as_me:13184: \$? = $ac_status" >&5
13185 (exit $ac_status); } &&
13186 { ac_try='test -s conftest.$ac_objext'
13187 { (eval echo "$as_me:13187: \"$ac_try\"") >&5
13188 (eval $ac_try) 2>&5
13189 ac_status=$?
13190 echo "$as_me:13190: \$? = $ac_status" >&5
13191 (exit $ac_status); }; }; then
13192 INTEL_CPLUSPLUS=yes
13193 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13195 else
13196 echo "$as_me: failed program was:" >&5
13197 cat conftest.$ac_ext >&5
13199 rm -f conftest.$ac_objext conftest.$ac_ext
13200 CXXFLAGS="$cf_save_CFLAGS"
13201 echo "$as_me:13201: result: $INTEL_CPLUSPLUS" >&5
13202 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13204 esac
13207 CLANG_CPLUSPLUS=no
13209 if test "$GCC" = yes ; then
13210 echo "$as_me:13210: checking if this is really Clang C++ compiler" >&5
13211 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13212 cf_save_CFLAGS="$CXXFLAGS"
13213 CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13214 cat >conftest.$ac_ext <<_ACEOF
13215 #line 13215 "configure"
13216 #include "confdefs.h"
13219 main ()
13222 #ifdef __clang__
13223 #else
13224 make an error
13225 #endif
13228 return 0;
13230 _ACEOF
13231 rm -f conftest.$ac_objext
13232 if { (eval echo "$as_me:13232: \"$ac_compile\"") >&5
13233 (eval $ac_compile) 2>&5
13234 ac_status=$?
13235 echo "$as_me:13235: \$? = $ac_status" >&5
13236 (exit $ac_status); } &&
13237 { ac_try='test -s conftest.$ac_objext'
13238 { (eval echo "$as_me:13238: \"$ac_try\"") >&5
13239 (eval $ac_try) 2>&5
13240 ac_status=$?
13241 echo "$as_me:13241: \$? = $ac_status" >&5
13242 (exit $ac_status); }; }; then
13243 CLANG_CPLUSPLUS=yes
13244 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13246 else
13247 echo "$as_me: failed program was:" >&5
13248 cat conftest.$ac_ext >&5
13250 rm -f conftest.$ac_objext conftest.$ac_ext
13251 CXXFLAGS="$cf_save_CFLAGS"
13252 echo "$as_me:13252: result: $CLANG_CPLUSPLUS" >&5
13253 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13256 ac_ext=cc
13257 ac_cpp='$CXXCPP $CPPFLAGS'
13258 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13259 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13260 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13261 ac_main_return=return
13263 cat > conftest.$ac_ext <<EOF
13264 #line 13264 "configure"
13265 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13268 if test "$INTEL_CPLUSPLUS" = yes
13269 then
13270 # The "-wdXXX" options suppress warnings:
13271 # remark #1419: external declaration in primary source file
13272 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13273 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13274 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13275 # remark #193: zero used for undefined preprocessing identifier
13276 # remark #593: variable "curs_sb_left_arrow" was set but never used
13277 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13278 # remark #869: parameter "tw" was never referenced
13279 # remark #981: operands are evaluated in unspecified order
13280 # warning #269: invalid format string conversion
13282 { echo "$as_me:13282: checking for $CC warning options..." >&5
13283 echo "$as_me: checking for $CC warning options..." >&6;}
13284 cf_save_CXXFLAGS="$CXXFLAGS"
13285 EXTRA_CXXFLAGS="-Wall"
13286 for cf_opt in \
13287 wd1419 \
13288 wd1682 \
13289 wd1683 \
13290 wd1684 \
13291 wd193 \
13292 wd279 \
13293 wd593 \
13294 wd810 \
13295 wd869 \
13296 wd981
13298 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13299 if { (eval echo "$as_me:13299: \"$ac_compile\"") >&5
13300 (eval $ac_compile) 2>&5
13301 ac_status=$?
13302 echo "$as_me:13302: \$? = $ac_status" >&5
13303 (exit $ac_status); }; then
13304 test -n "$verbose" && echo "$as_me:13304: result: ... -$cf_opt" >&5
13305 echo "${ECHO_T}... -$cf_opt" >&6
13306 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13308 done
13309 CXXFLAGS="$cf_save_CXXFLAGS"
13311 elif test "$GXX" = yes
13312 then
13313 { echo "$as_me:13313: checking for $CXX warning options..." >&5
13314 echo "$as_me: checking for $CXX warning options..." >&6;}
13315 cf_save_CXXFLAGS="$CXXFLAGS"
13316 EXTRA_CXXFLAGS="-W -Wall"
13317 cf_gxx_extra_warnings=""
13318 test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13319 case "$GCC_VERSION" in
13320 ([1-2].*)
13323 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13325 esac
13326 for cf_opt in \
13327 Wabi \
13328 fabi-version=0 \
13329 Wextra \
13330 Wignored-qualifiers \
13331 Wlogical-op \
13332 Woverloaded-virtual \
13333 Wsign-promo \
13334 Wsynth \
13335 Wold-style-cast \
13336 Wcast-align \
13337 Wcast-qual \
13338 Wpointer-arith \
13339 Wshadow \
13340 Wundef $cf_gxx_extra_warnings Wno-unused
13342 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13343 if { (eval echo "$as_me:13343: \"$ac_compile\"") >&5
13344 (eval $ac_compile) 2>&5
13345 ac_status=$?
13346 echo "$as_me:13346: \$? = $ac_status" >&5
13347 (exit $ac_status); }; then
13348 test -n "$verbose" && echo "$as_me:13348: result: ... -$cf_opt" >&5
13349 echo "${ECHO_T}... -$cf_opt" >&6
13350 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13351 else
13352 test -n "$verbose" && echo "$as_me:13352: result: ... no -$cf_opt" >&5
13353 echo "${ECHO_T}... no -$cf_opt" >&6
13355 done
13356 CXXFLAGS="$cf_save_CXXFLAGS"
13359 rm -rf conftest*
13360 ac_ext=c
13361 ac_cpp='$CPP $CPPFLAGS'
13362 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13363 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13364 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13365 ac_main_return=return
13370 if test "$GCC" = yes
13371 then
13372 cat > conftest.i <<EOF
13373 #ifndef GCC_PRINTF
13374 #define GCC_PRINTF 0
13375 #endif
13376 #ifndef GCC_SCANF
13377 #define GCC_SCANF 0
13378 #endif
13379 #ifndef GCC_NORETURN
13380 #define GCC_NORETURN /* nothing */
13381 #endif
13382 #ifndef GCC_UNUSED
13383 #define GCC_UNUSED /* nothing */
13384 #endif
13386 if test "$GCC" = yes
13387 then
13388 { echo "$as_me:13388: checking for $CC __attribute__ directives..." >&5
13389 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13390 cat > conftest.$ac_ext <<EOF
13391 #line 13391 "${as_me:-configure}"
13392 #include "confdefs.h"
13393 #include "conftest.h"
13394 #include "conftest.i"
13395 #if GCC_PRINTF
13396 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13397 #else
13398 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13399 #endif
13400 #if GCC_SCANF
13401 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
13402 #else
13403 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
13404 #endif
13405 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13406 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13407 extern void foo(void) GCC_NORETURN;
13408 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13410 cf_printf_attribute=no
13411 cf_scanf_attribute=no
13412 for cf_attribute in scanf printf unused noreturn
13415 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13417 cf_directive="__attribute__(($cf_attribute))"
13418 echo "checking for $CC $cf_directive" 1>&5
13420 case $cf_attribute in
13421 (printf)
13422 cf_printf_attribute=yes
13423 cat >conftest.h <<EOF
13424 #define GCC_$cf_ATTRIBUTE 1
13427 (scanf)
13428 cf_scanf_attribute=yes
13429 cat >conftest.h <<EOF
13430 #define GCC_$cf_ATTRIBUTE 1
13434 cat >conftest.h <<EOF
13435 #define GCC_$cf_ATTRIBUTE $cf_directive
13438 esac
13440 if { (eval echo "$as_me:13440: \"$ac_compile\"") >&5
13441 (eval $ac_compile) 2>&5
13442 ac_status=$?
13443 echo "$as_me:13443: \$? = $ac_status" >&5
13444 (exit $ac_status); }; then
13445 test -n "$verbose" && echo "$as_me:13445: result: ... $cf_attribute" >&5
13446 echo "${ECHO_T}... $cf_attribute" >&6
13447 cat conftest.h >>confdefs.h
13448 case $cf_attribute in
13449 (noreturn)
13451 cat >>confdefs.h <<EOF
13452 #define GCC_NORETURN $cf_directive
13456 (printf)
13457 cf_value='/* nothing */'
13458 if test "$cf_printf_attribute" != no ; then
13459 cf_value='__attribute__((format(printf,fmt,var)))'
13461 cat >>confdefs.h <<\EOF
13462 #define GCC_PRINTF 1
13467 cat >>confdefs.h <<EOF
13468 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13472 (scanf)
13473 cf_value='/* nothing */'
13474 if test "$cf_scanf_attribute" != no ; then
13475 cf_value='__attribute__((format(scanf,fmt,var)))'
13477 cat >>confdefs.h <<\EOF
13478 #define GCC_SCANF 1
13483 cat >>confdefs.h <<EOF
13484 #define GCC_SCANFLIKE(fmt,var) $cf_value
13488 (unused)
13490 cat >>confdefs.h <<EOF
13491 #define GCC_UNUSED $cf_directive
13495 esac
13497 done
13498 else
13499 fgrep define conftest.i >>confdefs.h
13501 rm -rf conftest*
13504 echo "$as_me:13504: checking if you want to work around bogus compiler/loader warnings" >&5
13505 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13507 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13508 if test "${enable_string_hacks+set}" = set; then
13509 enableval="$enable_string_hacks"
13510 with_string_hacks=$enableval
13511 else
13512 with_string_hacks=no
13514 echo "$as_me:13514: result: $with_string_hacks" >&5
13515 echo "${ECHO_T}$with_string_hacks" >&6
13517 if test "x$with_string_hacks" = "xyes"; then
13519 cat >>confdefs.h <<\EOF
13520 #define USE_STRING_HACKS 1
13523 { echo "$as_me:13523: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13524 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13526 for ac_func in strlcat strlcpy snprintf
13528 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13529 echo "$as_me:13529: checking for $ac_func" >&5
13530 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13531 if eval "test \"\${$as_ac_var+set}\" = set"; then
13532 echo $ECHO_N "(cached) $ECHO_C" >&6
13533 else
13534 cat >conftest.$ac_ext <<_ACEOF
13535 #line 13535 "configure"
13536 #include "confdefs.h"
13537 /* System header to define __stub macros and hopefully few prototypes,
13538 which can conflict with char $ac_func (); below. */
13539 #include <assert.h>
13540 /* Override any gcc2 internal prototype to avoid an error. */
13541 #ifdef __cplusplus
13542 extern "C"
13543 #endif
13544 /* We use char because int might match the return type of a gcc2
13545 builtin and then its argument prototype would still apply. */
13546 char $ac_func ();
13547 char (*f) ();
13550 main ()
13552 /* The GNU C library defines this for functions which it implements
13553 to always fail with ENOSYS. Some functions are actually named
13554 something starting with __ and the normal name is an alias. */
13555 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13556 choke me
13557 #else
13558 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13559 #endif
13562 return 0;
13564 _ACEOF
13565 rm -f conftest.$ac_objext conftest$ac_exeext
13566 if { (eval echo "$as_me:13566: \"$ac_link\"") >&5
13567 (eval $ac_link) 2>&5
13568 ac_status=$?
13569 echo "$as_me:13569: \$? = $ac_status" >&5
13570 (exit $ac_status); } &&
13571 { ac_try='test -s conftest$ac_exeext'
13572 { (eval echo "$as_me:13572: \"$ac_try\"") >&5
13573 (eval $ac_try) 2>&5
13574 ac_status=$?
13575 echo "$as_me:13575: \$? = $ac_status" >&5
13576 (exit $ac_status); }; }; then
13577 eval "$as_ac_var=yes"
13578 else
13579 echo "$as_me: failed program was:" >&5
13580 cat conftest.$ac_ext >&5
13581 eval "$as_ac_var=no"
13583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13585 echo "$as_me:13585: result: `eval echo '${'$as_ac_var'}'`" >&5
13586 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13587 if test `eval echo '${'$as_ac_var'}'` = yes; then
13588 cat >>confdefs.h <<EOF
13589 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13593 done
13597 ### use option --enable-assertions to turn on generation of assertion code
13598 echo "$as_me:13598: checking if you want to enable runtime assertions" >&5
13599 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13601 # Check whether --enable-assertions or --disable-assertions was given.
13602 if test "${enable_assertions+set}" = set; then
13603 enableval="$enable_assertions"
13604 with_assertions=$enableval
13605 else
13606 with_assertions=no
13608 echo "$as_me:13608: result: $with_assertions" >&5
13609 echo "${ECHO_T}$with_assertions" >&6
13610 if test -n "$GCC"
13611 then
13612 if test "$with_assertions" = no
13613 then
13614 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13615 else
13617 ADAFLAGS="$ADAFLAGS -gnata"
13622 ### use option --disable-leaks to suppress "permanent" leaks, for testing
13624 echo "$as_me:13624: checking if you want to use dmalloc for testing" >&5
13625 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13627 # Check whether --with-dmalloc or --without-dmalloc was given.
13628 if test "${with_dmalloc+set}" = set; then
13629 withval="$with_dmalloc"
13631 cat >>confdefs.h <<EOF
13632 #define USE_DMALLOC 1
13635 : ${with_cflags:=-g}
13636 : ${with_no_leaks:=yes}
13637 with_dmalloc=yes
13638 else
13639 with_dmalloc=
13641 echo "$as_me:13641: result: ${with_dmalloc:-no}" >&5
13642 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13644 case .$with_cflags in
13645 (.*-g*)
13646 case .$CFLAGS in
13647 (.*-g*)
13651 cf_fix_cppflags=no
13652 cf_new_cflags=
13653 cf_new_cppflags=
13654 cf_new_extra_cppflags=
13656 for cf_add_cflags in -g
13658 case $cf_fix_cppflags in
13659 (no)
13660 case $cf_add_cflags in
13661 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13662 case $cf_add_cflags in
13663 (-D*)
13664 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13666 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13667 && test -z "${cf_tst_cflags}" \
13668 && cf_fix_cppflags=yes
13670 if test $cf_fix_cppflags = yes ; then
13671 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13672 continue
13673 elif test "${cf_tst_cflags}" = "\"'" ; then
13674 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13675 continue
13678 esac
13679 case "$CPPFLAGS" in
13680 (*$cf_add_cflags)
13683 case $cf_add_cflags in
13684 (-D*)
13685 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13687 CPPFLAGS=`echo "$CPPFLAGS" | \
13688 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13689 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13692 esac
13693 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13695 esac
13698 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13700 esac
13702 (yes)
13703 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13705 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13707 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13708 && test -z "${cf_tst_cflags}" \
13709 && cf_fix_cppflags=no
13711 esac
13712 done
13714 if test -n "$cf_new_cflags" ; then
13716 CFLAGS="$CFLAGS $cf_new_cflags"
13719 if test -n "$cf_new_cppflags" ; then
13721 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13724 if test -n "$cf_new_extra_cppflags" ; then
13726 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13730 esac
13732 esac
13734 if test "$with_dmalloc" = yes ; then
13735 echo "$as_me:13735: checking for dmalloc.h" >&5
13736 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13737 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13738 echo $ECHO_N "(cached) $ECHO_C" >&6
13739 else
13740 cat >conftest.$ac_ext <<_ACEOF
13741 #line 13741 "configure"
13742 #include "confdefs.h"
13743 #include <dmalloc.h>
13744 _ACEOF
13745 if { (eval echo "$as_me:13745: \"$ac_cpp conftest.$ac_ext\"") >&5
13746 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13747 ac_status=$?
13748 egrep -v '^ *\+' conftest.er1 >conftest.err
13749 rm -f conftest.er1
13750 cat conftest.err >&5
13751 echo "$as_me:13751: \$? = $ac_status" >&5
13752 (exit $ac_status); } >/dev/null; then
13753 if test -s conftest.err; then
13754 ac_cpp_err=$ac_c_preproc_warn_flag
13755 else
13756 ac_cpp_err=
13758 else
13759 ac_cpp_err=yes
13761 if test -z "$ac_cpp_err"; then
13762 ac_cv_header_dmalloc_h=yes
13763 else
13764 echo "$as_me: failed program was:" >&5
13765 cat conftest.$ac_ext >&5
13766 ac_cv_header_dmalloc_h=no
13768 rm -f conftest.err conftest.$ac_ext
13770 echo "$as_me:13770: result: $ac_cv_header_dmalloc_h" >&5
13771 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13772 if test $ac_cv_header_dmalloc_h = yes; then
13774 echo "$as_me:13774: checking for dmalloc_debug in -ldmalloc" >&5
13775 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13776 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13777 echo $ECHO_N "(cached) $ECHO_C" >&6
13778 else
13779 ac_check_lib_save_LIBS=$LIBS
13780 LIBS="-ldmalloc $LIBS"
13781 cat >conftest.$ac_ext <<_ACEOF
13782 #line 13782 "configure"
13783 #include "confdefs.h"
13785 /* Override any gcc2 internal prototype to avoid an error. */
13786 #ifdef __cplusplus
13787 extern "C"
13788 #endif
13789 /* We use char because int might match the return type of a gcc2
13790 builtin and then its argument prototype would still apply. */
13791 char dmalloc_debug ();
13793 main ()
13795 dmalloc_debug ();
13797 return 0;
13799 _ACEOF
13800 rm -f conftest.$ac_objext conftest$ac_exeext
13801 if { (eval echo "$as_me:13801: \"$ac_link\"") >&5
13802 (eval $ac_link) 2>&5
13803 ac_status=$?
13804 echo "$as_me:13804: \$? = $ac_status" >&5
13805 (exit $ac_status); } &&
13806 { ac_try='test -s conftest$ac_exeext'
13807 { (eval echo "$as_me:13807: \"$ac_try\"") >&5
13808 (eval $ac_try) 2>&5
13809 ac_status=$?
13810 echo "$as_me:13810: \$? = $ac_status" >&5
13811 (exit $ac_status); }; }; then
13812 ac_cv_lib_dmalloc_dmalloc_debug=yes
13813 else
13814 echo "$as_me: failed program was:" >&5
13815 cat conftest.$ac_ext >&5
13816 ac_cv_lib_dmalloc_dmalloc_debug=no
13818 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13819 LIBS=$ac_check_lib_save_LIBS
13821 echo "$as_me:13821: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13822 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13823 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13824 cat >>confdefs.h <<EOF
13825 #define HAVE_LIBDMALLOC 1
13828 LIBS="-ldmalloc $LIBS"
13836 echo "$as_me:13836: checking if you want to use dbmalloc for testing" >&5
13837 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13839 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13840 if test "${with_dbmalloc+set}" = set; then
13841 withval="$with_dbmalloc"
13843 cat >>confdefs.h <<EOF
13844 #define USE_DBMALLOC 1
13847 : ${with_cflags:=-g}
13848 : ${with_no_leaks:=yes}
13849 with_dbmalloc=yes
13850 else
13851 with_dbmalloc=
13853 echo "$as_me:13853: result: ${with_dbmalloc:-no}" >&5
13854 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13856 case .$with_cflags in
13857 (.*-g*)
13858 case .$CFLAGS in
13859 (.*-g*)
13863 cf_fix_cppflags=no
13864 cf_new_cflags=
13865 cf_new_cppflags=
13866 cf_new_extra_cppflags=
13868 for cf_add_cflags in -g
13870 case $cf_fix_cppflags in
13871 (no)
13872 case $cf_add_cflags in
13873 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13874 case $cf_add_cflags in
13875 (-D*)
13876 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13878 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13879 && test -z "${cf_tst_cflags}" \
13880 && cf_fix_cppflags=yes
13882 if test $cf_fix_cppflags = yes ; then
13883 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13884 continue
13885 elif test "${cf_tst_cflags}" = "\"'" ; then
13886 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13887 continue
13890 esac
13891 case "$CPPFLAGS" in
13892 (*$cf_add_cflags)
13895 case $cf_add_cflags in
13896 (-D*)
13897 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13899 CPPFLAGS=`echo "$CPPFLAGS" | \
13900 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13901 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13904 esac
13905 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13907 esac
13910 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13912 esac
13914 (yes)
13915 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13917 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13919 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13920 && test -z "${cf_tst_cflags}" \
13921 && cf_fix_cppflags=no
13923 esac
13924 done
13926 if test -n "$cf_new_cflags" ; then
13928 CFLAGS="$CFLAGS $cf_new_cflags"
13931 if test -n "$cf_new_cppflags" ; then
13933 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13936 if test -n "$cf_new_extra_cppflags" ; then
13938 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13942 esac
13944 esac
13946 if test "$with_dbmalloc" = yes ; then
13947 echo "$as_me:13947: checking for dbmalloc.h" >&5
13948 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13949 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13950 echo $ECHO_N "(cached) $ECHO_C" >&6
13951 else
13952 cat >conftest.$ac_ext <<_ACEOF
13953 #line 13953 "configure"
13954 #include "confdefs.h"
13955 #include <dbmalloc.h>
13956 _ACEOF
13957 if { (eval echo "$as_me:13957: \"$ac_cpp conftest.$ac_ext\"") >&5
13958 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13959 ac_status=$?
13960 egrep -v '^ *\+' conftest.er1 >conftest.err
13961 rm -f conftest.er1
13962 cat conftest.err >&5
13963 echo "$as_me:13963: \$? = $ac_status" >&5
13964 (exit $ac_status); } >/dev/null; then
13965 if test -s conftest.err; then
13966 ac_cpp_err=$ac_c_preproc_warn_flag
13967 else
13968 ac_cpp_err=
13970 else
13971 ac_cpp_err=yes
13973 if test -z "$ac_cpp_err"; then
13974 ac_cv_header_dbmalloc_h=yes
13975 else
13976 echo "$as_me: failed program was:" >&5
13977 cat conftest.$ac_ext >&5
13978 ac_cv_header_dbmalloc_h=no
13980 rm -f conftest.err conftest.$ac_ext
13982 echo "$as_me:13982: result: $ac_cv_header_dbmalloc_h" >&5
13983 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13984 if test $ac_cv_header_dbmalloc_h = yes; then
13986 echo "$as_me:13986: checking for debug_malloc in -ldbmalloc" >&5
13987 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13988 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13989 echo $ECHO_N "(cached) $ECHO_C" >&6
13990 else
13991 ac_check_lib_save_LIBS=$LIBS
13992 LIBS="-ldbmalloc $LIBS"
13993 cat >conftest.$ac_ext <<_ACEOF
13994 #line 13994 "configure"
13995 #include "confdefs.h"
13997 /* Override any gcc2 internal prototype to avoid an error. */
13998 #ifdef __cplusplus
13999 extern "C"
14000 #endif
14001 /* We use char because int might match the return type of a gcc2
14002 builtin and then its argument prototype would still apply. */
14003 char debug_malloc ();
14005 main ()
14007 debug_malloc ();
14009 return 0;
14011 _ACEOF
14012 rm -f conftest.$ac_objext conftest$ac_exeext
14013 if { (eval echo "$as_me:14013: \"$ac_link\"") >&5
14014 (eval $ac_link) 2>&5
14015 ac_status=$?
14016 echo "$as_me:14016: \$? = $ac_status" >&5
14017 (exit $ac_status); } &&
14018 { ac_try='test -s conftest$ac_exeext'
14019 { (eval echo "$as_me:14019: \"$ac_try\"") >&5
14020 (eval $ac_try) 2>&5
14021 ac_status=$?
14022 echo "$as_me:14022: \$? = $ac_status" >&5
14023 (exit $ac_status); }; }; then
14024 ac_cv_lib_dbmalloc_debug_malloc=yes
14025 else
14026 echo "$as_me: failed program was:" >&5
14027 cat conftest.$ac_ext >&5
14028 ac_cv_lib_dbmalloc_debug_malloc=no
14030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14031 LIBS=$ac_check_lib_save_LIBS
14033 echo "$as_me:14033: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14034 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14035 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14036 cat >>confdefs.h <<EOF
14037 #define HAVE_LIBDBMALLOC 1
14040 LIBS="-ldbmalloc $LIBS"
14048 echo "$as_me:14048: checking if you want to use valgrind for testing" >&5
14049 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14051 # Check whether --with-valgrind or --without-valgrind was given.
14052 if test "${with_valgrind+set}" = set; then
14053 withval="$with_valgrind"
14055 cat >>confdefs.h <<EOF
14056 #define USE_VALGRIND 1
14059 : ${with_cflags:=-g}
14060 : ${with_no_leaks:=yes}
14061 with_valgrind=yes
14062 else
14063 with_valgrind=
14065 echo "$as_me:14065: result: ${with_valgrind:-no}" >&5
14066 echo "${ECHO_T}${with_valgrind:-no}" >&6
14068 case .$with_cflags in
14069 (.*-g*)
14070 case .$CFLAGS in
14071 (.*-g*)
14075 cf_fix_cppflags=no
14076 cf_new_cflags=
14077 cf_new_cppflags=
14078 cf_new_extra_cppflags=
14080 for cf_add_cflags in -g
14082 case $cf_fix_cppflags in
14083 (no)
14084 case $cf_add_cflags in
14085 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14086 case $cf_add_cflags in
14087 (-D*)
14088 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14090 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14091 && test -z "${cf_tst_cflags}" \
14092 && cf_fix_cppflags=yes
14094 if test $cf_fix_cppflags = yes ; then
14095 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14096 continue
14097 elif test "${cf_tst_cflags}" = "\"'" ; then
14098 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14099 continue
14102 esac
14103 case "$CPPFLAGS" in
14104 (*$cf_add_cflags)
14107 case $cf_add_cflags in
14108 (-D*)
14109 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14111 CPPFLAGS=`echo "$CPPFLAGS" | \
14112 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14113 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14116 esac
14117 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14119 esac
14122 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14124 esac
14126 (yes)
14127 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14129 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14131 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14132 && test -z "${cf_tst_cflags}" \
14133 && cf_fix_cppflags=no
14135 esac
14136 done
14138 if test -n "$cf_new_cflags" ; then
14140 CFLAGS="$CFLAGS $cf_new_cflags"
14143 if test -n "$cf_new_cppflags" ; then
14145 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14148 if test -n "$cf_new_extra_cppflags" ; then
14150 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14154 esac
14156 esac
14158 echo "$as_me:14158: checking if you want to perform memory-leak testing" >&5
14159 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14161 # Check whether --enable-leaks or --disable-leaks was given.
14162 if test "${enable_leaks+set}" = set; then
14163 enableval="$enable_leaks"
14164 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14165 else
14166 : ${with_no_leaks:=no}
14168 echo "$as_me:14168: result: $with_no_leaks" >&5
14169 echo "${ECHO_T}$with_no_leaks" >&6
14171 if test "$with_no_leaks" = yes ; then
14173 cat >>confdefs.h <<\EOF
14174 #define NO_LEAKS 1
14177 cat >>confdefs.h <<\EOF
14178 #define YY_NO_LEAKS 1
14183 cat >>confdefs.h <<\EOF
14184 #define HAVE_NC_ALLOC_H 1
14187 ### use option --enable-expanded to generate certain macros as functions
14189 # Check whether --enable-expanded or --disable-expanded was given.
14190 if test "${enable_expanded+set}" = set; then
14191 enableval="$enable_expanded"
14192 test "x$enableval" = xyes &&
14193 cat >>confdefs.h <<\EOF
14194 #define NCURSES_EXPANDED 1
14199 ### use option --disable-macros to suppress macros in favor of functions
14201 # Check whether --enable-macros or --disable-macros was given.
14202 if test "${enable_macros+set}" = set; then
14203 enableval="$enable_macros"
14204 test "$enableval" = no &&
14205 cat >>confdefs.h <<\EOF
14206 #define NCURSES_NOMACROS 1
14211 # Normally we only add trace() to the debug-library. Allow this to be
14212 # extended to all models of the ncurses library:
14213 cf_all_traces=no
14214 case "$CFLAGS $CPPFLAGS" in
14215 (*-DTRACE*)
14216 cf_all_traces=yes
14218 esac
14220 echo "$as_me:14220: checking whether to add trace feature to all models" >&5
14221 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14223 # Check whether --with-trace or --without-trace was given.
14224 if test "${with_trace+set}" = set; then
14225 withval="$with_trace"
14226 cf_with_trace=$withval
14227 else
14228 cf_with_trace=$cf_all_traces
14230 echo "$as_me:14230: result: $cf_with_trace" >&5
14231 echo "${ECHO_T}$cf_with_trace" >&6
14233 if test "x$cf_with_trace" = xyes ; then
14234 LIB_TRACING=all
14235 ADA_TRACE=TRUE
14237 cf_fix_cppflags=no
14238 cf_new_cflags=
14239 cf_new_cppflags=
14240 cf_new_extra_cppflags=
14242 for cf_add_cflags in -DTRACE
14244 case $cf_fix_cppflags in
14245 (no)
14246 case $cf_add_cflags in
14247 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14248 case $cf_add_cflags in
14249 (-D*)
14250 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14252 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14253 && test -z "${cf_tst_cflags}" \
14254 && cf_fix_cppflags=yes
14256 if test $cf_fix_cppflags = yes ; then
14257 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14258 continue
14259 elif test "${cf_tst_cflags}" = "\"'" ; then
14260 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14261 continue
14264 esac
14265 case "$CPPFLAGS" in
14266 (*$cf_add_cflags)
14269 case $cf_add_cflags in
14270 (-D*)
14271 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14273 CPPFLAGS=`echo "$CPPFLAGS" | \
14274 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14275 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14278 esac
14279 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14281 esac
14284 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14286 esac
14288 (yes)
14289 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14291 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14293 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14294 && test -z "${cf_tst_cflags}" \
14295 && cf_fix_cppflags=no
14297 esac
14298 done
14300 if test -n "$cf_new_cflags" ; then
14302 CFLAGS="$CFLAGS $cf_new_cflags"
14305 if test -n "$cf_new_cppflags" ; then
14307 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14310 if test -n "$cf_new_extra_cppflags" ; then
14312 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14315 else
14316 LIB_TRACING=DEBUG
14317 ADA_TRACE=FALSE
14320 echo "$as_me:14320: checking if we want to use GNAT projects" >&5
14321 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14323 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14324 if test "${enable_gnat_projects+set}" = set; then
14325 enableval="$enable_gnat_projects"
14326 test "$enableval" != no && enableval=yes
14327 if test "$enableval" != "yes" ; then
14328 enable_gnat_projects=no
14329 else
14330 enable_gnat_projects=yes
14332 else
14333 enableval=yes
14334 enable_gnat_projects=yes
14337 echo "$as_me:14337: result: $enable_gnat_projects" >&5
14338 echo "${ECHO_T}$enable_gnat_projects" >&6
14340 ### Checks for libraries.
14341 case $cf_cv_system_name in
14342 (*mingw32*|*mingw64*)
14343 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14344 LIBS=" -lpsapi $LIBS"
14347 echo "$as_me:14347: checking for gettimeofday" >&5
14348 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14349 if test "${ac_cv_func_gettimeofday+set}" = set; then
14350 echo $ECHO_N "(cached) $ECHO_C" >&6
14351 else
14352 cat >conftest.$ac_ext <<_ACEOF
14353 #line 14353 "configure"
14354 #include "confdefs.h"
14355 /* System header to define __stub macros and hopefully few prototypes,
14356 which can conflict with char gettimeofday (); below. */
14357 #include <assert.h>
14358 /* Override any gcc2 internal prototype to avoid an error. */
14359 #ifdef __cplusplus
14360 extern "C"
14361 #endif
14362 /* We use char because int might match the return type of a gcc2
14363 builtin and then its argument prototype would still apply. */
14364 char gettimeofday ();
14365 char (*f) ();
14368 main ()
14370 /* The GNU C library defines this for functions which it implements
14371 to always fail with ENOSYS. Some functions are actually named
14372 something starting with __ and the normal name is an alias. */
14373 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14374 choke me
14375 #else
14376 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14377 #endif
14380 return 0;
14382 _ACEOF
14383 rm -f conftest.$ac_objext conftest$ac_exeext
14384 if { (eval echo "$as_me:14384: \"$ac_link\"") >&5
14385 (eval $ac_link) 2>&5
14386 ac_status=$?
14387 echo "$as_me:14387: \$? = $ac_status" >&5
14388 (exit $ac_status); } &&
14389 { ac_try='test -s conftest$ac_exeext'
14390 { (eval echo "$as_me:14390: \"$ac_try\"") >&5
14391 (eval $ac_try) 2>&5
14392 ac_status=$?
14393 echo "$as_me:14393: \$? = $ac_status" >&5
14394 (exit $ac_status); }; }; then
14395 ac_cv_func_gettimeofday=yes
14396 else
14397 echo "$as_me: failed program was:" >&5
14398 cat conftest.$ac_ext >&5
14399 ac_cv_func_gettimeofday=no
14401 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14403 echo "$as_me:14403: result: $ac_cv_func_gettimeofday" >&5
14404 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14405 if test $ac_cv_func_gettimeofday = yes; then
14407 cat >>confdefs.h <<\EOF
14408 #define HAVE_GETTIMEOFDAY 1
14411 else
14413 echo "$as_me:14413: checking for gettimeofday in -lbsd" >&5
14414 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14415 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14416 echo $ECHO_N "(cached) $ECHO_C" >&6
14417 else
14418 ac_check_lib_save_LIBS=$LIBS
14419 LIBS="-lbsd $LIBS"
14420 cat >conftest.$ac_ext <<_ACEOF
14421 #line 14421 "configure"
14422 #include "confdefs.h"
14424 /* Override any gcc2 internal prototype to avoid an error. */
14425 #ifdef __cplusplus
14426 extern "C"
14427 #endif
14428 /* We use char because int might match the return type of a gcc2
14429 builtin and then its argument prototype would still apply. */
14430 char gettimeofday ();
14432 main ()
14434 gettimeofday ();
14436 return 0;
14438 _ACEOF
14439 rm -f conftest.$ac_objext conftest$ac_exeext
14440 if { (eval echo "$as_me:14440: \"$ac_link\"") >&5
14441 (eval $ac_link) 2>&5
14442 ac_status=$?
14443 echo "$as_me:14443: \$? = $ac_status" >&5
14444 (exit $ac_status); } &&
14445 { ac_try='test -s conftest$ac_exeext'
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 ac_cv_lib_bsd_gettimeofday=yes
14452 else
14453 echo "$as_me: failed program was:" >&5
14454 cat conftest.$ac_ext >&5
14455 ac_cv_lib_bsd_gettimeofday=no
14457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14458 LIBS=$ac_check_lib_save_LIBS
14460 echo "$as_me:14460: result: $ac_cv_lib_bsd_gettimeofday" >&5
14461 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14462 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14464 cat >>confdefs.h <<\EOF
14465 #define HAVE_GETTIMEOFDAY 1
14468 cf_add_libs="-lbsd"
14469 # Filter out duplicates - this happens with badly-designed ".pc" files...
14470 for cf_add_1lib in $LIBS
14472 for cf_add_2lib in $cf_add_libs
14474 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14475 then
14476 cf_add_1lib=
14477 break
14479 done
14480 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14481 done
14482 LIBS="$cf_add_libs"
14488 esac
14490 echo "$as_me:14490: checking if -lm needed for math functions" >&5
14491 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14492 if test "${cf_cv_need_libm+set}" = set; then
14493 echo $ECHO_N "(cached) $ECHO_C" >&6
14494 else
14496 cat >conftest.$ac_ext <<_ACEOF
14497 #line 14497 "configure"
14498 #include "confdefs.h"
14500 #include <stdio.h>
14501 #include <math.h>
14504 main ()
14506 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14508 return 0;
14510 _ACEOF
14511 rm -f conftest.$ac_objext conftest$ac_exeext
14512 if { (eval echo "$as_me:14512: \"$ac_link\"") >&5
14513 (eval $ac_link) 2>&5
14514 ac_status=$?
14515 echo "$as_me:14515: \$? = $ac_status" >&5
14516 (exit $ac_status); } &&
14517 { ac_try='test -s conftest$ac_exeext'
14518 { (eval echo "$as_me:14518: \"$ac_try\"") >&5
14519 (eval $ac_try) 2>&5
14520 ac_status=$?
14521 echo "$as_me:14521: \$? = $ac_status" >&5
14522 (exit $ac_status); }; }; then
14523 cf_cv_need_libm=no
14524 else
14525 echo "$as_me: failed program was:" >&5
14526 cat conftest.$ac_ext >&5
14527 cf_cv_need_libm=yes
14529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14531 echo "$as_me:14531: result: $cf_cv_need_libm" >&5
14532 echo "${ECHO_T}$cf_cv_need_libm" >&6
14533 if test "$cf_cv_need_libm" = yes
14534 then
14535 MATH_LIB=-lm
14538 ### Checks for header files.
14539 echo "$as_me:14539: checking for ANSI C header files" >&5
14540 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14541 if test "${ac_cv_header_stdc+set}" = set; then
14542 echo $ECHO_N "(cached) $ECHO_C" >&6
14543 else
14544 cat >conftest.$ac_ext <<_ACEOF
14545 #line 14545 "configure"
14546 #include "confdefs.h"
14547 #include <stdlib.h>
14548 #include <stdarg.h>
14549 #include <string.h>
14550 #include <float.h>
14552 _ACEOF
14553 if { (eval echo "$as_me:14553: \"$ac_cpp conftest.$ac_ext\"") >&5
14554 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14555 ac_status=$?
14556 egrep -v '^ *\+' conftest.er1 >conftest.err
14557 rm -f conftest.er1
14558 cat conftest.err >&5
14559 echo "$as_me:14559: \$? = $ac_status" >&5
14560 (exit $ac_status); } >/dev/null; then
14561 if test -s conftest.err; then
14562 ac_cpp_err=$ac_c_preproc_warn_flag
14563 else
14564 ac_cpp_err=
14566 else
14567 ac_cpp_err=yes
14569 if test -z "$ac_cpp_err"; then
14570 ac_cv_header_stdc=yes
14571 else
14572 echo "$as_me: failed program was:" >&5
14573 cat conftest.$ac_ext >&5
14574 ac_cv_header_stdc=no
14576 rm -f conftest.err conftest.$ac_ext
14578 if test $ac_cv_header_stdc = yes; then
14579 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14580 cat >conftest.$ac_ext <<_ACEOF
14581 #line 14581 "configure"
14582 #include "confdefs.h"
14583 #include <string.h>
14585 _ACEOF
14586 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14587 egrep "memchr" >/dev/null 2>&1; then
14589 else
14590 ac_cv_header_stdc=no
14592 rm -rf conftest*
14596 if test $ac_cv_header_stdc = yes; then
14597 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14598 cat >conftest.$ac_ext <<_ACEOF
14599 #line 14599 "configure"
14600 #include "confdefs.h"
14601 #include <stdlib.h>
14603 _ACEOF
14604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14605 egrep "free" >/dev/null 2>&1; then
14607 else
14608 ac_cv_header_stdc=no
14610 rm -rf conftest*
14614 if test $ac_cv_header_stdc = yes; then
14615 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14616 if test "$cross_compiling" = yes; then
14618 else
14619 cat >conftest.$ac_ext <<_ACEOF
14620 #line 14620 "configure"
14621 #include "confdefs.h"
14622 #include <ctype.h>
14623 #if ((' ' & 0x0FF) == 0x020)
14624 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14625 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14626 #else
14627 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14628 || ('j' <= (c) && (c) <= 'r') \
14629 || ('s' <= (c) && (c) <= 'z'))
14630 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14631 #endif
14633 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14635 main ()
14637 int i;
14638 for (i = 0; i < 256; i++)
14639 if (XOR (islower (i), ISLOWER (i))
14640 || toupper (i) != TOUPPER (i))
14641 $ac_main_return(2);
14642 $ac_main_return (0);
14644 _ACEOF
14645 rm -f conftest$ac_exeext
14646 if { (eval echo "$as_me:14646: \"$ac_link\"") >&5
14647 (eval $ac_link) 2>&5
14648 ac_status=$?
14649 echo "$as_me:14649: \$? = $ac_status" >&5
14650 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14651 { (eval echo "$as_me:14651: \"$ac_try\"") >&5
14652 (eval $ac_try) 2>&5
14653 ac_status=$?
14654 echo "$as_me:14654: \$? = $ac_status" >&5
14655 (exit $ac_status); }; }; then
14657 else
14658 echo "$as_me: program exited with status $ac_status" >&5
14659 echo "$as_me: failed program was:" >&5
14660 cat conftest.$ac_ext >&5
14661 ac_cv_header_stdc=no
14663 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14667 echo "$as_me:14667: result: $ac_cv_header_stdc" >&5
14668 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14669 if test $ac_cv_header_stdc = yes; then
14671 cat >>confdefs.h <<\EOF
14672 #define STDC_HEADERS 1
14677 ac_header_dirent=no
14678 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14679 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14680 echo "$as_me:14680: checking for $ac_hdr that defines DIR" >&5
14681 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14682 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14683 echo $ECHO_N "(cached) $ECHO_C" >&6
14684 else
14685 cat >conftest.$ac_ext <<_ACEOF
14686 #line 14686 "configure"
14687 #include "confdefs.h"
14688 #include <sys/types.h>
14689 #include <$ac_hdr>
14692 main ()
14694 if ((DIR *) 0)
14695 return 0;
14697 return 0;
14699 _ACEOF
14700 rm -f conftest.$ac_objext
14701 if { (eval echo "$as_me:14701: \"$ac_compile\"") >&5
14702 (eval $ac_compile) 2>&5
14703 ac_status=$?
14704 echo "$as_me:14704: \$? = $ac_status" >&5
14705 (exit $ac_status); } &&
14706 { ac_try='test -s conftest.$ac_objext'
14707 { (eval echo "$as_me:14707: \"$ac_try\"") >&5
14708 (eval $ac_try) 2>&5
14709 ac_status=$?
14710 echo "$as_me:14710: \$? = $ac_status" >&5
14711 (exit $ac_status); }; }; then
14712 eval "$as_ac_Header=yes"
14713 else
14714 echo "$as_me: failed program was:" >&5
14715 cat conftest.$ac_ext >&5
14716 eval "$as_ac_Header=no"
14718 rm -f conftest.$ac_objext conftest.$ac_ext
14720 echo "$as_me:14720: result: `eval echo '${'$as_ac_Header'}'`" >&5
14721 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14722 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14723 cat >>confdefs.h <<EOF
14724 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14727 ac_header_dirent=$ac_hdr; break
14730 done
14731 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14732 if test $ac_header_dirent = dirent.h; then
14733 echo "$as_me:14733: checking for opendir in -ldir" >&5
14734 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14735 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14736 echo $ECHO_N "(cached) $ECHO_C" >&6
14737 else
14738 ac_check_lib_save_LIBS=$LIBS
14739 LIBS="-ldir $LIBS"
14740 cat >conftest.$ac_ext <<_ACEOF
14741 #line 14741 "configure"
14742 #include "confdefs.h"
14744 /* Override any gcc2 internal prototype to avoid an error. */
14745 #ifdef __cplusplus
14746 extern "C"
14747 #endif
14748 /* We use char because int might match the return type of a gcc2
14749 builtin and then its argument prototype would still apply. */
14750 char opendir ();
14752 main ()
14754 opendir ();
14756 return 0;
14758 _ACEOF
14759 rm -f conftest.$ac_objext conftest$ac_exeext
14760 if { (eval echo "$as_me:14760: \"$ac_link\"") >&5
14761 (eval $ac_link) 2>&5
14762 ac_status=$?
14763 echo "$as_me:14763: \$? = $ac_status" >&5
14764 (exit $ac_status); } &&
14765 { ac_try='test -s conftest$ac_exeext'
14766 { (eval echo "$as_me:14766: \"$ac_try\"") >&5
14767 (eval $ac_try) 2>&5
14768 ac_status=$?
14769 echo "$as_me:14769: \$? = $ac_status" >&5
14770 (exit $ac_status); }; }; then
14771 ac_cv_lib_dir_opendir=yes
14772 else
14773 echo "$as_me: failed program was:" >&5
14774 cat conftest.$ac_ext >&5
14775 ac_cv_lib_dir_opendir=no
14777 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14778 LIBS=$ac_check_lib_save_LIBS
14780 echo "$as_me:14780: result: $ac_cv_lib_dir_opendir" >&5
14781 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14782 if test $ac_cv_lib_dir_opendir = yes; then
14783 LIBS="$LIBS -ldir"
14786 else
14787 echo "$as_me:14787: checking for opendir in -lx" >&5
14788 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14789 if test "${ac_cv_lib_x_opendir+set}" = set; then
14790 echo $ECHO_N "(cached) $ECHO_C" >&6
14791 else
14792 ac_check_lib_save_LIBS=$LIBS
14793 LIBS="-lx $LIBS"
14794 cat >conftest.$ac_ext <<_ACEOF
14795 #line 14795 "configure"
14796 #include "confdefs.h"
14798 /* Override any gcc2 internal prototype to avoid an error. */
14799 #ifdef __cplusplus
14800 extern "C"
14801 #endif
14802 /* We use char because int might match the return type of a gcc2
14803 builtin and then its argument prototype would still apply. */
14804 char opendir ();
14806 main ()
14808 opendir ();
14810 return 0;
14812 _ACEOF
14813 rm -f conftest.$ac_objext conftest$ac_exeext
14814 if { (eval echo "$as_me:14814: \"$ac_link\"") >&5
14815 (eval $ac_link) 2>&5
14816 ac_status=$?
14817 echo "$as_me:14817: \$? = $ac_status" >&5
14818 (exit $ac_status); } &&
14819 { ac_try='test -s conftest$ac_exeext'
14820 { (eval echo "$as_me:14820: \"$ac_try\"") >&5
14821 (eval $ac_try) 2>&5
14822 ac_status=$?
14823 echo "$as_me:14823: \$? = $ac_status" >&5
14824 (exit $ac_status); }; }; then
14825 ac_cv_lib_x_opendir=yes
14826 else
14827 echo "$as_me: failed program was:" >&5
14828 cat conftest.$ac_ext >&5
14829 ac_cv_lib_x_opendir=no
14831 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14832 LIBS=$ac_check_lib_save_LIBS
14834 echo "$as_me:14834: result: $ac_cv_lib_x_opendir" >&5
14835 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14836 if test $ac_cv_lib_x_opendir = yes; then
14837 LIBS="$LIBS -lx"
14842 echo "$as_me:14842: checking whether time.h and sys/time.h may both be included" >&5
14843 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14844 if test "${ac_cv_header_time+set}" = set; then
14845 echo $ECHO_N "(cached) $ECHO_C" >&6
14846 else
14847 cat >conftest.$ac_ext <<_ACEOF
14848 #line 14848 "configure"
14849 #include "confdefs.h"
14850 #include <sys/types.h>
14851 #include <sys/time.h>
14852 #include <time.h>
14855 main ()
14857 if ((struct tm *) 0)
14858 return 0;
14860 return 0;
14862 _ACEOF
14863 rm -f conftest.$ac_objext
14864 if { (eval echo "$as_me:14864: \"$ac_compile\"") >&5
14865 (eval $ac_compile) 2>&5
14866 ac_status=$?
14867 echo "$as_me:14867: \$? = $ac_status" >&5
14868 (exit $ac_status); } &&
14869 { ac_try='test -s conftest.$ac_objext'
14870 { (eval echo "$as_me:14870: \"$ac_try\"") >&5
14871 (eval $ac_try) 2>&5
14872 ac_status=$?
14873 echo "$as_me:14873: \$? = $ac_status" >&5
14874 (exit $ac_status); }; }; then
14875 ac_cv_header_time=yes
14876 else
14877 echo "$as_me: failed program was:" >&5
14878 cat conftest.$ac_ext >&5
14879 ac_cv_header_time=no
14881 rm -f conftest.$ac_objext conftest.$ac_ext
14883 echo "$as_me:14883: result: $ac_cv_header_time" >&5
14884 echo "${ECHO_T}$ac_cv_header_time" >&6
14885 if test $ac_cv_header_time = yes; then
14887 cat >>confdefs.h <<\EOF
14888 #define TIME_WITH_SYS_TIME 1
14893 cf_regex_func=no
14895 cf_regex_libs="regex re"
14896 case $host_os in
14897 (mingw*)
14898 cf_regex_libs="gnurx $cf_regex_libs"
14900 esac
14902 echo "$as_me:14902: checking for regcomp" >&5
14903 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14904 if test "${ac_cv_func_regcomp+set}" = set; then
14905 echo $ECHO_N "(cached) $ECHO_C" >&6
14906 else
14907 cat >conftest.$ac_ext <<_ACEOF
14908 #line 14908 "configure"
14909 #include "confdefs.h"
14910 /* System header to define __stub macros and hopefully few prototypes,
14911 which can conflict with char regcomp (); below. */
14912 #include <assert.h>
14913 /* Override any gcc2 internal prototype to avoid an error. */
14914 #ifdef __cplusplus
14915 extern "C"
14916 #endif
14917 /* We use char because int might match the return type of a gcc2
14918 builtin and then its argument prototype would still apply. */
14919 char regcomp ();
14920 char (*f) ();
14923 main ()
14925 /* The GNU C library defines this for functions which it implements
14926 to always fail with ENOSYS. Some functions are actually named
14927 something starting with __ and the normal name is an alias. */
14928 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14929 choke me
14930 #else
14931 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14932 #endif
14935 return 0;
14937 _ACEOF
14938 rm -f conftest.$ac_objext conftest$ac_exeext
14939 if { (eval echo "$as_me:14939: \"$ac_link\"") >&5
14940 (eval $ac_link) 2>&5
14941 ac_status=$?
14942 echo "$as_me:14942: \$? = $ac_status" >&5
14943 (exit $ac_status); } &&
14944 { ac_try='test -s conftest$ac_exeext'
14945 { (eval echo "$as_me:14945: \"$ac_try\"") >&5
14946 (eval $ac_try) 2>&5
14947 ac_status=$?
14948 echo "$as_me:14948: \$? = $ac_status" >&5
14949 (exit $ac_status); }; }; then
14950 ac_cv_func_regcomp=yes
14951 else
14952 echo "$as_me: failed program was:" >&5
14953 cat conftest.$ac_ext >&5
14954 ac_cv_func_regcomp=no
14956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14958 echo "$as_me:14958: result: $ac_cv_func_regcomp" >&5
14959 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14960 if test $ac_cv_func_regcomp = yes; then
14961 cf_regex_func=regcomp
14962 else
14964 for cf_regex_lib in $cf_regex_libs
14966 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14967 echo "$as_me:14967: checking for regcomp in -l$cf_regex_lib" >&5
14968 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14969 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14970 echo $ECHO_N "(cached) $ECHO_C" >&6
14971 else
14972 ac_check_lib_save_LIBS=$LIBS
14973 LIBS="-l$cf_regex_lib $LIBS"
14974 cat >conftest.$ac_ext <<_ACEOF
14975 #line 14975 "configure"
14976 #include "confdefs.h"
14978 /* Override any gcc2 internal prototype to avoid an error. */
14979 #ifdef __cplusplus
14980 extern "C"
14981 #endif
14982 /* We use char because int might match the return type of a gcc2
14983 builtin and then its argument prototype would still apply. */
14984 char regcomp ();
14986 main ()
14988 regcomp ();
14990 return 0;
14992 _ACEOF
14993 rm -f conftest.$ac_objext conftest$ac_exeext
14994 if { (eval echo "$as_me:14994: \"$ac_link\"") >&5
14995 (eval $ac_link) 2>&5
14996 ac_status=$?
14997 echo "$as_me:14997: \$? = $ac_status" >&5
14998 (exit $ac_status); } &&
14999 { ac_try='test -s conftest$ac_exeext'
15000 { (eval echo "$as_me:15000: \"$ac_try\"") >&5
15001 (eval $ac_try) 2>&5
15002 ac_status=$?
15003 echo "$as_me:15003: \$? = $ac_status" >&5
15004 (exit $ac_status); }; }; then
15005 eval "$as_ac_Lib=yes"
15006 else
15007 echo "$as_me: failed program was:" >&5
15008 cat conftest.$ac_ext >&5
15009 eval "$as_ac_Lib=no"
15011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15012 LIBS=$ac_check_lib_save_LIBS
15014 echo "$as_me:15014: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15015 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15016 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15018 cf_add_libs="-l$cf_regex_lib"
15019 # Filter out duplicates - this happens with badly-designed ".pc" files...
15020 for cf_add_1lib in $LIBS
15022 for cf_add_2lib in $cf_add_libs
15024 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15025 then
15026 cf_add_1lib=
15027 break
15029 done
15030 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15031 done
15032 LIBS="$cf_add_libs"
15034 cf_regex_func=regcomp
15035 break
15038 done
15042 if test "$cf_regex_func" = no ; then
15043 echo "$as_me:15043: checking for compile" >&5
15044 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15045 if test "${ac_cv_func_compile+set}" = set; then
15046 echo $ECHO_N "(cached) $ECHO_C" >&6
15047 else
15048 cat >conftest.$ac_ext <<_ACEOF
15049 #line 15049 "configure"
15050 #include "confdefs.h"
15051 /* System header to define __stub macros and hopefully few prototypes,
15052 which can conflict with char compile (); below. */
15053 #include <assert.h>
15054 /* Override any gcc2 internal prototype to avoid an error. */
15055 #ifdef __cplusplus
15056 extern "C"
15057 #endif
15058 /* We use char because int might match the return type of a gcc2
15059 builtin and then its argument prototype would still apply. */
15060 char compile ();
15061 char (*f) ();
15064 main ()
15066 /* The GNU C library defines this for functions which it implements
15067 to always fail with ENOSYS. Some functions are actually named
15068 something starting with __ and the normal name is an alias. */
15069 #if defined (__stub_compile) || defined (__stub___compile)
15070 choke me
15071 #else
15072 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15073 #endif
15076 return 0;
15078 _ACEOF
15079 rm -f conftest.$ac_objext conftest$ac_exeext
15080 if { (eval echo "$as_me:15080: \"$ac_link\"") >&5
15081 (eval $ac_link) 2>&5
15082 ac_status=$?
15083 echo "$as_me:15083: \$? = $ac_status" >&5
15084 (exit $ac_status); } &&
15085 { ac_try='test -s conftest$ac_exeext'
15086 { (eval echo "$as_me:15086: \"$ac_try\"") >&5
15087 (eval $ac_try) 2>&5
15088 ac_status=$?
15089 echo "$as_me:15089: \$? = $ac_status" >&5
15090 (exit $ac_status); }; }; then
15091 ac_cv_func_compile=yes
15092 else
15093 echo "$as_me: failed program was:" >&5
15094 cat conftest.$ac_ext >&5
15095 ac_cv_func_compile=no
15097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15099 echo "$as_me:15099: result: $ac_cv_func_compile" >&5
15100 echo "${ECHO_T}$ac_cv_func_compile" >&6
15101 if test $ac_cv_func_compile = yes; then
15102 cf_regex_func=compile
15103 else
15105 echo "$as_me:15105: checking for compile in -lgen" >&5
15106 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15107 if test "${ac_cv_lib_gen_compile+set}" = set; then
15108 echo $ECHO_N "(cached) $ECHO_C" >&6
15109 else
15110 ac_check_lib_save_LIBS=$LIBS
15111 LIBS="-lgen $LIBS"
15112 cat >conftest.$ac_ext <<_ACEOF
15113 #line 15113 "configure"
15114 #include "confdefs.h"
15116 /* Override any gcc2 internal prototype to avoid an error. */
15117 #ifdef __cplusplus
15118 extern "C"
15119 #endif
15120 /* We use char because int might match the return type of a gcc2
15121 builtin and then its argument prototype would still apply. */
15122 char compile ();
15124 main ()
15126 compile ();
15128 return 0;
15130 _ACEOF
15131 rm -f conftest.$ac_objext conftest$ac_exeext
15132 if { (eval echo "$as_me:15132: \"$ac_link\"") >&5
15133 (eval $ac_link) 2>&5
15134 ac_status=$?
15135 echo "$as_me:15135: \$? = $ac_status" >&5
15136 (exit $ac_status); } &&
15137 { ac_try='test -s conftest$ac_exeext'
15138 { (eval echo "$as_me:15138: \"$ac_try\"") >&5
15139 (eval $ac_try) 2>&5
15140 ac_status=$?
15141 echo "$as_me:15141: \$? = $ac_status" >&5
15142 (exit $ac_status); }; }; then
15143 ac_cv_lib_gen_compile=yes
15144 else
15145 echo "$as_me: failed program was:" >&5
15146 cat conftest.$ac_ext >&5
15147 ac_cv_lib_gen_compile=no
15149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15150 LIBS=$ac_check_lib_save_LIBS
15152 echo "$as_me:15152: result: $ac_cv_lib_gen_compile" >&5
15153 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15154 if test $ac_cv_lib_gen_compile = yes; then
15156 cf_add_libs="-lgen"
15157 # Filter out duplicates - this happens with badly-designed ".pc" files...
15158 for cf_add_1lib in $LIBS
15160 for cf_add_2lib in $cf_add_libs
15162 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15163 then
15164 cf_add_1lib=
15165 break
15167 done
15168 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15169 done
15170 LIBS="$cf_add_libs"
15172 cf_regex_func=compile
15179 if test "$cf_regex_func" = no ; then
15180 { echo "$as_me:15180: WARNING: cannot find regular expression library" >&5
15181 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15184 echo "$as_me:15184: checking for regular-expression headers" >&5
15185 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15186 if test "${cf_cv_regex_hdrs+set}" = set; then
15187 echo $ECHO_N "(cached) $ECHO_C" >&6
15188 else
15190 cf_cv_regex_hdrs=no
15191 case $cf_regex_func in
15192 (compile)
15193 for cf_regex_hdr in regexp.h regexpr.h
15195 cat >conftest.$ac_ext <<_ACEOF
15196 #line 15196 "configure"
15197 #include "confdefs.h"
15198 #include <$cf_regex_hdr>
15200 main ()
15203 char *p = compile("", "", "", 0);
15204 int x = step("", "");
15207 return 0;
15209 _ACEOF
15210 rm -f conftest.$ac_objext conftest$ac_exeext
15211 if { (eval echo "$as_me:15211: \"$ac_link\"") >&5
15212 (eval $ac_link) 2>&5
15213 ac_status=$?
15214 echo "$as_me:15214: \$? = $ac_status" >&5
15215 (exit $ac_status); } &&
15216 { ac_try='test -s conftest$ac_exeext'
15217 { (eval echo "$as_me:15217: \"$ac_try\"") >&5
15218 (eval $ac_try) 2>&5
15219 ac_status=$?
15220 echo "$as_me:15220: \$? = $ac_status" >&5
15221 (exit $ac_status); }; }; then
15223 cf_cv_regex_hdrs=$cf_regex_hdr
15224 break
15226 else
15227 echo "$as_me: failed program was:" >&5
15228 cat conftest.$ac_ext >&5
15230 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15231 done
15234 for cf_regex_hdr in regex.h
15236 cat >conftest.$ac_ext <<_ACEOF
15237 #line 15237 "configure"
15238 #include "confdefs.h"
15239 #include <sys/types.h>
15240 #include <$cf_regex_hdr>
15242 main ()
15245 regex_t *p;
15246 int x = regcomp(p, "", 0);
15247 int y = regexec(p, "", 0, 0, 0);
15248 regfree(p);
15251 return 0;
15253 _ACEOF
15254 rm -f conftest.$ac_objext conftest$ac_exeext
15255 if { (eval echo "$as_me:15255: \"$ac_link\"") >&5
15256 (eval $ac_link) 2>&5
15257 ac_status=$?
15258 echo "$as_me:15258: \$? = $ac_status" >&5
15259 (exit $ac_status); } &&
15260 { ac_try='test -s conftest$ac_exeext'
15261 { (eval echo "$as_me:15261: \"$ac_try\"") >&5
15262 (eval $ac_try) 2>&5
15263 ac_status=$?
15264 echo "$as_me:15264: \$? = $ac_status" >&5
15265 (exit $ac_status); }; }; then
15267 cf_cv_regex_hdrs=$cf_regex_hdr
15268 break
15270 else
15271 echo "$as_me: failed program was:" >&5
15272 cat conftest.$ac_ext >&5
15274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15275 done
15277 esac
15280 echo "$as_me:15280: result: $cf_cv_regex_hdrs" >&5
15281 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15283 case $cf_cv_regex_hdrs in
15284 (no) { echo "$as_me:15284: WARNING: no regular expression header found" >&5
15285 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15286 (regex.h)
15287 cat >>confdefs.h <<\EOF
15288 #define HAVE_REGEX_H_FUNCS 1
15291 (regexp.h)
15292 cat >>confdefs.h <<\EOF
15293 #define HAVE_REGEXP_H_FUNCS 1
15296 (regexpr.h)
15297 cat >>confdefs.h <<\EOF
15298 #define HAVE_REGEXPR_H_FUNCS 1
15301 esac
15303 for ac_header in \
15304 fcntl.h \
15305 getopt.h \
15306 limits.h \
15307 locale.h \
15308 math.h \
15309 poll.h \
15310 sys/bsdtypes.h \
15311 sys/ioctl.h \
15312 sys/param.h \
15313 sys/poll.h \
15314 sys/select.h \
15315 sys/time.h \
15316 sys/times.h \
15317 ttyent.h \
15318 unistd.h \
15319 wctype.h \
15322 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15323 echo "$as_me:15323: checking for $ac_header" >&5
15324 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15325 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15326 echo $ECHO_N "(cached) $ECHO_C" >&6
15327 else
15328 cat >conftest.$ac_ext <<_ACEOF
15329 #line 15329 "configure"
15330 #include "confdefs.h"
15331 #include <$ac_header>
15332 _ACEOF
15333 if { (eval echo "$as_me:15333: \"$ac_cpp conftest.$ac_ext\"") >&5
15334 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15335 ac_status=$?
15336 egrep -v '^ *\+' conftest.er1 >conftest.err
15337 rm -f conftest.er1
15338 cat conftest.err >&5
15339 echo "$as_me:15339: \$? = $ac_status" >&5
15340 (exit $ac_status); } >/dev/null; then
15341 if test -s conftest.err; then
15342 ac_cpp_err=$ac_c_preproc_warn_flag
15343 else
15344 ac_cpp_err=
15346 else
15347 ac_cpp_err=yes
15349 if test -z "$ac_cpp_err"; then
15350 eval "$as_ac_Header=yes"
15351 else
15352 echo "$as_me: failed program was:" >&5
15353 cat conftest.$ac_ext >&5
15354 eval "$as_ac_Header=no"
15356 rm -f conftest.err conftest.$ac_ext
15358 echo "$as_me:15358: result: `eval echo '${'$as_ac_Header'}'`" >&5
15359 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15360 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15361 cat >>confdefs.h <<EOF
15362 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15366 done
15368 for ac_header in unistd.h getopt.h
15370 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15371 echo "$as_me:15371: checking for $ac_header" >&5
15372 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15373 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15374 echo $ECHO_N "(cached) $ECHO_C" >&6
15375 else
15376 cat >conftest.$ac_ext <<_ACEOF
15377 #line 15377 "configure"
15378 #include "confdefs.h"
15379 #include <$ac_header>
15380 _ACEOF
15381 if { (eval echo "$as_me:15381: \"$ac_cpp conftest.$ac_ext\"") >&5
15382 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15383 ac_status=$?
15384 egrep -v '^ *\+' conftest.er1 >conftest.err
15385 rm -f conftest.er1
15386 cat conftest.err >&5
15387 echo "$as_me:15387: \$? = $ac_status" >&5
15388 (exit $ac_status); } >/dev/null; then
15389 if test -s conftest.err; then
15390 ac_cpp_err=$ac_c_preproc_warn_flag
15391 else
15392 ac_cpp_err=
15394 else
15395 ac_cpp_err=yes
15397 if test -z "$ac_cpp_err"; then
15398 eval "$as_ac_Header=yes"
15399 else
15400 echo "$as_me: failed program was:" >&5
15401 cat conftest.$ac_ext >&5
15402 eval "$as_ac_Header=no"
15404 rm -f conftest.err conftest.$ac_ext
15406 echo "$as_me:15406: result: `eval echo '${'$as_ac_Header'}'`" >&5
15407 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15408 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15409 cat >>confdefs.h <<EOF
15410 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15414 done
15416 echo "$as_me:15416: checking for header declaring getopt variables" >&5
15417 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15418 if test "${cf_cv_getopt_header+set}" = set; then
15419 echo $ECHO_N "(cached) $ECHO_C" >&6
15420 else
15422 cf_cv_getopt_header=none
15423 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15425 cat >conftest.$ac_ext <<_ACEOF
15426 #line 15426 "configure"
15427 #include "confdefs.h"
15429 #include <$cf_header>
15431 main ()
15433 int x = optind; char *y = optarg
15435 return 0;
15437 _ACEOF
15438 rm -f conftest.$ac_objext
15439 if { (eval echo "$as_me:15439: \"$ac_compile\"") >&5
15440 (eval $ac_compile) 2>&5
15441 ac_status=$?
15442 echo "$as_me:15442: \$? = $ac_status" >&5
15443 (exit $ac_status); } &&
15444 { ac_try='test -s conftest.$ac_objext'
15445 { (eval echo "$as_me:15445: \"$ac_try\"") >&5
15446 (eval $ac_try) 2>&5
15447 ac_status=$?
15448 echo "$as_me:15448: \$? = $ac_status" >&5
15449 (exit $ac_status); }; }; then
15450 cf_cv_getopt_header=$cf_header
15451 break
15452 else
15453 echo "$as_me: failed program was:" >&5
15454 cat conftest.$ac_ext >&5
15456 rm -f conftest.$ac_objext conftest.$ac_ext
15457 done
15460 echo "$as_me:15460: result: $cf_cv_getopt_header" >&5
15461 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15462 if test $cf_cv_getopt_header != none ; then
15464 cat >>confdefs.h <<\EOF
15465 #define HAVE_GETOPT_HEADER 1
15469 if test $cf_cv_getopt_header = getopt.h ; then
15471 cat >>confdefs.h <<\EOF
15472 #define NEED_GETOPT_H 1
15477 # check for ISC (this may also define _POSIX_SOURCE)
15478 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15479 if test "x$ISC" = xyes ; then
15481 echo "$as_me:15481: checking for main in -lcposix" >&5
15482 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15483 if test "${ac_cv_lib_cposix_main+set}" = set; then
15484 echo $ECHO_N "(cached) $ECHO_C" >&6
15485 else
15486 ac_check_lib_save_LIBS=$LIBS
15487 LIBS="-lcposix $LIBS"
15488 cat >conftest.$ac_ext <<_ACEOF
15489 #line 15489 "configure"
15490 #include "confdefs.h"
15493 main ()
15495 main ();
15497 return 0;
15499 _ACEOF
15500 rm -f conftest.$ac_objext conftest$ac_exeext
15501 if { (eval echo "$as_me:15501: \"$ac_link\"") >&5
15502 (eval $ac_link) 2>&5
15503 ac_status=$?
15504 echo "$as_me:15504: \$? = $ac_status" >&5
15505 (exit $ac_status); } &&
15506 { ac_try='test -s conftest$ac_exeext'
15507 { (eval echo "$as_me:15507: \"$ac_try\"") >&5
15508 (eval $ac_try) 2>&5
15509 ac_status=$?
15510 echo "$as_me:15510: \$? = $ac_status" >&5
15511 (exit $ac_status); }; }; then
15512 ac_cv_lib_cposix_main=yes
15513 else
15514 echo "$as_me: failed program was:" >&5
15515 cat conftest.$ac_ext >&5
15516 ac_cv_lib_cposix_main=no
15518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15519 LIBS=$ac_check_lib_save_LIBS
15521 echo "$as_me:15521: result: $ac_cv_lib_cposix_main" >&5
15522 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15523 if test $ac_cv_lib_cposix_main = yes; then
15524 cat >>confdefs.h <<EOF
15525 #define HAVE_LIBCPOSIX 1
15528 LIBS="-lcposix $LIBS"
15532 echo "$as_me:15532: checking for bzero in -linet" >&5
15533 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15534 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15535 echo $ECHO_N "(cached) $ECHO_C" >&6
15536 else
15537 ac_check_lib_save_LIBS=$LIBS
15538 LIBS="-linet $LIBS"
15539 cat >conftest.$ac_ext <<_ACEOF
15540 #line 15540 "configure"
15541 #include "confdefs.h"
15543 /* Override any gcc2 internal prototype to avoid an error. */
15544 #ifdef __cplusplus
15545 extern "C"
15546 #endif
15547 /* We use char because int might match the return type of a gcc2
15548 builtin and then its argument prototype would still apply. */
15549 char bzero ();
15551 main ()
15553 bzero ();
15555 return 0;
15557 _ACEOF
15558 rm -f conftest.$ac_objext conftest$ac_exeext
15559 if { (eval echo "$as_me:15559: \"$ac_link\"") >&5
15560 (eval $ac_link) 2>&5
15561 ac_status=$?
15562 echo "$as_me:15562: \$? = $ac_status" >&5
15563 (exit $ac_status); } &&
15564 { ac_try='test -s conftest$ac_exeext'
15565 { (eval echo "$as_me:15565: \"$ac_try\"") >&5
15566 (eval $ac_try) 2>&5
15567 ac_status=$?
15568 echo "$as_me:15568: \$? = $ac_status" >&5
15569 (exit $ac_status); }; }; then
15570 ac_cv_lib_inet_bzero=yes
15571 else
15572 echo "$as_me: failed program was:" >&5
15573 cat conftest.$ac_ext >&5
15574 ac_cv_lib_inet_bzero=no
15576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15577 LIBS=$ac_check_lib_save_LIBS
15579 echo "$as_me:15579: result: $ac_cv_lib_inet_bzero" >&5
15580 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15581 if test $ac_cv_lib_inet_bzero = yes; then
15583 cf_add_libs="-linet"
15584 # Filter out duplicates - this happens with badly-designed ".pc" files...
15585 for cf_add_1lib in $LIBS
15587 for cf_add_2lib in $cf_add_libs
15589 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15590 then
15591 cf_add_1lib=
15592 break
15594 done
15595 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15596 done
15597 LIBS="$cf_add_libs"
15602 echo "$as_me:15602: checking if sys/time.h works with sys/select.h" >&5
15603 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15604 if test "${cf_cv_sys_time_select+set}" = set; then
15605 echo $ECHO_N "(cached) $ECHO_C" >&6
15606 else
15608 cat >conftest.$ac_ext <<_ACEOF
15609 #line 15609 "configure"
15610 #include "confdefs.h"
15612 #include <sys/types.h>
15613 #ifdef HAVE_SYS_TIME_H
15614 #include <sys/time.h>
15615 #endif
15616 #ifdef HAVE_SYS_SELECT_H
15617 #include <sys/select.h>
15618 #endif
15621 main ()
15625 return 0;
15627 _ACEOF
15628 rm -f conftest.$ac_objext
15629 if { (eval echo "$as_me:15629: \"$ac_compile\"") >&5
15630 (eval $ac_compile) 2>&5
15631 ac_status=$?
15632 echo "$as_me:15632: \$? = $ac_status" >&5
15633 (exit $ac_status); } &&
15634 { ac_try='test -s conftest.$ac_objext'
15635 { (eval echo "$as_me:15635: \"$ac_try\"") >&5
15636 (eval $ac_try) 2>&5
15637 ac_status=$?
15638 echo "$as_me:15638: \$? = $ac_status" >&5
15639 (exit $ac_status); }; }; then
15640 cf_cv_sys_time_select=yes
15641 else
15642 echo "$as_me: failed program was:" >&5
15643 cat conftest.$ac_ext >&5
15644 cf_cv_sys_time_select=no
15646 rm -f conftest.$ac_objext conftest.$ac_ext
15650 echo "$as_me:15650: result: $cf_cv_sys_time_select" >&5
15651 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15652 test "$cf_cv_sys_time_select" = yes &&
15653 cat >>confdefs.h <<\EOF
15654 #define HAVE_SYS_TIME_SELECT 1
15657 ### checks for compiler characteristics
15658 ac_ext=c
15659 ac_cpp='$CPP $CPPFLAGS'
15660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15663 ac_main_return=return
15665 echo "$as_me:15665: checking for an ANSI C-conforming const" >&5
15666 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15667 if test "${ac_cv_c_const+set}" = set; then
15668 echo $ECHO_N "(cached) $ECHO_C" >&6
15669 else
15670 cat >conftest.$ac_ext <<_ACEOF
15671 #line 15671 "configure"
15672 #include "confdefs.h"
15675 main ()
15677 /* FIXME: Include the comments suggested by Paul. */
15678 #ifndef __cplusplus
15679 /* Ultrix mips cc rejects this. */
15680 typedef int charset[2];
15681 const charset x;
15682 /* SunOS 4.1.1 cc rejects this. */
15683 char const *const *ccp;
15684 char **p;
15685 /* NEC SVR4.0.2 mips cc rejects this. */
15686 struct point {int x, y;};
15687 static struct point const zero = {0,0};
15688 /* AIX XL C 1.02.0.0 rejects this.
15689 It does not let you subtract one const X* pointer from another in
15690 an arm of an if-expression whose if-part is not a constant
15691 expression */
15692 const char *g = "string";
15693 ccp = &g + (g ? g-g : 0);
15694 /* HPUX 7.0 cc rejects these. */
15695 ++ccp;
15696 p = (char**) ccp;
15697 ccp = (char const *const *) p;
15698 { /* SCO 3.2v4 cc rejects this. */
15699 char *t;
15700 char const *s = 0 ? (char *) 0 : (char const *) 0;
15702 *t++ = 0;
15704 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15705 int x[] = {25, 17};
15706 const int *foo = &x[0];
15707 ++foo;
15709 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15710 typedef const int *iptr;
15711 iptr p = 0;
15712 ++p;
15714 { /* AIX XL C 1.02.0.0 rejects this saying
15715 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15716 struct s { int j; const int *ap[3]; };
15717 struct s *b; b->j = 5;
15719 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15720 const int foo = 10;
15722 #endif
15725 return 0;
15727 _ACEOF
15728 rm -f conftest.$ac_objext
15729 if { (eval echo "$as_me:15729: \"$ac_compile\"") >&5
15730 (eval $ac_compile) 2>&5
15731 ac_status=$?
15732 echo "$as_me:15732: \$? = $ac_status" >&5
15733 (exit $ac_status); } &&
15734 { ac_try='test -s conftest.$ac_objext'
15735 { (eval echo "$as_me:15735: \"$ac_try\"") >&5
15736 (eval $ac_try) 2>&5
15737 ac_status=$?
15738 echo "$as_me:15738: \$? = $ac_status" >&5
15739 (exit $ac_status); }; }; then
15740 ac_cv_c_const=yes
15741 else
15742 echo "$as_me: failed program was:" >&5
15743 cat conftest.$ac_ext >&5
15744 ac_cv_c_const=no
15746 rm -f conftest.$ac_objext conftest.$ac_ext
15748 echo "$as_me:15748: result: $ac_cv_c_const" >&5
15749 echo "${ECHO_T}$ac_cv_c_const" >&6
15750 if test $ac_cv_c_const = no; then
15752 cat >>confdefs.h <<\EOF
15753 #define const
15758 echo "$as_me:15758: checking for inline" >&5
15759 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15760 if test "${ac_cv_c_inline+set}" = set; then
15761 echo $ECHO_N "(cached) $ECHO_C" >&6
15762 else
15763 ac_cv_c_inline=no
15764 for ac_kw in inline __inline__ __inline; do
15765 cat >conftest.$ac_ext <<_ACEOF
15766 #line 15766 "configure"
15767 #include "confdefs.h"
15768 #ifndef __cplusplus
15769 static $ac_kw int static_foo () {return 0; }
15770 $ac_kw int foo () {return 0; }
15771 #endif
15773 _ACEOF
15774 rm -f conftest.$ac_objext
15775 if { (eval echo "$as_me:15775: \"$ac_compile\"") >&5
15776 (eval $ac_compile) 2>&5
15777 ac_status=$?
15778 echo "$as_me:15778: \$? = $ac_status" >&5
15779 (exit $ac_status); } &&
15780 { ac_try='test -s conftest.$ac_objext'
15781 { (eval echo "$as_me:15781: \"$ac_try\"") >&5
15782 (eval $ac_try) 2>&5
15783 ac_status=$?
15784 echo "$as_me:15784: \$? = $ac_status" >&5
15785 (exit $ac_status); }; }; then
15786 ac_cv_c_inline=$ac_kw; break
15787 else
15788 echo "$as_me: failed program was:" >&5
15789 cat conftest.$ac_ext >&5
15791 rm -f conftest.$ac_objext conftest.$ac_ext
15792 done
15795 echo "$as_me:15795: result: $ac_cv_c_inline" >&5
15796 echo "${ECHO_T}$ac_cv_c_inline" >&6
15797 case $ac_cv_c_inline in
15798 inline | yes) ;;
15800 cat >>confdefs.h <<\EOF
15801 #define inline
15804 *) cat >>confdefs.h <<EOF
15805 #define inline $ac_cv_c_inline
15808 esac
15810 NCURSES_INLINE=
15811 if test "$ac_cv_c_inline" != no ; then
15812 NCURSES_INLINE=inline
15813 if test "$INTEL_COMPILER" = yes
15814 then
15816 elif test "$CLANG_COMPILER" = yes
15817 then
15819 elif test "$GCC" = yes
15820 then
15821 echo "$as_me:15821: checking if $CC supports options to tune inlining" >&5
15822 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15823 if test "${cf_cv_gcc_inline+set}" = set; then
15824 echo $ECHO_N "(cached) $ECHO_C" >&6
15825 else
15827 cf_save_CFLAGS=$CFLAGS
15828 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15829 cat >conftest.$ac_ext <<_ACEOF
15830 #line 15830 "configure"
15831 #include "confdefs.h"
15832 inline int foo(void) { return 1; }
15834 main ()
15836 ${cf_cv_main_return:-return} foo()
15838 return 0;
15840 _ACEOF
15841 rm -f conftest.$ac_objext
15842 if { (eval echo "$as_me:15842: \"$ac_compile\"") >&5
15843 (eval $ac_compile) 2>&5
15844 ac_status=$?
15845 echo "$as_me:15845: \$? = $ac_status" >&5
15846 (exit $ac_status); } &&
15847 { ac_try='test -s conftest.$ac_objext'
15848 { (eval echo "$as_me:15848: \"$ac_try\"") >&5
15849 (eval $ac_try) 2>&5
15850 ac_status=$?
15851 echo "$as_me:15851: \$? = $ac_status" >&5
15852 (exit $ac_status); }; }; then
15853 cf_cv_gcc_inline=yes
15854 else
15855 echo "$as_me: failed program was:" >&5
15856 cat conftest.$ac_ext >&5
15857 cf_cv_gcc_inline=no
15859 rm -f conftest.$ac_objext conftest.$ac_ext
15860 CFLAGS=$cf_save_CFLAGS
15863 echo "$as_me:15863: result: $cf_cv_gcc_inline" >&5
15864 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15865 if test "$cf_cv_gcc_inline" = yes ; then
15867 cf_fix_cppflags=no
15868 cf_new_cflags=
15869 cf_new_cppflags=
15870 cf_new_extra_cppflags=
15872 for cf_add_cflags in --param max-inline-insns-single=1200
15874 case $cf_fix_cppflags in
15875 (no)
15876 case $cf_add_cflags in
15877 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15878 case $cf_add_cflags in
15879 (-D*)
15880 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15882 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15883 && test -z "${cf_tst_cflags}" \
15884 && cf_fix_cppflags=yes
15886 if test $cf_fix_cppflags = yes ; then
15887 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15888 continue
15889 elif test "${cf_tst_cflags}" = "\"'" ; then
15890 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15891 continue
15894 esac
15895 case "$CPPFLAGS" in
15896 (*$cf_add_cflags)
15899 case $cf_add_cflags in
15900 (-D*)
15901 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15903 CPPFLAGS=`echo "$CPPFLAGS" | \
15904 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15905 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15908 esac
15909 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15911 esac
15914 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15916 esac
15918 (yes)
15919 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15921 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15923 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15924 && test -z "${cf_tst_cflags}" \
15925 && cf_fix_cppflags=no
15927 esac
15928 done
15930 if test -n "$cf_new_cflags" ; then
15932 CFLAGS="$CFLAGS $cf_new_cflags"
15935 if test -n "$cf_new_cppflags" ; then
15937 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15940 if test -n "$cf_new_extra_cppflags" ; then
15942 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15949 echo "$as_me:15949: checking for signal global datatype" >&5
15950 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15951 if test "${cf_cv_sig_atomic_t+set}" = set; then
15952 echo $ECHO_N "(cached) $ECHO_C" >&6
15953 else
15955 for cf_type in \
15956 "volatile sig_atomic_t" \
15957 "sig_atomic_t" \
15958 "int"
15960 cat >conftest.$ac_ext <<_ACEOF
15961 #line 15961 "configure"
15962 #include "confdefs.h"
15964 #include <sys/types.h>
15965 #include <signal.h>
15966 #include <stdio.h>
15968 extern $cf_type x;
15969 $cf_type x;
15970 static void handler(int sig)
15972 x = 5;
15975 main ()
15977 signal(SIGINT, handler);
15978 x = 1
15980 return 0;
15982 _ACEOF
15983 rm -f conftest.$ac_objext
15984 if { (eval echo "$as_me:15984: \"$ac_compile\"") >&5
15985 (eval $ac_compile) 2>&5
15986 ac_status=$?
15987 echo "$as_me:15987: \$? = $ac_status" >&5
15988 (exit $ac_status); } &&
15989 { ac_try='test -s conftest.$ac_objext'
15990 { (eval echo "$as_me:15990: \"$ac_try\"") >&5
15991 (eval $ac_try) 2>&5
15992 ac_status=$?
15993 echo "$as_me:15993: \$? = $ac_status" >&5
15994 (exit $ac_status); }; }; then
15995 cf_cv_sig_atomic_t=$cf_type
15996 else
15997 echo "$as_me: failed program was:" >&5
15998 cat conftest.$ac_ext >&5
15999 cf_cv_sig_atomic_t=no
16001 rm -f conftest.$ac_objext conftest.$ac_ext
16002 test "$cf_cv_sig_atomic_t" != no && break
16003 done
16007 echo "$as_me:16007: result: $cf_cv_sig_atomic_t" >&5
16008 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16009 test "$cf_cv_sig_atomic_t" != no &&
16010 cat >>confdefs.h <<EOF
16011 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16014 if test $NCURSES_CHTYPE = auto ; then
16016 echo "$as_me:16016: checking for type of chtype" >&5
16017 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16018 if test "${cf_cv_typeof_chtype+set}" = set; then
16019 echo $ECHO_N "(cached) $ECHO_C" >&6
16020 else
16022 if test "$cross_compiling" = yes; then
16023 cf_cv_typeof_chtype=long
16024 else
16025 cat >conftest.$ac_ext <<_ACEOF
16026 #line 16026 "configure"
16027 #include "confdefs.h"
16029 #define WANT_BITS 31
16030 #include <stdio.h>
16031 int main()
16033 FILE *fp = fopen("cf_test.out", "w");
16034 if (fp != 0) {
16035 char *result = "long";
16036 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16037 int n;
16038 unsigned int x, y;
16039 for (n = 0; n < WANT_BITS; n++) {
16040 x = (1 << n);
16041 y = (x >> n);
16042 if (y != 1 || x == 0) {
16043 x = 0;
16044 break;
16048 * If x is nonzero, an int is big enough for the bits
16049 * that we want.
16051 result = (x != 0) ? "int" : "long";
16053 fputs(result, fp);
16054 fclose(fp);
16056 ${cf_cv_main_return:-return}(0);
16059 _ACEOF
16060 rm -f conftest$ac_exeext
16061 if { (eval echo "$as_me:16061: \"$ac_link\"") >&5
16062 (eval $ac_link) 2>&5
16063 ac_status=$?
16064 echo "$as_me:16064: \$? = $ac_status" >&5
16065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16066 { (eval echo "$as_me:16066: \"$ac_try\"") >&5
16067 (eval $ac_try) 2>&5
16068 ac_status=$?
16069 echo "$as_me:16069: \$? = $ac_status" >&5
16070 (exit $ac_status); }; }; then
16071 cf_cv_typeof_chtype=`cat cf_test.out`
16072 else
16073 echo "$as_me: program exited with status $ac_status" >&5
16074 echo "$as_me: failed program was:" >&5
16075 cat conftest.$ac_ext >&5
16076 cf_cv_typeof_chtype=long
16078 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16080 rm -f cf_test.out
16084 echo "$as_me:16084: result: $cf_cv_typeof_chtype" >&5
16085 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16087 cat >>confdefs.h <<EOF
16088 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16091 else
16092 cf_cv_typeof_chtype=$NCURSES_CHTYPE
16094 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16096 echo "$as_me:16096: checking if unsigned literals are legal" >&5
16097 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16098 if test "${cf_cv_unsigned_literals+set}" = set; then
16099 echo $ECHO_N "(cached) $ECHO_C" >&6
16100 else
16102 cat >conftest.$ac_ext <<_ACEOF
16103 #line 16103 "configure"
16104 #include "confdefs.h"
16107 main ()
16109 long x = 1L + 1UL + 1U + 1
16111 return 0;
16113 _ACEOF
16114 rm -f conftest.$ac_objext
16115 if { (eval echo "$as_me:16115: \"$ac_compile\"") >&5
16116 (eval $ac_compile) 2>&5
16117 ac_status=$?
16118 echo "$as_me:16118: \$? = $ac_status" >&5
16119 (exit $ac_status); } &&
16120 { ac_try='test -s conftest.$ac_objext'
16121 { (eval echo "$as_me:16121: \"$ac_try\"") >&5
16122 (eval $ac_try) 2>&5
16123 ac_status=$?
16124 echo "$as_me:16124: \$? = $ac_status" >&5
16125 (exit $ac_status); }; }; then
16126 cf_cv_unsigned_literals=yes
16127 else
16128 echo "$as_me: failed program was:" >&5
16129 cat conftest.$ac_ext >&5
16130 cf_cv_unsigned_literals=no
16132 rm -f conftest.$ac_objext conftest.$ac_ext
16136 echo "$as_me:16136: result: $cf_cv_unsigned_literals" >&5
16137 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16139 cf_cv_1UL="1"
16140 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16141 test ".$cf_cv_typeof_chtype" = .long && cf_cv_1UL="${cf_cv_1UL}L"
16143 if test $NCURSES_MMASK_T = auto ; then
16144 cf_cv_typeof_mmask_t=long
16145 else
16146 cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16148 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16150 ### Checks for external-data
16152 echo "$as_me:16152: checking if external errno is declared" >&5
16153 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16154 if test "${cf_cv_dcl_errno+set}" = set; then
16155 echo $ECHO_N "(cached) $ECHO_C" >&6
16156 else
16158 cat >conftest.$ac_ext <<_ACEOF
16159 #line 16159 "configure"
16160 #include "confdefs.h"
16162 #ifdef HAVE_STDLIB_H
16163 #include <stdlib.h>
16164 #endif
16165 #include <stdio.h>
16166 #include <sys/types.h>
16167 #include <errno.h>
16169 main ()
16171 int x = (int) errno
16173 return 0;
16175 _ACEOF
16176 rm -f conftest.$ac_objext
16177 if { (eval echo "$as_me:16177: \"$ac_compile\"") >&5
16178 (eval $ac_compile) 2>&5
16179 ac_status=$?
16180 echo "$as_me:16180: \$? = $ac_status" >&5
16181 (exit $ac_status); } &&
16182 { ac_try='test -s conftest.$ac_objext'
16183 { (eval echo "$as_me:16183: \"$ac_try\"") >&5
16184 (eval $ac_try) 2>&5
16185 ac_status=$?
16186 echo "$as_me:16186: \$? = $ac_status" >&5
16187 (exit $ac_status); }; }; then
16188 cf_cv_dcl_errno=yes
16189 else
16190 echo "$as_me: failed program was:" >&5
16191 cat conftest.$ac_ext >&5
16192 cf_cv_dcl_errno=no
16194 rm -f conftest.$ac_objext conftest.$ac_ext
16197 echo "$as_me:16197: result: $cf_cv_dcl_errno" >&5
16198 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16200 if test "$cf_cv_dcl_errno" = no ; then
16202 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16204 cat >>confdefs.h <<EOF
16205 #define $cf_result 1
16210 # It's possible (for near-UNIX clones) that the data doesn't exist
16212 echo "$as_me:16212: checking if external errno exists" >&5
16213 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16214 if test "${cf_cv_have_errno+set}" = set; then
16215 echo $ECHO_N "(cached) $ECHO_C" >&6
16216 else
16218 cat >conftest.$ac_ext <<_ACEOF
16219 #line 16219 "configure"
16220 #include "confdefs.h"
16222 #undef errno
16223 extern int errno;
16226 main ()
16228 errno = 2
16230 return 0;
16232 _ACEOF
16233 rm -f conftest.$ac_objext conftest$ac_exeext
16234 if { (eval echo "$as_me:16234: \"$ac_link\"") >&5
16235 (eval $ac_link) 2>&5
16236 ac_status=$?
16237 echo "$as_me:16237: \$? = $ac_status" >&5
16238 (exit $ac_status); } &&
16239 { ac_try='test -s conftest$ac_exeext'
16240 { (eval echo "$as_me:16240: \"$ac_try\"") >&5
16241 (eval $ac_try) 2>&5
16242 ac_status=$?
16243 echo "$as_me:16243: \$? = $ac_status" >&5
16244 (exit $ac_status); }; }; then
16245 cf_cv_have_errno=yes
16246 else
16247 echo "$as_me: failed program was:" >&5
16248 cat conftest.$ac_ext >&5
16249 cf_cv_have_errno=no
16251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16254 echo "$as_me:16254: result: $cf_cv_have_errno" >&5
16255 echo "${ECHO_T}$cf_cv_have_errno" >&6
16257 if test "$cf_cv_have_errno" = yes ; then
16259 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16261 cat >>confdefs.h <<EOF
16262 #define $cf_result 1
16267 echo "$as_me:16267: checking if data-only library module links" >&5
16268 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16269 if test "${cf_cv_link_dataonly+set}" = set; then
16270 echo $ECHO_N "(cached) $ECHO_C" >&6
16271 else
16273 rm -f conftest.a
16274 cat >conftest.$ac_ext <<EOF
16275 #line 16275 "configure"
16276 int testdata[3] = { 123, 456, 789 };
16278 if { (eval echo "$as_me:16278: \"$ac_compile\"") >&5
16279 (eval $ac_compile) 2>&5
16280 ac_status=$?
16281 echo "$as_me:16281: \$? = $ac_status" >&5
16282 (exit $ac_status); } ; then
16283 mv conftest.o data.o && \
16284 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16286 rm -f conftest.$ac_ext data.o
16287 cat >conftest.$ac_ext <<EOF
16288 #line 16288 "configure"
16289 int testfunc()
16291 #if defined(NeXT)
16292 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
16293 #else
16294 extern int testdata[3];
16295 return testdata[0] == 123
16296 && testdata[1] == 456
16297 && testdata[2] == 789;
16298 #endif
16301 if { (eval echo "$as_me:16301: \"$ac_compile\"") >&5
16302 (eval $ac_compile) 2>&5
16303 ac_status=$?
16304 echo "$as_me:16304: \$? = $ac_status" >&5
16305 (exit $ac_status); }; then
16306 mv conftest.o func.o && \
16307 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16309 rm -f conftest.$ac_ext func.o
16310 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16311 cf_saveLIBS="$LIBS"
16312 LIBS="conftest.a $LIBS"
16313 if test "$cross_compiling" = yes; then
16314 cf_cv_link_dataonly=unknown
16315 else
16316 cat >conftest.$ac_ext <<_ACEOF
16317 #line 16317 "configure"
16318 #include "confdefs.h"
16320 int main()
16322 extern int testfunc();
16323 ${cf_cv_main_return:-return} (!testfunc());
16326 _ACEOF
16327 rm -f conftest$ac_exeext
16328 if { (eval echo "$as_me:16328: \"$ac_link\"") >&5
16329 (eval $ac_link) 2>&5
16330 ac_status=$?
16331 echo "$as_me:16331: \$? = $ac_status" >&5
16332 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16333 { (eval echo "$as_me:16333: \"$ac_try\"") >&5
16334 (eval $ac_try) 2>&5
16335 ac_status=$?
16336 echo "$as_me:16336: \$? = $ac_status" >&5
16337 (exit $ac_status); }; }; then
16338 cf_cv_link_dataonly=yes
16339 else
16340 echo "$as_me: program exited with status $ac_status" >&5
16341 echo "$as_me: failed program was:" >&5
16342 cat conftest.$ac_ext >&5
16343 cf_cv_link_dataonly=no
16345 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16347 LIBS="$cf_saveLIBS"
16351 echo "$as_me:16351: result: $cf_cv_link_dataonly" >&5
16352 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16354 if test "$cf_cv_link_dataonly" = no ; then
16356 cat >>confdefs.h <<\EOF
16357 #define BROKEN_LINKER 1
16360 BROKEN_LINKER=1
16363 ### Checks for library functions.
16365 for ac_func in \
16366 getcwd \
16367 getegid \
16368 geteuid \
16369 getopt \
16370 getttynam \
16371 issetugid \
16372 poll \
16373 putenv \
16374 remove \
16375 select \
16376 setbuf \
16377 setbuffer \
16378 setenv \
16379 setvbuf \
16380 sigaction \
16381 sigvec \
16382 strdup \
16383 strstr \
16384 tcgetpgrp \
16385 times \
16386 vsnprintf \
16389 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16390 echo "$as_me:16390: checking for $ac_func" >&5
16391 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16392 if eval "test \"\${$as_ac_var+set}\" = set"; then
16393 echo $ECHO_N "(cached) $ECHO_C" >&6
16394 else
16395 cat >conftest.$ac_ext <<_ACEOF
16396 #line 16396 "configure"
16397 #include "confdefs.h"
16398 /* System header to define __stub macros and hopefully few prototypes,
16399 which can conflict with char $ac_func (); below. */
16400 #include <assert.h>
16401 /* Override any gcc2 internal prototype to avoid an error. */
16402 #ifdef __cplusplus
16403 extern "C"
16404 #endif
16405 /* We use char because int might match the return type of a gcc2
16406 builtin and then its argument prototype would still apply. */
16407 char $ac_func ();
16408 char (*f) ();
16411 main ()
16413 /* The GNU C library defines this for functions which it implements
16414 to always fail with ENOSYS. Some functions are actually named
16415 something starting with __ and the normal name is an alias. */
16416 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16417 choke me
16418 #else
16419 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16420 #endif
16423 return 0;
16425 _ACEOF
16426 rm -f conftest.$ac_objext conftest$ac_exeext
16427 if { (eval echo "$as_me:16427: \"$ac_link\"") >&5
16428 (eval $ac_link) 2>&5
16429 ac_status=$?
16430 echo "$as_me:16430: \$? = $ac_status" >&5
16431 (exit $ac_status); } &&
16432 { ac_try='test -s conftest$ac_exeext'
16433 { (eval echo "$as_me:16433: \"$ac_try\"") >&5
16434 (eval $ac_try) 2>&5
16435 ac_status=$?
16436 echo "$as_me:16436: \$? = $ac_status" >&5
16437 (exit $ac_status); }; }; then
16438 eval "$as_ac_var=yes"
16439 else
16440 echo "$as_me: failed program was:" >&5
16441 cat conftest.$ac_ext >&5
16442 eval "$as_ac_var=no"
16444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16446 echo "$as_me:16446: result: `eval echo '${'$as_ac_var'}'`" >&5
16447 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16448 if test `eval echo '${'$as_ac_var'}'` = yes; then
16449 cat >>confdefs.h <<EOF
16450 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16454 done
16456 if test "x$ac_cv_func_getopt" = xno &&
16457 test "x$cf_with_progs$cf_with_tests" != xnono; then
16458 { { echo "$as_me:16458: error: getopt is required for building programs" >&5
16459 echo "$as_me: error: getopt is required for building programs" >&2;}
16460 { (exit 1); exit 1; }; }
16463 if test "x$with_getcap" = "xyes" ; then
16465 echo "$as_me:16465: checking for terminal-capability database functions" >&5
16466 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16467 if test "${cf_cv_cgetent+set}" = set; then
16468 echo $ECHO_N "(cached) $ECHO_C" >&6
16469 else
16471 cat >conftest.$ac_ext <<_ACEOF
16472 #line 16472 "configure"
16473 #include "confdefs.h"
16475 #include <stdlib.h>
16477 main ()
16480 char temp[128];
16481 char *buf = temp;
16482 char *db_array = temp;
16483 cgetent(&buf, &db_array, "vt100");
16484 cgetcap(buf, "tc", '=');
16485 cgetmatch(buf, "tc");
16488 return 0;
16490 _ACEOF
16491 rm -f conftest.$ac_objext conftest$ac_exeext
16492 if { (eval echo "$as_me:16492: \"$ac_link\"") >&5
16493 (eval $ac_link) 2>&5
16494 ac_status=$?
16495 echo "$as_me:16495: \$? = $ac_status" >&5
16496 (exit $ac_status); } &&
16497 { ac_try='test -s conftest$ac_exeext'
16498 { (eval echo "$as_me:16498: \"$ac_try\"") >&5
16499 (eval $ac_try) 2>&5
16500 ac_status=$?
16501 echo "$as_me:16501: \$? = $ac_status" >&5
16502 (exit $ac_status); }; }; then
16503 cf_cv_cgetent=yes
16504 else
16505 echo "$as_me: failed program was:" >&5
16506 cat conftest.$ac_ext >&5
16507 cf_cv_cgetent=no
16509 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16512 echo "$as_me:16512: result: $cf_cv_cgetent" >&5
16513 echo "${ECHO_T}$cf_cv_cgetent" >&6
16515 if test "$cf_cv_cgetent" = yes
16516 then
16518 cat >>confdefs.h <<\EOF
16519 #define HAVE_BSD_CGETENT 1
16522 echo "$as_me:16522: checking if cgetent uses const parameter" >&5
16523 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16524 if test "${cf_cv_cgetent_const+set}" = set; then
16525 echo $ECHO_N "(cached) $ECHO_C" >&6
16526 else
16528 cat >conftest.$ac_ext <<_ACEOF
16529 #line 16529 "configure"
16530 #include "confdefs.h"
16532 #include <stdlib.h>
16534 main ()
16537 char temp[128];
16538 char *buf = temp;
16539 #ifndef _NETBSD_SOURCE /* given, since April 2004 in stdlib.h */
16540 const char *db_array = temp;
16541 cgetent(&buf, &db_array, "vt100");
16542 #endif
16543 cgetcap(buf, "tc", '=');
16544 cgetmatch(buf, "tc");
16547 return 0;
16549 _ACEOF
16550 rm -f conftest.$ac_objext conftest$ac_exeext
16551 if { (eval echo "$as_me:16551: \"$ac_link\"") >&5
16552 (eval $ac_link) 2>&5
16553 ac_status=$?
16554 echo "$as_me:16554: \$? = $ac_status" >&5
16555 (exit $ac_status); } &&
16556 { ac_try='test -s conftest$ac_exeext'
16557 { (eval echo "$as_me:16557: \"$ac_try\"") >&5
16558 (eval $ac_try) 2>&5
16559 ac_status=$?
16560 echo "$as_me:16560: \$? = $ac_status" >&5
16561 (exit $ac_status); }; }; then
16562 cf_cv_cgetent_const=yes
16563 else
16564 echo "$as_me: failed program was:" >&5
16565 cat conftest.$ac_ext >&5
16566 cf_cv_cgetent_const=no
16568 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16571 echo "$as_me:16571: result: $cf_cv_cgetent_const" >&5
16572 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16573 if test "$cf_cv_cgetent_const" = yes
16574 then
16576 cat >>confdefs.h <<EOF
16577 #define CGETENT_CONST const
16585 echo "$as_me:16585: checking for isascii" >&5
16586 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16587 if test "${cf_cv_have_isascii+set}" = set; then
16588 echo $ECHO_N "(cached) $ECHO_C" >&6
16589 else
16591 cat >conftest.$ac_ext <<_ACEOF
16592 #line 16592 "configure"
16593 #include "confdefs.h"
16594 #include <ctype.h>
16596 main ()
16598 int x = isascii(' ')
16600 return 0;
16602 _ACEOF
16603 rm -f conftest.$ac_objext conftest$ac_exeext
16604 if { (eval echo "$as_me:16604: \"$ac_link\"") >&5
16605 (eval $ac_link) 2>&5
16606 ac_status=$?
16607 echo "$as_me:16607: \$? = $ac_status" >&5
16608 (exit $ac_status); } &&
16609 { ac_try='test -s conftest$ac_exeext'
16610 { (eval echo "$as_me:16610: \"$ac_try\"") >&5
16611 (eval $ac_try) 2>&5
16612 ac_status=$?
16613 echo "$as_me:16613: \$? = $ac_status" >&5
16614 (exit $ac_status); }; }; then
16615 cf_cv_have_isascii=yes
16616 else
16617 echo "$as_me: failed program was:" >&5
16618 cat conftest.$ac_ext >&5
16619 cf_cv_have_isascii=no
16621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16624 echo "$as_me:16624: result: $cf_cv_have_isascii" >&5
16625 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16626 test "$cf_cv_have_isascii" = yes &&
16627 cat >>confdefs.h <<\EOF
16628 #define HAVE_ISASCII 1
16631 if test "$ac_cv_func_sigaction" = yes; then
16632 echo "$as_me:16632: checking whether sigaction needs _POSIX_SOURCE" >&5
16633 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16634 cat >conftest.$ac_ext <<_ACEOF
16635 #line 16635 "configure"
16636 #include "confdefs.h"
16638 #include <sys/types.h>
16639 #include <signal.h>
16641 main ()
16643 struct sigaction act
16645 return 0;
16647 _ACEOF
16648 rm -f conftest.$ac_objext
16649 if { (eval echo "$as_me:16649: \"$ac_compile\"") >&5
16650 (eval $ac_compile) 2>&5
16651 ac_status=$?
16652 echo "$as_me:16652: \$? = $ac_status" >&5
16653 (exit $ac_status); } &&
16654 { ac_try='test -s conftest.$ac_objext'
16655 { (eval echo "$as_me:16655: \"$ac_try\"") >&5
16656 (eval $ac_try) 2>&5
16657 ac_status=$?
16658 echo "$as_me:16658: \$? = $ac_status" >&5
16659 (exit $ac_status); }; }; then
16660 sigact_bad=no
16661 else
16662 echo "$as_me: failed program was:" >&5
16663 cat conftest.$ac_ext >&5
16665 cat >conftest.$ac_ext <<_ACEOF
16666 #line 16666 "configure"
16667 #include "confdefs.h"
16669 #define _POSIX_SOURCE
16670 #include <sys/types.h>
16671 #include <signal.h>
16673 main ()
16675 struct sigaction act
16677 return 0;
16679 _ACEOF
16680 rm -f conftest.$ac_objext
16681 if { (eval echo "$as_me:16681: \"$ac_compile\"") >&5
16682 (eval $ac_compile) 2>&5
16683 ac_status=$?
16684 echo "$as_me:16684: \$? = $ac_status" >&5
16685 (exit $ac_status); } &&
16686 { ac_try='test -s conftest.$ac_objext'
16687 { (eval echo "$as_me:16687: \"$ac_try\"") >&5
16688 (eval $ac_try) 2>&5
16689 ac_status=$?
16690 echo "$as_me:16690: \$? = $ac_status" >&5
16691 (exit $ac_status); }; }; then
16692 sigact_bad=yes
16694 cat >>confdefs.h <<\EOF
16695 #define _POSIX_SOURCE 1
16698 else
16699 echo "$as_me: failed program was:" >&5
16700 cat conftest.$ac_ext >&5
16701 sigact_bad=unknown
16703 rm -f conftest.$ac_objext conftest.$ac_ext
16705 rm -f conftest.$ac_objext conftest.$ac_ext
16706 echo "$as_me:16706: result: $sigact_bad" >&5
16707 echo "${ECHO_T}$sigact_bad" >&6
16710 echo "$as_me:16710: checking if nanosleep really works" >&5
16711 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16712 if test "${cf_cv_func_nanosleep+set}" = set; then
16713 echo $ECHO_N "(cached) $ECHO_C" >&6
16714 else
16716 if test "$cross_compiling" = yes; then
16717 cf_cv_func_nanosleep=unknown
16718 else
16719 cat >conftest.$ac_ext <<_ACEOF
16720 #line 16720 "configure"
16721 #include "confdefs.h"
16723 #include <stdio.h>
16724 #include <errno.h>
16725 #include <time.h>
16727 #ifdef HAVE_SYS_TIME_H
16728 #include <sys/time.h>
16729 #endif
16731 int main() {
16732 struct timespec ts1, ts2;
16733 int code;
16734 ts1.tv_sec = 0;
16735 ts1.tv_nsec = 750000000;
16736 ts2.tv_sec = 0;
16737 ts2.tv_nsec = 0;
16738 errno = 0;
16739 code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16740 ${cf_cv_main_return:-return}(code != 0);
16743 _ACEOF
16744 rm -f conftest$ac_exeext
16745 if { (eval echo "$as_me:16745: \"$ac_link\"") >&5
16746 (eval $ac_link) 2>&5
16747 ac_status=$?
16748 echo "$as_me:16748: \$? = $ac_status" >&5
16749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16750 { (eval echo "$as_me:16750: \"$ac_try\"") >&5
16751 (eval $ac_try) 2>&5
16752 ac_status=$?
16753 echo "$as_me:16753: \$? = $ac_status" >&5
16754 (exit $ac_status); }; }; then
16755 cf_cv_func_nanosleep=yes
16756 else
16757 echo "$as_me: program exited with status $ac_status" >&5
16758 echo "$as_me: failed program was:" >&5
16759 cat conftest.$ac_ext >&5
16760 cf_cv_func_nanosleep=no
16762 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16765 echo "$as_me:16765: result: $cf_cv_func_nanosleep" >&5
16766 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16768 test "$cf_cv_func_nanosleep" = "yes" &&
16769 cat >>confdefs.h <<\EOF
16770 #define HAVE_NANOSLEEP 1
16773 for ac_header in \
16774 termio.h \
16775 termios.h \
16776 unistd.h \
16779 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16780 echo "$as_me:16780: checking for $ac_header" >&5
16781 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16782 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16783 echo $ECHO_N "(cached) $ECHO_C" >&6
16784 else
16785 cat >conftest.$ac_ext <<_ACEOF
16786 #line 16786 "configure"
16787 #include "confdefs.h"
16788 #include <$ac_header>
16789 _ACEOF
16790 if { (eval echo "$as_me:16790: \"$ac_cpp conftest.$ac_ext\"") >&5
16791 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16792 ac_status=$?
16793 egrep -v '^ *\+' conftest.er1 >conftest.err
16794 rm -f conftest.er1
16795 cat conftest.err >&5
16796 echo "$as_me:16796: \$? = $ac_status" >&5
16797 (exit $ac_status); } >/dev/null; then
16798 if test -s conftest.err; then
16799 ac_cpp_err=$ac_c_preproc_warn_flag
16800 else
16801 ac_cpp_err=
16803 else
16804 ac_cpp_err=yes
16806 if test -z "$ac_cpp_err"; then
16807 eval "$as_ac_Header=yes"
16808 else
16809 echo "$as_me: failed program was:" >&5
16810 cat conftest.$ac_ext >&5
16811 eval "$as_ac_Header=no"
16813 rm -f conftest.err conftest.$ac_ext
16815 echo "$as_me:16815: result: `eval echo '${'$as_ac_Header'}'`" >&5
16816 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16817 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16818 cat >>confdefs.h <<EOF
16819 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16823 done
16825 if test "$ISC" = yes ; then
16827 for ac_header in sys/termio.h
16829 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16830 echo "$as_me:16830: checking for $ac_header" >&5
16831 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16832 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16833 echo $ECHO_N "(cached) $ECHO_C" >&6
16834 else
16835 cat >conftest.$ac_ext <<_ACEOF
16836 #line 16836 "configure"
16837 #include "confdefs.h"
16838 #include <$ac_header>
16839 _ACEOF
16840 if { (eval echo "$as_me:16840: \"$ac_cpp conftest.$ac_ext\"") >&5
16841 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16842 ac_status=$?
16843 egrep -v '^ *\+' conftest.er1 >conftest.err
16844 rm -f conftest.er1
16845 cat conftest.err >&5
16846 echo "$as_me:16846: \$? = $ac_status" >&5
16847 (exit $ac_status); } >/dev/null; then
16848 if test -s conftest.err; then
16849 ac_cpp_err=$ac_c_preproc_warn_flag
16850 else
16851 ac_cpp_err=
16853 else
16854 ac_cpp_err=yes
16856 if test -z "$ac_cpp_err"; then
16857 eval "$as_ac_Header=yes"
16858 else
16859 echo "$as_me: failed program was:" >&5
16860 cat conftest.$ac_ext >&5
16861 eval "$as_ac_Header=no"
16863 rm -f conftest.err conftest.$ac_ext
16865 echo "$as_me:16865: result: `eval echo '${'$as_ac_Header'}'`" >&5
16866 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16867 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16868 cat >>confdefs.h <<EOF
16869 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16873 done
16876 if test "$ac_cv_header_termios_h" = yes ; then
16877 case "$CFLAGS $CPPFLAGS" in
16878 (*-D_POSIX_SOURCE*)
16879 termios_bad=dunno ;;
16880 (*) termios_bad=maybe ;;
16881 esac
16882 if test "$termios_bad" = maybe ; then
16883 echo "$as_me:16883: checking whether termios.h needs _POSIX_SOURCE" >&5
16884 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16885 cat >conftest.$ac_ext <<_ACEOF
16886 #line 16886 "configure"
16887 #include "confdefs.h"
16888 #include <termios.h>
16890 main ()
16892 struct termios foo; int x = foo.c_iflag
16894 return 0;
16896 _ACEOF
16897 rm -f conftest.$ac_objext
16898 if { (eval echo "$as_me:16898: \"$ac_compile\"") >&5
16899 (eval $ac_compile) 2>&5
16900 ac_status=$?
16901 echo "$as_me:16901: \$? = $ac_status" >&5
16902 (exit $ac_status); } &&
16903 { ac_try='test -s conftest.$ac_objext'
16904 { (eval echo "$as_me:16904: \"$ac_try\"") >&5
16905 (eval $ac_try) 2>&5
16906 ac_status=$?
16907 echo "$as_me:16907: \$? = $ac_status" >&5
16908 (exit $ac_status); }; }; then
16909 termios_bad=no
16910 else
16911 echo "$as_me: failed program was:" >&5
16912 cat conftest.$ac_ext >&5
16914 cat >conftest.$ac_ext <<_ACEOF
16915 #line 16915 "configure"
16916 #include "confdefs.h"
16918 #define _POSIX_SOURCE
16919 #include <termios.h>
16921 main ()
16923 struct termios foo; int x = foo.c_iflag
16925 return 0;
16927 _ACEOF
16928 rm -f conftest.$ac_objext
16929 if { (eval echo "$as_me:16929: \"$ac_compile\"") >&5
16930 (eval $ac_compile) 2>&5
16931 ac_status=$?
16932 echo "$as_me:16932: \$? = $ac_status" >&5
16933 (exit $ac_status); } &&
16934 { ac_try='test -s conftest.$ac_objext'
16935 { (eval echo "$as_me:16935: \"$ac_try\"") >&5
16936 (eval $ac_try) 2>&5
16937 ac_status=$?
16938 echo "$as_me:16938: \$? = $ac_status" >&5
16939 (exit $ac_status); }; }; then
16940 termios_bad=unknown
16941 else
16942 echo "$as_me: failed program was:" >&5
16943 cat conftest.$ac_ext >&5
16944 termios_bad=yes
16945 cat >>confdefs.h <<\EOF
16946 #define _POSIX_SOURCE 1
16950 rm -f conftest.$ac_objext conftest.$ac_ext
16953 rm -f conftest.$ac_objext conftest.$ac_ext
16954 echo "$as_me:16954: result: $termios_bad" >&5
16955 echo "${ECHO_T}$termios_bad" >&6
16959 echo "$as_me:16959: checking for tcgetattr" >&5
16960 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16961 if test "${cf_cv_have_tcgetattr+set}" = set; then
16962 echo $ECHO_N "(cached) $ECHO_C" >&6
16963 else
16965 cat >conftest.$ac_ext <<_ACEOF
16966 #line 16966 "configure"
16967 #include "confdefs.h"
16969 #include <sys/types.h>
16970 #ifdef HAVE_UNISTD_H
16971 #include <unistd.h>
16972 #endif
16973 #ifdef HAVE_TERMIOS_H
16974 #include <termios.h>
16975 #define TTY struct termios
16976 #else
16977 #ifdef HAVE_TERMIO_H
16978 #include <termio.h>
16979 #define TTY struct termio
16980 #endif
16981 #endif
16984 main ()
16987 TTY foo;
16988 tcgetattr(1, &foo);
16990 return 0;
16992 _ACEOF
16993 rm -f conftest.$ac_objext conftest$ac_exeext
16994 if { (eval echo "$as_me:16994: \"$ac_link\"") >&5
16995 (eval $ac_link) 2>&5
16996 ac_status=$?
16997 echo "$as_me:16997: \$? = $ac_status" >&5
16998 (exit $ac_status); } &&
16999 { ac_try='test -s conftest$ac_exeext'
17000 { (eval echo "$as_me:17000: \"$ac_try\"") >&5
17001 (eval $ac_try) 2>&5
17002 ac_status=$?
17003 echo "$as_me:17003: \$? = $ac_status" >&5
17004 (exit $ac_status); }; }; then
17005 cf_cv_have_tcgetattr=yes
17006 else
17007 echo "$as_me: failed program was:" >&5
17008 cat conftest.$ac_ext >&5
17009 cf_cv_have_tcgetattr=no
17011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17013 echo "$as_me:17013: result: $cf_cv_have_tcgetattr" >&5
17014 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17015 test "$cf_cv_have_tcgetattr" = yes &&
17016 cat >>confdefs.h <<\EOF
17017 #define HAVE_TCGETATTR 1
17020 echo "$as_me:17020: checking for vsscanf function or workaround" >&5
17021 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17022 if test "${cf_cv_func_vsscanf+set}" = set; then
17023 echo $ECHO_N "(cached) $ECHO_C" >&6
17024 else
17026 cat >conftest.$ac_ext <<_ACEOF
17027 #line 17027 "configure"
17028 #include "confdefs.h"
17030 #include <stdarg.h>
17031 #include <stdio.h>
17033 main ()
17036 va_list ap;
17037 vsscanf("from", "%d", ap)
17039 return 0;
17041 _ACEOF
17042 rm -f conftest.$ac_objext conftest$ac_exeext
17043 if { (eval echo "$as_me:17043: \"$ac_link\"") >&5
17044 (eval $ac_link) 2>&5
17045 ac_status=$?
17046 echo "$as_me:17046: \$? = $ac_status" >&5
17047 (exit $ac_status); } &&
17048 { ac_try='test -s conftest$ac_exeext'
17049 { (eval echo "$as_me:17049: \"$ac_try\"") >&5
17050 (eval $ac_try) 2>&5
17051 ac_status=$?
17052 echo "$as_me:17052: \$? = $ac_status" >&5
17053 (exit $ac_status); }; }; then
17054 cf_cv_func_vsscanf=vsscanf
17055 else
17056 echo "$as_me: failed program was:" >&5
17057 cat conftest.$ac_ext >&5
17059 cat >conftest.$ac_ext <<_ACEOF
17060 #line 17060 "configure"
17061 #include "confdefs.h"
17063 #include <stdarg.h>
17064 #include <stdio.h>
17066 main ()
17069 FILE strbuf;
17070 char *str = "from";
17072 strbuf._flag = _IOREAD;
17073 strbuf._ptr = strbuf._base = (unsigned char *) str;
17074 strbuf._cnt = strlen(str);
17075 strbuf._file = _NFILE;
17076 return (vfscanf(&strbuf, "%d", ap))
17078 return 0;
17080 _ACEOF
17081 rm -f conftest.$ac_objext conftest$ac_exeext
17082 if { (eval echo "$as_me:17082: \"$ac_link\"") >&5
17083 (eval $ac_link) 2>&5
17084 ac_status=$?
17085 echo "$as_me:17085: \$? = $ac_status" >&5
17086 (exit $ac_status); } &&
17087 { ac_try='test -s conftest$ac_exeext'
17088 { (eval echo "$as_me:17088: \"$ac_try\"") >&5
17089 (eval $ac_try) 2>&5
17090 ac_status=$?
17091 echo "$as_me:17091: \$? = $ac_status" >&5
17092 (exit $ac_status); }; }; then
17093 cf_cv_func_vsscanf=vfscanf
17094 else
17095 echo "$as_me: failed program was:" >&5
17096 cat conftest.$ac_ext >&5
17098 cat >conftest.$ac_ext <<_ACEOF
17099 #line 17099 "configure"
17100 #include "confdefs.h"
17102 #include <stdarg.h>
17103 #include <stdio.h>
17105 main ()
17108 FILE strbuf;
17109 char *str = "from";
17111 strbuf._flag = _IOREAD;
17112 strbuf._ptr = strbuf._base = (unsigned char *) str;
17113 strbuf._cnt = strlen(str);
17114 strbuf._file = _NFILE;
17115 return (_doscan(&strbuf, "%d", ap))
17117 return 0;
17119 _ACEOF
17120 rm -f conftest.$ac_objext conftest$ac_exeext
17121 if { (eval echo "$as_me:17121: \"$ac_link\"") >&5
17122 (eval $ac_link) 2>&5
17123 ac_status=$?
17124 echo "$as_me:17124: \$? = $ac_status" >&5
17125 (exit $ac_status); } &&
17126 { ac_try='test -s conftest$ac_exeext'
17127 { (eval echo "$as_me:17127: \"$ac_try\"") >&5
17128 (eval $ac_try) 2>&5
17129 ac_status=$?
17130 echo "$as_me:17130: \$? = $ac_status" >&5
17131 (exit $ac_status); }; }; then
17132 cf_cv_func_vsscanf=_doscan
17133 else
17134 echo "$as_me: failed program was:" >&5
17135 cat conftest.$ac_ext >&5
17137 cf_cv_func_vsscanf=no
17139 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17143 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17145 echo "$as_me:17145: result: $cf_cv_func_vsscanf" >&5
17146 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17148 case $cf_cv_func_vsscanf in
17149 (vsscanf)
17150 cat >>confdefs.h <<\EOF
17151 #define HAVE_VSSCANF 1
17154 (vfscanf)
17155 cat >>confdefs.h <<\EOF
17156 #define HAVE_VFSCANF 1
17159 (_doscan)
17160 cat >>confdefs.h <<\EOF
17161 #define HAVE__DOSCAN 1
17164 esac
17166 echo "$as_me:17166: checking for working mkstemp" >&5
17167 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17168 if test "${cf_cv_func_mkstemp+set}" = set; then
17169 echo $ECHO_N "(cached) $ECHO_C" >&6
17170 else
17172 rm -rf conftest*
17173 if test "$cross_compiling" = yes; then
17174 cf_cv_func_mkstemp=maybe
17175 else
17176 cat >conftest.$ac_ext <<_ACEOF
17177 #line 17177 "configure"
17178 #include "confdefs.h"
17180 #include <sys/types.h>
17181 #include <stdlib.h>
17182 #include <stdio.h>
17183 #include <string.h>
17184 #include <sys/stat.h>
17185 int main()
17187 char *tmpl = "conftestXXXXXX";
17188 char name[2][80];
17189 int n;
17190 int result = 0;
17191 int fd;
17192 struct stat sb;
17194 umask(077);
17195 for (n = 0; n < 2; ++n) {
17196 strcpy(name[n], tmpl);
17197 if ((fd = mkstemp(name[n])) >= 0) {
17198 if (!strcmp(name[n], tmpl)
17199 || stat(name[n], &sb) != 0
17200 || (sb.st_mode & S_IFMT) != S_IFREG
17201 || (sb.st_mode & 077) != 0) {
17202 result = 1;
17204 close(fd);
17207 if (result == 0
17208 && !strcmp(name[0], name[1]))
17209 result = 1;
17210 ${cf_cv_main_return:-return}(result);
17213 _ACEOF
17214 rm -f conftest$ac_exeext
17215 if { (eval echo "$as_me:17215: \"$ac_link\"") >&5
17216 (eval $ac_link) 2>&5
17217 ac_status=$?
17218 echo "$as_me:17218: \$? = $ac_status" >&5
17219 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17220 { (eval echo "$as_me:17220: \"$ac_try\"") >&5
17221 (eval $ac_try) 2>&5
17222 ac_status=$?
17223 echo "$as_me:17223: \$? = $ac_status" >&5
17224 (exit $ac_status); }; }; then
17225 cf_cv_func_mkstemp=yes
17227 else
17228 echo "$as_me: program exited with status $ac_status" >&5
17229 echo "$as_me: failed program was:" >&5
17230 cat conftest.$ac_ext >&5
17231 cf_cv_func_mkstemp=no
17234 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17238 echo "$as_me:17238: result: $cf_cv_func_mkstemp" >&5
17239 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17240 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17241 echo "$as_me:17241: checking for mkstemp" >&5
17242 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17243 if test "${ac_cv_func_mkstemp+set}" = set; then
17244 echo $ECHO_N "(cached) $ECHO_C" >&6
17245 else
17246 cat >conftest.$ac_ext <<_ACEOF
17247 #line 17247 "configure"
17248 #include "confdefs.h"
17249 /* System header to define __stub macros and hopefully few prototypes,
17250 which can conflict with char mkstemp (); below. */
17251 #include <assert.h>
17252 /* Override any gcc2 internal prototype to avoid an error. */
17253 #ifdef __cplusplus
17254 extern "C"
17255 #endif
17256 /* We use char because int might match the return type of a gcc2
17257 builtin and then its argument prototype would still apply. */
17258 char mkstemp ();
17259 char (*f) ();
17262 main ()
17264 /* The GNU C library defines this for functions which it implements
17265 to always fail with ENOSYS. Some functions are actually named
17266 something starting with __ and the normal name is an alias. */
17267 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17268 choke me
17269 #else
17270 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17271 #endif
17274 return 0;
17276 _ACEOF
17277 rm -f conftest.$ac_objext conftest$ac_exeext
17278 if { (eval echo "$as_me:17278: \"$ac_link\"") >&5
17279 (eval $ac_link) 2>&5
17280 ac_status=$?
17281 echo "$as_me:17281: \$? = $ac_status" >&5
17282 (exit $ac_status); } &&
17283 { ac_try='test -s conftest$ac_exeext'
17284 { (eval echo "$as_me:17284: \"$ac_try\"") >&5
17285 (eval $ac_try) 2>&5
17286 ac_status=$?
17287 echo "$as_me:17287: \$? = $ac_status" >&5
17288 (exit $ac_status); }; }; then
17289 ac_cv_func_mkstemp=yes
17290 else
17291 echo "$as_me: failed program was:" >&5
17292 cat conftest.$ac_ext >&5
17293 ac_cv_func_mkstemp=no
17295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17297 echo "$as_me:17297: result: $ac_cv_func_mkstemp" >&5
17298 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17301 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17303 cat >>confdefs.h <<\EOF
17304 #define HAVE_MKSTEMP 1
17309 # setup for prototype of fallback for vsscanf()
17311 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17312 HAVE_VSSCANF=1
17313 else
17314 HAVE_VSSCANF=0
17317 if test "x$cross_compiling" = xyes ; then
17318 { echo "$as_me:17318: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17319 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17320 else
17321 echo "$as_me:17321: checking whether setvbuf arguments are reversed" >&5
17322 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17323 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17324 echo $ECHO_N "(cached) $ECHO_C" >&6
17325 else
17326 if test "$cross_compiling" = yes; then
17327 { { echo "$as_me:17327: error: cannot run test program while cross compiling" >&5
17328 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17329 { (exit 1); exit 1; }; }
17330 else
17331 cat >conftest.$ac_ext <<_ACEOF
17332 #line 17332 "configure"
17333 #include "confdefs.h"
17334 #include <stdio.h>
17335 /* If setvbuf has the reversed format, exit 0. */
17337 main ()
17339 /* This call has the arguments reversed.
17340 A reversed system may check and see that the address of main
17341 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
17342 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17343 $ac_main_return(1);
17344 putc('\r', stdout);
17345 $ac_main_return(0); /* Non-reversed systems segv here. */
17347 _ACEOF
17348 rm -f conftest$ac_exeext
17349 if { (eval echo "$as_me:17349: \"$ac_link\"") >&5
17350 (eval $ac_link) 2>&5
17351 ac_status=$?
17352 echo "$as_me:17352: \$? = $ac_status" >&5
17353 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17354 { (eval echo "$as_me:17354: \"$ac_try\"") >&5
17355 (eval $ac_try) 2>&5
17356 ac_status=$?
17357 echo "$as_me:17357: \$? = $ac_status" >&5
17358 (exit $ac_status); }; }; then
17359 ac_cv_func_setvbuf_reversed=yes
17360 else
17361 echo "$as_me: program exited with status $ac_status" >&5
17362 echo "$as_me: failed program was:" >&5
17363 cat conftest.$ac_ext >&5
17364 ac_cv_func_setvbuf_reversed=no
17366 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17368 rm -f core core.* *.core
17370 echo "$as_me:17370: result: $ac_cv_func_setvbuf_reversed" >&5
17371 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17372 if test $ac_cv_func_setvbuf_reversed = yes; then
17374 cat >>confdefs.h <<\EOF
17375 #define SETVBUF_REVERSED 1
17381 echo "$as_me:17381: checking for intptr_t" >&5
17382 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17383 if test "${ac_cv_type_intptr_t+set}" = set; then
17384 echo $ECHO_N "(cached) $ECHO_C" >&6
17385 else
17386 cat >conftest.$ac_ext <<_ACEOF
17387 #line 17387 "configure"
17388 #include "confdefs.h"
17389 $ac_includes_default
17391 main ()
17393 if ((intptr_t *) 0)
17394 return 0;
17395 if (sizeof (intptr_t))
17396 return 0;
17398 return 0;
17400 _ACEOF
17401 rm -f conftest.$ac_objext
17402 if { (eval echo "$as_me:17402: \"$ac_compile\"") >&5
17403 (eval $ac_compile) 2>&5
17404 ac_status=$?
17405 echo "$as_me:17405: \$? = $ac_status" >&5
17406 (exit $ac_status); } &&
17407 { ac_try='test -s conftest.$ac_objext'
17408 { (eval echo "$as_me:17408: \"$ac_try\"") >&5
17409 (eval $ac_try) 2>&5
17410 ac_status=$?
17411 echo "$as_me:17411: \$? = $ac_status" >&5
17412 (exit $ac_status); }; }; then
17413 ac_cv_type_intptr_t=yes
17414 else
17415 echo "$as_me: failed program was:" >&5
17416 cat conftest.$ac_ext >&5
17417 ac_cv_type_intptr_t=no
17419 rm -f conftest.$ac_objext conftest.$ac_ext
17421 echo "$as_me:17421: result: $ac_cv_type_intptr_t" >&5
17422 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17423 if test $ac_cv_type_intptr_t = yes; then
17425 else
17427 cat >>confdefs.h <<EOF
17428 #define intptr_t long
17433 echo "$as_me:17433: checking for ssize_t" >&5
17434 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17435 if test "${ac_cv_type_ssize_t+set}" = set; then
17436 echo $ECHO_N "(cached) $ECHO_C" >&6
17437 else
17438 cat >conftest.$ac_ext <<_ACEOF
17439 #line 17439 "configure"
17440 #include "confdefs.h"
17441 $ac_includes_default
17443 main ()
17445 if ((ssize_t *) 0)
17446 return 0;
17447 if (sizeof (ssize_t))
17448 return 0;
17450 return 0;
17452 _ACEOF
17453 rm -f conftest.$ac_objext
17454 if { (eval echo "$as_me:17454: \"$ac_compile\"") >&5
17455 (eval $ac_compile) 2>&5
17456 ac_status=$?
17457 echo "$as_me:17457: \$? = $ac_status" >&5
17458 (exit $ac_status); } &&
17459 { ac_try='test -s conftest.$ac_objext'
17460 { (eval echo "$as_me:17460: \"$ac_try\"") >&5
17461 (eval $ac_try) 2>&5
17462 ac_status=$?
17463 echo "$as_me:17463: \$? = $ac_status" >&5
17464 (exit $ac_status); }; }; then
17465 ac_cv_type_ssize_t=yes
17466 else
17467 echo "$as_me: failed program was:" >&5
17468 cat conftest.$ac_ext >&5
17469 ac_cv_type_ssize_t=no
17471 rm -f conftest.$ac_objext conftest.$ac_ext
17473 echo "$as_me:17473: result: $ac_cv_type_ssize_t" >&5
17474 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17475 if test $ac_cv_type_ssize_t = yes; then
17477 else
17479 cat >>confdefs.h <<EOF
17480 #define ssize_t int
17485 echo "$as_me:17485: checking for type sigaction_t" >&5
17486 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17487 if test "${cf_cv_type_sigaction+set}" = set; then
17488 echo $ECHO_N "(cached) $ECHO_C" >&6
17489 else
17491 cat >conftest.$ac_ext <<_ACEOF
17492 #line 17492 "configure"
17493 #include "confdefs.h"
17495 #include <signal.h>
17497 main ()
17499 sigaction_t x
17501 return 0;
17503 _ACEOF
17504 rm -f conftest.$ac_objext
17505 if { (eval echo "$as_me:17505: \"$ac_compile\"") >&5
17506 (eval $ac_compile) 2>&5
17507 ac_status=$?
17508 echo "$as_me:17508: \$? = $ac_status" >&5
17509 (exit $ac_status); } &&
17510 { ac_try='test -s conftest.$ac_objext'
17511 { (eval echo "$as_me:17511: \"$ac_try\"") >&5
17512 (eval $ac_try) 2>&5
17513 ac_status=$?
17514 echo "$as_me:17514: \$? = $ac_status" >&5
17515 (exit $ac_status); }; }; then
17516 cf_cv_type_sigaction=yes
17517 else
17518 echo "$as_me: failed program was:" >&5
17519 cat conftest.$ac_ext >&5
17520 cf_cv_type_sigaction=no
17522 rm -f conftest.$ac_objext conftest.$ac_ext
17525 echo "$as_me:17525: result: $cf_cv_type_sigaction" >&5
17526 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17527 test "$cf_cv_type_sigaction" = yes &&
17528 cat >>confdefs.h <<\EOF
17529 #define HAVE_TYPE_SIGACTION 1
17532 echo "$as_me:17532: checking declaration of size-change" >&5
17533 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17534 if test "${cf_cv_sizechange+set}" = set; then
17535 echo $ECHO_N "(cached) $ECHO_C" >&6
17536 else
17538 cf_cv_sizechange=unknown
17539 cf_save_CPPFLAGS="$CPPFLAGS"
17541 for cf_opts in "" "NEED_PTEM_H"
17544 CPPFLAGS="$cf_save_CPPFLAGS"
17545 test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17546 cat >conftest.$ac_ext <<_ACEOF
17547 #line 17547 "configure"
17548 #include "confdefs.h"
17549 #include <sys/types.h>
17550 #ifdef HAVE_TERMIOS_H
17551 #include <termios.h>
17552 #else
17553 #ifdef HAVE_TERMIO_H
17554 #include <termio.h>
17555 #endif
17556 #endif
17557 #ifdef NEED_PTEM_H
17558 /* This is a workaround for SCO: they neglected to define struct winsize in
17559 * termios.h -- it's only in termio.h and ptem.h
17561 #include <sys/stream.h>
17562 #include <sys/ptem.h>
17563 #endif
17564 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17565 #include <sys/ioctl.h>
17566 #endif
17569 main ()
17572 #ifdef TIOCGSIZE
17573 struct ttysize win; /* FIXME: what system is this? */
17574 int y = win.ts_lines;
17575 int x = win.ts_cols;
17576 #else
17577 #ifdef TIOCGWINSZ
17578 struct winsize win;
17579 int y = win.ws_row;
17580 int x = win.ws_col;
17581 #else
17582 no TIOCGSIZE or TIOCGWINSZ
17583 #endif /* TIOCGWINSZ */
17584 #endif /* TIOCGSIZE */
17587 return 0;
17589 _ACEOF
17590 rm -f conftest.$ac_objext
17591 if { (eval echo "$as_me:17591: \"$ac_compile\"") >&5
17592 (eval $ac_compile) 2>&5
17593 ac_status=$?
17594 echo "$as_me:17594: \$? = $ac_status" >&5
17595 (exit $ac_status); } &&
17596 { ac_try='test -s conftest.$ac_objext'
17597 { (eval echo "$as_me:17597: \"$ac_try\"") >&5
17598 (eval $ac_try) 2>&5
17599 ac_status=$?
17600 echo "$as_me:17600: \$? = $ac_status" >&5
17601 (exit $ac_status); }; }; then
17602 cf_cv_sizechange=yes
17603 else
17604 echo "$as_me: failed program was:" >&5
17605 cat conftest.$ac_ext >&5
17606 cf_cv_sizechange=no
17608 rm -f conftest.$ac_objext conftest.$ac_ext
17610 CPPFLAGS="$cf_save_CPPFLAGS"
17611 if test "$cf_cv_sizechange" = yes ; then
17612 echo "size-change succeeded ($cf_opts)" >&5
17613 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17614 break
17616 done
17619 echo "$as_me:17619: result: $cf_cv_sizechange" >&5
17620 echo "${ECHO_T}$cf_cv_sizechange" >&6
17621 if test "$cf_cv_sizechange" != no ; then
17623 cat >>confdefs.h <<\EOF
17624 #define HAVE_SIZECHANGE 1
17627 case $cf_cv_sizechange in
17628 (NEED*)
17629 cat >>confdefs.h <<EOF
17630 #define $cf_cv_sizechange 1
17634 esac
17637 echo "$as_me:17637: checking for memmove" >&5
17638 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17639 if test "${ac_cv_func_memmove+set}" = set; then
17640 echo $ECHO_N "(cached) $ECHO_C" >&6
17641 else
17642 cat >conftest.$ac_ext <<_ACEOF
17643 #line 17643 "configure"
17644 #include "confdefs.h"
17645 /* System header to define __stub macros and hopefully few prototypes,
17646 which can conflict with char memmove (); below. */
17647 #include <assert.h>
17648 /* Override any gcc2 internal prototype to avoid an error. */
17649 #ifdef __cplusplus
17650 extern "C"
17651 #endif
17652 /* We use char because int might match the return type of a gcc2
17653 builtin and then its argument prototype would still apply. */
17654 char memmove ();
17655 char (*f) ();
17658 main ()
17660 /* The GNU C library defines this for functions which it implements
17661 to always fail with ENOSYS. Some functions are actually named
17662 something starting with __ and the normal name is an alias. */
17663 #if defined (__stub_memmove) || defined (__stub___memmove)
17664 choke me
17665 #else
17666 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17667 #endif
17670 return 0;
17672 _ACEOF
17673 rm -f conftest.$ac_objext conftest$ac_exeext
17674 if { (eval echo "$as_me:17674: \"$ac_link\"") >&5
17675 (eval $ac_link) 2>&5
17676 ac_status=$?
17677 echo "$as_me:17677: \$? = $ac_status" >&5
17678 (exit $ac_status); } &&
17679 { ac_try='test -s conftest$ac_exeext'
17680 { (eval echo "$as_me:17680: \"$ac_try\"") >&5
17681 (eval $ac_try) 2>&5
17682 ac_status=$?
17683 echo "$as_me:17683: \$? = $ac_status" >&5
17684 (exit $ac_status); }; }; then
17685 ac_cv_func_memmove=yes
17686 else
17687 echo "$as_me: failed program was:" >&5
17688 cat conftest.$ac_ext >&5
17689 ac_cv_func_memmove=no
17691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17693 echo "$as_me:17693: result: $ac_cv_func_memmove" >&5
17694 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17695 if test $ac_cv_func_memmove = yes; then
17697 else
17699 echo "$as_me:17699: checking for bcopy" >&5
17700 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17701 if test "${ac_cv_func_bcopy+set}" = set; then
17702 echo $ECHO_N "(cached) $ECHO_C" >&6
17703 else
17704 cat >conftest.$ac_ext <<_ACEOF
17705 #line 17705 "configure"
17706 #include "confdefs.h"
17707 /* System header to define __stub macros and hopefully few prototypes,
17708 which can conflict with char bcopy (); below. */
17709 #include <assert.h>
17710 /* Override any gcc2 internal prototype to avoid an error. */
17711 #ifdef __cplusplus
17712 extern "C"
17713 #endif
17714 /* We use char because int might match the return type of a gcc2
17715 builtin and then its argument prototype would still apply. */
17716 char bcopy ();
17717 char (*f) ();
17720 main ()
17722 /* The GNU C library defines this for functions which it implements
17723 to always fail with ENOSYS. Some functions are actually named
17724 something starting with __ and the normal name is an alias. */
17725 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17726 choke me
17727 #else
17728 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17729 #endif
17732 return 0;
17734 _ACEOF
17735 rm -f conftest.$ac_objext conftest$ac_exeext
17736 if { (eval echo "$as_me:17736: \"$ac_link\"") >&5
17737 (eval $ac_link) 2>&5
17738 ac_status=$?
17739 echo "$as_me:17739: \$? = $ac_status" >&5
17740 (exit $ac_status); } &&
17741 { ac_try='test -s conftest$ac_exeext'
17742 { (eval echo "$as_me:17742: \"$ac_try\"") >&5
17743 (eval $ac_try) 2>&5
17744 ac_status=$?
17745 echo "$as_me:17745: \$? = $ac_status" >&5
17746 (exit $ac_status); }; }; then
17747 ac_cv_func_bcopy=yes
17748 else
17749 echo "$as_me: failed program was:" >&5
17750 cat conftest.$ac_ext >&5
17751 ac_cv_func_bcopy=no
17753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17755 echo "$as_me:17755: result: $ac_cv_func_bcopy" >&5
17756 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17757 if test $ac_cv_func_bcopy = yes; then
17759 echo "$as_me:17759: checking if bcopy does overlapping moves" >&5
17760 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17761 if test "${cf_cv_good_bcopy+set}" = set; then
17762 echo $ECHO_N "(cached) $ECHO_C" >&6
17763 else
17765 if test "$cross_compiling" = yes; then
17766 cf_cv_good_bcopy=unknown
17767 else
17768 cat >conftest.$ac_ext <<_ACEOF
17769 #line 17769 "configure"
17770 #include "confdefs.h"
17772 int main() {
17773 static char data[] = "abcdefghijklmnopqrstuwwxyz";
17774 char temp[40];
17775 bcopy(data, temp, sizeof(data));
17776 bcopy(temp+10, temp, 15);
17777 bcopy(temp+5, temp+15, 10);
17778 ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17781 _ACEOF
17782 rm -f conftest$ac_exeext
17783 if { (eval echo "$as_me:17783: \"$ac_link\"") >&5
17784 (eval $ac_link) 2>&5
17785 ac_status=$?
17786 echo "$as_me:17786: \$? = $ac_status" >&5
17787 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17788 { (eval echo "$as_me:17788: \"$ac_try\"") >&5
17789 (eval $ac_try) 2>&5
17790 ac_status=$?
17791 echo "$as_me:17791: \$? = $ac_status" >&5
17792 (exit $ac_status); }; }; then
17793 cf_cv_good_bcopy=yes
17794 else
17795 echo "$as_me: program exited with status $ac_status" >&5
17796 echo "$as_me: failed program was:" >&5
17797 cat conftest.$ac_ext >&5
17798 cf_cv_good_bcopy=no
17800 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17804 echo "$as_me:17804: result: $cf_cv_good_bcopy" >&5
17805 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17807 else
17808 cf_cv_good_bcopy=no
17811 if test "$cf_cv_good_bcopy" = yes ; then
17813 cat >>confdefs.h <<\EOF
17814 #define USE_OK_BCOPY 1
17817 else
17819 cat >>confdefs.h <<\EOF
17820 #define USE_MY_MEMMOVE 1
17827 echo "$as_me:17827: checking if poll really works" >&5
17828 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17829 if test "${cf_cv_working_poll+set}" = set; then
17830 echo $ECHO_N "(cached) $ECHO_C" >&6
17831 else
17833 if test "$cross_compiling" = yes; then
17834 cf_cv_working_poll=unknown
17835 else
17836 cat >conftest.$ac_ext <<_ACEOF
17837 #line 17837 "configure"
17838 #include "confdefs.h"
17840 #include <stdlib.h>
17841 #include <stdio.h>
17842 #include <unistd.h>
17843 #include <fcntl.h>
17844 #ifdef HAVE_POLL_H
17845 #include <poll.h>
17846 #else
17847 #include <sys/poll.h>
17848 #endif
17849 int main() {
17850 struct pollfd myfds;
17851 int ret;
17853 /* check for Darwin bug with respect to "devices" */
17854 myfds.fd = open("/dev/null", 1); /* O_WRONLY */
17855 if (myfds.fd < 0)
17856 myfds.fd = 0;
17857 myfds.events = POLLIN;
17858 myfds.revents = 0;
17860 ret = poll(&myfds, 1, 100);
17862 if (ret < 0 || (myfds.revents & POLLNVAL)) {
17863 ret = -1;
17864 } else {
17865 int fd = 0;
17866 if (!isatty(fd)) {
17867 fd = open("/dev/tty", 2); /* O_RDWR */
17870 if (fd >= 0) {
17871 /* also check with standard input */
17872 myfds.fd = fd;
17873 myfds.events = POLLIN;
17874 myfds.revents = 0;
17875 ret = poll(&myfds, 1, 100);
17876 } else {
17877 ret = -1;
17880 ${cf_cv_main_return:-return}(ret < 0);
17882 _ACEOF
17883 rm -f conftest$ac_exeext
17884 if { (eval echo "$as_me:17884: \"$ac_link\"") >&5
17885 (eval $ac_link) 2>&5
17886 ac_status=$?
17887 echo "$as_me:17887: \$? = $ac_status" >&5
17888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17889 { (eval echo "$as_me:17889: \"$ac_try\"") >&5
17890 (eval $ac_try) 2>&5
17891 ac_status=$?
17892 echo "$as_me:17892: \$? = $ac_status" >&5
17893 (exit $ac_status); }; }; then
17894 cf_cv_working_poll=yes
17895 else
17896 echo "$as_me: program exited with status $ac_status" >&5
17897 echo "$as_me: failed program was:" >&5
17898 cat conftest.$ac_ext >&5
17899 cf_cv_working_poll=no
17901 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17904 echo "$as_me:17904: result: $cf_cv_working_poll" >&5
17905 echo "${ECHO_T}$cf_cv_working_poll" >&6
17906 test "$cf_cv_working_poll" = "yes" &&
17907 cat >>confdefs.h <<\EOF
17908 #define HAVE_WORKING_POLL 1
17911 echo "$as_me:17911: checking for va_copy" >&5
17912 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17913 if test "${cf_cv_have_va_copy+set}" = set; then
17914 echo $ECHO_N "(cached) $ECHO_C" >&6
17915 else
17917 cat >conftest.$ac_ext <<_ACEOF
17918 #line 17918 "configure"
17919 #include "confdefs.h"
17921 #include <stdarg.h>
17924 main ()
17927 static va_list dst;
17928 static va_list src;
17929 va_copy(dst, src)
17931 return 0;
17933 _ACEOF
17934 rm -f conftest.$ac_objext conftest$ac_exeext
17935 if { (eval echo "$as_me:17935: \"$ac_link\"") >&5
17936 (eval $ac_link) 2>&5
17937 ac_status=$?
17938 echo "$as_me:17938: \$? = $ac_status" >&5
17939 (exit $ac_status); } &&
17940 { ac_try='test -s conftest$ac_exeext'
17941 { (eval echo "$as_me:17941: \"$ac_try\"") >&5
17942 (eval $ac_try) 2>&5
17943 ac_status=$?
17944 echo "$as_me:17944: \$? = $ac_status" >&5
17945 (exit $ac_status); }; }; then
17946 cf_cv_have_va_copy=yes
17947 else
17948 echo "$as_me: failed program was:" >&5
17949 cat conftest.$ac_ext >&5
17950 cf_cv_have_va_copy=no
17952 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17954 echo "$as_me:17954: result: $cf_cv_have_va_copy" >&5
17955 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17957 test "$cf_cv_have_va_copy" = yes &&
17958 cat >>confdefs.h <<\EOF
17959 #define HAVE_VA_COPY 1
17962 echo "$as_me:17962: checking for __va_copy" >&5
17963 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17964 if test "${cf_cv_have___va_copy+set}" = set; then
17965 echo $ECHO_N "(cached) $ECHO_C" >&6
17966 else
17968 cat >conftest.$ac_ext <<_ACEOF
17969 #line 17969 "configure"
17970 #include "confdefs.h"
17972 #include <stdarg.h>
17975 main ()
17978 static va_list dst;
17979 static va_list src;
17980 __va_copy(dst, src)
17982 return 0;
17984 _ACEOF
17985 rm -f conftest.$ac_objext conftest$ac_exeext
17986 if { (eval echo "$as_me:17986: \"$ac_link\"") >&5
17987 (eval $ac_link) 2>&5
17988 ac_status=$?
17989 echo "$as_me:17989: \$? = $ac_status" >&5
17990 (exit $ac_status); } &&
17991 { ac_try='test -s conftest$ac_exeext'
17992 { (eval echo "$as_me:17992: \"$ac_try\"") >&5
17993 (eval $ac_try) 2>&5
17994 ac_status=$?
17995 echo "$as_me:17995: \$? = $ac_status" >&5
17996 (exit $ac_status); }; }; then
17997 cf_cv_have___va_copy=yes
17998 else
17999 echo "$as_me: failed program was:" >&5
18000 cat conftest.$ac_ext >&5
18001 cf_cv_have___va_copy=no
18003 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18005 echo "$as_me:18005: result: $cf_cv_have___va_copy" >&5
18006 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18008 test "$cf_cv_have___va_copy" = yes &&
18009 cat >>confdefs.h <<\EOF
18010 #define HAVE___VA_COPY 1
18013 echo "$as_me:18013: checking for pid_t" >&5
18014 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18015 if test "${ac_cv_type_pid_t+set}" = set; then
18016 echo $ECHO_N "(cached) $ECHO_C" >&6
18017 else
18018 cat >conftest.$ac_ext <<_ACEOF
18019 #line 18019 "configure"
18020 #include "confdefs.h"
18021 $ac_includes_default
18023 main ()
18025 if ((pid_t *) 0)
18026 return 0;
18027 if (sizeof (pid_t))
18028 return 0;
18030 return 0;
18032 _ACEOF
18033 rm -f conftest.$ac_objext
18034 if { (eval echo "$as_me:18034: \"$ac_compile\"") >&5
18035 (eval $ac_compile) 2>&5
18036 ac_status=$?
18037 echo "$as_me:18037: \$? = $ac_status" >&5
18038 (exit $ac_status); } &&
18039 { ac_try='test -s conftest.$ac_objext'
18040 { (eval echo "$as_me:18040: \"$ac_try\"") >&5
18041 (eval $ac_try) 2>&5
18042 ac_status=$?
18043 echo "$as_me:18043: \$? = $ac_status" >&5
18044 (exit $ac_status); }; }; then
18045 ac_cv_type_pid_t=yes
18046 else
18047 echo "$as_me: failed program was:" >&5
18048 cat conftest.$ac_ext >&5
18049 ac_cv_type_pid_t=no
18051 rm -f conftest.$ac_objext conftest.$ac_ext
18053 echo "$as_me:18053: result: $ac_cv_type_pid_t" >&5
18054 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18055 if test $ac_cv_type_pid_t = yes; then
18057 else
18059 cat >>confdefs.h <<EOF
18060 #define pid_t int
18065 for ac_header in unistd.h vfork.h
18067 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18068 echo "$as_me:18068: checking for $ac_header" >&5
18069 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18070 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18071 echo $ECHO_N "(cached) $ECHO_C" >&6
18072 else
18073 cat >conftest.$ac_ext <<_ACEOF
18074 #line 18074 "configure"
18075 #include "confdefs.h"
18076 #include <$ac_header>
18077 _ACEOF
18078 if { (eval echo "$as_me:18078: \"$ac_cpp conftest.$ac_ext\"") >&5
18079 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18080 ac_status=$?
18081 egrep -v '^ *\+' conftest.er1 >conftest.err
18082 rm -f conftest.er1
18083 cat conftest.err >&5
18084 echo "$as_me:18084: \$? = $ac_status" >&5
18085 (exit $ac_status); } >/dev/null; then
18086 if test -s conftest.err; then
18087 ac_cpp_err=$ac_c_preproc_warn_flag
18088 else
18089 ac_cpp_err=
18091 else
18092 ac_cpp_err=yes
18094 if test -z "$ac_cpp_err"; then
18095 eval "$as_ac_Header=yes"
18096 else
18097 echo "$as_me: failed program was:" >&5
18098 cat conftest.$ac_ext >&5
18099 eval "$as_ac_Header=no"
18101 rm -f conftest.err conftest.$ac_ext
18103 echo "$as_me:18103: result: `eval echo '${'$as_ac_Header'}'`" >&5
18104 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18105 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18106 cat >>confdefs.h <<EOF
18107 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18111 done
18113 for ac_func in fork vfork
18115 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18116 echo "$as_me:18116: checking for $ac_func" >&5
18117 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18118 if eval "test \"\${$as_ac_var+set}\" = set"; then
18119 echo $ECHO_N "(cached) $ECHO_C" >&6
18120 else
18121 cat >conftest.$ac_ext <<_ACEOF
18122 #line 18122 "configure"
18123 #include "confdefs.h"
18124 /* System header to define __stub macros and hopefully few prototypes,
18125 which can conflict with char $ac_func (); below. */
18126 #include <assert.h>
18127 /* Override any gcc2 internal prototype to avoid an error. */
18128 #ifdef __cplusplus
18129 extern "C"
18130 #endif
18131 /* We use char because int might match the return type of a gcc2
18132 builtin and then its argument prototype would still apply. */
18133 char $ac_func ();
18134 char (*f) ();
18137 main ()
18139 /* The GNU C library defines this for functions which it implements
18140 to always fail with ENOSYS. Some functions are actually named
18141 something starting with __ and the normal name is an alias. */
18142 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18143 choke me
18144 #else
18145 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18146 #endif
18149 return 0;
18151 _ACEOF
18152 rm -f conftest.$ac_objext conftest$ac_exeext
18153 if { (eval echo "$as_me:18153: \"$ac_link\"") >&5
18154 (eval $ac_link) 2>&5
18155 ac_status=$?
18156 echo "$as_me:18156: \$? = $ac_status" >&5
18157 (exit $ac_status); } &&
18158 { ac_try='test -s conftest$ac_exeext'
18159 { (eval echo "$as_me:18159: \"$ac_try\"") >&5
18160 (eval $ac_try) 2>&5
18161 ac_status=$?
18162 echo "$as_me:18162: \$? = $ac_status" >&5
18163 (exit $ac_status); }; }; then
18164 eval "$as_ac_var=yes"
18165 else
18166 echo "$as_me: failed program was:" >&5
18167 cat conftest.$ac_ext >&5
18168 eval "$as_ac_var=no"
18170 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18172 echo "$as_me:18172: result: `eval echo '${'$as_ac_var'}'`" >&5
18173 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18174 if test `eval echo '${'$as_ac_var'}'` = yes; then
18175 cat >>confdefs.h <<EOF
18176 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18180 done
18182 ac_cv_func_fork_works=$ac_cv_func_fork
18183 if test "x$ac_cv_func_fork" = xyes; then
18184 echo "$as_me:18184: checking for working fork" >&5
18185 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18186 if test "${ac_cv_func_fork_works+set}" = set; then
18187 echo $ECHO_N "(cached) $ECHO_C" >&6
18188 else
18189 if test "$cross_compiling" = yes; then
18190 ac_cv_func_fork_works=cross
18191 else
18192 cat >conftest.$ac_ext <<_ACEOF
18193 /* By Rüdiger Kuhlmann. */
18194 #include <sys/types.h>
18195 #if HAVE_UNISTD_H
18196 # include <unistd.h>
18197 #endif
18198 /* Some systems only have a dummy stub for fork() */
18199 int main ()
18201 if (fork() < 0)
18202 $ac_main_return (1);
18203 $ac_main_return (0);
18205 _ACEOF
18206 rm -f conftest$ac_exeext
18207 if { (eval echo "$as_me:18207: \"$ac_link\"") >&5
18208 (eval $ac_link) 2>&5
18209 ac_status=$?
18210 echo "$as_me:18210: \$? = $ac_status" >&5
18211 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18212 { (eval echo "$as_me:18212: \"$ac_try\"") >&5
18213 (eval $ac_try) 2>&5
18214 ac_status=$?
18215 echo "$as_me:18215: \$? = $ac_status" >&5
18216 (exit $ac_status); }; }; then
18217 ac_cv_func_fork_works=yes
18218 else
18219 echo "$as_me: program exited with status $ac_status" >&5
18220 echo "$as_me: failed program was:" >&5
18221 cat conftest.$ac_ext >&5
18222 ac_cv_func_fork_works=no
18224 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18227 echo "$as_me:18227: result: $ac_cv_func_fork_works" >&5
18228 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18231 if test "x$ac_cv_func_fork_works" = xcross; then
18232 case $host in
18233 *-*-amigaos* | *-*-msdosdjgpp*)
18234 # Override, as these systems have only a dummy fork() stub
18235 ac_cv_func_fork_works=no
18238 ac_cv_func_fork_works=yes
18240 esac
18241 { echo "$as_me:18241: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18242 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18244 ac_cv_func_vfork_works=$ac_cv_func_vfork
18245 if test "x$ac_cv_func_vfork" = xyes; then
18246 echo "$as_me:18246: checking for working vfork" >&5
18247 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18248 if test "${ac_cv_func_vfork_works+set}" = set; then
18249 echo $ECHO_N "(cached) $ECHO_C" >&6
18250 else
18251 if test "$cross_compiling" = yes; then
18252 ac_cv_func_vfork_works=cross
18253 else
18254 cat >conftest.$ac_ext <<_ACEOF
18255 #line 18255 "configure"
18256 #include "confdefs.h"
18257 /* Thanks to Paul Eggert for this test. */
18258 #include <stdio.h>
18259 #include <sys/types.h>
18260 #include <sys/stat.h>
18261 #if HAVE_UNISTD_H
18262 # include <unistd.h>
18263 #endif
18264 #if HAVE_VFORK_H
18265 # include <vfork.h>
18266 #endif
18267 /* On some sparc systems, changes by the child to local and incoming
18268 argument registers are propagated back to the parent. The compiler
18269 is told about this with #include <vfork.h>, but some compilers
18270 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
18271 static variable whose address is put into a register that is
18272 clobbered by the vfork. */
18273 static
18274 #ifdef __cplusplus
18275 sparc_address_test (int arg)
18276 # else
18277 sparc_address_test (arg) int arg;
18278 #endif
18280 static pid_t child;
18281 if (!child) {
18282 child = vfork ();
18283 if (child < 0) {
18284 perror ("vfork");
18285 _exit(2);
18287 if (!child) {
18288 arg = getpid();
18289 write(-1, "", 0);
18290 _exit (arg);
18296 main ()
18298 pid_t parent = getpid ();
18299 pid_t child;
18301 sparc_address_test ();
18303 child = vfork ();
18305 if (child == 0) {
18306 /* Here is another test for sparc vfork register problems. This
18307 test uses lots of local variables, at least as many local
18308 variables as main has allocated so far including compiler
18309 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
18310 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
18311 reuse the register of parent for one of the local variables,
18312 since it will think that parent can't possibly be used any more
18313 in this routine. Assigning to the local variable will thus
18314 munge parent in the parent process. */
18315 pid_t
18316 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18317 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18318 /* Convince the compiler that p..p7 are live; otherwise, it might
18319 use the same hardware register for all 8 local variables. */
18320 if (p != p1 || p != p2 || p != p3 || p != p4
18321 || p != p5 || p != p6 || p != p7)
18322 _exit(1);
18324 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18325 from child file descriptors. If the child closes a descriptor
18326 before it execs or exits, this munges the parent's descriptor
18327 as well. Test for this by closing stdout in the child. */
18328 _exit(close(fileno(stdout)) != 0);
18329 } else {
18330 int status;
18331 struct stat st;
18333 while (wait(&status) != child)
18335 $ac_main_return(
18336 /* Was there some problem with vforking? */
18337 child < 0
18339 /* Did the child fail? (This shouldn't happen.) */
18340 || status
18342 /* Did the vfork/compiler bug occur? */
18343 || parent != getpid()
18345 /* Did the file descriptor bug occur? */
18346 || fstat(fileno(stdout), &st) != 0
18350 _ACEOF
18351 rm -f conftest$ac_exeext
18352 if { (eval echo "$as_me:18352: \"$ac_link\"") >&5
18353 (eval $ac_link) 2>&5
18354 ac_status=$?
18355 echo "$as_me:18355: \$? = $ac_status" >&5
18356 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18357 { (eval echo "$as_me:18357: \"$ac_try\"") >&5
18358 (eval $ac_try) 2>&5
18359 ac_status=$?
18360 echo "$as_me:18360: \$? = $ac_status" >&5
18361 (exit $ac_status); }; }; then
18362 ac_cv_func_vfork_works=yes
18363 else
18364 echo "$as_me: program exited with status $ac_status" >&5
18365 echo "$as_me: failed program was:" >&5
18366 cat conftest.$ac_ext >&5
18367 ac_cv_func_vfork_works=no
18369 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18372 echo "$as_me:18372: result: $ac_cv_func_vfork_works" >&5
18373 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18376 if test "x$ac_cv_func_fork_works" = xcross; then
18377 ac_cv_func_vfork_works=ac_cv_func_vfork
18378 { echo "$as_me:18378: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18379 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18382 if test "x$ac_cv_func_vfork_works" = xyes; then
18384 cat >>confdefs.h <<\EOF
18385 #define HAVE_WORKING_VFORK 1
18388 else
18390 cat >>confdefs.h <<\EOF
18391 #define vfork fork
18395 if test "x$ac_cv_func_fork_works" = xyes; then
18397 cat >>confdefs.h <<\EOF
18398 #define HAVE_WORKING_FORK 1
18403 # special check for test/ditto.c
18405 echo "$as_me:18405: checking for openpty in -lutil" >&5
18406 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18407 if test "${ac_cv_lib_util_openpty+set}" = set; then
18408 echo $ECHO_N "(cached) $ECHO_C" >&6
18409 else
18410 ac_check_lib_save_LIBS=$LIBS
18411 LIBS="-lutil $LIBS"
18412 cat >conftest.$ac_ext <<_ACEOF
18413 #line 18413 "configure"
18414 #include "confdefs.h"
18416 /* Override any gcc2 internal prototype to avoid an error. */
18417 #ifdef __cplusplus
18418 extern "C"
18419 #endif
18420 /* We use char because int might match the return type of a gcc2
18421 builtin and then its argument prototype would still apply. */
18422 char openpty ();
18424 main ()
18426 openpty ();
18428 return 0;
18430 _ACEOF
18431 rm -f conftest.$ac_objext conftest$ac_exeext
18432 if { (eval echo "$as_me:18432: \"$ac_link\"") >&5
18433 (eval $ac_link) 2>&5
18434 ac_status=$?
18435 echo "$as_me:18435: \$? = $ac_status" >&5
18436 (exit $ac_status); } &&
18437 { ac_try='test -s conftest$ac_exeext'
18438 { (eval echo "$as_me:18438: \"$ac_try\"") >&5
18439 (eval $ac_try) 2>&5
18440 ac_status=$?
18441 echo "$as_me:18441: \$? = $ac_status" >&5
18442 (exit $ac_status); }; }; then
18443 ac_cv_lib_util_openpty=yes
18444 else
18445 echo "$as_me: failed program was:" >&5
18446 cat conftest.$ac_ext >&5
18447 ac_cv_lib_util_openpty=no
18449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18450 LIBS=$ac_check_lib_save_LIBS
18452 echo "$as_me:18452: result: $ac_cv_lib_util_openpty" >&5
18453 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18454 if test $ac_cv_lib_util_openpty = yes; then
18455 cf_cv_lib_util=yes
18456 else
18457 cf_cv_lib_util=no
18460 echo "$as_me:18460: checking for openpty header" >&5
18461 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18462 if test "${cf_cv_func_openpty+set}" = set; then
18463 echo $ECHO_N "(cached) $ECHO_C" >&6
18464 else
18466 cf_save_LIBS="$LIBS"
18467 test $cf_cv_lib_util = yes &&
18468 cf_add_libs="-lutil"
18469 # Filter out duplicates - this happens with badly-designed ".pc" files...
18470 for cf_add_1lib in $LIBS
18472 for cf_add_2lib in $cf_add_libs
18474 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18475 then
18476 cf_add_1lib=
18477 break
18479 done
18480 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18481 done
18482 LIBS="$cf_add_libs"
18484 for cf_header in pty.h libutil.h util.h
18486 cat >conftest.$ac_ext <<_ACEOF
18487 #line 18487 "configure"
18488 #include "confdefs.h"
18490 #include <$cf_header>
18493 main ()
18496 int x = openpty((int *)0, (int *)0, (char *)0,
18497 (struct termios *)0, (struct winsize *)0);
18500 return 0;
18502 _ACEOF
18503 rm -f conftest.$ac_objext conftest$ac_exeext
18504 if { (eval echo "$as_me:18504: \"$ac_link\"") >&5
18505 (eval $ac_link) 2>&5
18506 ac_status=$?
18507 echo "$as_me:18507: \$? = $ac_status" >&5
18508 (exit $ac_status); } &&
18509 { ac_try='test -s conftest$ac_exeext'
18510 { (eval echo "$as_me:18510: \"$ac_try\"") >&5
18511 (eval $ac_try) 2>&5
18512 ac_status=$?
18513 echo "$as_me:18513: \$? = $ac_status" >&5
18514 (exit $ac_status); }; }; then
18516 cf_cv_func_openpty=$cf_header
18517 break
18519 else
18520 echo "$as_me: failed program was:" >&5
18521 cat conftest.$ac_ext >&5
18523 cf_cv_func_openpty=no
18526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18527 done
18528 LIBS="$cf_save_LIBS"
18531 echo "$as_me:18531: result: $cf_cv_func_openpty" >&5
18532 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18534 if test "$cf_cv_func_openpty" != no ; then
18536 cat >>confdefs.h <<EOF
18537 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18540 cat >>confdefs.h <<\EOF
18541 #define USE_XTERM_PTY 1
18544 if test "x$cf_cv_lib_util" = xyes ; then
18546 cf_add_libs="-lutil"
18547 # Filter out duplicates - this happens with badly-designed ".pc" files...
18548 for cf_add_1lib in $TEST_LIBS
18550 for cf_add_2lib in $cf_add_libs
18552 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18553 then
18554 cf_add_1lib=
18555 break
18557 done
18558 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18559 done
18560 TEST_LIBS="$cf_add_libs"
18565 if test "$with_hashed_db" != no ; then
18567 cat >>confdefs.h <<\EOF
18568 #define USE_HASHED_DB 1
18571 case $with_hashed_db in
18572 (yes|*able*)
18575 if test -d "$with_hashed_db" ; then
18577 if test -n "$with_hashed_db/include" ; then
18578 for cf_add_incdir in $with_hashed_db/include
18580 while test $cf_add_incdir != /usr/include
18582 if test -d $cf_add_incdir
18583 then
18584 cf_have_incdir=no
18585 if test -n "$CFLAGS$CPPFLAGS" ; then
18586 # a loop is needed to ensure we can add subdirs of existing dirs
18587 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18588 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18589 cf_have_incdir=yes; break
18591 done
18594 if test "$cf_have_incdir" = no ; then
18595 if test "$cf_add_incdir" = /usr/local/include ; then
18596 if test "$GCC" = yes
18597 then
18598 cf_save_CPPFLAGS=$CPPFLAGS
18599 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18600 cat >conftest.$ac_ext <<_ACEOF
18601 #line 18601 "configure"
18602 #include "confdefs.h"
18603 #include <stdio.h>
18605 main ()
18607 printf("Hello")
18609 return 0;
18611 _ACEOF
18612 rm -f conftest.$ac_objext
18613 if { (eval echo "$as_me:18613: \"$ac_compile\"") >&5
18614 (eval $ac_compile) 2>&5
18615 ac_status=$?
18616 echo "$as_me:18616: \$? = $ac_status" >&5
18617 (exit $ac_status); } &&
18618 { ac_try='test -s conftest.$ac_objext'
18619 { (eval echo "$as_me:18619: \"$ac_try\"") >&5
18620 (eval $ac_try) 2>&5
18621 ac_status=$?
18622 echo "$as_me:18622: \$? = $ac_status" >&5
18623 (exit $ac_status); }; }; then
18625 else
18626 echo "$as_me: failed program was:" >&5
18627 cat conftest.$ac_ext >&5
18628 cf_have_incdir=yes
18630 rm -f conftest.$ac_objext conftest.$ac_ext
18631 CPPFLAGS=$cf_save_CPPFLAGS
18636 if test "$cf_have_incdir" = no ; then
18637 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
18639 echo "${as_me:-configure}:18639: testing adding $cf_add_incdir to include-path ..." 1>&5
18641 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18643 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18644 test "$cf_top_incdir" = "$cf_add_incdir" && break
18645 cf_add_incdir="$cf_top_incdir"
18646 else
18647 break
18649 else
18650 break
18652 done
18653 done
18656 if test -n "$with_hashed_db/lib" ; then
18657 for cf_add_libdir in $with_hashed_db/lib
18659 if test $cf_add_libdir = /usr/lib ; then
18661 elif test -d $cf_add_libdir
18662 then
18663 cf_have_libdir=no
18664 if test -n "$LDFLAGS$LIBS" ; then
18665 # a loop is needed to ensure we can add subdirs of existing dirs
18666 for cf_test_libdir in $LDFLAGS $LIBS ; do
18667 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18668 cf_have_libdir=yes; break
18670 done
18672 if test "$cf_have_libdir" = no ; then
18673 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
18675 echo "${as_me:-configure}:18675: testing adding $cf_add_libdir to library-path ..." 1>&5
18677 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18680 done
18683 else
18684 case "$with_hashed_db" in
18685 (./*|../*|/*)
18686 { echo "$as_me:18686: WARNING: no such directory $with_hashed_db" >&5
18687 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18691 cf_search=
18693 test "x$prefix" != "xNONE" && \
18694 test -d "$prefix" && \
18696 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
18697 test -d $prefix/include && cf_search="$cf_search $prefix/include"
18698 test -d $prefix/include/$with_hashed_db && cf_search="$cf_search $prefix/include/$with_hashed_db"
18699 test -d $prefix/include/$with_hashed_db/include && cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18700 test -d $prefix/$with_hashed_db/include && cf_search="$cf_search $prefix/$with_hashed_db/include"
18701 test -d $prefix/$with_hashed_db/include/$with_hashed_db && cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18704 for cf_subdir_prefix in \
18705 /usr \
18706 /usr/local \
18707 /usr/pkg \
18708 /opt \
18709 /opt/local \
18710 $HOME
18713 test "x$cf_subdir_prefix" != "x$prefix" && \
18714 test -d "$cf_subdir_prefix" && \
18715 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18716 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
18717 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
18718 test -d $cf_subdir_prefix/include/$with_hashed_db && cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18719 test -d $cf_subdir_prefix/include/$with_hashed_db/include && cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18720 test -d $cf_subdir_prefix/$with_hashed_db/include && cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18721 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"
18724 done
18726 for cf_item in $cf_search
18728 case $cf_item in
18729 (*/$with_hashed_db)
18731 if test -n "$cf_item" ; then
18732 for cf_add_incdir in $cf_item
18734 while test $cf_add_incdir != /usr/include
18736 if test -d $cf_add_incdir
18737 then
18738 cf_have_incdir=no
18739 if test -n "$CFLAGS$CPPFLAGS" ; then
18740 # a loop is needed to ensure we can add subdirs of existing dirs
18741 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18742 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18743 cf_have_incdir=yes; break
18745 done
18748 if test "$cf_have_incdir" = no ; then
18749 if test "$cf_add_incdir" = /usr/local/include ; then
18750 if test "$GCC" = yes
18751 then
18752 cf_save_CPPFLAGS=$CPPFLAGS
18753 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18754 cat >conftest.$ac_ext <<_ACEOF
18755 #line 18755 "configure"
18756 #include "confdefs.h"
18757 #include <stdio.h>
18759 main ()
18761 printf("Hello")
18763 return 0;
18765 _ACEOF
18766 rm -f conftest.$ac_objext
18767 if { (eval echo "$as_me:18767: \"$ac_compile\"") >&5
18768 (eval $ac_compile) 2>&5
18769 ac_status=$?
18770 echo "$as_me:18770: \$? = $ac_status" >&5
18771 (exit $ac_status); } &&
18772 { ac_try='test -s conftest.$ac_objext'
18773 { (eval echo "$as_me:18773: \"$ac_try\"") >&5
18774 (eval $ac_try) 2>&5
18775 ac_status=$?
18776 echo "$as_me:18776: \$? = $ac_status" >&5
18777 (exit $ac_status); }; }; then
18779 else
18780 echo "$as_me: failed program was:" >&5
18781 cat conftest.$ac_ext >&5
18782 cf_have_incdir=yes
18784 rm -f conftest.$ac_objext conftest.$ac_ext
18785 CPPFLAGS=$cf_save_CPPFLAGS
18790 if test "$cf_have_incdir" = no ; then
18791 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
18793 echo "${as_me:-configure}:18793: testing adding $cf_add_incdir to include-path ..." 1>&5
18795 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18797 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18798 test "$cf_top_incdir" = "$cf_add_incdir" && break
18799 cf_add_incdir="$cf_top_incdir"
18800 else
18801 break
18803 else
18804 break
18806 done
18807 done
18811 esac
18812 done
18814 cf_search=
18816 test "x$prefix" != "xNONE" && \
18817 test -d "$prefix" && \
18819 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
18820 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
18821 test -d $prefix/lib/$with_hashed_db && cf_search="$cf_search $prefix/lib/$with_hashed_db"
18822 test -d $prefix/lib/$with_hashed_db/lib && cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18823 test -d $prefix/$with_hashed_db/lib && cf_search="$cf_search $prefix/$with_hashed_db/lib"
18824 test -d $prefix/$with_hashed_db/lib/$with_hashed_db && cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18827 for cf_subdir_prefix in \
18828 /usr \
18829 /usr/local \
18830 /usr/pkg \
18831 /opt \
18832 /opt/local \
18833 $HOME
18836 test "x$cf_subdir_prefix" != "x$prefix" && \
18837 test -d "$cf_subdir_prefix" && \
18838 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18839 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
18840 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
18841 test -d $cf_subdir_prefix/lib/$with_hashed_db && cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18842 test -d $cf_subdir_prefix/lib/$with_hashed_db/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18843 test -d $cf_subdir_prefix/$with_hashed_db/lib && cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18844 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"
18847 done
18849 for cf_item in $cf_search
18851 case $cf_item in
18852 (*/$with_hashed_db)
18854 if test -n "$cf_item" ; then
18855 for cf_add_libdir in $cf_item
18857 if test $cf_add_libdir = /usr/lib ; then
18859 elif test -d $cf_add_libdir
18860 then
18861 cf_have_libdir=no
18862 if test -n "$LDFLAGS$LIBS" ; then
18863 # a loop is needed to ensure we can add subdirs of existing dirs
18864 for cf_test_libdir in $LDFLAGS $LIBS ; do
18865 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18866 cf_have_libdir=yes; break
18868 done
18870 if test "$cf_have_libdir" = no ; then
18871 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
18873 echo "${as_me:-configure}:18873: testing adding $cf_add_libdir to library-path ..." 1>&5
18875 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18878 done
18882 esac
18883 done
18886 esac
18888 esac
18890 echo "$as_me:18890: checking for db.h" >&5
18891 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18892 if test "${ac_cv_header_db_h+set}" = set; then
18893 echo $ECHO_N "(cached) $ECHO_C" >&6
18894 else
18895 cat >conftest.$ac_ext <<_ACEOF
18896 #line 18896 "configure"
18897 #include "confdefs.h"
18898 #include <db.h>
18899 _ACEOF
18900 if { (eval echo "$as_me:18900: \"$ac_cpp conftest.$ac_ext\"") >&5
18901 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18902 ac_status=$?
18903 egrep -v '^ *\+' conftest.er1 >conftest.err
18904 rm -f conftest.er1
18905 cat conftest.err >&5
18906 echo "$as_me:18906: \$? = $ac_status" >&5
18907 (exit $ac_status); } >/dev/null; then
18908 if test -s conftest.err; then
18909 ac_cpp_err=$ac_c_preproc_warn_flag
18910 else
18911 ac_cpp_err=
18913 else
18914 ac_cpp_err=yes
18916 if test -z "$ac_cpp_err"; then
18917 ac_cv_header_db_h=yes
18918 else
18919 echo "$as_me: failed program was:" >&5
18920 cat conftest.$ac_ext >&5
18921 ac_cv_header_db_h=no
18923 rm -f conftest.err conftest.$ac_ext
18925 echo "$as_me:18925: result: $ac_cv_header_db_h" >&5
18926 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18927 if test $ac_cv_header_db_h = yes; then
18929 echo "$as_me:18929: checking for version of db" >&5
18930 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18931 if test "${cf_cv_hashed_db_version+set}" = set; then
18932 echo $ECHO_N "(cached) $ECHO_C" >&6
18933 else
18935 cf_cv_hashed_db_version=unknown
18937 for cf_db_version in 1 2 3 4 5 6
18940 echo "${as_me:-configure}:18940: testing checking for db version $cf_db_version ..." 1>&5
18942 cat >conftest.$ac_ext <<_ACEOF
18943 #line 18943 "configure"
18944 #include "confdefs.h"
18946 $ac_includes_default
18947 #include <db.h>
18949 #ifdef DB_VERSION_MAJOR
18950 /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18951 #if $cf_db_version == DB_VERSION_MAJOR
18952 /* ok */
18953 #else
18954 make an error
18955 #endif
18956 #else
18957 #if $cf_db_version == 1
18958 /* ok: assuming this is DB 1.8.5 */
18959 #else
18960 make an error
18961 #endif
18962 #endif
18965 main ()
18967 DBT *foo = 0
18969 return 0;
18971 _ACEOF
18972 rm -f conftest.$ac_objext
18973 if { (eval echo "$as_me:18973: \"$ac_compile\"") >&5
18974 (eval $ac_compile) 2>&5
18975 ac_status=$?
18976 echo "$as_me:18976: \$? = $ac_status" >&5
18977 (exit $ac_status); } &&
18978 { ac_try='test -s conftest.$ac_objext'
18979 { (eval echo "$as_me:18979: \"$ac_try\"") >&5
18980 (eval $ac_try) 2>&5
18981 ac_status=$?
18982 echo "$as_me:18982: \$? = $ac_status" >&5
18983 (exit $ac_status); }; }; then
18985 cf_cv_hashed_db_version=$cf_db_version
18986 break
18988 else
18989 echo "$as_me: failed program was:" >&5
18990 cat conftest.$ac_ext >&5
18992 rm -f conftest.$ac_objext conftest.$ac_ext
18993 done
18996 echo "$as_me:18996: result: $cf_cv_hashed_db_version" >&5
18997 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18999 if test "$cf_cv_hashed_db_version" = unknown ; then
19000 { { echo "$as_me:19000: error: Cannot determine version of db" >&5
19001 echo "$as_me: error: Cannot determine version of db" >&2;}
19002 { (exit 1); exit 1; }; }
19003 else
19005 echo "$as_me:19005: checking for db libraries" >&5
19006 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19007 if test "${cf_cv_hashed_db_libs+set}" = set; then
19008 echo $ECHO_N "(cached) $ECHO_C" >&6
19009 else
19011 cf_cv_hashed_db_libs=unknown
19012 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19014 cf_save_libs="$LIBS"
19015 if test -n "$cf_db_libs"; then
19017 cf_add_libs="-l$cf_db_libs"
19018 # Filter out duplicates - this happens with badly-designed ".pc" files...
19019 for cf_add_1lib in $LIBS
19021 for cf_add_2lib in $cf_add_libs
19023 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19024 then
19025 cf_add_1lib=
19026 break
19028 done
19029 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19030 done
19031 LIBS="$cf_add_libs"
19035 echo "${as_me:-configure}:19035: testing checking for library "$cf_db_libs" ..." 1>&5
19037 cat >conftest.$ac_ext <<_ACEOF
19038 #line 19038 "configure"
19039 #include "confdefs.h"
19041 $ac_includes_default
19042 #include <db.h>
19045 main ()
19048 char *path = "/tmp/foo";
19049 #ifdef DB_VERSION_MAJOR
19050 #if DB_VERSION_MAJOR >= 4
19051 DB *result = 0;
19052 db_create(&result, NULL, 0);
19053 result->open(result,
19054 NULL,
19055 path,
19056 path,
19057 DB_HASH,
19058 DB_CREATE,
19059 0644);
19060 #elif DB_VERSION_MAJOR >= 3
19061 DB *result = 0;
19062 db_create(&result, NULL, 0);
19063 result->open(result,
19064 path,
19065 path,
19066 DB_HASH,
19067 DB_CREATE,
19068 0644);
19069 #elif DB_VERSION_MAJOR >= 2
19070 DB *result = 0;
19071 db_open(path,
19072 DB_HASH,
19073 DB_CREATE,
19074 0644,
19075 (DB_ENV *) 0,
19076 (DB_INFO *) 0,
19077 &result);
19078 #endif /* DB_VERSION_MAJOR */
19079 #else
19080 DB *result = dbopen(path,
19082 0644,
19083 DB_HASH,
19085 #endif
19086 ${cf_cv_main_return:-return}(result != 0)
19089 return 0;
19091 _ACEOF
19092 rm -f conftest.$ac_objext conftest$ac_exeext
19093 if { (eval echo "$as_me:19093: \"$ac_link\"") >&5
19094 (eval $ac_link) 2>&5
19095 ac_status=$?
19096 echo "$as_me:19096: \$? = $ac_status" >&5
19097 (exit $ac_status); } &&
19098 { ac_try='test -s conftest$ac_exeext'
19099 { (eval echo "$as_me:19099: \"$ac_try\"") >&5
19100 (eval $ac_try) 2>&5
19101 ac_status=$?
19102 echo "$as_me:19102: \$? = $ac_status" >&5
19103 (exit $ac_status); }; }; then
19105 if test -n "$cf_db_libs" ; then
19106 cf_cv_hashed_db_libs=$cf_db_libs
19107 else
19108 cf_cv_hashed_db_libs=default
19110 LIBS="$cf_save_libs"
19111 break
19113 else
19114 echo "$as_me: failed program was:" >&5
19115 cat conftest.$ac_ext >&5
19117 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19118 LIBS="$cf_save_libs"
19119 done
19122 echo "$as_me:19122: result: $cf_cv_hashed_db_libs" >&5
19123 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19125 if test "$cf_cv_hashed_db_libs" = unknown ; then
19126 { { echo "$as_me:19126: error: Cannot determine library for db" >&5
19127 echo "$as_me: error: Cannot determine library for db" >&2;}
19128 { (exit 1); exit 1; }; }
19129 elif test "$cf_cv_hashed_db_libs" != default ; then
19131 cf_add_libs="-l$cf_cv_hashed_db_libs"
19132 # Filter out duplicates - this happens with badly-designed ".pc" files...
19133 for cf_add_1lib in $LIBS
19135 for cf_add_2lib in $cf_add_libs
19137 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19138 then
19139 cf_add_1lib=
19140 break
19142 done
19143 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19144 done
19145 LIBS="$cf_add_libs"
19150 else
19152 { { echo "$as_me:19152: error: Cannot find db.h" >&5
19153 echo "$as_me: error: Cannot find db.h" >&2;}
19154 { (exit 1); exit 1; }; }
19160 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19161 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19162 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19165 # Just in case, check if the C compiler has a bool type.
19167 echo "$as_me:19167: checking if we should include stdbool.h" >&5
19168 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19170 if test "${cf_cv_header_stdbool_h+set}" = set; then
19171 echo $ECHO_N "(cached) $ECHO_C" >&6
19172 else
19174 cat >conftest.$ac_ext <<_ACEOF
19175 #line 19175 "configure"
19176 #include "confdefs.h"
19179 main ()
19181 bool foo = false
19183 return 0;
19185 _ACEOF
19186 rm -f conftest.$ac_objext
19187 if { (eval echo "$as_me:19187: \"$ac_compile\"") >&5
19188 (eval $ac_compile) 2>&5
19189 ac_status=$?
19190 echo "$as_me:19190: \$? = $ac_status" >&5
19191 (exit $ac_status); } &&
19192 { ac_try='test -s conftest.$ac_objext'
19193 { (eval echo "$as_me:19193: \"$ac_try\"") >&5
19194 (eval $ac_try) 2>&5
19195 ac_status=$?
19196 echo "$as_me:19196: \$? = $ac_status" >&5
19197 (exit $ac_status); }; }; then
19198 cf_cv_header_stdbool_h=0
19199 else
19200 echo "$as_me: failed program was:" >&5
19201 cat conftest.$ac_ext >&5
19202 cat >conftest.$ac_ext <<_ACEOF
19203 #line 19203 "configure"
19204 #include "confdefs.h"
19206 #ifndef __BEOS__
19207 #include <stdbool.h>
19208 #endif
19211 main ()
19213 bool foo = false
19215 return 0;
19217 _ACEOF
19218 rm -f conftest.$ac_objext
19219 if { (eval echo "$as_me:19219: \"$ac_compile\"") >&5
19220 (eval $ac_compile) 2>&5
19221 ac_status=$?
19222 echo "$as_me:19222: \$? = $ac_status" >&5
19223 (exit $ac_status); } &&
19224 { ac_try='test -s conftest.$ac_objext'
19225 { (eval echo "$as_me:19225: \"$ac_try\"") >&5
19226 (eval $ac_try) 2>&5
19227 ac_status=$?
19228 echo "$as_me:19228: \$? = $ac_status" >&5
19229 (exit $ac_status); }; }; then
19230 cf_cv_header_stdbool_h=1
19231 else
19232 echo "$as_me: failed program was:" >&5
19233 cat conftest.$ac_ext >&5
19234 cf_cv_header_stdbool_h=0
19236 rm -f conftest.$ac_objext conftest.$ac_ext
19238 rm -f conftest.$ac_objext conftest.$ac_ext
19241 if test "$cf_cv_header_stdbool_h" = 1
19242 then echo "$as_me:19242: result: yes" >&5
19243 echo "${ECHO_T}yes" >&6
19244 else echo "$as_me:19244: result: no" >&5
19245 echo "${ECHO_T}no" >&6
19248 echo "$as_me:19248: checking for builtin bool type" >&5
19249 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19251 if test "${cf_cv_cc_bool_type+set}" = set; then
19252 echo $ECHO_N "(cached) $ECHO_C" >&6
19253 else
19255 cat >conftest.$ac_ext <<_ACEOF
19256 #line 19256 "configure"
19257 #include "confdefs.h"
19259 #include <stdio.h>
19260 #include <sys/types.h>
19263 main ()
19265 bool x = false
19267 return 0;
19269 _ACEOF
19270 rm -f conftest.$ac_objext
19271 if { (eval echo "$as_me:19271: \"$ac_compile\"") >&5
19272 (eval $ac_compile) 2>&5
19273 ac_status=$?
19274 echo "$as_me:19274: \$? = $ac_status" >&5
19275 (exit $ac_status); } &&
19276 { ac_try='test -s conftest.$ac_objext'
19277 { (eval echo "$as_me:19277: \"$ac_try\"") >&5
19278 (eval $ac_try) 2>&5
19279 ac_status=$?
19280 echo "$as_me:19280: \$? = $ac_status" >&5
19281 (exit $ac_status); }; }; then
19282 cf_cv_cc_bool_type=1
19283 else
19284 echo "$as_me: failed program was:" >&5
19285 cat conftest.$ac_ext >&5
19286 cf_cv_cc_bool_type=0
19288 rm -f conftest.$ac_objext conftest.$ac_ext
19292 if test "$cf_cv_cc_bool_type" = 1
19293 then echo "$as_me:19293: result: yes" >&5
19294 echo "${ECHO_T}yes" >&6
19295 else echo "$as_me:19295: result: no" >&5
19296 echo "${ECHO_T}no" >&6
19299 # Check for C++ compiler characteristics (and ensure that it's there!)
19300 if test -n "$CXX" ; then
19301 ac_ext=cc
19302 ac_cpp='$CXXCPP $CPPFLAGS'
19303 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19304 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19305 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19306 ac_main_return=return
19308 if test -n "$GXX" ; then
19309 case $cf_cv_system_name in
19310 (os2*)
19311 cf_stdcpp_libname=stdcpp
19314 cf_stdcpp_libname=stdc++
19316 esac
19317 echo "$as_me:19317: checking for library $cf_stdcpp_libname" >&5
19318 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19319 if test "${cf_cv_libstdcpp+set}" = set; then
19320 echo $ECHO_N "(cached) $ECHO_C" >&6
19321 else
19323 cf_save="$LIBS"
19325 cf_add_libs="-l$cf_stdcpp_libname"
19326 # Filter out duplicates - this happens with badly-designed ".pc" files...
19327 for cf_add_1lib in $LIBS
19329 for cf_add_2lib in $cf_add_libs
19331 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19332 then
19333 cf_add_1lib=
19334 break
19336 done
19337 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19338 done
19339 LIBS="$cf_add_libs"
19341 cat >conftest.$ac_ext <<_ACEOF
19342 #line 19342 "configure"
19343 #include "confdefs.h"
19345 #include <strstream.h>
19347 main ()
19350 char buf[80];
19351 strstreambuf foo(buf, sizeof(buf))
19354 return 0;
19356 _ACEOF
19357 rm -f conftest.$ac_objext conftest$ac_exeext
19358 if { (eval echo "$as_me:19358: \"$ac_link\"") >&5
19359 (eval $ac_link) 2>&5
19360 ac_status=$?
19361 echo "$as_me:19361: \$? = $ac_status" >&5
19362 (exit $ac_status); } &&
19363 { ac_try='test -s conftest$ac_exeext'
19364 { (eval echo "$as_me:19364: \"$ac_try\"") >&5
19365 (eval $ac_try) 2>&5
19366 ac_status=$?
19367 echo "$as_me:19367: \$? = $ac_status" >&5
19368 (exit $ac_status); }; }; then
19369 cf_cv_libstdcpp=yes
19370 else
19371 echo "$as_me: failed program was:" >&5
19372 cat conftest.$ac_ext >&5
19373 cf_cv_libstdcpp=no
19375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19376 LIBS="$cf_save"
19379 echo "$as_me:19379: result: $cf_cv_libstdcpp" >&5
19380 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19381 test "$cf_cv_libstdcpp" = yes &&
19382 cf_add_libs="-l$cf_stdcpp_libname"
19383 # Filter out duplicates - this happens with badly-designed ".pc" files...
19384 for cf_add_1lib in $CXXLIBS
19386 for cf_add_2lib in $cf_add_libs
19388 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19389 then
19390 cf_add_1lib=
19391 break
19393 done
19394 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19395 done
19396 CXXLIBS="$cf_add_libs"
19400 echo "$as_me:19400: checking whether $CXX understands -c and -o together" >&5
19401 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19402 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19403 echo $ECHO_N "(cached) $ECHO_C" >&6
19404 else
19406 cat > conftest.$ac_ext <<CF_EOF
19407 #include <stdio.h>
19408 int main()
19410 ${cf_cv_main_return:-return}(0);
19412 CF_EOF
19413 # We do the test twice because some compilers refuse to overwrite an
19414 # existing .o file with -o, though they will create one.
19415 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19416 if { (eval echo "$as_me:19416: \"$ac_try\"") >&5
19417 (eval $ac_try) 2>&5
19418 ac_status=$?
19419 echo "$as_me:19419: \$? = $ac_status" >&5
19420 (exit $ac_status); } &&
19421 test -f conftest2.$ac_objext && { (eval echo "$as_me:19421: \"$ac_try\"") >&5
19422 (eval $ac_try) 2>&5
19423 ac_status=$?
19424 echo "$as_me:19424: \$? = $ac_status" >&5
19425 (exit $ac_status); };
19426 then
19427 eval cf_cv_prog_CXX_c_o=yes
19428 else
19429 eval cf_cv_prog_CXX_c_o=no
19431 rm -rf conftest*
19434 if test $cf_cv_prog_CXX_c_o = yes; then
19435 echo "$as_me:19435: result: yes" >&5
19436 echo "${ECHO_T}yes" >&6
19437 else
19438 echo "$as_me:19438: result: no" >&5
19439 echo "${ECHO_T}no" >&6
19442 case $GXX_VERSION in
19443 (1*|2.0-6*)
19444 cf_cxx_library=yes
19446 (*-2.7*|2.7*)
19448 cf_cxx_library=unknown
19449 case $cf_cv_system_name in
19450 (os2*)
19451 cf_gpp_libname=gpp
19454 cf_gpp_libname=g++
19456 esac
19457 if test "$GXX" = yes; then
19458 echo "$as_me:19458: checking for lib$cf_gpp_libname" >&5
19459 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19460 cf_save="$LIBS"
19462 cf_add_libs="-l$cf_gpp_libname"
19463 # Filter out duplicates - this happens with badly-designed ".pc" files...
19464 for cf_add_1lib in $LIBS
19466 for cf_add_2lib in $cf_add_libs
19468 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19469 then
19470 cf_add_1lib=
19471 break
19473 done
19474 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19475 done
19476 LIBS="$cf_add_libs"
19478 cat >conftest.$ac_ext <<_ACEOF
19479 #line 19479 "configure"
19480 #include "confdefs.h"
19482 #include <$cf_gpp_libname/builtin.h>
19485 main ()
19487 two_arg_error_handler_t foo2 = lib_error_handler
19489 return 0;
19491 _ACEOF
19492 rm -f conftest.$ac_objext conftest$ac_exeext
19493 if { (eval echo "$as_me:19493: \"$ac_link\"") >&5
19494 (eval $ac_link) 2>&5
19495 ac_status=$?
19496 echo "$as_me:19496: \$? = $ac_status" >&5
19497 (exit $ac_status); } &&
19498 { ac_try='test -s conftest$ac_exeext'
19499 { (eval echo "$as_me:19499: \"$ac_try\"") >&5
19500 (eval $ac_try) 2>&5
19501 ac_status=$?
19502 echo "$as_me:19502: \$? = $ac_status" >&5
19503 (exit $ac_status); }; }; then
19504 cf_cxx_library=yes
19506 cf_add_libs="-l$cf_gpp_libname"
19507 # Filter out duplicates - this happens with badly-designed ".pc" files...
19508 for cf_add_1lib in $CXXLIBS
19510 for cf_add_2lib in $cf_add_libs
19512 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19513 then
19514 cf_add_1lib=
19515 break
19517 done
19518 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19519 done
19520 CXXLIBS="$cf_add_libs"
19522 if test "$cf_gpp_libname" = cpp ; then
19524 cat >>confdefs.h <<\EOF
19525 #define HAVE_GPP_BUILTIN_H 1
19528 else
19530 cat >>confdefs.h <<\EOF
19531 #define HAVE_GXX_BUILTIN_H 1
19535 else
19536 echo "$as_me: failed program was:" >&5
19537 cat conftest.$ac_ext >&5
19538 cat >conftest.$ac_ext <<_ACEOF
19539 #line 19539 "configure"
19540 #include "confdefs.h"
19542 #include <builtin.h>
19545 main ()
19547 two_arg_error_handler_t foo2 = lib_error_handler
19549 return 0;
19551 _ACEOF
19552 rm -f conftest.$ac_objext conftest$ac_exeext
19553 if { (eval echo "$as_me:19553: \"$ac_link\"") >&5
19554 (eval $ac_link) 2>&5
19555 ac_status=$?
19556 echo "$as_me:19556: \$? = $ac_status" >&5
19557 (exit $ac_status); } &&
19558 { ac_try='test -s conftest$ac_exeext'
19559 { (eval echo "$as_me:19559: \"$ac_try\"") >&5
19560 (eval $ac_try) 2>&5
19561 ac_status=$?
19562 echo "$as_me:19562: \$? = $ac_status" >&5
19563 (exit $ac_status); }; }; then
19564 cf_cxx_library=yes
19566 cf_add_libs="-l$cf_gpp_libname"
19567 # Filter out duplicates - this happens with badly-designed ".pc" files...
19568 for cf_add_1lib in $CXXLIBS
19570 for cf_add_2lib in $cf_add_libs
19572 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19573 then
19574 cf_add_1lib=
19575 break
19577 done
19578 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19579 done
19580 CXXLIBS="$cf_add_libs"
19582 cat >>confdefs.h <<\EOF
19583 #define HAVE_BUILTIN_H 1
19586 else
19587 echo "$as_me: failed program was:" >&5
19588 cat conftest.$ac_ext >&5
19589 cf_cxx_library=no
19591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19594 LIBS="$cf_save"
19595 echo "$as_me:19595: result: $cf_cxx_library" >&5
19596 echo "${ECHO_T}$cf_cxx_library" >&6
19601 cf_cxx_library=no
19603 esac
19605 ac_ext=cc
19606 ac_cpp='$CXXCPP $CPPFLAGS'
19607 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19608 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19609 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19610 ac_main_return=return
19611 echo "$as_me:19611: checking how to run the C++ preprocessor" >&5
19612 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19613 if test -z "$CXXCPP"; then
19614 if test "${ac_cv_prog_CXXCPP+set}" = set; then
19615 echo $ECHO_N "(cached) $ECHO_C" >&6
19616 else
19617 # Double quotes because CXXCPP needs to be expanded
19618 for CXXCPP in "$CXX -E" "/lib/cpp"
19620 ac_preproc_ok=false
19621 for ac_cxx_preproc_warn_flag in '' yes
19623 # Use a header file that comes with gcc, so configuring glibc
19624 # with a fresh cross-compiler works.
19625 # On the NeXT, cc -E runs the code through the compiler's parser,
19626 # not just through cpp. "Syntax error" is here to catch this case.
19627 cat >conftest.$ac_ext <<_ACEOF
19628 #line 19628 "configure"
19629 #include "confdefs.h"
19630 #include <assert.h>
19631 Syntax error
19632 _ACEOF
19633 if { (eval echo "$as_me:19633: \"$ac_cpp conftest.$ac_ext\"") >&5
19634 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19635 ac_status=$?
19636 egrep -v '^ *\+' conftest.er1 >conftest.err
19637 rm -f conftest.er1
19638 cat conftest.err >&5
19639 echo "$as_me:19639: \$? = $ac_status" >&5
19640 (exit $ac_status); } >/dev/null; then
19641 if test -s conftest.err; then
19642 ac_cpp_err=$ac_cxx_preproc_warn_flag
19643 else
19644 ac_cpp_err=
19646 else
19647 ac_cpp_err=yes
19649 if test -z "$ac_cpp_err"; then
19651 else
19652 echo "$as_me: failed program was:" >&5
19653 cat conftest.$ac_ext >&5
19654 # Broken: fails on valid input.
19655 continue
19657 rm -f conftest.err conftest.$ac_ext
19659 # OK, works on sane cases. Now check whether non-existent headers
19660 # can be detected and how.
19661 cat >conftest.$ac_ext <<_ACEOF
19662 #line 19662 "configure"
19663 #include "confdefs.h"
19664 #include <ac_nonexistent.h>
19665 _ACEOF
19666 if { (eval echo "$as_me:19666: \"$ac_cpp conftest.$ac_ext\"") >&5
19667 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19668 ac_status=$?
19669 egrep -v '^ *\+' conftest.er1 >conftest.err
19670 rm -f conftest.er1
19671 cat conftest.err >&5
19672 echo "$as_me:19672: \$? = $ac_status" >&5
19673 (exit $ac_status); } >/dev/null; then
19674 if test -s conftest.err; then
19675 ac_cpp_err=$ac_cxx_preproc_warn_flag
19676 else
19677 ac_cpp_err=
19679 else
19680 ac_cpp_err=yes
19682 if test -z "$ac_cpp_err"; then
19683 # Broken: success on invalid input.
19684 continue
19685 else
19686 echo "$as_me: failed program was:" >&5
19687 cat conftest.$ac_ext >&5
19688 # Passes both tests.
19689 ac_preproc_ok=:
19690 break
19692 rm -f conftest.err conftest.$ac_ext
19694 done
19695 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19696 rm -f conftest.err conftest.$ac_ext
19697 if $ac_preproc_ok; then
19698 break
19701 done
19702 ac_cv_prog_CXXCPP=$CXXCPP
19705 CXXCPP=$ac_cv_prog_CXXCPP
19706 else
19707 ac_cv_prog_CXXCPP=$CXXCPP
19709 echo "$as_me:19709: result: $CXXCPP" >&5
19710 echo "${ECHO_T}$CXXCPP" >&6
19711 ac_preproc_ok=false
19712 for ac_cxx_preproc_warn_flag in '' yes
19714 # Use a header file that comes with gcc, so configuring glibc
19715 # with a fresh cross-compiler works.
19716 # On the NeXT, cc -E runs the code through the compiler's parser,
19717 # not just through cpp. "Syntax error" is here to catch this case.
19718 cat >conftest.$ac_ext <<_ACEOF
19719 #line 19719 "configure"
19720 #include "confdefs.h"
19721 #include <assert.h>
19722 Syntax error
19723 _ACEOF
19724 if { (eval echo "$as_me:19724: \"$ac_cpp conftest.$ac_ext\"") >&5
19725 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19726 ac_status=$?
19727 egrep -v '^ *\+' conftest.er1 >conftest.err
19728 rm -f conftest.er1
19729 cat conftest.err >&5
19730 echo "$as_me:19730: \$? = $ac_status" >&5
19731 (exit $ac_status); } >/dev/null; then
19732 if test -s conftest.err; then
19733 ac_cpp_err=$ac_cxx_preproc_warn_flag
19734 else
19735 ac_cpp_err=
19737 else
19738 ac_cpp_err=yes
19740 if test -z "$ac_cpp_err"; then
19742 else
19743 echo "$as_me: failed program was:" >&5
19744 cat conftest.$ac_ext >&5
19745 # Broken: fails on valid input.
19746 continue
19748 rm -f conftest.err conftest.$ac_ext
19750 # OK, works on sane cases. Now check whether non-existent headers
19751 # can be detected and how.
19752 cat >conftest.$ac_ext <<_ACEOF
19753 #line 19753 "configure"
19754 #include "confdefs.h"
19755 #include <ac_nonexistent.h>
19756 _ACEOF
19757 if { (eval echo "$as_me:19757: \"$ac_cpp conftest.$ac_ext\"") >&5
19758 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19759 ac_status=$?
19760 egrep -v '^ *\+' conftest.er1 >conftest.err
19761 rm -f conftest.er1
19762 cat conftest.err >&5
19763 echo "$as_me:19763: \$? = $ac_status" >&5
19764 (exit $ac_status); } >/dev/null; then
19765 if test -s conftest.err; then
19766 ac_cpp_err=$ac_cxx_preproc_warn_flag
19767 else
19768 ac_cpp_err=
19770 else
19771 ac_cpp_err=yes
19773 if test -z "$ac_cpp_err"; then
19774 # Broken: success on invalid input.
19775 continue
19776 else
19777 echo "$as_me: failed program was:" >&5
19778 cat conftest.$ac_ext >&5
19779 # Passes both tests.
19780 ac_preproc_ok=:
19781 break
19783 rm -f conftest.err conftest.$ac_ext
19785 done
19786 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19787 rm -f conftest.err conftest.$ac_ext
19788 if $ac_preproc_ok; then
19790 else
19791 { { echo "$as_me:19791: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19792 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19793 { (exit 1); exit 1; }; }
19796 ac_ext=cc
19797 ac_cpp='$CXXCPP $CPPFLAGS'
19798 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19799 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19800 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19801 ac_main_return=return
19803 for ac_header in typeinfo
19805 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19806 echo "$as_me:19806: checking for $ac_header" >&5
19807 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19808 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19809 echo $ECHO_N "(cached) $ECHO_C" >&6
19810 else
19811 cat >conftest.$ac_ext <<_ACEOF
19812 #line 19812 "configure"
19813 #include "confdefs.h"
19814 #include <$ac_header>
19815 _ACEOF
19816 if { (eval echo "$as_me:19816: \"$ac_cpp conftest.$ac_ext\"") >&5
19817 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19818 ac_status=$?
19819 egrep -v '^ *\+' conftest.er1 >conftest.err
19820 rm -f conftest.er1
19821 cat conftest.err >&5
19822 echo "$as_me:19822: \$? = $ac_status" >&5
19823 (exit $ac_status); } >/dev/null; then
19824 if test -s conftest.err; then
19825 ac_cpp_err=$ac_cxx_preproc_warn_flag
19826 else
19827 ac_cpp_err=
19829 else
19830 ac_cpp_err=yes
19832 if test -z "$ac_cpp_err"; then
19833 eval "$as_ac_Header=yes"
19834 else
19835 echo "$as_me: failed program was:" >&5
19836 cat conftest.$ac_ext >&5
19837 eval "$as_ac_Header=no"
19839 rm -f conftest.err conftest.$ac_ext
19841 echo "$as_me:19841: result: `eval echo '${'$as_ac_Header'}'`" >&5
19842 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19843 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19844 cat >>confdefs.h <<EOF
19845 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19849 done
19851 for ac_header in iostream
19853 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19854 echo "$as_me:19854: checking for $ac_header" >&5
19855 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19856 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19857 echo $ECHO_N "(cached) $ECHO_C" >&6
19858 else
19859 cat >conftest.$ac_ext <<_ACEOF
19860 #line 19860 "configure"
19861 #include "confdefs.h"
19862 #include <$ac_header>
19863 _ACEOF
19864 if { (eval echo "$as_me:19864: \"$ac_cpp conftest.$ac_ext\"") >&5
19865 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19866 ac_status=$?
19867 egrep -v '^ *\+' conftest.er1 >conftest.err
19868 rm -f conftest.er1
19869 cat conftest.err >&5
19870 echo "$as_me:19870: \$? = $ac_status" >&5
19871 (exit $ac_status); } >/dev/null; then
19872 if test -s conftest.err; then
19873 ac_cpp_err=$ac_cxx_preproc_warn_flag
19874 else
19875 ac_cpp_err=
19877 else
19878 ac_cpp_err=yes
19880 if test -z "$ac_cpp_err"; then
19881 eval "$as_ac_Header=yes"
19882 else
19883 echo "$as_me: failed program was:" >&5
19884 cat conftest.$ac_ext >&5
19885 eval "$as_ac_Header=no"
19887 rm -f conftest.err conftest.$ac_ext
19889 echo "$as_me:19889: result: `eval echo '${'$as_ac_Header'}'`" >&5
19890 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19891 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19892 cat >>confdefs.h <<EOF
19893 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19897 done
19899 if test x"$ac_cv_header_iostream" = xyes ; then
19900 echo "$as_me:19900: checking if iostream uses std-namespace" >&5
19901 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19902 cat >conftest.$ac_ext <<_ACEOF
19903 #line 19903 "configure"
19904 #include "confdefs.h"
19906 #include <iostream>
19907 using std::endl;
19908 using std::cerr;
19910 main ()
19913 cerr << "testing" << endl;
19916 return 0;
19918 _ACEOF
19919 rm -f conftest.$ac_objext
19920 if { (eval echo "$as_me:19920: \"$ac_compile\"") >&5
19921 (eval $ac_compile) 2>&5
19922 ac_status=$?
19923 echo "$as_me:19923: \$? = $ac_status" >&5
19924 (exit $ac_status); } &&
19925 { ac_try='test -s conftest.$ac_objext'
19926 { (eval echo "$as_me:19926: \"$ac_try\"") >&5
19927 (eval $ac_try) 2>&5
19928 ac_status=$?
19929 echo "$as_me:19929: \$? = $ac_status" >&5
19930 (exit $ac_status); }; }; then
19931 cf_iostream_namespace=yes
19932 else
19933 echo "$as_me: failed program was:" >&5
19934 cat conftest.$ac_ext >&5
19935 cf_iostream_namespace=no
19937 rm -f conftest.$ac_objext conftest.$ac_ext
19938 echo "$as_me:19938: result: $cf_iostream_namespace" >&5
19939 echo "${ECHO_T}$cf_iostream_namespace" >&6
19940 if test "$cf_iostream_namespace" = yes ; then
19942 cat >>confdefs.h <<\EOF
19943 #define IOSTREAM_NAMESPACE 1
19949 echo "$as_me:19949: checking if we should include stdbool.h" >&5
19950 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19952 if test "${cf_cv_header_stdbool_h+set}" = set; then
19953 echo $ECHO_N "(cached) $ECHO_C" >&6
19954 else
19956 cat >conftest.$ac_ext <<_ACEOF
19957 #line 19957 "configure"
19958 #include "confdefs.h"
19961 main ()
19963 bool foo = false
19965 return 0;
19967 _ACEOF
19968 rm -f conftest.$ac_objext
19969 if { (eval echo "$as_me:19969: \"$ac_compile\"") >&5
19970 (eval $ac_compile) 2>&5
19971 ac_status=$?
19972 echo "$as_me:19972: \$? = $ac_status" >&5
19973 (exit $ac_status); } &&
19974 { ac_try='test -s conftest.$ac_objext'
19975 { (eval echo "$as_me:19975: \"$ac_try\"") >&5
19976 (eval $ac_try) 2>&5
19977 ac_status=$?
19978 echo "$as_me:19978: \$? = $ac_status" >&5
19979 (exit $ac_status); }; }; then
19980 cf_cv_header_stdbool_h=0
19981 else
19982 echo "$as_me: failed program was:" >&5
19983 cat conftest.$ac_ext >&5
19984 cat >conftest.$ac_ext <<_ACEOF
19985 #line 19985 "configure"
19986 #include "confdefs.h"
19988 #ifndef __BEOS__
19989 #include <stdbool.h>
19990 #endif
19993 main ()
19995 bool foo = false
19997 return 0;
19999 _ACEOF
20000 rm -f conftest.$ac_objext
20001 if { (eval echo "$as_me:20001: \"$ac_compile\"") >&5
20002 (eval $ac_compile) 2>&5
20003 ac_status=$?
20004 echo "$as_me:20004: \$? = $ac_status" >&5
20005 (exit $ac_status); } &&
20006 { ac_try='test -s conftest.$ac_objext'
20007 { (eval echo "$as_me:20007: \"$ac_try\"") >&5
20008 (eval $ac_try) 2>&5
20009 ac_status=$?
20010 echo "$as_me:20010: \$? = $ac_status" >&5
20011 (exit $ac_status); }; }; then
20012 cf_cv_header_stdbool_h=1
20013 else
20014 echo "$as_me: failed program was:" >&5
20015 cat conftest.$ac_ext >&5
20016 cf_cv_header_stdbool_h=0
20018 rm -f conftest.$ac_objext conftest.$ac_ext
20020 rm -f conftest.$ac_objext conftest.$ac_ext
20023 if test "$cf_cv_header_stdbool_h" = 1
20024 then echo "$as_me:20024: result: yes" >&5
20025 echo "${ECHO_T}yes" >&6
20026 else echo "$as_me:20026: result: no" >&5
20027 echo "${ECHO_T}no" >&6
20030 echo "$as_me:20030: checking for builtin bool type" >&5
20031 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20033 if test "${cf_cv_builtin_bool+set}" = set; then
20034 echo $ECHO_N "(cached) $ECHO_C" >&6
20035 else
20037 cat >conftest.$ac_ext <<_ACEOF
20038 #line 20038 "configure"
20039 #include "confdefs.h"
20041 #include <stdio.h>
20042 #include <sys/types.h>
20045 main ()
20047 bool x = false
20049 return 0;
20051 _ACEOF
20052 rm -f conftest.$ac_objext
20053 if { (eval echo "$as_me:20053: \"$ac_compile\"") >&5
20054 (eval $ac_compile) 2>&5
20055 ac_status=$?
20056 echo "$as_me:20056: \$? = $ac_status" >&5
20057 (exit $ac_status); } &&
20058 { ac_try='test -s conftest.$ac_objext'
20059 { (eval echo "$as_me:20059: \"$ac_try\"") >&5
20060 (eval $ac_try) 2>&5
20061 ac_status=$?
20062 echo "$as_me:20062: \$? = $ac_status" >&5
20063 (exit $ac_status); }; }; then
20064 cf_cv_builtin_bool=1
20065 else
20066 echo "$as_me: failed program was:" >&5
20067 cat conftest.$ac_ext >&5
20068 cf_cv_builtin_bool=0
20070 rm -f conftest.$ac_objext conftest.$ac_ext
20074 if test "$cf_cv_builtin_bool" = 1
20075 then echo "$as_me:20075: result: yes" >&5
20076 echo "${ECHO_T}yes" >&6
20077 else echo "$as_me:20077: result: no" >&5
20078 echo "${ECHO_T}no" >&6
20081 echo "$as_me:20081: checking for size of bool" >&5
20082 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20083 if test "${cf_cv_type_of_bool+set}" = set; then
20084 echo $ECHO_N "(cached) $ECHO_C" >&6
20085 else
20087 rm -f cf_test.out
20088 if test "$cross_compiling" = yes; then
20089 cf_cv_type_of_bool=unknown
20090 else
20091 cat >conftest.$ac_ext <<_ACEOF
20092 #line 20092 "configure"
20093 #include "confdefs.h"
20095 #include <stdlib.h>
20096 #include <stdio.h>
20098 #if defined(__cplusplus)
20100 #ifdef HAVE_GXX_BUILTIN_H
20101 #include <g++/builtin.h>
20102 #elif HAVE_GPP_BUILTIN_H
20103 #include <gpp/builtin.h>
20104 #elif HAVE_BUILTIN_H
20105 #include <builtin.h>
20106 #endif
20108 #else
20110 #if $cf_cv_header_stdbool_h
20111 #include <stdbool.h>
20112 #endif
20114 #endif
20116 int main()
20118 FILE *fp = fopen("cf_test.out", "w");
20119 if (fp != 0) {
20120 bool x = true;
20121 if ((bool)(-x) >= 0)
20122 fputs("unsigned ", fp);
20123 if (sizeof(x) == sizeof(int)) fputs("int", fp);
20124 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20125 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20126 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20127 fclose(fp);
20129 ${cf_cv_main_return:-return}(0);
20132 _ACEOF
20133 rm -f conftest$ac_exeext
20134 if { (eval echo "$as_me:20134: \"$ac_link\"") >&5
20135 (eval $ac_link) 2>&5
20136 ac_status=$?
20137 echo "$as_me:20137: \$? = $ac_status" >&5
20138 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20139 { (eval echo "$as_me:20139: \"$ac_try\"") >&5
20140 (eval $ac_try) 2>&5
20141 ac_status=$?
20142 echo "$as_me:20142: \$? = $ac_status" >&5
20143 (exit $ac_status); }; }; then
20144 cf_cv_type_of_bool=`cat cf_test.out`
20145 if test -z "$cf_cv_type_of_bool"; then
20146 cf_cv_type_of_bool=unknown
20148 else
20149 echo "$as_me: program exited with status $ac_status" >&5
20150 echo "$as_me: failed program was:" >&5
20151 cat conftest.$ac_ext >&5
20152 cf_cv_type_of_bool=unknown
20154 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20159 rm -f cf_test.out
20160 echo "$as_me:20160: result: $cf_cv_type_of_bool" >&5
20161 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20162 if test "$cf_cv_type_of_bool" = unknown ; then
20163 case .$NCURSES_BOOL in
20164 (.auto|.) NCURSES_BOOL=unsigned;;
20165 esac
20166 { echo "$as_me:20166: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20167 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20168 cf_cv_type_of_bool=$NCURSES_BOOL
20171 echo "$as_me:20171: checking for special defines needed for etip.h" >&5
20172 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20173 cf_save_CXXFLAGS="$CXXFLAGS"
20174 cf_result="none"
20176 # etip.h includes ncurses.h which includes ncurses_dll.h
20177 # But ncurses_dll.h is generated - fix here.
20178 test -d include || mkdir include
20179 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
20181 for cf_math in "" MATH_H
20183 for cf_excp in "" MATH_EXCEPTION
20185 CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20186 test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20187 test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20188 cat >conftest.$ac_ext <<_ACEOF
20189 #line 20189 "configure"
20190 #include "confdefs.h"
20192 #include <etip.h.in>
20195 main ()
20199 return 0;
20201 _ACEOF
20202 rm -f conftest.$ac_objext
20203 if { (eval echo "$as_me:20203: \"$ac_compile\"") >&5
20204 (eval $ac_compile) 2>&5
20205 ac_status=$?
20206 echo "$as_me:20206: \$? = $ac_status" >&5
20207 (exit $ac_status); } &&
20208 { ac_try='test -s conftest.$ac_objext'
20209 { (eval echo "$as_me:20209: \"$ac_try\"") >&5
20210 (eval $ac_try) 2>&5
20211 ac_status=$?
20212 echo "$as_me:20212: \$? = $ac_status" >&5
20213 (exit $ac_status); }; }; then
20215 test -n "$cf_math" && cat >>confdefs.h <<EOF
20216 #define ETIP_NEEDS_${cf_math} 1
20219 test -n "$cf_excp" && cat >>confdefs.h <<EOF
20220 #define ETIP_NEEDS_${cf_excp} 1
20223 cf_result="$cf_math $cf_excp"
20224 break 2
20226 else
20227 echo "$as_me: failed program was:" >&5
20228 cat conftest.$ac_ext >&5
20230 rm -f conftest.$ac_objext conftest.$ac_ext
20231 done
20232 done
20233 echo "$as_me:20233: result: $cf_result" >&5
20234 echo "${ECHO_T}$cf_result" >&6
20235 CXXFLAGS="$cf_save_CXXFLAGS"
20237 if test -n "$CXX"; then
20238 echo "$as_me:20238: checking if $CXX accepts parameter initialization" >&5
20239 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20240 if test "${cf_cv_cpp_param_init+set}" = set; then
20241 echo $ECHO_N "(cached) $ECHO_C" >&6
20242 else
20244 ac_ext=cc
20245 ac_cpp='$CXXCPP $CPPFLAGS'
20246 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20247 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20248 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20249 ac_main_return=return
20251 if test "$cross_compiling" = yes; then
20252 cf_cv_cpp_param_init=unknown
20253 else
20254 cat >conftest.$ac_ext <<_ACEOF
20255 #line 20255 "configure"
20256 #include "confdefs.h"
20258 class TEST {
20259 private:
20260 int value;
20261 public:
20262 TEST(int x = 1);
20263 ~TEST();
20266 TEST::TEST(int x = 1) // some compilers do not like second initializer
20268 value = x;
20270 int main() { }
20272 _ACEOF
20273 rm -f conftest$ac_exeext
20274 if { (eval echo "$as_me:20274: \"$ac_link\"") >&5
20275 (eval $ac_link) 2>&5
20276 ac_status=$?
20277 echo "$as_me:20277: \$? = $ac_status" >&5
20278 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20279 { (eval echo "$as_me:20279: \"$ac_try\"") >&5
20280 (eval $ac_try) 2>&5
20281 ac_status=$?
20282 echo "$as_me:20282: \$? = $ac_status" >&5
20283 (exit $ac_status); }; }; then
20284 cf_cv_cpp_param_init=yes
20285 else
20286 echo "$as_me: program exited with status $ac_status" >&5
20287 echo "$as_me: failed program was:" >&5
20288 cat conftest.$ac_ext >&5
20289 cf_cv_cpp_param_init=no
20291 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20293 ac_ext=cc
20294 ac_cpp='$CXXCPP $CPPFLAGS'
20295 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20296 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20297 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20298 ac_main_return=return
20301 echo "$as_me:20301: result: $cf_cv_cpp_param_init" >&5
20302 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20304 test "$cf_cv_cpp_param_init" = yes &&
20305 cat >>confdefs.h <<\EOF
20306 #define CPP_HAS_PARAM_INIT 1
20309 if test -n "$CXX"; then
20311 echo "$as_me:20311: checking if $CXX accepts static_cast" >&5
20312 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20313 if test "${cf_cv_cpp_static_cast+set}" = set; then
20314 echo $ECHO_N "(cached) $ECHO_C" >&6
20315 else
20317 ac_ext=cc
20318 ac_cpp='$CXXCPP $CPPFLAGS'
20319 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20320 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20321 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20322 ac_main_return=return
20324 cat >conftest.$ac_ext <<_ACEOF
20325 #line 20325 "configure"
20326 #include "confdefs.h"
20328 class NCursesPanel
20330 public:
20331 NCursesPanel(int nlines,
20332 int ncols,
20333 int begin_y = 0,
20334 int begin_x = 0)
20337 NCursesPanel();
20338 ~NCursesPanel();
20341 template<class T> class NCursesUserPanel : public NCursesPanel
20343 public:
20344 NCursesUserPanel (int nlines,
20345 int ncols,
20346 int begin_y = 0,
20347 int begin_x = 0,
20348 const T* p_UserData = static_cast<T*>(0))
20349 : NCursesPanel (nlines, ncols, begin_y, begin_x)
20352 NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20356 virtual ~NCursesUserPanel() {};
20360 main ()
20363 const char* p_UserData = static_cast<char*>(0)
20365 return 0;
20367 _ACEOF
20368 rm -f conftest.$ac_objext
20369 if { (eval echo "$as_me:20369: \"$ac_compile\"") >&5
20370 (eval $ac_compile) 2>&5
20371 ac_status=$?
20372 echo "$as_me:20372: \$? = $ac_status" >&5
20373 (exit $ac_status); } &&
20374 { ac_try='test -s conftest.$ac_objext'
20375 { (eval echo "$as_me:20375: \"$ac_try\"") >&5
20376 (eval $ac_try) 2>&5
20377 ac_status=$?
20378 echo "$as_me:20378: \$? = $ac_status" >&5
20379 (exit $ac_status); }; }; then
20380 cf_cv_cpp_static_cast=yes
20381 else
20382 echo "$as_me: failed program was:" >&5
20383 cat conftest.$ac_ext >&5
20384 cf_cv_cpp_static_cast=no
20386 rm -f conftest.$ac_objext conftest.$ac_ext
20388 ac_ext=cc
20389 ac_cpp='$CXXCPP $CPPFLAGS'
20390 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20391 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20392 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20393 ac_main_return=return
20396 echo "$as_me:20396: result: $cf_cv_cpp_static_cast" >&5
20397 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20401 test "$cf_cv_cpp_static_cast" = yes &&
20402 cat >>confdefs.h <<\EOF
20403 #define CPP_HAS_STATIC_CAST 1
20406 CXX_AR='$(AR)'
20407 CXX_ARFLAGS='$(ARFLAGS)'
20408 case $cf_cv_system_name in
20409 (irix*)
20410 if test "$GXX" != yes ; then
20411 CXX_AR='$(CXX)'
20412 CXX_ARFLAGS='-ar -o'
20415 (sco3.2v5*)
20416 CXXLDFLAGS="-u main"
20418 (solaris2*)
20419 if test "$GXX" != yes ; then
20420 CXX_AR='$(CXX)'
20421 CXX_ARFLAGS='-xar -o'
20424 esac
20426 else
20427 cf_cxx_library=no
20428 cf_cv_builtin_bool=1
20430 # Just because we are not configuring against C++ right now does not
20431 # mean that a user will not want to use C++. Some distributors disable
20432 # the C++ portion of this configuration as a shortcut (or just to avoid
20433 # compiling the demo in the c++ directory). So we need a reasonable
20434 # default for the 'bool' type.
20436 # Caveat: since the storage of the bool type is not standardized, it
20437 # may change.
20439 if test "$NCURSES_BOOL" != auto ; then
20440 cf_cv_type_of_bool=$NCURSES_BOOL
20441 cf_cv_header_stdbool_h=0
20442 else
20443 if test "$cf_cv_header_stdbool_h" = 1 ; then
20445 echo "$as_me:20445: checking for size of bool" >&5
20446 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20447 if test "${cf_cv_type_of_bool+set}" = set; then
20448 echo $ECHO_N "(cached) $ECHO_C" >&6
20449 else
20451 rm -f cf_test.out
20452 if test "$cross_compiling" = yes; then
20453 cf_cv_type_of_bool=unknown
20454 else
20455 cat >conftest.$ac_ext <<_ACEOF
20456 #line 20456 "configure"
20457 #include "confdefs.h"
20459 #include <stdlib.h>
20460 #include <stdio.h>
20462 #if defined(__cplusplus)
20464 #ifdef HAVE_GXX_BUILTIN_H
20465 #include <g++/builtin.h>
20466 #elif HAVE_GPP_BUILTIN_H
20467 #include <gpp/builtin.h>
20468 #elif HAVE_BUILTIN_H
20469 #include <builtin.h>
20470 #endif
20472 #else
20474 #if $cf_cv_header_stdbool_h
20475 #include <stdbool.h>
20476 #endif
20478 #endif
20480 int main()
20482 FILE *fp = fopen("cf_test.out", "w");
20483 if (fp != 0) {
20484 bool x = true;
20485 if ((bool)(-x) >= 0)
20486 fputs("unsigned ", fp);
20487 if (sizeof(x) == sizeof(int)) fputs("int", fp);
20488 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20489 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20490 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20491 fclose(fp);
20493 ${cf_cv_main_return:-return}(0);
20496 _ACEOF
20497 rm -f conftest$ac_exeext
20498 if { (eval echo "$as_me:20498: \"$ac_link\"") >&5
20499 (eval $ac_link) 2>&5
20500 ac_status=$?
20501 echo "$as_me:20501: \$? = $ac_status" >&5
20502 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20503 { (eval echo "$as_me:20503: \"$ac_try\"") >&5
20504 (eval $ac_try) 2>&5
20505 ac_status=$?
20506 echo "$as_me:20506: \$? = $ac_status" >&5
20507 (exit $ac_status); }; }; then
20508 cf_cv_type_of_bool=`cat cf_test.out`
20509 if test -z "$cf_cv_type_of_bool"; then
20510 cf_cv_type_of_bool=unknown
20512 else
20513 echo "$as_me: program exited with status $ac_status" >&5
20514 echo "$as_me: failed program was:" >&5
20515 cat conftest.$ac_ext >&5
20516 cf_cv_type_of_bool=unknown
20518 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20523 rm -f cf_test.out
20524 echo "$as_me:20524: result: $cf_cv_type_of_bool" >&5
20525 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20526 if test "$cf_cv_type_of_bool" = unknown ; then
20527 case .$NCURSES_BOOL in
20528 (.auto|.) NCURSES_BOOL=unsigned;;
20529 esac
20530 { echo "$as_me:20530: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20531 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20532 cf_cv_type_of_bool=$NCURSES_BOOL
20535 else
20536 echo "$as_me:20536: checking for fallback type of bool" >&5
20537 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20538 case "$host_cpu" in
20539 (i?86) cf_cv_type_of_bool=char ;;
20540 (*) cf_cv_type_of_bool=int ;;
20541 esac
20542 echo "$as_me:20542: result: $cf_cv_type_of_bool" >&5
20543 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20548 # If the C compiler did not declare bool, and we did not determine that the C++
20549 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20550 # ncurses library use the same type as C++ bool. Note that this allows one to
20551 # specify the type of bool in a configure-script option and postpone
20552 # integration with the C++ compiler provided that the types are compatible.
20553 USE_CXX_BOOL=1
20554 if test $cf_cv_cc_bool_type = 1
20555 then
20556 # oops: C has a bool. Unlikely, but C++ could differ.
20557 USE_CXX_BOOL=0
20558 elif test $cf_cv_builtin_bool = 0
20559 then
20560 # C++ has no bool
20561 USE_CXX_BOOL=0
20562 else
20563 # this is the normal case
20564 USE_CXX_BOOL='defined(__cplusplus)'
20567 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20569 if test "$cf_with_ada" != "no" ; then
20570 if test "$with_libtool" != "no"; then
20571 { echo "$as_me:20571: WARNING: libtool does not support Ada - disabling feature" >&5
20572 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20573 cf_with_ada=no
20577 if test "$cf_with_ada" != "no" ; then
20579 cf_ada_make=gnatmake
20580 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20581 set dummy $cf_ada_make; ac_word=$2
20582 echo "$as_me:20582: checking for $ac_word" >&5
20583 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20584 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20585 echo $ECHO_N "(cached) $ECHO_C" >&6
20586 else
20587 if test -n "$gnat_exists"; then
20588 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20589 else
20590 ac_save_IFS=$IFS; IFS=$ac_path_separator
20591 ac_dummy="$PATH"
20592 for ac_dir in $ac_dummy; do
20593 IFS=$ac_save_IFS
20594 test -z "$ac_dir" && ac_dir=.
20595 $as_executable_p "$ac_dir/$ac_word" || continue
20596 ac_cv_prog_gnat_exists="yes"
20597 echo "$as_me:20597: found $ac_dir/$ac_word" >&5
20598 break
20599 done
20601 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20604 gnat_exists=$ac_cv_prog_gnat_exists
20605 if test -n "$gnat_exists"; then
20606 echo "$as_me:20606: result: $gnat_exists" >&5
20607 echo "${ECHO_T}$gnat_exists" >&6
20608 else
20609 echo "$as_me:20609: result: no" >&5
20610 echo "${ECHO_T}no" >&6
20613 if test "$ac_cv_prog_gnat_exists" = no; then
20614 cf_ada_make=
20615 cf_cv_prog_gnat_correct=no
20616 else
20618 echo "$as_me:20618: checking for gnat version" >&5
20619 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20620 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20621 grep '[0-9].[0-9][0-9]*' |\
20622 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20623 echo "$as_me:20623: result: $cf_gnat_version" >&5
20624 echo "${ECHO_T}$cf_gnat_version" >&6
20626 case $cf_gnat_version in
20627 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20628 cf_cv_prog_gnat_correct=yes
20631 { echo "$as_me:20631: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20632 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20633 cf_cv_prog_gnat_correct=no
20635 esac
20637 # Extract the first word of "m4", so it can be a program name with args.
20638 set dummy m4; ac_word=$2
20639 echo "$as_me:20639: checking for $ac_word" >&5
20640 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20641 if test "${ac_cv_prog_M4_exists+set}" = set; then
20642 echo $ECHO_N "(cached) $ECHO_C" >&6
20643 else
20644 if test -n "$M4_exists"; then
20645 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20646 else
20647 ac_save_IFS=$IFS; IFS=$ac_path_separator
20648 ac_dummy="$PATH"
20649 for ac_dir in $ac_dummy; do
20650 IFS=$ac_save_IFS
20651 test -z "$ac_dir" && ac_dir=.
20652 $as_executable_p "$ac_dir/$ac_word" || continue
20653 ac_cv_prog_M4_exists="yes"
20654 echo "$as_me:20654: found $ac_dir/$ac_word" >&5
20655 break
20656 done
20658 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20661 M4_exists=$ac_cv_prog_M4_exists
20662 if test -n "$M4_exists"; then
20663 echo "$as_me:20663: result: $M4_exists" >&5
20664 echo "${ECHO_T}$M4_exists" >&6
20665 else
20666 echo "$as_me:20666: result: no" >&5
20667 echo "${ECHO_T}no" >&6
20670 if test "$ac_cv_prog_M4_exists" = no; then
20671 cf_cv_prog_gnat_correct=no
20672 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20674 if test "$cf_cv_prog_gnat_correct" = yes; then
20675 echo "$as_me:20675: checking if GNAT works" >&5
20676 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20678 rm -rf conftest* *~conftest*
20679 cat >>conftest.ads <<CF_EOF
20680 procedure conftest;
20681 CF_EOF
20682 cat >>conftest.adb <<CF_EOF
20683 with Text_IO;
20684 with GNAT.OS_Lib;
20685 procedure conftest is
20686 begin
20687 Text_IO.Put ("Hello World");
20688 Text_IO.New_Line;
20689 GNAT.OS_Lib.OS_Exit (0);
20690 end conftest;
20691 CF_EOF
20692 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20693 if ( ./conftest 1>&5 2>&1 ) ; then
20694 cf_cv_prog_gnat_correct=yes
20695 else
20696 cf_cv_prog_gnat_correct=no
20698 else
20699 cf_cv_prog_gnat_correct=no
20701 rm -rf conftest* *~conftest*
20703 echo "$as_me:20703: result: $cf_cv_prog_gnat_correct" >&5
20704 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20708 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20710 ADAFLAGS="$ADAFLAGS -gnatpn"
20712 echo "$as_me:20712: checking optimization options for ADAFLAGS" >&5
20713 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20714 case "$CFLAGS" in
20715 (*-g*)
20717 ADAFLAGS="$ADAFLAGS -g"
20720 esac
20721 case "$CFLAGS" in
20722 (*-O*)
20723 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
20725 ADAFLAGS="$ADAFLAGS $cf_O_flag"
20728 esac
20729 echo "$as_me:20729: result: $ADAFLAGS" >&5
20730 echo "${ECHO_T}$ADAFLAGS" >&6
20732 echo "$as_me:20732: checking if GNATPREP supports -T option" >&5
20733 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20734 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20735 echo $ECHO_N "(cached) $ECHO_C" >&6
20736 else
20738 cf_cv_gnatprep_opt_t=no
20739 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20742 echo "$as_me:20742: result: $cf_cv_gnatprep_opt_t" >&5
20743 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20744 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20746 echo "$as_me:20746: checking if GNAT supports generics" >&5
20747 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20748 case $cf_gnat_version in
20749 (3.[1-9]*|[4-9].*)
20750 cf_gnat_generics=yes
20753 cf_gnat_generics=no
20755 esac
20756 echo "$as_me:20756: result: $cf_gnat_generics" >&5
20757 echo "${ECHO_T}$cf_gnat_generics" >&6
20759 if test "$cf_gnat_generics" = yes
20760 then
20761 cf_compile_generics=generics
20762 cf_generic_objects="\${GENOBJS}"
20763 else
20764 cf_compile_generics=
20765 cf_generic_objects=
20768 echo "$as_me:20768: checking if GNAT supports SIGINT" >&5
20769 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20770 if test "${cf_cv_gnat_sigint+set}" = set; then
20771 echo $ECHO_N "(cached) $ECHO_C" >&6
20772 else
20774 rm -rf conftest* *~conftest*
20775 cat >>conftest.ads <<CF_EOF
20776 with Ada.Interrupts.Names;
20778 package ConfTest is
20780 pragma Warnings (Off); -- the next pragma exists since 3.11p
20781 pragma Unreserve_All_Interrupts;
20782 pragma Warnings (On);
20784 protected Process is
20785 procedure Stop;
20786 function Continue return Boolean;
20787 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20788 private
20789 Done : Boolean := False;
20790 end Process;
20792 end ConfTest;
20793 CF_EOF
20794 cat >>conftest.adb <<CF_EOF
20795 package body ConfTest is
20796 protected body Process is
20797 procedure Stop is
20798 begin
20799 Done := True;
20800 end Stop;
20801 function Continue return Boolean is
20802 begin
20803 return not Done;
20804 end Continue;
20805 end Process;
20806 end ConfTest;
20807 CF_EOF
20808 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20809 cf_cv_gnat_sigint=yes
20810 else
20811 cf_cv_gnat_sigint=no
20813 rm -rf conftest* *~conftest*
20816 echo "$as_me:20816: result: $cf_cv_gnat_sigint" >&5
20817 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20819 if test $cf_cv_gnat_sigint = yes ; then
20820 USE_GNAT_SIGINT=""
20821 else
20822 USE_GNAT_SIGINT="#"
20825 cf_gnat_libraries=no
20826 cf_gnat_projects=no
20828 if test "$enable_gnat_projects" != no ; then
20829 echo "$as_me:20829: checking if GNAT supports project files" >&5
20830 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20831 case $cf_gnat_version in
20832 (3.[0-9]*)
20835 case $cf_cv_system_name in
20836 (cygwin*|msys*)
20839 mkdir conftest.src conftest.bin conftest.lib
20840 cd conftest.src
20841 rm -rf conftest* *~conftest*
20842 cat >>library.gpr <<CF_EOF
20843 project Library is
20844 Kind := External ("LIB_KIND");
20845 for Library_Name use "ConfTest";
20846 for Object_Dir use ".";
20847 for Library_ALI_Dir use External("LIBRARY_DIR");
20848 for Library_Version use External ("SONAME");
20849 for Library_Kind use Kind;
20850 for Library_Dir use External("BUILD_DIR");
20851 Source_Dir := External ("SOURCE_DIR");
20852 for Source_Dirs use (Source_Dir);
20853 end Library;
20854 CF_EOF
20855 cat >>confpackage.ads <<CF_EOF
20856 package ConfPackage is
20857 procedure conftest;
20858 end ConfPackage;
20859 CF_EOF
20860 cat >>confpackage.adb <<CF_EOF
20861 with Text_IO;
20862 package body ConfPackage is
20863 procedure conftest is
20864 begin
20865 Text_IO.Put ("Hello World");
20866 Text_IO.New_Line;
20867 end conftest;
20868 end ConfPackage;
20869 CF_EOF
20870 if ( $cf_ada_make $ADAFLAGS \
20871 -Plibrary.gpr \
20872 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20873 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20874 -XSOURCE_DIR=`pwd` \
20875 -XSONAME=libConfTest.so.1 \
20876 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20877 cf_gnat_projects=yes
20879 cd ..
20880 if test -f conftest.lib/confpackage.ali
20881 then
20882 cf_gnat_libraries=yes
20884 rm -rf conftest* *~conftest*
20886 esac
20888 esac
20889 echo "$as_me:20889: result: $cf_gnat_projects" >&5
20890 echo "${ECHO_T}$cf_gnat_projects" >&6
20891 fi # enable_gnat_projects
20893 if test $cf_gnat_projects = yes
20894 then
20895 echo "$as_me:20895: checking if GNAT supports libraries" >&5
20896 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20897 echo "$as_me:20897: result: $cf_gnat_libraries" >&5
20898 echo "${ECHO_T}$cf_gnat_libraries" >&6
20901 if test "$cf_gnat_projects" = yes
20902 then
20903 USE_OLD_MAKERULES="#"
20904 USE_GNAT_PROJECTS=""
20905 else
20906 USE_OLD_MAKERULES=""
20907 USE_GNAT_PROJECTS="#"
20910 if test "$cf_gnat_libraries" = yes
20911 then
20912 USE_GNAT_LIBRARIES=""
20913 else
20914 USE_GNAT_LIBRARIES="#"
20917 echo "$as_me:20917: checking for ada-compiler" >&5
20918 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20920 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20921 if test "${with_ada_compiler+set}" = set; then
20922 withval="$with_ada_compiler"
20923 cf_ada_compiler=$withval
20924 else
20925 cf_ada_compiler=gnatmake
20928 echo "$as_me:20928: result: $cf_ada_compiler" >&5
20929 echo "${ECHO_T}$cf_ada_compiler" >&6
20931 cf_ada_package=terminal_interface
20933 echo "$as_me:20933: checking for ada-include" >&5
20934 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20936 # Check whether --with-ada-include or --without-ada-include was given.
20937 if test "${with_ada_include+set}" = set; then
20938 withval="$with_ada_include"
20940 else
20941 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20942 fi; if test -n "$prefix/share/ada/adainclude" ; then
20944 if test "x$prefix" != xNONE; then
20945 cf_path_syntax="$prefix"
20946 else
20947 cf_path_syntax="$ac_default_prefix"
20950 case ".$withval" in
20951 (.\$\(*\)*|.\'*\'*)
20953 (..|./*|.\\*)
20955 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
20957 (.\${*prefix}*|.\${*dir}*)
20958 eval withval="$withval"
20959 case ".$withval" in
20960 (.NONE/*)
20961 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20963 esac
20965 (.no|.NONE/*)
20966 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20969 { { echo "$as_me:20969: error: expected a pathname, not \"$withval\"" >&5
20970 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20971 { (exit 1); exit 1; }; }
20973 esac
20976 eval ADA_INCLUDE="$withval"
20978 echo "$as_me:20978: result: $ADA_INCLUDE" >&5
20979 echo "${ECHO_T}$ADA_INCLUDE" >&6
20981 echo "$as_me:20981: checking for ada-objects" >&5
20982 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20984 # Check whether --with-ada-objects or --without-ada-objects was given.
20985 if test "${with_ada_objects+set}" = set; then
20986 withval="$with_ada_objects"
20988 else
20989 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20990 fi; if test -n "$prefix/lib/ada/adalib" ; then
20992 if test "x$prefix" != xNONE; then
20993 cf_path_syntax="$prefix"
20994 else
20995 cf_path_syntax="$ac_default_prefix"
20998 case ".$withval" in
20999 (.\$\(*\)*|.\'*\'*)
21001 (..|./*|.\\*)
21003 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21005 (.\${*prefix}*|.\${*dir}*)
21006 eval withval="$withval"
21007 case ".$withval" in
21008 (.NONE/*)
21009 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21011 esac
21013 (.no|.NONE/*)
21014 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21017 { { echo "$as_me:21017: error: expected a pathname, not \"$withval\"" >&5
21018 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21019 { (exit 1); exit 1; }; }
21021 esac
21024 eval ADA_OBJECTS="$withval"
21026 echo "$as_me:21026: result: $ADA_OBJECTS" >&5
21027 echo "${ECHO_T}$ADA_OBJECTS" >&6
21029 echo "$as_me:21029: checking if an Ada95 shared-library should be built" >&5
21030 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21032 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21033 if test "${with_ada_sharedlib+set}" = set; then
21034 withval="$with_ada_sharedlib"
21035 with_ada_sharedlib=$withval
21036 else
21037 with_ada_sharedlib=no
21039 echo "$as_me:21039: result: $with_ada_sharedlib" >&5
21040 echo "${ECHO_T}$with_ada_sharedlib" >&6
21042 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21043 MAKE_ADA_SHAREDLIB="#"
21045 if test "x$with_ada_sharedlib" != xno
21046 then
21047 MAKE_ADA_SHAREDLIB=
21048 if test "x$with_ada_sharedlib" != xyes
21049 then
21050 ADA_SHAREDLIB="$with_ada_sharedlib"
21056 else
21057 cf_with_ada=no
21060 # do this "late" to avoid conflict with header-checks
21061 if test "x$with_widec" = xyes ; then
21062 echo "$as_me:21062: checking for wchar_t" >&5
21063 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21064 if test "${ac_cv_type_wchar_t+set}" = set; then
21065 echo $ECHO_N "(cached) $ECHO_C" >&6
21066 else
21067 cat >conftest.$ac_ext <<_ACEOF
21068 #line 21068 "configure"
21069 #include "confdefs.h"
21070 $ac_includes_default
21072 main ()
21074 if ((wchar_t *) 0)
21075 return 0;
21076 if (sizeof (wchar_t))
21077 return 0;
21079 return 0;
21081 _ACEOF
21082 rm -f conftest.$ac_objext
21083 if { (eval echo "$as_me:21083: \"$ac_compile\"") >&5
21084 (eval $ac_compile) 2>&5
21085 ac_status=$?
21086 echo "$as_me:21086: \$? = $ac_status" >&5
21087 (exit $ac_status); } &&
21088 { ac_try='test -s conftest.$ac_objext'
21089 { (eval echo "$as_me:21089: \"$ac_try\"") >&5
21090 (eval $ac_try) 2>&5
21091 ac_status=$?
21092 echo "$as_me:21092: \$? = $ac_status" >&5
21093 (exit $ac_status); }; }; then
21094 ac_cv_type_wchar_t=yes
21095 else
21096 echo "$as_me: failed program was:" >&5
21097 cat conftest.$ac_ext >&5
21098 ac_cv_type_wchar_t=no
21100 rm -f conftest.$ac_objext conftest.$ac_ext
21102 echo "$as_me:21102: result: $ac_cv_type_wchar_t" >&5
21103 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21105 echo "$as_me:21105: checking size of wchar_t" >&5
21106 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21107 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21108 echo $ECHO_N "(cached) $ECHO_C" >&6
21109 else
21110 if test "$ac_cv_type_wchar_t" = yes; then
21111 if test "$cross_compiling" = yes; then
21112 # Depending upon the size, compute the lo and hi bounds.
21113 cat >conftest.$ac_ext <<_ACEOF
21114 #line 21114 "configure"
21115 #include "confdefs.h"
21116 $ac_includes_default
21118 main ()
21120 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21122 return 0;
21124 _ACEOF
21125 rm -f conftest.$ac_objext
21126 if { (eval echo "$as_me:21126: \"$ac_compile\"") >&5
21127 (eval $ac_compile) 2>&5
21128 ac_status=$?
21129 echo "$as_me:21129: \$? = $ac_status" >&5
21130 (exit $ac_status); } &&
21131 { ac_try='test -s conftest.$ac_objext'
21132 { (eval echo "$as_me:21132: \"$ac_try\"") >&5
21133 (eval $ac_try) 2>&5
21134 ac_status=$?
21135 echo "$as_me:21135: \$? = $ac_status" >&5
21136 (exit $ac_status); }; }; then
21137 ac_lo=0 ac_mid=0
21138 while :; do
21139 cat >conftest.$ac_ext <<_ACEOF
21140 #line 21140 "configure"
21141 #include "confdefs.h"
21142 $ac_includes_default
21144 main ()
21146 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21148 return 0;
21150 _ACEOF
21151 rm -f conftest.$ac_objext
21152 if { (eval echo "$as_me:21152: \"$ac_compile\"") >&5
21153 (eval $ac_compile) 2>&5
21154 ac_status=$?
21155 echo "$as_me:21155: \$? = $ac_status" >&5
21156 (exit $ac_status); } &&
21157 { ac_try='test -s conftest.$ac_objext'
21158 { (eval echo "$as_me:21158: \"$ac_try\"") >&5
21159 (eval $ac_try) 2>&5
21160 ac_status=$?
21161 echo "$as_me:21161: \$? = $ac_status" >&5
21162 (exit $ac_status); }; }; then
21163 ac_hi=$ac_mid; break
21164 else
21165 echo "$as_me: failed program was:" >&5
21166 cat conftest.$ac_ext >&5
21167 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21169 rm -f conftest.$ac_objext conftest.$ac_ext
21170 done
21171 else
21172 echo "$as_me: failed program was:" >&5
21173 cat conftest.$ac_ext >&5
21174 ac_hi=-1 ac_mid=-1
21175 while :; do
21176 cat >conftest.$ac_ext <<_ACEOF
21177 #line 21177 "configure"
21178 #include "confdefs.h"
21179 $ac_includes_default
21181 main ()
21183 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21185 return 0;
21187 _ACEOF
21188 rm -f conftest.$ac_objext
21189 if { (eval echo "$as_me:21189: \"$ac_compile\"") >&5
21190 (eval $ac_compile) 2>&5
21191 ac_status=$?
21192 echo "$as_me:21192: \$? = $ac_status" >&5
21193 (exit $ac_status); } &&
21194 { ac_try='test -s conftest.$ac_objext'
21195 { (eval echo "$as_me:21195: \"$ac_try\"") >&5
21196 (eval $ac_try) 2>&5
21197 ac_status=$?
21198 echo "$as_me:21198: \$? = $ac_status" >&5
21199 (exit $ac_status); }; }; then
21200 ac_lo=$ac_mid; break
21201 else
21202 echo "$as_me: failed program was:" >&5
21203 cat conftest.$ac_ext >&5
21204 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21206 rm -f conftest.$ac_objext conftest.$ac_ext
21207 done
21209 rm -f conftest.$ac_objext conftest.$ac_ext
21210 # Binary search between lo and hi bounds.
21211 while test "x$ac_lo" != "x$ac_hi"; do
21212 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21213 cat >conftest.$ac_ext <<_ACEOF
21214 #line 21214 "configure"
21215 #include "confdefs.h"
21216 $ac_includes_default
21218 main ()
21220 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21222 return 0;
21224 _ACEOF
21225 rm -f conftest.$ac_objext
21226 if { (eval echo "$as_me:21226: \"$ac_compile\"") >&5
21227 (eval $ac_compile) 2>&5
21228 ac_status=$?
21229 echo "$as_me:21229: \$? = $ac_status" >&5
21230 (exit $ac_status); } &&
21231 { ac_try='test -s conftest.$ac_objext'
21232 { (eval echo "$as_me:21232: \"$ac_try\"") >&5
21233 (eval $ac_try) 2>&5
21234 ac_status=$?
21235 echo "$as_me:21235: \$? = $ac_status" >&5
21236 (exit $ac_status); }; }; then
21237 ac_hi=$ac_mid
21238 else
21239 echo "$as_me: failed program was:" >&5
21240 cat conftest.$ac_ext >&5
21241 ac_lo=`expr $ac_mid + 1`
21243 rm -f conftest.$ac_objext conftest.$ac_ext
21244 done
21245 ac_cv_sizeof_wchar_t=$ac_lo
21246 else
21247 if test "$cross_compiling" = yes; then
21248 { { echo "$as_me:21248: error: cannot run test program while cross compiling" >&5
21249 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21250 { (exit 1); exit 1; }; }
21251 else
21252 cat >conftest.$ac_ext <<_ACEOF
21253 #line 21253 "configure"
21254 #include "confdefs.h"
21255 $ac_includes_default
21257 main ()
21259 FILE *f = fopen ("conftest.val", "w");
21260 if (!f)
21261 $ac_main_return (1);
21262 fprintf (f, "%d", (sizeof (wchar_t)));
21263 fclose (f);
21265 return 0;
21267 _ACEOF
21268 rm -f conftest$ac_exeext
21269 if { (eval echo "$as_me:21269: \"$ac_link\"") >&5
21270 (eval $ac_link) 2>&5
21271 ac_status=$?
21272 echo "$as_me:21272: \$? = $ac_status" >&5
21273 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21274 { (eval echo "$as_me:21274: \"$ac_try\"") >&5
21275 (eval $ac_try) 2>&5
21276 ac_status=$?
21277 echo "$as_me:21277: \$? = $ac_status" >&5
21278 (exit $ac_status); }; }; then
21279 ac_cv_sizeof_wchar_t=`cat conftest.val`
21280 else
21281 echo "$as_me: program exited with status $ac_status" >&5
21282 echo "$as_me: failed program was:" >&5
21283 cat conftest.$ac_ext >&5
21285 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21288 rm -f conftest.val
21289 else
21290 ac_cv_sizeof_wchar_t=0
21293 echo "$as_me:21293: result: $ac_cv_sizeof_wchar_t" >&5
21294 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21295 cat >>confdefs.h <<EOF
21296 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21301 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21302 ### none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21304 ### ticlib modules may be a separate library, otherwise contained in termlib.
21305 ### termlib modules may be a separate library, otherwise contained in ncurses.
21307 ### The of "+" or " " between the tokens controls the way the script
21308 ### chooses to split module lists into libraries.
21310 ### (see CF_LIB_RULES).
21311 echo "$as_me:21311: checking for library subsets" >&5
21312 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21313 LIB_SUBSETS=
21315 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21316 LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21317 if test "$with_ticlib" != no ; then
21318 LIB_SUBSETS="${LIB_SUBSETS} "
21319 else
21320 LIB_SUBSETS="${LIB_SUBSETS}+"
21324 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21325 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21327 if test "$with_termlib" != no ; then
21328 LIB_SUBSETS="${LIB_SUBSETS} "
21329 else
21330 LIB_SUBSETS="${LIB_SUBSETS}+"
21333 LIB_SUBSETS="${LIB_SUBSETS}base"
21335 # Most term-driver calls are to tinfo, but some like init_pair are to the
21336 # base library (so it resides in base).
21337 if test "$with_term_driver" != no ; then
21338 LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21339 case $cf_cv_system_name in
21340 (*mingw32*|*mingw64*)
21341 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21342 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21345 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21347 esac
21350 test "x$with_widec" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21351 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21353 echo "$as_me:21353: result: $LIB_SUBSETS" >&5
21354 echo "${ECHO_T}$LIB_SUBSETS" >&6
21356 ### Construct the list of include-directories to be generated
21358 if test "$srcdir" != "."; then
21359 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21361 CPPFLAGS="-I../include $CPPFLAGS"
21362 if test "$srcdir" != "."; then
21363 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21365 CPPFLAGS="-I. $CPPFLAGS"
21367 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21368 if test "$srcdir" != "."; then
21369 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21371 if test "$GCC" != yes; then
21372 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21373 elif test "$includedir" != "/usr/include"; then
21374 if test "$includedir" = '${prefix}/include' ; then
21375 if test x$prefix != x/usr ; then
21376 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21378 else
21379 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21383 ### Build up pieces for makefile rules
21384 echo "$as_me:21384: checking default library suffix" >&5
21385 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21387 case $DFT_LWR_MODEL in
21388 (libtool) DFT_ARG_SUFFIX='' ;;
21389 (normal) DFT_ARG_SUFFIX='' ;;
21390 (debug) DFT_ARG_SUFFIX='_g' ;;
21391 (profile) DFT_ARG_SUFFIX='_p' ;;
21392 (shared) DFT_ARG_SUFFIX='' ;;
21393 esac
21394 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21395 echo "$as_me:21395: result: $DFT_ARG_SUFFIX" >&5
21396 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21398 echo "$as_me:21398: checking default library-dependency suffix" >&5
21399 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21401 case X$DFT_LWR_MODEL in
21402 (Xlibtool)
21403 DFT_LIB_SUFFIX='.la'
21404 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21406 (Xdebug)
21407 DFT_LIB_SUFFIX='_g.a'
21408 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21410 (Xprofile)
21411 DFT_LIB_SUFFIX='_p.a'
21412 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21414 (Xshared)
21415 case $cf_cv_system_name in
21416 (aix[5-7]*)
21417 DFT_LIB_SUFFIX='.so'
21418 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21420 (cygwin*|msys*|mingw*)
21421 DFT_LIB_SUFFIX='.dll'
21422 DFT_DEP_SUFFIX='.dll.a'
21424 (darwin*)
21425 DFT_LIB_SUFFIX='.dylib'
21426 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21428 (hpux*)
21429 case $target in
21430 (ia64*)
21431 DFT_LIB_SUFFIX='.so'
21432 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21435 DFT_LIB_SUFFIX='.sl'
21436 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21438 esac
21441 DFT_LIB_SUFFIX='.so'
21442 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21444 esac
21447 DFT_LIB_SUFFIX='.a'
21448 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21450 esac
21451 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21452 then
21453 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21454 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21456 echo "$as_me:21456: result: $DFT_DEP_SUFFIX" >&5
21457 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21459 echo "$as_me:21459: checking default object directory" >&5
21460 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21462 case $DFT_LWR_MODEL in
21463 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
21464 (normal) DFT_OBJ_SUBDIR='objects' ;;
21465 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
21466 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21467 (shared)
21468 case $cf_cv_system_name in
21469 (cygwin|msys)
21470 DFT_OBJ_SUBDIR='objects' ;;
21472 DFT_OBJ_SUBDIR='obj_s' ;;
21473 esac
21474 esac
21475 echo "$as_me:21475: result: $DFT_OBJ_SUBDIR" >&5
21476 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21478 if test "x$cf_with_cxx" = xyes ; then
21479 echo "$as_me:21479: checking c++ library-dependency suffix" >&5
21480 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21481 if test "$with_libtool" != "no"; then
21482 # libtool thinks it can make c++ shared libraries (perhaps only g++)
21483 CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21484 elif test "$with_shared_cxx" != "no"; then
21485 # also for g++ users...
21486 CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21487 else
21488 # we normally make a static library because C/C++ library rules differ
21490 case Xnormal in
21491 (Xlibtool)
21492 CXX_LIB_SUFFIX='.la'
21493 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21495 (Xdebug)
21496 CXX_LIB_SUFFIX='_g.a'
21497 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21499 (Xprofile)
21500 CXX_LIB_SUFFIX='_p.a'
21501 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21503 (Xshared)
21504 case $cf_cv_system_name in
21505 (aix[5-7]*)
21506 CXX_LIB_SUFFIX='.so'
21507 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21509 (cygwin*|msys*|mingw*)
21510 CXX_LIB_SUFFIX='.dll'
21511 CXX_DEP_SUFFIX='.dll.a'
21513 (darwin*)
21514 CXX_LIB_SUFFIX='.dylib'
21515 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21517 (hpux*)
21518 case $target in
21519 (ia64*)
21520 CXX_LIB_SUFFIX='.so'
21521 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21524 CXX_LIB_SUFFIX='.sl'
21525 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21527 esac
21530 CXX_LIB_SUFFIX='.so'
21531 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21533 esac
21536 CXX_LIB_SUFFIX='.a'
21537 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21539 esac
21540 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21541 then
21542 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21543 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21547 echo "$as_me:21547: result: $CXX_LIB_SUFFIX" >&5
21548 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21552 # do not want -ldl in build except as needed for -lncurses dependency
21553 if test "x$with_dlsym" = xyes ; then
21554 if test $DFT_LWR_MODEL = shared || \
21555 test $DFT_LWR_MODEL = libtool ; then
21557 # remove dl library from $LIBS
21558 LIBS=`echo "$LIBS" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'`
21562 ### Set up low-level terminfo dependencies for makefiles.
21564 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21565 # do not need libdl
21566 TICS_LIST=
21567 if test "x$with_dlsym" = xyes ; then
21569 # remove dl library from $SHLIB_LIST
21570 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'`
21574 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21575 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21576 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21577 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21578 then
21579 USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21582 if test "$with_ticlib" != no ; then
21584 if test "x$with_ticlib" != xyes ; then
21585 TICS_NAME=$with_ticlib
21586 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21587 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21588 TICS_LIB_SUFFIX="${with_ticlib}"
21589 else
21590 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21591 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21592 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21594 TICS_LDFLAGS="-L${LIB_DIR}"
21595 TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21596 else
21597 TICS_LDFLAGS="-L${LIB_DIR}"
21598 TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21601 if test "$with_termlib" != no ; then
21603 if test "x$with_termlib" != xyes ; then
21604 TINFO_NAME=$with_termlib
21605 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21606 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21607 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21608 TINFO_LIB_SUFFIX="${with_termlib}"
21609 else
21610 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21611 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21612 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21613 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21616 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21617 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21618 if test "$DFT_LWR_MODEL" = "libtool"; then
21619 TEST_ARGS="${TEST_DEPS}"
21620 TEST_ARG2="${TEST_DEP2}"
21621 TINFO_LDFLAGS="-L${LIB_DIR}"
21622 TINFO_LIBS="$TEST_ARGS"
21623 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21624 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21625 else
21626 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21627 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21628 if test "x$with_term_driver" != xno ; then
21629 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21630 TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21631 TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21632 else
21633 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21634 TINFO_LIBS="$TEST_ARGS"
21636 TINFO_LDFLAGS="-L${LIB_DIR}"
21637 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21639 else
21640 # the next lines are needed for linking libtic over libncurses
21641 TINFO_NAME=${LIB_NAME}
21642 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21643 TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21644 if test "x$with_tic_depends" = xyes ; then
21645 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21646 else
21647 TICS_LIST="$SHLIB_LIST"
21650 TINFO_LDFLAGS="-L${LIB_DIR}"
21651 TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21654 if test "$DFT_LWR_MODEL" = shared ; then
21655 case $cf_cv_system_name in
21656 (cygwin*|msys*)
21657 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21658 TINFO_SUFFIX=.dll
21660 esac
21663 if test "x$with_dlsym" = xyes ; then
21665 # remove dl library from $TICS_LIST
21666 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'`
21670 if test "$DFT_LWR_MODEL" = "libtool"; then
21671 OBJEXT=lo
21674 # needed for Ada95
21675 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21677 case $DFT_LWR_MODEL in
21678 (normal|debug|profile)
21680 if test "$GCC" = yes ; then
21681 case $cf_cv_system_name in
21682 (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
21683 LDFLAGS_STATIC=
21684 LDFLAGS_SHARED=
21686 (*) # normally, except when broken
21687 LDFLAGS_STATIC=-static
21688 LDFLAGS_SHARED=-dynamic
21690 esac
21691 else
21692 case $cf_cv_system_name in
21693 (aix[4-7]*) # from ld manpage
21694 LDFLAGS_STATIC=-bstatic
21695 LDFLAGS_SHARED=-bdynamic
21697 (hpux*) # from ld manpage for hpux10.20, hpux11.11
21698 # We could also use just "archive" and "shared".
21699 LDFLAGS_STATIC=-Wl,-a,archive_shared
21700 LDFLAGS_SHARED=-Wl,-a,shared_archive
21702 (irix*) # from ld manpage IRIX64
21703 LDFLAGS_STATIC=-Bstatic
21704 LDFLAGS_SHARED=-Bdynamic
21706 (osf[45]*) # from ld manpage osf4.0d, osf5.1
21707 # alternative "-oldstyle_liblookup" (not in cc manpage)
21708 LDFLAGS_STATIC=-noso
21709 LDFLAGS_SHARED=-so_archive
21711 (solaris2*)
21712 LDFLAGS_STATIC=-Bstatic
21713 LDFLAGS_SHARED=-Bdynamic
21715 esac
21718 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21719 then
21720 echo "$as_me:21720: checking if linker supports switching between static/dynamic" >&5
21721 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21723 rm -f libconftest.a
21724 cat >conftest.$ac_ext <<EOF
21725 #line 21725 "configure"
21726 #include <stdio.h>
21727 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21729 if { (eval echo "$as_me:21729: \"$ac_compile\"") >&5
21730 (eval $ac_compile) 2>&5
21731 ac_status=$?
21732 echo "$as_me:21732: \$? = $ac_status" >&5
21733 (exit $ac_status); } ; then
21734 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21735 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21737 rm -f conftest.*
21739 cf_save_LIBS="$LIBS"
21741 LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21742 cat >conftest.$ac_ext <<_ACEOF
21743 #line 21743 "configure"
21744 #include "confdefs.h"
21746 #line 21746 "configure"
21747 #include <stdio.h>
21748 int cf_ldflags_static(FILE *fp);
21751 main ()
21754 return cf_ldflags_static(stdin);
21757 return 0;
21759 _ACEOF
21760 rm -f conftest.$ac_objext conftest$ac_exeext
21761 if { (eval echo "$as_me:21761: \"$ac_link\"") >&5
21762 (eval $ac_link) 2>&5
21763 ac_status=$?
21764 echo "$as_me:21764: \$? = $ac_status" >&5
21765 (exit $ac_status); } &&
21766 { ac_try='test -s conftest$ac_exeext'
21767 { (eval echo "$as_me:21767: \"$ac_try\"") >&5
21768 (eval $ac_try) 2>&5
21769 ac_status=$?
21770 echo "$as_me:21770: \$? = $ac_status" >&5
21771 (exit $ac_status); }; }; then
21773 # some linkers simply ignore the -dynamic
21774 case x`file conftest$ac_exeext 2>/dev/null` in
21775 (*static*)
21776 cf_ldflags_static=no
21779 cf_ldflags_static=yes
21781 esac
21783 else
21784 echo "$as_me: failed program was:" >&5
21785 cat conftest.$ac_ext >&5
21786 cf_ldflags_static=no
21788 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21790 rm -f libconftest.*
21791 LIBS="$cf_save_LIBS"
21793 echo "$as_me:21793: result: $cf_ldflags_static" >&5
21794 echo "${ECHO_T}$cf_ldflags_static" >&6
21796 if test $cf_ldflags_static != yes
21797 then
21798 LDFLAGS_STATIC=
21799 LDFLAGS_SHARED=
21801 else
21802 LDFLAGS_STATIC=
21803 LDFLAGS_SHARED=
21807 esac
21809 echo "$as_me:21809: checking where we will install curses.h" >&5
21810 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21812 includesubdir=
21813 if test "$with_overwrite" = no && \
21814 ( test "x$includedir" = 'x${prefix}/include' || \
21815 test "x$includedir" = "x${prefix}/include" )
21816 then
21817 includesubdir="/ncurses${USE_LIB_SUFFIX}"
21819 echo "$as_me:21819: result: ${includedir}${includesubdir}" >&5
21820 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21822 ### Resolve a conflict between normal and wide-curses by forcing applications
21823 ### that will need libutf8 to add it to their configure script.
21824 if test "$with_overwrite" != no ; then
21825 if test "$NCURSES_LIBUTF8" = 1 ; then
21826 NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21827 { echo "$as_me:21827: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21828 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21831 WITH_OVERWRITE=$with_overwrite
21833 # used to separate tack out of the tree
21834 NCURSES_TREE=
21836 ### predefined stuff for the test programs
21838 cat >>confdefs.h <<\EOF
21839 #define HAVE_SLK_COLOR 1
21842 ### Construct the list of subdirectories for which we'll customize makefiles
21843 ### with the appropriate compile-rules.
21845 echo "$as_me:21845: checking for src modules" >&5
21846 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21848 # dependencies and linker-arguments for test-programs
21849 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21850 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21851 if test "$DFT_LWR_MODEL" = "libtool"; then
21852 TEST_ARGS="${TEST_DEPS}"
21853 TEST_ARG2="${TEST_DEP2}"
21854 else
21855 TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21856 TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
21859 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
21860 cf_cv_src_modules=
21861 for cf_dir in $modules_to_build
21863 if test -f $srcdir/$cf_dir/modules; then
21865 # We may/may not have tack in the distribution, though the
21866 # makefile is.
21867 if test $cf_dir = tack ; then
21868 if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21869 continue
21873 if test -z "$cf_cv_src_modules"; then
21874 cf_cv_src_modules=$cf_dir
21875 else
21876 cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21879 # Make the ncurses_cfg.h file record the library interface files as
21880 # well. These are header files that are the same name as their
21881 # directory. Ncurses is the only library that does not follow
21882 # that pattern.
21883 if test $cf_dir = tack ; then
21884 continue
21885 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21887 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21889 cat >>confdefs.h <<EOF
21890 #define HAVE_${cf_have_include}_H 1
21893 cat >>confdefs.h <<EOF
21894 #define HAVE_LIB${cf_have_include} 1
21897 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21898 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21899 if test "$DFT_LWR_MODEL" = "libtool"; then
21900 TEST_ARGS="${TEST_DEPS}"
21901 TEST_ARG2="${TEST_DEP2}"
21902 else
21903 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
21904 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
21906 PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
21909 done
21910 echo "$as_me:21910: result: $cf_cv_src_modules" >&5
21911 echo "${ECHO_T}$cf_cv_src_modules" >&6
21913 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21914 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21916 SRC_SUBDIRS=
21917 if test "x$cf_with_manpages" != xno ; then
21918 SRC_SUBDIRS="$SRC_SUBDIRS man"
21920 SRC_SUBDIRS="$SRC_SUBDIRS include"
21921 for cf_dir in $cf_cv_src_modules
21923 SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21924 done
21925 if test "x$cf_with_tests" != "xno" ; then
21926 SRC_SUBDIRS="$SRC_SUBDIRS test"
21928 # always make this, to install the ncurses-config script
21929 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21930 if test "$cf_with_cxx_binding" != no; then
21931 PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
21932 SRC_SUBDIRS="$SRC_SUBDIRS c++"
21935 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21936 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21938 ADA_SUBDIRS=
21939 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21940 SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21941 ADA_SUBDIRS="gen src"
21942 if test "x$cf_with_tests" != "xno" ; then
21943 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21947 SUB_MAKEFILES=
21948 for cf_dir in $SRC_SUBDIRS
21950 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21951 done
21953 if test -n "$ADA_SUBDIRS"; then
21954 for cf_dir in $ADA_SUBDIRS
21956 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21957 done
21961 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21962 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21963 SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
21966 DIRS_TO_MAKE="lib"
21967 for cf_item in $cf_list_models
21970 case $cf_item in
21971 (libtool) cf_subdir='obj_lo' ;;
21972 (normal) cf_subdir='objects' ;;
21973 (debug) cf_subdir='obj_g' ;;
21974 (profile) cf_subdir='obj_p' ;;
21975 (shared)
21976 case $cf_cv_system_name in
21977 (cygwin|msys)
21978 cf_subdir='objects' ;;
21980 cf_subdir='obj_s' ;;
21981 esac
21982 esac
21984 for cf_item2 in $DIRS_TO_MAKE
21986 test $cf_item2 = $cf_subdir && break
21987 done
21988 test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21989 done
21990 for cf_dir in $DIRS_TO_MAKE
21992 test ! -d $cf_dir && mkdir $cf_dir
21993 done
21995 # symbols that differ when compiling Ada95 by itself.
21996 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
21998 # values to use as strings
22000 cat >>confdefs.h <<EOF
22001 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22004 cat >>confdefs.h <<EOF
22005 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22008 ### Now that we're done running tests, add the compiler-warnings, if any
22010 cf_fix_cppflags=no
22011 cf_new_cflags=
22012 cf_new_cppflags=
22013 cf_new_extra_cppflags=
22015 for cf_add_cflags in $EXTRA_CFLAGS
22017 case $cf_fix_cppflags in
22018 (no)
22019 case $cf_add_cflags in
22020 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22021 case $cf_add_cflags in
22022 (-D*)
22023 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22025 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22026 && test -z "${cf_tst_cflags}" \
22027 && cf_fix_cppflags=yes
22029 if test $cf_fix_cppflags = yes ; then
22030 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22031 continue
22032 elif test "${cf_tst_cflags}" = "\"'" ; then
22033 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22034 continue
22037 esac
22038 case "$CPPFLAGS" in
22039 (*$cf_add_cflags)
22042 case $cf_add_cflags in
22043 (-D*)
22044 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22046 CPPFLAGS=`echo "$CPPFLAGS" | \
22047 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22048 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22051 esac
22052 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22054 esac
22057 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22059 esac
22061 (yes)
22062 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22064 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22066 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22067 && test -z "${cf_tst_cflags}" \
22068 && cf_fix_cppflags=no
22070 esac
22071 done
22073 if test -n "$cf_new_cflags" ; then
22075 CFLAGS="$CFLAGS $cf_new_cflags"
22078 if test -n "$cf_new_cppflags" ; then
22080 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22083 if test -n "$cf_new_extra_cppflags" ; then
22085 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22088 ### Define substitutions for header files to avoid name-pollution
22090 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22091 HAVE_TCGETATTR=1
22092 else
22093 HAVE_TCGETATTR=0
22096 if test "x$ac_cv_header_stdint_h" = xyes ; then
22097 HAVE_STDINT_H=1
22098 else
22099 HAVE_STDINT_H=0
22102 if test "x$ac_cv_header_termio_h" = xyes ; then
22103 HAVE_TERMIO_H=1
22104 else
22105 HAVE_TERMIO_H=0
22108 if test "x$ac_cv_header_termios_h" = xyes ; then
22109 HAVE_TERMIOS_H=1
22110 else
22111 HAVE_TERMIOS_H=0
22114 ################################################################################
22115 test "x$use_database" = xyes && \
22116 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22118 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22119 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22121 if test "x$enable_pc_files" = xyes ; then \
22122 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22123 MAKE_PC_FILES=
22124 else
22125 MAKE_PC_FILES="#"
22128 # Extract the first word of "tic", so it can be a program name with args.
22129 set dummy tic; ac_word=$2
22130 echo "$as_me:22130: checking for $ac_word" >&5
22131 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22132 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22133 echo $ECHO_N "(cached) $ECHO_C" >&6
22134 else
22135 case $TIC_PATH in
22136 [\\/]* | ?:[\\/]*)
22137 ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22140 ac_save_IFS=$IFS; IFS=$ac_path_separator
22141 ac_dummy="$PATH:/usr/local/ncurses/bin"
22142 for ac_dir in $ac_dummy; do
22143 IFS=$ac_save_IFS
22144 test -z "$ac_dir" && ac_dir=.
22145 if $as_executable_p "$ac_dir/$ac_word"; then
22146 ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22147 echo "$as_me:22147: found $ac_dir/$ac_word" >&5
22148 break
22150 done
22152 test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22154 esac
22156 TIC_PATH=$ac_cv_path_TIC_PATH
22158 if test -n "$TIC_PATH"; then
22159 echo "$as_me:22159: result: $TIC_PATH" >&5
22160 echo "${ECHO_T}$TIC_PATH" >&6
22161 else
22162 echo "$as_me:22162: result: no" >&5
22163 echo "${ECHO_T}no" >&6
22166 if test -n "$FALLBACK_LIST"
22167 then
22168 if test "$TIC_PATH" = unknown
22169 then
22170 { echo "$as_me:22170: WARNING: no tic program found for fallbacks" >&5
22171 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22175 if test "x$cf_with_tests" != xno ; then
22176 MAKE_TESTS=
22177 else
22178 MAKE_TESTS="#"
22181 ADAHTML_DIR=../../doc/html/ada
22183 # these could be configurable, but are not currently
22184 PANEL_NAME=panel
22185 MENU_NAME=menu
22186 FORM_NAME=form
22187 CXX_NAME=ncurses++
22189 # workaround for g++ versus Solaris (20131116)
22190 case $cf_cv_system_name in
22191 (solaris2*)
22192 case "x$CPPFLAGS" in
22193 (*-D_XOPEN_SOURCE_EXTENDED*)
22194 test -n "$verbose" && echo " moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22196 echo "${as_me:-configure}:22196: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22198 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22199 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22201 esac
22203 esac
22205 # Help to automatically enable the extended curses features when using either
22206 # the *-config or the ".pc" files by adding defines.
22207 echo "$as_me:22207: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22208 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22209 PKG_CFLAGS=
22210 for cf_loop1 in $CPPFLAGS_after_XOPEN
22212 cf_found=no
22213 for cf_loop2 in $CPPFLAGS_before_XOPEN
22215 if test "x$cf_loop1" = "x$cf_loop2"
22216 then
22217 cf_found=yes
22218 break
22220 done
22221 test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22222 done
22223 echo "$as_me:22223: result: $PKG_CFLAGS" >&5
22224 echo "${ECHO_T}$PKG_CFLAGS" >&6
22226 # AC_CHECK_SIZEOF demands a literal parameter, no variables. So we do this.
22227 case "x$NCURSES_OSPEED" in
22228 (*short*)
22229 cf_compatible=1
22232 cf_compatible=0
22234 esac
22236 cat >>confdefs.h <<EOF
22237 #define NCURSES_OSPEED_COMPAT $cf_compatible
22240 case "x$cf_cv_typeof_chtype" in
22241 (xshort|xint|xlong)
22242 cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22244 esac
22246 case "x$cf_cv_typeof_mmask_t" in
22247 (xshort|xint|xlong)
22248 cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22250 esac
22252 # substitute into misc/Makefile to suppress
22253 # (un)install.data from the
22254 # (un)install rules.
22255 if test "x$cf_with_db_install" = "xno"; then
22256 MISC_INSTALL_DATA=
22257 MISC_UNINSTALL_DATA=
22258 else
22259 MISC_INSTALL_DATA=install.data
22260 MISC_UNINSTALL_DATA=uninstall.data
22263 SUB_SCRIPTS=
22265 if test -n "$PACKAGE"
22266 then
22267 PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22268 export PACKAGE
22269 echo "package: $PACKAGE"
22272 UNALTERED_SYMS=
22273 cf_filter_syms=no
22275 if test -n "$RESULTING_SYMS"
22276 then
22277 cf_filter_syms=$cf_dft_filter_syms
22278 test -n "$verbose" && echo " will map symbols to ABI=$cf_cv_abi_version" 1>&6
22280 echo "${as_me:-configure}:22280: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22284 if test "x$WILDCARD_SYMS" = xno
22285 then
22286 cf_filter_syms=yes
22289 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22290 if test $cf_filter_syms = yes
22291 then
22292 RESULTING_SYMS=resulting.map
22295 if test "x$cross_compiling" = xyes ; then
22296 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22297 else
22298 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22301 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
22302 ac_config_commands="$ac_config_commands default"
22303 cat >confcache <<\_ACEOF
22304 # This file is a shell script that caches the results of configure
22305 # tests run on this system so they can be shared between configure
22306 # scripts and configure runs, see configure's option --config-cache.
22307 # It is not useful on other systems. If it contains results you don't
22308 # want to keep, you may remove or edit it.
22310 # config.status only pays attention to the cache file if you give it
22311 # the --recheck option to rerun configure.
22313 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22314 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22315 # following values.
22317 _ACEOF
22319 # The following way of writing the cache mishandles newlines in values,
22320 # but we know of no workaround that is simple, portable, and efficient.
22321 # So, don't put newlines in cache variables' values.
22322 # Ultrix sh set writes to stderr and can't be redirected directly,
22323 # and sets the high bit in the cache file unless we assign to the vars.
22325 (set) 2>&1 |
22326 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22327 *ac_space=\ *)
22328 # `set' does not quote correctly, so add quotes (double-quote
22329 # substitution turns \\\\ into \\, and sed turns \\ into \).
22330 sed -n \
22331 "s/'/'\\\\''/g;
22332 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22335 # `set' quotes correctly as required by POSIX, so do not add quotes.
22336 sed -n \
22337 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22339 esac;
22341 sed '
22342 t clear
22343 : clear
22344 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22345 t end
22346 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22347 : end' >>confcache
22348 if cmp -s $cache_file confcache; then :; else
22349 if test -w $cache_file; then
22350 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22351 cat confcache >$cache_file
22352 else
22353 echo "not updating unwritable cache $cache_file"
22356 rm -f confcache
22358 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22359 # Let make expand exec_prefix.
22360 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22362 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22363 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22364 # trailing colons and then remove the whole line if VPATH becomes empty
22365 # (actually we leave an empty line to preserve line numbers).
22366 if test "x$srcdir" = x.; then
22367 ac_vpsub='/^[ ]*VPATH[ ]*=/{
22368 s/:*\$(srcdir):*/:/;
22369 s/:*\${srcdir}:*/:/;
22370 s/:*@srcdir@:*/:/;
22371 s/^\([^=]*=[ ]*\):*/\1/;
22372 s/:*$//;
22373 s/^[^=]*=[ ]*$//;
22377 DEFS=-DHAVE_CONFIG_H
22379 : ${CONFIG_STATUS=./config.status}
22380 ac_clean_files_save=$ac_clean_files
22381 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22382 { echo "$as_me:22382: creating $CONFIG_STATUS" >&5
22383 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22384 cat >$CONFIG_STATUS <<_ACEOF
22385 #! $SHELL
22386 # Generated automatically by configure.
22387 # Run this file to recreate the current configuration.
22388 # Compiler output produced by configure, useful for debugging
22389 # configure, is in config.log if it exists.
22391 debug=false
22392 SHELL=\${CONFIG_SHELL-$SHELL}
22393 ac_cs_invocation="\$0 \$@"
22395 _ACEOF
22397 cat >>$CONFIG_STATUS <<\_ACEOF
22398 # Be Bourne compatible
22399 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22400 emulate sh
22401 NULLCMD=:
22402 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22403 set -o posix
22406 # Name of the executable.
22407 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22409 if expr a : '\(a\)' >/dev/null 2>&1; then
22410 as_expr=expr
22411 else
22412 as_expr=false
22415 rm -f conf$$ conf$$.exe conf$$.file
22416 echo >conf$$.file
22417 if ln -s conf$$.file conf$$ 2>/dev/null; then
22418 # We could just check for DJGPP; but this test a) works b) is more generic
22419 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22420 if test -f conf$$.exe; then
22421 # Don't use ln at all; we don't have any links
22422 as_ln_s='cp -p'
22423 else
22424 as_ln_s='ln -s'
22426 elif ln conf$$.file conf$$ 2>/dev/null; then
22427 as_ln_s=ln
22428 else
22429 as_ln_s='cp -p'
22431 rm -f conf$$ conf$$.exe conf$$.file
22433 as_executable_p="test -f"
22435 # Support unset when possible.
22436 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22437 as_unset=unset
22438 else
22439 as_unset=false
22442 # NLS nuisances.
22443 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22444 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22445 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22446 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22447 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22448 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22449 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22450 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22452 # IFS
22453 # We need space, tab and new line, in precisely that order.
22454 as_nl='
22456 IFS=" $as_nl"
22458 # CDPATH.
22459 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22461 exec 6>&1
22463 _ACEOF
22465 # Files that config.status was made for.
22466 if test -n "$ac_config_files"; then
22467 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22470 if test -n "$ac_config_headers"; then
22471 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22474 if test -n "$ac_config_links"; then
22475 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22478 if test -n "$ac_config_commands"; then
22479 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22482 cat >>$CONFIG_STATUS <<\EOF
22484 ac_cs_usage="\
22485 \`$as_me' instantiates files from templates according to the
22486 current configuration.
22488 Usage: $0 [OPTIONS] [FILE]...
22490 -h, --help print this help, then exit
22491 -V, --version print version number, then exit
22492 -d, --debug don't remove temporary files
22493 --recheck update $as_me by reconfiguring in the same conditions
22494 --file=FILE[:TEMPLATE]
22495 instantiate the configuration file FILE
22496 --header=FILE[:TEMPLATE]
22497 instantiate the configuration header FILE
22499 Configuration files:
22500 $config_files
22502 Configuration headers:
22503 $config_headers
22505 Configuration commands:
22506 $config_commands
22508 Report bugs to <dickey@invisible-island.net>."
22511 cat >>$CONFIG_STATUS <<EOF
22512 ac_cs_version="\\
22513 config.status
22514 configured by $0, generated by GNU Autoconf 2.52.20141204,
22515 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22517 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22518 Free Software Foundation, Inc.
22519 This config.status script is free software; the Free Software Foundation
22520 gives unlimited permission to copy, distribute and modify it."
22521 srcdir=$srcdir
22522 INSTALL="$INSTALL"
22525 cat >>$CONFIG_STATUS <<\EOF
22526 # If no file are specified by the user, then we need to provide default
22527 # value. By we need to know if files were specified by the user.
22528 ac_need_defaults=:
22529 while test $# != 0
22531 case $1 in
22532 --*=*)
22533 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22534 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22535 shift
22536 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22537 shift
22539 -*);;
22540 *) # This is not an option, so the user has probably given explicit
22541 # arguments.
22542 ac_need_defaults=false;;
22543 esac
22545 case $1 in
22546 # Handling of the options.
22548 cat >>$CONFIG_STATUS <<EOF
22549 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22550 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22551 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22553 cat >>$CONFIG_STATUS <<\EOF
22554 --version | --vers* | -V )
22555 echo "$ac_cs_version"; exit 0 ;;
22556 --he | --h)
22557 # Conflict between --help and --header
22558 { { echo "$as_me:22558: error: ambiguous option: $1
22559 Try \`$0 --help' for more information." >&5
22560 echo "$as_me: error: ambiguous option: $1
22561 Try \`$0 --help' for more information." >&2;}
22562 { (exit 1); exit 1; }; };;
22563 --help | --hel | -h )
22564 echo "$ac_cs_usage"; exit 0 ;;
22565 --debug | --d* | -d )
22566 debug=: ;;
22567 --file | --fil | --fi | --f )
22568 shift
22569 CONFIG_FILES="$CONFIG_FILES $1"
22570 ac_need_defaults=false;;
22571 --header | --heade | --head | --hea )
22572 shift
22573 CONFIG_HEADERS="$CONFIG_HEADERS $1"
22574 ac_need_defaults=false;;
22576 # This is an error.
22577 -*) { { echo "$as_me:22577: error: unrecognized option: $1
22578 Try \`$0 --help' for more information." >&5
22579 echo "$as_me: error: unrecognized option: $1
22580 Try \`$0 --help' for more information." >&2;}
22581 { (exit 1); exit 1; }; } ;;
22583 *) ac_config_targets="$ac_config_targets $1" ;;
22585 esac
22586 shift
22587 done
22589 exec 5>>config.log
22590 cat >&5 << _ACEOF
22592 ## ----------------------- ##
22593 ## Running config.status. ##
22594 ## ----------------------- ##
22596 This file was extended by $as_me 2.52.20141204, executed with
22597 CONFIG_FILES = $CONFIG_FILES
22598 CONFIG_HEADERS = $CONFIG_HEADERS
22599 CONFIG_LINKS = $CONFIG_LINKS
22600 CONFIG_COMMANDS = $CONFIG_COMMANDS
22601 > $ac_cs_invocation
22602 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22604 _ACEOF
22607 cat >>$CONFIG_STATUS <<EOF
22609 # INIT-COMMANDS section.
22612 ### Special initialization commands, used to pass information from the
22613 ### configuration-run into config.status
22615 AWK="$AWK"
22616 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22617 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22618 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22619 ECHO_LD="$ECHO_LD"
22620 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22621 LDCONFIG="$LDCONFIG"
22622 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22623 LIB_NAME="$LIB_NAME"
22624 LIB_PREFIX="$LIB_PREFIX"
22625 LIB_SUBSETS="$LIB_SUBSETS"
22626 LIB_SUFFIX="$LIB_SUFFIX"
22627 LIB_TRACING="$LIB_TRACING"
22628 LN_S="$LN_S"
22629 MAKE_TERMINFO="$MAKE_TERMINFO"
22630 NCURSES_MAJOR="$NCURSES_MAJOR"
22631 NCURSES_MINOR="$NCURSES_MINOR"
22632 NCURSES_OSPEED="$NCURSES_OSPEED"
22633 NCURSES_PATCH="$NCURSES_PATCH"
22634 SRC_SUBDIRS="$SRC_SUBDIRS"
22635 TERMINFO="$TERMINFO"
22636 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22637 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22638 TICS_NAME="$TICS_NAME"
22639 TIC_PATH="$TIC_PATH"
22640 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22641 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22642 TINFO_NAME="$TINFO_NAME"
22643 TINFO_SUFFIX="$TINFO_SUFFIX"
22644 UNALTERED_SYMS="$UNALTERED_SYMS"
22645 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22646 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22647 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22648 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22649 WILDCARD_SYMS="$WILDCARD_SYMS"
22650 WITH_CURSES_H="$with_curses_h"
22651 WITH_ECHO="${enable_echo:=yes}"
22652 WITH_OVERWRITE="$with_overwrite"
22653 cf_LIST_MODELS="$cf_list_models"
22654 cf_cv_abi_version="$cf_cv_abi_version"
22655 cf_cv_do_relink="$cf_cv_do_relink"
22656 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22657 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22658 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22659 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22660 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22661 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22662 cf_cv_rel_version="$cf_cv_rel_version"
22663 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22664 cf_cv_shared_soname='$cf_cv_shared_soname'
22665 cf_cv_shlib_version="$cf_cv_shlib_version"
22666 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22667 cf_cv_system_name="$cf_cv_system_name"
22668 cf_cv_term_driver="$with_term_driver"
22669 cf_with_ada="$cf_with_ada"
22670 cf_with_cxx_binding="$cf_with_cxx_binding"
22671 cf_with_db_install="$cf_with_db_install"
22672 cf_with_manpages="$cf_with_manpages"
22673 cf_with_tests="$cf_with_tests"
22674 host="$host"
22675 target="$target"
22676 with_shared_cxx="$with_shared_cxx"
22680 cat >>$CONFIG_STATUS <<\EOF
22681 for ac_config_target in $ac_config_targets
22683 case "$ac_config_target" in
22684 # Handling of arguments.
22685 "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22686 "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22687 "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22688 "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22689 "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22690 "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22691 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22692 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22693 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22694 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22695 *) { { echo "$as_me:22695: error: invalid argument: $ac_config_target" >&5
22696 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22697 { (exit 1); exit 1; }; };;
22698 esac
22699 done
22701 # If the user did not use the arguments to specify the items to instantiate,
22702 # then the envvar interface is used. Set only those that are not.
22703 # We use the long form for the default assignment because of an extremely
22704 # bizarre bug on SunOS 4.1.3.
22705 if $ac_need_defaults; then
22706 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22707 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22708 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22711 # Create a temporary directory, and hook for its removal unless debugging.
22712 $debug ||
22714 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22715 trap '{ (exit 1); exit 1; }' 1 2 13 15
22718 # Create a (secure) tmp directory for tmp files.
22719 : ${TMPDIR=/tmp}
22721 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22722 test -n "$tmp" && test -d "$tmp"
22723 } ||
22725 tmp=$TMPDIR/cs$$-$RANDOM
22726 (umask 077 && mkdir $tmp)
22727 } ||
22729 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22730 { (exit 1); exit 1; }
22735 cat >>$CONFIG_STATUS <<EOF
22738 # CONFIG_FILES section.
22741 # No need to generate the scripts if there are no CONFIG_FILES.
22742 # This happens for instance when ./config.status config.h
22743 if test -n "\$CONFIG_FILES"; then
22744 # Protect against being on the right side of a sed subst in config.status.
22745 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22746 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22747 s,@SHELL@,$SHELL,;t t
22748 s,@exec_prefix@,$exec_prefix,;t t
22749 s,@prefix@,$prefix,;t t
22750 s,@program_transform_name@,$program_transform_name,;t t
22751 s,@bindir@,$bindir,;t t
22752 s,@sbindir@,$sbindir,;t t
22753 s,@libexecdir@,$libexecdir,;t t
22754 s,@datarootdir@,$datarootdir,;t t
22755 s,@datadir@,$datadir,;t t
22756 s,@sysconfdir@,$sysconfdir,;t t
22757 s,@sharedstatedir@,$sharedstatedir,;t t
22758 s,@localstatedir@,$localstatedir,;t t
22759 s,@libdir@,$libdir,;t t
22760 s,@includedir@,$includedir,;t t
22761 s,@oldincludedir@,$oldincludedir,;t t
22762 s,@infodir@,$infodir,;t t
22763 s,@mandir@,$mandir,;t t
22764 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22765 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22766 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22767 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22768 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22769 s,@build_alias@,$build_alias,;t t
22770 s,@host_alias@,$host_alias,;t t
22771 s,@target_alias@,$target_alias,;t t
22772 s,@ECHO_C@,$ECHO_C,;t t
22773 s,@ECHO_N@,$ECHO_N,;t t
22774 s,@ECHO_T@,$ECHO_T,;t t
22775 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22776 s,@DEFS@,$DEFS,;t t
22777 s,@LIBS@,$LIBS,;t t
22778 s,@top_builddir@,$top_builddir,;t t
22779 s,@EGREP@,$EGREP,;t t
22780 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22781 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22782 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22783 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22784 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22785 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22786 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22787 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22788 s,@VERSION@,$VERSION,;t t
22789 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22790 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22791 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22792 s,@PACKAGE@,$PACKAGE,;t t
22793 s,@build@,$build,;t t
22794 s,@build_cpu@,$build_cpu,;t t
22795 s,@build_vendor@,$build_vendor,;t t
22796 s,@build_os@,$build_os,;t t
22797 s,@host@,$host,;t t
22798 s,@host_cpu@,$host_cpu,;t t
22799 s,@host_vendor@,$host_vendor,;t t
22800 s,@host_os@,$host_os,;t t
22801 s,@target@,$target,;t t
22802 s,@target_cpu@,$target_cpu,;t t
22803 s,@target_vendor@,$target_vendor,;t t
22804 s,@target_os@,$target_os,;t t
22805 s,@CC@,$CC,;t t
22806 s,@CFLAGS@,$CFLAGS,;t t
22807 s,@LDFLAGS@,$LDFLAGS,;t t
22808 s,@CPPFLAGS@,$CPPFLAGS,;t t
22809 s,@ac_ct_CC@,$ac_ct_CC,;t t
22810 s,@EXEEXT@,$EXEEXT,;t t
22811 s,@OBJEXT@,$OBJEXT,;t t
22812 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22813 s,@CPP@,$CPP,;t t
22814 s,@LDCONFIG@,$LDCONFIG,;t t
22815 s,@CXX@,$CXX,;t t
22816 s,@CXXFLAGS@,$CXXFLAGS,;t t
22817 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22818 s,@AWK@,$AWK,;t t
22819 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22820 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22821 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22822 s,@LINT@,$LINT,;t t
22823 s,@LINT_OPTS@,$LINT_OPTS,;t t
22824 s,@LN_S@,$LN_S,;t t
22825 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22826 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22827 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22828 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22829 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22830 s,@SET_MAKE@,$SET_MAKE,;t t
22831 s,@CTAGS@,$CTAGS,;t t
22832 s,@ETAGS@,$ETAGS,;t t
22833 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22834 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22835 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22836 s,@RANLIB@,$RANLIB,;t t
22837 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22838 s,@LD@,$LD,;t t
22839 s,@ac_ct_LD@,$ac_ct_LD,;t t
22840 s,@AR@,$AR,;t t
22841 s,@ac_ct_AR@,$ac_ct_AR,;t t
22842 s,@NM@,$NM,;t t
22843 s,@ac_ct_NM@,$ac_ct_NM,;t t
22844 s,@ARFLAGS@,$ARFLAGS,;t t
22845 s,@DESTDIR@,$DESTDIR,;t t
22846 s,@BUILD_CC@,$BUILD_CC,;t t
22847 s,@BUILD_CPP@,$BUILD_CPP,;t t
22848 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22849 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22850 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22851 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22852 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22853 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22854 s,@cf_list_models@,$cf_list_models,;t t
22855 s,@ABI_VERSION@,$ABI_VERSION,;t t
22856 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22857 s,@LIBTOOL@,$LIBTOOL,;t t
22858 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22859 s,@LT_UNDEF@,$LT_UNDEF,;t t
22860 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22861 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22862 s,@LIB_CREATE@,$LIB_CREATE,;t t
22863 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22864 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22865 s,@LIB_PREP@,$LIB_PREP,;t t
22866 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22867 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22868 s,@LIB_LINK@,$LIB_LINK,;t t
22869 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22870 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22871 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22872 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22873 s,@TICS_NAME@,$TICS_NAME,;t t
22874 s,@TINFO_NAME@,$TINFO_NAME,;t t
22875 s,@LIB_NAME@,$LIB_NAME,;t t
22876 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22877 s,@CC_G_OPT@,$CC_G_OPT,;t t
22878 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22879 s,@LD_MODEL@,$LD_MODEL,;t t
22880 s,@shlibdir@,$shlibdir,;t t
22881 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22882 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22883 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22884 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22885 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22886 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22887 s,@LINK_PROGS@,$LINK_PROGS,;t t
22888 s,@LINK_TESTS@,$LINK_TESTS,;t t
22889 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22890 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22891 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22892 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22893 s,@RPATH_LIST@,$RPATH_LIST,;t t
22894 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22895 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22896 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22897 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
22898 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22899 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
22900 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22901 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22902 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22903 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22904 s,@XTERM_KBS@,$XTERM_KBS,;t t
22905 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22906 s,@TERMINFO@,$TERMINFO,;t t
22907 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22908 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22909 s,@TERMPATH@,$TERMPATH,;t t
22910 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22911 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22912 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22913 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22914 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22915 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22916 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22917 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22918 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22919 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22920 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22921 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22922 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22923 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22924 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22925 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22926 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22927 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22928 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22929 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22930 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22931 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22932 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22933 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22934 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22935 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22936 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22937 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22938 s,@PTHREAD@,$PTHREAD,;t t
22939 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22940 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22941 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22942 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22943 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22944 s,@ECHO_LT@,$ECHO_LT,;t t
22945 s,@ECHO_LD@,$ECHO_LD,;t t
22946 s,@RULE_CC@,$RULE_CC,;t t
22947 s,@SHOW_CC@,$SHOW_CC,;t t
22948 s,@ECHO_CC@,$ECHO_CC,;t t
22949 s,@ECHO_LINK@,$ECHO_LINK,;t t
22950 s,@ADAFLAGS@,$ADAFLAGS,;t t
22951 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22952 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22953 s,@ADA_TRACE@,$ADA_TRACE,;t t
22954 s,@MATH_LIB@,$MATH_LIB,;t t
22955 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22956 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22957 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22958 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22959 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22960 s,@TEST_LIBS@,$TEST_LIBS,;t t
22961 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22962 s,@CXXCPP@,$CXXCPP,;t t
22963 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22964 s,@CXX_AR@,$CXX_AR,;t t
22965 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22966 s,@CXXLIBS@,$CXXLIBS,;t t
22967 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22968 s,@gnat_exists@,$gnat_exists,;t t
22969 s,@M4_exists@,$M4_exists,;t t
22970 s,@cf_ada_make@,$cf_ada_make,;t t
22971 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22972 s,@cf_compile_generics@,$cf_compile_generics,;t t
22973 s,@cf_generic_objects@,$cf_generic_objects,;t t
22974 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22975 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22976 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22977 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22978 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22979 s,@cf_ada_package@,$cf_ada_package,;t t
22980 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22981 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22982 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22983 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22984 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22985 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22986 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22987 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22988 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22989 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
22990 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
22991 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
22992 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22993 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22994 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22995 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22996 s,@TICS_LIBS@,$TICS_LIBS,;t t
22997 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22998 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22999 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23000 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23001 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23002 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23003 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23004 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23005 s,@includesubdir@,$includesubdir,;t t
23006 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23007 s,@TICS_LIST@,$TICS_LIST,;t t
23008 s,@TINFO_LIST@,$TINFO_LIST,;t t
23009 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23010 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23011 s,@TEST_ARGS@,$TEST_ARGS,;t t
23012 s,@TEST_DEPS@,$TEST_DEPS,;t t
23013 s,@TEST_ARG2@,$TEST_ARG2,;t t
23014 s,@TEST_DEP2@,$TEST_DEP2,;t t
23015 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23016 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23017 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23018 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23019 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23020 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23021 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23022 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23023 s,@cross_compiling@,$cross_compiling,;t t
23024 s,@TIC_PATH@,$TIC_PATH,;t t
23025 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23026 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23027 s,@PANEL_NAME@,$PANEL_NAME,;t t
23028 s,@MENU_NAME@,$MENU_NAME,;t t
23029 s,@FORM_NAME@,$FORM_NAME,;t t
23030 s,@CXX_NAME@,$CXX_NAME,;t t
23031 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23032 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23033 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23034 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23035 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23036 CEOF
23040 cat >>$CONFIG_STATUS <<\EOF
23041 # Split the substitutions into bite-sized pieces for seds with
23042 # small command number limits, like on Digital OSF/1 and HP-UX.
23043 ac_max_sed_lines=48
23044 ac_sed_frag=1 # Number of current file.
23045 ac_beg=1 # First line for current file.
23046 ac_end=$ac_max_sed_lines # Line after last line for current file.
23047 ac_more_lines=:
23048 ac_sed_cmds=
23049 while $ac_more_lines; do
23050 if test $ac_beg -gt 1; then
23051 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23052 else
23053 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23055 if test ! -s $tmp/subs.frag; then
23056 ac_more_lines=false
23057 else
23058 # The purpose of the label and of the branching condition is to
23059 # speed up the sed processing (if there are no `@' at all, there
23060 # is no need to browse any of the substitutions).
23061 # These are the two extra sed commands mentioned above.
23062 (echo ':t
23063 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23064 if test -z "$ac_sed_cmds"; then
23065 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23066 else
23067 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23069 ac_sed_frag=`expr $ac_sed_frag + 1`
23070 ac_beg=$ac_end
23071 ac_end=`expr $ac_end + $ac_max_sed_lines`
23073 done
23074 if test -z "$ac_sed_cmds"; then
23075 ac_sed_cmds=cat
23077 fi # test -n "$CONFIG_FILES"
23080 cat >>$CONFIG_STATUS <<\EOF
23081 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23082 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23083 case $ac_file in
23084 - | *:- | *:-:* ) # input from stdin
23085 cat >$tmp/stdin
23086 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23087 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23088 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23089 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23090 * ) ac_file_in=$ac_file.in ;;
23091 esac
23093 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23094 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23095 X"$ac_file" : 'X\(//\)[^/]' \| \
23096 X"$ac_file" : 'X\(//\)$' \| \
23097 X"$ac_file" : 'X\(/\)' \| \
23098 . : '\(.\)' 2>/dev/null ||
23099 echo X"$ac_file" |
23100 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23101 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23102 /^X\(\/\/\)$/{ s//\1/; q; }
23103 /^X\(\/\).*/{ s//\1/; q; }
23104 s/.*/./; q'`
23105 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23106 { case "$ac_dir" in
23107 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23108 *) as_incr_dir=.;;
23109 esac
23110 as_dummy="$ac_dir"
23111 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23112 case $as_mkdir_dir in
23113 # Skip DOS drivespec
23114 ?:) as_incr_dir=$as_mkdir_dir ;;
23116 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23117 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23119 esac
23120 done; }
23122 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23123 # A "../" for each directory in $ac_dir_suffix.
23124 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23125 else
23126 ac_dir_suffix= ac_dots=
23129 case $srcdir in
23130 .) ac_srcdir=.
23131 if test -z "$ac_dots"; then
23132 ac_top_srcdir=.
23133 else
23134 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23135 fi ;;
23136 [\\/]* | ?:[\\/]* )
23137 ac_srcdir=$srcdir$ac_dir_suffix;
23138 ac_top_srcdir=$srcdir ;;
23139 *) # Relative path.
23140 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23141 ac_top_srcdir=$ac_dots$srcdir ;;
23142 esac
23144 case $INSTALL in
23145 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23146 *) ac_INSTALL=$ac_dots$INSTALL ;;
23147 esac
23149 if test x"$ac_file" != x-; then
23150 { echo "$as_me:23150: creating $ac_file" >&5
23151 echo "$as_me: creating $ac_file" >&6;}
23152 rm -f "$ac_file"
23154 # Let's still pretend it is `configure' which instantiates (i.e., don't
23155 # use $as_me), people would be surprised to read:
23156 # /* config.h. Generated automatically by config.status. */
23157 configure_input="Generated automatically from `echo $ac_file_in |
23158 sed 's,.*/,,'` by configure."
23160 # First look for the input files in the build tree, otherwise in the
23161 # src tree.
23162 ac_file_inputs=`IFS=:
23163 for f in $ac_file_in; do
23164 case $f in
23165 -) echo $tmp/stdin ;;
23166 [\\/$]*)
23167 # Absolute (can't be DOS-style, as IFS=:)
23168 test -f "$f" || { { echo "$as_me:23168: error: cannot find input file: $f" >&5
23169 echo "$as_me: error: cannot find input file: $f" >&2;}
23170 { (exit 1); exit 1; }; }
23171 echo $f;;
23172 *) # Relative
23173 if test -f "$f"; then
23174 # Build tree
23175 echo $f
23176 elif test -f "$srcdir/$f"; then
23177 # Source tree
23178 echo $srcdir/$f
23179 else
23180 # /dev/null tree
23181 { { echo "$as_me:23181: error: cannot find input file: $f" >&5
23182 echo "$as_me: error: cannot find input file: $f" >&2;}
23183 { (exit 1); exit 1; }; }
23184 fi;;
23185 esac
23186 done` || { (exit 1); exit 1; }
23188 cat >>$CONFIG_STATUS <<\EOF
23189 ac_warn_datarootdir=no
23190 if test x"$ac_file" != x-; then
23191 for ac_item in $ac_file_inputs
23193 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23194 if test -n "$ac_seen"; then
23195 ac_used=`grep '@datarootdir@' $ac_item`
23196 if test -z "$ac_used"; then
23197 { echo "$as_me:23197: WARNING: datarootdir was used implicitly but not set:
23198 $ac_seen" >&5
23199 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23200 $ac_seen" >&2;}
23201 ac_warn_datarootdir=yes
23204 ac_seen=`grep '${datarootdir}' $ac_item`
23205 if test -n "$ac_seen"; then
23206 { echo "$as_me:23206: WARNING: datarootdir was used explicitly but not set:
23207 $ac_seen" >&5
23208 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23209 $ac_seen" >&2;}
23210 ac_warn_datarootdir=yes
23212 done
23215 if test "x$ac_warn_datarootdir" = xyes; then
23216 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23220 cat >>$CONFIG_STATUS <<EOF
23221 sed "$ac_vpsub
23222 $extrasub
23224 cat >>$CONFIG_STATUS <<\EOF
23226 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23227 s,@configure_input@,$configure_input,;t t
23228 s,@srcdir@,$ac_srcdir,;t t
23229 s,@top_srcdir@,$ac_top_srcdir,;t t
23230 s,@INSTALL@,$ac_INSTALL,;t t
23231 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23232 rm -f $tmp/stdin
23233 if test x"$ac_file" != x-; then
23234 cp $tmp/out $ac_file
23236 for ac_name in prefix exec_prefix datarootdir
23238 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23239 if test -n "$ac_seen"; then
23240 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
23241 if test -z "$ac_init"; then
23242 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23243 { echo "$as_me:23243: WARNING: Variable $ac_name is used but was not set:
23244 $ac_seen" >&5
23245 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23246 $ac_seen" >&2;}
23249 done
23250 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23251 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23252 if test -s $tmp/out; then
23253 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23254 { echo "$as_me:23254: WARNING: Some variables may not be substituted:
23255 $ac_seen" >&5
23256 echo "$as_me: WARNING: Some variables may not be substituted:
23257 $ac_seen" >&2;}
23259 else
23260 cat $tmp/out
23262 rm -f $tmp/out
23264 done
23266 cat >>$CONFIG_STATUS <<\EOF
23269 # CONFIG_HEADER section.
23272 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23273 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23275 # ac_d sets the value in "#define NAME VALUE" lines.
23276 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23277 ac_dB='[ ].*$,\1#\2'
23278 ac_dC=' '
23279 ac_dD=',;t'
23280 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23281 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23282 ac_iB='\([ ]\),\1#\2define\3'
23283 ac_iC=' '
23284 ac_iD='\4,;t'
23285 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23286 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23287 ac_uB='$,\1#\2define\3'
23288 ac_uC=' '
23289 ac_uD=',;t'
23291 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23292 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23293 case $ac_file in
23294 - | *:- | *:-:* ) # input from stdin
23295 cat >$tmp/stdin
23296 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23297 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23298 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23299 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23300 * ) ac_file_in=$ac_file.in ;;
23301 esac
23303 test x"$ac_file" != x- && { echo "$as_me:23303: creating $ac_file" >&5
23304 echo "$as_me: creating $ac_file" >&6;}
23306 # First look for the input files in the build tree, otherwise in the
23307 # src tree.
23308 ac_file_inputs=`IFS=:
23309 for f in $ac_file_in; do
23310 case $f in
23311 -) echo $tmp/stdin ;;
23312 [\\/$]*)
23313 # Absolute (can't be DOS-style, as IFS=:)
23314 test -f "$f" || { { echo "$as_me:23314: error: cannot find input file: $f" >&5
23315 echo "$as_me: error: cannot find input file: $f" >&2;}
23316 { (exit 1); exit 1; }; }
23317 echo $f;;
23318 *) # Relative
23319 if test -f "$f"; then
23320 # Build tree
23321 echo $f
23322 elif test -f "$srcdir/$f"; then
23323 # Source tree
23324 echo $srcdir/$f
23325 else
23326 # /dev/null tree
23327 { { echo "$as_me:23327: error: cannot find input file: $f" >&5
23328 echo "$as_me: error: cannot find input file: $f" >&2;}
23329 { (exit 1); exit 1; }; }
23330 fi;;
23331 esac
23332 done` || { (exit 1); exit 1; }
23333 # Remove the trailing spaces.
23334 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
23338 # Transform confdefs.h into a list of #define's. We won't use it as a sed
23339 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
23340 # be either 'cat' or 'sort'.
23341 cat confdefs.h | uniq >conftest.vals
23343 # Break up conftest.vals because some shells have a limit on
23344 # the size of here documents, and old seds have small limits too.
23346 rm -f conftest.tail
23347 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
23348 while grep . conftest.vals >/dev/null
23350 # Write chunks of a limited-size here document to conftest.frag.
23351 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23352 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23353 echo 'CEOF' >> $CONFIG_STATUS
23354 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23355 rm -f conftest.vals
23356 mv conftest.tail conftest.vals
23357 done
23358 rm -f conftest.vals
23360 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23361 # marker @DEFS@.
23362 echo ' cat >> conftest.edit <<CEOF
23363 /@DEFS@/r conftest.frag
23364 /@DEFS@/d
23365 CEOF
23366 sed -f conftest.edit $tmp/in > $tmp/out
23367 rm -f $tmp/in
23368 mv $tmp/out $tmp/in
23369 rm -f conftest.edit conftest.frag
23370 ' >> $CONFIG_STATUS
23372 cat >>$CONFIG_STATUS <<\EOF
23373 # Let's still pretend it is `configure' which instantiates (i.e., don't
23374 # use $as_me), people would be surprised to read:
23375 # /* config.h. Generated automatically by config.status. */
23376 if test x"$ac_file" = x-; then
23377 echo "/* Generated automatically by configure. */" >$tmp/config.h
23378 else
23379 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
23381 cat $tmp/in >>$tmp/config.h
23382 rm -f $tmp/in
23383 if test x"$ac_file" != x-; then
23384 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23385 { echo "$as_me:23385: $ac_file is unchanged" >&5
23386 echo "$as_me: $ac_file is unchanged" >&6;}
23387 else
23388 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23389 X"$ac_file" : 'X\(//\)[^/]' \| \
23390 X"$ac_file" : 'X\(//\)$' \| \
23391 X"$ac_file" : 'X\(/\)' \| \
23392 . : '\(.\)' 2>/dev/null ||
23393 echo X"$ac_file" |
23394 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23395 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23396 /^X\(\/\/\)$/{ s//\1/; q; }
23397 /^X\(\/\).*/{ s//\1/; q; }
23398 s/.*/./; q'`
23399 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23400 { case "$ac_dir" in
23401 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23402 *) as_incr_dir=.;;
23403 esac
23404 as_dummy="$ac_dir"
23405 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23406 case $as_mkdir_dir in
23407 # Skip DOS drivespec
23408 ?:) as_incr_dir=$as_mkdir_dir ;;
23410 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23411 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23413 esac
23414 done; }
23417 rm -f $ac_file
23418 mv $tmp/config.h $ac_file
23420 else
23421 cat $tmp/config.h
23422 rm -f $tmp/config.h
23424 done
23426 cat >>$CONFIG_STATUS <<\EOF
23428 # CONFIG_COMMANDS section.
23430 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23431 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23432 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23434 case $ac_dest in
23435 default )
23436 if test "x$cf_with_tests" != xno ; then
23438 for cf_dir in test
23440 if test ! -d $srcdir/$cf_dir; then
23441 continue
23442 elif test -f $srcdir/$cf_dir/programs; then
23443 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23445 done
23449 cf_prefix=$LIB_PREFIX
23451 case $cf_cv_shlib_version in
23452 (cygdll|msysdll|mingw)
23453 TINFO_NAME=$TINFO_ARG_SUFFIX
23454 TINFO_SUFFIX=.dll
23456 esac
23458 if test -n "$TINFO_SUFFIX" ; then
23459 case $TINFO_SUFFIX in
23460 (tw*)
23461 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23462 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23464 (t*)
23465 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23466 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23468 (w*)
23469 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23470 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23472 esac
23475 for cf_dir in $SRC_SUBDIRS
23477 if test ! -d $srcdir/$cf_dir ; then
23478 continue
23479 elif test -f $srcdir/$cf_dir/modules; then
23481 SHARED_LIB=
23482 Libs_To_Make=
23484 cf_sed_options=
23485 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23486 then
23487 cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
23488 cf_sed_options="$cf_sed_options -e \"/deprecated in ABI${cf_cv_abi_version}/d\""
23491 if test "x$WILDCARD_SYMS" = xno
23492 then
23493 cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
23496 if test "x$cf_sed_options" != "x"
23497 then
23498 cat >>$cf_dir/Makefile <<CF_EOF
23500 # Generated by CF_LIB_RULES
23501 resulting.map: $UNALTERED_SYMS
23502 sed $cf_sed_options < $UNALTERED_SYMS >\$@
23504 clean::
23505 rm -f resulting.map
23506 CF_EOF
23509 for cf_item in $cf_LIST_MODELS
23512 case X$cf_item in
23513 (Xlibtool)
23514 cf_suffix='.la'
23515 cf_depsuf=$cf_suffix
23517 (Xdebug)
23518 cf_suffix='_g.a'
23519 cf_depsuf=$cf_suffix
23521 (Xprofile)
23522 cf_suffix='_p.a'
23523 cf_depsuf=$cf_suffix
23525 (Xshared)
23526 case $cf_cv_system_name in
23527 (aix[5-7]*)
23528 cf_suffix='.so'
23529 cf_depsuf=$cf_suffix
23531 (cygwin*|msys*|mingw*)
23532 cf_suffix='.dll'
23533 cf_depsuf='.dll.a'
23535 (darwin*)
23536 cf_suffix='.dylib'
23537 cf_depsuf=$cf_suffix
23539 (hpux*)
23540 case $target in
23541 (ia64*)
23542 cf_suffix='.so'
23543 cf_depsuf=$cf_suffix
23546 cf_suffix='.sl'
23547 cf_depsuf=$cf_suffix
23549 esac
23552 cf_suffix='.so'
23553 cf_depsuf=$cf_suffix
23555 esac
23558 cf_suffix='.a'
23559 cf_depsuf=$cf_suffix
23561 esac
23562 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23563 then
23564 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23565 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23568 cf_libname=$cf_dir
23569 test "$cf_dir" = c++ && cf_libname=ncurses++
23570 if test $cf_item = shared ; then
23571 if test -n "${LIB_SUFFIX}"
23572 then
23573 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23574 else
23575 cf_shared_suffix="$cf_suffix"
23577 if test "$cf_cv_do_symlinks" = yes ; then
23578 cf_version_name=
23580 case "$cf_cv_shlib_version" in
23581 (rel)
23582 cf_version_name=REL_VERSION
23584 (abi)
23585 cf_version_name=ABI_VERSION
23587 esac
23589 if test -n "$cf_version_name"
23590 then
23591 case "$cf_cv_system_name" in
23592 (darwin*)
23593 # "w", etc?
23594 cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23597 cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23599 esac
23601 if test -n "${USE_LIB_SUFFIX}"
23602 then
23603 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23604 else
23605 cf_shared_suffix="$cf_suffix"
23608 # cygwin needs import library, and has unique naming convention
23609 # use autodetected ${cf_prefix} for import lib and static lib, but
23610 # use 'cyg' prefix for shared lib.
23611 case $cf_cv_shlib_version in
23612 (cygdll)
23613 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23614 cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
23616 (msysdll)
23617 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23618 cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23620 (mingw)
23621 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23622 cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
23625 cf_add_lib=
23627 esac
23628 if test -n "$cf_add_lib"
23629 then
23630 Libs_To_Make="$Libs_To_Make $cf_add_lib"
23631 continue
23634 cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23635 Libs_To_Make="$Libs_To_Make $cf_add_lib"
23636 done
23638 if test $cf_dir = ncurses ; then
23639 cf_subsets="$LIB_SUBSETS"
23640 cf_r_parts="$cf_subsets"
23641 cf_liblist="$Libs_To_Make"
23643 while test -n "$cf_r_parts"
23645 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23646 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23647 if test "$cf_l_parts" != "$cf_r_parts" ; then
23648 cf_add_lib=
23649 case $cf_l_parts in
23650 (*termlib*)
23651 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23653 (*ticlib*)
23654 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23657 break
23659 esac
23660 if test -n "$cf_add_lib"; then
23661 Libs_To_Make="$cf_add_lib $Libs_To_Make"
23663 else
23664 break
23666 done
23667 else
23668 cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23671 if test $cf_dir = c++; then
23672 if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23673 cf_list=
23674 for cf_item in $Libs_To_Make
23676 case $cf_item in
23677 (*.a)
23680 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23682 esac
23683 for cf_test in $cf_list
23685 if test "$cf_test" = "$cf_item"
23686 then
23687 cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23688 cf_item=
23689 break
23691 done
23692 test -n "$cf_item" && cf_list="$cf_list $cf_item"
23693 done
23694 Libs_To_Make="$cf_list"
23698 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23699 -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23700 $cf_dir/Makefile >$cf_dir/Makefile.out
23701 mv $cf_dir/Makefile.out $cf_dir/Makefile
23703 $AWK -f $srcdir/mk-0th.awk \
23704 libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23705 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23707 for cf_subset in $cf_subsets
23709 cf_subdirs=
23710 for cf_item in $cf_LIST_MODELS
23713 echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23715 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23717 CXX_MODEL=$cf_ITEM
23718 if test "$CXX_MODEL" = SHARED; then
23719 case $cf_cv_shlib_version in
23720 (cygdll|msysdll|mingw)
23721 test "x$with_shared_cxx" = xno && test -n "$verbose" && echo " overriding CXX_MODEL to SHARED" 1>&6
23723 echo "${as_me:-configure}:23723: testing overriding CXX_MODEL to SHARED ..." 1>&5
23725 with_shared_cxx=yes
23728 test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23730 esac
23733 case X$cf_item in
23734 (Xlibtool)
23735 cf_suffix='.la'
23736 cf_depsuf=$cf_suffix
23738 (Xdebug)
23739 cf_suffix='_g.a'
23740 cf_depsuf=$cf_suffix
23742 (Xprofile)
23743 cf_suffix='_p.a'
23744 cf_depsuf=$cf_suffix
23746 (Xshared)
23747 case $cf_cv_system_name in
23748 (aix[5-7]*)
23749 cf_suffix='.so'
23750 cf_depsuf=$cf_suffix
23752 (cygwin*|msys*|mingw*)
23753 cf_suffix='.dll'
23754 cf_depsuf='.dll.a'
23756 (darwin*)
23757 cf_suffix='.dylib'
23758 cf_depsuf=$cf_suffix
23760 (hpux*)
23761 case $target in
23762 (ia64*)
23763 cf_suffix='.so'
23764 cf_depsuf=$cf_suffix
23767 cf_suffix='.sl'
23768 cf_depsuf=$cf_suffix
23770 esac
23773 cf_suffix='.so'
23774 cf_depsuf=$cf_suffix
23776 esac
23779 cf_suffix='.a'
23780 cf_depsuf=$cf_suffix
23782 esac
23783 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23784 then
23785 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23786 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23789 case $cf_item in
23790 (libtool) cf_subdir='obj_lo' ;;
23791 (normal) cf_subdir='objects' ;;
23792 (debug) cf_subdir='obj_g' ;;
23793 (profile) cf_subdir='obj_p' ;;
23794 (shared)
23795 case $cf_cv_system_name in
23796 (cygwin|msys)
23797 cf_subdir='objects' ;;
23799 cf_subdir='obj_s' ;;
23800 esac
23801 esac
23803 # Test for case where we build libtinfo with a different name.
23804 cf_libname=$cf_dir
23805 if test $cf_dir = ncurses ; then
23806 case $cf_subset in
23807 (*base*)
23808 cf_libname=${cf_libname}$USE_LIB_SUFFIX
23810 (*termlib*)
23811 cf_libname=$TINFO_LIB_SUFFIX
23813 (ticlib*)
23814 cf_libname=$TICS_LIB_SUFFIX
23816 esac
23817 elif test $cf_dir = c++ ; then
23818 cf_libname=ncurses++$USE_LIB_SUFFIX
23819 else
23820 cf_libname=${cf_libname}$USE_LIB_SUFFIX
23822 if test -n "${USE_ARG_SUFFIX}" ; then
23823 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
23824 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
23827 # These dependencies really are for development, not
23828 # builds, but they are useful in porting, too.
23829 cf_depend="../include/ncurses_cfg.h"
23830 if test "$srcdir" = "."; then
23831 cf_reldir="."
23832 else
23833 cf_reldir="\${srcdir}"
23836 if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23837 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23838 elif test -f $srcdir/$cf_dir/curses.priv.h; then
23839 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23842 cf_dir_suffix=
23843 old_cf_suffix="$cf_suffix"
23844 if test "$cf_cv_shlib_version_infix" = yes ; then
23845 if test -n "$USE_LIB_SUFFIX" ; then
23846 case $USE_LIB_SUFFIX in
23847 (tw*)
23848 cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
23849 cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
23850 cf_dir_suffix=tw$EXTRA_SUFFIX
23852 (t*)
23853 cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
23854 cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
23855 cf_dir_suffix=t$EXTRA_SUFFIX
23857 (w*)
23858 cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
23859 cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
23860 cf_dir_suffix=w$EXTRA_SUFFIX
23863 cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
23864 cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
23865 cf_dir_suffix=$EXTRA_SUFFIX
23867 esac
23871 $AWK -f $srcdir/mk-1st.awk \
23872 name=${cf_libname}${cf_dir_suffix} \
23873 traces=$LIB_TRACING \
23874 MODEL=$cf_ITEM \
23875 CXX_MODEL=$CXX_MODEL \
23876 model=$cf_subdir \
23877 prefix=$cf_prefix \
23878 suffix=$cf_suffix \
23879 subset=$cf_subset \
23880 driver=$cf_cv_term_driver \
23881 SymLink="$LN_S" \
23882 TermlibRoot=$TINFO_NAME \
23883 TermlibSuffix=$TINFO_SUFFIX \
23884 ShlibVer=$cf_cv_shlib_version \
23885 ShlibVerInfix=$cf_cv_shlib_version_infix \
23886 ReLink=${cf_cv_do_relink:-no} \
23887 DoLinks=$cf_cv_do_symlinks \
23888 rmSoLocs=$cf_cv_rm_so_locs \
23889 ldconfig="$LDCONFIG" \
23890 overwrite=$WITH_OVERWRITE \
23891 depend="$cf_depend" \
23892 host="$host" \
23893 libtool_version="$LIBTOOL_VERSION" \
23894 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23896 cf_suffix="$old_cf_suffix"
23898 for cf_subdir2 in $cf_subdirs lib
23900 test $cf_subdir = $cf_subdir2 && break
23901 done
23902 test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23903 $AWK -f $srcdir/mk-2nd.awk \
23904 name=$cf_dir \
23905 traces=$LIB_TRACING \
23906 MODEL=$cf_ITEM \
23907 model=$cf_subdir \
23908 subset=$cf_subset \
23909 srcdir=$srcdir \
23910 echo=$WITH_ECHO \
23911 crenames=$cf_cv_prog_CC_c_o \
23912 cxxrenames=$cf_cv_prog_CXX_c_o \
23913 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23914 cf_subdirs="$cf_subdirs $cf_subdir"
23915 done
23916 done
23919 echo ' cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23920 done
23922 for cf_dir in $SRC_SUBDIRS
23924 if test ! -d $srcdir/$cf_dir ; then
23925 continue
23928 if test -f $cf_dir/Makefile ; then
23929 case "$cf_dir" in
23930 (Ada95)
23931 echo 'libs \' >> Makefile
23932 echo 'install.libs \' >> Makefile
23933 echo 'uninstall.libs ::' >> Makefile
23934 echo ' cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23936 esac
23939 if test -f $srcdir/$cf_dir/modules; then
23940 echo >> Makefile
23941 if test -f $srcdir/$cf_dir/headers; then
23942 cat >> Makefile <<CF_EOF
23943 install.includes \\
23944 uninstall.includes \\
23945 CF_EOF
23947 if test "$cf_dir" != "c++" ; then
23948 echo 'lint \' >> Makefile
23950 cat >> Makefile <<CF_EOF
23951 libs \\
23952 lintlib \\
23953 install.libs \\
23954 uninstall.libs \\
23955 install.$cf_dir \\
23956 uninstall.$cf_dir ::
23957 cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23958 CF_EOF
23959 elif test -f $srcdir/$cf_dir/headers; then
23960 cat >> Makefile <<CF_EOF
23962 libs \\
23963 install.libs \\
23964 uninstall.libs \\
23965 install.includes \\
23966 uninstall.includes ::
23967 cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23968 CF_EOF
23970 done
23972 if test "x$cf_with_db_install" = xyes; then
23973 cat >> Makefile <<CF_EOF
23975 install.libs uninstall.libs \\
23976 install.data uninstall.data ::
23977 $MAKE_TERMINFO cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23978 CF_EOF
23979 else
23980 cat >> Makefile <<CF_EOF
23982 install.libs uninstall.libs ::
23983 cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23984 CF_EOF
23987 if test "x$cf_with_manpages" = xyes; then
23988 cat >> Makefile <<CF_EOF
23990 install.man \\
23991 uninstall.man ::
23992 cd man && \${MAKE} \${TOP_MFLAGS} \$@
23993 CF_EOF
23996 cat >> Makefile <<CF_EOF
23998 distclean ::
23999 rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24000 rm -f headers.sh headers.sed mk_shared_lib.sh
24001 rm -f edit_man.* man_alias.*
24002 rm -rf \${DIRS_TO_MAKE}
24003 CF_EOF
24005 # Special case: tack's manpage lives in its own directory.
24006 if test "x$cf_with_manpages" = xyes; then
24007 if test -d tack ; then
24008 if test -f $srcdir/$tack.h; then
24009 cat >> Makefile <<CF_EOF
24011 install.man \\
24012 uninstall.man ::
24013 cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24014 CF_EOF
24019 rm -f headers.sed headers.sh
24021 echo creating headers.sh
24022 cat >headers.sh <<CF_EOF
24023 #! $SHELL
24024 # This shell script is generated by the 'configure' script. It is invoked in a
24025 # subdirectory of the build tree. It generates a sed-script in the parent
24026 # directory that is used to adjust includes for header files that reside in a
24027 # subdirectory of /usr/include, etc.
24028 PRG=""
24029 while test \$# != 3
24031 PRG="\$PRG \$1"; shift
24032 done
24033 DST=\$1
24034 REF=\$2
24035 SRC=\$3
24036 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24037 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24038 echo installing \$SRC in \$DST
24039 CF_EOF
24041 if test $WITH_CURSES_H = yes; then
24042 cat >>headers.sh <<CF_EOF
24043 case \$DST in
24044 (/*/include/*)
24045 END=\`basename \$DST\`
24046 for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24048 NAME=\`basename \$i\`
24049 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24050 done
24053 echo "" >> \$TMPSED
24055 esac
24056 CF_EOF
24058 else
24059 cat >>headers.sh <<CF_EOF
24060 case \$DST in
24061 (/*/include/*)
24062 END=\`basename \$DST\`
24063 for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24065 NAME=\`basename \$i\`
24066 if test "\$NAME" = "curses.h"
24067 then
24068 echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24069 NAME=ncurses.h
24071 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24072 done
24075 echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24077 esac
24078 CF_EOF
24080 cat >>headers.sh <<CF_EOF
24081 rm -f \$TMPSRC
24082 sed -f \$TMPSED \$SRC > \$TMPSRC
24083 NAME=\`basename \$SRC\`
24084 CF_EOF
24085 if test $WITH_CURSES_H != yes; then
24086 cat >>headers.sh <<CF_EOF
24087 test "\$NAME" = "curses.h" && NAME=ncurses.h
24088 CF_EOF
24090 cat >>headers.sh <<CF_EOF
24091 # Just in case someone gzip'd manpages, remove the conflicting copy.
24092 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24094 eval \$PRG \$TMPSRC \$DST/\$NAME
24095 rm -f \$TMPSRC \$TMPSED
24096 CF_EOF
24098 chmod 0755 headers.sh
24100 for cf_dir in $SRC_SUBDIRS
24102 if test ! -d $srcdir/$cf_dir ; then
24103 continue
24106 if test -f $srcdir/$cf_dir/headers; then
24107 $AWK -f $srcdir/mk-hdr.awk \
24108 subset="$LIB_SUBSETS" \
24109 compat="$WITH_CURSES_H" \
24110 $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24113 if test -f $srcdir/$cf_dir/modules; then
24114 if test "$cf_dir" != "c++" ; then
24115 cat >>$cf_dir/Makefile <<"CF_EOF"
24116 depend : ${AUTO_SRC}
24117 makedepend -- ${CPPFLAGS} -- ${C_SRC}
24119 # DO NOT DELETE THIS LINE -- make depend depends on it.
24120 CF_EOF
24123 done
24125 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24126 if test -z "$USE_OLD_MAKERULES" ; then
24127 $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24131 esac
24132 done
24135 cat >>$CONFIG_STATUS <<\EOF
24137 { (exit 0); exit 0; }
24139 chmod +x $CONFIG_STATUS
24140 ac_clean_files=$ac_clean_files_save
24142 # configure is writing to config.log, and then calls config.status.
24143 # config.status does its own redirection, appending to config.log.
24144 # Unfortunately, on DOS this fails, as config.log is still kept open
24145 # by configure, so config.status won't be able to write to it; its
24146 # output is simply discarded. So we exec the FD to /dev/null,
24147 # effectively closing config.log, so it can be properly (re)opened and
24148 # appended to by config.status. When coming back to configure, we
24149 # need to make the FD available again.
24150 if test "$no_create" != yes; then
24151 ac_cs_success=:
24152 exec 5>/dev/null
24153 $SHELL $CONFIG_STATUS || ac_cs_success=false
24154 exec 5>>config.log
24155 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24156 # would make configure fail if this is the last instruction.
24157 $ac_cs_success || { (exit 1); exit 1; }
24159 ${MAKE:-make} preinstall